Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #16  
Old 07-31-2009, 10:30 AM
Kilralpine
Sarnak
 
Join Date: Jul 2004
Posts: 98
Default

Here is the solution, after reading the list carefully i noticed this line:
RemoveItem(item_id, quantity= 0, slot= 0)
Therefore, $npc->RemoveItem(3233, 1); is the correct format/handle for NPCS to remove items

Completed Quest Script (No Trigger Mob or Signals):
Code:
##################
#ZONE - Sebilis
#NPC - Trakanon
#Quest - Green Dragon Hearts (Mobside)
#Author - Kilralpine
##################
#####
# This script will add the item 3233 to trakanon's loottable if a player with the task 500 enters his vicinity. 
# If a player is to leave his vicinity it will remove the item...
# Therefore this script allows npcs to drop quest items ONLY if a player near them has the correct task, this can be adapted to any npc/task/item. ###
#####

sub EVENT_SPAWN {
  my $x = $npc->GetX();
  my $y = $npc->GetY();
  my $range = 210;
  quest::set_proximity($x - $range, $x + $range, $y - $range, $y + $range);
}

sub EVENT_ENTER
{
  if (quest::istaskactivityactive(500,0)) {
quest::addloot(3233,1);

}
}

sub EVENT_EXIT
{
  if (quest::istaskactivityactive(500,0)) {
$npc->RemoveItem(3233, 1);

}
}
Gunna go ahead and add this to the custom quests section
Reply With Quote
  #17  
Old 09-14-2009, 10:52 PM
Tharkun
Hill Giant
 
Join Date: Aug 2009
Posts: 125
Default

zomgz this has so many useful applications

great job
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 10:18 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