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: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
  #2  
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
  #3  
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
  #4  
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
  #5  
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
  #6  
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
  #7  
Old 06-23-2009, 06:26 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

I have just tried it- the script won't run at all - the npc won't even reply to hail
Reply With Quote
  #8  
Old 06-23-2009, 06:40 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Ahh, I guess it is $npc after all. Maybe I was thinking of what it shows in the wiki as an example for using that object. Here is an example of one of the quests for SH that use SetHP and it definitely works without any bugs:

$npc->SetHP($hp_increase);

The $hp_increase variable in this case is just something we use for calculating how much to heal the NPC for when certain things happen. That should be replaced with the amount of Current (not max) HPs you want the NPC to have. So, if your NPC has a max of 1000 hps, you could set it to half health by doing:

$npc->SetHP(500);
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #9  
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
  #10  
Old 06-23-2009, 06:37 PM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

Ahh, so npc->SetMaxHP() is basically a way of saying npc->SetHPToMax().
Reply With Quote
Reply

Thread Tools
Display Modes

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:52 PM.


 

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