PDA

View Full Version : Perl Quest Lexicon


mwmdragon
03-14-2005, 10:27 AM
I plan to get this done in a timely fasion. Here is a start of whats to come. I hope this helps newbie quest writers like myself to get a better grip on the commands available.

I have them done in a color coded easy to read format that gets lost when i post them here. After they are all done I'll post them as a PDF.

Please do not post a bunch of stuff in this thread please start another thred for corrections orcomments.

mwmdragon
03-14-2005, 10:28 AM
quest::say

Explaination : Makes the mob or NPC say the text in the quotes.

Full Command : quest::say("text");

Text = What you want the mob or NPC to say.

Example:


# Makes the mob greet the player, when hailed.

sub EVENT_SAY
{
if($text=~/hail/i)
{
quest::say("Hello fellow Norrathian.");
}
}

mwmdragon
03-14-2005, 10:29 AM
quest::emote

Explaination: Makes the mob or NPC emote the text in the quotes.

Full Command: quest::emote(

mwmdragon
03-14-2005, 10:30 AM
quest::shout

Explaination: Makes the mob or NPC shout the text in the quotes.

Full Command: quest::shout(

mwmdragon
03-14-2005, 10:31 AM
quest::spawn

Explaination: Spawns a mob or NPC at the location given on the grid given.

Full Command: quest::spawn(npc_type, grid, guildwarset,x,y,z);

Npc_type = The mob or NPCs ID from your database.
Grid = The grid ID you want the mob or NPC to walk along from your database. Leave it as 0 if you don

mwmdragon
03-14-2005, 10:32 AM
quest::echo

Explaination: Sends the text in the quotes to the EQEmu console.

Full Command: quest::echo(

mwmdragon
03-14-2005, 10:33 AM
quest::summonitem

Explaination: Summons an item for the player who triggers the event.

Full Command: quest::summonitem(itemid,amount or charges)

Itemid = The items ID number from your database.
Charges or Amount = Sets the amount of the item given to the player, or if the item can have a certain amount of charges set on it, it will set charges instead of amount of the item given.

Example:

# Gives the player one instance of the item indicated after being hailed.

sub EVENT_SAY
{
if($text=~/hail/i)
{
quest::summonitem("5120");
}
}

mwmdragon
03-14-2005, 10:34 AM
quest::castspell

Explaination: Makes the mob or NPC cast a certain spell on the creature with the indicated ID.

Full Command: quest::castspell(id,spellid)

ID = The ID of the creature the spell is to be cast on.
SpellID = The ID of the spell to cast taken from the spells_us.txt

Example:

# Casts the bind affinity spell on the hailing person.

sub EVENT_SAY
{
if($text=~/hail/i)
{
quest::castspell($userid,2049);
}
}

mwmdragon
03-14-2005, 10:35 AM
quest::selfcast

Explaination: Makes the player cast a spell on themselves.

Full Command: quest::selfcast(spellid)

SpellID = The ID of the spell to cast taken from the spells_us.txt

Example:

# After hailing, the player casts bind affinity on themselves.

sub EVENT_SAY
{
if($text=~/hail/i)
{
quest::selfcast($userid,2049);
}
}

mwmdragon
03-14-2005, 10:36 AM
quest::depop

Explaination: Makes the mob or NPC depop or unspawn.

Full Command: quest::depop( )

Example:

# After being hailing, the NPC depops.

sub EVENT_SAY
{
if($text=~/hail/i)
{
quest::depop();
}
}

mwmdragon
03-14-2005, 10:37 AM
quest::cumflag

Explaination: Flag 50 for mob will increase by 1.

Full Command: quest::cumflag( )

Example:

# After being hailing, the NPCs Flag 50 goes up by 1

sub EVENT_SAY
{
if($text=~/hail/i)
{
quest::cumflag();
}
}

mwmdragon
03-14-2005, 02:34 PM
quest::flagnpc

Explaination: Sets flag values on mobs and NPCs mainly for quests.

Full Command: quest::flagnpc(flag,flagvalue)

Flag = a variable you wish to assign the value to.
Flagvalue = the value you want the flag variable to equal

Example:

# After being hailed, a flag on the NPC 7 is set to 1.

sub EVENT_SAY
{
if($text=~/hail/i)
{
quest::flagnpc(7,1);
}
}

mwmdragon
03-14-2005, 02:35 PM
quest::flagclient

Explaination: Sets a flag on the player, mainly for quests.

Full Command: quest::flagclient(flag,flagvalue)

Flag = a variable you wish to assign the value to.
Flagvalue = the value you want the flag variable to equal

Example:

# After being hailed the NPC sets a flag on the player 3 to 1.

sub EVENT_SAY
{
if($text=~/hail/i)
{
quest::flagclient(3,1);
}
}

mwmdragon
03-14-2005, 02:35 PM
quest::exp

Explaination: Adds an amount of experience to the players character.

Full Command: quest::exp(amount)

Amount = The amount of experience you would like the player to gain.

Example:

# After hailing the NPC the player gains 100 experience.

sub EVENT_SAY
{
if($text=~/hail/i)
{
quest::exp(100);
}
}

mwmdragon
03-14-2005, 02:36 PM
quest::level

Explaination: Sets the players character level to the level you specify.

Full Command: quest::level(newlevel)

Newlevel = The level you want the character to be.

Example:

# After hailing the NPC the player is forced to level 25.

sub EVENT_SAY
{
if($text=~/hail/i)
{
quest::level(25);
}
}

mwmdragon
03-14-2005, 02:36 PM
quest::safemove

Explaination: Moves the player to the safe coordinates on the zone they are in.

Full Command: quest::safemove( )

Example:

# After hailing the NPC the player is move to the safe coordinates of the same zone.

sub EVENT_SAY
{
if($text=~/hail/i)
{
quest::safemove()
}
}

mwmdragon
03-14-2005, 02:37 PM
quest::rain

Explaination: Makes it rain in the zone.

Full Command: quest::rain(n)

N= choose 1 to turn the rain on in the zone or 0 to turns the rain off in the zone.

Example:

# After hailing the NPC it begins to rain in the zone.

sub EVENT_SAY
{
if($text=~/hail/i)
{
quest::rain(1);
}
}

mwmdragon
03-14-2005, 02:37 PM
quest::snow

Explaination: Makes it snow in the zone.

Full Command: quest::snow(n)

N= choose 1 to turn the snow on in the zone or 0 to turns the snow off in the zone.

Example:

# After hailing the NPC it begins to snow in the zone.

sub EVENT_SAY
{
if($text=~/hail/i)
{
quest::snow(1);
}
}

mwmdragon
03-14-2005, 02:38 PM
quest::givecash

Explaination: Gives the player money based on whatever denominations you choose.

Full Command: quest::givecash(c,s,g,p)

c = the amount of copper to give the player.
s = the amount of silver to give the player.
g = the amount of gold to give the player.
p = the amount of platinum to give the player.

Example:

# The NPC give the player 1 of each coin for hailing him.

sub EVENT_SAY
{
if($text=~/hail/i)
{
quest::givecash(1,1,1,1);

# If this does not work for you try this

mwmdragon
03-14-2005, 03:06 PM
quest::pvp

Explaination: Turns Player Versus Player (PVP) on or off for the player.

Full Command: quest::pvp(

mwmdragon
03-14-2005, 03:07 PM
quest::doanim

Explaination: The mob or NPC will perform the animation you set it to do.

Full Command: quest::doanim(n)

n = See the list below for possible animation numbers to set this to.

1 - Kick
2 - Piercing
3 - 2h slash
4 - 2h blunt/piercing
5 - Throw
6 - Offhand attack
7 - Bash/Dragon Punch
8 - Mainhand slash
9 - Shoot bow
10 - Swim
11 - Round Kick
12 - Shake head no
13 - Embarassed(looks down)
14 - Embarassed(looks down)
15 - Falling backwards animation
16 - Death animation
17 - Elbows at waist, hands pointing out
18 - Hands pointing straight down
19 - Run animation(I think)
20 - Jump
21 - Falling face first
22 - Duck walking
23 - No idea
24 - Bow
25 - Swimming in place
26 - Idle animation(troll scratches butt, etc)
27 - Cheer
28 - Disgusted
29 - Wave
30 - Rude
31 - Yawn
32 - No emote(?)
33 - Sit down
34 - Walk backwards(I think)
35 - No emote(?)
36 - Kneel
37 - Swim
38 - Sitting down
39 - No emote(?)
40 - No emote(?)
41 - No emote(?)
42 - Cast anim(Canni, etc)
43 - Cast anim(Buffs, etc)
44 - Cast anim(Lifetap, nuke, etc)
45 - Flying Kick
46 - Tiger Claw
47 - Eagle Strike
48 - Nod yes
49 - Shake head no
50 - Plead
51 - Applaud/clap
52 - No idea
53 - Blush
54 - Chuckle
55 - No idea
56 - Duck(the emote)
57 - Curious look
58 - Dance
59 - Disagree
60 - Glare
61 - Peer
62 - Kneel
63 - Laugh
64 - Point
65 - Shrug
66 - Raise hand
67 - Salute
68 - Shiver
69 - Tap Foot
70 - Bow
71 - None(?)
72 - None(?)
73 - Sit down

Example:

# After being hailed the NPC begins to dance.

sub EVENT_SAY
{
if($text=~/hail/i)
{
quest::doanim(58);
}
}

mwmdragon
03-14-2005, 03:08 PM
quest::addskill

Explaination: Increases the players skill in the skill you choose by the amount you choose.

Full Command: quest::addskill(skill,value)

skill = See the list below for a list of possible skill numbers to use.

0 - 1H Blunt
1 - 1H Slashing
2 - 2H Blunt
3 - 2H Slashing
4 - Abjuration
5 - Alteration
6 - Apply Poison
7 - Archery
8 - Backstab
9 - Bind Wound
10 - Bash
11 - Block
12 - Brass Instruments
13 - Channeling
14 - Conjuration
15 - Defense
16 - Disarm
17 - Disarm Traps
18 - Divination
19 - Dodge
20 - Double Attack
21 - Dragon Punch
22 - Duel Wield
23 - Eagle Strike
24 - Evocation
25 - Feign Death
26 - Flying Kick
27 - Forage
28 - Hand To Hand
29 - Hide
30 - Kick
31 - Meditate
32 - Mend
33 - Offense
34 - Parry
35 - Pick Lock
36 - Piercing
37 - Riposte
38 - Round Kick
39 - Safe Fall
40 - Sense Heading
41 - Sing
42 - Sneak
43 - Specialize Abjure
44 - Specialize Alteration
45 - Specialize Conjuration
46 - Specialize Divinatation
47 - Specialize Evocation
48 - Pick Pockets
49 - Stringed Instruments
50 - Swimming
51 - Throwing
52 - Tiger Claw
53 - Tracking
54 - Wind Instruments
55 - Fishing
56 - Make Poison
57 - Tinkering
58 - Research
59 - Alchemy
60 - Baking
61 - Tailoring
62 - Sense Traps
63 - Blacksmithing
64 - Fletching
65 - Brewing
66 - Alcohol Tolerance
67 - Begging
68 - Jewelry Making
69 - Pottery
70 - Percussion Instruments
71 - Intimidation
72 - Berserking
73 - Taunt

value = the amount that you want to be added to the player skill.

Example:

# After hailing the NPC the playesr baking skill is increased by 5.

sub EVENT_SAY
{
if($text=~/hail/i)
{
quest::addskill(60,5);
}
}

mwmdragon
03-14-2005, 03:08 PM
quest::me

Explaination: Makes the client do a nameless or ownerless emote as if from a narrator.

Full Command: quest::me(

mwmdragon
03-14-2005, 08:21 PM
quest::faction

Explaination: Adjusts the players faction with a chosen faction.

Full Command: quest::faction(factionid,value)

Factionid = The id of the faction you would like to adjust for the player, taken from your database.
Value = The amount you wish to adjust the players faction with the chosen faction.

Example:

# After hailing the NPC the players faction with faction ID 25 is increased by 5.

sub EVENT_SAY
{
if($text=~/hail/i)
{
quest::faction(25,5);
}
}

mwmdragon
03-14-2005, 08:22 PM
quest::setguild

Explaination: Adds a player to a certain guild and also sets their rank in that guild.

Full Command: quest::setguild(guildid,rank)

Guildid = The guild you want the player to be a member of, can be found in the database.
Rank = The rank you want the player to be. You can find or create this in your database.

Example:

# After hailing the NPC the players is now the leader of the guild number 3

sub EVENT_SAY
{
if($text=~/hail/i)
{
quest::setguild(3,0);
}
}

mwmdragon
03-14-2005, 08:22 PM
quest::rebind

Explaination: Binds the player to a chosen zone at a chosen location.

Full Command: quest::rebind(zoneid,x,y,z)

Zoneid = The ID of the zone you want to bind the player in. Can be found in your database.
X = The x Axis you would like to bind the player to. Can be found by /loc but switch the x and y.
Y = The y Axis you would like to bind the player to. Can be found by /loc but switch the x and y.
Z = The z Axis you would like to bind the player to. Can be founf by /loc.

Example:

# After hailing the NPC the players is bound to zone 21 at the location -123.43,1200.03,21.34.

sub EVENT_SAY
{
if($text=~/hail/i)
{
quest::rebind(21,-123.43,1200.03,21.34);
}
}

mwmdragon
03-14-2005, 08:23 PM
quest::flagcheck

Explaination: Checks the value of a flag, usually used for quests.

Full Command: quest::flagcheck(flag,value)

Flag = The number of the flag that you are checking.
Value = The value you are looking for when checking the flag.

Example:

# After hailing the NPC will check if flag 1 is set to 0..

sub EVENT_SAY
{
if($text=~/hail/i)
{
quest::flagcheck(1,0);
}
}

mwmdragon
03-14-2005, 08:23 PM
quest::write

Explaination:

Full Command:

Example:

mwmdragon
03-14-2005, 08:24 PM
quest::settime

Explaination: Changes the time in the zone changing the sky and lighting depending on the time set.

Full Command: quest::settime(hour,minutes)

Hour = The hour of the day in a 24 hour schedule (1:00pm = 13:00)
Minutes = The Minutes into the hour set before it.

Example:

# After hailing the NPC the time is set to five after midnight.

sub EVENT_SAY
{
if($text=~/hail/i)
{
quest::settime(0,5);
}
}

mwmdragon
03-14-2005, 08:25 PM
quest::setsky

Explaination: Changes the color of the sky.

Full Command: quest::setsky(n)

n = Anywhere from 0 to 255.

Example:

# After hailing the NPC the sky goes deep red.

sub EVENT_SAY
{
if($text=~/hail/i)
{
quest::setsky(250);
}
}

mwmdragon
03-14-2005, 08:25 PM
quest::settimer

Explanation: Starts a time the counts seconds.

Full Command: quest::(timerid,seconds)

Timerid = The ID number of the timer you would like to start. Found in the database.
Seconds = The amount of time you want the timer to run for in seconds.

Example:

# After hailing the NPC timer 1 is set to run for 3 minutes (180 seconds)

sub EVENT_SAY
{
if($text=~/hail/i)
{
quest::settimer(1,180);
}
}

mwmdragon
03-14-2005, 08:26 PM
quest::stoptimer

Explanation: Stops the chosen timer.

Full Command: quest::stoptimer(timerid)

Timerid = The ID of the timer you would like to stop. Can be found in your database.

Example:

# After hailing the NPC the time with the ID 1 is stopped.

sub EVENT_SAY
{
if($text=~/hail/i)
{
quest::stoptimer(1);
}
}

mwmdragon
03-14-2005, 08:26 PM
quest::settarget

Explanation: Sets a mobs target.

Full Command: quest::settarget(type,ID)

Type =
ID = The ID of the NPC or player to target.

Example:

mwmdragon
03-14-2005, 08:27 PM
quest::follow

Explanation: Makes the mob or NPC follow a chosen NPC or player.

Full Command: quest::follow(ID)

ID = The ID of the NPC or Player that the mob or NPC is supposed to follow.

Example:

# After hailing the NPC he follow the NPC with the ID of 1024.

sub EVENT_SAY
{
if($text=~/hail/i)
{
quest::follow(1024);
}
}

mwmdragon
03-14-2005, 08:27 PM
quest::sfollow

Explanation: Stop the mob from following a player or NPC after making it do so with the follow command.

Full Command: quest::sfollow( )

Example:

# After hailing the NPC again he stops following the player.

sub EVENT_SAY
{
if($text=~/hail/i)
{
quest::sfollow
}
}

mwmdragon
03-14-2005, 08:28 PM
quest::movepc

Explanation: Moves the player to a chosen zone to a chosen location.

Full Command: quest::movepc(zoneid,x,y,z)

Zoneid = The ID of the zone you want to move the player to. Can be found in your database.
X = The x Axis you would like to send the player to. Can be found by /loc but switch the x and y.
Y = The y Axis you would like to send the player to. Can be found by /loc but switch the x and y.
Z = The z Axis you would like to send the player to. Can be found by /loc.

Example:

# After hailing the NPC the player is moved to zone 23 at location -123.45,1200.03,-34.11.

sub EVENT_SAY
{
if($text=~/hail/i)
{
quest::movepc(23, -123.45,1200.03,-34.11);
}
}

mwmdragon
03-14-2005, 08:29 PM
quest::gmmove

Explanation: Moves the player to a chosen zone to a chosen location.

Full Command: quest::gmmove(zoneid,x,y,z)

Zoneid = The ID of the zone you want to move the player to. Can be found in your database.
X = The x Axis you would like to send the player to. Can be found by /loc but switch the x and y.
Y = The y Axis you would like to send the player to. Can be found by /loc but switch the x and y.
Z = The z Axis you would like to send the player to. Can be found by /loc.

Example:

# After hailing the NPC the player is moved to zone 18 at location -123.45,1200.03,-34.11.

sub EVENT_SAY
{
if($text=~/hail/i)
{
quest::movepc(18, -123.45,1200.03,-34.11);
}
}

mwmdragon
03-14-2005, 08:29 PM
quest::movegrp

Explanation: Moves the player and his party to a chosen zone and a chosen location.

Full Command: quest::movegrp(zoneid,x,y,z)

Zoneid = The ID of the zone you want to move the party to. Can be found in your database.
X = The x Axis you would like to send the party to. Can be found by /loc but switch the x and y.
Y = The y Axis you would like to send the party to. Can be found by /loc but switch the x and y.
Z = The z Axis you would like to send the party to. Can be found by /loc.

Example:

# After hailing the NPC the player and his party is moved to zone 7 at location -123.45,1200.03,-34.11.

sub EVENT_SAY
{
if($text=~/hail/i)
{
quest::movegrp(7, -123.45,1200.03,-34.11);
}
}

mwmdragon
03-14-2005, 08:30 PM
quest::setallskill

Explanation: Sets all the players skills to a certain value.

Full Command: quest::setallskill(n)

n = any number from 0 to 252

Example:

# After hailing the NPC all the player skills are set to the maximum of 252..

sub EVENT_SAY
{
if($text=~/hail/i)
{
quest::setallskill(252);
}
}

mwmdragon
03-14-2005, 08:30 PM
quest::attack

Explanation: Makes the mob or NPC attack anything with the chosen name.

Full Command: quest::attack(

mwmdragon
03-14-2005, 08:31 PM
quest::save

Explanation: Saves the players data to the database.

Full Command: quest::save( )

Example:

# After hailing the NPC the players data is saved.

sub EVENT_SAY
{
if($text=~/hail/i)
{
quest::save();
}
}

mwmdragon
03-14-2005, 08:32 PM
quest::setglobal

Explanation: Allows you to create or modify an existing global variable for the mob you are using the command on.

Full Command: quest::setglobal(varname,value,options,duration)

Varname = The name of the global variable. It

mwmdragon
03-14-2005, 08:32 PM
quest::targlobal

Explanation: This is a quick way to attack a bunch of information in a global variable to a mob.

Full Command: quest::targlobal(varname,value,duration,npcid,char id,zoneid)

Varname = The name of the global variable. It

mwmdragon
03-14-2005, 08:33 PM
quest::delglobal

Explanation: Deletes a global variable.

Full Command: quest::delglobal(varname)

Varname = The name of the variable to be deleted.

Example:

# After hailing the NPC the global variable megaquest is deleted.

sub EVENT_SAY
{
if($text=~/hail/i)
{
quest::delglobal(

mwmdragon
03-14-2005, 08:36 PM
Thats all the commands.

I know some data may be incorrect or not complete and I would love to correct it or even put in better examples. If you can help with this just send me the change in a PM, make sure you mark what it is for, and I'll fix it as soon as I get them PM.

I hope this helps a few people out.

As I promised Here it is in PDF Format
http://mwmdragon.homeftp.net/trade/files/misc/EQEmuPerlQuestLexicon.pdf

fathernitwit
03-16-2005, 04:29 AM
for completeness, I recommend that you add a list of valid event subs and variables which can be used in each of them. Most of it should be documented here:
http://www.projecteq.net/phpBB2/viewtopic.php?t=149

as well as some of the newer functions which actually need explaining like proximity stuff. your also missing signal stuff and some others. Also I havent had a chance to update that tutorial for the new spawn condition stuff, but it exposes three new quest functions:
void spawn_condition(const char *zone_short, uint16 condition_id, short new_value);
short get_spawn_condition(const char *zone_short, uint16 condition_id);
void toggle_spawn_event(int event_id, bool enable, bool reset_base);

Cisyouc
03-16-2005, 07:59 AM
The only problem I see with this thread is every function has its own reply so its kind of hard to follow. Id be happy to sticky a link of the PDF however..

mwmdragon
03-16-2005, 09:14 AM
Yhe pdf was in the last post after i finnished the lexicons commands.

Fathernotwit - If you can send me a list of all the new commands and a brief bit of info on the use I would love to complete the lexicon.

Cisyouc
03-26-2005, 01:19 AM
Locked.
Please see http://www.eqemulator.net/forums/showthread.php?t=18208.