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:
I added this to the npcTable:
and then modified this line to include the fishes table:
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.
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.