• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Problem with almost running script...

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:
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
 
MM

this:
addEvent(function()
and this:
destroyItem(cid, itemEx, toPosition)
and this:
end, 15000, {toPosition = toPosition})

What is this?

And this:
doRemoveItem(itemEx.uid, 1)
Is the same of this:
doRemoveItem(getThingFromPos(toPosition).uid, 1)
 
Back
Top