EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Custom (https://www.eqemulator.org/forums/forumdisplay.php?f=671)
-   -   Mobs that add/remove Quest Items (https://www.eqemulator.org/forums/showthread.php?t=29080)

Kilralpine 07-31-2009 10:33 AM

Mobs that add/remove Quest Items
 
This quest script will allow an npc to add/remove quest items according to wether or not the players around them have a specific task... This reduces confusion for players... as looting a quest item without the Task enabled... requires the player to go back and loot it a second time.

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);

}
}

Enjoy

shoknawe2 08-05-2009 12:47 AM

nice work man

Kilralpine 08-05-2009 06:17 PM

Thx, i think this in conjunction with the task system... we can make an almost WOW like quest system; Very streamlined


All times are GMT -4. The time now is 05:33 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.