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

Storage Teleport

bybbzan

mapper
Joined
Aug 4, 2012
Messages
809
Solutions
2
Reaction score
136
Location
Sweden
Hello...again :$

I need a script for a teleport.

If you have 7 storages you can enter a teleport
else you will bounce back with orange text sayin
"You didn't absorb enough energy".
If you have the storages, you will be teleported.

Storages:

10274
10275
10276
10277
10278
10279
10280


Very happy for answers, thanks.
 
open file movements.xml
and put the line

LUA:
 <movevent type="StepIn" actionid="7894" event="script" value="teleport strages.lua"/>


than goto data\movements\scripts make file name teleport strages.lua

put this script in file teleport strages.lua

LUA:
local teleport = {x= 1 , y= 1 , z= 1 }                  ---    where you go when enter teleport 
local storages = {10274 , 10275 , 10276 , 10277 , 10278 , 10279 , 10280}              ------ storages 
local Message  = "You didn't absorb enough energy. "    --  here Message if not teleport 


function onStepIn(cid, item, position, fromPosition)
for i = 1,#storages do
    if getPlayerStorageValue(cid, storages[i]) >= 1 then
			doTeleportThing(cid, teleport)
			doSendMagicEffect(teleport,10)
    else
			doTeleportThing(cid, fromPosition, false)
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, Message)
			doSendMagicEffect(fromPosition,10)
    end
end
return true
end


than in your map make telepoart = magic forcefield = id 1387

with actionid 7894 << you can change it from file movements.xml


hope you like it :) this work i test it

- - - Updated - - -

any problems ?
 
Back
Top