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
  #3  
Old 11-09-2010, 02:56 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Multiple issues with what you are trying to do. First, the command is used like this:

quest::addloot(itemid,charges); #Adds x-charges of an item to the NPC's loot

As seen on this page from the Wiki:

http://www.eqemulator.net/wiki/wikka...=QuestTutorial

The $npc-> pointers are only used in the quest objects from this page:

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

They are categorized so you can know what type of pointers work with each command. The $npc one works with the NPC or Mob section commands. The $client works with the Client or Mob section. The rest are all in their own sections and don't work with NPC or Client.

Another problem is that quests don't load for an NPC unless it is in the database, and using #spawn doesn't put them into the database until you use "#npcspawn create" on them or something. Once you have created the spawn, you will need to do a repop and maybe even a zone restart (forget if one is required for sure or not offhand) before scripts will load.

Also, many commands have trouble working directly from EVENT_SPAWN due to the NPC being in the middle of the process of being created at that time. I think more work now than what used to work from that event, but if you can't get them to work from EVENT_SPAWN, the easiest work-around is to set a 5 second timer and use EVENT_TIMER to do your script commands.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
 

Thread Tools
Display Modes

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 04:06 PM.


 

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