Army script - i give the idea, you elaborate on it, gave up on this a long time ago. it works tho.
on *:TEXT:!money:#: {
$iif(!$Readini(army.ini, $nick $+ , money),writeini army.ini $nick money 1000)
msg $chan $nick has $Readini(army.ini, $nick $+ , money) dollars
}
on *:TEXT:!Declare war*:#: {
if ( $3 ison $chan ) && ( $readini(army.ini, $nick, war) != on ) && ( $readini(army.ini, $nick, Soldiers)) {
echo $active 1
if ( Readini(army.ini, $3, soldiers) == $null ) || (Readini(army.ini, $3, health) == $null ) { goto 2 }
msg $chan $nick has declared war against $3 $+ !
writeini -n army.ini $3 wara $nick
halt
:2
echo $active 2
.notice $nick $3 does not meet the requirements to engage in war.
halt
}
else { .notice $nick You do not meet the requirements to declare war. }
}
on *:TEXT:!*infantry:#: {
if ( $Readini(army.ini, $nick, war) != off ) {
if ( $readini(army.ini, $nick, attacking) != on ) {
var %oppenent $Readini(army.ini, $nick, war)
var %damage $calc($readini(army.ini, $nick,attack) + $rand(10,35) )
msg $chan $nick has sent infantry at %oppenent $+ !
var %health $calc( $readini(army.ini, %oppenent, health) - %damage)
writeini army.ini %oppenent health %health
set %Player1 $nick
Set %player2 %oppenent
set %chan $chan
writeini army.ini $nick Attacking on
.timer $+ $nick $+ 2 1 26 deathcheck
.timer $+ $nick $+ 3 1 25 writeini army.ini $nick Attacking off
.timer $+ $nick 1 25 msg $chan $nick $+ 's infantry deals %damage damage leaving %oppenent with $readini(army.ini, %oppenent,health) health
}
else { notice $nick you are already attacking | halt }
}
else { .notice $nick you are not having a war with anyone }
}
alias deathcheck {
if ( $readini(army.ini, %player1, health ) <= 0 ) { goto die }
if ( $readini(army.ini, %player2, health ) <= 0 ) { goto die2 }
halt
:die
var %mgain $rand(500,2000)
var %magain2 $calc(%mgain + $readini(army.ini %player2 money))
writeini army.ini %player2 money %mgain2
msg chan %player2 has defeated %player1 $+ 's army and gotten %mgain dollars!
writeini army.ini %player1 war off
writeini army.ini %player2 war off
halt
:die2
var %mgain $rand(500,2000)
var %magain2 $calc(%mgain + $readini(army.ini, %player1, money))
writeini army.ini %player1 money %magain2
msg %chan %player1 has defeated %player2 $+ 's army and gotten %mgain dollars!
writeini army.ini %player1 war off
writeini army.ini %player2 war off
halt
}
on *:TEXT:!accept war:#: {
if ( $Readini(army.ini, $nick, wara) != $null ) {
$Readini(army.ini, $nick, war)
writeini -n army.ini $nick Health 100
writeini -n army.ini $Readini(army.ini, $nick, wara) Health 100
msg $chan $nick has acceped the war declared by $Readini(army.ini, $nick, wara)
writeini -n army.ini $Readini(army.ini, $nick, wara) war on
writeini -n army.ini $nick war $Readini(army.ini, $nick, wara)
writeini -n army.ini $Readini(army.ini, $nick, wara) war $nick
}
else { $iif($readini(army.ini, $nick, wara) == $null,notice $nick no one has declared war with you.,notice $nick you do not have an army.) }
}
on *:TEXT:!army*:#: {
if (!$Readini(army.ini, $iif($2,$2,$nick) $+ , soldiers)) {
if ( $Readini(army.ini, $nick $+ , soldiers)) {
msg $chan $iif($2,$2,$nick) has no soldiers.
}
if (!$2) {
writeini -n army.ini $nick soldiers 100
writeini -n army.ini $nick Health 100
writeini -n army.ini $nick Attacking off
msg $chan $nick has gotten 100 soilders
}
}
else { msg $chan $iif($2,$2,$nick) has $Readini(army.ini, $iif($2,$2,$nick) $+ , soldiers) soldiers
}
}
on *:TEXT:!buy *:#: {
if ( $2 == soldiers ) {
if ( $3 isnum ) {
if ( $Readini(army.ini, $nick $+ , money) >= $calc( $3 * 100 )) {
var %num $3
var %cost $3
var %money $Readini(army.ini, $nick $+ , money)
dec %money $calc( $3 * 100 )
writeini -n army.ini $nick money %money
var %soldiers $readini(army.ini, $nick $+ , soldiers)
inc %soldiers %num
writeini -n army.ini $nick soldiers %soldiers
}
else { .msg $chan You do not have enough money }
}
else { .msg $nick syntax is !buy <soldiers> <Number> }
}
if ( $2 == nuke ) {
if ( $readini(army.ini, $nick, money) >= 1000 ) {
var %money $readini(army.ini, $nick, money)
dec %money 5000
writeini army.ini $nick money %money
writeini army.ini $nick nuke Yes
msg $chan $nick has bought a bomb!
}
else { .notice $nick you do not have enough money }
}
}
on *:TEXT:!nuke:#: {
if ( $Readini(army.ini, $nick, war) != off ) && ( $readini(army.ini, $nick, war) != on ) {
if ( $readini(army.ini, $nick, nuke) == yes ) && ( $readini(army.ini, $nick, attacking) != on ) {
var %oppenent $Readini(army.ini, $nick, war)
var %damage $calc($readini(army.ini, $nick,attack) + $rand(30,45) )
msg $chan $nick has planted a bomb for %oppenent $+ !
var %health $calc( $readini(army.ini, %oppenent, health) - %damage)
writeini army.ini %oppenent health %health
set %Player1 $nick
Set %player2 %oppenent
set %chan $chan
writeini army.ini $nick Attacking on
.timer $+ $nick $+ 2 1 36 deathcheck
.timer $+ $nick $+ 3 1 34 writeini army.ini $nick Attacking off
.timer $+ $nick 1 35 msg $chan $nick $+ 's bomb deals %damage damage leaving %oppenent with $iif($readini(army.ini, %oppenent,health) <= 0,0,$readini(army.ini, %oppenent,health)) health
}
else { notice $nick you are already attacking | halt }
}
else { .notice $nick you are not having a war with anyone }
}
This is the rainbow script i made for fun
f4 { editbox -n /msg $active 1,1 $+ $regsubex($editbox($active),//g,$+($chr(03),$r(0,1),$r(2,9))) }
it does what yours does, but more efficiently just type as you normally would, but use f4 as an enter key.
My more complete one:
rainbow {
var %rbo 1 , %rb 2 , %txa
var %ot $replace($1-,$chr(32),Š) , %rt 1 , %rb $r(2,14)
while (%rbo < $calc($len(%ot) + 1 )) {
if (%rb > 15) %rb = 2
%txa = %txa $+ $($chr(3) $+ %rb) $+ $mid(%ot,%rbo,1)
inc %rbo
inc %rb
}
msg $active $replace(%txa,Š,$chr(32))
}
this cycles through the colors, so its a true rainbow effect.
also, for the theme I made and use, I use this grammar correction, VERY correct, and works great:
alias wwwww return who what where when why how did will would
alias rere {
var %x = $1-
tokenize 32 $1- $+ $iif($1 isalpha,$iif($right($1-,1) !isin $chr(63) $chr(44) $chr(59) :"'!.^][{}(),$iif($1- === $upper($1-),!,$iif($istok($wwwww,$1,32),?))))
return $iif(%x isupper,$upper($1-),$sentance($1-))
}
- /msg: insufficient parameters (line 22, script1.ini)
(11.08.05) hmm
(11.08.13) ?
(11.08.17) -> This script.
¦|¦|¦|¦|¦|¦|¦|¦| This not found on server. ¦|¦|¦|¦|¦|¦|¦|¦
Also, turning the rainbow talk on as well as the grammar won't work.
It could just be clashing with another script of mine, but...when I loaded it:
Thank you for flying Termz airlines ;] hope you like the darkest script :D! 11,0¦|0,11¦|12,11¦|11,12¦|2,12¦|12,2¦|1,2¦|2,1¦|11,1 12,1I was using 12D12,14arkest 12S12,14cript 2,1|¦1,2|¦12,2|¦2,12|¦11,12|¦12,11|¦0,11|¦11,0|¦
is unknown mode char to me1 is unknown mode char to me
2 is unknown mode char to me
{ is unknown mode char to me
is unknown mode char to me
1 is unknown mode char to me