QuickTrade - Faster Trading With NPCs

Eorzea Time
 
 
 
Language: JP EN FR DE
users online
Forum » Windower » General » QuickTrade - Faster Trading with NPCs
QuickTrade - Faster Trading with NPCs
First Page 2 3 4 5
Offline
Posts: 1
By roundknight 2022-07-05 16:26:37
Link | Quote | Reply
 
Phoenix.Ceokitty said: »
I've tweaked the lua to include being able to trade fish to Zaldon but I'm running into an issue where it's trying to trade the first fish ID listed only. If I have no Cave Cherax in the my inventory it errors out saying it can't find it, rather than going to process the Matsya which are present. If I flip them, same problem, different fish.

In the quicktrade function I added:
Code
                local FishIDs = {
		{id = 4309, name = 'Cave Cherax', count = 0, stacks = 0, stacksize = 1},
		{id = 5468, name = 'Matsya', count = 0, stacks = 0, stacksize = 1},
	}


I added this to the npcTable:
Code
{name = 'Zaldon', idTable = FishIDs, tableType = "Fishes", loopable = true, loopWait = 15},


and then modified this line to include the fishes table:
Code
elseif tableType == 'Special Gobbiedial Keys' or tableType == 'Soul Plates' or tableType== 'Fishes' then -- 1 item at a time


It matches the syntax for all the other items, and I've got it added to the trade only one section as you can only turn in one fish at a time to the npc.

I have found the fix for this. the last line is not correct, use the following modification, 6 lines further down:
Code
 		elseif tableType == 'Mandragora Mad Items' or tableType == 'JSE Capes' or tableType == 'Fishes' then 


also the line needs to be changed as well in the section "Number of times //qtr needs to be run to empty the player inventory", because some fish stack:
Code
	elseif tableType == 'Mandragora Mad Items' or tableType == 'JSE Capes' or tableType == 'Special Gobbiedial Keys' or tableType == 'Soul Plates' or tableType == 'Fishes' then -- 1 at a time



Finally, I also expanded the first table to include all fish used in the Zaldon quest.(Make sure to delete or comment-out the fish you don't want to turn in, e.g. if you already have the rare item and want to sell the fish)
Code
            local FishIDs = {
		{id = 5476, name = 'Abaia', count = 0, stacks = 0, stacksize = 1},
		{id = 5455, name = 'Ahtapot', count = 0, stacks = 0, stacksize = 1},
		{id = 5534, name = 'Apkallufa', count = 0, stacks = 0, stacksize = 1},
		{id = 4316, name = 'Armored Pisces', count = 0, stacks = 0, stacksize = 1},
		{id = 4479, name = 'Bhefhel Marlin', count = 0, stacks = 0, stacksize = 1},
		{id = 4471, name = 'Bladefish', count = 0, stacks = 0, stacksize = 1},
		{id = 5951, name = 'Bloodblotch', count = 0, stacks = 0, stacksize = 1},
		{id = 6336, name = 'Bonefish', count = 0, stacks = 0, stacksize = 1},
		{id = 4309, name = 'Cave Cherax', count = 0, stacks = 0, stacksize = 1},
		{id = 5814, name = 'Crocodilos', count = 0, stacks = 0, stacksize = 1},
		{id = 4428, name = 'Dark Bass', count = 0, stacks = 0, stacksize = 12},
		{id = 5813, name = 'Dorado Gar', count = 0, stacks = 0, stacksize = 1},
		{id = 4454, name = 'Emperor Fish', count = 0, stacks = 0, stacksize = 1},
		{id = 6489, name = 'Far East Puffer', count = 0, stacks = 0, stacksize = 1},
		{id = 4477, name = 'Gavial Fish', count = 0, stacks = 0, stacksize = 1},
		{id = 5471, name = 'Gerrothorax', count = 0, stacks = 0, stacksize = 1},
		{id = 4469, name = 'Giant Catfish', count = 0, stacks = 0, stacksize = 1},
		{id = 4308, name = 'Giant Chirai', count = 0, stacks = 0, stacksize = 1},
		{id = 4306, name = 'Giant Donko', count = 0, stacks = 0, stacksize = 1},
		{id = 5475, name = 'Gigant Octopus', count = 0, stacks = 0, stacksize = 1},
		{id = 4474, name = 'Gigant Squid', count = 0, stacks = 0, stacksize = 1},
		{id = 4304, name = 'Grimmonite', count = 0, stacks = 0, stacksize = 1},
		{id = 5127, name = 'Gugrusaurus', count = 0, stacks = 0, stacksize = 1},
		{id = 4480, name = 'Gugru Tuna', count = 0, stacks = 0, stacksize = 1},
		{id = 5539, name = 'Hakuryu', count = 0, stacks = 0, stacksize = 1},
		{id = 5136, name = 'Istavrit', count = 0, stacks = 0, stacksize = 1},
		{id = 4307, name = 'Jungle Catfish', count = 0, stacks = 0, stacksize = 1},
		{id = 5140, name = 'Kalkanbaligi', count = 0, stacks = 0, stacksize = 1},
		{id = 5451, name = 'Kilicbaligi', count = 0, stacks = 0, stacksize = 1},
		{id = 5540, name = 'Kokuryu', count = 0, stacks = 0, stacksize = 1},
		{id = 5450, name = 'Lakerda', count = 0, stacks = 0, stacksize = 1},
		{id = 5129, name = 'Lik', count = 0, stacks = 0, stacksize = 1},
		{id = 5995, name = 'Malicious Perch', count = 0, stacks = 0, stacksize = 1},
		{id = 5468, name = 'Matsya', count = 0, stacks = 0, stacksize = 1},
		{id = 5467, name = 'Megalodon', count = 0, stacks = 0, stacksize = 1},
		{id = 5134, name = 'Mola Mola', count = 0, stacks = 0, stacksize = 1},
		{id = 4462, name = 'Monke-Onke', count = 0, stacks = 0, stacksize = 1},
		{id = 5462, name = 'Morinabaligi', count = 0, stacks = 0, stacksize = 1},
		{id = 4481, name = 'Ogre Eel', count = 0, stacks = 0, stacksize = 12},
		{id = 5815, name = 'Pelazoea', count = 0, stacks = 0, stacksize = 1},
		{id = 5470, name = 'Pirarucu', count = 0, stacks = 0, stacksize = 1},
		{id = 5133, name = 'Pterygotus', count = 0, stacks = 0, stacksize = 1},
		{id = 5135, name = 'Rhinochimera', count = 0, stacks = 0, stacksize = 1},
		{id = 4305, name = 'Ryugu Titan', count = 0, stacks = 0, stacksize = 1},
		{id = 4475, name = 'Sea Zombie', count = 0, stacks = 0, stacksize = 1},
		{id = 5538, name = 'Sekiryu', count = 0, stacks = 0, stacksize = 1},
		{id = 5997, name = 'Shen', count = 0, stacks = 0, stacksize = 1},
		{id = 4451, name = 'Silver Shark', count = 0, stacks = 0, stacksize = 12},
		{id = 5537, name = 'Soryu', count = 0, stacks = 0, stacksize = 1},
		{id = 4463, name = 'Takitaro', count = 0, stacks = 0, stacksize = 1},
		{id = 4478, name = 'Three-eyed Fish', count = 0, stacks = 0, stacksize = 1},
		{id = 5817, name = 'Tiger Shark', count = 0, stacks = 0, stacksize = 1},
		{id = 5120, name = 'Titanic Sawfish', count = 0, stacks = 0, stacksize = 1},
		{id = 4476, name = 'Titanictus', count = 0, stacks = 0, stacksize = 1},
		{id = 4319, name = 'Tricorn', count = 0, stacks = 0, stacksize = 1},
		{id = 5137, name = 'Turnabaligi', count = 0, stacks = 0, stacksize = 1},
		{id = 5141, name = 'Veydal Wrasse', count = 0, stacks = 0, stacksize = 1},
		{id = 5955, name = 'Yawning Catfish', count = 0, stacks = 0, stacksize = 1},
		{id = 5463, name = 'Yayinbaligi', count = 0, stacks = 0, stacksize = 1},
		{id = 5385, name = 'Zafmlug Bass', count = 0, stacks = 0, stacksize = 12},
	}


I hope this is helpful.
necroskull Necro Bump Detected! [274 days between previous and next post]
 Carbuncle.Nynja
Offline
Server: Carbuncle
Game: FFXI
user: NynJa
Posts: 2215
By Carbuncle.Nynja 2023-04-05 14:22:45
Link | Quote | Reply
 
How would one go about doing a check for Saber Shoot for Gugs and Opal Silk for Liks while looping?

I was thinking of something like this where it builds the tradenpc command:
Code
elseif tableType == 'Zaldon Fish' then
  for i = 1, #idTable do
  tradeString = tradenpc '
  if idTable[1].count > 0 then
    if Saber Shoot exists then <-I dont know how to code this one
      print('Saber Shoot found, canceling Gugrusaurus trades')
      break
    else
      tradeString = tradeString .. '1 "' .. idTable[1].name .. '"'
      break
    end
  elseif idTable[2].count > 0 then
    if Opal Silk exists then <-Same thing
      print('Opal Silk found, canceling Lik trades')
      break
    else
      tradeString = tradeString .. '1 "' .. idTable[2].name .. '"'
      break
    end
  elseif idTable[i].count > 0 then
    tradeString = tradeString .. '1 "' .. idTable[i].name .. '"'
    break
  end
end


Gugrusaurus is first in the ID Table, Lik is second, any other fish come after.

1-As noted, how does one write the check for Saber Shoot and Opal silk?
2-I suspect the third idTalble[i] will include Gugs and Liks and will need its own checks to not trade in those items.
Offline
Posts: 1109
By DaneBlood 2023-04-15 06:35:39
Link | Quote | Reply
 
Asura.Valok said: »
Updated! GitHub

Daneblood, the Reive and Incursion capes listed on https://www.bg-wiki.com/bg/Category:JSE_Capes are already automated when trading with an A.M.A.N Reclaimer. Are there others that you are referring to?


yeah but those are the jse capes not the Mecistopins cape (CP bonus) which can take up a lot of space when farming gil from incursion