View Single Post
  #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