GarQet
Own3d!
- Joined
- Feb 10, 2009
- Messages
- 1,381
- Solutions
- 14
- Reaction score
- 81
Hello OtLanders!
I have small problem with my almost running script.
Script remove first object then create next item and reaches to event. Everything would be fine if not for the fact that when we throw magic wall or we die on place where performed event, poorly carried out a further part of the script. Script don't remove object which is to be destroyed after 15 seconds and create on ex. magic wall next item. As a result, stone who should be deleted, isn't removed and with it creates another object that doesn't allow for further action script.
Screen:
http://zapodaj.net/images/bc3a0455adc3.png
Script:
Please, help me
//Sorry, for my English
I have small problem with my almost running script.
Script remove first object then create next item and reaches to event. Everything would be fine if not for the fact that when we throw magic wall or we die on place where performed event, poorly carried out a further part of the script. Script don't remove object which is to be destroyed after 15 seconds and create on ex. magic wall next item. As a result, stone who should be deleted, isn't removed and with it creates another object that doesn't allow for further action script.
Screen:
http://zapodaj.net/images/bc3a0455adc3.png
Script:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition, param)
if(itemEx.itemid == 1285) then
doRemoveItem(itemEx.uid, 1)
doCreateItem(1336, 1, toPosition)
doSendMagicEffect(toPosition, 2)
addEvent(function()
doSendMagicEffect(toPosition, 3)
doRemoveCreature(getThingFromPos(toPosition).uid)
doRemoveItem(getThingFromPos(toPosition).uid, 1)
doCreateItem(1285, 1, toPosition)
end, 15000, {toPosition = toPosition})
return true
end
return destroyItem(cid, itemEx, toPosition)
end
Please, help me
//Sorry, for my English