Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::LUA

Quests::LUA Section regarding LUA scripts, help, questions, answers

Reply
 
Thread Tools Display Modes
  #1  
Old 01-10-2019, 12:20 AM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default Lua trade ins not working

On my server, I have noticed that all Lua quests that involve a trade do not work. item_lib.check_turn_in always seems to return true.

For instance, Guard Haldin in Butcherblock is supposed accept a Worn Rune and summon a random weapon.

Code:
function event_trade(e)
	local item_lib = require("items");
	if(item_lib.check_turn_in(e.trade, {item1 == 18905})) then
		e.self:Say("The slaves...thank you! Here, this will help you slaughter those foul orcs!");
		e.other:AddEXP(30000);
		e.other:Ding();
		e.other:SummonItem(eq.ChooseRandom(5037,5029,13313));
	end

	item_lib.return_items(e.self, e.other, e.trade);
end
Instead, no matter what item I give him, my character gets the quest reward and has his item returned. If I turn in 18905, I get a quest reward and 18905 returned. If I turn in a random item, I still get the quest reward and the item back.

I've run the setup script and made sure that I had the latest lua_modules downloaded. Is there something else I'm supposed to do to make these scripts work properly?
Reply With Quote
  #2  
Old 01-10-2019, 12:29 AM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

https://github.com/ProjectEQ/project...rr_Hawkeye.lua

This example shows comparison as 'item1 = 15793' rather than the `item1 == 18905` in yours.
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #3  
Old 01-10-2019, 12:53 AM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default

Changing it to '=' worked. Thanks!

I submitted a pull request to fix the two broken quests I found.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 07:42 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3