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-19-2005, 06:37 AM
sdabbs65
Dragon
 
Join Date: Dec 2003
Location: Earth
Posts: 818
Default Random Item PLUGIN..

Im looking for a plugin that will drop a random item on a corpse in event_death.
summonitem is not good enuff, I want it on the corpse.
I have all the item numbers from items.sql but I am unable to find a function that will place them on a corpse.
there is some old code that I enabled in 6.0 source for poolLoot items but it only drops coins.

if anyone has one please share.
__________________
hosting Eqemu/Runuo/wow Emulators.

www.cheaterz.info

Last edited by sdabbs65; 08-19-2005 at 02:40 PM..
Reply With Quote
  #2  
Old 08-20-2005, 05:05 PM
sdabbs65
Dragon
 
Join Date: Dec 2003
Location: Earth
Posts: 818
Default command

Quote:
Originally Posted by sdabbs65
Im looking for a plugin that will drop a random item on a corpse in event_death.
summonitem is not good enuff, I want it on the corpse.
I have all the item numbers from items.sql but I am unable to find a function that will place them on a corpse.
there is some old code that I enabled in 6.0 source for poolLoot items but it only drops coins.

if anyone has one please share.
just need to make this pick a random loot somehow...

# After hailing the NPC he gains 1 of item ID 5420 to his inventory.
sub EVENT_SAY
{
if($text=~/hail/i)
{
quest::addloot(5420,1);
}
}
__________________
hosting Eqemu/Runuo/wow Emulators.

www.cheaterz.info
Reply With Quote
  #3  
Old 08-21-2005, 01:08 AM
cofruben
Old-EQEmu Developer
 
Join Date: Oct 2002
Location: Spain
Posts: 323
Default

I'm guessing you would need to code a bit...If that's not implemented in perl, you will need to add a new perl function that calls CastToNPC()->AddItem(itemid, quantity) I think. It should not be that hard. Good luck..if still having problems just say.
Reply With Quote
  #4  
Old 08-21-2005, 03:13 AM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

with perl XS you can call $npc->AddItem(id, charges) from perl.
Reply With Quote
  #5  
Old 08-21-2005, 03:01 PM
sdabbs65
Dragon
 
Join Date: Dec 2003
Location: Earth
Posts: 818
Default ...

Quote:
Originally Posted by cofruben
I'm guessing you would need to code a bit...If that's not implemented in perl, you will need to add a new perl function that calls CastToNPC()->AddItem(itemid, quantity) I think. It should not be that hard. Good luck..if still having problems just say.
adding the item is not the problem... the issue is I want it to pick a random item from my database and add it to the corpse.
I dont think I have functions tho just yet.

sub EVENT_DEATH
{
quest::say("I'll get you back $name!");
my @items = (all the item numbers go here 1,22,33,433,40.);
quest::AddItem("$items[int(rand($#items+1))]"); <-- this is wrong need the item on the npc's corpse.
quest::shout("I've just died!");
}
__________________
hosting Eqemu/Runuo/wow Emulators.

www.cheaterz.info
Reply With Quote
  #6  
Old 08-21-2005, 04:43 PM
sdabbs65
Dragon
 
Join Date: Dec 2003
Location: Earth
Posts: 818
Default ..

after spending several hours trying to figgure it out .
I gave up on it and just added every single item to one loot table and
gave it a chance of .1 to drop.
seems to work good but it's a memory hog.
__________________
hosting Eqemu/Runuo/wow Emulators.

www.cheaterz.info
Reply With Quote
  #7  
Old 08-22-2005, 11:04 AM
FaerinTelDanor
Sarnak
 
Join Date: Jul 2005
Location: Ottawa, Ontario. Canada
Posts: 30
Default

Put the additem call in EVENT_SPAWN instead of EVENT_DEATH, the mob will spawn with a random item which will be on it's corpse when it dies.
Reply With Quote
  #8  
Old 08-22-2005, 11:14 PM
sdabbs65
Dragon
 
Join Date: Dec 2003
Location: Earth
Posts: 818
Default hmm

Quote:
Originally Posted by FaerinTelDanor
Put the additem call in EVENT_SPAWN instead of EVENT_DEATH, the mob will spawn with a random item which will be on it's corpse when it dies.
Never thought of that... it works..
guess I overthought that one a bit.
__________________
hosting Eqemu/Runuo/wow Emulators.

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