DragonPrime - LoGD Resource Community
Welcome Guest
  • Good evening, Guest.
    Please log in, or register.
  • September 25, 2017, 08:41:22 PM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: why is badguy healing itself??  (Read 2176 times)
0 Members and 1 Guest are viewing this topic.
sixf00t4
Mod God
*****
Offline Offline

Posts: 1916



View Profile WWW
« on: March 29, 2004, 07:44:24 PM »

i swear it was working yesterday....but now the blasted things are healing themselves!  this is basically a modded version of thieves.

Code:
<?
require_once "common.php";
page_header("Monkey Fight");
output("The Witch calls for her flying monkeys to attack you first!");
   $dkb = round($session['user']['dragonkills']);
   $badguy = array(
   "creaturename"=>"`\$Flying monkeys`0",
   "creaturelevel"=>$session['user']['level']+1,
   "creatureweapon"=>"teeth and claws",
   "creatureattack"=>$session['user']['attack'],
   "creaturedefense"=>$session['user']['defence'],
   "creaturehealth"=>round($session['user']['maxhitpoints']*0.8,0),
   "diddamage"=>0);
   $session[bufflist]['monkeys'] = array(
   "startmsg"=>"`n`^You are surrounded by flying monkeys with sharp teeth and claws!`n`n",
   "name"=>"`%biting",
   "rounds"=>15,
   "wearoff"=>"The monkeys fly away.",
   "minioncount"=>$session['user']['level'],
   "mingoodguydamage"=>0,
   "maxgoodguydamage"=>1+$dkb,
   "effectmsg"=>"A monkey bites you for {damage}.",
   "effectnodmgmsg"=>"A monkey tries to bite you but MISSES.",
   "effectfailmsg"=>"Your weapon wails as you deal no damage to your opponent.",
   "activate"=>"roundstart",
   );
   $session['user']['badguy']=createstring($badguy);
   $session['user']['specialinc']="noslippersmonkeys.php";
   $_GET['op']="fight";


if ($_GET['op']=="run"){
   output("There are too many flying monkeys blocking the way now, you have no chance to run!");
   $_GET['op']="fight";
   }
if ($_GET['op']=="fight"){
   $battle=true;
   }
if ($battle){
   include("battle.php");
   $session['user']['specialinc']="noslippersmonkeys.php";
   if ($victory){
      $badguy=array();
      $session['user']['badguy']="";
      output("`n`\$Wicked Witch of the West's`6 flying monkeys lay slain at your feet.");
      unset($session[bufflist]['monkeys']);
      addnav("Continue","noslipperswitch.php");
      $session['user']['specialinc']="";
      }elseif ($defeat){
      unset($session[bufflist]['monkeys']);
      $badguy=array();
      $session[user][badguy]="";
      output("`n`\$Wicked Witch of the West's`6 flying monkeys have killed you.");
      addnav("Continue","news.php");
      $session['user']['specialinc']="";
      }else{
        fightnav(true,true);
      }
   }
   page_footer();
?>
Logged

lonnyl
Guest
« Reply #1 on: March 30, 2004, 04:32:29 AM »

You need to isolate the badguy setup

$dkb = round($session['user']['dragonkills']);
   $badguy = array(
   "creaturename"=>"`\$Flying monkeys`0",
   "creaturelevel"=>$session['user']['level']+1,
   "creatureweapon"=>"teeth and claws",
   "creatureattack"=>$session['user']['attack'],
   "creaturedefense"=>$session['user']['defence'],
   "creaturehealth"=>round($session['user']['maxhitpoints']*0.8,0),
   "diddamage"=>0);
   $session[bufflist]['monkeys'] = array(
   "startmsg"=>"`n`^You are surrounded by flying monkeys with sharp teeth and claws!`n`n",
   "name"=>"`%biting",
   "rounds"=>15,
   "wearoff"=>"The monkeys fly away.",
   "minioncount"=>$session['user']['level'],
   "mingoodguydamage"=>0,
   "maxgoodguydamage"=>1+$dkb,
   "effectmsg"=>"A monkey bites you for {damage}.",
   "effectnodmgmsg"=>"A monkey tries to bite you but MISSES.",
   "effectfailmsg"=>"Your weapon wails as you deal no damage to your opponent.",
   "activate"=>"roundstart",
   );
   $session['user']['badguy']=createstring($badguy);
   $session['user']['specialinc']="noslippersmonkeys.php";
   $_GET['op']="fight";

in a
if ($_GET[op] == ""){

}
so that it does not re-set him up each and every time the file loads.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Please take the time to read the FAQ and browse the DragonPedia

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
33 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search