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 04-03-2009, 08:40 AM
Dibalamin
Hill Giant
 
Join Date: Dec 2007
Posts: 182
Exclamation Validity of Quest Objects

How many of these quest objects are still valid?

http://www.eqemulator.net/wiki/wikka...a=QuestObjects

I've tried a few in $mob & they don't work.

Is there an updated complete list that someone might share?
Reply With Quote
  #2  
Old 04-03-2009, 01:13 PM
realityincarnate
Developer
 
Join Date: Dec 2007
Posts: 122
Default

To the best of my knowledge, they all still work, plus some more that aren't listed there. What have you tried?

I know it isn't as convenient as an up-to-date, alphabetized list, but if you look at the source code you can find all these functions in perl_mob.cpp. The same is true for the other quest objects... look in perl_"whatever".cpp
Reply With Quote
  #3  
Old 04-03-2009, 04:17 PM
Dibalamin
Hill Giant
 
Join Date: Dec 2007
Posts: 182
Default

I don't have c++, I'm not a server dev, I just code quests =o. I'll see if I can get this ripped though! Thanks!
Reply With Quote
  #4  
Old 04-03-2009, 04:29 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Sometimes you have to play with them a bit to get them working. Most of the ones in $mob actually need to be used as $npc or $client, and don't work as $mob. Sometimes, you also have to do a CastTo to get them working. Just takes alot of playing with them sometimes to get them figured out.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #5  
Old 04-03-2009, 04:40 PM
Dibalamin
Hill Giant
 
Join Date: Dec 2007
Posts: 182
Default

I'll give you a shiny nickel to explain the CastTo stuff, I see it all over and still have no real idea what it does....
Reply With Quote
  #6  
Old 04-03-2009, 10:36 PM
realityincarnate
Developer
 
Join Date: Dec 2007
Posts: 122
Default

I'd forgotten that the $mob stuff doesn't work in quite as straightforward a fashion as the others. Almost nothing that I've seen actually works with the $mob variable, but those functions will work if you call them from $npc or $client, depending on who you want them performed on (or by). You can think of the $mob functions as a subset of the $client and $npc... I'm sure there are exceptions, but all of the functions I played with can be called from either (but don't work if you actually use $mob).

The CastTo... functions are used to change an object from one type to another. So if you want to use a function from the mob list on the client, you could use "$client->CastToMob()->" or "$npc->CastToMob()->" to call whatever $mob function you want. I've never actually had to use the CastTo functions in quest writing, but then I haven't really pushed the limits of the system, either.
Reply With Quote
  #7  
Old 04-03-2009, 11:46 PM
Dibalamin
Hill Giant
 
Join Date: Dec 2007
Posts: 182
Default

Thanks Reality, that helps a ton actually....

GetHateTop is on the $mob list, I'm trying to have one mob get the hate top of the list of another mob & cast a spell on it but not aggro...before I drive myself any crazier...is this even possible? I've been on this for a while now and can't get it rolling.

I see similar things in the linking of mobs in TOV (Like Eashen)....and I think I found the code in Sentry Rotiart, but I am not sure how to modify it to cast a spell instead of attacking:

Code:
    
    my $attack = $entity_list->GetMobID(mobid);
    my $traitorattack = $attack->CastToNPC();
    $traitorattack->AddToHateList($client, 1);
$traitorattack->CastSpell(spellid, $client);
in this case, doesn't work..

Code:
my $attack=$entity_list->GetHateTop();
my $traitorattack=$attack->CastToNPC();
$tratorattack->CastSpell(spellid,$client);
I'm grasping at straws here, I'm missing some small piece of how all this fits together.
Reply With Quote
  #8  
Old 04-04-2009, 12:22 PM
realityincarnate
Developer
 
Join Date: Dec 2007
Posts: 122
Default

The main problem with your version of the quest is that GetHateTop() isn't a member of the entity list. If you call $npc->GetHateTop(), you'll get a result, which I believe is mob type. You should then be able to either call functions from that or cast it to whatever you need.

You also have a typo in the last line ("trator" instead of "traitor").
Reply With Quote
  #9  
Old 04-04-2009, 10:21 PM
Dibalamin
Hill Giant
 
Join Date: Dec 2007
Posts: 182
Default

Ok, so CastToNPC() is the variable passer that I've been looking for? I may joygasm if that is the case

my $attack=$npc->GetHateTop();
my $traitorattack=$attack->CastToNPC();
$traitorattack->CastSpell(spellid,$client);
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 08:35 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