Aeronx
Intermediate OT User
- Joined
- Dec 17, 2015
- Messages
- 746
- Solutions
- 9
- Reaction score
- 125
Hello everybody, and thanks for your time and help!
I've been going around this spells for some hours now, but I cant solve how to make it to set a storage and after X seconds, set another storage.
This is as far as i got:
I've been going around this spells for some hours now, but I cant solve how to make it to set a storage and after X seconds, set another storage.
This is as far as i got:
Code:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0)
local condition = Condition(CONDITION_ATTRIBUTES)
condition:setParameter(CONDITION_PARAM_TICKS, 5000)
condition:setParameter(CONDITION_PARAM_BUFF_SPELL, 1)
combat:setCondition(condition)
function setstorage(player, var)
creature:setStorageValue(8888,0)
end
function onCastSpell(creature, player, var)
creature:setStorageValue(8888, 1)
addEvent(setstorage, 5000)
combat:execute(creature, var)
creature:sendTextMessage(MESSAGE_STATUS_DEFAULT, "test")
return true
end