• 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!

Why does this script don't work?

LucasFerraz

Systems Analyst
Joined
Jun 10, 2010
Messages
2,857
Reaction score
96
Location
Brazil
This script is part of Banshee Quest. Player can pass in teleport if remove both pearls.

LUA:
function onStepIn(cid, item, pos, fromPos)

	food1 = {x=32173, y=31871, z=15, stackpos=1}
	getfood1 = getThingfromPos(food1)
	food2 = {x=32180, y=31871, z=15, stackpos=1}
	getfood2 = getThingfromPos(food2)

	if getfood1.itemid == 2143 and getfood2.itemid == 2144 then
		doTeleportThing(cid, {x=32177, y=31863, z=15})
                doSendMagicEffect(getCreaturePosition(cid), 10)
                doRemoveItem(getfood1.uid,1)
                doRemoveItem(getfood2.uid,1)
		else
		doTeleportThing(cid, {x=32176, y=31870, z=15})
                doSendMagicEffect(getCreaturePosition(cid), 10)
		end
	end

500px-Banshee_Queen_Quest_Pearl_Spot.jpg
 
check if the positions of the items are correct , based on your script, use this >

Code:
function onStepIn(cid, item, pos, fromPos)
 
	food1 = {x=32173, y=31871, z=15}
	food2 = {x=32180, y=31871, z=15}

 
if getTileItemById(food1, 2143).itemid >= 1 and getTileItemById(food2, 2144).itemid >= 1 then
		doTeleportThing(cid, {x=32177, y=31863, z=15})
                doSendMagicEffect(getCreaturePosition(cid), 10)
                doRemoveItem(getTileItemById(food1, 2143).uid,1)
                doRemoveItem(getTileItemById(food2, 2144).uid,1)
		else
		doTeleportThing(cid, {x=32176, y=31870, z=15})
                doSendMagicEffect(getCreaturePosition(cid), 10)
		end


Now it will work!
 
Back
Top