EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Healing clients on zone entry (https://www.eqemulator.org/forums/showthread.php?t=30732)

blackdragonsdg 03-04-2010 06:16 PM

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.

trevius 03-04-2010 06:53 PM

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.

nenelan 03-04-2010 07:05 PM

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.

arcerean 03-04-2010 11:45 PM

try this in the player.pl

sub EVENT_ENTERZONE{

quest::selfcast(13);
}

blackdragonsdg 03-05-2010 12:09 AM

Thanks for all the help, the healing script is working now.


All times are GMT -4. The time now is 10:41 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.