1
0

A lot of lua functions documented, most have examples, not all.

This commit is contained in:
Emagi 2025-05-23 11:50:05 -04:00
parent 058df3eae6
commit ab41124e73
163 changed files with 2075 additions and 1432 deletions

View File

@ -1,19 +1,21 @@
### Function: AddQuestPrereqFaction(param1, param2, param3, param4)
### Function: AddQuestPrereqFaction(quest, faction_id, min, max)
**Description:**
Placeholder description.
CanReceiveQuest will fail if the Player does not have the faction_id within the min or max values.
**Parameters:**
- `param1`: unknown - Unknown type.
- `param2`: int32 - Integer value.
- `param3`: unknown - Unknown type.
- `param4`: unknown - Unknown type.
- `quest` (Quest) - Quest object representing `quest`.
- `faction_id` (uint32) - Integer value `faction_id`.
- `min` (int32) - Integer value `min`.
- `max` (int32) - Integer value `max`.
**Returns:** None.
**Example:**
```lua
-- Example usage
AddQuestPrereqFaction(..., ..., ..., ...)
-- Require faction id 123 with 50 - 100000 faction to allow the quest.
function Init(Quest)
AddQuestPrereqFaction(Quest, 123, 50, 100000)
end
```

View File

@ -1,18 +1,20 @@
### Function: AddQuestPrereqItem(param1, param2, param3)
### Function: AddQuestPrereqItem(quest, item_id, quantity)
**Description:**
Placeholder description.
Not implemented. CanReceiveQuest should require an item of item_id and quantity to be allowed to receive the quest.
**Parameters:**
- `param1`: unknown - Unknown type.
- `param2`: int32 - Integer value.
- `param3`: int32 - Integer value.
- `quest` (Quest) - Quest object representing `quest`.
- `item_id` (uint32) - Integer value `item_id`.
- `quantity` (int32) - Integer value `quantity`.
**Returns:** None.
**Example:**
```lua
-- Example usage
AddQuestPrereqItem(..., ..., ...)
-- Require the item with item_id 123 and a quantity of 2 be required to receive the quest.
function Init(Quest)
AddQuestPrereqItem(Quest, 123, 2)
end
```

View File

@ -1,17 +1,19 @@
### Function: AddQuestPrereqModelType(param1, param2)
### Function: AddQuestPrereqModelType(quest, model_type)
**Description:**
Placeholder description.
CanReceiveQuest checks if the Player is the model_type defined.
**Parameters:**
- `param1`: unknown - Unknown type.
- `param2`: int16 - Short integer value.
- `quest` (Quest) - Quest object representing `quest`.
- `model_type` (int32) - Integer value `model_type`.
**Returns:** None.
**Example:**
```lua
-- Example usage
AddQuestPrereqModelType(..., ...)
-- Require the Player to have a model_type of 123 for the Quest
function Init(Quest)
AddQuestPrereqModelType(Quest, 123)
end
```

View File

@ -1,17 +1,22 @@
### Function: AddQuestPrereqQuest(param1, param2)
### Function: AddQuestPrereqQuest(quest, quest_id)
**Description:**
Placeholder description.
CanReceiveQuest checks if the Player has previously completed the quest_id defined.
**Parameters:**
- `param1`: unknown - Unknown type.
- `param2`: int32 - Integer value.
- `quest` (Quest) - Quest object representing `quest`.
- `quest_id` (uint32) - Integer value `quest_id`.
**Returns:** None.
**Example:**
```lua
-- Example usage
AddQuestPrereqQuest(..., ...)
-- From Quests/FrostfangSea/the_absent_effigy.lua
function Init(Quest)
AddQuestRewardCoin(Quest, math.random(10,80), math.random(6,15), 0, 0)
AddQuestPrereqQuest(Quest, LostFroglok) -- change quest step to obtain item 'an Effigy of Mithaniel' drop from frigid whirlstorms/ The Deadly Icewind
AddQuestStepKill(Quest, 1, "I must kill frigid whirlstorms to find Splorpy's Effigy of Mithaniel.", 1, 75, "I should kill frigid whirlstorms around Gwenevyn's Cove to find Splorpy's Effigy of Mithaniel.", 1059, 4700054, 4700069)
AddQuestStepCompleteAction(Quest, 1, "GotEffigy")
end
```

View File

@ -1,17 +1,19 @@
### Function: AddQuestPrereqRace(param1, param2)
### Function: AddQuestPrereqRace(quest, race)
**Description:**
Placeholder description.
CanReceiveQuest requires the Player to be of a specific race ID.
**Parameters:**
- `param1`: unknown - Unknown type.
- `param2`: int8 - Small integer or boolean flag.
- `quest` (Quest) - Quest object representing `quest`.
- `race` (int32) - Integer value `race`.
**Returns:** None.
**Example:**
```lua
-- Example usage
AddQuestPrereqRace(..., ...)
-- Require the Player to have a race of 1 (Dark Elf) for the Quest
function Init(Quest)
AddQuestPrereqRace(Quest, 1)
end
```

View File

@ -1,18 +1,19 @@
### Function: AddQuestPrereqTradeskillClass(param1, param2, param3)
### Function: AddQuestPrereqTradeskillClass(quest, class_id)
**Description:**
Placeholder description.
CanReceiveQuest requires the Player to be of the tradeskill class with class_id.
**Parameters:**
- `param1`: unknown - Unknown type.
- `param2`: unknown - Unknown type.
- `param3`: int8 - Small integer or boolean flag.
- `quest` (Quest) - Quest object representing `quest`.
- `class_id` (uint32) - Integer value `class_id`.
**Returns:** None.
**Example:**
```lua
-- Example usage
AddQuestPrereqTradeskillClass(..., ..., ...)
-- Require the Player to have a tradeskill class of 46 (Craftsman)
function Init(Quest)
AddQuestPrereqTradeskillClass(Quest, 46)
end
```

View File

@ -1,18 +1,19 @@
### Function: AddQuestPrereqTradeskillLevel(param1, param2, param3)
### Function: AddQuestPrereqTradeskillLevel(quest, level)
**Description:**
Placeholder description.
CanReceiveQuest requires the Player to be of the tradeskill level defined.
**Parameters:**
- `param1`: unknown - Unknown type.
- `param2`: unknown - Unknown type.
- `param3`: int8 - Small integer or boolean flag.
- `quest` (Quest) - Quest object representing `quest`.
- `level` (int32) - Integer value `level`.
**Returns:** None.
**Example:**
```lua
-- Example usage
AddQuestPrereqTradeskillLevel(..., ..., ...)
-- Require the Player to have a tradeskill level of 25
function Init(Quest)
AddQuestPrereqTradeskillLevel(Quest, 25)
end
```

View File

@ -1,20 +1,30 @@
### Function: AddQuestRewardCoin(param1, param2, param3, param4, param5)
### Function: AddQuestRewardCoin(quest, copper, silver, gold, plat)
**Description:**
Placeholder description.
Upon completion of the quest the Player will receive the copper, silver, gold, platinum described.
**Parameters:**
- `param1`: unknown - Unknown type.
- `param2`: int32 - Integer value.
- `param3`: int32 - Integer value.
- `param4`: int32 - Integer value.
- `param5`: int32 - Integer value.
- `quest` (Quest) - Quest object representing `quest`.
- `copper` (int32) - Integer value `copper`.
- `silver` (int32) - Integer value `silver`.
- `gold` (int32) - Integer value `gold`.
- `plat` (int32) - Integer value `plat`.
**Returns:** None.
**Example:**
```lua
-- Example usage
AddQuestRewardCoin(..., ..., ..., ..., ...)
-- From Quests/EnchantedLands/Drodo'sGoodies.lua
function Init(Quest)
AddQuestRewardCoin(Quest, math.random(10,95), math.random(39,49), math.random(1,1), 0)
AddQuestStepKill(Quest, 1, "I must hunt grove badgers.", 1, 40, "I must hunt the critters near the granary in Enchanted Lands. They should have Drodo's goodies.", 2299, 390041)
AddQuestStepKill(Quest, 2, "I must hunt lancer wasps.", 1, 40, "I must hunt the critters near the granary in Enchanted Lands. They should have Drodo's goodies.", 1229, 390092)
AddQuestStepKill(Quest, 3, "I must hunt klakrok drones.", 1, 40, "I must hunt the critters near the granary in Enchanted Lands. They should have Drodo's goodies.", 1225, 390069)
AddQuestStepKill(Quest, 4, "I must hunt briarpaw cubs.", 1, 40, "I must hunt the critters near the granary in Enchanted Lands. They should have Drodo's goodies.", 928, 390104)
AddQuestStepCompleteAction(Quest, 1, "deck")
AddQuestStepCompleteAction(Quest, 2, "comb")
AddQuestStepCompleteAction(Quest, 3, "dice")
AddQuestStepCompleteAction(Quest, 4, "box")
end
```

View File

@ -1,18 +1,15 @@
### Function: AddQuestRewardFaction(param1, param2, param3)
### Function: AddQuestRewardFaction(quest, faction_id, amount)
**Description:**
Placeholder description.
CanReceiveQuest requires the minimum faction amount with the faction_id specified.
**Parameters:**
- `param1`: unknown - Unknown type.
- `param2`: int32 - Integer value.
- `param3`: unknown - Unknown type.
- `quest` (Quest) - Quest object representing `quest`.
- `faction_id` (uint32) - Integer value `faction_id`.
- `amount` (int32) - Quantity `amount`.
**Returns:** None.
**Example:**
```lua
-- Example usage
AddQuestRewardFaction(..., ..., ...)
```
Example Required

View File

@ -1,18 +1,37 @@
### Function: AddQuestRewardItem(param1, param2, param3)
### Function: AddQuestRewardItem(quest, item_id, quantity)
**Description:**
Placeholder description.
Adds a rewarded item for completion of the current Quest. Triggered by calling the LUA Function `GiveQuestReward` on completion of the Quest.
**Parameters:**
- `param1`: unknown - Unknown type.
- `param2`: int32 - Integer value.
- `param3`: int32 - Integer value.
- `quest` (Quest) - Quest object representing `quest`.
- `item_id` (uint32) - Integer value `item_id`.
- `quantity` (int32) - Integer value `quantity`.
**Returns:** None.
**Example:**
```lua
-- Example usage
AddQuestRewardItem(..., ..., ...)
-- From Quests/Peatbog/FarSeasDirectRequisitionPBG0162.lua
local MARINER_STITCHED_BRACERS_ID = 164053
local MARINER_STITCHED_SHAWL_ID = 164058
local MARINER_STITCHED_SLIPPERS_ID = 164059
function Init(Quest)
local chance = math.random(1, 3)
if chance == 1 then
AddQuestRewardItem(Quest, MARINER_STITCHED_BRACERS_ID)
elseif chance == 2 then
AddQuestRewardItem(Quest, MARINER_STITCHED_SHAWL_ID)
elseif chance == 3 then
AddQuestRewardItem(Quest, MARINER_STITCHED_SLIPPERS_ID)
end
SetQuestFeatherColor(Quest, 3)
SetQuestRepeatable(Quest)
AddQuestStepKill(Quest, 1, "I must kill some bog slugs", 10, 100, "I must hunt down the creatures in the Peat Bog to fill the requisition.", 289, BOG_SLUG_ID)
AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
end
```

View File

@ -1,18 +1,28 @@
### Function: AddQuestSelectableRewardItem(param1, param2, param3)
### Function: AddQuestSelectableRewardItem(quest, item_id, quantity)
**Description:**
Placeholder description.
Adds a selectable reward item for completion of the current Quest. Triggered by calling the LUA Function `GiveQuestReward` on completion of the Quest.
**Parameters:**
- `param1`: unknown - Unknown type.
- `param2`: int32 - Integer value.
- `param3`: int8 - Small integer or boolean flag.
- `quest` (Quest) - Quest object representing `quest`.
- `item_id` (uint32) - Integer value `item_id`.
- `quantity` (int32) - Integer value `quantity`.
**Returns:** None.
**Example:**
```lua
-- Example usage
AddQuestSelectableRewardItem(..., ..., ...)
-- Made up example
local MARINER_STITCHED_BRACERS_ID = 164053
local MARINER_STITCHED_SHAWL_ID = 164058
local MARINER_STITCHED_SLIPPERS_ID = 164059
function Init(Quest)
-- allows one item to be selected as an end reward of the quest
AddQuestSelectableRewardItem(Quest, MARINER_STITCHED_BRACERS_ID)
AddQuestSelectableRewardItem(Quest, MARINER_STITCHED_SHAWL_ID)
AddQuestSelectableRewardItem(Quest, MARINER_STITCHED_SLIPPERS_ID)
end
```

View File

@ -1,30 +1,27 @@
### Function: AddQuestStep(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15)
### Function: AddQuestStep(quest, step, description, quantity, percentage, str_taskgroup, icon, usableitemid)
**Description:**
Placeholder description.
Adds a displayable step in the players quest journal to help them determine their next action to Complete the step.
**Parameters:**
- `param1`: unknown - Unknown type.
- `param2`: unknown - Unknown type.
- `param3`: int32 - Integer value.
- `param4`: int32 - Integer value.
- `param5`: string - String value.
- `param6`: string - String value.
- `param7`: int32 - Integer value.
- `param8`: int32 - Integer value.
- `param9`: float - Floating point value.
- `param10`: float - Floating point value.
- `param11`: string - String value.
- `param12`: string - String value.
- `param13`: int16 - Short integer value.
- `param14`: int16 - Short integer value.
- `param15`: int32 - Integer value.
- `quest` (Quest) - Quest object representing `quest`.
- `step` (int32) - Integer value `step`.
- `description` (int32) - Integer value `description`.
- `quantity` (int32) - Integer value `quantity`.
- `percentage` (int32) - Integer value `percentage`.
- `str_taskgroup` (string) - String `str_taskgroup`.
- `icon` (int32) - Integer value `icon`.
- `usableitemid` (uint32) - Integer value `usableitemid`.
**Returns:** None.
**Example:**
```lua
-- Example usage
AddQuestStep(..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ...)
-- From Quests/Antonica/ancient_kite_shield.lua
function Step1Complete(Quest, QuestGiver, Player)
UpdateQuestStepDescription(Quest, 1, "I've rinsed a lot of dirt from the shield.")
AddQuestStep(Quest,2,"I should inspect the shield again.",1, 100,"If I'm going to clean this shield and return to working condition, I'll need to put some effort into it.", 2268)
AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
end
```

View File

@ -1,21 +1,30 @@
### Function: AddQuestStepChat(param1, param2, param3, param4, param5, param6)
### Function: AddQuestStepChat(quest, step, description, quantity, str_taskgroup, icon, npc_id)
**Description:**
Placeholder description.
Adds a displayable chat step in the players quest journal to point them towards an NPC their next action to Complete the step. The npc_id will need to match the destination NPC's spawn id if you select them and do /spawn details or refer to the spawn table in the database. This supports multiple npc_id's where only one must match.
**Parameters:**
- `param1`: unknown - Unknown type.
- `param2`: int32 - Integer value.
- `param3`: string - String value.
- `param4`: int32 - Integer value.
- `param5`: string - String value.
- `param6`: int16 - Short integer value.
- `quest` (Quest) - Quest object representing `quest`.
- `step` (int32) - Integer value `step`.
- `description` (int32) - Integer value `description`.
- `quantity` (int32) - Integer value `quantity`.
- `str_taskgroup` (string) - String `str_taskgroup`.
- `icon` (int32) - Integer value `icon`.
- `npc_id` (int32) - Integer value `npc_id`.
**Returns:** None.
**Example:**
```lua
-- Example usage
AddQuestStepChat(..., ..., ..., ..., ..., ...)
-- From Quests/AlphaTest/stowaway_antonica.lua
function Step1Complete(Quest)
UpdateQuestStepDescription(Quest, 1, "I have arrived in Antonica mostly intact.")
AddQuestStepChat(Quest, 2, "I need to meet up with the Shady Swashbuckler near the lighthouse in Antonica.", 1, "The Shady Swashbuckler provided me passage to Antonica. He will have the paperwork I need when I get there.", 11, 121874)
AddQuestStepObtainItem(Quest, 3, "I must fill out Qeynos Citizenship papers.", 1,100, "The Shady Swashbuckler provided me passage to Antonica. He will have the paperwork I need when I get there.", 75, 1001095)
AddQuestStepObtainItem(Quest, 4, "I must fill out Class Certification paperwork.", 1,100, "The Shady Swashbuckler provided me passage to Antonica. He will have the paperwork I need when I get there.", 2183, 1001096,1001097,1001098,1001099,1001100,1001101,1001102,1001103,1001104,1001105,1001106,1001107)
AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
end
```

View File

@ -1,18 +1,32 @@
### Function: AddQuestStepCompleteAction(param1, param2, param3)
### Function: AddQuestStepCompleteAction(quest, step, action)
**Description:**
Placeholder description.
Sets the function to call when the quest step is completed.
**Parameters:**
- `param1`: unknown - Unknown type.
- `param2`: int32 - Integer value.
- `param3`: string - String value.
- `quest` (Quest) - Quest object representing `quest`.
- `step` (int32) - Integer value `step`.
- `action` (int32) - Integer value `action`.
**Returns:** None.
**Example:**
```lua
-- Example usage
AddQuestStepCompleteAction(..., ..., ...)
-- From Quests/AlphaTest/stowaway_antonica.lua
function Init(Quest)
AddQuestStepZoneLoc(Quest, 1, "I must ride to Antonica...", 12, "The Shady Swashbuckler provided me passage to Antonica. He will have the paperwork I need when I get there.", 2285, 395.79, -38.56, 809.38,12)
AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
end
function Step1Complete(Quest)
UpdateQuestStepDescription(Quest, 1, "I have arrived in Antonica mostly intact.")
AddQuestStepChat(Quest, 2, "I need to meet up with the Shady Swashbuckler near the lighthouse in Antonica.", 1, "The Shady Swashbuckler provided me passage to Antonica. He will have the paperwork I need when I get there.", 11, 121874)
AddQuestStepObtainItem(Quest, 3, "I must fill out Qeynos Citizenship papers.", 1,100, "The Shady Swashbuckler provided me passage to Antonica. He will have the paperwork I need when I get there.", 75, 1001095)
AddQuestStepObtainItem(Quest, 4, "I must fill out Class Certification paperwork.", 1,100, "The Shady Swashbuckler provided me passage to Antonica. He will have the paperwork I need when I get there.", 2183, 1001096,1001097,1001098,1001099,1001100,1001101,1001102,1001103,1001104,1001105,1001106,1001107)
AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
end
```

View File

@ -1,22 +1,29 @@
### Function: AddQuestStepCraft(param1, param2, param3, param4, param5, param6, param7)
### Function: AddQuestStepCraft(quest, step, description, quantity, percentage, str_taskgroup, icon, crafted_item_id)
**Description:**
Placeholder description.
Adds a quest step to the player's journal requiring a craft related action be performed. The result expected item can be specified as a number of last arguments crafted_item_id.
**Parameters:**
- `param1`: unknown - Unknown type.
- `param2`: int32 - Integer value.
- `param3`: string - String value.
- `param4`: int32 - Integer value.
- `param5`: float - Floating point value.
- `param6`: string - String value.
- `param7`: int16 - Short integer value.
- `quest` (Quest) - Quest object representing `quest`.
- `step` (int32) - Integer value `step`.
- `description` (int32) - Integer value `description`.
- `quantity` (int32) - Integer value `quantity`.
- `percentage` (int32) - Integer value `percentage`.
- `str_taskgroup` (string) - String `str_taskgroup`.
- `icon` (int32) - Integer value `icon`.
- `crafted_item_id` (int32) - Integer value `crafted_item_id`.
**Returns:** None.
**Example:**
```lua
-- Example usage
AddQuestStepCraft(..., ..., ..., ..., ..., ..., ...)
-- From Quests/CityofFreeport/the_stein_of_moggok_it_can_be_rebuilt.lua
function Step7Complete(Quest, QuestGiver, Player)
UpdateQuestStepDescription(Quest, 7, "I spoke with Rumdum.")
UpdateQuestTaskGroupDescription(Quest, 4, "I spoke with Rumdum.")
GiveQuestItem(Quest, Player, "I spoke with Rumdum." , 13961, 14072, 31562)
AddQuestStepCraft(Quest, 8, "I need to remake the Stein of Moggok.", 1, 100, "I need to remake the Stein of Moggok using Rumdum's family Recipe.", 11, 54775)
AddQuestStepCompleteAction(Quest, 8, "QuestComplete")
end
```

View File

@ -1,22 +1,28 @@
### Function: AddQuestStepHarvest(param1, param2, param3, param4, param5, param6, param7)
### Function: AddQuestStepHarvest(quest, step, description, quantity, percentage, str_taskgroup, icon, harvested_item_id)
**Description:**
Placeholder description.
Adds a quest step to the player's journal requiring a harvest related action be performed. The result expected item can be specified as a number of last arguments crafted_item_id of the item to harvest.
**Parameters:**
- `param1`: unknown - Unknown type.
- `param2`: int32 - Integer value.
- `param3`: string - String value.
- `param4`: int32 - Integer value.
- `param5`: float - Floating point value.
- `param6`: string - String value.
- `param7`: int16 - Short integer value.
- `quest` (Quest) - Quest object representing `quest`.
- `step` (int32) - Integer value `step`.
- `description` (int32) - Integer value `description`.
- `quantity` (int32) - Integer value `quantity`.
- `percentage` (int32) - Integer value `percentage`.
- `str_taskgroup` (string) - String `str_taskgroup`.
- `icon` (int32) - Integer value `icon`.
- `harvested_item_id` (int32) - Integer value `harvested_item_id`.
**Returns:** None.
**Example:**
```lua
-- Example usage
AddQuestStepHarvest(..., ..., ..., ..., ..., ..., ...)
-- From Quests/Antonica/meteoric_hoop.lua
function Step2Complete(Quest, QuestGiver, Player)
UpdateQuestStepDescription(Quest, 2, "I've applied the ink and made the chunk a lot darker.")
AddQuestStepHarvest(Quest, 3, "I need to harvest some Sandwashed Rock to make a hoop.", 1, 100, "I need to harvest a lot of Sandwashed Rock to make a hoop.", 1186, 121172)
AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
end
```

View File

@ -1,22 +1,27 @@
### Function: AddQuestStepLocation(param1, param2, param3, param4, param5, param6, param7)
### Function: AddQuestStepLocation(quest, step, description, max_variation, str_taskgroup, icon, dest_x, dest_y, dest_z)
**Description:**
Placeholder description.
Adds a quest step to the player's journal requiring a location be reached for the complete action to be performed. The dest_x, dest_y, dest_z can be repeated in sequence to add multiple potential locations to reach.
**Parameters:**
- `param1`: unknown - Unknown type.
- `param2`: unknown - Unknown type.
- `param3`: int32 - Integer value.
- `param4`: string - String value.
- `param5`: float - Floating point value.
- `param6`: string - String value.
- `param7`: int16 - Short integer value.
- `quest` (Quest) - Quest object representing `quest`.
- `step` (int32) - Integer value `step`.
- `description` (int32) - Integer value `description`.
- `max_variation` (int32) - Integer value `max_variation`.
- `str_taskgroup` (string) - String `str_taskgroup`.
- `icon` (int32) - Integer value `icon`.
- `dest_x` (float) - Float value `dest_x`.
- `dest_y` (float) - Float value `dest_y`.
- `dest_z` (float) - Float value `dest_z`.
**Returns:** None.
**Example:**
```lua
-- Example usage
AddQuestStepLocation(..., ..., ..., ..., ..., ..., ...)
-- From Quests/Antonica/history_of_the_ayrdal_part_i.lua
function Init(Quest)
AddQuestStepLocation(Quest, 1, "I need to visit Glade of the Coven.", 10, "I would like to visit the Glade of the Coven in Antonica.", 11, 160, -24, 441)
AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
end
```

View File

@ -1,22 +1,31 @@
### Function: AddQuestStepObtainItem(param1, param2, param3, param4, param5, param6, param7)
### Function: AddQuestStepObtainItem(quest, step, description, quantity, percentage, str_taskgroup, icon, obtain_item_id)
**Description:**
Placeholder description.
Adds a quest step to the player's journal requiring an item be obtained for the complete action to be performed. Multiple obtain_item_id's can be passed with only one requiring to match. The player must obtain the item either by looting, item purchase (such as merchant, broker), summon item.
**Parameters:**
- `param1`: unknown - Unknown type.
- `param2`: int32 - Integer value.
- `param3`: string - String value.
- `param4`: int32 - Integer value.
- `param5`: float - Floating point value.
- `param6`: string - String value.
- `param7`: int16 - Short integer value.
- `quest` (Quest) - Quest object representing `quest`.
- `step` (int32) - Integer value `step`.
- `description` (int32) - Integer value `description`.
- `quantity` (int32) - Integer value `quantity`.
- `percentage` (int32) - Integer value `percentage`.
- `str_taskgroup` (string) - String `str_taskgroup`.
- `icon` (int32) - Integer value `icon`.
- `obtain_item_id` (int32) - Integer value `obtain_item_id`.
**Returns:** None.
**Example:**
```lua
-- Example usage
AddQuestStepObtainItem(..., ..., ..., ..., ..., ..., ...)
-- From Quests/AlphaTest/stowaway_antonica.lua
function Step1Complete(Quest)
UpdateQuestStepDescription(Quest, 1, "I have arrived in Antonica mostly intact.")
AddQuestStepChat(Quest, 2, "I need to meet up with the Shady Swashbuckler near the lighthouse in Antonica.", 1, "The Shady Swashbuckler provided me passage to Antonica. He will have the paperwork I need when I get there.", 11, 121874)
AddQuestStepObtainItem(Quest, 3, "I must fill out Qeynos Citizenship papers.", 1,100, "The Shady Swashbuckler provided me passage to Antonica. He will have the paperwork I need when I get there.", 75, 1001095)
AddQuestStepObtainItem(Quest, 4, "I must fill out Class Certification paperwork.", 1,100, "The Shady Swashbuckler provided me passage to Antonica. He will have the paperwork I need when I get there.", 2183, 1001096,1001097,1001098,1001099,1001100,1001101,1001102,1001103,1001104,1001105,1001106,1001107)
AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
end
```

View File

@ -1,18 +1,15 @@
### Function: AddQuestStepProgressAction(param1, param2, param3)
### Function: AddQuestStepProgressAction(quest, step, action)
**Description:**
Placeholder description.
This can be used to call a LUA function when a quest step progresses successfully (such as a kill 1/10 or item 1/10).
**Parameters:**
- `param1`: unknown - Unknown type.
- `param2`: int32 - Integer value.
- `param3`: string - String value.
- `quest` (Quest) - Quest object representing `quest`.
- `step` (int32) - Integer value `step`.
- `action` (int32) - Integer value `action`.
**Returns:** None.
**Example:**
```lua
-- Example usage
AddQuestStepProgressAction(..., ..., ...)
```
Example Required

View File

@ -1,22 +1,28 @@
### Function: AddQuestStepSpell(param1, param2, param3, param4, param5, param6, param7)
### Function: AddQuestStepSpell(quest, step, description, quantity, percentage, str_taskgroup, icon, cast_spell_id)
**Description:**
Placeholder description.
Adds a quest step to the Player's journal requiring that they use a spell id supplied by cast_spell_id.
**Parameters:**
- `param1`: unknown - Unknown type.
- `param2`: int32 - Integer value.
- `param3`: string - String value.
- `param4`: int32 - Integer value.
- `param5`: float - Floating point value.
- `param6`: string - String value.
- `param7`: int16 - Short integer value.
- `quest` (Quest) - Quest object representing `quest`.
- `step` (int32) - Integer value `step`.
- `description` (int32) - Integer value `description`.
- `quantity` (int32) - Integer value `quantity`.
- `percentage` (int32) - Integer value `percentage`.
- `str_taskgroup` (string) - String `str_taskgroup`.
- `icon` (int32) - Integer value `icon`.
**Returns:** None.
**Example:**
```lua
-- Example usage
AddQuestStepSpell(..., ..., ..., ..., ..., ..., ...)
-- From Quests/BeggarsCourt/dirty_work.lua
function Step2_Complete_Listened(Quest, QuestGiver, Player)
UpdateQuestStepDescription(Quest, 2, "I have learned the location that the meeting will take place in.")
UpdateQuestTaskGroupDescription(Quest, 2, "I have learned the location that the meeting will take place in.")
AddQuestStepSpell(Quest, 3, "I must poison the cups in the room in the southeastern area of the Beggar's Court, east of the inn.", 1, 100, "I need to poison the cups at the meeting place.", 0, A_MUG_TO_POISON)
AddQuestStepCompleteAction(Quest, 3, "Step3_Complete_CupsPoisoned")
end
```

View File

@ -1,22 +1,28 @@
### Function: AddQuestStepZoneLoc(param1, param2, param3, param4, param5, param6, param7)
### Function: AddQuestStepZoneLoc(quest, step, description, max_variation, str_taskgroup, icon, dest_x, dest_y, dest_z, dest_zone_id)
**Description:**
Placeholder description.
Adds a quest step to the Player's journal requiring a new destination location be reached and can also supply a different zone id. The dest parameters can be repeated for multiple possible locations.
**Parameters:**
- `param1`: unknown - Unknown type.
- `param2`: unknown - Unknown type.
- `param3`: int32 - Integer value.
- `param4`: string - String value.
- `param5`: float - Floating point value.
- `param6`: string - String value.
- `param7`: int16 - Short integer value.
- `quest` (Quest) - Quest object representing `quest`.
- `step` (int32) - Integer value `step`.
- `description` (int32) - Integer value `description`.
- `max_variation` (int32) - Integer value `max_variation`.
- `str_taskgroup` (string) - String `str_taskgroup`.
- `icon` (int32) - Integer value `icon`.
- `dest_x` (float) - Float value `dest_x`.
- `dest_y` (float) - Float value `dest_y`.
- `dest_z` (float) - Float value `dest_z`.
- `dest_zone_id` (int32) - Integer value `dest_zone_id`.
**Returns:** None.
**Example:**
```lua
-- Example usage
AddQuestStepZoneLoc(..., ..., ..., ..., ..., ..., ...)
-- From Quests/AlphaTest/stowaway_antonica.lua
function Init(Quest)
AddQuestStepZoneLoc(Quest, 1, "I must ride to Antonica...", 12, "The Shady Swashbuckler provided me passage to Antonica. He will have the paperwork I need when I get there.", 2285, 395.79, -38.56, 809.38,12)
AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
end
```

View File

@ -1,21 +1,21 @@
### Function: AddQuestUsableItem(param1, param2, param3, param4, param5, param6)
### Function: AddQuestUsableItem(quest, step, description, max_variation, str_taskgroup, icon, dest_x, dest_y, dest_z)
**Description:**
Placeholder description.
Adds a quest step to the Player's journal requiring a new destination location be reached and can also supply a different zone id. The dest parameters can be repeated for multiple possible locations. This acts just like a location marker, nothing points to checking item id's.
**Parameters:**
- `param1`: unknown - Unknown type.
- `param2`: int32 - Integer value.
- `param3`: string - String value.
- `param4`: float - Floating point value.
- `param5`: string - String value.
- `param6`: int16 - Short integer value.
- `quest` (Quest) - Quest object representing `quest`.
- `step` (int32) - Integer value `step`.
- `description` (int32) - Integer value `description`.
- `max_variation` (int32) - Integer value `max_variation`.
- `str_taskgroup` (string) - String `str_taskgroup`.
- `icon` (int32) - Integer value `icon`.
- `dest_x` (float) - Float value `dest_x`.
- `dest_y` (float) - Float value `dest_y`.
- `dest_z` (float) - Float value `dest_z`.
**Returns:** None.
**Example:**
```lua
-- Example usage
AddQuestUsableItem(..., ..., ..., ..., ..., ...)
```
Example Required

View File

@ -1,17 +1,16 @@
### Function: AddRecipeBookToPlayer(param1, param2)
### Function: AddRecipeBookToPlayer(player, recipe_book_id)
**Description:**
Placeholder description.
Adds a recipe book to the Player's.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: int32 - Integer value.
- `player` (Spawn) - Spawn object representing `player`.
- `recipe_book_id` (uint32) - Integer value `recipe_book_id`.
**Returns:** None.
**Example:**
```lua
-- Example usage
AddRecipeBookToPlayer(..., ...)
AddRecipeBook(Player, 1)
```

View File

@ -1,18 +1,15 @@
### Function: AddRespawn(param1, param2, param3)
### Function: AddRespawn(zone, location_id, respawn_time)
**Description:**
Placeholder description.
Creates a new respawn using the location_id for the Zone and sets the respawn_time provided.
**Parameters:**
- `param1`: ZoneServer - The zone object.
- `param2`: int32 - Integer value.
- `param3`: int32 - Integer value.
- `zone` (Zone) - Zone object representing `zone`.
- `location_id` (uint32) - Integer value `location_id`.
- `respawn_time` (int32) - Time value `respawn_time` in seconds.
**Returns:** None.
**Example:**
```lua
-- Example usage
AddRespawn(..., ..., ...)
```
Example Required

View File

@ -1,20 +1,24 @@
### Function: AddSkillBonus(param1, param2, param3, param4, param5)
### Function: AddSkillBonus(spawn, skill_id, value)
**Description:**
Placeholder description.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: unknown - Unknown type.
- `param4`: int32 - Integer value.
- `param5`: float - Floating point value.
- `luaspell` (int32) - Integer value `luaspell`.
- `skill_id` (uint32) - Integer value `skill_id`.
- `value` (int32) - Integer value `value`.
**Returns:** None.
**Example:**
```lua
-- Example usage
AddSkillBonus(..., ..., ..., ..., ...)
-- From Spells/AA/BattlemagesFervor.lua
function cast(Caster, Target, SkillAmt)
AddSkillBonus(Target, GetSkillIDByName("Focus"), SkillAmt)
AddSkillBonus(Target, GetSkillIDByName("Disruption"), SkillAmt)
AddSkillBonus(Target, GetSkillIDByName("Subjugation"), SkillAmt)
AddSkillBonus(Target, GetSkillIDByName("Ordination"), SkillAmt)
Say(Caster, "need formula")
end
```

View File

@ -1,17 +1,25 @@
### Function: AddSpawnAccess(param1, param2)
### Function: AddSpawnAccess(Spawn, Player)
**Description:**
Placeholder description.
Allows `Player` access to `Spawn` visually and such as for restricting to Quest only Player's.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: Spawn - The spawn or entity involved.
- `Spawn` (Spawn) - Spawn object representing `Spawn`.
- `Player` (Spawn) - Spawn object value `Player`.
**Returns:** None.
**Example:**
```lua
-- Example usage
AddSpawnAccess(..., ...)
-- From ItemScripts/BowlOfTerratrodderChuck.lua
function used(Item, Player)
if HasQuest(Player, AMindOfMyOwn) then
if GetZoneID(GetZone(Player)) == 108 then
RemoveItem(Player, TerratrodderChuck)
local bucket = SpawnMob(GetZone(Player), 1081002, 1, GetX(Player), GetY(Player), GetZ(Player), GetHeading(Player))
AddSpawnAccess(bucket, Player)
SetTempVariable(bucket, "PlayerPointer", Player)
end
```

View File

@ -1,20 +1,15 @@
### Function: AddSpawnIDAccess(param1, param2, param3, param4, param5)
### Function: AddSpawnIDAccess(Player, spawn_id, zone)
**Description:**
Placeholder description.
Adds Player to the access list of the spawn_id provided. Zone is optional, it will use Player's zone to determine any Spawn's in zone based on the spawn_id provided.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: unknown - Unknown type.
- `param4`: int32 - Integer value.
- `param5`: ZoneServer - The zone object.
- `Player` (Spawn) - Spawn object representing `Player`.
- `spawn_id` (uint32) - Integer value `spawn_id`.
- `zone` (Zone) - Zone object representing `zone`.
**Returns:** None.
**Example:**
```lua
-- Example usage
AddSpawnIDAccess(..., ..., ..., ..., ...)
```
Example Required

View File

@ -1,17 +1,29 @@
### Function: AddSpawnToGroup(param1, param2)
### Function: AddSpawnToGroup(spawn, new_group_id)
**Description:**
Placeholder description.
Combines Spawn into the specified new_group_id which will link the Spawn's together in an encounter and they will engage and assist each other as a group.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: int32 - Integer value.
- `spawn` (Spawn) - Spawn object representing `spawn`.
- `new_group_id` (uint32) - Integer value `new_group_id`.
**Returns:** None.
**Example:**
```lua
-- Example usage
AddSpawnToGroup(..., ...)
-- From SpawnScripts/IsleRefuge1/GoblinSaboteurFirepit.lua
function Grouping(NPC,Spawn)
local zone = GetZone(NPC)
Gob1 = GetSpawnByLocationID(zone,133776460)
Gob2 = GetSpawnByLocationID(zone,133776463)
Gob3 = GetSpawnByLocationID(zone,133776464)
Gob4 = GetSpawnByLocationID(zone,133776458)
Gob5 = GetSpawnByLocationID(zone,133776459)
AddSpawnToGroup(Gob1,1051222)
AddSpawnToGroup(Gob2,1051222)
AddSpawnToGroup(Gob3,"1051222")
AddSpawnToGroup(Gob4,"1051222")
AddSpawnToGroup(Gob5,"1051222")
end
```

View File

@ -1,19 +1,27 @@
### Function: GetSpellCaster(param1, param2, param3, param4)
### Function: GetSpellCaster(spell)
**Description:**
Placeholder description.
Obtain the Spawn 'Caster' of the Spell. The `spell` field is optional, it will otherwise be in a Spell Script which defaults to getting the current spell caster.
**Parameters:**
- `param1`: unknown - Unknown type.
- `param2`: unknown - Unknown type.
- `param3`: unknown - Unknown type.
- `param4`: unknown - Unknown type.
- `spell` (Spell) - Spell object representing `spell`.
**Returns:** None.
**Example:**
```lua
-- Example usage
GetSpellCaster(..., ..., ..., ...)
-- From Spells/Priest/Cleric/Inquisitor/ContriteGrace.lua
function proc(Caster, Target, Type, MinValHeal, MaxValHeal, MinValDamage, MaxValDamage)
local initial_caster = GetSpellCaster()
if initial_caster ~= nil and Type == 15 then
MinValHeal = CalculateRateValue(initial_caster, Target, GetSpellRequiredLevel(initial_caster), GetCasterSpellLevel(), 3.75, MinValHeal)
MaxValHeal = CalculateRateValue(initial_caster, Target, GetSpellRequiredLevel(initial_caster), GetCasterSpellLevel(), 3.75, MaxValHeal)
MinValDamage = CalculateRateValue(initial_caster, Target, GetSpellRequiredLevel(initial_caster), GetCasterSpellLevel(), 1.25, MinValDamage)
MaxValDamage = CalculateRateValue(initial_caster, Target, GetSpellRequiredLevel(initial_caster), GetCasterSpellLevel(), 1.25, MaxValDamage)
SpellHeal("heal", MinValHeal, MaxValHeal, Caster, 0, 0, "Atoning Faith")
ProcDamage(initial_caster, Target, "Atoning Faith", 7, MinValDamage, MaxValDamage)
RemoveTriggerFromSpell(1)
end
```

View File

@ -1,20 +1,13 @@
### Function: GetSpellInitialTarget(param1, param2, param3, param4, param5)
### Function: GetSpellInitialTarget(spell)
**Description:**
Placeholder description.
Obtain the Initial Target of the Spell. The `spell` field is optional, it will otherwise be in a Spell Script which defaults to the current spell's initial target.
**Parameters:**
- `param1`: unknown - Unknown type.
- `param2`: unknown - Unknown type.
- `param3`: unknown - Unknown type.
- `param4`: unknown - Unknown type.
- `param5`: unknown - Unknown type.
- `spell` (Spell) - Spell object representing `spell`.
**Returns:** None.
**Example:**
```lua
-- Example usage
GetSpellInitialTarget(..., ..., ..., ..., ...)
```
Example Required

View File

@ -1,17 +1,29 @@
### Function: GetSpellName(param1, param2)
### Function: GetSpellName(spell)
**Description:**
Placeholder description.
Obtain the Spell Name of the Spell. Must be used in a Spell Script.
**Parameters:**
- `param1`: unknown - Unknown type.
- `param2`: unknown - Unknown type.
- None
**Returns:** None.
**Example:**
```lua
-- Example usage
GetSpellName(..., ...)
-- From Spells/Priest/Cleric/Inquisitor/HereticsDemise.lua
function remove(Caster, Target, Reason, DoTType, MinVal, MaxVal)
MinVal = CalculateRateValue(Caster, Target, GetSpellRequiredLevel(Caster), GetLevel(Caster), 1.25, MinVal)
MaxVal = CalculateRateValue(Caster, Target, GetSpellRequiredLevel(Caster), GetLevel(Caster), 1.25, MaxVal)
if Reason == "target_dead" then
local Zone = GetZone(Target)
local encounterSpawn = GetSpawnByGroupID(Zone, GetSpawnGroupID(Target))
if encounterSpawn ~= nil then
local targets = GetGroup(encounterSpawn)
for k,v in ipairs(targets) do
SpawnSet(v,"visual_state",0)
if IsAlive(v) then
DamageSpawn(Caster, v, 193, 3, MinVal, MaxVal, GetSpellName())
end
```

View File

@ -1,19 +1,23 @@
### Function: GetSpellRequiredLevel(param1, param2, param3, param4)
### Function: GetSpellRequiredLevel(spell)
**Description:**
Placeholder description.
Obtain the Required Level of the Spell, must be used inside a Spell Script.
**Parameters:**
- `param1`: unknown - Unknown type.
- `param2`: Spawn - The spawn or entity involved.
- `param3`: unknown - Unknown type.
- `param4`: unknown - Unknown type.
- None
**Returns:** None.
**Example:**
```lua
-- Example usage
GetSpellRequiredLevel(..., ..., ..., ...)
-- From Spells/Dregs.lua
function cast(Caster, Target, BonusAmt)
-- Allows target to breathe under water
BreatheUnderwater(Target, true)
BonusAmt = CalculateRateValue(Caster, Target, GetSpellRequiredLevel(Caster), GetLevel(Caster), 1.0, BonusAmt)
AddSpellBonus(Target, 201, BonusAmt)
end
```

View File

@ -1,19 +1,21 @@
### Function: GetSpellTargets(param1, param2, param3, param4)
### Function: GetSpellTargets(spell)
**Description:**
Placeholder description.
Obtain all the Spell Targets of the Spell. The `spell` field is optional, it will otherwise be in a Spell Script which defaults to the current spell's initial target.
**Parameters:**
- `param1`: unknown - Unknown type.
- `param2`: unknown - Unknown type.
- `param3`: unknown - Unknown type.
- `param4`: unknown - Unknown type.
- `spell` (Spell) - Spell object representing `spell`.
**Returns:** None.
**Example:**
```lua
-- Example usage
GetSpellTargets(..., ..., ..., ...)
-- From Spells/Commoner/UnholyFear.lua
function cast(Caster, Target)
local targets = GetSpellTargets()
for k,v in ipairs(targets) do
if GetLevel(v) < GetLevel(Caster) then
PlayAnimationString(v, "cringe", nil, true)
end
```

View File

@ -1,18 +1,29 @@
### Function: GiveLoot(param1, param2, param3)
### Function: GiveLoot(entity, player, coins, item_id)
**Description:**
Placeholder description.
Give the specified Player coin and item_id (multiple can be provided comma delimited) as pending loot for their inventory.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: Spawn - The spawn or entity involved.
- `param3`: int32 - Integer value.
- `entity` (int32) - Integer value `entity`.
- `player` (Spawn) - Spawn object representing `player`.
- `coins` (int32) - Integer value `coins`.
- `item_id` (int32) - Integer value `item_id`.
**Returns:** None.
**Example:**
```lua
-- Example usage
GiveLoot(..., ..., ...)
-- From Quests/FarJourneyFreeport/TasksaboardtheFarJourney.lua
function CurrentStep(Quest, QuestGiver, Player)
if GetQuestStepProgress(Player, 524,2) == 0 and GetQuestStep(Player, 524) == 2 then
i = 1
spawns = GetSpawnListBySpawnID(Player, 270010)
repeat
spawn = GetSpawnFromList(spawns, i-1)
if spawn then
ChangeHandIcon(spawn, 1)
AddPrimaryEntityCommand(nil, spawn)
SpawnSet(NPC, "targetable", 1, true, true)
end
```

View File

@ -1,17 +1,23 @@
### Function: GiveQuestReward(param1, param2)
### Function: GiveQuestReward(quest, spawn)
**Description:**
Placeholder description.
Provides the quest rewards previously specified with AddQuestRewardCoin, AddQuestRewardFaction, AddQuestRewardItem and AddQuestSelectableRewardItem or in the database.
**Parameters:**
- `param1`: unknown - Unknown type.
- `param2`: Spawn - The spawn or entity involved.
- `quest` (Quest) - Quest object representing `quest`.
- `spawn` (Spawn) - Spawn object representing `spawn`.
**Returns:** None.
**Example:**
```lua
-- Example usage
GiveQuestReward(..., ...)
-- From Quests/AlphaTest/stowaway_antonica.lua
function QuestCheck1(Quest, QuestGiver, Player)
if QuestStepIsComplete(Player,5858,2) and QuestStepIsComplete(Player,5858,3)and QuestStepIsComplete(Player,5858,4) then
UpdateQuestTaskGroupDescription(Quest, 1, "I have found all I need to Fast-Track to Qeynos.")
UpdateQuestDescription(Quest, "I have all the necessary parts for the Fast-Track passage to Qeynos. The ride was a bit cramped...")
GiveQuestReward(Quest, Player)
end
end
```

View File

@ -1,15 +1,17 @@
Function: Harvest(Player, GroundSpawn)
### Function: Harvest(Player, GroundSpawn)
Description: Forces a harvest action on the specified harvestable object or resource node. When called on a harvestable spawn (like a resource node), it attempts to collect from it as if a player harvested it.
**Description:**
Forces a harvest action on the specified harvestable object or resource node. When called on a harvestable spawn (like a resource node), it attempts to collect from it as if a player harvested it.
Parameters:
**Parameters:**
- `Player`: Spawn The Player to harvest the node.
- `GroundSpawn`: Spawn - The Spawn that represents the GroundSpawn.
Player: Spawn The Player to harvest the node.
GroundSpawn: Spawn - The Spawn that represents the GroundSpawn.
**Returns:** None (the harvesting results — items or updates — are handled by the system).
Returns: None (the harvesting results — items or updates — are handled by the system).
Example:
**Example:**
```lua
-- Example usage (not commonly used in scripts; simulated harvest of a node)
Harvest(Player, Node)
```

View File

@ -1,16 +1,16 @@
Function: HasCoin(Spawn, Value)
### Function: HasCoin(Spawn, Value)
Description: Checks if a player (Spawn) has at least a certain amount of coin (Value in copper) on them.
**Description:** Checks if a player (Spawn) has at least a certain amount of coin (Value in copper) on them.
Parameters:
**Parameters:**
- `Spawn`: Spawn The player whose coin purse to check.
- `Value`: Int32 The amount of coin (in copper units) to check for.
Spawn: Spawn The player whose coin purse to check.
Value: Int32 The amount of coin (in copper units) to check for.
**Returns:** Boolean true (1) if the player has at least that amount of coin; false (0) if they do not have enough money.
Returns: Boolean true (1) if the player has at least that amount of coin; false (0) if they do not have enough money.
Example:
**Example:**
```lua
-- Example usage (charging a fee if the player can afford it)
if HasCoin(Player, 5000) then -- 5000 copper = 50 silver
RemoveCoin(Player, 5000)
@ -18,3 +18,4 @@ if HasCoin(Player, 5000) then -- 5000 copper = 50 silver
else
SendMessage(Player, "You don't have enough coin.")
end
```

View File

@ -1,20 +1,14 @@
### Function: HasControlEffect(param1, param2, param3, param4, param5)
### Function: HasControlEffect(spawn, type)
**Description:**
Placeholder description.
Identifies if the Spawn has the control effect type defined. The Control Effect Type list can be found at https://github.com/emagi/eq2emu/blob/main/docs/data_types/control_effect_types.md
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: unknown - Unknown type.
- `param4`: unknown - Unknown type.
- `param5`: int8 - Small integer or boolean flag.
- `spawn` (Spawn) - Spawn object representing `spawn`.
- `type` (int32) - Integer value `type`.
**Returns:** None.
**Returns:** True if the Spawn has the control effect type specified, otherwise False.
**Example:**
```lua
-- Example usage
HasControlEffect(..., ..., ..., ..., ...)
```
Example Required

View File

@ -1,20 +1,20 @@
Function: HasItem(Player, ItemID, IncludeBank)
### Function: HasItem(Player, ItemID, IncludeBank)
Description: Determines whether a given player possesses an item with the specified Item ID.
**Description:**
Determines whether a given player possesses an item with the specified Item ID.
Parameters:
**Parameters:**
- `Player`: Spawn The player or NPC to check for the item. (Typically a Player.)
- `ItemID`: Int32 The unique ID of the item to check for.
- `IncudeBank`: Boolean If we should check the bank also
Player: Spawn The player or NPC to check for the item. (Typically a Player.)
**Returns:** Boolean true (1) if the spawns inventory contains at least one of the specified item; false (0) if the item is not present.
ItemID: Int32 The unique ID of the item to check for.
IncudeBank: Boolean If we should check the bank also
Returns: Boolean true (1) if the spawns inventory contains at least one of the specified item; false (0) if the item is not present.
Example:
**Example:**
```lua
-- Example usage from: ItemScripts/GeldranisVial.lua
if HasItem(Player, FilledVial) == false then
SummonItem(Player, FilledVial, 1)
end
```

View File

@ -1,17 +1,23 @@
### Function: HasLootItem(param1, param2)
### Function: HasLootItem(spawn, item_id)
**Description:**
Placeholder description.
Identifies if the specified spawn has the item_id in it's loot drop table.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: int32 - Integer value.
- `spawn` (Spawn) - Spawn object representing `spawn`.
- `item_id` (uint32) - Integer value `item_id`.
**Returns:** None.
**Example:**
```lua
-- Example usage
HasLootItem(..., ...)
-- From Quests/FarJourneyFreeport/TasksaboardtheFarJourney.lua
rat = GetSpawnFromList(spawns, i-1)
if rat then
SetAttackable(rat, 1)
if HasLootItem(rat, 11615) == false then
AddLootItem(rat, 11615)
end
end
```

View File

@ -1,17 +1,29 @@
### Function: HasPendingLoot(param1, param2)
### Function: HasPendingLoot(entity, player)
**Description:**
Placeholder description.
Identifies if the Player has pending loot with the targetted Entity (NPC).
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: Spawn - The spawn or entity involved.
- `entity` (int32) - Integer value `entity`.
- `player` (Spawn) - Spawn object representing `player`.
**Returns:** None.
**Example:**
```lua
-- Example usage
HasPendingLoot(..., ...)
-- From SpawnScripts/FarJourneyFreeport/atreasurechest.lua
function open(NPC, Player)
SendStateCommand(NPC, 399)
AddTimer(NPC, 2000, "finished_open_animation")
if HasPendingLoot(NPC, Player) then
ShowLootWindow(Player, NPC)
DisplayText(Player, 12, "There appears to be something inside this box.")
InstructionWindow(Player, -1.0, "This screen shows the contents of the box you just opened. Left click on the loot all button to take the items from the box.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_013_f0780e49.mp3", 1581263773, 1569244108, "tutorial_stage_17", "Left click on the loot all button.", "server")
SetTutorialStep(player, 16)
else
DisplayText(Player, 12, "This box is empty.")
ChangeHandIcon(NPC, 0)
SpawnSet(NPC, "targetable", 0)
end
```

View File

@ -1,18 +1,15 @@
### Function: HasPendingLootItem(param1, param2, param3)
### Function: HasPendingLootItem(entity, player, item_id)
**Description:**
Placeholder description.
Identifies if the Player has a specific pending loot of item_id with the targetted Entity (NPC).
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: Spawn - The spawn or entity involved.
- `param3`: int32 - Integer value.
- `entity` (int32) - Integer value `entity`.
- `player` (Spawn) - Spawn object representing `player`.
- `item_id` (uint32) - Integer value `item_id`.
**Returns:** None.
**Example:**
```lua
-- Example usage
HasPendingLootItem(..., ..., ...)
```
Example Required

View File

@ -1,19 +1,48 @@
### Function: HasPendingQuest(param1, param2, param3, param4)
### Function: HasPendingQuest(player, quest_id)
**Description:**
Placeholder description.
Identifies if the Player has a pending quest acceptance window for the quest_id specified.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: unknown - Unknown type.
- `param4`: int32 - Integer value.
- `player` (Spawn) - Spawn object representing `player`.
- `quest_id` (uint32) - Integer value `quest_id`.
**Returns:** None.
**Example:**
```lua
-- Example usage
HasPendingQuest(..., ..., ..., ...)
-- From SpawnScripts/ElddarGrove/NaturalistTummyfill.lua
function hailed(NPC, Spawn)
local playerLevel = GetLevel(Spawn)
local quests = nil
-- Determine the quests based on the player's level (20-29)
if playerLevel >= 20 and playerLevel <= 24 then
quests = questsByLevel["20-24"]
elseif playerLevel >= 25 and playerLevel <= 29 then
quests = questsByLevel["25-29"]
end
if quests then
-- Check if the player already has an active quest
for _, questID in ipairs(quests) do
if HasQuest(Spawn, questID) then
-- If the player has an active quest, inform them and exit
Say(NPC, "You're already on a task. Finish it first before taking another.")
return
elseif HasPendingQuest(Spawn, questID) then
-- If the player has a pending quest, do nothing and exit
return
end
end
-- If no quest was found, offer a new one
local newQuestID = quests[math.random(#quests)]
OfferQuest(NPC, Spawn, newQuestID)
Say(NPC, "I have a task for someone of your experience. Will you take it?")
else
Say(NPC, "I have no tasks suitable for your level. You may need to seek another challenge.")
end
end
```

View File

@ -1,17 +1,14 @@
### Function: HasQuestRewardItem(param1, param2)
### Function: HasQuestRewardItem(quest, item_id)
**Description:**
Placeholder description.
Return's true if the item_id is present on the Quest's item reward list (not selectable).
**Parameters:**
- `param1`: unknown - Unknown type.
- `param2`: int32 - Integer value.
- `quest` (Quest) - Quest object representing `quest`.
- `item_id` (uint32) - Integer value `item_id`.
**Returns:** None.
**Returns:** True if present on the quest reward item list. Otherwise false.
**Example:**
```lua
-- Example usage
HasQuestRewardItem(..., ...)
```
Example Required

View File

@ -1,16 +1,18 @@
Function: InLava(Spawn)
### Function: InLava(Spawn)
Description: Checks if the specified spawn is in lava. Similar to InWater, but specifically for lava volumes which might cause damage.
**Description:**
Checks if the specified spawn is in lava. Similar to InWater, but specifically for lava volumes which might cause damage.
Parameters:
**Parameters:**
- `Spawn`: Spawn The entity to check.
Spawn: Spawn The entity to check.
**Returns:** Boolean true if the spawn is currently in lava; false otherwise.
Returns: Boolean true if the spawn is currently in lava; false otherwise.
Example:
**Example:**
```lua
-- Example usage (tell the player they are standing in lava)
if InLava(Player) then
SendMessage(Player, "Feels toasty here..", "red")
end
```

View File

@ -1,18 +1,20 @@
Function: InWater(Spawn)
### Function: InWater(Spawn)
Description: Determines if the given spawn is currently submerged in water.
**Description:**
Determines if the given spawn is currently submerged in water.
Parameters:
**Parameters:**
- `Spawn`: Spawn The entity to check.
Spawn: Spawn The entity to check.
**Returns:** Boolean true if the spawn is in water; false if not.
Returns: Boolean true if the spawn is in water; false if not.
Example:
**Example:**
```lua
-- Example usage (If NPC is in water make them glow)
if InWater(NPC) then
SpawnSet(NPC, "visual_state", 2103)
else
SpawnSet(NPC, "visual_state", 0)
end
```

View File

@ -1,15 +1,15 @@
Function: IsEpic(Spawn)
### Function: IsEpic(Spawn)
Description: Checks if the given NPC is flagged as an “Epic” encounter.
**Description:** Checks if the given NPC is flagged as an “Epic” encounter.
Parameters:
**Parameters:**
- `Spawn`: Spawn The NPC to check.
Spawn: Spawn The NPC to check.
**Returns:** Boolean true if the spawn is an Epic tier NPC; false otherwise.
Returns: Boolean true if the spawn is an Epic tier NPC; false otherwise.
Example:
**Example:**
```lua
-- Example AtrebasEtherealBindings.lua (Spells Script)
function precast(Caster, Target)
-- Does not affect Epic targets
@ -18,3 +18,4 @@ function precast(Caster, Target)
end
return true
end
```

View File

@ -1,17 +1,24 @@
### Function: ModifyHP(param1, param2)
### Function: ModifyHP(spawn, value)
**Description:**
Placeholder description.
Sets the Spawn's HP to the value if the value plus the current health is greater than the Spawn's Total HP. If the current health plus the is less than the total hp, then it will restore the current HP up to the value.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `spawn` (Spawn) - Spawn object representing `spawn`.
- `value` (sint32) - Integer value `value`.
**Returns:** None.
**Example:**
```lua
-- Example usage
ModifyHP(..., ...)
-- From ItemScripts/guiderobes.lua
function equipped(Item, Spawn)
while HasItem(Spawn, 157245)
do
PlayAnimation(Spawn, 16583)
end
Emote(Spawn, "feels empowered.")
ModifyHP(Spawn, 1000000000)
end
```

View File

@ -1,17 +1,16 @@
### Function: ModifyMaxHP(param1, param2)
### Function: ModifyMaxHP(spawn, value)
**Description:**
Placeholder description.
Sets the Maximum HP of the Spawn to the value provided.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `spawn` (Spawn) - Spawn object representing `spawn`.
- `value` (sint32) - Integer value `value`.
**Returns:** None.
**Example:**
```lua
-- Example usage
ModifyMaxHP(..., ...)
ModifyMaxHP(NPC, 10000)
```

View File

@ -1,17 +1,16 @@
### Function: ModifyMaxPower(param1, param2)
### Function: ModifyMaxPower(spawn, value)
**Description:**
Placeholder description.
Sets the Maximum Power of the Spawn to the value provided.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `spawn` (Spawn) - Spawn object representing `spawn`.
- `value` (int32) - Integer value `value`.
**Returns:** None.
**Example:**
```lua
-- Example usage
ModifyMaxPower(..., ...)
ModifyMaxPower(NPC, 10000)
```

View File

@ -1,17 +1,31 @@
### Function: ModifyPower(param1, param2)
### Function: ModifyPower(spawn, value)
**Description:**
Placeholder description.
Sets the Spawn's Power to the value if the value plus the current power is greater than the Spawn's Total Power. If the current power plus the is less than the total power, then it will restore the current power up to the value.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `spawn` (Spawn) - Spawn object representing `spawn`.
- `value` (int32) - Integer value `value`.
**Returns:** None.
**Example:**
```lua
-- Example usage
ModifyPower(..., ...)
-- From SpawnScripts/Commonlands/TerraThud.lua
function spawn(NPC, Spawn)
local Level = GetLevel(NPC)
if Level == 21 then
SetMaxHP(NPC, 6885)
ModifyHP(NPC, 6885)
SetMaxPower(NPC, 1650)
ModifyPower(NPC, 1650)
elseif Level == 22 then
SetMaxHP(NPC, 7500)
ModifyHP(NPC, 7500)
SetMaxPower(NPC, 1750)
ModifyPower(NPC, 1750)
end
```

View File

@ -1,23 +1,27 @@
### Function: MoveToLocation(param1, param2, param3, param4, param5, param6, param7, param8)
### Function: MoveToLocation(spawn, x, y, z, speed, lua_function, more_points, use_nav_path)
**Description:**
Placeholder description.
Tells NPC to move to the location specified in the x,y,z.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: float - Floating point value.
- `param3`: float - Floating point value.
- `param4`: float - Floating point value.
- `param5`: float - Floating point value.
- `param6`: string - String value.
- `param7`: bool - Boolean value (true/false).
- `param8`: bool - Boolean value (true/false).
- `spawn` (Spawn) - Spawn object representing `spawn`.
- `x` (int32) - Integer value `x`.
- `y` (int32) - Integer value `y`.
- `z` (int32) - Integer value `z`.
- `speed` (int32) - Integer value `speed`.
- `lua_function` (int32) - Integer value `lua_function`.
- `more_points` (int32) - Integer value `more_points`.
- `use_nav_path` (int32) - Integer value `use_nav_path`.
**Returns:** None.
**Example:**
```lua
-- Example usage
MoveToLocation(..., ..., ..., ..., ..., ..., ..., ...)
-- From SpawnScripts/BeggarsCourt/aBrotherhoodenforcer.lua
function spawn(NPC)
if GetSpawnLocationID(NPC) == 403031 then
MoveToLocation(NPC, -14.62, 2.25, -6.99, 3, "", true)
MoveToLocation(NPC, -17.68, 3.00, -21.58, 3, "", false)
end
```

View File

@ -1,26 +1,49 @@
### Function: MovementLoopAdd(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11)
### Function: MovementLoopAdd(spawn, x, y, z, speed, delay, function, heading, exclude_heading, use_nav_path)
**Description:**
Placeholder description.
Adds a waypoint for the NPC to reach in order of the supplied waypoints. Calls function when arriving at the waypoint destination.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: float - Floating point value.
- `param4`: float - Floating point value.
- `param5`: float - Floating point value.
- `param6`: float - Floating point value.
- `param7`: int32 - Integer value.
- `param8`: string - String value.
- `param9`: float - Floating point value.
- `param10`: bool - Boolean value (true/false).
- `param11`: bool - Boolean value (true/false).
- `spawn` (Spawn) - Spawn object representing `spawn`.
- `x` (int32) - Integer value `x`.
- `y` (int32) - Integer value `y`.
- `z` (int32) - Integer value `z`.
- `speed` (int32) - Integer value `speed`.
- `delay` (int32) - Integer value `delay`.
- `function` (int32) - Integer value `function`.
- `heading` (int32) - Integer value `heading`.
- `exclude_heading` (int32) - Integer value `exclude_heading`.
- `use_nav_path` (int32) - Integer value `use_nav_path`.
**Returns:** None.
**Example:**
```lua
-- Example usage
MovementLoopAdd(..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ...)
-- From SpawnScripts/FarJourneyFreeport/agoblin.lua
function run_around_loop(NPC)
MovementLoopAdd(NPC, -4.43, -2.07, 6.17, 5, 1)
MovementLoopAdd(NPC, -4.43, -2.07, 6.17, 5, 3, "run_around_loop_pause1")
MovementLoopAdd(NPC, -4.43, -2.07, 6.17, 5, 0)
MovementLoopAdd(NPC, -5.23, -2.01, 0.39, 5, 1)
MovementLoopAdd(NPC, -5.23, -2.01, 0.39, 5, 3, "run_around_loop_pause2")
MovementLoopAdd(NPC, -5.23, -2.01, 0.39, 5, 0)
MovementLoopAdd(NPC, -4.88, -2.06, 4.26, 5, 1)
MovementLoopAdd(NPC, -4.88, -2.06, 4.26, 5, 3, "run_around_loop_pause3")
MovementLoopAdd(NPC, -4.88, -2.06, 4.26, 5, 0)
MovementLoopAdd(NPC, 3.94, -2.07, 0.66, 5, 1)
MovementLoopAdd(NPC, 3.94, -2.07, 0.66, 5, 3, "run_around_loop_pause4")
MovementLoopAdd(NPC, 3.94, -2.07, 0.66, 5, 0)
MovementLoopAdd(NPC, 2.84, -2.07, -2.07, 5, 1)
MovementLoopAdd(NPC, 2.84, -2.07, -2.07, 5, 3, "run_around_loop_pause5")
MovementLoopAdd(NPC, 2.84, -2.07, -2.07, 5, 0)
MovementLoopAdd(NPC, 3.41, -1.99, -7.42, 5, 1)
MovementLoopAdd(NPC, 3.41, -1.99, -7.42, 5, 3, "run_around_loop_pause6")
MovementLoopAdd(NPC, 3.41, -1.99, -7.42, 5, 0)
MovementLoopAdd(NPC, -2.75, -2.02, -5.82, 5, 0)
MovementLoopAdd(NPC, -2.63, 1.21, -18.11,5,1)
MovementLoopAdd(NPC, -2.63, 1.21, -18.11,5,3,"run_around_loop_pause7")
MovementLoopAdd(NPC, -2.63, 1.21, -18.11,3,0)
MovementLoopAdd(NPC, -2.75, -2.02, -5.82, 5, 0)
end
```

View File

@ -1,23 +1,22 @@
### Function: OfferQuest(param1, param2, param3, param4, param5, param6, param7, param8)
### Function: OfferQuest(npc, player, quest_id, forced)
**Description:**
Placeholder description.
NPC Offers the quest window or auto accept of the quest to the Player.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: unknown - Unknown type.
- `param4`: unknown - Unknown type.
- `param5`: unknown - Unknown type.
- `param6`: Spawn - The spawn or entity involved.
- `param7`: int32 - Integer value.
- `param8`: bool - Boolean value (true/false).
- `npc` (Spawn) - Spawn object representing `npc`.
- `player` (Spawn) - Spawn object representing `player`.
- `quest_id` (uint32) - Integer value `quest_id`.
- `forced` (int32) - Integer value `forced`.
**Returns:** None.
**Example:**
```lua
-- Example usage
OfferQuest(..., ..., ..., ..., ..., ..., ..., ...)
-- From ItemScripts/abadlypolishedsteelkey.lua
function examined(Item, Player)
if not HasQuest(Player, Polishedsteelkey) then
OfferQuest(nil, Player, Polishedsteelkey)
end
```

View File

@ -1,21 +1,22 @@
### Function: PlayAnimation(param1, param2, param3, param4, param5, param6)
### Function: PlayAnimation(spawn, anim, target, hide_type)
**Description:**
Placeholder description.
The spawn will play the animation `anim` type specified. See the Appearance IDs by client in the ReferenceList here https://wiki.eq2emu.com/ReferenceLists
Note that the target and hide_type are optional fields. Setting the hide_type to 1 will mean only the target receives the update. Setting to 2 will exclude the target and send to all others.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: unknown - Unknown type.
- `param4`: int32 - Integer value.
- `param5`: Spawn - The spawn or entity involved.
- `param6`: int8 - Small integer or boolean flag.
- `spawn` (Spawn) - Spawn object representing `spawn`.
- `anim` (int32) - Integer value `anim`.
- `target` (Spawn) - Spawn objet representing `target`.
- `hide_type` (int32) - Integer value `hide_type`.
**Returns:** None.
**Example:**
```lua
-- Example usage
PlayAnimation(..., ..., ..., ..., ..., ...)
-- From ItemScripts/CrestridersTonic.lua
function cast(Item, Player)
PlayAnimation(Player, 11422) -- No joking its drink animation
end
```

View File

@ -1,23 +1,26 @@
### Function: PlayAnimationString(param1, param2, param3, param4, param5, param6, param7, param8)
### Function: PlayAnimationString(spawn, name, opt_target, set_no_target, use_all_spelltargets, ignore_self)
**Description:**
Placeholder description.
Play an animation by using the string to all Player's or only a specific optional_target (Player). Review Appearance ID's in the Reference List https://wiki.eq2emu.com/ReferenceLists by client for more details.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: unknown - Unknown type.
- `param4`: string - String value.
- `param5`: Spawn - The spawn or entity involved.
- `param6`: bool - Boolean value (true/false).
- `param7`: bool - Boolean value (true/false).
- `param8`: bool - Boolean value (true/false).
- `spawn` (Spawn) - Spawn object representing `spawn`.
- `name` (string) - String `name`.
- `opt_target` (int32) - Integer value `opt_target`.
- `set_no_target` (int32) - Integer value `set_no_target`.
- `use_all_spelltargets` (int32) - Integer value `use_all_spelltargets`.
- `ignore_self` (int32) - Integer value `ignore_self`.
**Returns:** None.
**Example:**
```lua
-- Example usage
PlayAnimationString(..., ..., ..., ..., ..., ..., ..., ...)
-- From Spells/Commoner/UnholyFear.lua
function cast(Caster, Target)
local targets = GetSpellTargets()
for k,v in ipairs(targets) do
if GetLevel(v) < GetLevel(Caster) then
PlayAnimationString(v, "cringe", nil, true)
end
```

View File

@ -1,23 +1,42 @@
### Function: PlayFlavor(param1, param2, param3, param4, param5, param6, param7, param8)
### Function: PlayFlavor(spawn, mp3_string, text_string, emote_string, key1, key2, player, language)
**Description:**
Placeholder description.
Allows Player/NPC to display a text bubble and/or mp3 voiceovers (with usually required key1/key2 values).
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: string - String value.
- `param3`: string - String value.
- `param4`: string - String value.
- `param5`: int32 - Integer value.
- `param6`: int32 - Integer value.
- `param7`: Spawn - The spawn or entity involved.
- `param8`: int8 - Small integer or boolean flag.
- `spawn` (Spawn) - Spawn object representing `spawn`.
- `mp3_string` (string) - String `mp3_string`.
- `text_string` (string) - String `text_string`.
- `emote_string` (string) - String `emote_string`.
- `key1` (int32) - Integer value `key1`.
- `key2` (int32) - Integer value `key2`.
- `player` (Spawn) - Spawn object representing `player`.
- `language` (int32) - Integer value `language`.
**Returns:** None.
**Example:**
```lua
-- Example usage
PlayFlavor(..., ..., ..., ..., ..., ..., ..., ...)
-- From ItemScripts/AcommemorativeFreeportCoin.lua
function examined(Item, Player)
conversation = CreateConversation()
PlayFlavor(Player,"voiceover/english/tullia_domna/fprt_hood04/quests/tulladomna/tulla_x1_initial.mp3","","",309451026,621524268,Player)
--PlayFlavor(Player,"voiceover/english/overlord_lucan_d_lere/fprt_west/lucan_isle_speech.mp3","","",2912329438, 4090300715,Player)
local choice = MakeRandomInt(1,6)
if choice == 1 then
PlayFlavor(Player, "voiceover/english/overlord_lucan_d_lere/fprt_west/lucan_isle_speech_4.mp3", "You show potential, but there are many who seek the auspices of Lucan, and I only have time for champions.", "", 2060818628, 3998142234, Player, 0)
elseif choice == 2 then
PlayFlavor(Player, "voiceover/english/overlord_lucan_d_lere/fprt_west/lucan_isle_speech_5.mp3", "Prove yourself, and I shall grant you shelter at the edge of my city, and the chance to earn your place as a proud citizen of Freeport.", "", 4115014723, 2723692261, Player, 0)
elseif choice == 3 then
PlayFlavor(Player, "voiceover/english/overlord_lucan_d_lere/fprt_west/lucan_isle_speech_8.mp3", "Together we will restore the glory of ages past, crush the Sons of Zek, and sweep aside the decadent nation of Qeynos!", "", 140890899, 2835297833, Player, 0)
elseif choice == 4 then
PlayFlavor(Player, "voiceover/english/overlord_lucan_d_lere/fprt_west/lucan_isle_speech_9.mp3", "With my guidance, you shall gain power and glory as you have never imagined, but should you turn against me, you will find that my wrath is a terrible thing ... Now go!", "", 3855854568, 2247480313, Player, 0)
elseif choice == 5 then
PlayFlavor(Player, "voiceover/english/overlord_lucan_d_lere/fprt_west/lucan_isle_speech_7.mp3", "Succeed, and you will share the fortunes of Freeport as we reshape this broken world.", "", 2666628260, 1943756642, Player, 0)
elseif choice == 6 then
PlayFlavor(Player, "voiceover/english/overlord_lucan_d_lere/fprt_west/lucan_isle_speech_6.mp3", "Go now, and begin the trials that I have set for you.", "", 1244918730, 586509135, Player, 0)
end
```

View File

@ -1,21 +1,26 @@
### Function: PlayFlavorID(param1, param2, param3, param4, param5, param6)
### Function: PlayFlavorID(spawn, type, id, index, player, language)
**Description:**
Placeholder description.
Uses the database dialog_play_flavors and dialog_play_voices.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: int8 - Small integer or boolean flag.
- `param3`: int32 - Integer value.
- `param4`: int16 - Short integer value.
- `param5`: Spawn - The spawn or entity involved.
- `param6`: int8 - Small integer or boolean flag.
- `spawn` (Spawn) - Spawn object representing `spawn`.
- `type` (int32) - Integer value `type`.
- `id` (uint32) - Integer value `id`.
- `index` (int32) - Integer value `index`.
- `player` (Spawn) - Spawn object representing `player`.
- `language` (int32) - Integer value `language`.
**Returns:** None.
**Example:**
```lua
-- Example usage
PlayFlavorID(..., ..., ..., ..., ..., ...)
```sql
insert into voiceovers set type_id=2,id=100,indexed=1,mp3_string="voiceover/english/gnoll_base_1/ft/gnoll/gnoll_base_1_2_garbled_2f8caa7b.mp3", text_string="Krovel grarggt ereverrrn", key1=2385604574, key2=3717589402, garbled=1,garble_link_id=1;
insert into voiceovers set type_id=2,id=100,indexed=1,mp3_string="voiceover/english/sean_wellfayer/qey_harbor/100_qst_sean_wellfayer_multhail1_5dca659c.mp3", text_string="I don't think fishing interests you. Perhaps you should be on your way!", key1=1997164956, key2=747011072, garbled=0,garble_link_id=1;
```
```lua
PlayFlavorID(NPC, 2, 100, 1, nil, 18)
```

View File

@ -1,21 +1,21 @@
### Function: PlaySound(param1, param2, param3, param4, param5, param6)
### Function: PlaySound(spawn, sound_string, x, y, z, player)
**Description:**
Placeholder description.
Plays a sound using the sound_string to the area or specified player.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: string - String value.
- `param3`: float - Floating point value.
- `param4`: float - Floating point value.
- `param5`: float - Floating point value.
- `param6`: Spawn - The spawn or entity involved.
- `spawn` (Spawn) - Spawn object representing `spawn`.
- `sound_string` (string) - String `sound_string`.
- `x` (int32) - Integer value `x`.
- `y` (int32) - Integer value `y`.
- `z` (int32) - Integer value `z`.
- `player` (Spawn) - Spawn object representing `player`.
**Returns:** None.
**Example:**
```lua
-- Example usage
PlaySound(..., ..., ..., ..., ..., ...)
-- From ItemScripts/BardCertificationPapers.lua
PlaySound(Player, "sounds/test/endquest.wav", GetX(Player), GetY(Player), GetZ(Player), Player)
```

View File

@ -1,20 +1,29 @@
### Function: PlayVoice(param1, param2, param3, param4, param5)
### Function: PlayVoice(spawn, mp3_string, key1, key2, player)
**Description:**
Placeholder description.
Spawn plays a mp3 voiceover with no text bubble.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: string - String value.
- `param3`: int32 - Integer value.
- `param4`: int32 - Integer value.
- `param5`: Spawn - The spawn or entity involved.
- `spawn` (Spawn) - Spawn object representing `spawn`.
- `mp3_string` (string) - String `mp3_string`.
- `key1` (int32) - Integer value `key1`.
- `key2` (int32) - Integer value `key2`.
- `player` (Spawn) - Spawn object representing `player`.
**Returns:** None.
**Example:**
```lua
-- Example usage
PlayVoice(..., ..., ..., ..., ...)
-- From SpawnScripts/Antonica/TheSageofAges.lua
function RandomGreeting(NPC, Spawn)
local choice = MakeRandomInt(1,3)
if choice == 1 then
PlayVoice(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1022.mp3", 0, 0, Spawn)
elseif choice == 2 then
PlayVoice(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1022.mp3", 0, 0, Spawn)
elseif choice == 3 then
PlayVoice(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1022.mp3", 0, 0, Spawn)
end
```

View File

@ -1,17 +1,19 @@
### Function: ProvidesQuest(param1, param2)
### Function: ProvidesQuest(npc, quest_id)
**Description:**
Placeholder description.
The NPC provides a quest offering to Player's. This will support the feather flags for players.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: int32 - Integer value.
- `npc` (Spawn) - Spawn object representing `npc`.
- `quest_id` (uint32) - Integer value `quest_id`.
**Returns:** None.
**Example:**
```lua
-- Example usage
ProvidesQuest(..., ...)
-- From SpawnScripts/Antonica/AGriffonTamer.lua
function spawn(NPC)
ProvidesQuest(NPC, GriffonEggs)
end
```

View File

@ -1,17 +1,22 @@
### Function: QuestIsComplete(param1, param2)
### Function: QuestIsComplete(player, quest_id)
**Description:**
Placeholder description.
Identifies if the quest has been completed or not based on the quest_id.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: int32 - Integer value.
- `player` (Spawn) - Spawn object representing `player`.
- `quest_id` (uint32) - Integer value `quest_id`.
**Returns:** None.
**Example:**
```lua
-- Example usage
QuestIsComplete(..., ...)
-- From Quests/Baubbleshire/helping_some_friends.lua
function step2_complete_talkedToDrundo(Quest, QuestGiver, Player)
UpdateQuestStepDescription(Quest, 2, "I have given Drundo the walnut pie.")
if QuestIsComplete(Player, HELPING_SOME_FRIENDS) then
pranks_given(Quest, QuestGiver, Player)
end
```

View File

@ -1,17 +1,21 @@
### Function: QuestReturnNPC(param1, param2)
### Function: QuestReturnNPC(quest, spawn_id)
**Description:**
Placeholder description.
Sets the return NPC point for a Quest when the quest has been completed.
**Parameters:**
- `param1`: unknown - Unknown type.
- `param2`: int32 - Integer value.
- `quest` (Quest) - Quest object representing `quest`.
- `spawn_id` (uint32) - Integer value `spawn_id`.
**Returns:** None.
**Example:**
```lua
-- Example usage
QuestReturnNPC(..., ...)
-- From Quests/Hallmark/archetype_selection.lua
function Init(Quest)
AddQuestStepChat(Quest, 1, "I need to talk to Garven Tralk", 1, "I need to talk to Garven Tralk", 11, 3250020)
AddQuestStepCompleteAction(Quest, 1, "QuestComplete")
QuestReturnNPC(Quest, 3250020)
end
```

View File

@ -1,18 +1,26 @@
### Function: QuestStepIsComplete(param1, param2, param3)
### Function: QuestStepIsComplete(player, quest_id, step_id)
**Description:**
Placeholder description.
Returns if the Player has completed the step_id in the specified quest_id.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: int32 - Integer value.
- `param3`: int32 - Integer value.
- `player` (Spawn) - Spawn object representing `player`.
- `quest_id` (uint32) - Integer value `quest_id`.
- `step_id` (uint32) - Integer value `step_id`.
**Returns:** None.
**Example:**
```lua
-- Example usage
QuestStepIsComplete(..., ..., ...)
-- From ItemScripts/aboarfiendhoof.lua
function examined(Item, Player)
if not HasQuest(Player, LoreAndLegendBoarfiend) and not HasCompletedQuest(Player, LoreAndLegendBoarfiend) then
OfferQuest(nil, Player, LoreAndLegendBoarfiend)
elseif not QuestStepIsComplete(Player, LoreAndLegendBoarfiend, 4) then
conversation = CreateConversation()
AddConversationOption(conversation, "Begin to study...", "Step_Complete")
AddConversationOption(conversation, "No, put away", "CloseItemConversation")
StartDialogConversation(conversation, 2, Item, Player, "This item can be used to learn the secrets of the boarfiend. Do you wish to study it?")
end
```

View File

@ -1,27 +1,18 @@
### Function: RegisterQuest(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12)
### Function: RegisterQuest(quest, name, type, zone, level, description)
**Description:**
Placeholder description.
Allows overriding the Quet's name, type, zone, level and description details.
**Parameters:**
- `param1`: unknown - Unknown type.
- `param2`: unknown - Unknown type.
- `param3`: unknown - Unknown type.
- `param4`: unknown - Unknown type.
- `param5`: unknown - Unknown type.
- `param6`: unknown - Unknown type.
- `param7`: unknown - Unknown type.
- `param8`: string - String value.
- `param9`: string - String value.
- `param10`: string - String value.
- `param11`: int16 - Short integer value.
- `param12`: string - String value.
- `quest` (Quest) - Quest object representing `quest`.
- `name` (string) - String `name`.
- `type` (int32) - Integer value `type`.
- `zone` (Zone) - Zone object representing `zone`.
- `level` (int32) - Integer value `level`.
- `description` (int32) - Integer value `description`.
**Returns:** None.
**Example:**
```lua
-- Example usage
RegisterQuest(..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ...)
```
Example Required

View File

@ -1,21 +1,20 @@
### Function: RemoveControlEffect(param1, param2, param3, param4, param5, param6)
### Function: RemoveControlEffect(spawn, type, only_remove_spawn)
**Description:**
Placeholder description.
Removes a control effect from the Spawn or from the spell targets of a spell.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: unknown - Unknown type.
- `param4`: unknown - Unknown type.
- `param5`: int8 - Small integer or boolean flag.
- `param6`: int8 - Small integer or boolean flag.
- `Spawn` (Spawn) - Spawn object reference `spawn`.
- `type` (int32) - Integer value `type`.
- `only_remove_spawn` (int32) - Integer value `only_remove_spawn`.
**Returns:** None.
**Example:**
```lua
-- Example usage
RemoveControlEffect(..., ..., ..., ..., ..., ...)
-- From Spells/AA/DazingBash.lua
function remove(Caster, Target)
RemoveControlEffect(Target, 3)
end
```

View File

@ -1,18 +1,68 @@
### Function: RemoveItem(param1, param2, param3)
### Function: RemoveItem(spawn, item_id, quantity)
**Description:**
Placeholder description.
Removes an item_id of the quantity specified from the Player's inventory if possible.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: int32 - Integer value.
- `param3`: int16 - Short integer value.
- `spawn` (Spawn) - Spawn object representing `spawn`.
- `item_id` (uint32) - Integer value `item_id`.
- `quantity` (int32) - Integer value `quantity`.
**Returns:** None.
**Returns:** True if able to remove the specified item_id and quantity, otherwise False if failed.
**Example:**
```lua
-- Example usage
RemoveItem(..., ..., ...)
-- From ItemScripts/aBagofBasicProvisions.lua
function examined(Item, Player)
RemoveItem(Player,1001011,1)
SummonItem(Player, 36684,0)
SummonItem(Player, 36684,0)
SummonItem(Player, 36684,0)
SummonItem(Player, 36684,0)
SummonItem(Player, 36684,0)
SummonItem(Player, 36684,0)
SummonItem(Player, 36684,0)
SummonItem(Player, 36684,0)
SummonItem(Player, 36684,0)
SummonItem(Player, 36684,0)
SummonItem(Player, 36684,0)
SummonItem(Player, 36684,0)
SummonItem(Player, 36684,0)
SummonItem(Player, 36684,0)
SummonItem(Player, 36684,0)
SummonItem(Player, 36684,0)
SummonItem(Player, 36684,0)
SummonItem(Player, 36684,0)
SummonItem(Player, 36684,0)
SummonItem(Player, 36684,0)
SummonItem(Player, 36211,0)
SummonItem(Player, 36211,0)
SummonItem(Player, 36211,0)
SummonItem(Player, 36211,0)
SummonItem(Player, 36211,0)
SummonItem(Player, 36211,0)
SummonItem(Player, 36211,0)
SummonItem(Player, 36211,0)
SummonItem(Player, 36211,0)
SummonItem(Player, 36211,0)
SummonItem(Player, 36211,0)
SummonItem(Player, 36211,0)
SummonItem(Player, 36211,0)
SummonItem(Player, 36211,0)
SummonItem(Player, 36211,0)
SummonItem(Player, 36211,0)
SummonItem(Player, 36211,0)
SummonItem(Player, 36211,0)
SummonItem(Player, 36211,0)
SummonItem(Player, 36211,0)
SendMessage(Player, "You found 20 flasks of water in the bag.")
SendMessage(Player, "You found 20 rations in the bag.")
--[[ alignment = GetDeity(Player) --THESE ARE COMMEMORATIVE COINS. THIS ITEM HAS BEEN GIVEN TO THE AMBASSADORS FOR PLAYERS SELECTING THEIR CITY. THIS REDUCES THE CHANCE THE WRONG COIN IS GIVEN.
if alignment == 0 then
SummonItem(Player, 1413,1) -- evil rewards
else
SummonItem(Player, 1414,1) -- good rewards
end]]--
end
```

View File

@ -1,17 +1,23 @@
### Function: RemoveLootItem(param1, param2)
### Function: RemoveLootItem(spawn, item_id)
**Description:**
Placeholder description.
Removes a loot item from the Spawn(NPC).
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: int32 - Integer value.
- `spawn` (Spawn) - Spawn object representing `spawn`.
- `item_id` (uint32) - Integer value `item_id`.
**Returns:** None.
**Example:**
```lua
-- Example usage
RemoveLootItem(..., ...)
-- From SpawnScripts/Antonica/adankfurdockwarden.lua
function death(NPC, Spawn)
if GetQuestStep(Spawn, QUEST_3) == 2 then
if not HasItem(Spawn, 7800) then
AddLootItem(Spawn, 7800)
elseif HasItem(Spawn, 7800) then
RemoveLootItem(Spawn, 7800)
end
```

View File

@ -1,16 +1,17 @@
Function: RemovePrimaryEntityCommand(Spawn, CommandString)
### Function: RemovePrimaryEntityCommand(Spawn, CommandString)
Description: Removes a previously added primary entity command from the specified spawn entirely. Players will no longer see that option when interacting with the spawn.
**Description:**
Removes a previously added primary entity command from the specified spawn entirely. Players will no longer see that option when interacting with the spawn.
Parameters:
**Parameters:**
- `Spawn`: Spawn The entity from which to remove the command.
- `CommandString`: String The name of the command to remove.
Spawn: Spawn The entity from which to remove the command.
**Returns:** None.
CommandString: String The name of the command to remove.
Returns: None.
Example:
**Example:**
```lua
-- Example usage (Remove hail from command list)
RemovePrimaryEntityCommand(QuestNPC, "hail")
```

View File

@ -1,17 +1,14 @@
### Function: RemoveRecipeFromPlayer(param1, param2)
### Function: RemoveRecipeFromPlayer(player, recipe_id)
**Description:**
Placeholder description.
Removes the recipe_id from the Player's recipe book.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: int32 - Integer value.
- `player` (Spawn) - Spawn object representing `player`.
- `recipe_id` (uint32) - Integer value `recipe_id`.
**Returns:** None.
**Returns:** True if successfully removed from recipe book, otherwise False if unable to remove from recipe book.
**Example:**
```lua
-- Example usage
RemoveRecipeFromPlayer(..., ...)
```
Example Required

View File

@ -1,19 +1,15 @@
### Function: RemoveRegion(param1, param2, param3, param4)
### Function: RemoveRegion(zone, version, region_name)
**Description:**
Placeholder description.
Removes a region by name from the the 3d space tracking.
**Parameters:**
- `param1`: ZoneServer - The zone object.
- `param2`: unknown - Unknown type.
- `param3`: int32 - Integer value.
- `param4`: string - String value.
- `zone` (Zone) - Zone object representing `zone`.
- `version` (int32) - Integer value `version`.
- `region_name` (string) - String `region_name`.
**Returns:** None.
**Example:**
```lua
-- Example usage
RemoveRegion(..., ..., ..., ...)
```
Example Required

View File

@ -1,17 +1,18 @@
### Function: RemoveSkillBonus(param1, param2)
### Function: RemoveSkillBonus(spawn)
**Description:**
Placeholder description.
Remove's any skill bonuses added to the Spawn (if outside a spells script) or all spell targets of a spell from AddSkillBonus (if inside a spell script).
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `spawn` (Spawn) - Spawn object reference `spawn`.
**Returns:** None.
**Example:**
```lua
-- Example usage
RemoveSkillBonus(..., ...)
-- From Spells/AA/BattlemagesFervor.lua
function remove(Caster, Target)
RemoveSkillBonus(Target)
end
```

View File

@ -1,20 +1,15 @@
### Function: RemoveSpawnIDAccess(param1, param2, param3, param4, param5)
### Function: RemoveSpawnIDAccess(spawn, id, zone)
**Description:**
Placeholder description.
Removes the Spawn(Player) access to any of the `id` spawn ids inside the Zone specified. If zone is not provided, Spawn's zone is used.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: unknown - Unknown type.
- `param4`: int32 - Integer value.
- `param5`: ZoneServer - The zone object.
- `spawn` (Spawn) - Spawn object representing `spawn`.
- `id` (uint32) - Integer value `id`.
- `zone` (Zone) - Zone object representing `zone`.
**Returns:** None.
**Example:**
```lua
-- Example usage
RemoveSpawnIDAccess(..., ..., ..., ..., ...)
```
Example Required

View File

@ -1,17 +1,18 @@
### Function: RemoveSpellBonus(param1, param2)
### Function: RemoveSpellBonus(spawn)
**Description:**
Placeholder description.
Remove's any spell bonuses from AddSpellBonus. If inside a spell Script RemoveSpellBonus() will remove all spell targets bonuses, RemoveSpellBonus(Target) removes only that Spawn's spell bonuses.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `spawn` (Spawn) - Spawn object reference `spawn`.
**Returns:** None.
**Example:**
```lua
-- Example usage
RemoveSpellBonus(..., ...)
-- From Spells/AA/AbilityAptitude.lua
function remove(Caster, Target)
RemoveSpellBonus(Target)
end
```

View File

@ -1,17 +1,21 @@
### Function: RemoveSpellBookEntry(param1, param2)
### Function: RemoveSpellBookEntry(player, spellid)
**Description:**
Placeholder description.
Removes the spellid from the Player's spell book.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: int32 - Integer value.
- `player` (Spawn) - Spawn object representing `player`.
- `spellid` (uint32) - Integer value `spellid`.
**Returns:** None.
**Example:**
```lua
-- Example usage
RemoveSpellBookEntry(..., ...)
-- From ItemScripts/BrawlerCertificationPapers.lua
function Class(Item, Player)
conversation = CreateConversation()
if CanReceiveQuest(Player,Quest) then
AddConversationOption(conversation, "[Turn in these papers for gear]","QuestStart")
end
```

View File

@ -1,17 +1,14 @@
### Function: RemoveWidgetFromSpawnMap(param1, param2)
### Function: RemoveWidgetFromSpawnMap(spawn, widget_id)
**Description:**
Placeholder description.
Removes the widget from the map (line of sight and heightmap checks).
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: int32 - Integer value.
- `spawn` (Spawn) - Spawn object representing `spawn`.
- `widget_id` (uint32) - Integer value `widget_id`.
**Returns:** None.
**Example:**
```lua
-- Example usage
RemoveWidgetFromSpawnMap(..., ...)
```
Example Required

View File

@ -1,17 +1,23 @@
### Function: RemoveWidgetFromZoneMap(param1, param2)
### Function: RemoveWidgetFromZoneMap(zone, widget_id)
**Description:**
Placeholder description.
Removes the widget from the 3d world space in the client and server. Must be used in preinit_zone_script
**Parameters:**
- `param1`: ZoneServer - The zone object.
- `param2`: int32 - Integer value.
- `zone` (Zone) - Zone object representing `zone`.
- `widget_id` (uint32) - Integer value `widget_id`.
**Returns:** None.
**Example:**
```lua
-- Example usage
RemoveWidgetFromZoneMap(..., ...)
-- From ZoneScripts/ThunderingSteppes.lua
function preinit_zone_script(Zone)
RemoveWidgetFromZoneMap(Zone, 2909687498)
RemoveWidgetFromZoneMap(Zone, 506885674)
RemoveWidgetFromZoneMap(Zone, 800135876)
RemoveWidgetFromZoneMap(Zone, 2944954936)
end
```

View File

@ -1,22 +1,18 @@
### Function: ReplaceWidgetFromClient(param1, param2, param3, param4, param5, param6, param7)
### Function: ReplaceWidgetFromClient(player, widget_id, x, y, z, grid_id)
**Description:**
Placeholder description.
Can relocate a widget from its current location in the client map to a new location. Must be called after client has sent sys_client_avatar_ready
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: int32 - Integer value.
- `param3`: int8 - Small integer or boolean flag.
- `param4`: float - Floating point value.
- `param5`: float - Floating point value.
- `param6`: float - Floating point value.
- `param7`: int32 - Integer value.
- `player` (Spawn) - Spawn object representing `player`.
- `widget_id` (uint32) - Integer value `widget_id`.
- `x` (int32) - Integer value `x`.
- `y` (int32) - Integer value `y`.
- `z` (int32) - Integer value `z`.
- `grid_id` (uint32) - Integer value `grid_id`.
**Returns:** None.
**Example:**
```lua
-- Example usage
ReplaceWidgetFromClient(..., ..., ..., ..., ..., ..., ...)
```
Example Required

View File

@ -1,20 +1,35 @@
### Function: Say(param1, param2, param3, param4, param5)
### Function: Say(spawn, message, player, dist, language)
**Description:**
Placeholder description.
Sends a Say message from the Spawn to the general area based on distance, or otherwise to a specific Player if specified, otherwise optional/nil.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: string - String value.
- `param3`: Spawn - The spawn or entity involved.
- `param4`: float - Floating point value.
- `param5`: int32 - Integer value.
- `spawn` (Spawn) - Spawn object representing `spawn`.
- `message` (string) - String `message`.
- `player` (Spawn) - Spawn object representing `player`.
- `dist` (int32) - Integer value `dist`.
- `language` (int32) - Integer value `language`.
**Returns:** None.
**Example:**
```lua
-- Example usage
Say(..., ..., ..., ..., ...)
-- From ItemScripts/DrawingRay.lua
function used(Item, Player)
quest = GetQuest(Player, CAVES_CONSUL_BREE_QUEST_3)
--Say(Player, "RAY HAS BEEN USED")
if HasQuest(Player, CAVES_CONSUL_BREE_QUEST_3) then
spawn = GetTarget(Player)
-- Say(Player, "PLAYER HAS QUEST")
if spawn ~= nil then
--Say(Player, "SPAWN IS NOT NIL")
-- river behemoth remains
if GetSpawnID(spawn) == RIVER_BEHEMOTH_REMAINS_ID then
CastSpell(Player, 5104, 1)
GiveQuestItem(quest, Player, "", RIVER_STONE_ID)
-- Say(Player, "ITEM OBTAINED")
else
SendMessage(Player, "The Drawing Ray has no effect. Emma said it must be used on the remains of a river behemoth.")
end
```

View File

@ -1,20 +1,17 @@
### Function: SayOOC(param1, param2, param3, param4, param5)
### Function: SayOOC(spawn, message, player, dist, language)
**Description:**
Placeholder description.
Sends a Out of Character message from the Spawn to the general area based on the distance, or otherwise to a specific Player if specified, otherwise optional/nil.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: string - String value.
- `param3`: Spawn - The spawn or entity involved.
- `param4`: float - Floating point value.
- `param5`: int32 - Integer value.
- `spawn` (Spawn) - Spawn object representing `spawn`.
- `message` (string) - String `message`.
- `player` (Spawn) - Spawn object representing `player`.
- `dist` (int32) - Integer value `dist`.
- `language` (int32) - Integer value `language`.
**Returns:** None.
**Example:**
```lua
-- Example usage
SayOOC(..., ..., ..., ..., ...)
```
Example Required

View File

@ -1,21 +1,17 @@
### Function: SendHearCast(param1, param2, param3, param4, param5, param6)
### Function: SendHearCast(spell, spell_visual_id, cast_time, caster, target)
**Description:**
Placeholder description.
Sends a notice to the area that they see visually per Spell Visuals in https://wiki.eq2emu.com/ReferenceLists and receive a spell message in their chat window based on Caster and Target.
**Parameters:**
- `param1`: unknown - Unknown type.
- `param2`: Spawn - The spawn or entity involved.
- `param3`: int32 - Integer value.
- `param4`: int16 - Short integer value.
- `param5`: Spawn - The spawn or entity involved.
- `param6`: Spawn - The spawn or entity involved.
- `spawn` (Spawn) - Spawn object representing `spawn`.
- `spell_visual_id` (uint32) - Integer value `spell_visual_id`.
- `cast_time` (int32) - Time value `cast_time` in seconds.
- `caster` (Spawn) - Spawn object representing `caster`.
- `target` (Spawn) - Spawn object representing `target`.
**Returns:** None.
**Example:**
```lua
-- Example usage
SendHearCast(..., ..., ..., ..., ..., ...)
```
Example Required

View File

@ -1,18 +1,68 @@
### Function: SendMessage(param1, param2, param3)
### Function: SendMessage(spawn, message, color_str)
**Description:**
Placeholder description.
Sends a direct channel message to the Spawn/Player. The color_str is optional, default is white, "red" and "yellow" is offered.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: string - String value.
- `param3`: string - String value.
- `spawn` (Spawn) - Spawn object representing `spawn`.
- `message` (string) - String `message`.
- `color_str` (string) - String `color_str`.
**Returns:** None.
**Example:**
```lua
-- Example usage
SendMessage(..., ..., ...)
-- From ItemScripts/aBagofBasicProvisions.lua
function examined(Item, Player)
RemoveItem(Player,1001011,1)
SummonItem(Player, 36684,0)
SummonItem(Player, 36684,0)
SummonItem(Player, 36684,0)
SummonItem(Player, 36684,0)
SummonItem(Player, 36684,0)
SummonItem(Player, 36684,0)
SummonItem(Player, 36684,0)
SummonItem(Player, 36684,0)
SummonItem(Player, 36684,0)
SummonItem(Player, 36684,0)
SummonItem(Player, 36684,0)
SummonItem(Player, 36684,0)
SummonItem(Player, 36684,0)
SummonItem(Player, 36684,0)
SummonItem(Player, 36684,0)
SummonItem(Player, 36684,0)
SummonItem(Player, 36684,0)
SummonItem(Player, 36684,0)
SummonItem(Player, 36684,0)
SummonItem(Player, 36684,0)
SummonItem(Player, 36211,0)
SummonItem(Player, 36211,0)
SummonItem(Player, 36211,0)
SummonItem(Player, 36211,0)
SummonItem(Player, 36211,0)
SummonItem(Player, 36211,0)
SummonItem(Player, 36211,0)
SummonItem(Player, 36211,0)
SummonItem(Player, 36211,0)
SummonItem(Player, 36211,0)
SummonItem(Player, 36211,0)
SummonItem(Player, 36211,0)
SummonItem(Player, 36211,0)
SummonItem(Player, 36211,0)
SummonItem(Player, 36211,0)
SummonItem(Player, 36211,0)
SummonItem(Player, 36211,0)
SummonItem(Player, 36211,0)
SummonItem(Player, 36211,0)
SummonItem(Player, 36211,0)
SendMessage(Player, "You found 20 flasks of water in the bag.")
SendMessage(Player, "You found 20 rations in the bag.")
--[[ alignment = GetDeity(Player) --THESE ARE COMMEMORATIVE COINS. THIS ITEM HAS BEEN GIVEN TO THE AMBASSADORS FOR PLAYERS SELECTING THEIR CITY. THIS REDUCES THE CHANCE THE WRONG COIN IS GIVEN.
if alignment == 0 then
SummonItem(Player, 1413,1) -- evil rewards
else
SummonItem(Player, 1414,1) -- good rewards
end]]--
end
```

View File

@ -1,16 +1,13 @@
### Function: SendNewAdventureSpells(param1)
### Function: SendNewAdventureSpells(player)
**Description:**
Placeholder description.
Sends adventure spells by their level.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `player` (Spawn) - Spawn object representing `player`.
**Returns:** None.
**Example:**
```lua
-- Example usage
SendNewAdventureSpells(...)
```
Example Required

View File

@ -1,16 +1,13 @@
### Function: SendNewTradeskillSpells(param1)
### Function: SendNewTradeskillSpells(player)
**Description:**
Placeholder description.
Sends tradeskill spells by their level.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `player` (Spawn) - Spawn object representing `player`.
**Returns:** None.
**Example:**
```lua
-- Example usage
SendNewTradeskillSpells(...)
```
Example Required

View File

@ -1,22 +1,25 @@
### Function: SendPopUpMessage(param1, param2, param3, param4, param5, param6, param7)
### Function: SendPopUpMessage(spawn, message, red, green, blue)
**Description:**
Placeholder description.
Sends a popup message to the Spawn(Player) with the message in the popup.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: unknown - Unknown type.
- `param4`: string - String value.
- `param5`: int8 - Small integer or boolean flag.
- `param6`: int8 - Small integer or boolean flag.
- `param7`: int8 - Small integer or boolean flag.
- `spawn` (Spawn) - Spawn object representing `spawn`.
- `message` (string) - String `message`.
- `red` (int32) - Integer value `red`.
- `green` (int32) - Integer value `green`.
- `blue` (int32) - Integer value `blue`.
**Returns:** None.
**Example:**
```lua
-- Example usage
SendPopUpMessage(..., ..., ..., ..., ..., ..., ...)
-- From ItemScripts/BardCertificationPapers.lua
function QuestStart(Item,Player)
OfferQuest(nil,Player,Quest)
conversation = CreateConversation()
AddConversationOption(conversation, "[Put the signed certificate away]","TaskDone")
StartDialogConversation(conversation, 2, Item, Player, "The Shady Swashbuckler might have some gear I can use...")
end
```

View File

@ -1,18 +1,25 @@
### Function: SendStateCommand(param1, param2, param3)
### Function: SendStateCommand(spawn, new_state, player)
**Description:**
Placeholder description.
Updates the state of the Spawn and it's behavior, can optionally be sent to a single Player. The new_state is based on the Appearance ID's https://wiki.eq2emu.com/ReferenceLists by client version.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: int32 - Integer value.
- `param3`: Spawn - The spawn or entity involved.
- `spawn` (Spawn) - Spawn object representing `spawn`.
- `new_state` (int32) - Integer value `new_state`.
- `player` (Spawn) - Spawn object representing `player`.
**Returns:** None.
**Example:**
```lua
-- Example usage
SendStateCommand(..., ..., ...)
-- From Quests/TheCryptofBetrayal/forgotten_potion.lua
function Accepted(Quest, QuestGiver, Player)
FaceTarget(QuestGiver, Player)
local conversation = CreateConversation()
if GetClientVersion(Player) == 546 then
SendStateCommand(QuestGiver, 13061)
else
PlayAnimation(QuestGiver, 13061)
end
```

View File

@ -1,20 +1,19 @@
Function: SendUpdateDefaultCommand(Spawn, Distance, CommandString, Player)
### Function: SendUpdateDefaultCommand(Spawn, Distance, CommandString, Player)
Description: Updates the default highlighted command for an entity, as seen on hover or target window. This is often used after changing accessible commands to ensure the correct default action (usually the first allowed command) is highlighted.
**Description:**
Updates the default highlighted command for an entity, as seen on hover or target window. This is often used after changing accessible commands to ensure the correct default action (usually the first allowed command) is highlighted.
Parameters:
**Parameters:**
- `Spawn`: Spawn The entity to update.
- `Distance`: Float The maximum distance the command can be used.
- `CommandString`: String The command to provide access.
- `Player`: Spawn The player whom has access to the command (optional to specify a specific Player).
Spawn: Spawn The entity to update.
**Returns:** None.
Distance: Float The maximum distance the command can be used.
CommandString: String The command to provide access.
Player: Spawn The player whom has access to the command (optional to specify a specific Player).
Returns: None.
Example:
**Example:**
```lua
-- Example usage (after toggling commands on an NPC, refresh its default action)
SendUpdateDefaultCommand(NPC, 10.0, "hail")
```

View File

@ -1,20 +1,19 @@
Function: SetAccessToEntityCommand(Spawn, Player, CommandString, Allowed)
### Function: SetAccessToEntityCommand(Spawn, Player, CommandString, Allowed)
Description: Controls whether a particular primary entity command (right-click option) is enabled for a given spawn. You can use this to enable or disable specific interactions dynamically.
**Description:**
Controls whether a particular primary entity command (right-click option) is enabled for a given spawn. You can use this to enable or disable specific interactions dynamically.
Parameters:
**Parameters:**
- `Spawn`: Spawn The entity whose command access to modify.
- `Player`: Spawn The Player who will receive access to the command.
- `CommandString`: String The name of the command (same as used in AddPrimaryEntityCommand).
- `Allowed`: UInt8 `1` to allow players to use this command on the spawn; `0` to remove it.
Spawn: Spawn The entity whose command access to modify.
**Returns:** Return's true if successfully adding access to the entity command.
Player: Spawn The Player who will receive access to the command.
CommandString: String The name of the command (same as used in AddPrimaryEntityCommand).
Allowed: UInt8 `1` to allow players to use this command on the spawn; `0` to remove it.
Returns: Return's true if successfully adding access to the entity command.
Example:
**Example:**
```lua
-- Example usage (disable the 'Buy' option on a merchant after shop closes)
SetAccessToEntityCommand(MerchantNPC, "Buy", 0)
```

View File

@ -1,20 +1,19 @@
Function: SetAccessToEntityCommandByCharID(Spawn, CharID, CommandString, Allowed)
### Function: SetAccessToEntityCommandByCharID(Spawn, CharID, CommandString, Allowed)
Description: Similar to SetAccessToEntityCommand, but targets a specific player (by character ID) and spawn. It toggles a commands availability for that one player on the given spawn.
**Description:**
Similar to SetAccessToEntityCommand, but targets a specific player (by character ID) and spawn. It toggles a commands availability for that one player on the given spawn.
Parameters:
**Parameters:**
- `Spawn`: Spawn The entity offering the command.
- `CharID`: Int32 The character ID of the player whose access to adjust.
- `CommandString`: String The command name.
- `Allowed`: UInt8 `1` to allow that player to use the command; `0` to deny them.
Spawn: Spawn The entity offering the command.
**Returns:** If successful at setting permission to the entity command, function return's true.
CharID: Int32 The character ID of the player whose access to adjust.
CommandString: String The command name.
Allowed: UInt8 `1` to allow that player to use the command; `0` to deny them.
Returns: If successful at setting permission to the entity command, function return's true.
Example:
**Example:**
```lua
-- Example usage (allow only a specific player to use a secret doors “Open” command)
SetAccessToEntityCommandByCharID(SecretDoor, PlayerCharID, "Open", 1)
```

View File

@ -1,17 +1,19 @@
### Function: SetAdventureClass(param1, param2)
### Function: SetAdventureClass(spawn, value)
**Description:**
Placeholder description.
Changes the Spawn(Player) class to the new value. Class list is available at https://wiki.eq2emu.com/ReferenceLists/ClassList
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: int8 - Small integer or boolean flag.
- `spawn` (Spawn) - Spawn object representing `spawn`.
- `value` (int32) - Integer value `value`.
**Returns:** None.
**Example:**
```lua
-- Example usage
SetAdventureClass(..., ...)
-- From ItemScripts/BardCertificationPapers.lua
StartDialogConversation(conversation, 2, Item, Player, "You are now known as \n\n"..GetName(Player).." the Bard.")
if GetClass(Player)== 1 or GetClass(Player)== 0 then
SetAdventureClass(Player,35)
```

View File

@ -1,20 +1,22 @@
### Function: SetAggroRadius(param1, param2, param3, param4, param5)
### Function: SetAggroRadius(spawn, distance, override_)
**Description:**
Placeholder description.
Sets the aggro radius of the Spawn(NPC). The override_ flag will set the base aggro radius to the same value.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: unknown - Unknown type.
- `param4`: float - Floating point value.
- `param5`: bool - Boolean value (true/false).
- `spawn` (Spawn) - Spawn object representing `spawn`.
- `distance` (int32) - Distance `distance`.
- `override_` (int32) - Integer value `override_`.
**Returns:** None.
**Example:**
```lua
-- Example usage
SetAggroRadius(..., ..., ..., ..., ...)
-- From SpawnScripts/Commonlands/aMilitiaGuard.lua
function spawn(NPC)
NPCModule(NPC, Spawn)
SetAggroRadius(NPC, 20)
AddTimer(NPC, 180000, "despawn", 1)
end
```

View File

@ -1,18 +1,14 @@
### Function: SetAgi(param1, param2, param3)
### Function: SetAgi(spawn, value)
**Description:**
Placeholder description.
Set's the Spawn's agility to the value.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: float - Floating point value.
- `luaspell` (int32) - Integer value `luaspell`.
- `value` (int32) - Integer value `value`.
**Returns:** None.
**Example:**
```lua
-- Example usage
SetAgi(..., ..., ...)
```
Example Required

View File

@ -1,17 +1,22 @@
### Function: SetAgiBase(param1, param2)
### Function: SetAgiBase(spawn, value)
**Description:**
Placeholder description.
Set's the Spawn's base agility to the value.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: int16 - Short integer value.
- `spawn` (Spawn) - Spawn object representing `spawn`.
- `value` (int32) - Integer value `value`.
**Returns:** None.
**Example:**
```lua
-- Example usage
SetAgiBase(..., ...)
-- From SpawnScripts/Generic/CombatModule.lua
function attributes(NPC, Spawn)
-- Calculate attributes
if level <= 4 then
baseStat = 19 else
baseStat = level + 15
end
```

View File

@ -1,17 +1,27 @@
### Function: SetAttackable(param1, param2)
### Function: SetAttackable(spawn, attackable)
**Description:**
Placeholder description.
Sets the Spawn attackable or not.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: int8 - Small integer or boolean flag.
- `spawn` (Spawn) - Spawn object representing `spawn`.
- `attackable` (int32) - Integer value `attackable`.
**Returns:** None.
**Example:**
```lua
-- Example usage
SetAttackable(..., ...)
-- From Quests/FarJourneyFreeport/TasksaboardtheFarJourney.lua
function CurrentStep(Quest, QuestGiver, Player)
if GetQuestStepProgress(Player, 524,2) == 0 and GetQuestStep(Player, 524) == 2 then
i = 1
spawns = GetSpawnListBySpawnID(Player, 270010)
repeat
spawn = GetSpawnFromList(spawns, i-1)
if spawn then
ChangeHandIcon(spawn, 1)
AddPrimaryEntityCommand(nil, spawn)
SpawnSet(NPC, "targetable", 1, true, true)
end
```

View File

@ -1,18 +1,14 @@
### Function: SetCanBind(param1, param2, param3)
### Function: SetCanBind(spawn, canbind)
**Description:**
Placeholder description.
Sets if the zone allows to bind.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: int32 - Integer value.
- `spawn` (Spawn) - Spawn object representing `spawn`.
- `canbind` (int32) - Integer value `canbind`.
**Returns:** None.
**Example:**
```lua
-- Example usage
SetCanBind(..., ..., ...)
```
Example Required

View File

@ -1,18 +1,14 @@
### Function: SetCanEvac(param1, param2, param3)
### Function: SetCanEvac(spawn, canevac)
**Description:**
Placeholder description.
Sets if the zone allows evac in the area.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: int32 - Integer value.
- `spawn` (Spawn) - Spawn object representing `spawn`.
- `canevac` (int32) - Integer value `canevac`.
**Returns:** None.
**Example:**
```lua
-- Example usage
SetCanEvac(..., ..., ...)
```
Example Required

View File

@ -1,18 +1,14 @@
### Function: SetCanGate(param1, param2, param3)
### Function: SetCanGate(spawn, cangate)
**Description:**
Placeholder description.
Sets if the zone allows gate in the area.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: int32 - Integer value.
- `spawn` (Spawn) - Spawn object representing `spawn`.
- `cangate` (int32) - Integer value `cangate`.
**Returns:** None.
**Example:**
```lua
-- Example usage
SetCanGate(..., ..., ...)
```
Example Required

View File

@ -1,19 +1,14 @@
### Function: SetCastOnAggroComplete(param1, param2, param3, param4)
### Function: SetCastOnAggroComplete(spawn, value)
**Description:**
Placeholder description.
Overrides the cast on aggro complete flag for an NPC.
**Parameters:**
- `param1`: Spawn - The spawn or entity involved.
- `param2`: unknown - Unknown type.
- `param3`: unknown - Unknown type.
- `param4`: int8 - Small integer or boolean flag.
- `spawn` (Spawn) - Spawn object representing `spawn`.
- `value` (Bool) - Bool `value`.
**Returns:** None.
**Example:**
```lua
-- Example usage
SetCastOnAggroComplete(..., ..., ..., ...)
```
Example Required

View File

@ -1,17 +1,14 @@
### Function: SetCoinTmpReward(param1, param2)
### Function: SetCoinTmpReward(quest, coins)
**Description:**
Placeholder description.
Set the temporary reward for the quest to the coins in copper.
**Parameters:**
- `param1`: unknown - Unknown type.
- `param2`: unknown - Unknown type.
- `quest` (Quest) - Quest object representing `quest`.
- `coins` (int32) - Integer value `coins`.
**Returns:** None.
**Example:**
```lua
-- Example usage
SetCoinTmpReward(..., ...)
```
Example Required

View File

@ -1,17 +1,19 @@
### Function: SetCompleteFlag(param1, param2)
### Function: SetCompleteFlag(quest)
**Description:**
Placeholder description.
Set the quest flag as completed.
**Parameters:**
- `param1`: unknown - Unknown type.
- `param2`: unknown - Unknown type.
- `quest` (Quest) - Quest object representing `quest`.
**Returns:** None.
**Example:**
```lua
-- Example usage
SetCompleteFlag(..., ...)
-- From Quests/Darklight/ASolidifiedFront.lua
function QuestComplete(Quest, QuestGiver, Player)
SetCompleteFlag(Quest)
GiveQuestReward(Quest, Player)
end
```

Some files were not shown because too many files have changed in this diff Show More