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

Script for ,,No-Blocking-Training-Persons".

Martiimeus

●тнυg●ℓιƒє● ρα¢ 4 єνєя
Joined
Feb 3, 2009
Messages
500
Reaction score
1
Location
gєямαηу
Hello guys,

I need help and beg ya all to help me out with this..

First of all I pasted Zkums Trainingsroom into my map well but the training rooms are very small so I decided to ask you all how to create a script maybe a tile which says : You have succesfull entered an empty training room! But if a second player would come there the tile would say: there is already a player, go search another training room for yourself! (teleports player to start position)

and here are some screenshots of the training room

http://otland.net/f50/edited-zkums-training-room-35864/

by the way,
im using TFS 0.2.2 Mystic Spirit.

Regards~
:thumbup:

Bump?!

Please guys I need this shit xD!
 
Last edited by a moderator:
Ok look, what do you want? that when someone is training and someone else tryes to go inside it tells the second that someone else is training?
 
of course!!!!!! man you understand fast :D!

edit: but hey dont forget, he cant enter this training room and get teleported to the beginning ! :)


*tfs 0.2.2 mystic spirit *8.42**
 
I don't know how to do what you are looking for but I did something for my trainers.

Look, this is how my trainers work.
trainer1.jpg

trainer2.jpg

trainer3.jpg


so I guess you could use my script with this item in front of your player
trainer4.jpg


create trainers.lua in
action/script/(create "trainers.lua")
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local newpos1 = {x=[COLOR="Red"]32255[/COLOR], y=[COLOR="red"]32214[/COLOR], z=[COLOR="red"]6[/COLOR]}
    if item.actionid == [COLOR="red"]5101[/COLOR] then
    doPlayerSetTown(cid, 1)
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,'[COLOR="red"]You have been teleported out![/COLOR]')
    doTeleportThing(cid, newpos1)
    doSendMagicEffect(newpos1,10)
    end
end

So just set an action id to all item like this in your trainer
trainer5.jpg


and then add this to your action.xml
Code:
<action itemid="3707" script="trainers.lua"/>

I hope it can help you,
and I apologize if I didn't used the right tag for the script, this is my first time

Timax25

EDIT: Oh and I didnt made this script so the credit don't go to me ^^
 
Last edited:
Lol but hey every time when I go into a tp [Training Room] I got an debug

why`? there is nothing on that place where I want to be teleported and the coordinates are right too... so?
 
If you want a simple solution, just put a teleport with coordinates out in place of the crazy gem. It won't look as sexy, but it will be easy and efficient.
 
Make sure again the coor. are right, I don't know what is exactly causing debug itself so I can't help you much, maybe a too long message sent to the player when he step out may cause a debug. Anything else you changed in the script??
 
Lua:
function onStepIn(cid, item, position, fromPosition)
pos = getCreaturePosition(cid)
out = {x=100,y=100,z=100}
trainingpos = {pos.x,pos.y-1,pos.z,stackpos=253}
if isPlayer(getThingfromPos(trainingpos).uid) then
	doTeleportThing(cid, out)
end
	return TRUE
end

This script does teleports your character to out.pos if the player 1 sqm to the north of you is training.
 
Back
Top