Toribash
Re: mIRC: Battle Script v1
Ah.

Funny thing is, that might just be why it was running things it wasn't supposed to anymore...

I'll have to check to make sure I save.
Re: mIRC: Battle Script v1
Zeroth, can you also post how to add finishers? im a newb and last time i tried i broke it D:


[T]
#hi


Re: mIRC: Battle Script v1
No problem, Ishi

Finishers:

In order to do this, we will be modifying a line or two of the existing code:

/attack {
/set -e %hit $read(hit.txt)
/dec -e %health %hit
if (%health <= 0) {
%health = DEAD!
/timer1 1 5 /kick # %enemy DEAD!
}
/me $read(weapons.txt) %enemy - %hit dmg ~ total HP: %health
}
// End Battle Script

Now, what we need to do is code a "finisher move", meaning the killing move on a person. To do so, we will load a finisher move from a separate file called "finisher.txt". You should make that now, the same as weapons.txt, but with moves that would kill some one (for example: decaps or summoning dragons). Now for the code modifications. Replace /attack with:
/attack {
/set -e %hit $read(hit.txt)
/dec -e %health %hit
if (%health <= 0) {
%health = 4Dead! Train harder and come back!
/timer1 1 5 /kick # %enemy %health
}
if (%health <= 0) /me $read(finishers.txt, p) %enemy health
else /me $read(weapons.txt, p) enemy - $hit dmg ~ total HP: %health

}

Now before you say the attack, the code first finds your health after attack. If it is less than or equal to 0, you are dead, so it reads from "finishers.txt", if otherwise (else) you read the normal attack! Simple as that.
Re: mIRC: Battle Script v1
Reworkin the script, i'll post a tutorial on how to make my version that includes Levels, Wild monsters, Items and more!

(don't download attached i just need it to work on at home)


// Battle Script 1.0
/resetall {
/set %level 1
/set %exp 0
/set %chealth 100
/set %str 1
/set %MAXHP 100
/me All Char Veriables reset
}
/resetalle {
/unset %elevel
/unset %health
/unset %def
/unset %edmg
/unset %enemy
}
/resetlvl {
/set %level 1
/say Level: %level
}
/resetexp {
/set %exp 0
/say EXP: %exp
}
/resethealth {
/set %chealth 100
/set %MAXHP 100
/say Max Health: %MAXHP
}
/resetstr {
/set %str 1
/say Strength: %str
}
/stat {
/say Level: %level EXP: %exp Health: %cHealth / %MAXHP Strength: %str
}
/sb {
/set -e %health $$2
/set -e %enemy $$1
/me Shapeshifts into Metal VoX and Chalenges $1! | /say 2Health set to3 $2
}
/attack {
/set -e %hit $read(battle/hit.txt)
/dec -e %hit %def
/inc -e %hit %str
/dec -e %health %hit
if (%health <= 0) {
%health = 4PWND!
/set -e %LLL 2
/inc %exp $read(battle/expadd.txt)
}
if (%exp >= 100) {
/dec %exp 100
/inc %level 1
/inc %MAXHP $read(battle/hlthadd.txt)
/inc %str $read(battle/stradd.txt)
/set -e %LLL 1
}
if (%LLL == 1) {
/me Uses the ultimate ban kick attack! | /say Hits for oVeR NInETHOUSSSAANNNNDDDDDDDD | /say ^^LEVEL UP^^ Max Health: %cHealth Str: %str
/set -e %LLL 0
/set %enemy VOID
/set %Health 9999999
else if (%LLL == 2 ) {
/me Uses !!Final Flash!! | /say %enemy was %health
/set -e %LLL 0
/set %enemy VOID
/set %Health 9999999
}
else {
/me $read(weapons.txt) %enemy 3- %hit dmg. 6~3 total HP: %health
/set -e %LLL 0
}
}
}
/Wild {
/set -e %enemy $read(battle/rndenemy.txt)
/set -e %health $read(battle/health.txt)
/set -e %elevel $read(battle/elevel.txt)
/inc -e %elevel $level
/dec -e %elevel $read(battle/lvlc.txt)
%elevel + %level
/dec %elevel $read(battle/lvlc.txt)
/me $read(battle/encounter.txt) a Wild %enemy ! | /say %enemy has %health Health and is Level %elevel | /say is level: %level with %Chealth Health
/set -e %def %elevel
/set -e %edmg %elevel
/inc -e %edmg $read(ehit.txt)
/timer1 0 3 /dec %chealth %edmg
/timer2 0 3 /me is hit by %enemy for %edmg dmg. 2~3 HP: %chealth / %MAXHP
if (%health <= 0) {
/timer1 off
/timer2 off
}
if (%cHealth <= 0) {
/timer1 off
/timer2 off
/me Is Dead!
/dec %level 1
/me has lost 1 level!
}
}

// End Battle Script