From the name, I am guessing this function is being perfomed every time player hits an enemy (if it has been registered under player, not monster).
Here is my question, I want to know if you can register certain events only for specific vocation, let us say we have login.lua and inside that file, it will be something like;
I think I just answered my own question, okay so I have another one;
Is there any other way to link between creaturescripts folder and spells folder other than storage ID?
At the moment I have something like this:
[Spells] 1. Execute spell
[Spells] 2. Assign storage ID; 5000 = 1
[Creaturescripts] 3. If storage ID (5000 == 1) then do something
Once the spell is active the player gets unique storage ID and every time they hit, they will check for storage ID if its there they will perform various functions inside onHealthChange. So I was wondering if there is any other way than using storage ID
TFS 1.0
Thanks a lot!
Here is my question, I want to know if you can register certain events only for specific vocation, let us say we have login.lua and inside that file, it will be something like;
Lua:
function onLogin(cid)
if Player(cid):getVocation() == 2 then
Player(cid):registerEvent("XXX")
end
return true
end
I think I just answered my own question, okay so I have another one;
Is there any other way to link between creaturescripts folder and spells folder other than storage ID?
At the moment I have something like this:
[Spells] 1. Execute spell
[Spells] 2. Assign storage ID; 5000 = 1
[Creaturescripts] 3. If storage ID (5000 == 1) then do something
Once the spell is active the player gets unique storage ID and every time they hit, they will check for storage ID if its there they will perform various functions inside onHealthChange. So I was wondering if there is any other way than using storage ID
TFS 1.0
Thanks a lot!
Last edited: