• 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.
 
I hope this is what you requested :p

note: it's untested :)

PHP:
--Made by Evil Hero--
function onStepIn(cid, item, frompos, item2, topos) 
local premium = isPremium(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 lvl = "You need to be lvl 50 to get Teleported."
local pacc = "You need to have Premium Account to get Teleported."
local needvocation = 1 or 5-- the vocation which you need

	if item.actionid == 5000 and vocation == needvocation then
		if premium == true then
			if level >= needlevel then
				doTeleportThing(cid, ice)
				doSendMagicEffect(ice,10)
			else
				doPlayerSay(cid,lvl, 16)
			end
		else
			doPlayerSay(cid,pacc, 16)
		end
	elseif item.actionid == 5001 and vocation == needvocation then
		if premium == true then
			if level >= needlevel then
				doTeleportThing(cid, fire)
				doSendMagicEffect(fire,10)
			else
				doPlayerSay(cid,lvl, 16)
			end
		else
			doPlayerSay(cid,pacc, 16)
		end
	elseif item.actionid == 5002 and vocation == needvocation then
		if premium == true then
			if level >= needlevel then
				doTeleportThing(cid, earth)
				doSendMagicEffect(earth,10)
			else
				doPlayerSay(cid,lvl, 16)
			end
		else
			doPlayerSay(cid,pacc, 16)
		end	
	elseif item.actionid == 5003 and vocation == needvocation then
		if premium == true then
			if level >= needlevel then
				doTeleportThing(cid, energy)
				doSendMagicEffect(energy,10)
			else
				doPlayerSay(cid,lvl, 16)
			end
		else
			doPlayerSay(cid,pacc, 16)
		end
	end
end

I hope it works :D

yours Evil Hero,
 
Last edited:
But, If you can make just one text showing instead of your
local lvl = "You need to be lvl 50 to get Teleported."
local pacc = "You need to have Premium Account to get Teleported."
to
"Only Premium Druids of level 50 or higher are able to enter this portal" - if someone is not druid or if someone if not sorcerer then showing: "Only Premium Sorcerers of level 50 or higher are able to enter this portal"
 
Credits go to whoever released this.
PHP:
function onStepIn(cid, item, pos)
 
local ice = {x=151, y=442, z=7}
local fire = {x=178, y=389, z=7}
local energy = {x=227, y=388, z=7}
local earth = {x=224, y=435, z=7}
 
if getPlayerLookDir(cid) == 0 then
newdir = 2
elseif getPlayerLookDir(cid) == 1 then
newdir = 3
elseif getPlayerLookDir(cid) == 2 then
newdir = 0
else
newdir = 1
end
 
if item.actionid == 7801 then
if getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 6 and getPlayerLevel(cid) >= 30 and isPremium(cid) == TRUE then
doTeleportThing(cid,ice)
doSendMagicEffect(ice,10)
else
doCreatureSay(cid,"Only Premium Druids of level 30 or higher are able to enter this portal", TALKTYPE_ORANGE_1)
doMoveCreature(cid, newdir)
end
elseif item.actionid == 7802 then
if getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 6 and getPlayerLevel(cid) >= 30 and isPremium(cid) == TRUE then
doTeleportThing(cid,earth)
doSendMagicEffect(earth,10)
else
doCreatureSay(cid,"Only Premium Druids of level 30 or higher are able to enter this portal", TALKTYPE_ORANGE_1)
doMoveCreature(cid, newdir)
end
elseif item.actionid == 7803 then
if getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 5 and getPlayerLevel(cid) >= 30 and isPremium(cid) == TRUE then
doTeleportThing(cid,fire)
doSendMagicEffect(fire,10)
else
doCreatureSay(cid,"Only Premium Sorcerers of level 30 or higher are able to enter this portal", TALKTYPE_ORANGE_1)
doMoveCreature(cid, newdir)
end
elseif item.actionid == 7804 then
if getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 5 and getPlayerLevel(cid) >= 30 and isPremium(cid) == TRUE then
doTeleportThing(cid,energy)
doSendMagicEffect(energy,10)
else
doCreatureSay(cid,"Only Premium Sorcerers of level 30 or higher are able to enter this portal", TALKTYPE_ORANGE_1)
doMoveCreature(cid, newdir)
end
end
end
 
Credits go to whoever released this.
PHP:
function onStepIn(cid, item, pos)
 
local ice = {x=151, y=442, z=7}
local fire = {x=178, y=389, z=7}
local energy = {x=227, y=388, z=7}
local earth = {x=224, y=435, z=7}
 
if getPlayerLookDir(cid) == 0 then
newdir = 2
elseif getPlayerLookDir(cid) == 1 then
newdir = 3
elseif getPlayerLookDir(cid) == 2 then
newdir = 0
else
newdir = 1
end
 
if item.actionid == 7801 then
if getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 6 and getPlayerLevel(cid) >= 30 and isPremium(cid) == TRUE then
doTeleportThing(cid,ice)
doSendMagicEffect(ice,10)
else
doCreatureSay(cid,"Only Premium Druids of level 30 or higher are able to enter this portal", TALKTYPE_ORANGE_1)
doMoveCreature(cid, newdir)
end
elseif item.actionid == 7802 then
if getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 6 and getPlayerLevel(cid) >= 30 and isPremium(cid) == TRUE then
doTeleportThing(cid,earth)
doSendMagicEffect(earth,10)
else
doCreatureSay(cid,"Only Premium Druids of level 30 or higher are able to enter this portal", TALKTYPE_ORANGE_1)
doMoveCreature(cid, newdir)
end
elseif item.actionid == 7803 then
if getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 5 and getPlayerLevel(cid) >= 30 and isPremium(cid) == TRUE then
doTeleportThing(cid,fire)
doSendMagicEffect(fire,10)
else
doCreatureSay(cid,"Only Premium Sorcerers of level 30 or higher are able to enter this portal", TALKTYPE_ORANGE_1)
doMoveCreature(cid, newdir)
end
elseif item.actionid == 7804 then
if getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 5 and getPlayerLevel(cid) >= 30 and isPremium(cid) == TRUE then
doTeleportThing(cid,energy)
doSendMagicEffect(energy,10)
else
doCreatureSay(cid,"Only Premium Sorcerers of level 30 or higher are able to enter this portal", TALKTYPE_ORANGE_1)
doMoveCreature(cid, newdir)
end
end
end

How to implant it? Put some actionId on the portal?
Put is in movements or in actions.
I whould like to have some help with this as well, becouse i have tryed, but dont worK. :(
Cya
 
Ok Here is what you wanted Ronaldino :)
you can change the text on your own :p

EDIT!!! Added something important now you have to set another coordinate which will tp the player to an exit point if he don't have the right voc/lvl or if he don't have pacc :)

PHP:
--Made by Evil Hero--
function onStepIn(cid, item, frompos, item2, topos) 
local premium = isPremium(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 Sorcerers of level 50 or higher are able to enter this portal"
local lvlsorc = "Only Premium Druids of level 50 or higher are able to enter this portal"
local pacc = "You need to have Premium Account to enter this portal."
local sorcerer = 1 or 5-- the vocation which you need
local druid = 2 or 6-- the vocation which you need

    if item.actionid == 5000 and vocation == druid then
        if premium == true then
            if level >=  needlevel then
                doTeleportThing(cid, ice)
                doSendMagicEffect(ice,10)
            else
                doPlayerSay(cid,lvldruid, 16)
                doTeleportThing(cid, exit)
            end
        else
            doPlayerSay(cid,pacc, 16)
            doTeleportThing(cid, exit)
        end
    elseif item.actionid == 5001 and vocation == sorcerer then
        if premium == true then
            if level >= needlevel then
                doTeleportThing(cid, fire)
                doSendMagicEffect(fire,10)
            else
                doPlayerSay(cid,lvlsorc, 16)
                doTeleportThing(cid, exit)
            end
        else
            doPlayerSay(cid,pacc, 16)
            doTeleportThing(cid, exit)
        end
    elseif item.actionid == 5002 and vocation == druid then
        if premium == true then
            if level >= needlevel then
                doTeleportThing(cid, earth)
                doSendMagicEffect(earth,10)
            else
                doPlayerSay(cid,lvldruid, 16)
                doTeleportThing(cid, exit)
            end
        else
            doPlayerSay(cid,pacc, 16)
            doTeleportThing(cid, exit)
        end    
    elseif item.actionid == 5003 and vocation == sorcerer then
        if premium == true then
            if level >= needlevel then
                doTeleportThing(cid, energy)
                doSendMagicEffect(energy,10)
            else
                doPlayerSay(cid,lvlsorc, 16)
                doTeleportThing(cid, exit)
            end
        else
            doPlayerSay(cid,pacc, 16)
            doTeleportThing(cid, exit)
        end
    end
end

yours Evil Hero,
 
Last edited:
@evil hero

Can you make instead of 'exit', that teleport y = -1, I think you know what I mean.
 
Last edited:
Sure wont be a big deal, I just thought it would be better that way becouse if a Player return false and he would keep walking on the tp within not even a second then it could curse a lot of laggs or maybe even a crash (not sure about that but it could happen)
but if you want it I'll do it :)

yours Evil Hero,
 
Af, script dont work :/ When I with druid 50 lvl and premium enter to druids portals it says that I need premium... But I got premium.

Second is that when I try to enter at Druid to Sorcerers portals, then nothing happends.
 
Try 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."
local sorcerer = 1 or 5-- the vocation which you need
local druid = 2 or 6-- the vocation which you need

    if item.actionid == 5000 and vocation == druid then
        if premium >= 1 then
            if level >= needlevel then
                doTeleportThing(cid, ice)
                doSendMagicEffect(ice,10)
            else
                doPlayerSay(cid,lvldruid, 16)
                doTeleportThing(cid, exit)
            end
        else
            doPlayerSay(cid,pacc, 16)
            doTeleportThing(cid, exit)
        end
    elseif item.actionid == 5001 and vocation == sorcerer then
        if premium >= 1 then
            if level >= needlevel then
                doTeleportThing(cid, fire)
                doSendMagicEffect(fire,10)
            else
                doPlayerSay(cid,lvlsorc, 16)
                doTeleportThing(cid, exit)
            end
        else
            doPlayerSay(cid,pacc, 16)
            doTeleportThing(cid, exit)
        end
    elseif item.actionid == 5002 and vocation == druid then
        if premium >= 1 then
            if level >= needlevel then
                doTeleportThing(cid, earth)
                doSendMagicEffect(earth,10)
            else
                doPlayerSay(cid,lvldruid, 16)
                doTeleportThing(cid, exit)
            end
        else
            doPlayerSay(cid,pacc, 16)
            doTeleportThing(cid, exit)
        end    
    elseif item.actionid == 5003 and vocation == sorcerer then
        if premium >= 1 then
            if level >= needlevel then
                doTeleportThing(cid, energy)
                doSendMagicEffect(energy,10)
            else
                doPlayerSay(cid,lvlsorc, 16)
                doTeleportThing(cid, exit)
            end
        else
            doPlayerSay(cid,pacc, 16)
            doTeleportThing(cid, exit)
        end
    end
end
 
Last edited:
Some one can explait how to install this? Becouse i have put the actionID = 5000 in the Ice Tile.
And why nothing happens? :(
I get no response for the server.
Can you post the tags to put in movements.xml? Tanks
 
Try this now >.<

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
					doPlayerSay(cid,lvldruid, 16)
					doTeleportThing(cid, exit)
				end
			else
				doPlayerSay(cid,pacc, 16)
				doTeleportThing(cid, exit)
			end
		else
			doPlayerSay(cid,lvldruid, 16)
			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
					doPlayerSay(cid,lvlsorc, 16)
					doTeleportThing(cid, exit)
				end
			else
				doPlayerSay(cid,pacc, 16)
				doTeleportThing(cid, exit)
			end
		else
			doPlayerSay(cid,lvlsorc, 16)
			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
					doPlayerSay(cid,lvldruid, 16)
					doTeleportThing(cid, exit)
				end
			else
				doPlayerSay(cid,pacc, 16)
				doTeleportThing(cid, exit)
			end
		else
			doPlayerSay(cid,lvldruid, 16)
			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
					doPlayerSay(cid,lvlsorc, 16)
					doTeleportThing(cid, exit)
				end
			else
				doPlayerSay(cid,pacc, 16)
				doTeleportThing(cid, exit)
			end
		else
			doPlayerSay(cid,lvlsorc, 16)
			doTeleportThing(cid, exit)
		end
	end
end

this is what you have to add into movements.xml

PHP:
<movevent event="StepIn" actionid="5000" script="NameOfTheScript.lua" />
<movevent event="StepIn" actionid="5001" script="NameOfTheScript.lua" />
<movevent event="StepIn" actionid="5002" script="NameOfTheScript.lua" />
<movevent event="StepIn" actionid="5003" script="NameOfTheScript.lua" />
 
On Step In i get this error:
[05/04/2008 18:21:49] Lua Script Error: [MoveEvents Interface]
[05/04/2008 18:21:49] data/movements/scripts/portal.lua:eek:nStepIn

[05/04/2008 18:21:49] data/movements/scripts/portal.lua:31: attempt to call global 'doPlayerSay' (a nil value)
Help? xD
 
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,
 
Back
Top