|
sparks.lua question
Server: Odin
Game: FFXI
Posts: 4013
By Odin.Godofgods 2016-04-15 16:20:11
for this script for trading sparks, can you trade in for skill up books as well? It was designed so you can type in the name of the item, but if you type in the skill book it says you get zero of them. So i was curious if there was a way to get those through this script.
Server: Odin
Game: FFXI
Posts: 4013
By Odin.Godofgods 2016-04-17 19:27:38
bump
Necro Bump Detected!
[58 days between previous and next post]
By baroma 2016-06-14 22:33:07
I havent tried it but i would dare say you can buy any item as long as its spelled correctly in "x" format
Cerberus.Jiko
Server: Cerberus
Game: FFXI
Posts: 1741
By Cerberus.Jiko 2016-06-14 22:55:40
If its the same one I have, you buy whatever item you want to keep buying once manually. Talk to the person again, hit escape key, ???, Profit.
Necro Bump Detected!
[60 days between previous and next post]
Bismarck.Phaded
Server: Bismarck
Game: FFXI
By Bismarck.Phaded 2016-08-13 22:58:07
Anyone have a link to a Phase Displacer version (or a way to add it) to the above?
Cerberus.Onvasquez
Server: Cerberus
Game: FFXI
Posts: 87
By Cerberus.Onvasquez 2016-08-13 23:22:21
Just add the NPC's name to the script and there you go. If you cant figure it out how to add the name I can send you mine, which i already added the name
Bismarck.Phaded
Server: Bismarck
Game: FFXI
By Bismarck.Phaded 2016-08-13 23:36:21
I'd appreciate it if you could PM the version you have, the one I have is a simple 15 line version which is very different from the one above. Closest thing I could come up with for the above was:
[104] = {npc="Ardrick", menu=xxxx}
Not sure where I'm supposed to look up the menu value.
Server: Odin
Game: FFXI
Posts: 4013
By Odin.Godofgods 2016-08-14 02:16:28
for this script for trading sparks, can you trade in for skill up books as well? It was designed so you can type in the name of the item, but if you type in the skill book it says you get zero of them. So i was curious if there was a way to get those through this script.
i never actually did figure out a way to do this...
Cerberus.Brax
Server: Cerberus
Game: FFXI
Posts: 14
By Cerberus.Brax 2016-08-14 02:19:32
I'm more active again now in game.. So once I remember how I wrote it i'll look at making it easier to add things from other zones/npc's .. This was one of those 'personal little things' that I never expected to get out there ! plus, I was still learning lua and packets at the time ... shocked it still works ! :o)
Server: Odin
Game: FFXI
Posts: 4013
By Odin.Godofgods 2016-08-14 02:29:32
for this script for trading sparks, can you trade in for skill up books as well? It was designed so you can type in the name of the item, but if you type in the skill book it says you get zero of them. So i was curious if there was a way to get those through this script.
i never actually did figure out a way to do this...
I'm more active again now in game.. So once I remember how I wrote it i'll look at making it easier to add things from other zones/npc's .. This was one of those 'personal little things' that I never expected to get out there ! plus, I was still learning lua and packets at the time ... shocked it still works ! :o)
were you the one that wrote this? I do enjoy this one. It certainly helps out a lot. - My question about the skill books tho are from the same sparks npc. Its just that since equip are single items, and the skill books can be single/stack, i havnt been able to get those using this script. Which overall is no big deal. Using so many stacks of books take forever, so the time it takes to manually select them isnt all to much. Iir, when i asked this question originally, i was doing sparks from xp trials, so i was just looking for faster ways to get the books to make the most of the time. - But i still love the script. It helps me out and saves me a lot of time for every thing else.
Cerberus.Brax
Server: Cerberus
Game: FFXI
Posts: 14
By Cerberus.Brax 2016-08-14 02:45:48
Yeah I wrote it. I was spening hours at the bloody NPCs buying stuff to sell for gil.. the script sends the packets for picking the item from a menu, and just needs to know the menu ID and the item ID from the dialogue menu. (which I found using the wondeful packetviewer addon Kudos!!), once I get going again, i'll buy a set of each and sniff the id's. im 95% sure someone already did this but I can't find it. I actually just took a copy from above because when i left, i removed my game so i'm catching up :)
from memory, i think theres two ID's for dialogue interaction that need looking up. the page number and the row of the item. so you would just need to do that, then have a unique name for each item to lookup in the maps. Once i get installed patched i'll see. I don't think I ever got around to using the resources lib to validate items, it was something i was going to do but may have forgot ^^
Glad it works. and glad it saves time, it was the reason I made it. I'm not 100% sure how it got "released" but it seems to be doing some good for people so yay.
Server: Odin
Game: FFXI
Posts: 4013
By Odin.Godofgods 2016-08-14 11:35:46
Glad it works. and glad it saves time, it was the reason I made it. I'm not 100% sure how it got "released" but it seems to be doing some good for people so yay.
No idea. I know i was asking questions about way to get the items and another member linked me to this specific script. Actually someone linked me to a different one first. Then got a reply saying to use this one; its much better.
Sylph.Braden
Server: Sylph
Game: FFXI
Posts: 397
By Sylph.Braden 2016-08-14 13:41:02
For Ardrick where XX is the number of Phase displacers you want:
packet:sub(1,8)..string.char(1,0,XX,0)..packet:sub(13)
It might go beyond 255 if you change the 4th value, but I never checked.
Can also buy cells this way too:
From {'Voidwatch Officer','Gushing Spring','Hildegard','Kieran','Owain','Camille'}:
string.char(1,0,0,0) for "fill me up!"
Cobalt = 1
Rubicund = 2
Xanthous = 3
CellType is one of those three numbers to determine which cell you get.
CellAmt is the total amount of cells you want multiplied by 64. For example, 12 cells would be CellAmt = 768.
string.char(2,0,(CellType + (CellAmt % 256)),math.floor(CellAmt/256))
Too sloppy to clean up, but you get the gist.
[+]
By Nyarlko 2016-08-17 18:24:18
Brax, any word on updates for this? :x Just gave it a shot and it appears to be missing a few required files. They may have just been renamed or replaced in the time since you made this, so any help to get this running would be appreciated ^^ (requires "maps" which I can't find for the life of me.. tried changing to "zones" and "areas" which do exist, but didn't work.)
Braden: Where would you add something like that? Does it go into the main sparks.lua or into the settings.xml?
Server: Odin
Game: FFXI
Posts: 4013
By Odin.Godofgods 2016-08-20 14:17:54
(requires "maps" which I can't find for the life of me.. tried changing to "zones" and "areas" which do exist, but didn't work.)
try this. (Its from the OP link then clicking the sparks link to effectively take you back one page) There is a map.lua there
Bismarck.Phaded
Server: Bismarck
Game: FFXI
By Bismarck.Phaded 2016-08-20 16:30:33
Part of the confusion I had encountered is that there are two versions of what players call "sparks.lua" floating around (the one Byrth posted on BG and the one above). This is the one I modified to buy displacers (Byrth version), which was called autobuy when Onva sent it to me. I found simply adding a name wasn't enough with the unmodified version because if I visited the sparks NPC before Ardrick, it would save its menu selection as the last choice or try to buy a shield if the value was nil. Also added an entry for Atmacite upgrades.
Code
require 'pack'
require 'lists'
lastatma = nil
lastchoice = nil
lastdisplacer = nil
windower.register_event('outgoing chunk',function(id,org)
if id == 0x5B then
local name = (windower.ffxi.get_mob_by_id(org:unpack('I',5)) or {}).name
if L{'Eternal Flame','Rolandienne','Isakoth','Fhelm Jobeizat','Zandjarl'}:contains(name) then
local outstr = org:sub(1,8)
local choice = org:unpack('I',9)
if choice == 0 or choice == 0x40000000 then
if lastchoice == nil then
return outstr..string.char(9,0,0x29,0)..org:sub(13) -- Acheron Shield
else
return outstr..lastchoice..org:sub(13)
end
else
lastchoice = org:sub(9,12)
end
elseif L{'Ardrick'}:contains(name) then
local outstr = org:sub(1,8)
local choice = org:unpack('I',9)
if choice == 0 or choice == 0x40000000 then
if lastdisplacer == nil then
return outstr..string.char(1,0,5,0)..org:sub(13) -- Displacer x5 | x99 = (1,0,99,0)
else
return outstr..lastdisplacer..org:sub(13)
end
else
lastdisplacer = org:sub(9,12)
end
elseif L{'Atmacite Refiner'}:contains(name) then
local outstr = org:sub(1,8)
local choice = org:unpack('I',9)
if choice == 0 or choice == 0x40000000 then
if lastatma == nil then
return
else
return outstr..lastatma..org:sub(13)
end
else
lastatma = org:sub(9,12)
end
end
end
end)
There's probably a better/easier way of writing the above, if anyone can clean it up I'd be thankful.
[+]
Server: Sylph
Game: FFXI
Posts: 269
By Sylph.Staleyx 2016-08-20 18:25:03
Could using sparks.lua to get shields get you banned you think? Having the item pop in inventory over and over to fast?
Asura.Azriel
Server: Asura
Game: FFXI
Posts: 720
By Asura.Azriel 2016-08-20 18:36:43
Could using sparks.lua to get shields get you banned you think? Having the item pop in inventory over and over to fast?
Friends of friends of friends said yes.
By Nyarlko 2016-08-20 20:06:10
(requires "maps" which I can't find for the life of me.. tried changing to "zones" and "areas" which do exist, but didn't work.)
try this. (Its from the OP link then clicking the sparks link to effectively take you back one page) There is a map.lua there Thank you, tbh I didn't even think to check if map.lua was not a normal resource file. ^^;;;
Could using sparks.lua to get shields get you banned you think? Having the item pop in inventory over and over to fast? If you try to buy too fast, the code will probably lock up so might be wise to have a delay between purchase anyway.
Bismarck.Phaded
Server: Bismarck
Game: FFXI
By Bismarck.Phaded 2016-08-20 23:12:09
Could using sparks.lua to get shields get you banned you think? Having the item pop in inventory over and over to fast?
With Brax's version you are probably at a slightly higher risk just because you are hitting a macro/command where as with Byrth's version you still have to interact with the NPC and there is still some sort of dialogue. This is also assuming you are on SE's ban hammer radar to begin with. That being said, if the goal is to buy shields as fast as possible Brax's is the better script.
Cerberus.Brax
Server: Cerberus
Game: FFXI
Posts: 14
By Cerberus.Brax 2016-08-21 13:51:06
Sorry folks. I haven't forgotten. It's just simply I have issues getting XI back onto my laptop. windows 10, dual gfx intel/amd, seems a common issue.
Regarding the ban question, This uses packets, I haven't seen Byrth's version but would guess similar but repeats what you did rather than makes it up from scratch.
Anything using packets is always more than something that would manipulate a menu/input. I did my best to record and play-back what packets are sent during a transaction (hence wonderfully named functions such as poke-npc! If I didn't block the return packet, the npc would physically turn to you and open the menu anyway)
Again can't speak for the other one, but mine basically does
Engage NPC (block incoming packet that physically opens window)
send the dialogue packet with your option which is the menu-id/page number/selection number of the item.
Dismiss the npc, this one scared me when testing because without this. You can't move again :D
Again, as soon as I can get pol to run without crashing on the new laptop, i'll give it a polish... Plus i really want to try some of the new events and wield tizona again now blu looks popular.
[+]
Server: Fenrir
Game: FFXI
Posts: 5
By Fenrir.Baelfire 2016-08-21 17:09:22
Tried it with a few other books. seemed OK. The Map above already had the books in with x# at the end. ie
//sparks buy Sonia's diary
buys single
//sparks buy Sonia's diary x3
Buys 3 books
//sparks buy Sonia's diary x12
buys 12 Books
//sparks buy Sonia's diary x36
Buys 36 (shocking eh)
I also now have a lot of books in my inventory I can't use because I'm capped on everything lol!
fixed the way finding duplicates worked and can now buy skill books. Removed a lot of Print lines which were there from when I was testing this out, I'm guessing whoever I gave this to for testing got it before I tried up a bit ^^
Git
I want to rewrite this again, because the code here is embarrassing :) but when I get some more time, and even tho I can now click Play without crash. I have a frame rate of about 1 a year..
[edit] Different account due to being on pc not tablet lol..
[+]
Server: Fenrir
Game: FFXI
Posts: 5
By Fenrir.Baelfire 2016-08-26 17:46:19
Added quick and dirty Phase Displacer's to the map.
//sparks buy phase displacer
//sparks buy phase displacer x2
//sparks buy phase displacer x3
//sparks buy phase displacer x4
//sparks buy phase displacer x5
GitHub
Just a side note, there's no npc checks in it yet, so don't try and buy displacers from the sparks npc, and sparks gear from phase npc!! That can only go badly !! but it will quite happily buy 1-5 displacers from Ardrick..
[+]
Server: Fenrir
Game: FFXI
Posts: 5
By Fenrir.Baelfire 2016-08-27 00:34:40
I did wonder the same, which is why I kept the options in the menu map exactly the same as the menu provided..
One of the packet values is the number to buy, I don't have access to a disposable account any more so didn't feel like trying :) as I've only just started playing again casually.
Server: Sylph
Game: FFXI
Posts: 269
By Sylph.Staleyx 2016-08-27 04:46:57
I think I will play it safe and not use this lol.
Asura.Clack
Server: Asura
Game: FFXI
Posts: 9
By Asura.Clack 2016-08-27 23:49:38
is it possible to do this with cells?
Server: Odin
Game: FFXI
Posts: 4013
By Odin.Godofgods 2016-08-31 20:24:58
Tried it with a few other books. seemed OK. The Map above already had the books in with x# at the end. ie
//sparks buy Sonia's diary
buys single
//sparks buy Sonia's diary x3
Buys 3 books
//sparks buy Sonia's diary x12
buys 12 Books
//sparks buy Sonia's diary x36
Buys 36 (shocking eh)
I also now have a lot of books in my inventory I can't use because I'm capped on everything lol!
fixed the way finding duplicates worked and can now buy skill books. Removed a lot of Print lines which were there from when I was testing this out, I'm guessing whoever I gave this to for testing got it before I tried up a bit ^^
Git
I want to rewrite this again, because the code here is embarrassing :) but when I get some more time, and even tho I can now click Play without crash. I have a frame rate of about 1 a year..
[edit] Different account due to being on pc not tablet lol..
seems to work so far. Have to wait till im sparks farming again one day for full test. But thank you!
Server: Phoenix
Game: FFXI
Posts: 118
By Phoenix.Tigertail 2016-09-06 11:31:54
This lua doesn't appear to work now after the update. Anyone else having issues?
for this script for trading sparks, can you trade in for skill up books as well? It was designed so you can type in the name of the item, but if you type in the skill book it says you get zero of them. So i was curious if there was a way to get those through this script.
|
|