DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • August 20, 2019, 11:44:04 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Resource Pages

Pages: [1]   Go Down
Author Topic: Help with battle during special event  (Read 3384 times)
0 Members and 1 Guest are viewing this topic.
« on: June 30, 2004, 09:01:22 AM »

I took roberts basic Rogue Warrior script and re-made it to suit my purposes..
It worked right up until I had defeated the demon.. then it just stoped.. it didnt give me any of the rewards I had hoped it would.. any ideas?

Code: http://psykfall.de/dslayer.txt
« Reply #1 on: June 30, 2004, 09:12:34 AM »

You need to keep your specialinc set.
You don't want to have $session['user']['specialinc']="" until you are completely done with the special, and ready to go back to the forest.
after the
if ($fight){
   include "battle.php";

remove your  $session[user][specialinc]="";
If that doesn't fix the problem, try the one following that as well, but I think that should do it.
« Reply #2 on: June 30, 2004, 09:44:08 AM »

This is what is looks like now: http://psykfall.de/dslayer2.txt

But it still ends right after the fight:
You have encountered the Demon which lunges at you with Large Axe!
Level: 4
Start of round:
the Demon's Hitpoints: 37
YOUR Hitpoints: 30
Your stallion fights with you!
You hit the Demon for 187 points of damage!
You have slain the Demon!
You receive 0 gold!
You receive 0 total experience!
~ Flawless Fight! ~~
You receive an extra turn!

Also, I cant figure out why he's just called "the Demon"..
« Reply #3 on: June 30, 2004, 09:56:40 AM »

After the include "battle.php", try adding a $session['user']['specialinc']="dslayer.php"; right before if ($victory).
That will tell it to use your special's victory code, instead of the default victory code from forest.php.
In both the "if ($victory)" and "elseif ($defeat)" sections, you will need the $session['user']['specialinc']=""; lines (I see they are currently there and commented out, from what I had told you above).
I checked with a similar code that I have, and feel confident that these changes will get you back on track. Wink
« Reply #4 on: June 30, 2004, 10:32:20 AM »

I tried running this stripped version: http://psykfall.de/ftest.txt
But I still get the same result which is really puzzling me  Shocked
« Reply #5 on: June 30, 2004, 10:39:37 AM »

Problem solved! Thanks for your help Voratus.

19:34 <@harv>  if ($_GET['op'] == "fight1") {
19:34 <@harv>             $fight=true;
19:34 <@harv> it doesn't go into that if
19:34 <@harv> changing to "fight" and it works

Next problem: Why does he get called "the Demon" instead of "<random name> the Demon" ?
« Reply #6 on: June 30, 2004, 10:58:37 AM »

In this line:

$rnd_dname = array("Kzlog","Zlad","Bork","Rauger","Borslack","Blob","Yrtox","Bill");

try specifying the first key like so:

$rnd_dname = array(0=>"Kzlog","Zlad","Bork","Rauger","Borslack","Blob","Yrtox","Bill");

-- your code looks right to me for that but I may be sleepy or php may be picky.
« Last Edit: June 30, 2004, 11:01:05 AM by Artte » Logged
Pages: [1]   Go Up
Jump to:  

DragonPrime Notices
Welcome to DragonPrime - The LoGD Resource Community!

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