Page 1 of 1
How to change the channel with bot?
Posted: Sat Apr 17, 2010 1:34 pm
by miximixi007
I want to change the channel form 1 -> 2 or form 2 ->1 ,how to do that?thx
Re: How to change the channel with bot?
Posted: Thu Apr 22, 2010 1:29 pm
by miximixi007
anyone help me please
Re: How to change the channel with bot?
Posted: Thu Apr 22, 2010 2:42 pm
by RoMain
id = RoMScript("GetCurrentParallelID()");
if id == 1 then
RoMScript("ChangeParallelID(2)");
elseif id == 2 then
RoMScript("ChangeParallelID(1)");
end;
yrest(30000);
changes to channel 2 when on channel 1 and the other way round
Re: How to change the channel with bot?
Posted: Fri Apr 23, 2010 2:08 pm
by miximixi007
That`s great.Thank you very much

Re: How to change the channel with bot?
Posted: Wed May 12, 2010 2:10 am
by Servus1982
hello one question, where do i have do paste it?
Re: How to change the channel with bot?
Posted: Wed May 12, 2010 2:49 am
by filipsworks
Servus1982 wrote:hello one question, where do i have do paste it?
Paste it where U want to be executed:
4 example U can paste it into waypoint file like that
<!-- # 6 -->
<waypoint x="-128" z="-8708">
id = RoMScript("GetCurrentParallelID()");
if id == 1 then
RoMScript("ChangeParallelID(2)");
elseif id == 2 then
RoMScript("ChangeParallelID(1)");
end;
yrest(30000);
</waypoint>
or <onCast /> section in your profile file...
Dunno is lua can execute loops in loops but if can U can try to use smth like this:
if (condition)
then
id = RoMScript("GetCurrentParallelID()");
if id == 1 then
RoMScript("ChangeParallelID(2)");
elseif id == 2 then
RoMScript("ChangeParallelID(1)");
end;
yrest(30000);
else
do.nothing;
end