Fight.php Problem       Back to File List | Edit This File

Fight.php Problem - Click to Download
Submitted by Dradaki on 01.21.2010 (684 Downloads)
I am altering the fight.php page to use stats that will be assigned to monsters for each battle. The way I have this set up is I am using generally 80% to 100% of char stats to be monster stats (100 str for a char is 80-100 str for any given monster). I have it so when a monster comes up, these stats are written into the respective database section, like monster strength is written in $monsterrow["strength"].

My prob is this. I am using a stat called evasion, which I am using to determine fleeing probability. The code for the flee is this:

       $chancetorun = rand(4,10) + ceil(sqrt($userrow["evasion"]));
       if ($chancetorun > (rand(10,15) + ceil(sqrt($monsterrow["evasion"])))) { $chancetorun = 1; } else { $chancetorun = 0; }

Now I have it set up for now that the monster evasion would be far greater and all the formulas would point to the monster preventing flees on 100% of the attempts. It seems however, that the evasion stat is not being called properly.

You can contact me here or MSN/YIM saincai@yahoo.com
File rating: 3.57 out of 5.00 (7 votes total).
Rate this file:       (Sucks) 1   2   3   4   5 (Rocks)      

Posted by Fayt on 02.13.2010
Change to this

$chancetorun = rand(1,$userrow["evasion"]);
     
if ($chancetorun > $monsterrow["evasion"])
{ $chancetorun = 1; }
else { $chancetorun = 0; }

Posted by ErRoR on 06.22.2010
I have created a DK mod site, and will transfer some mods there (Mail mod, Kingdom mod, etc) Please feel free to upload mods as well, and hopefully Jamin will redirect people there: http://holywar.namepad.net/downloads
-------------
~Dradaki
Posted by ErRoR on 08.10.2010
New address for the website: http://dragonthrone.namepad.net/
Posted by ErRoR on 01.07.2013
Check out http://sacred.servegame.com. Great modification to dragon knight I just found! Best modification yet and the programmer seems to be updating it tons!
Add A Comment

In order to cut down on comment spam, you must be registered on the support forums and provide your username and password before you are allowed to comment. The name shown in your comment will be your forums display name. Sorry it had to be like this. If you haven't already, please register an account.

Forums Username:


Forums Password:


Your Comment:




Information & Rules
This is a file index for any Dragon Knight modifications. If you've made a mod you'd like to share with the community, upload it.

Mod authors, please include a name, version, and brief description along with your file. All files should be submitted in a zip file that includes the actual PHP scripts as well as any readme/instruction files.

DISCLAIMER: I take absolutely no responsibility for the content or functionality of any of these files. You use them entirely at your own risk. Make sure to run all files through a virus scanner before opening them. Hopefully the people here are above such petty nonsense as putting a virus in the files, but you can never be to careful.