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

Pages: [1]   Go Down
  Print  
Author Topic: Control of Flawless Fights  (Read 2131 times)
0 Members and 1 Guest are viewing this topic.
MrFixIt
Guest
« on: June 18, 2004, 10:43:26 AM »

This got buried in another post so I'll put it here in a new one.

I did this on my server to control runaway perfect fights. This also prevents resurrects from gaining flawless fights.

Add to accounts:
perfection  int 11

Add this to newday.php:
$session['user']['perfection'] = 0;

Change the flawless fight call in forest.php to this:
//begin change

$HTTP_GET_VARS[op]="";
//if ($session[user][hitpoints] == $session[user][maxhitpoints]){    
if ($badguy['diddamage']!=1){
if ($session['user']['perfection']<=10 && $session['user']['spirits']>=-2){
if ($session['user']['level']>=getsetting("lowslumlevel",4) || $session['user']['level']<=$creaturelevel){
output("`b`c`&~~ Flawless Fight! ~~`\$`n`bYou receive an extra turn!`c`0`n");
$session['user']['turns']++;
$session['user']['perfection']++;
}else{
output("`b`c`&~~ Flawless Fight! ~~`b`\$`nA more difficult fight would have yielded an extra turn.`c`n`0");
$session['user']['perfection']++;
}
}else{
output("`n`b`cYou can't get any flawless fights right now.`c`b");
}
}

//end change

To change the amount of flawless fights allowed simply change the number in this line:
if ($session['user']['perfection']<=10

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
20 Guests, 1 User
pelantas
Home Forums News Downloads Login Register Advanced Search