DragonPrime - LoGD Resource Community
Welcome Guest
  • Good evening, Guest.
    Please log in, or register.
  • December 03, 2016, 07:52:31 PM
Home Forums News Links Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
IRC Channels
Search

Pages: [1]   Go Down
  Print  
Author Topic: Control of Flawless Fights  (Read 2050 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
Play LoGD on Dragonprime

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