function onThink(cid, interval)
local cfg = {
SkillToTeleport = XXX, -- If this skill or higher you will be teleported to ToPos
storage = XXXX, -- Storage added when entering room. Should be the same as storage in the movement script.
ToPos = { x = XXX, y = YYY, z = ZZZ }, -- The Kick Position.
notAllowedStorage = XXXX, -- Storage given so you cant enter the room again. Should be same as notAllowedStorage in the movement script.
KickMessage = "You have been kicked from the training room due to high skills!",
}
-- DONT EDIT ANYTHING BELOW THIS IF YOU DONT KNOW WHAT YOU ARE DOING! --
if getPlayerSkillLevel(cid, 0) >= cfg.SkillToTeleport or getPlayerSkillLevel(cid, 1) >= cfg.SkillToTeleport or getPlayerSkillLevel(cid, 2) >= cfg.SkillToTeleport or getPlayerSkillLevel(cid, 3) >= cfg.SkillToTeleport or getPlayerSkillLevel(cid, 4) >= cfg.SkillToTeleport or getPlayerSkillLevel(cid, 5) >= cfg.SkillToTeleport then
if getPlayerStorageValue(cid, cfg.storage) == 1 then
doTeleportThing(cid, cfg.ToPos, FALSE)
doSendMagicEffect(cfg.ToPos, 13)
setPlayerStorageValue(cid, cfg.storage, 0)
setPlayerStorageValue(cid, cfg.notAllowedStorage, 1)
doPlayerSendCancel(cid, cfg.KickMessage)
end
end
return TRUE
end