$pi <- a hidden id in mirc return the pi number.
3.14159265358979323846
xD
;- prop's
; cir -> with a diameter get a perimeter of a circle (diam)
; rad -> with a radius get a perimeter of the diameter
; sqr -> perimeter of a square with a side.
;- no prop -> get any perimeter of a polygon.
;- - - - - - - - - by dashh xD
alias perimeter {
if ( $prop = cir ) { return $calc($1 * $pi) }
if ( $prop = rad ) { return $calc((2 * $pi) * $1) }
if ( $prop = sqr ) { return $calc(4 * $1 ) }
return $calc($replace($remove($1-,+,-),$chr(32),$chr(43)))
}
mmmm a lot of nicklist item. maybe u can make that in a remote file with a only get_in(item) or a menu submenu loops (see help)
help example:
menu status {
Animal
.$submenu($animal($1))
}
alias animal {
if ($1 == begin) return -
if ($1 == 1) return Cow:echo Cow
if ($1 == 2) return Llama:echo Llama
if ($1 == 3) return Emu:echo Emu
if ($1 == end) return -
}
looks that.
two /mode is not necesary
;- /testt +i
alias testt {
if ( $nick != $me ) {
if (-* iswm $1) || (+* iswm $1 ) {
echo -a * /mode $chan $+($iif($v1 = -,+,-),$remove($1,-,+)) $2-
}
}
}
and
alias mlock {
%lock = $iif(%lock = 0,1,0)
$iif(%lock = 0,.disable,.enable) #lock | /echo -a Mlock $iif(%lock = 0,off. modes unlocked,on. modes lock)
}
if (%color == 1) { set %color !red }
if (%color == 2) { set %color !blue }
if (%color == 3) { set %color !green }
use $replace(%color,1,!red,2,!blue,3,!green)
=)
if ($1 == !red) {
kick $chan %kicknick 4(((~~~~~KABOOOOOMMM!!!!~~~~~))) You just pick up the wrong wire!
.timers off
unset %kicknick
unset %bomber
}
if ($1 == !yellow) {
kick $chan %kicknick 4(((~~~~~KABOOOOOMMM!!!!~~~~~))) You just pick up the wrong wire!
.timers off
unset %kicknick
unset %bomber
}
if ($1 == !green) {
kick $chan %kicknick 4(((~~~~~KABOOOOOMMM!!!!~~~~~))) You just pick up the wrong wire!
.timers off
unset %kicknick
unset %bomber
}
U dont need repeat the same code.
U can use -> ( test isin test hola hello )
($1 isin !red !blue !green !something)
or
$istok(!red !blue !green,$1,32)
or
$pos(!red!blue!green,green) <-
easy way.
$chr(tokenNumber) $replace($remove(string,$chr(tokennumber) ),$chr(32),$chr(32) $+ $chr(tokenNumber))
$chr(35) $+ $replace($remove(lol lal #lol #test,$chr(35)),$chr(32),$chr(32) $+ $chr(35))
;--
#lol #lal #lol #test
x.x i dont like regex here is.. bla. mirc 6.16 is the best ;D
alias ctest {
var %t = $ticks, %x = 100, %test
while ( %x ) {
%test = $chr($2) $+ $replace($remove($1,$chr($2) ),$chr(32),$chr(32) $+ $chr($2))
dec %x
}
return simple. Time: $calc($ticks - %t) %test
}
nice..
//echo -a * $ctest(tehis #is a #test asd asd a #as asd # asd # asd ## a as a a aa sd a asd a asd a asd as asd asd asd asd asd as asd as dasd asd asdasd # asd a # asd # asda a # asd #asd as #a #asd #asda #reasa #adsaa #asd #asdae as asd a sdas asd as asd asd asd ad,35)
* simple. Time: 41 #tehis #is #a #test #asd #asd #a #as #asd #asd #asd # #a #as #a #a #aa #sd #a #asd #a #asd #a #asd #as #asd #asd #asd #asd #asd #as #asd #as #dasd #asd #asdasd #asd #a #asd #asda #a #asd #asd #as #a #asd #asda #reasa #adsaa #asd #asdae #as #asd #a #sdas #asd #as #asd #asd #asd #ad
40-43ms. basic code.
;- if any nick kick 4 nicks in a room.
On *:KICK:#: {
inc -u4 %kick. [ $+ [ $chan ] ]
if (%kick. [ $+ [ $chan ] ] == 4) {
; here put what do u like.
; /mode $chan +i
; /mode $chan +b $address
; /kick $chan $nick 0,1Excessive Kicks Detected.
}
}
; if u want replace the chan id for nick id.
; when a nickuser kick 4 nick in a row. the other way inc any user.
nice but...
inc %OKP [ $+ [ $nick [ $+ [ $knick ] ] ] ]
if ( %OKP [ $+ [ $nick [ $+ [ $knick ] ] ] ] == 4 ) {
/set %overkicker $nick
/msg $chan 4 WARNING 1 >> 0,4 $nick kicks $knick 4 times %logo
}
.timer. [ $+ [ $nick [ $+ [ $knick ] ] ] ] 1 60 unset %OKP [ $+ [ $nick [ $+ [ $knick ] ] ] ]
timer is inecesary.
set / vars ( like some inc ) have a auto unset timer
set -uN xD
inc -u60 %OKP [ $+ [ $nick [ $+ [ $knick ] ] ] ]
;- so
if ( %OKP [ $+ [ $nick [ $+ [ $knick ] ] ] ] == 4 ) {
/set %overkicker $nick
/msg $chan 4 WARNING 1 >> 0,4 $nick kicks $knick 4 times %logo
}
inc -u60 %OKP [ $+ [ $nick [ $+ [ $knick ] ] ] ]
and this.
if ( $nick isin Serv Sevr bot b0t ) { /msg #warfight 7 $nick $+ , BOT is not allowed to contest... | halt }
;if u want use istok or some thing.
mmm.. text file make the kick slower.
Windows -h and aline is the most fast way. or if u prefered hash tables xD.
if ($read(kicklist.txt, s, $knick)) {
set %kicklist.count $read(kicklist.txt, s, $knick)
if ($read(kicklist.txt, s, $knick)) {
set %kicklist.count $v1
or
if ($read(kicklist.txt, s, $knick)) {
set %kicklist.count $calc($v1 +1)
; %kicklist.count = $v1 + 1
u dont need repeat the same routine xD
but is very useful snippet, nice job.
if the user changue nick, u lost everything. make with gate/address
($address or $ial)
in irc servers that's works fine with only nickname, but some servers dont use your hostname or gate "nick!randgate@bla.server and make a random gate or something when you register.
And u can use the ignore identify (see help for usage)
;- if ( !$ignore( gate here.. or nick or something ) ) { .. }
xD
-> Neptune
if %price !isnum <---
You put 32,000 <- here is a token "," isnum return true when is only numbers.
=)
try $remove(%price,$chr(36),$chr(46),$chr(44)) <-
!sell lol $32,000.000 = 32000000
^^
alias test {
%price = $remove($1,$chr(36),$chr(46),$chr(44))
if ( %price !isnum ) {
echo -a %price
}
else {
echo -a %price
}
;unset %price
}