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

Solved Random teleport trainer rooms

AnarchGov

Member
Joined
Oct 3, 2011
Messages
263
Reaction score
6
I am looking for a script that will teleport a player into a random training room of his own, unless it is already taken by someone else. Obviously i have done the mapping i am just looking for the script. Does anyone know where i can find it?

Basically like the training system on Noxious. Ill REP++ you.

<3

SOLVED: The script below is what i was looking for. I think the rest is self explanatory.
 
Last edited:
it's work for just first training slot @Limos
UID Tp said that " All training slots are taken " when (1) player in the first training slot

notice : " it can't carry more than 3 slot with UID

Code:
function onStepIn(cid, item, position, fromPosition)
for i = 2239, 2240, 2241 do
local pos = getThingPos(i)
if not isPlayer(getTopCreature(pos).uid) then
doTeleportThing(cid, pos)
doCreatureSay(cid, 'Using a tool to cast spells or to keep your character online is ok.', TALKTYPE_ORANGE_1, false, cid)
doSendMagicEffect(position, CONST_ME_TELEPORT)
doSendMagicEffect(pos, CONST_ME_TELEPORT)
return true
end
end
doTeleportThing(cid, fromPosition, true)
doCreatureSay(cid, 'All training slots are taken', TALKTYPE_ORANGE_1, false, cid)
doSendMagicEffect(fromPosition, CONST_ME_TELEPORT)
end
 
You're not supposed to change the for loop.
Code:
for i = 2239, 2241 do
This means i will be 2239 till 2241, so 2239, 2240, 2241.
For more just make the last number higher.
Code:
for i = 2239, 2249 do
So this means i will be 2239, 2240, 2241, 2242, 2243, 2244, 2245, 2246, 2247, 2248 and 2249.
 
Back
Top