***NEW 1-10-2010**** -- If you upgraded before 1-10-2010, make sure you do this fix..
REPLACE
- Code: Select all
Call SetPlayerHelmetSlotDur(Victim, GetPlayerArmorSlotDur(Victim) + 1)
WITH
- Code: Select all
Call SetPlayerHelmetSlotDur(Victim, GetPlayerHelmetSlotDur(Victim) + 1)
1.0.3
Added optional support for special characters in chat, allowing for use of other languages.
Added ability to disable autoloot via server.
Added damage tile required item to attribute lookup information.
Added additional log information showing exactly which attributes were modified on items and npcs.
Added map moral options: "Can't attack player" and "Can't cast spells".
Added level requirement and class requirement to shops for buying items.
Added option to disable guild chat for specific guild ranks.
Added CanPlayerBlockHit to scripting.
Added item bonuses to item guide generator.
Fixed duping bug.
Fixed poison spells crashing client.
Fixed damage tile not preventing damage when wearing specified item.
Fixed mutation percentage not working properly.
Fixed stun spells poping up message box.
Fixed class editor sprite scrollbar not being set to total sprites.
http://MMORPGMaker.org/XW103Update.zip
In the server-side settings.ini add: (of course you can change the values if you want to add special characters (support for other languages) or if you want to disable the autoloot)
SpecialCharacters = 0
AutoLoot = 1
Change
- Code: Select all
Sub NpcAttackPlayer(Victim, MapNpcNum, Damage)
NPCNum = GetNpcNumber(GetPlayerMap(Victim), MapNpcNum)
If Damage > 0 Then
If Damage >= GetPlayerHP(Victim) Then
Call PlayerMsg(Victim, "A " & GetNpcName(NpcNum) & " hit you for " & Damage & " hit points.", C_GREY)
Call GlobalMsg(GetPlayerName(Victim) & " has been killed by a " & GetNpcName(NpcNum) & ".", C_BRIGHTRED)
Call SetNpcTarget(GetPlayerMap(Victim), MapNpcNum, 0)
Call OnDeath(Victim, "npc")
Else
Call SetPlayerHP(Victim, GetPlayerHP(Victim) - Damage)
Call SendHP(Victim)
Call PlayerMsg(Victim, "A " & GetNpcName(NpcNum) & " hit you for " & Damage & " hit points.", C_BRIGHTRED)
End If
Else
Call PlayerMsg(Victim, "The " & GetNpcName(NpcNum) & "'s hit didn't even phase you!", C_BRIGHTBLUE)
End If
End Sub
To
- Code: Select all
Sub NpcAttackPlayer(Victim, MapNpcNum, Damage)
NPCNum = GetNpcNumber(GetPlayerMap(Victim), MapNpcNum)
If CanPlayerBlockHit(Victim) = True Then
Call PlayerMessage(Victim, "You have blocked the " & GetNpcName(GetNpcNumber(GetPlayerMap(Victim), MapNpcNum)) & "'s attack.", C_BRIGHTCYAN)
Call SetPlayerArmorSlotDur(Victim, GetPlayerArmorSlotDur(Victim) + 1)
Call SetPlayerHelmetSlotDur(Victim, GetPlayerHelmetSlotDur(Victim) + 1)
Call SendWornEquipment(Victim)
Else
If Damage > 0 Then
If Damage >= GetPlayerHP(Victim) Then
Call PlayerMsg(Victim, "A " & GetNpcName(NpcNum) & " hit you for " & Damage & " hit points.", C_GREY)
Call GlobalMsg(GetPlayerName(Victim) & " has been killed by a " & GetNpcName(NpcNum) & ".", C_BRIGHTRED)
Call SetNpcTarget(GetPlayerMap(Victim), MapNpcNum, 0)
Call OnDeath(Victim, "npc")
Else
Call SetPlayerHP(Victim, GetPlayerHP(Victim) - Damage)
Call SendHP(Victim)
Call PlayerMsg(Victim, "A " & GetNpcName(NpcNum) & " hit you for " & Damage & " hit points.", C_BRIGHTRED)
End If
Else
Call PlayerMsg(Victim, "The " & GetNpcName(NpcNum) & "'s hit didn't even phase you!", C_BRIGHTBLUE)
End If
End If
End Sub
In
- Code: Select all
Sub PlayerAttack(Attacker, Victim, Damage, SpellNum)
Change
- Code: Select all
If Not CanPlayerCriticalHit(Attacker) Then
Damage = GetPlayerDamage(Attacker) - Protection
Else
N = GetPlayerDamage(Attacker)
Damage = N + Int(Rnd * Int(N / 2)) + 1 - Protection
End If
To
- Code: Select all
If Not CanPlayerBlockHit(Victim) Then
If Not CanPlayerCriticalHit(Attacker) Then
Damage = GetPlayerDamage(Attacker) - Protection
Else
N = GetPlayerDamage(Attacker)
Damage = N + Int(Rnd * Int(N / 2)) + 1 - Protection
End If
Else
Call PlayerMessage(Victim, "You have blocked " & GetPlayerName(Attacker) & "'s attack.", C_BRIGHTCYAN)
Call PlayerMessage(Attacker, GetPlayerName(Victim) & " has blocked your attack.", C_BRIGHTCYAN)
Call SetPlayerArmorSlotDur(Victim, GetPlayerArmorSlotDur(Victim) + 1)
Call SetPlayerHelmetSlotDur(Victim, GetPlayerHelmetSlotDur(Victim) + 1)
Call SendWornEquipment(Victim)
exit sub
End If
In Sub NPCDeath
Replace
- Code: Select all
Call PlayerMsg(Attacker, "You have gained " & Exp & " experience points.", C_BRIGHTBLUE)
With
- Code: Select all
If IsPlayerInParty(Attacker) = False Then
Call PlayerMsg(Attacker, "You have gained " & Exp & " experience points.", C_BRIGHTBLUE)
Call SetPlayerExp(Attacker, GetPlayerExp(Attacker) + Exp)
Else
Exp = Exp / 2
Exp = Int(Exp)
If Exp <= 0 Then
Exp = 1
End If
Call SetPlayerExp(Attacker, GetPlayerExp(Attacker) + Exp)
Call PlayerMsg(Attacker, "You have gained " & Exp & " party experience points.", C_BRIGHTBLUE)
n = GetPlayerPartyMember(Attacker)
If n > 0 Then
Call SetPlayerExp(n, GetPlayerExp(n) + Exp)
Call PlayerMsg(n, "You have gained " & Exp & " party experience points.", C_BRIGHTBLUE)
End If
End If
Extract it, overwrite all the files with the new ones, run the upgrade.exe tool.
I will be posting the scripting changes here soon, I just wanted to get this thing out ASAP. I'll be uploading the full 1.0.3 download later today as well.









