Marcinek123
Badboy
This script tested in [TFS0.3beta3]
Create new file login2.lua in data/creaturescripts/scripts:
and edit creaturscripts.xml and paste:
Function: If player have premium then he have extra exp rate.
If his premium is end... his exp coming back to the state without premium
Create new file login2.lua in data/creaturescripts/scripts:
Code:
function onLogin(cid)
if isPremium(cid) == TRUE and getPlayerStorageValue(cid, 12345) == 0 then
setPlayerExtraExpRate(cid, getPlayerExtraExpRate(cid)+15)
setPlayerStorageValue(cid, 12345, 1)
elseif isPremium(cid) == FALSE and getPlayerStorageValue(cid, 12345) == 1 then
setPlayerExtraExpRate(cid, getPlayerExtraExpRate(cid)-15)
setPlayerStorageValue(cid, 12345, 0)
end
return TRUE
end
end
Code:
<event type="login" name="exprate" script="login2.lua"/>
Function: If player have premium then he have extra exp rate.
If his premium is end... his exp coming back to the state without premium
Last edited: