EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::LUA (https://www.eqemulator.org/forums/forumdisplay.php?f=680)
-   -   Lua trade ins not working (https://www.eqemulator.org/forums/showthread.php?t=42266)

Randymarsh9 01-10-2019 12:20 AM

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?

Uleat 01-10-2019 12:29 AM

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

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

Randymarsh9 01-10-2019 12:53 AM

Changing it to '=' worked. Thanks!

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


All times are GMT -4. The time now is 03:05 PM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.