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

OnAdvance

Inteligentny

Im not.
Joined
Aug 2, 2008
Messages
485
Reaction score
0
Anyone could tell me how to do script which is teleporting guy who gained 8 lvl?
With usage storage - it shall work only 1 time

Also how to do if someone deleveled char to 5lvl teleport him to rook for example

Please help :/
 
here is my script(not tested).if you find any errors post here pls.
Code:
function onAdvance(cid, oldlevel, newlevel)

newnPosition  = {x=382, y=474, z=7}

    if newlevel == 8 then
 doTeleportThing(cid,newnPosition)
 end
end
 
you try this(not tested):
Code:
function onAdvance(cid, oldlevel, newlevel)

newnPosition  = {x=382, y=474, z=7}

elseif getPlayerStorageValue(cid, 1000)
    if newlevel == 8 then
 doTeleportThing(cid,newnPosition)
 setPlayerStorageValue(cid, item.uid, 1)

else
	doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Message Here.")
end
  end
    end
 
@UP!

That is wrong!, that must be like this...

Code:
function onAdvance(cid, oldlevel, newlevel)

newPosition  = {x=382, y=474, z=7}

if getPlayerStorageValue(cid, 1000) == -1 and newlevel == 8 then
 doTeleportThing(cid, newPosition)
 setPlayerStorageValue(cid, 1000, 1)

else
	doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Message Here.")
	end
end
 
Back
Top