addloot on spawn?
this doesn't seem to work:
Code:
sub EVENT_SPAWN{ but there's no loot on test's corpse... I've also tried just "addloot" instead of "$npc->addloot" no dice .. as well as both of those variations with addloot(119811,1) no dice I'm just a myriad of errors aren't i :( Thanks in advance :) EDIT: i can't even get a simple hail function working with my test NPC .. i guess I can't use quests with npcs that I spawn with GM commands? or something? i don't even know :( |
You have some reading to do son
|
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. |
Tried doing it a number of ways based on the suggestions. Still can't get it working. Oh well :(
Thanks :) |
Also, make sure you can #summonitem the item you are trying to add to the loot table. If it is an item you added since your last server restart, the item won't be added in-game until you restart your server completely, as items are all loaded only when the server is first started and never updated after that point.
|
Add Defiant Loot on Spawn
Here is an example of adding Crude Defiant in Crushbone to the stock orc_centurion.pl
Code:
#Orc chit-chat |
All times are GMT -4. The time now is 12:45 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.