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

[Rquest]Teleport put vocation and master pos

Hazher

OTServ Member
Joined
Sep 18, 2007
Messages
104
Reaction score
0
I need a Teleport compatibe with TFS plx.
put the vocation and master pos.
 
Last edited:
this code is compatible with evolutions 7.92 but isn't with TFS:


function onStepIn(cid, item, pos)
if item.actionid == 50001 then
if isPlayer(cid) == TRUE then
doPlayerSetVocation(cid,1)
newpos = {x=1500, y=1500, z=7}
doPlayerSetMasterPos(cid,newpos)
doPlayerSendTextMessage(cid,22,"You are Sorcerer.")
end
if item.actionid == 50002 then
if isPlayer(cid) == TRUE then
doPlayerSetVocation(cid,2)
newpos = {x=1500, y=1500, z=7}
doPlayerSetMasterPos(cid,newpos)
doPlayerSendTextMessage(cid,22,"You are Druid.")
end
if item.actionid == 50003 then
if isPlayer(cid) == TRUE then
doPlayerSetVocation(cid,3)
newpos = {x=1500, y=1500, z=7}
doPlayerSetMasterPos(cid,newpos)
doPlayerSendTextMessage(cid,22,"You are Paladin.")
if item.actionid == 50004 then
if isPlayer(cid) == TRUE then
doPlayerSetVocation(cid,4)
newpos = {x=1500, y=1500, z=7}
doPlayerSetMasterPos(cid,newpos)
doPlayerSendTextMessage(cid,22,"You are Knight.")
end


else
return 0
end
return 1
end

function onStepOut(cid, item, pos)
return 1
end
 
this code is compatible with evolutions 7.92 but isn't with TFS:


it should work but at the end of the script you see "return 1" should be "Return True" i just took an very fast look if oyu have problems just send me an pm and i'll help you
 
try this i'm 100% sure you wont get any errors :p

Code:
function onStepIn(cid, item, pos)
if item.actionid == 50001 then
if isPlayer(cid) == TRUE then
doPlayerSetVocation(cid,1)
newpos = {x=1500, y=1500, z=7}
doPlayerSetMasterPos(cid,newpos)
doPlayerSendTextMessage(cid,22,"You are Sorcerer.")
end
if item.actionid == 50002 then
if isPlayer(cid) == TRUE then
doPlayerSetVocation(cid,2)
newpos = {x=1500, y=1500, z=7}
doPlayerSetMasterPos(cid,newpos)
doPlayerSendTextMessage(cid,22,"You are Druid.")
end
if item.actionid == 50003 then
if isPlayer(cid) == TRUE then
doPlayerSetVocation(cid,3)
newpos = {x=1500, y=1500, z=7}
doPlayerSetMasterPos(cid,newpos)
doPlayerSendTextMessage(cid,22,"You are Paladin.")
if item.actionid == 50004 then
if isPlayer(cid) == TRUE then
doPlayerSetVocation(cid,4)
newpos = {x=1500, y=1500, z=7}
doPlayerSetMasterPos(cid,newpos)
doPlayerSendTextMessage(cid,22,"You are Knight.")
end


else
return false
end
return true
end
end
end
end

function onStepOut(cid, item, pos)
return true
end
end
 
Back
Top