• 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 in script

kira178

Member
Joined
Jun 24, 2008
Messages
290
Reaction score
5
i have make this in banshee warlock room but dont know why mosnter is spawm all room >.<

any1 can help me to know where's problem?

Code:
function onStepIn(cid, item, frompos, item2, topos)
spawnpos = {x=32211, y=31842, z=15}
spawnpos1 = {x=32219, y=31842, z=15}
queststatus = getPlayerStorageValue(cid,14016)
   	if (item.uid == 14016 or item.uid == 14017) and item.itemid == 426 then
   		if queststatus == -1 then
						doSummonCreature("Warlock", spawnpos,1)
						doSummonCreature("Warlock", spawnpos1,1)
						doSendMagicEffect(spawnpos, CONST_ME_ENERGYAREA)
						doSendMagicEffect(spawnpos1, CONST_ME_ENERGYAREA)
						doTransformItem(item.uid, 425)
						setPlayerStorageValue(cid,14016,1)
   		end
   	end
   return 1
end
 
try this

Code:
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
local pos = {{x=32211, y=31842, z=15},{x=32219, y=31842, z=15}}
	if(item.uid == 14016 or item.uid == 14017) and item.itemid == 426 then
		if getPlayerStorageValue(cid,14016) < 1 then
			for i = 1, #pos do
			local r = pos[i]
				doSummonCreature('warlock',r)
				doSendMagiceffect(r,CONST_ME_ENERGYAREA)
			end
			doTransformItem(item.uid,425)
			setPlayerStorageValue(cid,14016,1)
		end
	end
	return true
end
 
Last edited:
try this

Code:
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
local pos = {{x=32211, y=31842, z=15},{x=32219, y=31842, z=15}}
	if(item.uid == 14016 or item.uid == 14017) and item.itemid == 426 then
		if getPlayerStorageValue(cid,14016) < 1 then
			for i = 1, #pos do
			local r = pos[i]
				doSummonCreature('warlock',r)
				doSendMagiceffect(r,CONST_ME_ENERGYAREA)
			end
			doTransformItem(item.uid,425)
			setPlayerStorageValue(cid,14016,1)
		end
	end
	return true
end

i tried but it's not working well when i run again in title, it will spawm again and again >.<, i also got error in GUI:

Code:
[18/06/2010 09:46:59] [Error - MoveEvents Interface] 
[18/06/2010 09:46:59] data/movements/scripts/warlocktrap.lua:onStepIn
[18/06/2010 09:46:59] Description: 
[18/06/2010 09:46:59] data/movements/scripts/warlocktrap.lua:8: attempt to call global 'doSendMagiceffect' (a nil value)
[18/06/2010 09:46:59] stack traceback:
[18/06/2010 09:46:59] 	data/movements/scripts/warlocktrap.lua:8: in function <data/movements/scripts/warlocktrap.lua:1>
[18/06/2010 09:46:59] 	[C]: in function 'doTeleportThing'
[18/06/2010 09:46:59] 	data/movements/scripts/tiles.lua:11: in function 'pushBack'
[18/06/2010 09:46:59] 	data/movements/scripts/tiles.lua:100: in function <data/movements/scripts/tiles.lua:18
 
Back
Top