MutantAssassin
Active Member
- Joined
- Dec 13, 2009
- Messages
- 43
- Solutions
- 1
- Reaction score
- 29
Here I am, using those hollidays to get some skills with the new (for me) revscriptsys. For training purposes, I tried to create a simple script which would make the player say "Feel the power of my mighty blade!" everytime that he attacks using a scimitar:
But scripted attacks always overwrite the default behavior of weapons, so the code above doesn't work. I need a command to call the default behavior of a weapon from inside a script. Is there any way to do it? And if not, is there a better solution than adding a code to mimic the default behavior of a scimitar inside of this script? Because that would be a very ugly solution.
Cheers,
Assassina Mutante.
Lua:
local coolSword = Weapon(WEAPON_SWORD)
coolSword:id(2419) --scimitar
function coolSword.onUseWeapon(player, variant)
player:say("Feel the power of my mighty blade!", TALKTYPE_MONSTER_SAY)
return true
end
coolSword:register()
Cheers,
Assassina Mutante.
Last edited: