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 08-27-2008, 12:38 AM
phinius
Fire Beetle
 
Join Date: Aug 2008
Location: norrath
Posts: 8
Default $mob->

What's the deal with these? Been trying to use a few commands from http://www.eqemulator.net/wiki/wikka...a=QuestObjects
but nothing is working. Started with some of the more complex stuff, and worked my way down to $mob->gate(); which is not working for me either.

Code:
sub EVENT_ATTACK{

quest::shout("rawr");
quest::settimer(1, 10);


		}

sub EVENT_TIMER{

	if ($timer == 1){

		quest::shout("BAM");
		$mob->gate();
			}

		}
Reply With Quote
  #2  
Old 08-27-2008, 03:31 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Some of those are a little tricky to get working and some don't work at all I think.

Sometimes you might need to do $entity_list->gate(); or $npc->gate(); or something like that instead. And some of them, you need to get the mob ID first.

Here is a way to get the NPC ID and use it for something. I don't know if this would work, but I use something like this for adding hate to NPCs and other things:

Code:
my $gating_npc = $entity_list->GetMobByNpcTypeID(2120410);

  if ($gating_npc) {
    my $gate_now = $gating_npc->CastToNPC();
    $gate_now->gate(); }
The only thing that I know of that uses $mob is the SetHP() command.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #3  
Old 08-27-2008, 01:18 PM
phinius
Fire Beetle
 
Join Date: Aug 2008
Location: norrath
Posts: 8
Default

Thanks Trevius. Well in that case I guess I will go ahead and post what I'm actually tryng to do.

I want a mob to randomly pick someone on the hate list and set their level to 1.
I was referencing AndMetal's post here: http://www.eqemulator.net/forums/showthread.php?t=25588 where he suggests using:

Code:
$mob->GetHateRandom();
and then using that charid to cast a spell on a random person.

Code:
$mob->CastSpell(123, $mob->GetHateRandom());
He stated he was not sure if it would work, and I don't believe it is. I was using this script to test wether or not it was getting a charid. I believe I also tried $npc->castspell.

If GetHateRandom is working, how would I direct:

Code:
quest::level(1)
or

Code:
$mob->SetLevel(in_level, command= false)
to the randomly selected guy on the hate list?
Reply With Quote
  #4  
Old 08-27-2008, 05:11 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Once you have the client chosen, the quest::level command should work fine.

One thing I tend to do when I am testing is to use quest::say to verify if/what is being passed on or selected. So, in your case, you could do:

Code:
my $hate_target = $mob->GetHateRandom();  #this may need to be $npc instead of $mob

quest::say("My hate target is $hate_target."); #this will show if it selected someone or not and which one it selected

$npc->CastSpell(123, $hate_target);
quest::level(1);
I used a variable of $hate_target, cause I think using variables is a good way to replace certain things and to get them to run properly.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #5  
Old 08-27-2008, 05:15 PM
phinius
Fire Beetle
 
Join Date: Aug 2008
Location: norrath
Posts: 8
Default

Ok, I will try that.

Thanks again Trevius.
Reply With Quote
  #6  
Old 08-27-2008, 11:13 PM
phinius
Fire Beetle
 
Join Date: Aug 2008
Location: norrath
Posts: 8
Default

Tried this out, did have to use $npc instead of $mob. My mob relayed this message, and then it crashed zone.exe:

Code:
My hate target is Mob=SCALAR(0x218b6fc).
Any idea what that could mean?
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 02:20 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