- Play
- Server
- Introduction
- AAs
- Bots
- Configuration
- Developer
- Database
- Expansions
- Expedition System
- Factions
- Guild Management
- Items
- Inventory
- Logging
- Login Server
- Maps
- NPC
- Operation
- Adjust Maximum Level
- Adjust World Date / Time
- Changing Start Zones
- Chat Channel Types
- Commands Reference
- Database Schema Migrations
- DBStr Types
- Disabling Lootdrop Entries
- Disabling Merchantlist Entries
- Expansion Bitmasks
- Expansion List
- Exporting Client Files
- First Time Running A Server
- Implement PvP
- Loading Server Data
- NATS Channels
- Server Events Scheduler
- Server Management
- Server Rules
- Server Variables
- Parcel Management
- Player
- Skills
- Server Installation
- Scripting
- Spells
- Introduction
- Aura Movement Types
- Aura Spawn Types
- Aura Types
- Base Value Formulas
- Blocked Spell Types
- Bot Spell List IDs
- Buff Duration Formulas
- Client Spell ID Limitations
- Damage Shield Types
- Damage Shield Types
- Element Types
- Environment Types
- GetSpellStat Identifiers
- Illusion Spell Guidelines
- NPC Spell Categories
- Numhit Types
- Resist Types
- Spell Attack Speed
- Spell Buff Stacking
- Spell Conditions
- Spell Damage Modifiers
- Spell Effect Fields
- Spell Effect IDs
- Spell Groups
- Spell Heal Modifiers
- Spell Mechanics
- Spell Resist Types
- Spell Target Restrictions
- Spell Types
- Target Types
- Time of Day Types
- Type Effect Description Number
- Task System
- Tools
- Zones
- Database Schema
- AAs
- Account
- Admin
- banned_ips
- bug_reports
- bugs
- chatchannels
- chatchannel_reserved_names
- command_settings
- command_subsettings
- db_version
- discovered_items
- discord_webhooks
- eqtime
- eventlog
- gm_ips
- hackers
- ip_exemptions
- level_exp_mods
- logsys_categories
- name_filter
- perl_event_export_settings
- petitions
- peq_admin
- profanity_list
- player_event_logs
- player_event_log_settings
- reports
- saylink
- start_zones
- starting_items
- variables
- veteran_reward_templates
- Adventures
- Alternate Currency
- Books
- Bots
- bot_buffs
- bot_command_settings
- bot_create_combinations
- bot_data
- bot_guild_members
- bot_heal_rotations
- bot_heal_rotation_members
- bot_heal_rotation_targets
- bot_inspect_messages
- bot_inventories
- bot_owner_options
- bot_pets
- bot_pet_buffs
- bot_pet_inventories
- bot_spells_entries
- bot_spell_casting_chances
- bot_spell_settings
- bot_stances
- bot_timers
- Buyers
- Characters
- char_create_combinations
- char_create_point_allocations
- char_recipe_list
- character_activities
- character_alt_currency
- character_alternate_abilities
- character_auras
- character_bandolier
- character_bind
- character_buffs
- character_corpse_items
- character_corpses
- character_currency
- character_data
- character_disciplines
- character_enabledtasks
- character_exp_modifiers
- character_expedition_lockouts
- character_inspect_messages
- character_instance_safereturns
- character_item_recast
- character_languages
- character_leadership_abilities
- character_material
- character_memmed_spells
- character_peqzone_flags
- character_pet_buffs
- character_pet_info
- character_pet_inventory
- character_potionbelt
- character_skills
- character_spells
- character_tasks
- character_task_timers
- character_tribute
- friends
- keyring
- lfguild
- player_titlesets
- Client Files
- Data Storage
- Doors
- Dynamic Zones
- Expeditions
- Factions
- Flagging
- Graveyards
- Ground Spawns
- Groups
- Guilds
- Grids
- Horses
- Instances
- Inventory
- Items
- Loginserver
- Loot
- Mercenaries
- Merchants
- NPCs
- Objects
- Pets
- Query Server
- qs_merchant_transaction_record
- qs_merchant_transaction_record_entries
- qs_player_aa_rate_hourly
- qs_player_delete_record
- qs_player_delete_record_entries
- qs_player_events
- qs_player_handin_record
- qs_player_handin_record_entries
- qs_player_move_record
- qs_player_move_record_entries
- qs_player_npc_kill_record
- qs_player_npc_kill_record_entries
- qs_player_speech
- qs_player_trade_record
- qs_player_trade_record_entries
- Scheduler
- Raids
- Rules
- Spawns
- Spells
- Tasks
- Timers
- Titles
- Tools
- Trader
- Tradeskills
- Traps
- Tributes
- Views
- Zone
- Quest API
- Resources
- Methods
- Events
- Constants
- Perl [Mob]
- Perl [Zone]
- Lua [Appearance]
- Lua [BT]
- Lua [Class]
- Lua [ClientVersion]
- Lua [Database]
- Lua [Event]
- Lua [ExpSource]
- Lua [ExpeditionLockMessage]
- Lua [Faction]
- Lua [Filter]
- Lua [InventoryWhere]
- Lua [JournalMode]
- Lua [Language]
- Lua [MT]
- Lua [Material]
- Lua [Opcode]
- Lua [Rule]
- Lua [Skill]
- Lua [Slot]
- Lua [SpeakMode]
- Lua [SpecialAbility]
- Lua [Zone]
- Changelog
- Akk Stack
- Introduction
- Install
- Operate
- Develop
- Client
- Introduction
- Guides
- OpenZone
- WCEmu
- References
- EQGZI
- Zone Utilities
- Misc Tools
- Contributing
- Tags
Example
This example demonstrates a full shared task selector offer with dynamic zone creation on accept. Note that dz creation can occur at any time and does not have to occur on the accept event but will likely be the most common point.
local shared_task_id = 4795 -- some database task id with type set to shared task
local non_shared_task_id = 10 -- some database task id with type set to quest
function event_say(e)
if e.message:findi("hail") then
-- The non-shared task here will be ignored, mixing shared tasks
-- with other types is not allowed due to shared task validation
eq.task_selector({ non_shared_task_id, shared_task_id })
end
end
function event_task_accepted(e)
if e.task_id == shared_task_id then
-- create dz for the shared task on the client that accepted it
-- dz duration will be overridden by time remaining on the shared task
local dz = {
instance = { zone="thundercrest", version = 11 },
compass = { zone="broodlands", x=1241.88, y=511.147, z=23.4192 },
safereturn = { zone="broodlands", x=1242.0, y=526.0, z=27.0, h=0.0 }
}
e.other:CreateTaskDynamicZone(e.task_id, dz)
end
end