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.

How can i say this in AMSG

Old posts that have not been replied to for several years.
Locked
Y
Youri
Voice
Posts: 6
Joined: Tue Feb 08, 2005 7:03 am

How can i say this in AMSG

Post by Youri »

Hi i've an script and i want to say the wars in AMSG
How could i do that?

Code: Select all

set postchan "#war.cs"
set wpcw  "\[ !pcw XonX have/no server de_any low/mid/high skilled extra \]"
set wpcw2 "\[ !pcw 3on3 have server de_any mid skilled no extra \]"
set amsg [channels] 

bind pubm - "% !pcw*" !pcw:pubm
proc !pcw:pubm { nick uhost hand chan text } {
global wpcw wpcw2 postchan amsg

if { [lindex [split $text] 1] == "2on2" } { set nrplayers "2on2"
	} elseif { [lindex [split $text] 1] == "3on3" } { set nrplayers "2on2"
	} elseif { [lindex [split $text] 1] == "4on4" } { set nrplayers "4on4"
	} elseif { [lindex [split $text] 1] == "5on5" } { set nrplayers "5on5"
	} else {
  putserv "NOTICE $nick :$wpcw"
  putserv "NOTICE $nick :$wpcw2"
  return 0
}
if { [lindex [split $text] 2] == "have" } {
  set server "yes"
} elseif { [lindex [split $text] 2] == "no" } { set server "no"
} else {
  putserv "NOTICE $nick :$wpcw"
  putserv "NOTICE $nick :$wpcw2"
  return 0
}
if { [lindex [split $text] 3] != "server" } {
  putserv "NOTICE $nick :$wpcw"
  putserv "NOTICE $nick :$wpcw2"
  return 0
}
if { [lindex [split $text] 4] == "de_aztec" } { set map "de_aztec"
} elseif { [lindex [split $text] 4] == "de_dust" } { set map "de_dust"
} elseif { [lindex [split $text] 4] == "de_dust2" } { set map "de_dust2"
} elseif { [lindex [split $text] 4] == "de_inferno" } { set map "de_inferno"
} elseif { [lindex [split $text] 4] == "de_nuke" } { set map "de_nuke"
} elseif { [lindex [split $text] 4] == "de_cbble" } { set map "de_cbble"
} elseif { [lindex [split $text] 4] == "de_cpl_mill" } { set map "de_cpl_mill"
} elseif { [lindex [split $text] 4] == "de_any" } { set map "de_any"
} else {
  putserv "NOTICE $nick :$wpcw"
  putserv "NOTICE $nick :$wpcw2"
  return 0
}
if { [join [lrange [split $text] 5 6]] == "low skilled" } { set skilled "low skilled"
} elseif { [join [lrange [split $text] 5 6]] == "medium skilled" } { set skilled "medium skilled"
} elseif { [join [lrange [split $text] 5 6]] == "high skilled" } { set skilled "high skilled"
} else {
  putserv "NOTICE $nick :$wpcw"
  putserv "NOTICE $nick :$wpcw2"
  return 0
}

if { [lindex [split $text] 7] != "" } { set extra "[join [lrange [split $text] 7 end]]" } { set extra "" }
if { $extra != "" } {
  puthelp "PRIVMSG $chan :\[ #war.cs \] \[ Your will be announced in a few secconds \]"
  puthelp "PRIVMSG $chan :"
  puthelp "PRIVMSG $chan :"
  puthelp "PRIVMSG $amsg :"
  puthelp "PRIVMSG $amsg :\[ #war.cs \] \[ $nrplayers \] \[ server: $server \] \[ $map \] \[ $skilled  \] \[ extra: $extra \] \[ /msg $nick \]"
} else {
  puthelp "PRIVMSG $chan :\[ #war.cs \] \[ Your will be announced in a few secconds \]"
  puthelp "PRIVMSG $chan :"
  puthelp "PRIVMSG $chan :"
  puthelp "PRIVMSG $chan :"
  puthelp "PRIVMSG $amsg :\[ #war.cs \] \[ $nrplayers \] \[ server: $server \] \[ $map \] \[ $skilled  \] \[ extra: $extra \] \[ /msg $nick \]"
}
}

putlog "---------------"
putlog "Relay01 LOADED"
putlog "SCRIPT BY YOURI"
putlog "---------------"

ty for looking
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

Code: Select all

proc amsg { args } {
foreach channel [channels] {
putquick "PRIVMSG $channel :$args"
}
}
Y
Youri
Voice
Posts: 6
Joined: Tue Feb 08, 2005 7:03 am

Post by Youri »

Where must i paste that?
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

put it around the lines you want to be amsg. the putquick line should be replaced with your code.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
Locked