• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver
Giveit - Lua to trade an item or coin to PC/NPC

Release Giveit - Lua to trade an item or coin to PC/NPC 09/01/2024

No permission to download
What do you have for aliases Grimmier?
ooh yeah forgot about those.

[CODE title="aliases"]/alias /lparse /Lua parse
/alias /lrun /Lua run
/alias /lstop /Lua stop
/alias /lpause /Lua pause[/CODE]

updated the previous post to fix my aliases.
 
when trying to run this Lua, I get a bunch off error-code:
1713646835677.png

was installed from the redguides launcher, also installed "knightlinc" the same way.

Any ideas how to solve this?
 
when trying to run this lua, I get a bunch off error-code:
View attachment 60633

was installed from the redguides launcher, also installed "knightlinc" the same way.

Any ideas how to solve this?
do you have a folder called lib inside of your Lua folder?
if so copy it into your Giveit folder.

or you can create a lib folder inside Giveit and put the attached Write.Lua inside that folder. that should fix the issue.
 

Attachments

eqplayer16 updated Giveit - Lua to trade an item or coin to PC/NPC with a new update entry:

08/12/2024

Bug Fixes 🐛


- Itemlist ignoring the first item in list, altcoin tab on emu
/giveit itemlist will now recognize the first item in the list.

altcoin tab isn't always tab 4 on emu so lets cycle through and find it.
(29c3393) ~grimmier378

〰️Commits​


PR # [3](https://github.com/towbes/giveit/pull/3): itemlist ignoring the first item in...

Read the rest of this update entry...
 
C:\Games\MQNext\Lua\giveit\init.Lua:352: attempt to index local 'itemName' (a nil value)
stack traceback:
C:\Games\MQNext\Lua\giveit\init.Lua: in function <C:\Games\MQNext\Lua\giveit\init.Lua:266>
 
Hmm, I wanted to try this out for progression on 6 toons but I can't get it to start.

I downloaded the file and extracted it to lua. Then in game, I did /lua run giveit but receive an error code.

Any idea(s) what I might be doing wrong?

View attachment 59936

View attachment 59937
For anyone with this problem who the knightly solution did not work for, I had already downloaded lootnscoot standalone which had a "Lib" file in it. I copied that Lib file, pasted it into the main Lua folder (not even in the giveit file) and this fixed the issue immediately. You can look at your other luas, what you need is a Lua with the file "Write" in it to copy/paste. Good luck all, hope this helps some other not technically savvy person lol!
 
my fun giveit button with different item sets per class that presses it.

Lua:
-- lua
local myClass = mq.TLO.Me.Class.ShortName()   -- Get Class for Class Specific Requests
local timeDelay = 10                          -- delay between commands, default 1 second + a hard coded 5 second buffer
local qty = 'all'                             -- quantity to trade or all

-- Items table to hold the items type and qty information
local Items = {
    -- items for anyone that clicks button formatting
    -- ['Item Name'] = {type = [coin|altcoin|item], qty = 'all'} qty = all or a quantity
    -- if you want to trade coin then use 'plat' or 'gold' as the itemName. and coin for the type.
    -- ['plat'] = {type = 'coin', qty = 'all'}
}

-- Class Specific Requests.
if myClass == 'SHD' or myClass == 'NEC' then
    Items['plat'] = {type = 'coin', qty = 'all'}
    Items['Bone Chips']          = {type = 'item', qty = 'all'}
    Items['Diamond Coin']        = {type = 'item', qty = 'all'}
    Items['Celestial Crest']     = {type = 'item', qty = 'all'}
    Items['Gold Coin']           = {type = 'item', qty = 'all'}
    Items['Lucky Coin']          = {type = 'item', qty = 'all'}
    --Items['Journeyman\'s Walking Stick'] = {type = 'item', qty = 'all'}
    Items['Silken Whip of Ensnaring'] = {type = 'item', qty = 'all'}
    Items['Magical Fairy Dust']  = {type = 'item', qty = 'all'}
end

if myClass == 'WAR' then
    Items['Diamond Coin']        = {type = 'item', qty = 'all'}
    Items['Celestial Crest']     = {type = 'item', qty = 'all'}
    Items['Gold Coin']           = {type = 'item', qty = 'all'}
    Items['Lucky Coin']          = {type = 'item', qty = 'all'}
    Items['Magical Fairy Dust']  = {type = 'item', qty = 'all'}
end

if myClass == 'PAL' then
    Items['Diamond Coin']        = {type = 'item', qty = 'all'}
    Items['Celestial Crest']     = {type = 'item', qty = 'all'}
    Items['Gold Coin']           = {type = 'item', qty = 'all'}
    Items['Lucky Coin']          = {type = 'item', qty = 'all'}
    Items['Magical Fairy Dust']  = {type = 'item', qty = 'all'}
end

if myClass == 'CLR' or myClass == 'ENC' then
    Items['Peridot']             = {type = 'item', qty = 'all'}
    Items['Pearlescent Fragment'] = {type='item', qty = 'all'}
end

if myClass == 'MAG' then
    Items['Malachite']           = {type = 'item', qty = 'all'}
end

if myClass == 'ROG' then
    Items['Consigned Bite of the Shissar IX']        = {type = 'item', qty = 'all'}
    Items['Consigned Bite of the Shissar X']         = {type = 'item', qty = 'all'}
    Items['Consigned Bite of the Shissar V']         = {type = 'item', qty = 'all'}
    Items['Consigned Bite of the Shissar VI']        = {type = 'item', qty = 'all'}
    Items['Consigned Bite of the Shissar VII']       = {type = 'item', qty = 'all'}
    Items['Consigned Bite of the Shissar VIII']      = {type = 'item', qty = 'all'}
    Items['Consigned Bite of the Shissar IV']        = {type = 'item', qty = 'all'}
    Items['Crystalline Serum']                       = {type = 'item', qty = 'all'}
end

-- load giveit
local check = "/noparse /lua parse return not mq.TLO.Lua.Script('giveit').Status.Equal('RUNNING')() and mq.cmd('/lua run giveit')"
mq.cmd('/dgae ' ..check)
local itemFlag = false

-- Cycle through party members and have them trade the items to you.
for i=1,mq.TLO.Me.GroupSize() -1 do
    for name, data in pairs(Items) do
        if data.type ~= 'item' then
            local command = "/multiline ; "
            command =     string.format('%s/timed %s, /dex %s /giveit %s pc %s "%s" %s',
                    command, timeDelay, mq.TLO.Group.Member(i).DisplayName(),
                    data.type, mq.TLO.Me.DisplayName(), name, data.qty)
            timeDelay = timeDelay + 50
            mq.cmd(command)
        else
            itemFlag = true
        end
    end
    if itemFlag then
        local command = string.format("/multiline ; /timed %d, /dex %s /giveit itemlist pc %s {", timeDelay, mq.TLO.Group.Member(i).DisplayName(), mq.TLO.Me.DisplayName())
        
        for name, data in pairs(Items) do
            if data.type == 'item' then
                command = string.format('%s"%s" %s ', command, name, data.qty)
            end
        end
        command = command .. "}"
        mq.cmd(command)
        timeDelay = timeDelay + 50
        print(command)
    end
end

timeDelay = timeDelay + 10

-- End the script and close inventory windows
mq.cmdf("/multiline ; /timed %d, /dgae /lua stop giveit; /timed %d, /dge all /keypress INVENTORY", timeDelay, (timeDelay + 5))
 
my fun giveit button with different item sets per class that presses it.

Lua:
-- lua
local myClass = mq.TLO.Me.Class.ShortName()   -- Get Class for Class Specific Requests
local timeDelay = 10                          -- delay between commands, default 1 second + a hard coded 5 second buffer
local qty = 'all'                             -- quantity to trade or all

-- Items table to hold the items type and qty information
local Items = {
    -- items for anyone that clicks button formatting
    -- ['Item Name'] = {type = [coin|altcoin|item], qty = 'all'} qty = all or a quantity
    -- if you want to trade coin then use 'plat' or 'gold' as the itemName. and coin for the type.
    -- ['plat'] = {type = 'coin', qty = 'all'}
}

-- Class Specific Requests.
if myClass == 'SHD' or myClass == 'NEC' then
    Items['plat'] = {type = 'coin', qty = 'all'}
    Items['Bone Chips']          = {type = 'item', qty = 'all'}
    Items['Diamond Coin']        = {type = 'item', qty = 'all'}
    Items['Celestial Crest']     = {type = 'item', qty = 'all'}
    Items['Gold Coin']           = {type = 'item', qty = 'all'}
    Items['Lucky Coin']          = {type = 'item', qty = 'all'}
    --Items['Journeyman\'s Walking Stick'] = {type = 'item', qty = 'all'}
    Items['Silken Whip of Ensnaring'] = {type = 'item', qty = 'all'}
    Items['Magical Fairy Dust']  = {type = 'item', qty = 'all'}
end

if myClass == 'WAR' then
    Items['Diamond Coin']        = {type = 'item', qty = 'all'}
    Items['Celestial Crest']     = {type = 'item', qty = 'all'}
    Items['Gold Coin']           = {type = 'item', qty = 'all'}
    Items['Lucky Coin']          = {type = 'item', qty = 'all'}
    Items['Magical Fairy Dust']  = {type = 'item', qty = 'all'}
end

if myClass == 'PAL' then
    Items['Diamond Coin']        = {type = 'item', qty = 'all'}
    Items['Celestial Crest']     = {type = 'item', qty = 'all'}
    Items['Gold Coin']           = {type = 'item', qty = 'all'}
    Items['Lucky Coin']          = {type = 'item', qty = 'all'}
    Items['Magical Fairy Dust']  = {type = 'item', qty = 'all'}
end

if myClass == 'CLR' or myClass == 'ENC' then
    Items['Peridot']             = {type = 'item', qty = 'all'}
    Items['Pearlescent Fragment'] = {type='item', qty = 'all'}
end

if myClass == 'MAG' then
    Items['Malachite']           = {type = 'item', qty = 'all'}
end

if myClass == 'ROG' then
    Items['Consigned Bite of the Shissar IX']        = {type = 'item', qty = 'all'}
    Items['Consigned Bite of the Shissar X']         = {type = 'item', qty = 'all'}
    Items['Consigned Bite of the Shissar V']         = {type = 'item', qty = 'all'}
    Items['Consigned Bite of the Shissar VI']        = {type = 'item', qty = 'all'}
    Items['Consigned Bite of the Shissar VII']       = {type = 'item', qty = 'all'}
    Items['Consigned Bite of the Shissar VIII']      = {type = 'item', qty = 'all'}
    Items['Consigned Bite of the Shissar IV']        = {type = 'item', qty = 'all'}
    Items['Crystalline Serum']                       = {type = 'item', qty = 'all'}
end

-- load giveit
local check = "/noparse /lua parse return not mq.TLO.Lua.Script('giveit').Status.Equal('RUNNING')() and mq.cmd('/lua run giveit')"
mq.cmd('/dgae ' ..check)
local itemFlag = false

-- Cycle through party members and have them trade the items to you.
for i=1,mq.TLO.Me.GroupSize() -1 do
    for name, data in pairs(Items) do
        if data.type ~= 'item' then
            local command = "/multiline ; "
            command =     string.format('%s/timed %s, /dex %s /giveit %s pc %s "%s" %s',
                    command, timeDelay, mq.TLO.Group.Member(i).DisplayName(),
                    data.type, mq.TLO.Me.DisplayName(), name, data.qty)
            timeDelay = timeDelay + 50
            mq.cmd(command)
        else
            itemFlag = true
        end
    end
    if itemFlag then
        local command = string.format("/multiline ; /timed %d, /dex %s /giveit itemlist pc %s {", timeDelay, mq.TLO.Group.Member(i).DisplayName(), mq.TLO.Me.DisplayName())
       
        for name, data in pairs(Items) do
            if data.type == 'item' then
                command = string.format('%s"%s" %s ', command, name, data.qty)
            end
        end
        command = command .. "}"
        mq.cmd(command)
        timeDelay = timeDelay + 50
        print(command)
    end
end

timeDelay = timeDelay + 10

-- End the script and close inventory windows
mq.cmdf("/multiline ; /timed %d, /dgae /lua stop giveit; /timed %d, /dge all /keypress INVENTORY", timeDelay, (timeDelay + 5))
Button Master Share Code Fail!
 
Code:
cmV0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ID0gIkl0ZW0iLAogIFsiQ29vbGRvd24iXSA9IDEyMCwKICBbIkNhY2hlZENvdW50RG93biJdID0gMCwKICBbIkNhY2hlZENvb2xEb3duVGltZXIiXSA9IDAsCiAgWyJDYWNoZWRUb2dnbGVMb2NrZWQiXSA9IGZhbHNlLAogIFsiQ2FjaGVkTGFzdFJhbiJdID0gOTQ1Mi4wNCwKICBbImxhYmVsTWlkWCJdID0gMCwKICBbImxhYmVsTWlkWSJdID0gMTEsCiB9LAogWyJUeXBlIl0gPSAiQnV0dG9uIiwKfQ==
 
This stopped working with the last patch. It won't target the specified target in the command. It then fails to /nav because it won't switch targets.
 
Lua:
local function ClickTrade()
    mq.delay(WaitTime)
    mq.TLO.Window("TradeWnd").Child("TRDW_Trade_Button").LeftMouseUp()
    mq.TLO.Window("GiveWnd").Child("GVW_Give_Button").LeftMouseUp()
    mq.delay(WaitTime)
end

You need to add the 2nd line to this to give to NPC. This update is from a few patches ago.
@eqplayer16
 
@eqplayer16
Can you please add the required files to the repository(or at least, the RG resource download)?
It seems to me that adding Write.Lua to the lib folder shouldn't be a thing that requires user intervention.
Cheers!

Edit: I guess another possible solution is that we just include the Write library in VV, as it is used regularly.
Not the smart way to go, from other discussion.
 
Last edited:
Trying to use this with anniversary quests. /giveit item NPC "Laveer Krass" "ward Fragment" 3

I doesn't find Laveer Krass.

Been trying it again and it seems to work on some characters and not others. Guessing I’m missing running a plugin that is required. Is there a list of required plugins?
 
Last edited:
Release Giveit - Lua to trade an item or coin to PC/NPC

Users who are viewing this thread

Back
Top
Cart