mIRC Home    About    Download    Register    News    Help

Print Thread
#152289 29/06/06 02:28 AM
Joined: Jun 2006
Posts: 29
N
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Jun 2006
Posts: 29
And agan i need your help !

All time i cant make script for topic
Problem is I whant put in my bot script if som body tape !topic then bot
send notice text from chanel to nick what on this moment is in topic !
Som body can help me please ? confused


{noiprocs-hunky-scorpion}
#152290 29/06/06 02:34 AM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Code:
on *:text:!topic:#:{
  if (!%noflood) {
    inc -u3 %noflood
    .notice $nick $$chan($chan).topic
  }
}


I added flood protection as well. People can only use it once every 3 seconds.

#152291 29/06/06 03:22 AM
Joined: Jun 2006
Posts: 29
N
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Jun 2006
Posts: 29
here is one problem if im not in thet chanel hi dont send a topic frown

i whant just join whis my bot in another chanel and if i tape !topic hi send me in notice text what is in topic !

Last edited by noiprocs; 29/06/06 03:41 AM.

{noiprocs-hunky-scorpion}
#152292 29/06/06 05:51 AM
Joined: Apr 2006
Posts: 464
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
Well, then you have 2 options:

With channel hardcoded in the script.
Trigger is: !topic
Code:
on *:text:!topic:#:{
  if (!%noflood) {
    inc -u3 %noflood
    var %channelname = [color:red]#channelname[/color]
    .notice $nick $$chan(%channelname).topic
  }
}

* Enter the channel you want where the red part now is.

With a specifyable channelname.
Trigger is: !topic #channelname
Code:
on *:text:!topic*:#:{
  if (!%noflood) {
    inc -u3 %noflood
    var %channelname = $2
    .notice $nick $$chan(%channelname).topic
  }
}

#152293 29/06/06 09:19 AM
Joined: Jun 2006
Posts: 29
N
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Jun 2006
Posts: 29
OK my chanel where i whant where bot read topic is
#proxy
And chanel where to read text
!topic is chanel #pele
Code:
 on *:text:!topic*:#pele:{
  if (!%noflood) {
    inc -u3 %noflood
    var %channelname = #proxy
    .notice $nick $$chan(%channelname).topic
  }
}  


Like thet ? if like thet its dasn't work frown nothing hapen !


{noiprocs-hunky-scorpion}
#152294 29/06/06 04:07 PM
Joined: Apr 2006
Posts: 464
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
Yes:

Code:
on *:text:!topic:#pele:{
  if (!%noflood) {
    inc -u3 %noflood
    var %channelname = #proxy
    .notice $nick $$chan(%channelname).topic
  }
}


This should work.
The bot has to be in the channel #proxy and in the channel #pele.
You only have to be in the channel #pele.
The script goes in the remote file of the bot.

If it doesn't work, open a new script file in your remotes and paste the code there. It should work.

#152295 02/07/06 08:54 PM
Joined: Jun 2006
Posts: 29
N
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Jun 2006
Posts: 29
And if my bot is in another server ?
Ok my bot is in chat.118.lv
And in irc.allxtremenet.net
if i whant topic from irc.allxtremenet.net #eschat how i can ?
becose script
Code:
on *:text:!topic:#pele:{
  if (!%noflood) {
    inc -u3 %noflood
    var %channelname = #eschat
    .notice $nick $$chan(%channelname).topic
  }
}
 

dosn work frown

Kan help som body ?
A script work just one server !


SORRY about my english smile


{noiprocs-hunky-scorpion}
#152296 02/07/06 10:32 PM
Joined: Apr 2006
Posts: 464
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
Hmm, I dont know how to use this with different servers.
Lets hope someone else can reply on this.

#152297 02/07/06 11:09 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
This should work, presuming that what you're referring to as servers are actually the network names. If the names you've given are server names, then you'll have to get the proper network name for each and do the appropriate substitutions.
Code:
 on *:connect:{
  if $network == allxtremenet.net {
    set %cid1 $cid
  }
  elseif $network == chat.118.lv {
    set %cid2 $cid
  }
}

on *:text:!topic:#pele:{
  if $chan($chan).cid == %cid2 {
    set %topic $chan(#eschat).topic
  }
  if (!%noflood) {
    inc -u3 %noflood
    .scon -t1 %cid1 .notice $nick %topic
  }
}
 

#152298 03/07/06 03:46 AM
Joined: Jun 2006
Posts: 29
N
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Jun 2006
Posts: 29
some thing vrong !

in line -->: .scon -t1 %cid1 .notice $nick %topic :<--
---------------------------------------------------------------------------
on *:connect:{
if $network == allxtremenet.net {
set %cid1 $cid
}
elseif $network == chat.118.lv {
set %cid2 $cid
}
}

on *:text:!topic:#pele:{
if $chan($chan).cid == %cid2 {
set %topic $chan(#eschat).topic
}
if (!%noflood) {
inc -u3 %noflood
.scon -t1 %cid1 .notice $nick %topic
}
}
---------------------------------------------------------------------------
* /notice: insufficient parameters
---------------------------------------------------------------------------

Last edited by noiprocs; 03/07/06 04:10 AM.
#152299 03/07/06 04:11 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
1) Are you sure that you're connected to the two networks as indicated?
As I said before, if those are the server names, rather than the network names, you're going to have to change them in the code.
2) Are you sure that the channel #eschat is active on the network chat.118.lv
3) Did you have the client/bot disconnect and then reconnect to the networks before trying the script? This script is NOT written for your client, but for another client (aka bot).
4) If all of those have been confirmed, put this line just before the line that's causing the problems
Code:
 echo -a %cid1 %topic 

5) Try the script again with that line and report back what the line returns for an echo

#152300 03/07/06 04:43 AM
Joined: Jun 2006
Posts: 29
N
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Jun 2006
Posts: 29
the server name where i whant read topick is irc.allxtremenet.net
The server name where i whant tape text !topic is
chat.118.lv
---------------------------------------------------------------------------------
Chanel name in irc.allxtremenet.net is #eschat
and
Chanel name in chat.118.lv is #pele

So my bot connected to irc.allxtremenet.net join to the chanel #eschat and connected to chat.118.lv my chanel #pele
---------------------------------------------------------------------------------
My nick is just in server chat.118.lv in chanel #pele
I just tape in chanel #pele text !topic
i just whant get information from bot what is in topick on server irc.allxtremenet.net in chanel #eschat
---------------------------------------------------------------------------------
i know in thet script be server name
allxtrement.net
Not irc.allxtrement.net
But i change and nathing happen frown can som badi give for me all script becose i not have good script maker frown
ans i dont know what need chang and what don't need !
---------------------------------------------------------------------------------
Everey body thnx for your time !
---------------------------------------------------------------------------------


{noiprocs-hunky-scorpion}
#152301 03/07/06 05:06 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Corrected script
Code:
 on *:connect:{
  if $network == allxtremenet.net {
    set %cid1 $cid
  }
  elseif $network == 118-Chat {
    set %cid2 $cid
  }
}

on *:text:!topic:#pele:{
  if $chan($chan).cid == %cid2 {
    .scon -t1 %cid1 set %topic $chan(#eschat).topic
  }
  if (!%noflood) {
    inc -u3 %noflood
[color:red]   .scon -t1 %cid2 .notice $nick %topic  [/color] 
  }
}
 


To all other helpers...there is a problem with the line in red. The bot is returning an error that is showing that the nick is trying to be interpreted as a command. I'm stumped on this one, and hope someone else can resolve it and explain the resolution.

Last edited by RusselB; 03/07/06 05:19 AM.
#152302 03/07/06 03:38 PM
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
The problem seems to be that %cid2 has no value. The /scon command has this format:

/scon <switches> <connection> <command> <arguments>

so if %cid2 has no value, the command gets these parameters:

/scon <-t1> <notice> <value_of_$nick> <value of %topic>

The "notice" is being considered the cid (without throwing an error for some reason) and then since the next parameter is $nick, it is being considered the command.

Note: The OP should comment out the red line until this problem can be resolved.

-genius_at_work

#152303 04/07/06 01:14 PM
Joined: Jun 2006
Posts: 29
N
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Jun 2006
Posts: 29
and can you give done script ?
Im not so good script maker !


{noiprocs-hunky-scorpion}
#152304 08/07/06 01:59 AM
Joined: Jun 2006
Posts: 29
N
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Jun 2006
Posts: 29
Quote:
and can you give done script ?
Im not so good script maker ! Please som body i realy need help im can't make script already one mounth ;(

Last edited by noiprocs; 08/07/06 02:01 AM.

{noiprocs-hunky-scorpion}

Link Copied to Clipboard