Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 03-04-2010, 06:16 PM
blackdragonsdg
Dragon
 
Join Date: Dec 2008
Location: Tennessee
Posts: 654
Default Healing clients on zone entry

I am attempting to over come the hp bug when clients zone. I don't like having a characters hp set to 30k when it should be 45k, this is really annoying for melee who can not heal themselves.

I am attempting to use the player.pl for the script but I know i am doing something wrong. According to the questobjects list i can find the $client can not be used in this manner:

Code:
sub EVENT_ENTERZONE {
	if ($client->GetHP() != $client->GetMaxHP()); {
SetHP($client->GetMaxHP());
 }
}
Using that causes the characters hp to flux wildly between 12-65%. I realized after the fact that GetHP(), GetMaxHP() and SetHP() can not be used on clients. Or atleast it can not according to this list:
http://www.eqemulator.net/wiki/wikka...a=QuestObjects

Which raises the question is that list complete? If not then where can I find a complete list at?. And why can't GetHP(), GetMaxHP() and SetHP() be used on clients, as that could very helpful at times. My search attempts for quest objects didn't yield anything useful.

Today I started working on a proximity triggered version of the same script but I think I am using $client in an incorrect manner. Here is the proximity script:


Code:
sub EVENT_SPAWN
{
	$x = $npc->GetX();
	$y = $npc->GetY();
	quest::set_proximity($x - 100, $x + 100, $y - 100, $y + 100);
}

sub EVENT_ENTER
{
	$npc->CastSpell(13, $client);

}
Any help or guidance would be appreciated.
Reply With Quote
  #2  
Old 03-04-2010, 06:53 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Try changing this:

Code:
SetHP($client->GetMaxHP());
To this:

Code:
$client->SetHP($client->GetMaxHP());
Those HP related objects do work for NPCs and Players. That is why it is in the "mob" section of that wiki page. The "npc" section is for NPCs only, and the "client" section is for clients only, but the "mob" section is for both clients and NPCs.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #3  
Old 03-04-2010, 07:05 PM
nenelan
Hill Giant
 
Join Date: Feb 2008
Posts: 116
Default

Use player.pl.

Code:
sub EVENT_ENTERZONE {
	quest::settimer("healself",10);
}
sub EVENT_TIMER {
	quest::selfcast(13);
	quest::selfcast(13);
	quest::selfcast(13);
	quest::stoptimer("healself");
}
Used a timer as just on ENTER_ZONE did not work, think it has to do with the lock up delay. Also, $client DOES work in player.pl if you need it for other things.
Reply With Quote
  #4  
Old 03-04-2010, 11:45 PM
arcerean
Fire Beetle
 
Join Date: Nov 2007
Posts: 16
Default

try this in the player.pl

sub EVENT_ENTERZONE{

quest::selfcast(13);
}
Reply With Quote
  #5  
Old 03-05-2010, 12:09 AM
blackdragonsdg
Dragon
 
Join Date: Dec 2008
Location: Tennessee
Posts: 654
Default

Thanks for all the help, the healing script is working now.
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 10:31 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3