mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-08 22:46:35 +00:00
disable_proximity_say, disable_spawn2, disablerecipe, disabletask, doanim, echo, emote, enable_proximity_say, enable_spawn2, enabledtaskcount, enablerecipe, enabletitle, exp
+314
-14
@@ -1619,23 +1619,323 @@ quest::depopzone();
|
|||||||
quest::ding();
|
quest::ding();
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## disable_proximity_say
|
||||||
|
|
||||||
|
**Parameter(s):**
|
||||||
|
|
||||||
|
None.
|
||||||
|
|
||||||
|
**Usage:**
|
||||||
|
|
||||||
|
Disables proximity say for the NPC. Proximity say must be enabled with quest::set_proximity(); and quest::enable_proximity_say();.
|
||||||
|
|
||||||
|
**Example:**
|
||||||
|
|
||||||
|
```perl
|
||||||
|
quest::disable_proximity_say();
|
||||||
|
```
|
||||||
|
|
||||||
|
## disable_spawn2
|
||||||
|
|
||||||
|
**Parameter(s):**
|
||||||
|
|
||||||
|
spawn2_id _(int)_
|
||||||
|
|
||||||
|
**Usage:**
|
||||||
|
|
||||||
|
Disables the spawn point specified and depops any NPC entity from that spawn point.
|
||||||
|
|
||||||
|
**Example:**
|
||||||
|
|
||||||
|
```perl
|
||||||
|
#:: Disable the spawn point for 151562 - spawngroup ID 113004 - npcIDs 15138 (Droon) and 15160 (Proon)
|
||||||
|
quest::disable_spawn2(151562);
|
||||||
|
```
|
||||||
|
|
||||||
|
## disablerecipe
|
||||||
|
|
||||||
|
**Parameter(s):**
|
||||||
|
|
||||||
|
recipe_id _(int)_
|
||||||
|
|
||||||
|
**Usage:**
|
||||||
|
|
||||||
|
Disables the recipe specified by Recipe ID.
|
||||||
|
|
||||||
|
**Example:**
|
||||||
|
|
||||||
|
```perl
|
||||||
|
#:: Disable recipe 1 - Blessed Fishing Rod
|
||||||
|
quest::disablerecipe(1);
|
||||||
|
```
|
||||||
|
|
||||||
|
## disabletask
|
||||||
|
|
||||||
|
**Parameter(s):**
|
||||||
|
|
||||||
|
task_id _(int)_
|
||||||
|
|
||||||
|
**Usage:**
|
||||||
|
|
||||||
|
Disables a task so that it is not available to a client character. Useful if you do not want someone to repeat a task.
|
||||||
|
|
||||||
|
**Example:**
|
||||||
|
|
||||||
|
```perl
|
||||||
|
#:: Match if the player has an active task
|
||||||
|
if ($task != 0) {
|
||||||
|
#:: Create a scalar variable to store the active speak-to activity
|
||||||
|
$activity = quest::activespeakactivity($task);
|
||||||
|
#:: Mark the activity as complete
|
||||||
|
quest::updatetaskactivity($task, $activity);
|
||||||
|
quest::say("Well done!");
|
||||||
|
#:: Offer the next task, if there is one
|
||||||
|
if (!quest::istaskactive($task)) {
|
||||||
|
#:: Disable the task so that it cannot be repeated
|
||||||
|
quest::disabletask($task);
|
||||||
|
#:: Match if there are tasks remaining in the Task Set
|
||||||
|
if ($task != quest::lasttaskinset(200)) {
|
||||||
|
quest::say("Well done, I have another task if you are willing.");
|
||||||
|
#:: Enable the next Task in the Task Set
|
||||||
|
quest::enabletask(quest::nexttaskinset(200, $task));
|
||||||
|
}
|
||||||
|
#:: Match if there are no tasks remaining in the task set
|
||||||
|
else {
|
||||||
|
quest::say("Thank you for cleansing Qeynos Hills!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## doanim
|
||||||
|
|
||||||
|
**Parameter(s):**
|
||||||
|
|
||||||
|
animation_id _(int)_
|
||||||
|
|
||||||
|
**Usage:**
|
||||||
|
|
||||||
|
Makes the NPC perform the indicated [Animation](https://github.com/EQEmu/Server/wiki/Animations).
|
||||||
|
|
||||||
|
**Example:**
|
||||||
|
|
||||||
|
```perl
|
||||||
|
#:: Perform the Cheer animation
|
||||||
|
quest::doanim(27);
|
||||||
|
```
|
||||||
|
|
||||||
|
quest::echo
|
||||||
|
|
||||||
|
**Parameter(s):**
|
||||||
|
|
||||||
|
emote_color_id _(int)_, message _(string)_
|
||||||
|
|
||||||
|
**Usage:**
|
||||||
|
|
||||||
|
Echoes the specified message string, in the specified color, to the client console.
|
||||||
|
|
||||||
|
**Example:**
|
||||||
|
|
||||||
|
```perl
|
||||||
|
#:: Echo a message in yellow text (15)
|
||||||
|
quest::echo(15,"Hello, world");
|
||||||
|
```
|
||||||
|
|
||||||
|
## emote
|
||||||
|
|
||||||
|
**Parameter(s):**
|
||||||
|
|
||||||
|
message _(string)_
|
||||||
|
|
||||||
|
**Usage:**
|
||||||
|
|
||||||
|
Makes the NPC emote the specified message string.
|
||||||
|
|
||||||
|
**Example:**
|
||||||
|
|
||||||
|
```perl
|
||||||
|
sub EVENT_DEATH_COMPLETE {
|
||||||
|
quest::emote("'s corpse says 'How...did...ugh...'");
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## enable_proximity_say
|
||||||
|
|
||||||
|
**Parameter(s):**
|
||||||
|
|
||||||
|
None.
|
||||||
|
|
||||||
|
**Usage:**
|
||||||
|
|
||||||
|
Enables proximity say for the NPC--the target would not have to have the NPC targeted to interact if the NPC has a defined proximity and proximity say is enabled.
|
||||||
|
|
||||||
|
**Example:**
|
||||||
|
|
||||||
|
```perl
|
||||||
|
sub EVENT_SPAWN {
|
||||||
|
#:: Set the proximity bounds around the NPC on spawn, 30 units across
|
||||||
|
$x = $npc->GetX();
|
||||||
|
$y = $npc->GetY();
|
||||||
|
quest::set_proximity($x-15,$x+15,$y-15,$y+15);
|
||||||
|
quest::enable_proximity_say();
|
||||||
|
}
|
||||||
|
|
||||||
|
sub EVENT_PROXIMITY_SAY {
|
||||||
|
if ($text=~/Ganelorn Oast/i) {
|
||||||
|
quest::say("Ganelorn Oast! For he has single-handedly caught more poachers than any other ranger. He is credited for helping numerous endangered species recover from certain extinction. I suppose I am lucky he is fond of my sister, as I am soon to train under him as an apprentice. Perhaps one day I will even [" . quest::saylink("call upon the flames") . "] in the way that he does.");
|
||||||
|
}
|
||||||
|
elsif ($text=~/call upon the flames/i) {
|
||||||
|
quest::say("Aye, Ganelorn is renowned not only for his abilities as an archer and a master of melee combat, but also for his use of powerful magics. Never before have I seen a forester evoke a fireball of such great force. It would be any ranger's dream to become his pupil just to study that one spell. Ganelorn doesn't train just anyone, though. If you want to learn from him, I'm certain you would have to prove yourself as a forester.");
|
||||||
|
}
|
||||||
|
if ($text=~/I want to learn/i) {
|
||||||
|
quest::say("He is a very busy individual. I believe he is currently in the eastern part of the Karanas trying to track down a poacher. Even if you can track him down, don't get your hopes up.");
|
||||||
|
#:: Send a signal 2 to The Greater Faydark >> Lily_Ashwood (54086)
|
||||||
|
quest::signalwith(54086, 2, 3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## enable_spawn2
|
||||||
|
|
||||||
|
**Parameter(s):**
|
||||||
|
|
||||||
|
spawn2_id _(int)_
|
||||||
|
|
||||||
|
**Usage:**
|
||||||
|
|
||||||
|
Enables the specified spawn point.
|
||||||
|
|
||||||
|
**Example:**
|
||||||
|
|
||||||
|
```perl
|
||||||
|
sub EVENT_DEATH_COMPLETE {
|
||||||
|
#:: Enable the spawn timer for 151562 - spawngroup ID 113004 - npcIDs 15138 (Droon) and 15160 (Proon)
|
||||||
|
quest::enable_spawn2(151562);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## enabledtaskcount
|
||||||
|
|
||||||
|
**Parameter(s):**
|
||||||
|
|
||||||
|
task_set _(int)_
|
||||||
|
|
||||||
|
**Usage:**
|
||||||
|
|
||||||
|
Counts the enabled tasks in the specified Task Set.
|
||||||
|
|
||||||
|
**Example:**
|
||||||
|
|
||||||
|
```perl
|
||||||
|
#:: Match if there are no enabled tasks in Task Set 10
|
||||||
|
if (quest::enabledtaskcount(10) == 0) {
|
||||||
|
quest::enabletask(50, 51, 52);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## enablerecipe
|
||||||
|
|
||||||
|
**Parameter(s):**
|
||||||
|
|
||||||
|
recipe_id _(int)_
|
||||||
|
|
||||||
|
**Usage:**
|
||||||
|
|
||||||
|
Enables the recipe specified by Recipe ID.
|
||||||
|
|
||||||
|
**Example:**
|
||||||
|
|
||||||
|
```perl
|
||||||
|
#:: Enable recipe 1 - Blessed Fishing Rod
|
||||||
|
quest::enablerecipe(1);
|
||||||
|
```
|
||||||
|
|
||||||
|
## enabletask
|
||||||
|
|
||||||
|
**Parameter(s):**
|
||||||
|
|
||||||
|
task_id _(int)_
|
||||||
|
|
||||||
|
**Usage:**
|
||||||
|
|
||||||
|
Enables a task.
|
||||||
|
|
||||||
|
**Example:**
|
||||||
|
|
||||||
|
```perl
|
||||||
|
#:: Match if the player has an active task
|
||||||
|
if ($task != 0) {
|
||||||
|
#:: Create a scalar variable to store the active speak-to activity
|
||||||
|
$activity = quest::activespeakactivity($task);
|
||||||
|
#:: Mark the activity as complete
|
||||||
|
quest::updatetaskactivity($task, $activity);
|
||||||
|
quest::say("Well done!");
|
||||||
|
#:: Offer the next task, if there is one
|
||||||
|
if (!quest::istaskactive($task)) {
|
||||||
|
#:: Disable the task so that it cannot be repeated
|
||||||
|
quest::disabletask($task);
|
||||||
|
#:: Match if there are tasks remaining in the Task Set
|
||||||
|
if ($task != quest::lasttaskinset(200)) {
|
||||||
|
quest::say("Well done, I have another task if you are willing.");
|
||||||
|
#:: Enable the next Task in the Task Set
|
||||||
|
quest::enabletask(quest::nexttaskinset(200, $task));
|
||||||
|
}
|
||||||
|
#:: Match if there are no tasks remaining in the task set
|
||||||
|
else {
|
||||||
|
quest::say("Thank you for cleansing Qeynos Hills!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## enabletitle
|
||||||
|
|
||||||
|
**Parameter(s):**
|
||||||
|
|
||||||
|
title_set_id _(int)_
|
||||||
|
|
||||||
|
**Usage:**
|
||||||
|
|
||||||
|
Enables the specified Title Set.
|
||||||
|
|
||||||
|
**Example:**
|
||||||
|
|
||||||
|
```perl
|
||||||
|
sub EVENT_ITEM_CLICK {
|
||||||
|
#:: Match if item 98471 - Mastering Tinkering Master I is clicked
|
||||||
|
if ($itemid == 98471) {
|
||||||
|
#:: Tinkering Mastery AA ID 575 Rank 1
|
||||||
|
$client->GrantAlternateAdvancementAbility(575,1,0);
|
||||||
|
#:: Send a message in Yellow (15) text
|
||||||
|
$client->Message(15,"You have mastered tinkering!");
|
||||||
|
#:: Ding!
|
||||||
|
quest::ding();
|
||||||
|
#:: Enable tinkering mastery title set
|
||||||
|
quest::enabletitle(10);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## exp
|
||||||
|
|
||||||
|
**Parameter(s):**
|
||||||
|
|
||||||
|
amount _(int)_
|
||||||
|
|
||||||
|
**Usage:**
|
||||||
|
|
||||||
|
Gives the amount of [experience](https://github.com/EQEmu/Server/wiki/Experience-by-Level) specified to the client character.
|
||||||
|
|
||||||
|
**Example:**
|
||||||
|
|
||||||
|
```perl
|
||||||
|
#:: Grant 100 experience points
|
||||||
|
quest::exp(100);
|
||||||
|
```
|
||||||
|
|
||||||
(Work in Progress)
|
(Work in Progress)
|
||||||
|
|
||||||
```perl
|
```perl
|
||||||
quest::disable_proximity_say()
|
|
||||||
quest::disable_spawn2(int spawn2_id)
|
|
||||||
quest::disablerecipe(int recipe_id)
|
|
||||||
quest::disabletask(int task_id, 2, 3, [up to 10])
|
|
||||||
quest::doanim(int animation_id)
|
|
||||||
quest::echo(int emote_color_id, string message)
|
|
||||||
quest::emote(string message)
|
|
||||||
quest::enable_proximity_say()
|
|
||||||
quest::enable_spawn2(int spawn2_id)
|
|
||||||
quest::enabledtaskcount(int task_set)
|
|
||||||
quest::enablerecipe(int recipe_id)
|
|
||||||
quest::enabletask(int task_id, 2, 3, [up to 10])
|
|
||||||
quest::enabletitle(int title_set_id)
|
|
||||||
quest::exp(int amount)
|
|
||||||
quest::faction(int faction_id, int value, [int temp = 0])
|
quest::faction(int faction_id, int value, [int temp = 0])
|
||||||
quest::factionvalue()
|
quest::factionvalue()
|
||||||
quest::failtask(int task_id)
|
quest::failtask(int task_id)
|
||||||
|
|||||||
Reference in New Issue
Block a user