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.

Script request!

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
User avatar
jsilvestre
Voice
Posts: 20
Joined: Sat Mar 05, 2005 6:02 am
Location: Lisbon, Portugal

Script request!

Post by jsilvestre »

Good morning! :)

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. :?
Best Regards

José Eduardo Silvestre
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Code: Select all

# 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).
User avatar
Kurupt
Voice
Posts: 26
Joined: Sun Aug 22, 2004 7:57 pm
Location: Hermanstat

.

Post by Kurupt »

Code: Select all

bind time - "*5 * * * *" change:it
proc change:it {min hour day month year} {
global nick
set nick [randstring 9]
}
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Re: .

Post by Sir_Fz »

Kurupt wrote:

Code: Select all

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.
User avatar
Kurupt
Voice
Posts: 26
Joined: Sun Aug 22, 2004 7:57 pm
Location: Hermanstat

Post by Kurupt »

oh sorry i whas a lil disturbed
User avatar
jsilvestre
Voice
Posts: 20
Joined: Sat Mar 05, 2005 6:02 am
Location: Lisbon, Portugal

Sir_Fz :)

Post by jsilvestre »

Sir_Fz thanks :D :)
Best Regards

José Eduardo Silvestre
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

You're welcome, but you will face problems when you rehash since you will have several timers running. This should fix it:

Code: Select all

# 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.
User avatar
jsilvestre
Voice
Posts: 20
Joined: Sat Mar 05, 2005 6:02 am
Location: Lisbon, Portugal

Tks

Post by jsilvestre »

This script work very well...Tks one more time :) :D
Best Regards

José Eduardo Silvestre
M
Merlin
Voice
Posts: 2
Joined: Tue Dec 19, 2006 9:53 am

various nicks

Post by Merlin »

it has as to place various nicks and passwords to identify nickserv?
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Re: various nicks

Post by Alchera »

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
s
sk-4
Halfop
Posts: 51
Joined: Sat Oct 06, 2007 6:37 am

Post by sk-4 »

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"
User avatar
elisca
Halfop
Posts: 65
Joined: Sat Jan 27, 2007 4:23 am
Location: in the middle of nowhere

Post by elisca »

Code: Select all

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
s
sk-4
Halfop
Posts: 51
Joined: Sat Oct 06, 2007 6:37 am

Post by sk-4 »

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
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Try

Code: Select all

# 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).
m
minilogo
Voice
Posts: 1
Joined: Sun May 18, 2008 7:03 am

Post by minilogo »

how if i want to change the timer from minutes to seconds ? :roll: :roll: :roll:

to let the bots ident nick more faster :lol:

Edit: NVM.. found it already ;) replacing timers with utimers and timer with utimer :D
Post Reply