This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Another simple msg script

Old posts that have not been replied to for several years.
User avatar
toefraz
Halfop
Posts: 44
Joined: Thu Jul 01, 2004 4:35 am

Another simple msg script

Post by toefraz »

here's what i want the bot to do, right when i open it.

.msg ns@services.galaxynet.org auth <nick> <pass>
.msg q invite #chan

Can anyone possible help me on this mission? (lol)
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Right when you open it?
What's that suppose to mean?!

Do you mean when it connects to a server
after you have loaded/launched or restarted it?
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
toefraz
Halfop
Posts: 44
Joined: Thu Jul 01, 2004 4:35 am

Post by toefraz »

Right when the bot connects to a server (Sry for being vague)
User avatar
toefraz
Halfop
Posts: 44
Joined: Thu Jul 01, 2004 4:35 am

Post by toefraz »

Sorta like the perform option in mIRC
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

If you want something like the mirc perform option which
will trigger when the bot connects to the server, you can
use something like this.

Code: Select all

bind evnt - init-server my:procedure

proc my:procedure {type} {
 global botnick
  putserv "PRIVMSG ns@services.galaxynet.org :AUTH <nick> <pass>"
  putserv "PRIVMSG Q :INVITE <#channel>"
}
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

What's with "global botnick" if you don't seem to be using it?
Once the game is over, the king and the pawn go back in the same box.
d
dollar
Op
Posts: 178
Joined: Tue Oct 28, 2003 3:47 pm
Location: Netherlands

Post by dollar »

caesar wrote:What's with "global botnick" if you don't seem to be using it?
"Hey it works... so no need to change it"
dollar (or something similar) at:
#eggdrop / #tcl - undernet
#egghelp / #tcl / #eggtcl - efnet
#eggdrop.support / #tcl - quakenet
#eggdrop - ircnet
User avatar
arcane
Master
Posts: 280
Joined: Thu Jan 30, 2003 9:18 am
Location: Germany
Contact:

Post by arcane »

lol.
i bet "AUTH <nick>" was meant to be replaced with "AUTH $botnick" some day...
aVote page back online!
Check out the most popular voting script for eggdrop bots.

Join the metal tavern!
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

The copy/paste probably confused him :mrgreen:
Once the game is over, the king and the pawn go back in the same box.
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Na... I just like to declare a global variable
always do, when there is no global variable declared.

Seems useless, but gives the right majestic touch
to the procedure when you look at it.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

I use this method always:

Code: Select all

$::botnick
:)
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Yeah you can also use $::botnick any global variable with
two :: between their $ sign and name will run the procedure
and you wouldn't have to declar the global variable.

But if you have alot of global variables it makes the script
look messy, hence I always restrict myself to use this method.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
arcane
Master
Posts: 280
Joined: Thu Jan 30, 2003 9:18 am
Location: Germany
Contact:

Post by arcane »

i agree.
what's more: if you are using some global var several times in a proc, global saves you some chars to type ;)
aVote page back online!
Check out the most popular voting script for eggdrop bots.

Join the metal tavern!
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Ok, I'm lazy. I can't be bothered typing "global blah blah" all the time. LOL :lol:
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

The difference betwen "global botnick" and "$::botnick" is that the $botnick variable in the first case is called when the proc is started and in the second case it's called just when it's needed. If I recall corectly this has been discussed before.. long time ago. :D
Once the game is over, the king and the pawn go back in the same box.
Locked