Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias fight.beta {
- if ($dq.fight.get(amnt,$1) < 0) {
- return $logo(Travel) You have nothing to fight; type $s1(!) $+ Travel
- }
- else {
- var %who, %e1, %e2, %h1, %h2, %hit, %hhp, %sql, %heal
- %who = $iif($calc($dq.user.get(agility,$1) * $r(0,255)) < $calc($dq.pvm(agi,$dq.fight.get(enemy,$1)) * $r(0,255)),enemy,hero)
- if (%who == enemy) goto enemy
- if (%who == hero) goto hero
- :enemy
- if ($dq.s($1).def >= $dq.pvm(att,$dq.fight.get(enemy,$1))) {
- %e1 = 0
- %e2 = $floor($calc(($dq.pvm(att,$dq.fight.get(enemy,$1)) + 4) /6))
- %hit = $r(%e1,%e2)
- }
- elseif ($dq.s($1).def < $dq.pvm(att,$dq.fight.get(enemy,$2))) {
- %e1 = $floor($calc(($dq.pvm(att,$dq.fight.get(enemy,$1)) - $dq.s($1).def /2) /4))
- %e2 = $floor($calc(($dq.pvm(att,$dq.fight.get(enemy,$1)) - $dq.s($1).def /2) /2))
- %hit = $r(%e1,%e2)
- }
- msg $chan $logo(Travel) $s2($dq.fight.get(enemy,$1)) attacks, hitting $s2($dq.title($2)) for $s2(%hit) $+ . $&
- $iif(%hhp < 1,Oh Dear $+ $chr(44) $s2($2) has died. $s2($2) looses $s3(%ml $+ G) $+ .)
- goto hero
- halt
- :hero
- var %crit = $rand(1,32)
- if (%crit > 1) {
- %h1 = $floor($calc(($dq.s($1).att - $iif($dq.pvm(agi,$dq.fight.get(enemy,$1)),$v1,$dq.s($dq.fight.get(enemy,$1)).def) /2) /4))
- %h2 = $floor($calc(($dq.s($1).att - $iif($dq.pvm(agi,$dq.fight.get(enemy,$1)),$v1,$dq.s($dq.fight.get(enemy,$1)).def) /2) /2))
- %h1 = $iif(%h1 < 1,$r(0,1),$v1)
- %h2 = $iif(%h2 < 1,$r(0,1),$v1)
- %hit = $r(%h1,%h2)
- }
- else {
- %h1 = $floor($calc($dq.s($1).att /2))
- %h2 = $dq.s($1).att
- %hit = $r(%h1,%h2)
- }
- msg $chan $logo(Travel) $iif(%crit = 1,Critical Hit!) $s2($dq.title($1)) attacks, hitting $s2($dq.fight.get(enemy,$1)) for $s2(%hit) $+ . $&
- $iif($dq.fight.get(amnt,$1) = 0,$s2($1) is victorious!) $iif(%death,$iif(%xp != 0,Earned $s2(%xp) EXP and) $iif(%xp = 0,Obtained,obtained) $s3(%gold $+ G) $+ .) $&
- $iif(%gt >= 89,$s2(%enemy) had a $s2(Torch) on it you pack it away.,$iif(%gt >= 99,$s2(%enemy) had a $s2(Mini Medal) on it you pack it away.))
- goto enemy
- halt
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement