Hello,
Here is a script Requested By: Ghazer, you enter a teleport depending on how many players you have configure it with.
Pretty simple, but may come handy!
At Movements/movements.xml add this line:
Now at Movements/scripts create new lua and name it "onlinetp" and paste this code below:
Enjoy!
Here is a script Requested By: Ghazer, you enter a teleport depending on how many players you have configure it with.
Pretty simple, but may come handy!
At Movements/movements.xml add this line:
XML:
<movevent type="StepIn" actionid="1337" event="script" value="onlinetp.lua"/>
Now at Movements/scripts create new lua and name it "onlinetp" and paste this code below:
Lua:
local Cyko = {
Pos = {x = 1000, y = 1000, z = 7}, --Where they get teleported
Count = 30, --How many players have to be online, to enter the teleport
}
function onStepIn(cid, item, position, fromPos, fromPosition)
local Online = getWorldCreatures()
if isPlayer(cid) then
if Online < Cyko.Count then
doPlayerSendTextMessage(cid,27, "Sorry, but its only "..Online.." Players Online. Have to be "..Cyko.Count.."+ Players online, to enter this teleport.")
doTeleportThing(cid, fromPosition, true)
doSendMagicEffect(fromPos, CONST_ME_TELEPORT)
return true
elseif Online >= Cyko.Count then
doTeleportThing(cid, Cyko.Pos)
doSendMagicEffect(Cyko.Pos, CONST_ME_TELEPORT)
doSendMagicEffect(posistion, CONST_ME_TELEPORT)
end
end
return true
end
Enjoy!
Last edited: