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

Pages: [1]   Go Down
  Print  
Author Topic: Buff Ends not in Time  (Read 3850 times)
0 Members and 1 Guest are viewing this topic.
MercutioEsteban
Guest
« on: March 19, 2006, 11:29:25 AM »

Hello

Ive wrote a Potion (Buff) which damaged the good and the badguy. I can't start only one buff, so I start two with one round duration. Every buff works fine alone, but when I start them at the same time, those who startet at second will not end after the correct time. I this case 1 round. I've another buff-pair very similar to Sceleton Crew of the dark arts. Same problem. Alone they work fine, but not so as a pair. The second buff duration ist 6 rounds instead 5. The Problem is only the last round, they count down correct. The first startet buff do it right the other is one turn longer active.  Huh

apply_buff('molotov3',array(
   "startmsg"=>"`4Du wirfst den gefhrlich brodelnden Trank zwischen dich und Deinen Gegner.`nAlles um Euch herum beginnt zu brennen. Die Flammen schneiden durch Rstung und Fleisch. berall tanzen Feuerteufel und Eure Waffen brennen in heier Glut.",
   "minioncount"=>1,
   "maxbadguydamage"=>ceil($badguy['creaturehealth']/2),
   "minbadguydamage"=>ceil($badguy['creaturehealth']/2),
   "effectmsg"=>"`4Durch das Feuer bekommt `^{badguy}`^ {damage}`4 Schaden",
   "rounds"=>1,
   "schema"=>"module-pruefturm",
   "activate"=>"offense"
));
apply_buff('molotov4',array(
   "minioncount"=>1,
   "maxgoodguydamage"=>ceil($session['user']['hitpoints']/2),
   "mingoodguydamage"=>ceil($session['user']['hitpoints']/2),
   "effectmsg"=>"`4Durch das Feuer bekommst `^du `\${damage}`4 Schaden",
   "rounds"=>0,
   "schema"=>"module-pruefturm",
   "activate"=>"defense"
));
apply_buff('molotov1',array(
   "name"=>"`\$Feuerflasche",
   "minioncount"=>round($session['user']['level']/3)+1,
   "maxbadguydamage"=>round(($session['user']['attack']+$session['user']['defense']+($session['user']['hitpoints']-150)/5)/18,0),
   "effectmsg"=>"`4Ein Feuerteufel schlgt `^{badguy}`4 fr `^{damage}",
   "effectnodmgmsg"=>"`4Ein Feuerteufel schlgt `^{badguy}`4 aber `^VERFEHLT!",
   "atkmod"=>1.3,
   "badguyatkmod"=>1.3,
   "rounds"=>5,
   "wearoff"=>"`4Die Flammen erlschen.",
   "schema"=>"module-pruefturm",
   "activate"=>"offense"
));
apply_buff('molotov2',array(
   "minioncount"=>round($session['user']['level']/3)+1,
   "maxgoodguydamage"=>round(($session['user']['attack']+$session['user']['defense']+($session['user']['hitpoints']-150)/5)/18,0),
   "effectmsg"=>"`4Ein Feuerteufel schlgt `^dich`4 fr `^{damage}",
   "effectnodmgmsg"=>"`4Ein Feuerteufel schlgt `^dich`4 aber `^VERFEHLT!",
   "rounds"=>5,
   "schema"=>"module-pruefturm",
   "activate"=>"offense"
));
« Last Edit: March 19, 2006, 11:31:43 AM by Mercutio_Esteban » Logged
XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #1 on: March 19, 2006, 11:38:35 AM »

This might be, because your enemy has died due to the effect of the first buff. So the second on ist not "uncharged".
Logged

Running for more than three years now:
MercutioEsteban
Guest
« Reply #2 on: March 19, 2006, 11:54:21 AM »

 Huh

No enemy dies becouse nobody dies when you half his life rounded off.
Logged
MercutioEsteban
Guest
« Reply #3 on: March 20, 2006, 06:56:04 AM »

No one with the same problem?

I strip the buff manually when the counter doesnt work correctly.

if(has_buff("molotov4")&&!has_buff("molotov3")){
   strip_buff("molotov4");
}      
if(has_buff("molotov2")&&!has_buff("molotov1")){
   strip_buff("molotov2");
}
Logged
XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #4 on: March 20, 2006, 07:06:37 AM »

How do you apply these buffs?
Logged

Running for more than three years now:
MercutioEsteban
Guest
« Reply #5 on: March 20, 2006, 07:22:27 AM »

case "fightnav-specialties":
   $script=$args['script'];
   addnav("Items");
   if(get_module_pref("hatmolotov")){
      addnav("`\$• Molotov`0",$script."op=fight&molotov=true",true);
   }
   break;   
case "apply-specialties":
   $molotov=httpget('molotov');   
   if(has_buff("molotov4")&&!has_buff("molotov3")){
      strip_buff("molotov4");
   }      
   if(has_buff("molotov2")&&!has_buff("molotov1")){
      strip_buff("molotov2");
   }

   if($molotov==true){
      set_module_pref("hatmolotov",0);
      $badguy=createarray($session['user']['badguy']);
      /*here comes my four buffs called molotov look at my first post*/
   }
Logged
MercutioEsteban
Guest
« Reply #6 on: March 23, 2006, 05:26:12 AM »

I think this is a general Problem with the buff system. I have used the user editor to give me a lot of uses in some specialtys. I start in a fight a lot of them. Every round a 5 count buff. The counter doesnt work right. I have sometimes seven buffs active. This is not correct I think. Seven buffs with duration five when I only start one per round Huh I test this at home on my own test system and also at another testserver where I have access to the usereditor. A bug maybe.
Logged
XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #7 on: March 23, 2006, 06:48:18 AM »

I tested the code you gave me on our testserver - it works fine. If I manually add all the buffs to my char, they all have the right amount of rounds. There is no bug in the buff system.
Logged

Running for more than three years now:
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
56 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search