1 [Tutorial]Liberando Todas As Slots de itens 13/2/2012, 18:58
SkyAway
Membro V
[size=18pt]Client~Side[/size]
Procure por:
Abaixo adicione:
Procure por:
Mude para:
Procure por:
Mude tudo para:
Procure na ModTypes, SubClearPlayer:
Mude para:
No final do ModTypes adicione:
Procure por:
Abaixo adicione:
Procure por:
Mude para:
Procure por:
Mude para:
Na HandleData procure por:
Abaixo adicione:
Subistitua a Sub cmbType por:
Subistitua a Sub cmdUpdate_Click() por:
Na sub Private Sub picInv_MouseMove mude para:
Na frmItemEditor, no cmbTypes vá na propriedades e procure por List e adicione Ring1
[size=18pt]Server~Side[/size]
Procure por:
Mude tudo para:
Procure por:
Mude para:
Procure por:
Abaixo adicione:
Procure por:
Mude para:
Na subClearChar procure por:
Abaixo adicione:
Na mesma sub procure por:
Player(Index).Char(i).ShieldSlot = 0
Procure por:
Abaixo adicione:
Procure por:
Mude tudo para:
Continua .......
Procure por:
- Código:
Public Const ITEM_TYPE_PET = 14
Abaixo adicione:
- Código:
Public Const ITEM_TYPE_RING1 = 15
Public Const ITEM_TYPE_RING2 = 16
Public Const ITEM_TYPE_GLOVES = 17
Public Const ITEM_TYPE_LEGS = 18
Public Const ITEM_TYPE_AMULET = 19
Procure por:
- Código:
Player worn equipment packet
Mude para:
- Código:
' ::::::::::::::::::::::::::::::::::
' :: Player worn equipment packet ::
' ::::::::::::::::::::::::::::::::::
If Parse(0) = "playerworneq" Then
z = Val(Parse(1))
If z <= 0 Then Exit Sub
Call SetPlayerArmorSlot(z, Val(Parse(2)))
Call SetPlayerWeaponSlot(z, Val(Parse(3)))
Call SetPlayerHelmetSlot(z, Val(Parse(4)))
Call SetPlayerShieldSlot(z, Val(Parse(5)))
Call SetPlayerRing1Slot(z, Val(Parse(6)))
Call SetPlayerRing2Slot(z, Val(Parse(7)))
Call SetPlayerGlovesSlot(z, Val(Parse(8)))
Call SetPlayerLegsSlot(z, Val(Parse(9)))
Call SetPlayerAmuletSlot(z, Val(Parse(10)))
If z = MyIndex Then
Call UpdateVisInv
End If
Exit Sub
End If
Procure por:
- Código:
' Worn equipment
ArmorSlot As Long
WeaponSlot As Long
HelmetSlot As Long
ShieldSlot As Long
Mude tudo para:
- Código:
' Worn equipment
ArmorSlot As Long
WeaponSlot As Long
HelmetSlot As Long
ShieldSlot As Long
Ring1Slot As Long
Ring2Slot As Long
GlovesSlot As Long
LegsSlot As Long
AmuletSlot As Long
Procure na ModTypes, SubClearPlayer:
- Código:
Player(Index).ArmorSlot = 0
Player(Index).WeaponSlot = 0
Player(Index).HelmetSlot = 0
Player(Index).ShieldSlot = 0
Mude para:
- Código:
Player(Index).ArmorSlot = 0
Player(Index).WeaponSlot = 0
Player(Index).HelmetSlot = 0
Player(Index).ShieldSlot = 0
Player(Index).Ring1Slot = 0
Player(Index).Ring2Slot = 0
Player(Index).GlovesSlot = 0
Player(Index).LegsSlot = 0
Player(Index).AmuletSlot = 0
No final do ModTypes adicione:
- Código:
Function GetPlayerRing1Slot(ByVal Index As Long) As Long
GetPlayerRing1Slot = Player(Index).Ring1Slot
End Function
Sub SetPlayerRing1Slot(ByVal Index As Long, InvNum As Long)
Player(Index).Ring1Slot = InvNum
End Sub
Function GetPlayerRing2Slot(ByVal Index As Long) As Long
GetPlayerRing2Slot = Player(Index).Ring2Slot
End Function
Sub SetPlayerRing2Slot(ByVal Index As Long, InvNum As Long)
Player(Index).Ring2Slot = InvNum
End Sub
Function GetPlayerGlovesSlot(ByVal Index As Long) As Long
GetPlayerGlovesSlot = Player(Index).GlovesSlot
End Function
Sub SetPlayerGlovsSlot(ByVal Index As Long, InvNum As Long)
Player(Index).GlovesSlot = InvNum
End Sub
Function GetPlayerLegsSlot(ByVal Index As Long) As Long
GetPlayerLegsSlot = Player(Index).LegsSlot
End Function
Sub SetPlayerLegsSlot(ByVal Index As Long, InvNum As Long)
Player(Index).LegsSlot = InvNum
End Sub
Function GetPlayerAmuletSlot(ByVal Index As Long) As Long
GetPlayerAmuletSlot = Player(Index).AmuletSlot
End Function
Sub SetPlayerAmuletSlot(ByVal Index As Long, InvNum As Long)
Player(Index).AmuletSlot = InvNum
End Sub
Procure por:
- Código:
If (frmItemEditor.cmbType.ListIndex = ITEM_TYPE_PET) Then
Item(EditorIndex).Data1 = frmItemEditor.scrlPet.Value
Item(EditorIndex).Data2 = frmItemEditor.scrlPetLevel.Value
Item(EditorIndex).Data3 = 0
Item(EditorIndex).StrReq = 0
Item(EditorIndex).DefReq = 0
Item(EditorIndex).SpeedReq = 0
Item(EditorIndex).MagicReq = 0
Item(EditorIndex).ClassReq = 0
Item(EditorIndex).AccessReq = 0
Item(EditorIndex).AddHP = 0
Item(EditorIndex).AddMP = 0
Item(EditorIndex).AddSP = 0
Item(EditorIndex).AddStr = 0
Item(EditorIndex).AddDef = 0
Item(EditorIndex).AddMagi = 0
Item(EditorIndex).AddSpeed = 0
Item(EditorIndex).AddEXP = 0
Item(EditorIndex).AttackSpeed = 0
End If
Abaixo adicione:
- Código:
If (frmItemEditor.cmbType.ListIndex = ITEM_TYPE_RING1) Then
Item(EditorIndex).Data2 = frmItemEditor.scrlStrength.Value
Item(EditorIndex).StrReq = frmItemEditor.scrlStrReq.Value
Item(EditorIndex).DefReq = frmItemEditor.scrlDefReq.Value
Item(EditorIndex).SpeedReq = frmItemEditor.scrlSpeedReq.Value
Item(EditorIndex).MagicReq = frmItemEditor.scrlMagicReq.Value
Item(EditorIndex).ClassReq = frmItemEditor.scrlClassReq.Value
Item(EditorIndex).AccessReq = frmItemEditor.scrlAccessReq.Value
Item(EditorIndex).AddHP = frmItemEditor.scrlAddHP.Value
Item(EditorIndex).AddMP = frmItemEditor.scrlAddMP.Value
Item(EditorIndex).AddSP = frmItemEditor.scrlAddSP.Value
Item(EditorIndex).AddStr = frmItemEditor.scrlAddStr.Value
Item(EditorIndex).AddDef = frmItemEditor.scrlAddDef.Value
Item(EditorIndex).AddMagi = frmItemEditor.scrlAddMagi.Value
Item(EditorIndex).AddSpeed = frmItemEditor.scrlAddSpeed.Value
Item(EditorIndex).AddEXP = frmItemEditor.scrlAddEXP.Value
Item(EditorIndex).AttackSpeed = frmItemEditor.scrlAttackSpeed.Value
End If
If (frmItemEditor.cmbType.ListIndex = ITEM_TYPE_RING2) Then
Item(EditorIndex).Data2 = frmItemEditor.scrlStrength.Value
Item(EditorIndex).StrReq = frmItemEditor.scrlStrReq.Value
Item(EditorIndex).DefReq = frmItemEditor.scrlDefReq.Value
Item(EditorIndex).SpeedReq = frmItemEditor.scrlSpeedReq.Value
Item(EditorIndex).MagicReq = frmItemEditor.scrlMagicReq.Value
Item(EditorIndex).ClassReq = frmItemEditor.scrlClassReq.Value
Item(EditorIndex).AccessReq = frmItemEditor.scrlAccessReq.Value
Item(EditorIndex).AddHP = frmItemEditor.scrlAddHP.Value
Item(EditorIndex).AddMP = frmItemEditor.scrlAddMP.Value
Item(EditorIndex).AddSP = frmItemEditor.scrlAddSP.Value
Item(EditorIndex).AddStr = frmItemEditor.scrlAddStr.Value
Item(EditorIndex).AddDef = frmItemEditor.scrlAddDef.Value
Item(EditorIndex).AddMagi = frmItemEditor.scrlAddMagi.Value
Item(EditorIndex).AddSpeed = frmItemEditor.scrlAddSpeed.Value
Item(EditorIndex).AddEXP = frmItemEditor.scrlAddEXP.Value
Item(EditorIndex).AttackSpeed = frmItemEditor.scrlAttackSpeed.Value
End If
If (frmItemEditor.cmbType.ListIndex = ITEM_TYPE_GLOVES) Then
Item(EditorIndex).Data2 = frmItemEditor.scrlStrength.Value
Item(EditorIndex).StrReq = frmItemEditor.scrlStrReq.Value
Item(EditorIndex).DefReq = frmItemEditor.scrlDefReq.Value
Item(EditorIndex).SpeedReq = frmItemEditor.scrlSpeedReq.Value
Item(EditorIndex).MagicReq = frmItemEditor.scrlMagicReq.Value
Item(EditorIndex).ClassReq = frmItemEditor.scrlClassReq.Value
Item(EditorIndex).AccessReq = frmItemEditor.scrlAccessReq.Value
Item(EditorIndex).AddHP = frmItemEditor.scrlAddHP.Value
Item(EditorIndex).AddMP = frmItemEditor.scrlAddMP.Value
Item(EditorIndex).AddSP = frmItemEditor.scrlAddSP.Value
Item(EditorIndex).AddStr = frmItemEditor.scrlAddStr.Value
Item(EditorIndex).AddDef = frmItemEditor.scrlAddDef.Value
Item(EditorIndex).AddMagi = frmItemEditor.scrlAddMagi.Value
Item(EditorIndex).AddSpeed = frmItemEditor.scrlAddSpeed.Value
Item(EditorIndex).AddEXP = frmItemEditor.scrlAddEXP.Value
Item(EditorIndex).AttackSpeed = frmItemEditor.scrlAttackSpeed.Value
End If
If (frmItemEditor.cmbType.ListIndex = ITEM_TYPE_LEGS) Then
Item(EditorIndex).Data2 = frmItemEditor.scrlStrength.Value
Item(EditorIndex).StrReq = frmItemEditor.scrlStrReq.Value
Item(EditorIndex).DefReq = frmItemEditor.scrlDefReq.Value
Item(EditorIndex).SpeedReq = frmItemEditor.scrlSpeedReq.Value
Item(EditorIndex).MagicReq = frmItemEditor.scrlMagicReq.Value
Item(EditorIndex).ClassReq = frmItemEditor.scrlClassReq.Value
Item(EditorIndex).AccessReq = frmItemEditor.scrlAccessReq.Value
Item(EditorIndex).AddHP = frmItemEditor.scrlAddHP.Value
Item(EditorIndex).AddMP = frmItemEditor.scrlAddMP.Value
Item(EditorIndex).AddSP = frmItemEditor.scrlAddSP.Value
Item(EditorIndex).AddStr = frmItemEditor.scrlAddStr.Value
Item(EditorIndex).AddDef = frmItemEditor.scrlAddDef.Value
Item(EditorIndex).AddMagi = frmItemEditor.scrlAddMagi.Value
Item(EditorIndex).AddSpeed = frmItemEditor.scrlAddSpeed.Value
Item(EditorIndex).AddEXP = frmItemEditor.scrlAddEXP.Value
Item(EditorIndex).AttackSpeed = frmItemEditor.scrlAttackSpeed.Value
End If
If (frmItemEditor.cmbType.ListIndex = ITEM_TYPE_AMULET) Then
Item(EditorIndex).Data2 = frmItemEditor.scrlStrength.Value
Item(EditorIndex).StrReq = frmItemEditor.scrlStrReq.Value
Item(EditorIndex).DefReq = frmItemEditor.scrlDefReq.Value
Item(EditorIndex).SpeedReq = frmItemEditor.scrlSpeedReq.Value
Item(EditorIndex).MagicReq = frmItemEditor.scrlMagicReq.Value
Item(EditorIndex).ClassReq = frmItemEditor.scrlClassReq.Value
Item(EditorIndex).AccessReq = frmItemEditor.scrlAccessReq.Value
Item(EditorIndex).AddHP = frmItemEditor.scrlAddHP.Value
Item(EditorIndex).AddMP = frmItemEditor.scrlAddMP.Value
Item(EditorIndex).AddSP = frmItemEditor.scrlAddSP.Value
Item(EditorIndex).AddStr = frmItemEditor.scrlAddStr.Value
Item(EditorIndex).AddDef = frmItemEditor.scrlAddDef.Value
Item(EditorIndex).AddMagi = frmItemEditor.scrlAddMagi.Value
Item(EditorIndex).AddSpeed = frmItemEditor.scrlAddSpeed.Value
Item(EditorIndex).AddEXP = frmItemEditor.scrlAddEXP.Value
Item(EditorIndex).AttackSpeed = frmItemEditor.scrlAttackSpeed.Value
End If
Procure por:
- Código:
Public Sub UpdateTradeInventory()
Mude para:
- Código:
Public Sub UpdateTradeInventory()
Dim I As Long
frmPlayerTrade.PlayerInv1.Clear
For I = 1 To MAX_INV
If GetPlayerInvItemNum(MyIndex, I) > 0 And GetPlayerInvItemNum(MyIndex, I) <= MAX_ITEMS Then
If Item(GetPlayerInvItemNum(MyIndex, I)).Type = ITEM_TYPE_CURRENCY Then
frmPlayerTrade.PlayerInv1.AddItem I & ": " & Trim(Item(GetPlayerInvItemNum(MyIndex, I)).Name) & " (" & GetPlayerInvItemValue(MyIndex, I) & ")"
Else
If GetPlayerWeaponSlot(MyIndex) = I Or GetPlayerArmorSlot(MyIndex) = I Or GetPlayerHelmetSlot(MyIndex) = I Or GetPlayerShieldSlot(MyIndex) = I Or GetPlayerRing1Slot(MyIndex) = I Or GetPlayerRing2Slot(MyIndex) = I Or GetPlayerGlovesSlot(MyIndex) = I Or GetPlayerLegsSlot(MyIndex) = I Or GetPlayerAmuletSlot(MyIndex) = I Then
frmPlayerTrade.PlayerInv1.AddItem I & ": " & Trim(Item(GetPlayerInvItemNum(MyIndex, I)).Name) & " (equipado)"
Else
frmPlayerTrade.PlayerInv1.AddItem I & ": " & Trim(Item(GetPlayerInvItemNum(MyIndex, I)).Name)
End If
End If
Else
frmPlayerTrade.PlayerInv1.AddItem "<Nada>"
End If
Next I
frmPlayerTrade.PlayerInv1.ListIndex = 0
End Sub
Procure por:
- Código:
Public Sub UpdateVisInv()
Dim Index As Long
Dim d As Long
For Index = 1 To MAX_INV
If GetPlayerShieldSlot(MyIndex) <> Index Then frmMirage.ShieldImage.Picture = LoadPicture()
If GetPlayerWeaponSlot(MyIndex) <> Index Then frmMirage.WeaponImage.Picture = LoadPicture()
If GetPlayerHelmetSlot(MyIndex) <> Index Then frmMirage.HelmetImage.Picture = LoadPicture()
If GetPlayerArmorSlot(MyIndex) <> Index Then frmMirage.ArmorImage.Picture = LoadPicture()
Next Index
For Index = 1 To MAX_INV
If GetPlayerShieldSlot(MyIndex) = Index Then Call BitBlt(frmMirage.ShieldImage.hDC, 0, 0, PIC_X, PIC_Y, frmMirage.picItems.hDC, (Item(GetPlayerInvItemNum(MyIndex, Index)).Pic - Int(Item(GetPlayerInvItemNum(MyIndex, Index)).Pic / 6) * 6) * PIC_X, Int(Item(GetPlayerInvItemNum(MyIndex, Index)).Pic / 6) * PIC_Y, SRCCOPY)
If GetPlayerWeaponSlot(MyIndex) = Index Then Call BitBlt(frmMirage.WeaponImage.hDC, 0, 0, PIC_X, PIC_Y, frmMirage.picItems.hDC, (Item(GetPlayerInvItemNum(MyIndex, Index)).Pic - Int(Item(GetPlayerInvItemNum(MyIndex, Index)).Pic / 6) * 6) * PIC_X, Int(Item(GetPlayerInvItemNum(MyIndex, Index)).Pic / 6) * PIC_Y, SRCCOPY)
If GetPlayerHelmetSlot(MyIndex) = Index Then Call BitBlt(frmMirage.HelmetImage.hDC, 0, 0, PIC_X, PIC_Y, frmMirage.picItems.hDC, (Item(GetPlayerInvItemNum(MyIndex, Index)).Pic - Int(Item(GetPlayerInvItemNum(MyIndex, Index)).Pic / 6) * 6) * PIC_X, Int(Item(GetPlayerInvItemNum(MyIndex, Index)).Pic / 6) * PIC_Y, SRCCOPY)
If GetPlayerArmorSlot(MyIndex) = Index Then Call BitBlt(frmMirage.ArmorImage.hDC, 0, 0, PIC_X, PIC_Y, frmMirage.picItems.hDC, (Item(GetPlayerInvItemNum(MyIndex, Index)).Pic - Int(Item(GetPlayerInvItemNum(MyIndex, Index)).Pic / 6) * 6) * PIC_X, Int(Item(GetPlayerInvItemNum(MyIndex, Index)).Pic / 6) * PIC_Y, SRCCOPY)
Next Index
frmMirage.EquipS(0).Visible = False
frmMirage.EquipS(1).Visible = False
frmMirage.EquipS(2).Visible = False
frmMirage.EquipS(3).Visible = False
For d = 0 To MAX_INV - 1
If Player(MyIndex).Inv(d + 1).Num > 0 Then
If Item(GetPlayerInvItemNum(MyIndex, d + 1)).Type <> ITEM_TYPE_CURRENCY Then
'frmMirage.descName.Caption = Trim(Item(GetPlayerInvItemNum(MyIndex, d + 1)).Name) & " (" & GetPlayerInvItemValue(MyIndex, d + 1) & ")"
'Else
If GetPlayerWeaponSlot(MyIndex) = d + 1 Then
'frmMirage.picInv(d).ToolTipText = Trim(Item(GetPlayerInvItemNum(MyIndex, d + 1)).Name) & " (worn)"
frmMirage.EquipS(0).Visible = True
frmMirage.EquipS(0).Top = frmMirage.picInv(d).Top - 2
frmMirage.EquipS(0).Left = frmMirage.picInv(d).Left - 2
ElseIf GetPlayerArmorSlot(MyIndex) = d + 1 Then
'frmMirage.picInv(d).ToolTipText = Trim(Item(GetPlayerInvItemNum(MyIndex, d + 1)).Name) & " (worn)"
frmMirage.EquipS(1).Visible = True
frmMirage.EquipS(1).Top = frmMirage.picInv(d).Top - 2
frmMirage.EquipS(1).Left = frmMirage.picInv(d).Left - 2
ElseIf GetPlayerHelmetSlot(MyIndex) = d + 1 Then
'frmMirage.picInv(d).ToolTipText = Trim(Item(GetPlayerInvItemNum(MyIndex, d + 1)).Name) & " (worn)"
frmMirage.EquipS(2).Visible = True
frmMirage.EquipS(2).Top = frmMirage.picInv(d).Top - 2
frmMirage.EquipS(2).Left = frmMirage.picInv(d).Left - 2
ElseIf GetPlayerShieldSlot(MyIndex) = d + 1 Then
'frmMirage.picInv(d).ToolTipText = Trim(Item(GetPlayerInvItemNum(MyIndex, d + 1)).Name) & " (worn)"
frmMirage.EquipS(3).Visible = True
frmMirage.EquipS(3).Top = frmMirage.picInv(d).Top - 2
frmMirage.EquipS(3).Left = frmMirage.picInv(d).Left - 2
Else
'frmMirage.picInv(d).ToolTipText = Trim(Item(GetPlayerInvItemNum(MyIndex, d + 1)).Name)
End If
End If
End If
Next d
End Sub
Mude para:
- Código:
Public Sub UpdateVisInv()
Dim Index As Long
Dim d As Long
For Index = 1 To MAX_INV
If GetPlayerShieldSlot(MyIndex) <> Index Then frmMirage.ShieldImage.Picture = LoadPicture()
If GetPlayerWeaponSlot(MyIndex) <> Index Then frmMirage.WeaponImage.Picture = LoadPicture()
If GetPlayerHelmetSlot(MyIndex) <> Index Then frmMirage.HelmetImage.Picture = LoadPicture()
If GetPlayerArmorSlot(MyIndex) <> Index Then frmMirage.ArmorImage.Picture = LoadPicture()
If GetPlayerRing1Slot(MyIndex) <> Index Then frmMirage.Ring1Image.Picture = LoadPicture()
If GetPlayerRing2Slot(MyIndex) <> Index Then frmMirage.Ring2Image.Picture = LoadPicture()
If GetPlayerGlovesSlot(MyIndex) <> Index Then frmMirage.GlovesImage.Picture = LoadPicture()
If GetPlayerLegsSlot(MyIndex) <> Index Then frmMirage.LegsImage.Picture = LoadPicture()
If GetPlayerAmuletSlot(MyIndex) <> Index Then frmMirage.AmuletImage.Picture = LoadPicture()
Next Index
For Index = 1 To MAX_INV
If GetPlayerShieldSlot(MyIndex) = Index Then Call BitBlt(frmMirage.ShieldImage.hDC, 0, 0, PIC_X, PIC_Y, frmMirage.picItems.hDC, (Item(GetPlayerInvItemNum(MyIndex, Index)).Pic - Int(Item(GetPlayerInvItemNum(MyIndex, Index)).Pic / 6) * 6) * PIC_X, Int(Item(GetPlayerInvItemNum(MyIndex, Index)).Pic / 6) * PIC_Y, SRCCOPY)
If GetPlayerWeaponSlot(MyIndex) = Index Then Call BitBlt(frmMirage.WeaponImage.hDC, 0, 0, PIC_X, PIC_Y, frmMirage.picItems.hDC, (Item(GetPlayerInvItemNum(MyIndex, Index)).Pic - Int(Item(GetPlayerInvItemNum(MyIndex, Index)).Pic / 6) * 6) * PIC_X, Int(Item(GetPlayerInvItemNum(MyIndex, Index)).Pic / 6) * PIC_Y, SRCCOPY)
If GetPlayerHelmetSlot(MyIndex) = Index Then Call BitBlt(frmMirage.HelmetImage.hDC, 0, 0, PIC_X, PIC_Y, frmMirage.picItems.hDC, (Item(GetPlayerInvItemNum(MyIndex, Index)).Pic - Int(Item(GetPlayerInvItemNum(MyIndex, Index)).Pic / 6) * 6) * PIC_X, Int(Item(GetPlayerInvItemNum(MyIndex, Index)).Pic / 6) * PIC_Y, SRCCOPY)
If GetPlayerArmorSlot(MyIndex) = Index Then Call BitBlt(frmMirage.ArmorImage.hDC, 0, 0, PIC_X, PIC_Y, frmMirage.picItems.hDC, (Item(GetPlayerInvItemNum(MyIndex, Index)).Pic - Int(Item(GetPlayerInvItemNum(MyIndex, Index)).Pic / 6) * 6) * PIC_X, Int(Item(GetPlayerInvItemNum(MyIndex, Index)).Pic / 6) * PIC_Y, SRCCOPY)
If GetPlayerRing1Slot(MyIndex) = Index Then Call BitBlt(frmMirage.Ring1Image.hDC, 0, 0, PIC_X, PIC_Y, frmMirage.picItems.hDC, (Item(GetPlayerInvItemNum(MyIndex, Index)).Pic - Int(Item(GetPlayerInvItemNum(MyIndex, Index)).Pic / 6) * 6) * PIC_X, Int(Item(GetPlayerInvItemNum(MyIndex, Index)).Pic / 6) * PIC_Y, SRCCOPY)
If GetPlayerRing2Slot(MyIndex) = Index Then Call BitBlt(frmMirage.Ring2Image.hDC, 0, 0, PIC_X, PIC_Y, frmMirage.picItems.hDC, (Item(GetPlayerInvItemNum(MyIndex, Index)).Pic - Int(Item(GetPlayerInvItemNum(MyIndex, Index)).Pic / 6) * 6) * PIC_X, Int(Item(GetPlayerInvItemNum(MyIndex, Index)).Pic / 6) * PIC_Y, SRCCOPY)
If GetPlayerGlovesSlot(MyIndex) = Index Then Call BitBlt(frmMirage.GlovesImage.hDC, 0, 0, PIC_X, PIC_Y, frmMirage.picItems.hDC, (Item(GetPlayerInvItemNum(MyIndex, Index)).Pic - Int(Item(GetPlayerInvItemNum(MyIndex, Index)).Pic / 6) * 6) * PIC_X, Int(Item(GetPlayerInvItemNum(MyIndex, Index)).Pic / 6) * PIC_Y, SRCCOPY)
If GetPlayerLegsSlot(MyIndex) = Index Then Call BitBlt(frmMirage.LegsImage.hDC, 0, 0, PIC_X, PIC_Y, frmMirage.picItems.hDC, (Item(GetPlayerInvItemNum(MyIndex, Index)).Pic - Int(Item(GetPlayerInvItemNum(MyIndex, Index)).Pic / 6) * 6) * PIC_X, Int(Item(GetPlayerInvItemNum(MyIndex, Index)).Pic / 6) * PIC_Y, SRCCOPY)
If GetPlayerAmuletSlot(MyIndex) = Index Then Call BitBlt(frmMirage.AmuletImage.hDC, 0, 0, PIC_X, PIC_Y, frmMirage.picItems.hDC, (Item(GetPlayerInvItemNum(MyIndex, Index)).Pic - Int(Item(GetPlayerInvItemNum(MyIndex, Index)).Pic / 6) * 6) * PIC_X, Int(Item(GetPlayerInvItemNum(MyIndex, Index)).Pic / 6) * PIC_Y, SRCCOPY)
Next Index
frmMirage.EquipS(0).Visible = False
frmMirage.EquipS(1).Visible = False
frmMirage.EquipS(2).Visible = False
frmMirage.EquipS(3).Visible = False
frmMirage.EquipS(4).Visible = False
frmMirage.EquipS(5).Visible = False
frmMirage.EquipS(6).Visible = False
frmMirage.EquipS(7).Visible = False
frmMirage.EquipS(8).Visible = False
For d = 0 To MAX_INV - 1
If Player(MyIndex).Inv(d + 1).Num > 0 Then
If Item(GetPlayerInvItemNum(MyIndex, d + 1)).Type <> ITEM_TYPE_CURRENCY Then
'frmMirage.descName.Caption = Trim(Item(GetPlayerInvItemNum(MyIndex, d + 1)).Name) & " (" & GetPlayerInvItemValue(MyIndex, d + 1) & ")"
'Else
If GetPlayerWeaponSlot(MyIndex) = d + 1 Then
'frmMirage.picInv(d).ToolTipText = Trim(Item(GetPlayerInvItemNum(MyIndex, d + 1)).Name) & " (worn)"
frmMirage.EquipS(0).Visible = True
frmMirage.EquipS(0).Top = frmMirage.picInv(d).Top - 2
frmMirage.EquipS(0).Left = frmMirage.picInv(d).Left - 2
ElseIf GetPlayerArmorSlot(MyIndex) = d + 1 Then
'frmMirage.picInv(d).ToolTipText = Trim(Item(GetPlayerInvItemNum(MyIndex, d + 1)).Name) & " (worn)"
frmMirage.EquipS(1).Visible = True
frmMirage.EquipS(1).Top = frmMirage.picInv(d).Top - 2
frmMirage.EquipS(1).Left = frmMirage.picInv(d).Left - 2
ElseIf GetPlayerHelmetSlot(MyIndex) = d + 1 Then
'frmMirage.picInv(d).ToolTipText = Trim(Item(GetPlayerInvItemNum(MyIndex, d + 1)).Name) & " (worn)"
frmMirage.EquipS(2).Visible = True
frmMirage.EquipS(2).Top = frmMirage.picInv(d).Top - 2
frmMirage.EquipS(2).Left = frmMirage.picInv(d).Left - 2
ElseIf GetPlayerShieldSlot(MyIndex) = d + 1 Then
'frmMirage.picInv(d).ToolTipText = Trim(Item(GetPlayerInvItemNum(MyIndex, d + 1)).Name) & " (worn)"
frmMirage.EquipS(3).Visible = True
frmMirage.EquipS(3).Top = frmMirage.picInv(d).Top - 2
frmMirage.EquipS(3).Left = frmMirage.picInv(d).Left - 2
ElseIf GetPlayerRing1Slot(MyIndex) = d + 1 Then
'frmMirage.picInv(d).ToolTipText = Trim(Item(GetPlayerInvItemNum(MyIndex, d + 1)).Name) & " (worn)"
frmMirage.EquipS(4).Visible = True
frmMirage.EquipS(4).Top = frmMirage.picInv(d).Top - 2
frmMirage.EquipS(4).Left = frmMirage.picInv(d).Left - 2
ElseIf GetPlayerRing2Slot(MyIndex) = d + 1 Then
'frmMirage.picInv(d).ToolTipText = Trim(Item(GetPlayerInvItemNum(MyIndex, d + 1)).Name) & " (worn)"
frmMirage.EquipS(5).Visible = True
frmMirage.EquipS(5).Top = frmMirage.picInv(d).Top - 2
frmMirage.EquipS(5).Left = frmMirage.picInv(d).Left - 2
ElseIf GetPlayerGlovesSlot(MyIndex) = d + 1 Then
'frmMirage.picInv(d).ToolTipText = Trim(Item(GetPlayerInvItemNum(MyIndex, d + 1)).Name) & " (worn)"
frmMirage.EquipS(6).Visible = True
frmMirage.EquipS(6).Top = frmMirage.picInv(d).Top - 2
frmMirage.EquipS(6).Left = frmMirage.picInv(d).Left - 2
ElseIf GetPlayerLegsSlot(MyIndex) = d + 1 Then
'frmMirage.picInv(d).ToolTipText = Trim(Item(GetPlayerInvItemNum(MyIndex, d + 1)).Name) & " (worn)"
frmMirage.EquipS(7).Visible = True
frmMirage.EquipS(7).Top = frmMirage.picInv(d).Top - 2
frmMirage.EquipS(7).Left = frmMirage.picInv(d).Left - 2
ElseIf GetPlayerAmuletSlot(MyIndex) = d + 1 Then
'frmMirage.picInv(d).ToolTipText = Trim(Item(GetPlayerInvItemNum(MyIndex, d + 1)).Name) & " (worn)"
frmMirage.EquipS(8).Visible = True
frmMirage.EquipS(8).Top = frmMirage.picInv(d).Top - 2
frmMirage.EquipS(8).Left = frmMirage.picInv(d).Left - 2
'frmMirage.picInv(d).ToolTipText = Trim(Item(GetPlayerInvItemNum(MyIndex, d + 1)).Name)
End If
End If
End If
Next d
End Sub
Na HandleData procure por:
- Código:
If GetPlayerHelmetSlot(MyIndex) > 0 Then
SubStr = SubStr + Item(GetPlayerInvItemNum(MyIndex, GetPlayerHelmetSlot(MyIndex))).AddStr
SubDef = SubDef + Item(GetPlayerInvItemNum(MyIndex, GetPlayerHelmetSlot(MyIndex))).AddDef
SubMagi = SubMagi + Item(GetPlayerInvItemNum(MyIndex, GetPlayerHelmetSlot(MyIndex))).AddMagi
SubSpeed = SubSpeed + Item(GetPlayerInvItemNum(MyIndex, GetPlayerHelmetSlot(MyIndex))).AddSpeed
End If
Abaixo adicione:
- Código:
If GetPlayerRing1Slot(MyIndex) > 0 Then
SubStr = SubStr + Item(GetPlayerInvItemNum(MyIndex, GetPlayerRing1Slot(MyIndex))).AddStr
SubDef = SubDef + Item(GetPlayerInvItemNum(MyIndex, GetPlayerRing1Slot(MyIndex))).AddDef
SubMagi = SubMagi + Item(GetPlayerInvItemNum(MyIndex, GetPlayerRing1Slot(MyIndex))).AddMagi
SubSpeed = SubSpeed + Item(GetPlayerInvItemNum(MyIndex, GetPlayerRing1Slot(MyIndex))).AddSpeed
End If
If GetPlayerRing2Slot(MyIndex) > 0 Then
SubStr = SubStr + Item(GetPlayerInvItemNum(MyIndex, GetPlayerRing2Slot(MyIndex))).AddStr
SubDef = SubDef + Item(GetPlayerInvItemNum(MyIndex, GetPlayerRing2Slot(MyIndex))).AddDef
SubMagi = SubMagi + Item(GetPlayerInvItemNum(MyIndex, GetPlayerRing2Slot(MyIndex))).AddMagi
SubSpeed = SubSpeed + Item(GetPlayerInvItemNum(MyIndex, GetPlayerRing2Slot(MyIndex))).AddSpeed
End If
If GetPlayerGlovesSlot(MyIndex) > 0 Then
SubStr = SubStr + Item(GetPlayerInvItemNum(MyIndex, GetPlayerGlovesSlot(MyIndex))).AddStr
SubDef = SubDef + Item(GetPlayerInvItemNum(MyIndex, GetPlayerGlovesSlot(MyIndex))).AddDef
SubMagi = SubMagi + Item(GetPlayerInvItemNum(MyIndex, GetPlayerGlovesSlot(MyIndex))).AddMagi
SubSpeed = SubSpeed + Item(GetPlayerInvItemNum(MyIndex, GetPlayerGlovesSlot(MyIndex))).AddSpeed
End If
If GetPlayerLegsSlot(MyIndex) > 0 Then
SubStr = SubStr + Item(GetPlayerInvItemNum(MyIndex, GetPlayerLegsSlot(MyIndex))).AddStr
SubDef = SubDef + Item(GetPlayerInvItemNum(MyIndex, GetPlayerLegsSlot(MyIndex))).AddDef
SubMagi = SubMagi + Item(GetPlayerInvItemNum(MyIndex, GetPlayerLegsSlot(MyIndex))).AddMagi
SubSpeed = SubSpeed + Item(GetPlayerInvItemNum(MyIndex, GetPlayerLegsSlot(MyIndex))).AddSpeed
End If
If GetPlayerAmuletSlot(MyIndex) > 0 Then
SubStr = SubStr + Item(GetPlayerInvItemNum(MyIndex, GetPlayerAmuletSlot(MyIndex))).AddStr
SubDef = SubDef + Item(GetPlayerInvItemNum(MyIndex, GetPlayerAmuletSlot(MyIndex))).AddDef
SubMagi = SubMagi + Item(GetPlayerInvItemNum(MyIndex, GetPlayerAmuletSlot(MyIndex))).AddMagi
SubSpeed = SubSpeed + Item(GetPlayerInvItemNum(MyIndex, GetPlayerAmuletSlot(MyIndex))).AddSpeed
End If
Subistitua a Sub cmbType por:
- Código:
Private Sub cmbType_Click()
If (cmbType.ListIndex >= ITEM_TYPE_WEAPON) And (cmbType.ListIndex <= ITEM_TYPE_SHIELD) Or (cmbType.ListIndex <= ITEM_TYPE_RING1) Or (cmbType.ListIndex <= ITEM_TYPE_RING2) Or (cmbType.ListIndex <= ITEM_TYPE_GLOVES) Or (cmbType.ListIndex <= ITEM_TYPE_LEGS) Or (cmbType.ListIndex <= ITEM_TYPE_AMULET) Then
If cmbType.ListIndex = ITEM_TYPE_WEAPON Then
Label3.Caption = "Dano:"
Else
Label3.Caption = "Defesa:"
End If
fraEquipment.Visible = True
fraPet.Visible = False
fraAttributes.Visible = True
fraBow.Visible = True
Else
fraEquipment.Visible = False
fraAttributes.Visible = False
fraBow.Visible = False
End If
If (cmbType.ListIndex >= ITEM_TYPE_POTIONADDHP) And (cmbType.ListIndex <= ITEM_TYPE_POTIONSUBSP) Then
fraVitals.Visible = True
fraPet.Visible = False
fraAttributes.Visible = False
fraEquipment.Visible = False
fraBow.Visible = False
Else
fraVitals.Visible = False
End If
If (cmbType.ListIndex = ITEM_TYPE_SPELL) Then
fraSpell.Visible = True
fraPet.Visible = False
fraAttributes.Visible = False
fraEquipment.Visible = False
fraBow.Visible = False
Else
fraSpell.Visible = False
End If
If (cmbType.ListIndex = ITEM_TYPE_PET) Then
fraSpell.Visible = False
fraPet.Visible = True
fraAttributes.Visible = False
fraEquipment.Visible = False
fraBow.Visible = False
Else
fraPet.Visible = False
End If
End Sub
Subistitua a Sub cmdUpdate_Click() por:
- Código:
Private Sub cmdUpdate_Click()
Dim Index As Long, I As Long, ItemNum As Long
Index = lstTradeItem(SSTab1.Tab).ListIndex + 1
I = SSTab1.Tab + 1
ItemNum = cmbItemGet.ListIndex
If ItemNum > 0 Then
If I = 1 Then
If Item(ItemNum).Type = ITEM_TYPE_WEAPON Then
ElseIf Item(ItemNum).Type = ITEM_TYPE_SHIELD Then
MsgBox "Please click the tab that says shield to add this!"
Exit Sub
ElseIf Item(ItemNum).Type = ITEM_TYPE_ARMOR Then
MsgBox "Please click the tab that says armor to add this!"
Exit Sub
ElseIf Item(ItemNum).Type = ITEM_TYPE_HELMET Then
MsgBox "Please click the tab that says helmet to add this!"
Exit Sub
ElseIf Item(ItemNum).Type = ITEM_TYPE_SPELL Then
MsgBox "Please click the tab that says spell to add this!"
Exit Sub
ElseIf Item(ItemNum).Type = ITEM_TYPE_RING1 Then
MsgBox "Please click the tab that says ring1 to add this!"
Exit Sub
ElseIf Item(ItemNum).Type = ITEM_TYPE_RING2 Then
MsgBox "Please click the tab that says ring2 to add this!"
Exit Sub
ElseIf Item(ItemNum).Type = ITEM_TYPE_GLOVES Then
MsgBox "Please click the tab that says gloves to add this!"
Exit Sub
ElseIf Item(ItemNum).Type = ITEM_TYPE_LEGS Then
MsgBox "Please click the tab that says legs to add this!"
Exit Sub
ElseIf Item(ItemNum).Type = ITEM_TYPE_AMULET Then
MsgBox "Please click the tab that says amulet to add this!"
Exit Sub
Else
MsgBox "Please click the tab that says other to add this!"
Exit Sub
End If
ElseIf I = 2 Then
If Item(ItemNum).Type = ITEM_TYPE_WEAPON Then
MsgBox "Please click the tab that says weapon to add this!"
Exit Sub
ElseIf Item(ItemNum).Type = ITEM_TYPE_SHIELD Then
ElseIf Item(ItemNum).Type = ITEM_TYPE_ARMOR Then
MsgBox "Please click the tab that says armor to add this!"
Exit Sub
ElseIf Item(ItemNum).Type = ITEM_TYPE_HELMET Then
MsgBox "Please click the tab that says helmet to add this!"
Exit Sub
ElseIf Item(ItemNum).Type = ITEM_TYPE_SPELL Then
MsgBox "Please click the tab that says spell to add this!"
Exit Sub
Else
MsgBox "Please click the tab that says other to add this!"
Exit Sub
End If
ElseIf I = 3 Then
If Item(ItemNum).Type = ITEM_TYPE_WEAPON Then
MsgBox "Please click the tab that says weapon to add this!"
Exit Sub
ElseIf Item(ItemNum).Type = ITEM_TYPE_SHIELD Then
MsgBox "Please click the tab that says shield to add this!"
Exit Sub
ElseIf Item(ItemNum).Type = ITEM_TYPE_ARMOR Then
ElseIf Item(ItemNum).Type = ITEM_TYPE_HELMET Then
MsgBox "Please click the tab that says helmet to add this!"
Exit Sub
ElseIf Item(ItemNum).Type = ITEM_TYPE_SPELL Then
MsgBox "Please click the tab that says spell to add this!"
Exit Sub
Else
MsgBox "Please click the tab that says other to add this!"
Exit Sub
End If
ElseIf I = 4 Then
If Item(ItemNum).Type = ITEM_TYPE_WEAPON Then
MsgBox "Please click the tab that says weapon to add this!"
Exit Sub
ElseIf Item(ItemNum).Type = ITEM_TYPE_SHIELD Then
MsgBox "Please click the tab that says shield to add this!"
Exit Sub
ElseIf Item(ItemNum).Type = ITEM_TYPE_ARMOR Then
MsgBox "Please click the tab that says armor to add this!"
Exit Sub
ElseIf Item(ItemNum).Type = ITEM_TYPE_HELMET Then
ElseIf Item(ItemNum).Type = ITEM_TYPE_SPELL Then
MsgBox "Please click the tab that says spell to add this!"
Exit Sub
Else
MsgBox "Please click the tab that says other to add this!"
Exit Sub
End If
ElseIf I = 5 Then
If Item(ItemNum).Type = ITEM_TYPE_WEAPON Then
MsgBox "Please click the tab that says weapon to add this!"
Exit Sub
ElseIf Item(ItemNum).Type = ITEM_TYPE_SHIELD Then
MsgBox "Please click the tab that says shield to add this!"
Exit Sub
ElseIf Item(ItemNum).Type = ITEM_TYPE_ARMOR Then
MsgBox "Please click the tab that says armor to add this!"
Exit Sub
ElseIf Item(ItemNum).Type = ITEM_TYPE_HELMET Then
MsgBox "Please click the tab that says helmet to add this!"
Exit Sub
ElseIf Item(ItemNum).Type = ITEM_TYPE_SPELL Then
Else
MsgBox "Please click the tab that says other to add this!"
Exit Sub
End If
ElseIf I = 6 Then
If Item(ItemNum).Type = ITEM_TYPE_WEAPON Then
MsgBox "Please click the tab that says weapon to add this!"
Exit Sub
ElseIf Item(ItemNum).Type = ITEM_TYPE_SHIELD Then
MsgBox "Please click the tab that says shield to add this!"
Exit Sub
ElseIf Item(ItemNum).Type = ITEM_TYPE_ARMOR Then
MsgBox "Please click the tab that says armor to add this!"
Exit Sub
ElseIf Item(ItemNum).Type = ITEM_TYPE_HELMET Then
MsgBox "Please click the tab that says helmet to add this!"
Exit Sub
ElseIf Item(ItemNum).Type = ITEM_TYPE_SPELL Then
MsgBox "Please click the tab that says spell to add this!"
Exit Sub
Else
End If
End If
End If
Shop(EditorIndex).TradeItem(SSTab1.Tab + 1).Value(Index).GiveItem = cmbItemGive.ListIndex
Shop(EditorIndex).TradeItem(SSTab1.Tab + 1).Value(Index).GiveValue = Val(txtItemGiveValue.Text)
Shop(EditorIndex).TradeItem(SSTab1.Tab + 1).Value(Index).GetItem = cmbItemGet.ListIndex
Shop(EditorIndex).TradeItem(SSTab1.Tab + 1).Value(Index).GetValue = Val(txtItemGetValue.Text)
Call UpdateShopTrade
End Sub
Na sub Private Sub picInv_MouseMove mude para:
- Código:
Private Sub picInv_MouseMove(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
Dim d As Long
d = Index
If Player(MyIndex).Inv(d + 1).Num > 0 Then
If Item(GetPlayerInvItemNum(MyIndex, d + 1)).Type = ITEM_TYPE_CURRENCY Then
descName.Caption = Trim(Item(GetPlayerInvItemNum(MyIndex, d + 1)).Name) & " (" & GetPlayerInvItemValue(MyIndex, d + 1) & ")"
Else
If GetPlayerWeaponSlot(MyIndex) = d + 1 Then
descName.Caption = Trim(Item(GetPlayerInvItemNum(MyIndex, d + 1)).Name) & " (equipado)"
ElseIf GetPlayerArmorSlot(MyIndex) = d + 1 Then
descName.Caption = Trim(Item(GetPlayerInvItemNum(MyIndex, d + 1)).Name) & " (equipado)"
ElseIf GetPlayerHelmetSlot(MyIndex) = d + 1 Then
descName.Caption = Trim(Item(GetPlayerInvItemNum(MyIndex, d + 1)).Name) & " (equipado)"
ElseIf GetPlayerShieldSlot(MyIndex) = d + 1 Then
descName.Caption = Trim(Item(GetPlayerInvItemNum(MyIndex, d + 1)).Name) & " (equipado)"
ElseIf GetPlayerRing1Slot(MyIndex) = d + 1 Then
descName.Caption = Trim(Item(GetPlayerInvItemNum(MyIndex, d + 1)).Name) & " (equipado)"
ElseIf GetPlayerRing2Slot(MyIndex) = d + 1 Then
descName.Caption = Trim(Item(GetPlayerInvItemNum(MyIndex, d + 1)).Name) & " (equipado)"
ElseIf GetPlayerGlovesSlot(MyIndex) = d + 1 Then
descName.Caption = Trim(Item(GetPlayerInvItemNum(MyIndex, d + 1)).Name) & " (equipado)"
ElseIf GetPlayerLegsSlot(MyIndex) = d + 1 Then
descName.Caption = Trim(Item(GetPlayerInvItemNum(MyIndex, d + 1)).Name) & " (equipado)"
ElseIf GetPlayerAmuletSlot(MyIndex) = d + 1 Then
descName.Caption = Trim(Item(GetPlayerInvItemNum(MyIndex, d + 1)).Name) & " (equipado)"
Else
descName.Caption = Trim(Item(GetPlayerInvItemNum(MyIndex, d + 1)).Name)
End If
End If
descStr.Caption = Item(GetPlayerInvItemNum(MyIndex, d + 1)).StrReq & " Força"
descDef.Caption = Item(GetPlayerInvItemNum(MyIndex, d + 1)).DefReq & " Defesa"
descSpeed.Caption = Item(GetPlayerInvItemNum(MyIndex, d + 1)).SpeedReq & " Agilidade"
descMagic.Caption = Item(GetPlayerInvItemNum(MyIndex, d + 1)).MagicReq & " Inteligência"
descHpMp.Caption = "HP: " & Item(GetPlayerInvItemNum(MyIndex, d + 1)).AddHP & " MP: " & Item(GetPlayerInvItemNum(MyIndex, d + 1)).AddMP & " SP: " & Item(GetPlayerInvItemNum(MyIndex, d + 1)).AddSP
descSD.Caption = "For: " & Item(GetPlayerInvItemNum(MyIndex, d + 1)).AddStr & " Def: " & Item(GetPlayerInvItemNum(MyIndex, d + 1)).AddDef
descMS.Caption = "Int: " & Item(GetPlayerInvItemNum(MyIndex, d + 1)).AddMagi & " Agi: " & Item(GetPlayerInvItemNum(MyIndex, d + 1)).AddSpeed
desc.Caption = Trim(Item(GetPlayerInvItemNum(MyIndex, d + 1)).desc)
itmDesc.Visible = True
Call itmDesc.ZOrder(0)
Else
itmDesc.Visible = False
End If
End Sub
Na frmItemEditor, no cmbTypes vá na propriedades e procure por List e adicione Ring1
[size=18pt]Server~Side[/size]
Procure por:
- Código:
' Equipamentos
Player(Index).Char(i).ArmorSlot = Val(GetVar(FileName, "CHAR" & i, "ArmorSlot"))
Player(Index).Char(i).WeaponSlot = Val(GetVar(FileName, "CHAR" & i, "WeaponSlot"))
Player(Index).Char(i).HelmetSlot = Val(GetVar(FileName, "CHAR" & i, "HelmetSlot"))
Player(Index).Char(i).ShieldSlot = Val(GetVar(FileName, "CHAR" & i, "ShieldSlot"))
Mude tudo para:
- Código:
' Equipamentos
Player(Index).Char(i).ArmorSlot = Val(GetVar(FileName, "CHAR" & i, "ArmorSlot"))
Player(Index).Char(i).WeaponSlot = Val(GetVar(FileName, "CHAR" & i, "WeaponSlot"))
Player(Index).Char(i).HelmetSlot = Val(GetVar(FileName, "CHAR" & i, "HelmetSlot"))
Player(Index).Char(i).ShieldSlot = Val(GetVar(FileName, "CHAR" & i, "ShieldSlot"))
Player(Index).Char(i).Ring1Slot = Val(GetVar(FileName, "CHAR" & i, "Ring1Slot"))
Player(Index).Char(i).Ring2Slot = Val(GetVar(FileName, "CHAR" & i, "Ring2Slot"))
Player(Index).Char(i).GlovesSlot = Val(GetVar(FileName, "CHAR" & i, "GlovesSlot"))
Player(Index).Char(i).LegsSlot = Val(GetVar(FileName, "CHAR" & i, "LegsSlot"))
Player(Index).Char(i).AmuletSlot = Val(GetVar(FileName, "CHAR" & i, "AmuletSlot"))
Procure por:
- Código:
' Equipamentos
Call PutVar(FileName, "CHAR" & i, "ArmorSlot", STR(Player(Index).Char(i).ArmorSlot))
Call PutVar(FileName, "CHAR" & i, "WeaponSlot", STR(Player(Index).Char(i).WeaponSlot))
Call PutVar(FileName, "CHAR" & i, "HelmetSlot", STR(Player(Index).Char(i).HelmetSlot))
Call PutVar(FileName, "CHAR" & i, "ShieldSlot", STR(Player(Index).Char(i).ShieldSlot))
Mude para:
- Código:
' Equipamentos
Call PutVar(FileName, "CHAR" & i, "ArmorSlot", STR(Player(Index).Char(i).ArmorSlot))
Call PutVar(FileName, "CHAR" & i, "WeaponSlot", STR(Player(Index).Char(i).WeaponSlot))
Call PutVar(FileName, "CHAR" & i, "HelmetSlot", STR(Player(Index).Char(i).HelmetSlot))
Call PutVar(FileName, "CHAR" & i, "ShieldSlot", STR(Player(Index).Char(i).ShieldSlot))
Call PutVar(FileName, "CHAR" & i, "Ring1Slot", STR(Player(Index).Char(i).Ring1Slot))
Call PutVar(FileName, "CHAR" & i, "Ring1Slot", STR(Player(Index).Char(i).Ring2Slot))
Call PutVar(FileName, "CHAR" & i, "GlovesSlot", STR(Player(Index).Char(i).GlovesSlot))
Call PutVar(FileName, "CHAR" & i, "LegsSlot", STR(Player(Index).Char(i).LegsSlot))
Call PutVar(FileName, "CHAR" & i, "AmuletSlot", STR(Player(Index).Char(i).AmuletSlot))
Procure por:
- Código:
' Constantes de itens
Public Const ITEM_TYPE_NONE = 0
Public Const ITEM_TYPE_WEAPON = 1
Public Const ITEM_TYPE_ARMOR = 2
Public Const ITEM_TYPE_HELMET = 3
Public Const ITEM_TYPE_SHIELD = 4
Public Const ITEM_TYPE_POTIONADDHP = 5
Public Const ITEM_TYPE_POTIONADDMP = 6
Public Const ITEM_TYPE_POTIONADDSP = 7
Public Const ITEM_TYPE_POTIONSUBHP = 8
Public Const ITEM_TYPE_POTIONSUBMP = 9
Public Const ITEM_TYPE_POTIONSUBSP = 10
Public Const ITEM_TYPE_KEY = 11
Public Const ITEM_TYPE_CURRENCY = 12
Public Const ITEM_TYPE_SPELL = 13
Public Const ITEM_TYPE_PET = 14
Abaixo adicione:
- Código:
Public Const ITEM_TYPE_RING1 = 15
Public Const ITEM_TYPE_RING2 = 16
Public Const ITEM_TYPE_GLOVES = 17
Public Const ITEM_TYPE_LEGS = 18
Public Const ITEM_TYPE_AMULET = 19
Procure por:
- Código:
' Equipamento
ArmorSlot As Long
WeaponSlot As Long
HelmetSlot As Long
ShieldSlot As Long
Mude para:
- Código:
' Equipamento
ArmorSlot As Long
WeaponSlot As Long
HelmetSlot As Long
ShieldSlot As Long
Ring1Slot As Long
Ring2Slot As Long
GlovesSlot As Long
LegsSlot As Long
AmuletSlot As Long
Na subClearChar procure por:
- Código:
Player(Index).Char(CharNum).ShieldSlot = 0
Abaixo adicione:
- Código:
Player(Index).Char(CharNum).Ring1Slot = 0
Player(Index).Char(CharNum).Ring2Slot = 0
Player(Index).Char(CharNum).GlovesSlot = 0
Player(Index).Char(CharNum).LegsSlot = 0
Player(Index).Char(CharNum).AmuletSlot = 0
Na mesma sub procure por:
Player(Index).Char(i).ShieldSlot = 0
- Código:
Player(Index).Char(i).Ring1Slot = 0
Player(Index).Char(i).Ring2Slot = 0
Player(Index).Char(i).GlovesSlot = 0
Player(Index).Char(i).LegsSlot = 0
Player(Index).Char(i).AmuletSlot = 0
Procure por:
- Código:
Function GetPlayerArmorSlot(ByVal Index As Long) As Long
GetPlayerArmorSlot = Player(Index).Char(Player(Index).CharNum).ArmorSlot
End Function
Abaixo adicione:
- Código:
Function GetPlayerRing1Slot(ByVal Index As Long) As Long
GetPlayerRing1Slot = Player(Index).Char(Player(Index).CharNum).Ring1Slot
End Function
Function GetPlayerRing2Slot(ByVal Index As Long) As Long
GetPlayerRing2Slot = Player(Index).Char(Player(Index).CharNum).Ring2Slot
End Function
Function GetPlayerGlovesSlot(ByVal Index As Long) As Long
GetPlayerGlovesSlot = Player(Index).Char(Player(Index).CharNum).GlovesSlot
End Function
Function GetPlayerLegsSlot(ByVal Index As Long) As Long
GetPlayerLegsSlot = Player(Index).Char(Player(Index).CharNum).LegsSlot
End Function
Function GetPlayerAmuletSlot(ByVal Index As Long) As Long
GetPlayerAmuletSlot = Player(Index).Char(Player(Index).CharNum).AmuletSlot
End Function
Procure por:
- Código:
Function GetPlayerDEF
Mude tudo para:
- Código:
Function GetPlayerDEF(ByVal Index As Long) As Long
Dim add As Long
add = 0
If GetPlayerWeaponSlot(Index) > 0 Then
add = Item(GetPlayerInvItemNum(Index, GetPlayerWeaponSlot(Index))).AddDef
End If
If GetPlayerArmorSlot(Index) > 0 Then
add = add + Item(GetPlayerInvItemNum(Index, GetPlayerArmorSlot(Index))).AddDef
End If
If GetPlayerShieldSlot(Index) > 0 Then
add = add + Item(GetPlayerInvItemNum(Index, GetPlayerShieldSlot(Index))).AddDef
End If
If GetPlayerHelmetSlot(Index) > 0 Then
add = add + Item(GetPlayerInvItemNum(Index, GetPlayerHelmetSlot(Index))).AddDef
End If
If GetPlayerRing1Slot(Index) > 0 Then
add = add + Item(GetPlayerInvItemNum(Index, GetPlayerRing1Slot(Index))).AddDef
End If
If GetPlayerRing2Slot(Index) > 0 Then
add = add + Item(GetPlayerInvItemNum(Index, GetPlayerRing2Slot(Index))).AddDef
End If
If GetPlayerGlovesSlot(Index) > 0 Then
add = add + Item(GetPlayerInvItemNum(Index, GetPlayerGlovesSlot(Index))).AddDef
End If
If GetPlayerLegsSlot(Index) > 0 Then
add = add + Item(GetPlayerInvItemNum(Index, GetPlayerLegsSlot(Index))).AddDef
End If
If GetPlayerAmuletSlot(Index) > 0 Then
add = add + Item(GetPlayerInvItemNum(Index, GetPlayerAmuletSlot(Index))).AddDef
End If
GetPlayerDEF = Player(Index).Char(Player(Index).CharNum).DEF + add
End Function
Continua .......