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.

[Request] NeedSub script =]

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
g
garfwen
Halfop
Posts: 61
Joined: Wed Mar 12, 2008 5:16 pm

[Request] NeedSub script =]

Post by garfwen »

removed...
Last edited by garfwen on Thu Jun 28, 2012 2:19 am, edited 1 time in total.
g
garfwen
Halfop
Posts: 61
Joined: Wed Mar 12, 2008 5:16 pm

cmon

Post by garfwen »

any1 ? :cry:
i really need it :(
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Re: cmon

Post by DragnLord »

garfwen wrote:any1 ? :cry:
i really need it :(
Have you thought about making your own?
g
garfwen
Halfop
Posts: 61
Joined: Wed Mar 12, 2008 5:16 pm

Re: cmon

Post by garfwen »

DragnLord wrote:
garfwen wrote:any1 ? :cry:
i really need it :(
Have you thought about making your own?
I would love to , but i dont know how <.<
t
tueb
Halfop
Posts: 76
Joined: Thu Oct 04, 2007 6:09 am
Location: #quiz.de @ irc.gamesurge.net
Contact:

Post by tueb »

there's a better way to script this, but i don't know how. :roll:

Code: Select all

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"
}
g
garfwen
Halfop
Posts: 61
Joined: Wed Mar 12, 2008 5:16 pm

ty.

Post by garfwen »

Ty for your work !

But its not working <.< when i type !needsub the bot doesnt says anything.. :(
t
tueb
Halfop
Posts: 76
Joined: Thu Oct 04, 2007 6:09 am
Location: #quiz.de @ irc.gamesurge.net
Contact:

Post by tueb »

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
g
garfwen
Halfop
Posts: 61
Joined: Wed Mar 12, 2008 5:16 pm

nop

Post by garfwen »

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
g
garfwen
Halfop
Posts: 61
Joined: Wed Mar 12, 2008 5:16 pm

Post by garfwen »

Solved -> special thanks for tueb



GaRfWeN
Post Reply