Update: show usable item in active quest list

EQ2Emulator Development forum.

Moderator: Team Members

Post Reply
User avatar
Ememjr
Team Member
Posts: 975
Joined: Wed Mar 15, 2017 9:41 am
EQ2Emu Server: Perseverance

Update: show usable item in active quest list

Post by Ememjr » Sun Sep 10, 2017 1:08 pm

this update will fix and allow this
usableitem.JPG
be sure to use the worldstruct.xml in the following post http://www.eq2emulator.net/phpBB3/viewt ... 297#p32297

in LuaFunctions.cpp

add the following line
int32 usableitemid = lua_interface->GetInt32Value(state, 8);
and modify this line
QuestStep* quest_step = quest->AddQuestStep(step, QUEST_STEP_TYPE_NORMAL, description, 0, quantity, taskgroup, 0, 0, percentage, usableitemid);
in the the following

Code: Select all

int EQ2Emu_lua_AddQuestStep(lua_State* state) {
	Quest* quest = lua_interface->GetQuest(state);
	if (quest) {
		int32 step = lua_interface->GetInt32Value(state, 2);
		string description = lua_interface->GetStringValue(state, 3);
		int32 quantity = lua_interface->GetInt32Value(state, 4);
		float percentage = lua_interface->GetFloatValue(state, 5);
		string str_taskgroup = lua_interface->GetStringValue(state, 6);
		int16 icon = lua_interface->GetInt16Value(state, 7);
		int32 usableitemid = lua_interface->GetInt32Value(state, 8);
		const char* taskgroup = 0;
		if(str_taskgroup.length() > 0)
			taskgroup = str_taskgroup.c_str();
		QuestStep* quest_step = quest->AddQuestStep(step, QUEST_STEP_TYPE_NORMAL, description, 0, quantity, taskgroup, 0, 0, percentage, usableitemid);
		if (quest_step && icon && quantity > 0)
			quest_step->SetIcon(icon);
	}
	return 0;
}
You do not have the required permissions to view the files attached to this post.

User avatar
Ememjr
Team Member
Posts: 975
Joined: Wed Mar 15, 2017 9:41 am
EQ2Emu Server: Perseverance

Re: Update: show usable item in active quest list

Post by Ememjr » Sun Sep 10, 2017 1:11 pm

WTF 90% of this post did not post

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests