Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Bug Reports

Development::Bug Reports Post detailed bug reports and what you would like to see next in the emu here.

Reply
 
Thread Tools Display Modes
  #1  
Old 06-23-2009, 01:09 AM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default A HUGE bug with quest::modifynpcstat

I found a tremendous bug.

The quest::modifynpcstat(identifier, value) command when used for HP doesn't seem to hold for long.

For example let say that in DB a test npc had 400 hp.

You used a script in game and run

quest::modifynpcstat("max_hp", 3500);

All is fine- the npc now has 3500 hp...
Now if npc just stands put (or fights in melee)- he will remain this way.

Now gues what- if npc has a LIFETAP type spell casted on him his Hp will REVERT to his DB default!!!

At first I thought the script didn't run right. I re-run everything. and looked at #showstats - the npc had 3500hp.

My NPC started fighting A Spector.- and suddenly as soon as Spector proced Lifetap - my npc took a large drop in his hit points - I did #showstats again, and his MAX hp were reporting only as 400 again - his Db default.

Then i decided to check everything by hand.

I made a new npc. upped his hps. casted a lifetap on him MYSELF- and his EXTRA hp instantly faded!

Then I repeated same process using a level 1 fire nuke for 5 dmg - same thing! BOOM - and all extra hps are gone

Next try: I cast HP buff on him- BOOM - extra hps gone.

next try: casting heal - extra hps GONE!

next try: Armor buff! (no hps) - his curent hps remain at 3500, but his MaxHp become 400 again! (as reported by #showstats)



Now this ONLY happens with hit points. All other modified stats- ac, resist etc- they all hold.

I have tryed upping npc AC, and then casting AC buff on him - the AC seem to hold up, and buff stacked with modified AC

So, Any ideas on this?

PS: running Rev 535 atm
Reply With Quote
  #2  
Old 06-23-2009, 01:29 AM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

mmm I haven't experienced this but I'll take a look, I wanted to change/fiddle with some of the commands anyway.
Reply With Quote
  #3  
Old 06-23-2009, 01:33 AM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

oh KLS btw I posted some new data on players fake hp buffs at Storm Heaven forums in that thread.
Reply With Quote
  #4  
Old 06-23-2009, 01:34 AM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

Fiddle with them all you like. Just don't banjo with them. *shudder*
Reply With Quote
  #5  
Old 06-23-2009, 08:47 AM
So_1337
Dragon
 
Join Date: May 2006
Location: Cincinnati, OH
Posts: 689
Default

Well that was a great laugh to start the day off =)
Reply With Quote
  #6  
Old 06-23-2009, 06:20 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

Here is a little update.

I tried to go around quest::modifynpcstat(); and set hps directly with

$npc->SetHP(); and $npc->SetMaxHP();
(also tried using mob-> with same result)

with this simple script



Code:
sub EVENT_SAY 
{ 	
	if($text=~/Hail/i)
	{	

             $npc->SetMaxHP(9999);	
	$npc->SetHP(9999);

	my $hps=$npc->GetHP();	
	my $maxhps=$npc->GetMaxHP();	

	quest::say("my hp is $hps  out of $maxhps"); 

	}
}


Results:

-if script contains: $npc->SetMaxHP(); the cript will NOT run - the npc will not reply to Hail at all.

-if script contains ONLY $npc->SetHP(); the ncp will reply to hail but comand WILL NOT have effect- his hps will remain an altered (default)
Reply With Quote
  #7  
Old 06-23-2009, 06:25 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Using $mob instead of $npc should work just fine for the HP setting quest objects.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #8  
Old 06-23-2009, 06:32 PM
realityincarnate
Developer
 
Join Date: Dec 2007
Posts: 122
Default

The problem with the last script is that SetMaxHP doesn't do what you think it does. It doesn't take any arguments, and just sets the current hp to max. SetHP() seems to work fine, but it won't allow values higher than the max hp.

Of course, none of this solves your real problem, but it's all I know for sure while I'm sitting at work bored.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 12:02 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3