Loading...   

[Show Table of Contents]


§Deliver

Set:

  • activitytype to 1
  • text1 to the name of the person the item(s) must be delivered to.
  • text2 to the name of the item that must be delivered.
  • goalcount to the number of items that must be delivered.

This will show up in the client as Deliver goalcount text2 to text1

Alternatively you can set the text3 field which will be displayed verbatim. For example, if you did not want Deliver 1 Elven Bottle of Wine to Guard Brookrock, but rather, Deliver this bottle of wine to my friend Guard Brookrock, then you would put that in the text3 field and leave the text1 and text2 fields empty.

To have this activity automatically handled by the task system without the need to write any Perl quest code, set:

  • goalmethod to 0
  • goalid to the id of the item you want delivered (from the items table).
  • delivertonpc to the id of the npc you want the item(s) delivered to (from the npc_types table).
  • zoneid should be set to 0 (any zone), or the zoneidnumber that the NPC is in.

If you wish to allow the player to deliver any out of a group of items, then you can use a list. To do this, create a list in the goallist table containing the allowable items. Then set the goalmethod to 1 and put the list number in the goalid field.

For example, if you wanted to allow the player to deliver any one of Red Wine (13030), White Wine (13031), or Elven Wine (13035), you would pick a goallist number that wasn't in use (say 2000), then insert rows 2000,13030 2000,13031 and 2000,13035 into the goallist table, and put the value 2000 in the goalid column and 1 in the goalmethod column.

* Note that this would mean the player could deliver any one of those three items to complete the activity. If you wanted the player to deliver one of each type, then you would need to create three separate activities, one for each item id, and give them the same step number.

If you wanted the completion of this activity to be done under Perl quest control, you would set the goalmethod to 2.
In the sub EVENT_ITEM section of your quest, you would call quest::updatetaskactivity(<taskid>, <activityid>, <count>)

With a goalmethod of 2, the goalid and npctypeid columns are not used.

§Kill

Set:

  • activitytype to 2
  • text1 to the name of the mob that must be killed, e.g. "Orcs" or "Orc Centurions"
  • goalcount to the number of mobs that must be killed

This will show up in the client as Kill goalcount text1

Alternatively you can set the text3 field which will be displayed verbatim. For example, if you did not want Kill 5 Orcs but rather, Slay those foul Orcs guarding the entrace to Crushbone, then you would put that in the text3 field and leave the text1 field empty.

To have this activity automatically handled by the task system without the need to write any Perl quest code, set:

  • goalmethod to 0
  • goalid to the id of the npc that must be killed (from the npc_types table).
  • zoneid should be set to 0 (any zone), or the zoneidnumber if the mobs must be killed in a particular zone to count.

If you wish to allow the player to kill any out of a group of NPC types, then you can use a list as described for the Deliver activity. For common mobs, you will probably always be using lists, since there are a lot of entries for mobs with the same name in the npc_types table which differ by level, etc.

If you wanted the completion of this activity to be done under Perl quest control, you would set the goalmethod to 2.
In the sub EVENT_KILLED_MERIT section of your quest, you would call quest::updatetaskactivity(<taskid>, <activityid>, <count>)

With a goalmethod of 2, the goalid column is not used.

§Loot

Set:

  • activitytype to 3
  • text1 to the name of the item that must be looted, e.g. "Ring Of The Ancients"
  • goalcount to the number of items that must be looted

This will show up in the client as Loot goalcount text1

Alternatively you can set the text3 field which will be displayed verbatim. For example, if you did not want Loot 1 Ring Of The Ancients but rather, Recover the Ring Of The Ancients, then you would put that in the text3 field and leave the text1 field empty.

To have this activity automatically handled by the task system without the need to write any Perl quest code, set:

goalmethod to 0
goalid to the id of the item that must be looted (from the items table).
zoneid should be set to 0 (any zone), or the zoneidnumber if the item must be looted in a particular zone to count.

If you wish to allow the player to loot any one of a group of items, then you can use a list as described for the Deliver activity.

If you wanted the completion of this activity to be done under Perl quest control, you would set the goalmethod to 2.
In the sub EVENT_LOOT section of a player quest, you could call quest::updatetaskactivity(<taskid>, <activityid>, <count>)

With a goalmethod of 2, the goalid column is not used.

§Speak With

Set:

  • activitytype to 4
  • text1 to the name of the NPC that must be spoken to, e.g. "Guard Brookrock"
  • goalcount should be set to 1

This will show up in the client as Speak with text1

Alternatively you can set the text3 field which will be displayed verbatim. For example, if you did not want Speak with Guard Brookrock but rather, Consult Guard Brookrock, then you would put that in the text3 field and leave the text1 field empty.

To have this activity automatically handled by the task system without the need to write any Perl quest code, set:

  • goalmethod to 0
  • goalid to the id of the NPC that must be spoken to (from the npc_types table).
  • zoneid should be set to 0 (any zone), or the zoneidnumber that the NPC is in.

If you wish to allow the player to speak to any one of a group of NPCs, then you can use a list as described for the Deliver activity.

If you wanted the completion of this activity to be done under Perl quest control, you would set the goalmethod to 2.
In the sub EVENT_SAY section of the quest attached to the NPC, you would call quest::updatetaskactivity(<taskid>, <activityid>, <count>)

With a goalmethod of 2, the goalid column is not used.

§Explore

Set:

  • activitytype to 5
  • text1 to a description of the area that should be explored, e.g. "the entrance to Crushbone Citadel"
  • goalcount should be set to 1

This will show up in the client as Explore text1

Alternatively you can set the text3 field which will be displayed verbatim. For example, if you did not want Explore the entrance to Crushbone Citadel but rather, Locate the entrance to the City of the Orcs, then you would put that in the text3 field and leave the text1 field empty.

To have this activity automatically handled by the task system without the need to write any Perl quest code, you will need to add a row to the proximity table. See TaskSystemDBTables. Once you have added the row and given it a unique exploreid number, in the activity table, set:

  • goalmethod to 0
  • goalid to the exploreid of your newly created row in the proximity table.
  • zoneid should be set to the zoneidnumber that the proximity is in.

It should be possible to set up multiple proximities in the same zone, using lists, such that any of the proximities will trigger the activity complete.

If you wanted the completion of this activity to be done under Perl quest control, you could either set the goalmethod to 1
You would then set up a proximity (quest::set_proximity) and call quest::taskexploredarea(exploreid) from sub EVENT_ENTER.

Alternatively, you could set the goalmethod to 2.
You would then set up a proximity (quest::set_proximity) and call quest::updatetaskactivity(<taskid>, <activityid>, 1) from sub EVENT_ENTER.

With a goalmethod of 2, the goalid column is not used.

§Tradeskill

Set:

  • activitytype to 6
  • text1 to the name of the item that the player must create, e.g. "CLASS 1 Woodpoint arrow"
  • goalcount should be set to the quantity of the item that must be created.

This will show up in the client as Create goalcount text1 using Tradeskills

Alternatively you can set the text3 field which will be displayed verbatim. For example, if you did not want Create 12 CLASS 1 Woodpoint arrows using Tadeskills but rather, Craft a dozen wooden arrows, then you would put that in the text3 field and leave the text1 field empty.

To have this activity automatically handled by the task system, set:

  • goalmethod to 0
  • goalid to the id of the item that must be created (from the items table).
  • zoneid should be set to 0 (any zone), or the zoneidnumber that the items must be created in.

If you wish to allow the player to create any one of a group of items, then you can use a list as described for the Deliver activity. Sometimes there are several items with the same name that can be created from a tradeskill, CLASS 1 Wood Point arrows being one of them.

§Fish

Set:

  • activitytype to 7
  • text1 to the name of the item that the player must catch using the fishing skill.
  • goalcount should be set to the quantity of the item that must be fished.

This will show up in the client as Fish for goalcount text1

Alternatively you can set the text3 field which will be displayed verbatim. For example, if you did not want Fish for 6 Fish but rather, Catch half-a-dozen fish, then you would put that in the text3 field and leave the text1 field empty.

To have this activity automatically handled by the task system, set:

  • goalmethod to 0
  • goalid to the id of the item that must be fished (from the items table).
  • zoneid should be set to 0 (any zone), or the zoneidnumber that the items must be fished in.

If you wish to allow the player to fish any one of a group of items, then you can use a list as described for the Deliver activity. 

§Forage

Set:

  • activitytype to 8
  • text1 to the name of the item that the player must forage.
  • goalcount should be set to the quantity of the item that must be foraged.

This will show up in the client as Forage goalcount text1

Alternatively you can set the text3 field which will be displayed verbatim. For example, if you did not want Forage 5 Mushroom but rather, Comb the Northern plains of Karana for Mushrooms, then you would put that in the text3 field and leave the text1 field empty.

To have this activity automatically handled by the task system, set:

  • goalmethod to 0
  • goalid to the id of the item that must be foraged (from the items table).
  • zoneid should be set to 0 (any zone), or the zoneidnumber that the items must be fished in.

If you wish to allow the player to forage any one of a group of items, then you can use a list as described for the Deliver activity. 

§Touch

A 'Touch' activity means to enter a specified zone. E.g. you could have a task for a lower level character in Qeynos to make the trip to Freeport , with a touch activity for each zone along the way. Of course if your server has #zone or #peqzone enabled, then this would be pointless.

Set:

  • activitytype to 11
  • text1 to the name of the zone the player must visit.
  • goalcount should be set to 1
  • zoneid should be set to the zoneidnumber of the zone the player must visit.

This will show up in the client as Touch Text1. It is more likely that you will want to use the Text3 field to set the description how you wish, e.g. "Venture forth into Qeynos Hills", "Brave the dangers of the Eastern Plains of Karana to reach High Hold Pass".

To have this activity automatically handled by the task system, set:

  • goalmethod to 0

Since the zoneid field is used to specify the zoneidnumber, the goalid field is not used. It is also not possible to specify a list of zones.

If you want the completion of this activity to be done under Perl quest control, set the goalmethod to 2. You could then use sub EVENT_ENTERZONE in a player quest to call quest::updatetaskactivity(<taskid>, <activityid>, <count>)

§Give Cash

This activity type code is not one that is known to the client, therefore you must use the text3 field to describe the activity.

Set:

  • activitytype to 100
  • text3 to the description of the activity, e.g. "Give 3500gp to Hasten Bootstrutter"
  • goalcount should be set to the quantity of cash, expressed in copper pieces.

This will show up in the client as whatever you put in the text3 field.

To have this activity automatically handled by the task system, set:

  • goalmethod to 0
  • npctypeid to the id of the NPC that the cash should be given to
  • zoneid should be set to 0 (any zone), or the zoneidnumber that the NPC is found in.

If you wanted the completion of this activity to be done under Perl quest control, you would set the goalmethod to 2.
You would then call quest::updatetaskactivity(<taskid>, <activityid>, <count>) from sub EVENT_ITEM.

§Custom Activities

  • Aside from the activity types listed here, you can make up your own. As long as the goalmethod is set to 2 (quest control) and you describe the activity in the text3 field, then you can use all the features of the Perl quest system to determine when the activity should be deemed complete, and then call quest::updatetaskactivity(<taskid>, <activityid>, <count>) at the appropriate point. It doesn't matter what activity type code you actually specify in the database, but it would make sense to pick an unused one, say 999, so that someone looking at the table would know it wasn't one of the standard activities. You could also use the text1 and text2 fields to write a brief comment on how the activity is handled, since these fields are unused when text3 is present.