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

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-06-2009, 07:02 AM
Joetuul
Sarnak
 
Join Date: Oct 2008
Location: AZ
Posts: 58
Default How do I get $mob->SetHP($mob->GetHP()*85); to work right?

This is what I am trying to do, but cant seem to get it right is to get the mob to spawn with a lower percentage of health, in this case it would be 85% and every 15% there on after. the text in red is what I want to get to work and then proceed to copy that for each health percentage. This way I can change this mob's HP and not have to worry about changing the script each time just to adjust the HP I want the mob to be at, at each of these globals.

Code:
sub EVENT_SPAWN
{

	if(defined($qglobals{yar})){    #spawn at lower % of health

                if ($qglobals{yar} == 1)
                        {
                        quest::shout ("RAWR 1"); #was used to test if the script ws working
                        }

                elsif ($qglobals{yar} == 2)
                        {
                        quest::shout ("RAWR 2");
                        $mob->SetHP($mob->GetHP()*85);
                        }

                elsif ($qglobals{yar} == 3)
                        {
                        $npc->SetHP(7000);
                        }

                elsif ($qglobals{yar} == 4)
                        {
                        $npc->SetHP(5500);
                        }

                elsif ($qglobals{yar} == 5)
                        {
                        $npc->SetHP(4000);
                        }

                elsif ($qglobals{yar} == 6)
                        {
                        $npc->SetHP(2500);
                        }

                elsif ($qglobals{yar} == 7)
                        {
                        $npc->SetHP(1000);

                        }
               }
}
I hate searching the forums for hours on end for posts similair to what I want so I can use it in my own scripts. This one has been bugging me the last few days. If I can get this one snipet to work, I think it would make for an awesome mob encounter (im going to use it for sure). I will even post it in the quest custom section of the forums for all who would like to use it or some form of it or alter it to their own needs.

I am going to bed since its 4am and I need to get up in a few hours to deal with RL stuff.

TIA!!!!!
__________________
~Tuul
Mithaniel Marr
http://mithmarr.power-rpg.com/
Reply With Quote
 


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 02: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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3