*/
alias -l htmlfree {
var %x = "", %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x, )
return %x
}
alias priceconfig {
echo -a * *********************************
echo -a * To set price options use the following commands:
echo -a * /priceall <on $+ $chr(124) $+ off> - Allows the use of the "all" trigger. (.price -a rune set returns rune (g) set, rune (t) set, and rune set.) Default is off due to flooding issues.
echo -a * /pricecolor <color1 color2 color3> - Sets colors of the output text. Default is 14 07 15 (looks like: 14Santa Hat:07 25,000,000gp |15 zybez.net)
echo -a * *********************************
}
alias priceall {
if ($1 == on) { set %priceall on | echo -a * Price All is now set to "on" | return Price All = On }
elseif ($1 == off) { set %priceall off | echo -a * Price All is now set to "off" | return Price All = Off }
else { echo -a * Invalid Syntax. Either /priceall on or /priceall off. | return Invalid Syntax }
}
alias pricecolor {
if ($len($1) == 2) && ($len($2) == 2) && ($len($3) == 2) && ($1 isnum) && ($2 isnum) && ($3 isnum) && ($1 <= 15) && ($2 <= 15) && ($3 <= 15) {
set %c1 $1 | set %c2 $2 | set %c3 $3
echo -a * Colors Set. Output will now look like below:
echo -a * $+ %c1 Santa Hat: $+ %c2 25,000,000gp $chr(124) $+ $+ %c3 zybez.net
}
else {
echo -a * Invalid color selection. Please use two digit color codes from 01 to 15.
}
}
;Do not change priceappend. Zybez will break the script again if you do. Feel free to shorten it, but give credit to zybez ALWAYS.
;if it breaks again because of this, I wont release a new update.
alias priceappend {
return $+(,%c3,,http://zybez.net)
}
on *:TEXT:!price*:#: {
if (%price.busy != $null) { .notice $nick 3[14Nwh_Hooligan3] Sorry but %price.busy is already using this command... please wait 3 seconds and try again. | halt }
set -u3 %price.busy $nick
write -c pricedownload.txt
if ($2 == -a) {
set %priceflag $2
set %rs.item $replace($3-,$chr(32),$chr(43))
}
else {
set %rs.item $replace($2-,$chr(32),$chr(43))
}
set %pricenick $nick
set %msg.type private
price
}
on *:TEXT:!pprice*:#: {
if (%price.busy != $null) { .notice $nick 3[14Nwh_Hooligan3] Sorry but %price.busy is already using this command... please wait 3 seconds and try again. | halt }
set -u3 %price.busy $nick
write -c pricedownload.txt
if ($2 == -a) {
set %priceflag $2
set %rs.item $replace($3-,$chr(32),$chr(43))
}
else {
set %rs.item $replace($2-,$chr(32),$chr(43))
}
set %pricechannel $chan
set %pricenick $nick
set %msg.type public
price
}
alias pricemsg {
if (%priceall == on) && (%priceflag == -a) {
var %itemnamecount 1
var %pricecount 2
while ($read(pricedownload.txt,1)) {
var %itemname $read(pricedownload.txt,1))
var %price $read(pricedownload.txt,2)
var %output $+ %c1 $+ %itemname $+ : $+ %c2 %price $+ %type $chr(124) $+ $+ %c3 $priceappend
if (spelling isin $read(pricedownload.txt,1)) { notice %pricenick 07Your search did not return any results. Please make sure your spelling is correct and that you are typing full words. | halt }
if (%msg.type == private) { notice %pricenick 3[14Nwh_Hooligan3] %output }
elseif (%msg.type == public) { msg %pricechannel 3[14Nwh_Hooligan3] %output }
else { msg %pricechannel Error. Please eat a sock. }
write -dl 1 pricedownload.txt
write -dl 1 pricedownload.txt
}
}
else {
var %itemname $read(pricedownload.txt,1)
var %price $read(pricedownload.txt,2)
var %output $+ %c1 $+ %itemname $+ : $+ %c2 %price $+ %type $chr(124) $+ $+ %c3 $priceappend
if (spelling isin $read(pricedownload.txt,1)) { notice %pricenick 07Your search did not return any results. Please make sure your spelling is correct and that you are typing full words. | halt }
if (%msg.type == private) { notice %pricenick 3[14Nwh_Hooligan3] %output }
elseif (%msg.type == public) { msg %pricechannel 3[14Nwh_Hooligan3] %output }
else { msg %pricechannel Error. Please eat a sock. }
}
unset %priceflag
}
alias price sockclose price | sockopen price zybez.net 80
on *:sockopen:price:{
sockwrite -n $sockname GET /priceguide.php?search_terms= $+ %rs.item $+ &search_area=1&price_low=&price_high=&member=1&Search HTTP/1.1
sockwrite -n $sockname Host: www.zybez.net $+ $crlf $+ $crlf
}
on *:sockread:price:{
if ($sockerr) {
echo -a Error.
halt
}
else {
sockread %temp
if ($regex(%temp,/^<!--name/)) || ($regex(%temp,/^<!--price/)) {
write pricedownload.txt $htmlfree($replace(%temp,& $+ $chr(59),&))
timerSOCKET 1 1 pricemsg
}
}
}
on *:sockclose:price:{
}
On @*:Text:!VoicePlz:#: {
mode $chan +v $nick
msg $chan 14There's your voice,07 $nick $+ .
}
on *:TEXT:!Respect:#: { /nick PwNeR_Of_YoU } { /msg $chan 14Your Ass Is Mine!!!! } { /msg $chan 7Hmm...Give Respect To Nwh_Hooligan and I won't kick your ass okay? }
}
##
#PM block or accept script
#By n_y_f_i/k0nv1kt3d
#I have tested this but if any bugs/errors are found please leave a #comment here.
##
on ^*:OPEN:?: {
if (%no.more.pm [ $+ [ $nick ] ] == no1) {
halt
}
}
on *:OPEN:?: {
if (%message.declined [ $+ [ $nick ] ] == no2) {
msg $nick 14You have been asked 4NOT14 to PM me after having your PM declined, you are now on my ignore list. I will not recive any more PM's from you.
close -m $nick
set %no.more.pm [ $+ [ $nick ] ] no1
halt
else
}
msg $nick 14Please wait for your message to be 4accepted14 or 4declined14.
echo -a 06/07!0611MESSAGE06/07!0604 $nick 14has messaged you saying:4 $1- $+ 14, Type /acc $nick or /dec $nick $+ .
set %message.waiting $nick
}
alias acc {
if (%message.waiting != $null) {
msg %message.waiting 14Message has been 4accepted14.
unset %message.waiting
}
}
alias dec {
if (%message.waiting != $null) {
msg %message.waiting 14Message has been4 declined.
timermss 1 1 msg %message.waiting 14This means you either have not asked to pm me or you do not have permission to.
timermsf 1 3 msg %message.waiting 14If you continue to PM me without permission you will automatically be put on my ignore list.
set %message.declined [ $+ [ %message.waiting ] ] no2
close -m %message.waiting
unset %message.waiting
}
}
alias del {
if ($1 == $null) {
echo -a 14Please enter a name you delete from your ignore list if there.
halt
else
}
if (%no.more.pm [ $+ [ $1 ] ] == $null && %message.declined [ $+ [ $1 ] ] == $null) { HALT }
else {
unset %no.more.pm [ $+ [ $1 ] ]
unset %message.declined [ $+ [ $1 ] ]
echo -a 14The nick "04 $+ $1 $+ 14" has been deleted from your ignore list.
}
}