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

Pages: [1]   Go Down
  Print  
Author Topic: Best code to set the mount buffs to 0  (Read 3197 times)
0 Members and 1 Guest are viewing this topic.
fliquid
Guest
« on: August 03, 2005, 05:40:14 AM »

Please advise me what the best code would be to set it to 0.
Logged
XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #1 on: August 03, 2005, 08:25:55 AM »

For a the player currently executing the script:

Code:
require_once("lib/buffs.php");
strip_buff('mount');

or:

Code:
unset($session['bufflist']['mount']);
Logged

Running for more than three years now:
Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #2 on: August 03, 2005, 03:25:20 PM »

You could even go:
Code:
$session['bufflist']['mount']['rounds']=0;
Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

Kendaer
Guest
« Reply #3 on: August 03, 2005, 03:31:49 PM »

The right way is strip_buff("mount").
Logged
XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #4 on: August 03, 2005, 09:56:41 PM »

Ahhh... well, yes Smiley
Because strip_buff() does a little more than just unsetting the buff... Tongue
« Last Edit: August 03, 2005, 09:56:48 PM by XChrisX » Logged

Running for more than three years now:
fliquid
Guest
« Reply #5 on: August 04, 2005, 02:39:16 AM »

For a the player currently executing the script:

Code:
require_once("lib/buffs.php");
strip_buff('mount');

or:

Code:
unset($session['bufflist']['mount']);

I used the last one, thanks!
Logged
XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #6 on: August 04, 2005, 02:41:31 AM »

The right way is strip_buff("mount").

*cough*
* XChrisX points to this post!!
Logged

Running for more than three years now:
fliquid
Guest
« Reply #7 on: August 04, 2005, 02:53:35 AM »

*cough*
* XChrisX points to this post!!

What does it do, if it does a bit more?
Logged
XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #8 on: August 04, 2005, 03:03:15 AM »

it recalculates the effects of the buffs...
Eg just unsetting the buff will not necessarily change the effects on attack / defense.

strip_buff() will prevent this...
Logged

Running for more than three years now:
fliquid
Guest
« Reply #9 on: August 04, 2005, 03:13:46 AM »

Thanks, so mount buff is reset to 0 and also the benefitial attack/defense is set back again.

Good, thanks guys!
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
25 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search