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

Tile

Ronaldino

Esso Eh
Joined
Dec 25, 2007
Messages
745
Reaction score
0
Hello.

I need that script: Someone step on X id tile, and that check vocation, level and premium if level is 50 and voc. is sorcerer and premium is true then player get teleport. Thats possible?

I need that for enchant portals, like rl.
 
then use this

PHP:
--Made by Evil Hero--
function onStepIn(cid, item, frompos, item2, topos) 
local premium = getPlayerPremiumDays(cid)
local vocation = getPlayerVocation(cid)
local level = getPlayerLevel(cid)
local needlevel = 50-- the level which you need
local ice = {x=xxx, y=yyy, z=zzz}-- set your coordinates
local fire = {x=xxx, y=yyy, z=zzz}-- set your coordinates
local earth = {x=xxx, y=yyy, z=zzz}-- set your coordinates
local energy = {x=xxx, y=yyy, z=zzz}-- set your coordinates
local exit = {x=xxx, y=yyy, z=zzz}-- if the Player don't have pacc or the right lvl/voc then 

he will be teleported there
local lvldruid = "Only Premium Druids of level 50 or higher are able to enter this portal"
local lvlsorc = "Only Premium Sorcerer of level 50 or higher are able to enter this portal"
local pacc = "You need to have Premium Account to enter this portal."

    if item.actionid == 5000 then
        if vocation == 2 or vocation == 6 then
            if premium >= 1 then
                if level >= needlevel then
                    doTeleportThing(cid, ice)
                    doSendMagicEffect(ice,10)
                else
                    doPlayerSendCancel(cid,lvldruid)
                    doTeleportThing(cid, exit)
                end
            else
                doPlayerSendCancel(cid,pacc)
                doTeleportThing(cid, exit)
            end
        else
            doPlayerSendCancel(cid,lvldruid)
            doTeleportThing(cid, exit)
        end

    elseif item.actionid == 5001 then
        if vocation == 1 or vocation == 5 then
            if premium >= 1 then
                if level >= needlevel then
                    doTeleportThing(cid, fire)
                    doSendMagicEffect(fire,10)
                else
                    doPlayerSendCancel(cid,lvlsorc)
                    doTeleportThing(cid, exit)
                end
            else
                doPlayerSendCancel(cid,pacc)
                doTeleportThing(cid, exit)
            end
        else
            doPlayerSendCancel(cid,lvlsorc)
            doTeleportThing(cid, exit)
        end    

    elseif item.actionid == 5002 then
        if vocation == 2 or vocation == 6 then
            if premium >= 1 then
                if level >= needlevel then
                    doTeleportThing(cid, earth)
                    doSendMagicEffect(earth,10)
                else
                    doPlayerSendCancel(cid,lvldruid)
                    doTeleportThing(cid, exit)
                end
            else
                doPlayerSendCancel(cid,pacc)
                doTeleportThing(cid, exit)
            end
        else
            doPlayerSendCancel(cid,lvldruid)
            doTeleportThing(cid, exit)
        end

    elseif item.actionid == 5003 then
        if vocation == 1 or vocation == 5 then
            if premium >= 1 then
                if level >= needlevel then
                    doTeleportThing(cid, energy)
                    doSendMagicEffect(energy,10)
                else
                    doPlayerSendCancel(cid,lvlsorc)
                    doTeleportThing(cid, exit)
                end
            else
                doPlayerSendCancel(cid,pacc)
                doTeleportThing(cid, exit)
            end
        else
            doPlayerSendCancel(cid,lvlsorc)
            doTeleportThing(cid, exit)
        end
    end
end

yours Evil Hero,

I will try it? in 2 min i edit the post..
 
Back
Top