Skip to content
General Chat Talk

Code Request (maybe)

A TG007 community discussion started by Johnson.

Discussion 21 posts
Page 1 of 2
Open
Topic #10807 · 21 published posts · 5,715 views
:D I asked this in the #TG007 Room In Koach yesterday lol but everyone had gone for dinner :P ... Is it possible to have a command in your script where when you are in "webchat" that you could do something like this !join and your script would join the room also the same with !leave and the script would leave (not a hop) ... iv seen this happen but not with the same commands iv done :( but not sure where ? or would this have to be done with two scripts ... I know you can do it in the script i.e /leave and also /join #roomname. I will leave it in your capable hands :D

provided you are using the standard level system...

 

on admin:TEXT:!join *:#: { msg $chan Joining $2 now... | join $2 }
on admin:TEXT:!leave *:#: {
  if ($2 ischan) { part $2 | msg $chan I have now left $2 }
  else { msg $chan I am not in $2 }
}

 

Something like that... then use !join #roomname and !leave #roomname

:lmaojump: Thanks for the reply TGK ... Ok this is what i did i copied and pasted that code into remote .. both in the script i use for Koach and my SPCN script ... :( i tried it in both and did as you said !leave #TG007 and !join #TG007 and that was tried in Koach ... i then loaded the code to SPCN script as im an op in the room lol and did this !leave %#roomname & !join %#roomname and this lol !leave#roomname !join #roomname ... :'( nothing mate happened in either script :( ... I am very gratefull for your help on this TGK thankyou :D

what is your user system? Can you copy/paste a working code for a user command that is just for you?

Use #$2 instead of $2 in the join/part events.

what is your user system? Can you copy/paste a working code for a user command that is just for you?

 

:oops: TGK sorry i dont know what you mean when you say your user system ?

This is my snippet for joining another room try it :P

 

 

on *:TEXT:!join*:#:{ /msg # Now Joining $2- $nick $+ .... Hold your Horses | /join $2- | /msg # Join Complete For $2- Anything Else $nick }

______________________________________________________

T.ogether
E.veryone
A.chieves
M.ore


 

 

coderirclogo.png.8580c336378f27471a13a95ffd242c9d (1).png

yea... then anyone can do it. that's why its a bad idea to do what chain gave.

Are you trying to do it while your outside of the room? Example; your in #TG007, your script parts and you do !join #TG007 (while your in the room on webchat) and it rejoins the room? If so, that's impossible to do in webchat.

Edited Aug 16, 2008 1:49 PM by X-Fusion
Are you trying to do it while your outside of the room? Example; your in #TG007, your script parts and you do !join #TG007 (while your in the room on webchat) and it rejoins the room? If so, that's impossible to do in webchat.

 

 

Thanks X-Fusion that is Exactly the question I was asking ... so it cant be done while im in webchat

That depends on the effect you want.

 

If you type !join #room, mIRC has to be able to see it in a message. You could have your script joined to the room as a regular user, then the command !join #room would cause it to join with a host nickname.

 

There was a way to join a room without anyone noticing you join the room. You could see events and all but noone saw your nick in the list. This way you could also have it join but I don't know about this. Ozzy had a ghost script for MSN.

Thanks X-Fusion that is Exactly the question I was asking ... so it cant be done while im in webchat

The script has to be in the same room as your webchat in order to receive commands from webchat.

:oops:Yeah david is right i had that set in spcn for ppl that wanted me to idle in there rooms so i made it that way..soz i was doing it late and didnt fully notice the snippet..but all he has to do is add admin :P

______________________________________________________

T.ogether
E.veryone
A.chieves
M.ore


 

 

coderirclogo.png.8580c336378f27471a13a95ffd242c9d (1).png

The script has to be in the same room as your webchat in order to receive commands from webchat.

 

 

:D yes that is what i am looking for as i tried to explain in my 1st posting ... im looking and asking is it possible for myself Johnson and my Script to both be in #TG007 and i put a command to the script to leave and another command for the script to join while im in webchat in #TG007 Chatroom and it will leave and join on my commands and no one else ... im beginning to think the same way as X-Fusion it seems impossibel :( but who knows someone out there might know a way ... TGK's code looked the code for me but iv tried everything but cant get it to work and thankyou to TGK for trying.

on *:TEXT:*:*: {
  if ($ial($me).addr) {
    if (!leave == $strip($1)) part $2-
    if (!rejoin -- $strip($1)) {
      var %l = $2-
      part %l
      .timerrejoin -m 1 320 join %l
    }
  }
}

 

Basically that's the way to do it. However, if you want to make it to where you don't have the particular script you want to use this on in your room, but start up, and join the room you will still need another script in the room with this code...

 

[b]Script 1[/b]
on *:TEXT:*:*: {
  if ($ial($me).addr) {
    if (!join == $strip($1)) {
      write <Path to special script>\join.txt $server $2-
      run <Path to special script>\mirc.exe
    }
  }
}

[b]Special Script[/b]
on *:START: {
  if ($exists($nofile($mircexe) $+ join.txt) {
    server $gettok($read($nofile($mircexe) $+ join.txt),1,32)
  }
}

on *:CONNECT: {
  if ($exists($nofile($mircexe) $+ join.txt) {
    join $gettok($read($nofile($mircexe) $+ join.txt),2-,32)
    .remove $nofile($mircexe) $+ join.txt
  }
}

 

So, basically you will need 2 scripts. One to use the join code, and one to start the one using the join code.

Edited Aug 17, 2008 7:28 AM by Warrior124
:lmaojump: Cheers Warrior im going create a basic script and use them codes and see how i go on lol ... thanks again mate :D

No problem, lol. :)

Edited Aug 17, 2008 1:13 PM by Warrior124

I think the original script would work (by the gate keeper) if you just added yourself to the user section of the script as admin. it seems the simple solution for what you want.

I think the original script would work (by the gate keeper) if you just added yourself to the user section of the script as admin. it seems the simple solution for what you want.

 

where in mirc is user section ? as for TGK's code and Warriors codes they all look good and as soon as i have time i will try them all again ... but im full of flu at the moment :(

Hiya

 

I Would love to help but im so not good at this kind of Stuff lol

 

Kind Regard's

Nova