23-09-2006, 04:58 PM
Just to point one thing out, I did think about the indents when I made the code. But didnt really wanna spend time on it.. So it was a ruff thing of what I wanted. This is actually how it would look if I made it my correct way:
Still it might differ from the Correct Lesson of it, but its my way.
If you want to cry, look at this (I made it long ago when i used rpgtoolkit):
http://www.key2heaven.net/bs.txt
Code:
Sub SendIndexWornEquipmentFromMap(ByVal Index As Long)
Dim Packet As String
Dim i As Long
Dim Armor As Long
Dim Helmet As Long
Dim Shield As Long
Dim Weapon As Long
For i = 1 To MAX_PLAYERS
If IsPlaying(i) = True Then
If GetPlayerMap(Index) = GetPlayerMap(i) Then
Armor = 0
Helmet = 0
Shield = 0
Weapon = 0
End If
If GetPlayerArmorSlot(i) > 0 Then
Armor = GetPlayerInvItemNum(i, GetPlayerArmorSlot(i))
End If
If GetPlayerHelmetSlot(i) > 0 Then
Helmet = GetPlayerInvItemNum(i, GetPlayerHelmetSlot(i))
End If
If GetPlayerShieldSlot(i) > 0 Then
Shield = GetPlayerInvItemNum(i, GetPlayerShieldSlot(i))
End If
If GetPlayerWeaponSlot(i) > 0 Then
Weapon = GetPlayerInvItemNum(i, GetPlayerWeaponSlot(i))
End If
Packet = "itemworn" & SEP_CHAR & i & SEP_CHAR & Armor & SEP_CHAR & Weapon & SEP_CHAR & Helmet & SEP_CHAR & Shield & SEP_CHAR & END_CHAR
Call SendDataTo(Index, Packet)
End If
Next i
End SubStill it might differ from the Correct Lesson of it, but its my way.
If you want to cry, look at this (I made it long ago when i used rpgtoolkit):
http://www.key2heaven.net/bs.txt

