| View previous topic :: View next topic |
| Author |
Message |
garfwen Halfop
Joined: 12 Mar 2008 Posts: 61
|
Posted: Fri Mar 14, 2008 7:08 am Post subject: [Request] NeedSub script =] |
|
|
removed...
Last edited by garfwen on Thu Jun 28, 2012 2:19 am; edited 1 time in total |
|
| Back to top |
|
 |
garfwen Halfop
Joined: 12 Mar 2008 Posts: 61
|
Posted: Sun Mar 16, 2008 6:31 am Post subject: cmon |
|
|
any1 ?
i really need it  |
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Sun Mar 16, 2008 10:42 am Post subject: Re: cmon |
|
|
| garfwen wrote: | any1 ?
i really need it  | Have you thought about making your own? |
|
| Back to top |
|
 |
garfwen Halfop
Joined: 12 Mar 2008 Posts: 61
|
Posted: Sun Mar 16, 2008 11:39 am Post subject: Re: cmon |
|
|
| DragnLord wrote: | | garfwen wrote: | any1 ?
i really need it  | Have you thought about making your own? |
I would love to , but i dont know how <.< |
|
| Back to top |
|
 |
tueb Halfop
Joined: 04 Oct 2007 Posts: 76 Location: #quiz.de @ irc.gamesurge.net
|
Posted: Sun Mar 16, 2008 5:16 pm Post subject: |
|
|
there's a better way to script this, but i don't know how.
| Code: |
variable gameREQUEST "0"
variable gameIP ""
variable gamePW ""
variable gameMAP ""
variable gameADMIN ""
variable gameHANDLE ""
bind pub - !needsub needsub_request
proc needsub_request {nick host handle channel text} {
set channel [string tolower $channel]
set subchan "#tugax.sub"
if {$subchan != $channel} {
return
}
if {[scan $text "%d.%d.%d.%d:%d %s %s" IP1 IP2 IP3 IP4 PORT PASSWORD MAP] == 7} {
set IP "$IP1.$IP2.$IP3.$IP4"
tugax_notc $nick "Your request is being forwarded."
} else {
tugax_notc $nick "Please state your request in the following layout: \002!needsub IP:PORT PASSWORD MAP\002"
return
}
global gameREQUEST gameIP gamePW gameHANDLE gamePW gameADMIN gameMAP
set gameREQUEST "1"
set gameIP "$IP:$PORT"
set gameADMIN $nick
set gameHANDLE $handle
set gamePW $PASSWORD
set gameMAP $MAP
tugax_amsg "An substitute player is needed for the game Counter Strike 1.6 ( Game ip: \"\002$IP:$PORT\002\" , Game map: \"\002$MAP\002\" ) on #tugax , if you'r interested in playing join \002#tugax\002 and type \002!sub\002"
}
bind pub - !sub sub_request
proc sub_request {nick host handle channel text} {
global gameREQUEST
set channel [string tolower $channel]
set mainchan "#tugax"
if {$mainchan != $channel} {
return
}
if {$gameREQUEST == "0"} {
tugax_notc $nick "There is no open game logged."
return
}
global gameIP gamePW gameADMIN
tugax_say $channel "Thanks for playing on #tugax, your IP:PORT is \"\002$gameIP\002\" and your password is \"\002$gamePW\002\" . Your admin is \"\002$gameADMIN\002\""
set gameREQUEST 0
}
bind pub - !delsub delsub_request
proc delsub_request {nick host handle channel text} {
global gameHANDLE
if {![isop $nick $channel] && $handle != $gameHANDLE} {
tugax_notc $nick "You can only delete your own request."
return
}
global gameREQUEST
set gameREQUEST 0
}
bind time - "?0 * * *" timed_request
bind time - "?5 * * *" timed_request
proc timed_request {a b c d e} {
global gameREQUEST
if {$gameREQUEST == "0"} {
#tugax_amsg "advertisement"
return
}
global gameIP gamePW gameMAP
tugax_amsg "An substitute player is needed for the game Counter Strike 1.6 ( Game ip: \"\002$gameIP\002\" , Game map: \"\002$gameMAP\002\" ) on #tugax , if you'r interested in playing join \002#tugax\002 and type \002!sub\002"
}
#http://forum.egghelp.org/viewtopic.php?t=14249
proc tugax_amsg text {
foreach c [channels] {
if {[botonchan $c]} {
putserv "PRIVMSG $c :$text"
}
}
}
proc tugax_say {channel text} {
putserv "PRIVMSG $channel :$text"
}
proc tugax_notc {nick text} {
putserv "NOTICE $nick :$text"
}
|
|
|
| Back to top |
|
 |
garfwen Halfop
Joined: 12 Mar 2008 Posts: 61
|
Posted: Wed Mar 19, 2008 4:21 pm Post subject: ty. |
|
|
Ty for your work !
But its not working <.< when i type !needsub the bot doesnt says anything..  |
|
| Back to top |
|
 |
tueb Halfop
Joined: 04 Oct 2007 Posts: 76 Location: #quiz.de @ irc.gamesurge.net
|
Posted: Thu Mar 20, 2008 5:42 am Post subject: |
|
|
hm...
I just tried it on my bot again and it worked. Did you make any changes to the script?
tueb _________________ #Quiz.de @ irc.GameSurge.net
JavaChat |
|
| Back to top |
|
 |
garfwen Halfop
Joined: 12 Mar 2008 Posts: 61
|
Posted: Thu Mar 20, 2008 5:52 am Post subject: nop |
|
|
| tueb wrote: | hm...
I just tried it on my bot again and it worked. Did you make any changes to the script?
tueb |
hello,
no I didnt , you can see by your self at #tugax.sub (bot name: tugax-Sub)
regards,
garfwen |
|
| Back to top |
|
 |
garfwen Halfop
Joined: 12 Mar 2008 Posts: 61
|
Posted: Fri Mar 21, 2008 9:02 am Post subject: |
|
|
Solved -> special thanks for tueb
GaRfWeN |
|
| Back to top |
|
 |
|