This part of my script doesn't work :/ i need help, i'm not scripter :c
Code: Select all
bind rcon - * rconm
bind pub o|o .m rconm
proc rconm {nickname ident handle channel argument} {
global rhost rport my-ip
global matchchan
getrconlog
if {[regexp {\"(.+)\" committed suicide with \"(.+)\"} nk1 txt]} {
putquick "PRIVMSG $channel :$nk1 committed suicide with $txt"
}
}
This is my all script.
Code: Select all
bind msgm -|- ** pvt
proc pvt {mad7684 mad8594 mad873 mad8954} {
global rhost rport rconpass challenge
set response [myrcon "say $mad7684: $mad8954"]
}
# Server ip address/hostname
set rhost "82.102.28.104"
# Server port
set rport "27100"
# Rcon password
set rconpass "xxxx"
set matchchan "#sadklaskdl"
set challenge [challengercon $rhost $rport]
bind rcon - * rconm
bind pub o|o .m rconm
proc rconm {nickname ident handle channel argument} {
global rhost rport my-ip
global matchchan
getrconlog
if {[regexp {\"(.+)\" committed suicide with \"(.+)\"} nk1 txt]} {
putquick "PRIVMSG $channel :$nk1 $txt"
}
}
bind pub o|o .map rconmap
proc rconmap {nickname ident handle channel argument } {
global rhost rport rconpass challenge
if {$argument == ""} {
putserv "PRIVMSG $channel :Syntax: .map <map>"
} else {
set response [myrcon "changelevel $argument"]
putserv "PRIVMSG $channel :$response"
}
return 1
}
bind pub o|o .rr res
proc res {nickname ident handle channel argument } {
global rhost rport rconpass challenge
if {$argument == ""} {
set response [myrcon "sv_restart 1"]
putserv "PRIVMSG $channel :$response"
}
return 1
}
bind pub o|o .live live
proc live {nickname ident handle channel argument } {
global rhost rport rconpass challenge
if {$argument == ""} {
set response [myrcon "sv_restart 1"]
after 1000
set response [myrcon "sv_restart 1"]
after 1000
set response [myrcon "sv_restart 3"]
after 3000
set response [myrcon "say LIVE LIVE LIVE - GL & HF"]
set response [myrcon "say LIVE LIVE LIVE - GL & HF"]
set response [myrcon "say LIVE LIVE LIVE - GL & HF"]
putserv "PRIVMSG $channel :$response"
}
return 1
}
proc myrcon {mycmd} {
global rhost rport rconpass challenge
set response [rcon $rhost $rport $challenge "$rconpass" $mycmd]
if {[regexp {Bad challenge.} $response all] || [regexp {No challenge for your address.} $response all]} {
set challenge [challengercon $rhost $rport]
set response [rcon $rhost $rport $challenge "$rconpass" $mycmd]
}
return $response
}
proc getrconlog {} {
global rhost rport challenge my-ip rcon-listen-port rconpass
set response [myrcon "logaddress ${my-ip} ${rcon-listen-port}"]
}
thanks