Dear Otland!
I was trying to make exhaustion on talkactions for players, I've tried with script to save character and add function but it seems that it doesn't exist on tfs 1.2
And after I use this talkaction in game I see error
Anyone know how to correctly add function exhaustion to global index? Thanks for reply and best regards!
I was trying to make exhaustion on talkactions for players, I've tried with script to save character and add function but it seems that it doesn't exist on tfs 1.2
Lua:
function onSay(player, words, param, cid)
if exhaustion.get(cid, 501) then
doPlayerSendCancel(cid, 'You can use this command only once per 10 seconds.')
return true
end
exhaustion.set(cid, 501, 10)
if (param == '') then
player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE))
player:say('SAVE!', TALKTYPE_MONSTER_SAY)
player:save()
return false
end
end
And after I use this talkaction in game I see error
Anyone know how to correctly add function exhaustion to global index? Thanks for reply and best regards!