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 

[Request] NeedSub script =]

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


Joined: 12 Mar 2008
Posts: 61

PostPosted: Fri Mar 14, 2008 7:08 am    Post subject: [Request] NeedSub script =] Reply with quote

removed...

Last edited by garfwen on Thu Jun 28, 2012 2:19 am; edited 1 time in total
Back to top
View user's profile Send private message
garfwen
Halfop


Joined: 12 Mar 2008
Posts: 61

PostPosted: Sun Mar 16, 2008 6:31 am    Post subject: cmon Reply with quote

any1 ? Crying or Very sad
i really need it Sad
Back to top
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Sun Mar 16, 2008 10:42 am    Post subject: Re: cmon Reply with quote

garfwen wrote:
any1 ? Crying or Very sad
i really need it Sad
Have you thought about making your own?
Back to top
View user's profile Send private message
garfwen
Halfop


Joined: 12 Mar 2008
Posts: 61

PostPosted: Sun Mar 16, 2008 11:39 am    Post subject: Re: cmon Reply with quote

DragnLord wrote:
garfwen wrote:
any1 ? Crying or Very sad
i really need it Sad
Have you thought about making your own?


I would love to , but i dont know how <.<
Back to top
View user's profile Send private message
tueb
Halfop


Joined: 04 Oct 2007
Posts: 76
Location: #quiz.de @ irc.gamesurge.net

PostPosted: Sun Mar 16, 2008 5:16 pm    Post subject: Reply with quote

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

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
View user's profile Send private message Visit poster's website
garfwen
Halfop


Joined: 12 Mar 2008
Posts: 61

PostPosted: Wed Mar 19, 2008 4:21 pm    Post subject: ty. Reply with quote

Ty for your work !

But its not working <.< when i type !needsub the bot doesnt says anything.. Sad
Back to top
View user's profile Send private message
tueb
Halfop


Joined: 04 Oct 2007
Posts: 76
Location: #quiz.de @ irc.gamesurge.net

PostPosted: Thu Mar 20, 2008 5:42 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
garfwen
Halfop


Joined: 12 Mar 2008
Posts: 61

PostPosted: Thu Mar 20, 2008 5:52 am    Post subject: nop Reply with quote

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
View user's profile Send private message
garfwen
Halfop


Joined: 12 Mar 2008
Posts: 61

PostPosted: Fri Mar 21, 2008 9:02 am    Post subject: Reply with quote

Solved -> special thanks for tueb



GaRfWeN
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