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

Lua need help fixing scripts

skrm

New Member
Joined
Mar 15, 2008
Messages
67
Reaction score
0
Hey, I have just come back to OT's after a long time and ive come across an old script I want to keep but I cant fix it, it wont show an error in server log, it just causes the client to debug, can anyone help me fix it plz?

originaly from a crying damson?
trying to run it on (9.1) 0.2.11 Mystic Spirit

in actions.xml
PHP:
	<action uniqueid="5008" script="quests/poi druidswitch.lua"/>

in actions/scripts/quests/poi druidswitch.lua
PHP:
function onUse(cid, item, frompos, item2, topos)
pvoc = getPlayerVocation(cid)

if item.uid == 5012 then
if pvoc == 2 or pvoc == 6 then
doPlayerSendTextMessage(cid, 22, "You can pass, you are a druid.")
pos = getPlayerPosition(cid)

if pos.x == topos.x then
if pos.y < topos.y then
pos.y = topos.y + 1
else
pos.y = topos.y - 1
end
elseif pos.y == topos.y then
if pos.x < topos.x then
pos.x = topos.x + 1
else
pos.x = topos.x - 1
end
else
doPlayerSendTextMessage(cid,22,'Please stand in front of the door.')
return 1
end

doTeleportThing(cid,pos)
doSendMagicEffect(topos,12)
else
doPlayerSendTextMessage(cid,22,'You cant pass, you arent a druid.')
end
return 1
else
return 0
end
end
 
Last edited:
Back
Top Bottom