• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Statue that teleports onuse with lvl 8 and 9 only

poopsiedoodle

Gibe moni plos
Joined
Nov 23, 2011
Messages
2,457
Reaction score
585
Location
Georgia
Can someone make a script for a statue (ID: 1448) that can only be used by levels 8 and 9 that teleports you to x:1194, y:982, z:7? If so, I will love you forever :3
 
LUA:
local config = {levels = {8, 9}, pos = {x = 1194, y = 982, z = 7}}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if isInArray(config.levels, getPlayerLevel(cid)) then
		doTeleportThing(cid, config.pos)
	end
	return true
end

add it in actions.xml with an action.id and set it to the statue..
 
At actions.xml and paste the line:
XML:
<action actionid="5555" event="script" value="statue.lua"/>

At actions/scripts and create new lua and name it "statue.lua" and paste the code:
LUA:
local cyko = {
	tpto = {x=1194,y=982,z=7}, --where the statue take them!
	lvl = getPlayerLevel(cid) -- dont touch!
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if cyko.lvl == 8 and cyko.lvl == 9 then --only edit the numbers!
		doTeleportThing(cid,cyko.tpto)
		doSendMagicEffect(cyko.tpto,10)
		doPlayerSendTextMessage(cid, 25, "You have been transported!")
	else
		doPlayerSendCancel(cid, "You are to high level to use this statue")
		end
	return true
end

Add on the statue actionid: 5555

- - - Updated - - -

Ah didnt notice Streamside alrdy posted :/
 
Last edited:
LUA:
	if cyko.lvl == 8 and cyko.lvl == 9 then --only edit the numbers!

if you have level 8 AND level 9? Kinda weird :P

LUA:
	if cyko.lvl == 8 or cyko.lvl == 9 then --only edit the numbers!

uuund,
LUA:
doPlayerSendCancel(cid, "You are to high level to use this statue")
And whats when player have < 8lv?

So evil.
 
Back
Top