egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Script request!

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
jsilvestre
Voice


Joined: 05 Mar 2005
Posts: 20
Location: Lisbon, Portugal

PostPosted: Sat Mar 05, 2005 7:32 am    Post subject: Script request! Reply with quote

Good morning! Smile

I here to request a simple script.
I have many nicks and i need a script to my eggdrop change is nick every X minutes. Confused
_________________
Best Regards

José Eduardo Silvestre
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Mar 05, 2005 8:57 am    Post subject: Reply with quote

Code:
# change nick after how many mins ?
set nchange(mins) "10"

# your nicks:
set nchange(nicks) "nick1 nick2 nick3"

# script goes here:

timer $nchange(mins) [list change:nick $nchange(nicks) $nchange(mins)]
set nchange(length) 0

proc change:nick {nicks mins} {
global nick nchange
incr nchange(length)
if {"$nchange(length)" > "[llength $nicks]"} { set nchange(length) 1 }
set nick "[lindex $nicks [expr {$nchange(length)-1}]]"
timer $mins [list change:nick $nicks $mins]
}

This should change the bot's nick every x minutes respectivley from nchange(nicks).
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Kurupt
Voice


Joined: 22 Aug 2004
Posts: 26
Location: Hermanstat

PostPosted: Sat Mar 05, 2005 5:26 pm    Post subject: . Reply with quote

Code:

bind time - "*5 * * * *" change:it
proc change:it {min hour day month year} {
global nick
set nick [randstring 9]
}
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Mar 05, 2005 7:12 pm    Post subject: Re: . Reply with quote

Kurupt wrote:
Code:

bind time - "*5 * * * *" change:it
proc change:it {min hour day month year} {
global nick
set nick [randstring 9]
}

that'll change the bot's nick to a 9 charactered random nick every 5 minutes, that's not what he wants.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Kurupt
Voice


Joined: 22 Aug 2004
Posts: 26
Location: Hermanstat

PostPosted: Sat Mar 05, 2005 7:28 pm    Post subject: Reply with quote

oh sorry i whas a lil disturbed
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
jsilvestre
Voice


Joined: 05 Mar 2005
Posts: 20
Location: Lisbon, Portugal

PostPosted: Sun Mar 06, 2005 2:40 pm    Post subject: Sir_Fz :) Reply with quote

Sir_Fz thanks Very Happy Smile
_________________
Best Regards

José Eduardo Silvestre
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sun Mar 06, 2005 7:32 pm    Post subject: Reply with quote

You're welcome, but you will face problems when you rehash since you will have several timers running. This should fix it:
Code:
# change nick after how many mins ?
set nchange(mins) "10"

# your nicks:
set nchange(nicks) "nick1 nick2 nick3"

# script goes here:

foreach ntimer [timers] {
 if {[string match -nocase "*change:nick*" "[lindex $ntimer 1]"]} {
  killtimer [lindex $ntimer 2]
 }
}
timer $nchange(mins) [list change:nick $nchange(nicks) $nchange(mins)]
set nchange(length) 0

proc change:nick {nicks mins} {
global nick nchange
incr nchange(length)
if {"$nchange(length)" > "[llength $nicks]"} { set nchange(length) 1 }
set nick "[lindex $nicks [expr {$nchange(length)-1}]]"
timer $mins [list change:nick $nicks $mins]
}

Not tested.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
jsilvestre
Voice


Joined: 05 Mar 2005
Posts: 20
Location: Lisbon, Portugal

PostPosted: Mon Mar 07, 2005 2:03 pm    Post subject: Tks Reply with quote

This script work very well...Tks one more time Smile Very Happy
_________________
Best Regards

José Eduardo Silvestre
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Merlin
Voice


Joined: 19 Dec 2006
Posts: 2

PostPosted: Tue Dec 19, 2006 9:54 am    Post subject: various nicks Reply with quote

it has as to place various nicks and passwords to identify nickserv?
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Tue Dec 19, 2006 8:01 pm    Post subject: Re: various nicks Reply with quote

Merlin wrote:
it has as to place various nicks and passwords to identify nickserv?

No! It simply does as was originally requested; change nicks.
_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
sk-4
Halfop


Joined: 06 Oct 2007
Posts: 51

PostPosted: Fri Feb 29, 2008 12:12 pm    Post subject: Reply with quote

any chance to make the bot to identified each nick with his own pass

# change nick after how many mins ?
set nchange(mins) "10"

# your nicks:
set nchange(nicks) "nick1 nick2 nick3"

set nchange(pass) "pass1" ''pass2' "pass3"
Back to top
View user's profile Send private message
elisca
Halfop


Joined: 27 Jan 2007
Posts: 65
Location: in the middle of nowhere

PostPosted: Fri Feb 29, 2008 4:29 pm    Post subject: Reply with quote

Code:
set nicksNpasses {
 nick1 pass1
 nick2 pass2
 nick3 pass3
}

set tenDays [clock scan "10 days"]

bind time - {00 00 *} identify:nicks

proc identify:nicks args {
 global nicksNpasses tenDays
 if {[unixtime] >= $tenDays} {
  foreach {nick pass} $nicksNpasses {
   puthelp "NickServ :identify $nick $pass"
  }
  set tenDays [clock scan "10 days"]
 }
}


Note : write by Sir_Fz
Back to top
View user's profile Send private message
sk-4
Halfop


Joined: 06 Oct 2007
Posts: 51

PostPosted: Fri Feb 29, 2008 11:08 pm    Post subject: Reply with quote

thanks for the reply elesca, i did try out that script ,the problem is it identified all nick and cause nick get akill someime cause its identifiy all the nick.. what i want is the script will chnage bot nick according times and it can be identifed one bye one
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Mar 01, 2008 8:17 am    Post subject: Reply with quote

Try
Code:
# change nick after how many mins ?
set nchange(mins) 10

# your nicks:
set nchange(nicks) {
 nick1 pass1
 nick2 pass2
 nick3 pass3
}

# script goes here:

foreach ntimer [timers] {
 if {[string match -nocase "*change:nick*" [lindex $ntimer 1]]} {
  killtimer [lindex $ntimer 2]
 }
}
timer $nchange(mins) [list change:nick $nchange(nicks) $nchange(mins)]
set nchange(length) 0

proc change:nick {nicks mins} {
 global nick nchange
 set nchange(length) [expr {$nchange(length)%[llength $nicks]}]
 set nick [lindex $nicks $nchange(length)]
 set nchange($nick) [lindex $nicks [incr nchange(length)]]
 incr nchange(length)
 timer $mins [list change:nick $nicks $mins]
}

bind nick - * identify:nick

proc identify:nick {n uhost hand chan nn} {
 global nchange
 if {[isbotnick $nn] && [info exists nchange($nn)]} {
  putserv "NickServ :identify $nn $nchange($nn)"
  unset nchange($nn)
 }
}

This should identify the nickname once the bot changes its nickname (untested).
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
minilogo
Voice


Joined: 18 May 2008
Posts: 1

PostPosted: Sun May 18, 2008 7:05 am    Post subject: Reply with quote

how if i want to change the timer from minutes to seconds ? Rolling Eyes Rolling Eyes Rolling Eyes

to let the bots ident nick more faster Laughing

Edit: NVM.. found it already Wink replacing timers with utimers and timer with utimer Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber