New quest LUA functions

Discussions on development of both the EQ2Emulator LUA Script Engine and Script specifications

Moderator: Team Members

Post Reply
User avatar
thefoof
Retired
Posts: 630
Joined: Wed Nov 07, 2012 7:36 pm
Location: Florida

New quest LUA functions

Post by thefoof » Sat Nov 02, 2013 9:35 pm

The first one is AddQuestStepProgressAction(Quest*, [int32] step_id, [string] "function_name") this works the same as AddQuestStepCompleteAction, adding a call to the quest script when gaining progress in a step,
the params passed to the called function are: (Quest*, [Spawn*] QuestGiver, Player*, [int32] progress_added).

Wiki:AddQuestStepProgressAction()


The second function is:

AddQuestStepHarvest(Quest*, [int] step, string "step text", [int] quantity, [int] percentage, [string] "taskgroup text", int icon, [int] item_id1, [int] item_id2, ...) this is the same syntax as AddQuestStepObtainItem and AddQuestStepCraft, if you can't tell by the name it will update when a player harvests a defined item :P.

Wiki:AddQuestStepHarvest()

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: New quest LUA functions

Post by John Adams » Tue Nov 05, 2013 10:25 am

Not to nag, but these are all making their way to the Wiki, right? I couldn't find them.

User avatar
thefoof
Retired
Posts: 630
Joined: Wed Nov 07, 2012 7:36 pm
Location: Florida

Re: New quest LUA functions

Post by thefoof » Tue Nov 05, 2013 4:10 pm

Yup, I'm working on my last quest feature I've had on the backburner for a long time (namely enhancements to SetRequiredQuest and related server functions) and once I get that done I'll do all these pages at once.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: New quest LUA functions

Post by John Adams » Wed Nov 06, 2013 7:35 am

Sorry, you know how I get ;) All dad-like and stuff.

User avatar
thefoof
Retired
Posts: 630
Joined: Wed Nov 07, 2012 7:36 pm
Location: Florida

SetRequiredQuest()

Post by thefoof » Wed Nov 06, 2013 4:42 pm

Let me start off by saying that all of these new params mentioned here are optional, and the syntax is:
SetRequiredQuest(Spawn*, [int32] quest_id, [int32] step_id, [int8] private_access, [int8] completion_access, [int16] vis_flag_override)

First off, the basic idea of the function originally is if a player doesn't have a specified quest/step, it disables vis flags (targetable, show_name ect). I just expanded upon it and improved reliability on it a bit. Enhancements:

1.Spawns will now update instantly once a step is completed.

2.If the private access param is set as 1, the spawn will also be hidden from the player if quest requirements are not met, and access granted if they are.

3.If the completion access param is set as 1, access be granted during and after a step has been completed, including after the entire quest is complete.

4.The flag override value will allow you to activate specific flags when a player does not meet quest requirements for this spawn, the values are +64 for attackable, +32 for show_level, + 16 for show_name, +4 for targetable, +2 show_command_icon, just add up which values you want activated. For example if you want targetable and show_command_icon, set this value as 6.


Wiki:SetRequiredQuest()

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests