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

Bug in console and crash server

Carlitos Flow

Developer (lvl*1)
Joined
Mar 2, 2011
Messages
156
Solutions
4
Reaction score
10
Hello OTland, i need help, i use tfs O.3.7 and this script when i step in the throne get a bug (tile not found)
Lua:
function onStepIn(cid, item, position, fromPosition)

-- check for monsters  --
starting={x=440, y=971, z=6, stackpos=253}
checking={x=starting.x, y=starting.y, z=starting.z, stackpos=starting.stackpos}
ending={x=456, y=4985, z=6, stackpos=253}
players=0
totalmonsters=0
monster={}
repeat
creature=getThingfromPos(checking)
if creature.itemid > 0 then
if isPlayer(creature.uid) == TRUE then
totalmonsters=totalmonsters-1
end
if isCreature(creature.uid) == TRUE then
totalmonsters=totalmonsters+1
monster[totalmonsters]=creature.uid
end
end
checking.x=checking.x+1
if checking.x>ending.x then
checking.x=starting.x
checking.y=checking.y+1
end
until checking.y>ending.y
-- check for monsters  --

local first_throne = 10000

if item.uid == 10000 and totalmonsters == 0 then
if getPlayerStorageValue(cid, first_throne) <= 0 then


setPlayerStorageValue(cid, first_throne, 1)
doCreatureSay(cid, "The Throne is too powerful for you to sit, you are shaken and absorb part of the spirit of Asmoday.", TALKTYPE_ORANGE_1)

else
doTeleportThing(cid, fromPosition, false)
doCreatureSay(cid, "You have already touched the throne.", TALKTYPE_ORANGE_1)
end
else
doTeleportThing(cid, fromPosition, false)
doCreatureSay(cid, "Asmoday repells you.", TALKTYPE_ORANGE_1)
end
return 1
end

I hope you help me guys, thanks

Edited: error on movements.. getThingfromPos
 
Last edited:
Post the exact error no this, and wrap the script in code tags.

This error is likely because the coordinates in there are wrong. Look at the first lines.
 
Back
Top