Sparks.lua Question

Langues: JP EN DE FR
users online
Forum » Windower » General » sparks.lua question
sparks.lua question
First Page 2
 Odin.Godofgods
Offline
Serveur: Odin
Game: FFXI
Posts: 3982
By Odin.Godofgods 2016-04-15 16:20:11
Link | Citer | R
 
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.
 Odin.Godofgods
Offline
Serveur: Odin
Game: FFXI
Posts: 3982
By Odin.Godofgods 2016-04-17 19:27:38
Link | Citer | R
 
bump
necroskull Necro Bump Detected! [58 days between previous and next post]
Offline
Posts: 485
By baroma 2016-06-14 22:33:07
Link | Citer | R
 
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
Offline
Serveur: Cerberus
Game: FFXI
user: Jiko
Posts: 1741
By Cerberus.Jiko 2016-06-14 22:55:40
Link | Citer | R
 
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.
necroskull Necro Bump Detected! [60 days between previous and next post]
 Bismarck.Phaded
Offline
Serveur: Bismarck
Game: FFXI
user: Phaded
By Bismarck.Phaded 2016-08-13 22:58:07
Link | Citer | R
 
Anyone have a link to a Phase Displacer version (or a way to add it) to the above?
 Cerberus.Onvasquez
Offline
Serveur: Cerberus
Game: FFXI
user: onvasquez
Posts: 85
By Cerberus.Onvasquez 2016-08-13 23:22:21
Link | Citer | R
 
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
Offline
Serveur: Bismarck
Game: FFXI
user: Phaded
By Bismarck.Phaded 2016-08-13 23:36:21
Link | Citer | R
 
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.
 Odin.Godofgods
Offline
Serveur: Odin
Game: FFXI
Posts: 3982
By Odin.Godofgods 2016-08-14 02:16:28
Link | Citer | R
 
Odin.Godofgods said: »
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
Offline
Serveur: Cerberus
Game: FFXI
user: Brax
Posts: 14
By Cerberus.Brax 2016-08-14 02:19:32
Link | Citer | R
 
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)
 Odin.Godofgods
Offline
Serveur: Odin
Game: FFXI
Posts: 3982
By Odin.Godofgods 2016-08-14 02:29:32
Link | Citer | R
 
Odin.Godofgods said: »
Odin.Godofgods said: »
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 said: »
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
Offline
Serveur: Cerberus
Game: FFXI
user: Brax
Posts: 14
By Cerberus.Brax 2016-08-14 02:45:48
Link | Citer | R
 
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.
[+]
 Odin.Godofgods
Offline
Serveur: Odin
Game: FFXI
Posts: 3982
By Odin.Godofgods 2016-08-14 11:35:46
Link | Citer | R
 
Cerberus.Brax said: »
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
Offline
Serveur: Sylph
Game: FFXI
Posts: 396
By Sylph.Braden 2016-08-14 13:41:02
Link | Citer | R
 
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.
[+]
Offline
Posts: 694
By Nyarlko 2016-08-17 18:24:18
Link | Citer | R
 
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?
 Odin.Godofgods
Offline
Serveur: Odin
Game: FFXI
Posts: 3982
By Odin.Godofgods 2016-08-20 14:17:54
Link | Citer | R
 
Nyarlko said: »
(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
Offline
Serveur: Bismarck
Game: FFXI
user: Phaded
By Bismarck.Phaded 2016-08-20 16:30:33
Link | Citer | R
 
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.


There's probably a better/easier way of writing the above, if anyone can clean it up I'd be thankful.
[+]
 Sylph.Staleyx
Offline
Serveur: Sylph
Game: FFXI
user: Staleyx
Posts: 269
By Sylph.Staleyx 2016-08-20 18:25:03
Link | Citer | R
 
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
Offline
Serveur: Asura
Game: FFXI
user: Azriel
Posts: 720
By Asura.Azriel 2016-08-20 18:36:43
Link | Citer | R
 
Sylph.Staleyx said: »
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.
Offline
Posts: 694
By Nyarlko 2016-08-20 20:06:10
Link | Citer | R
 
Odin.Godofgods said: »
Nyarlko said: »
(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. ^^;;;


Sylph.Staleyx said: »
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
Offline
Serveur: Bismarck
Game: FFXI
user: Phaded
By Bismarck.Phaded 2016-08-20 23:12:09
Link | Citer | R
 
Sylph.Staleyx said: »
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
Offline
Serveur: Cerberus
Game: FFXI
user: Brax
Posts: 14
By Cerberus.Brax 2016-08-21 13:51:06
Link | Citer | R
 
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.
[+]
 Fenrir.Baelfire
Offline
Serveur: Fenrir
Game: FFXI
user: baelfire
Posts: 5
By Fenrir.Baelfire 2016-08-21 17:09:22
Link | Citer | R
 





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..
[+]
 Fenrir.Baelfire
Offline
Serveur: Fenrir
Game: FFXI
user: baelfire
Posts: 5
By Fenrir.Baelfire 2016-08-26 17:46:19
Link | Citer | R
 
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..
[+]
Offline
Posts: 711
By intrloper 2016-08-26 19:35:32
Link | Citer | R
 
Just wondering what would happen if you tried to buy say 99 displacers? would it be just an error or something GM related?
 Fenrir.Baelfire
Offline
Serveur: Fenrir
Game: FFXI
user: baelfire
Posts: 5
By Fenrir.Baelfire 2016-08-27 00:34:40
Link | Citer | R
 
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.
 Sylph.Staleyx
Offline
Serveur: Sylph
Game: FFXI
user: Staleyx
Posts: 269
By Sylph.Staleyx 2016-08-27 04:46:57
Link | Citer | R
 
I think I will play it safe and not use this lol.
Offline
Posts: 711
By intrloper 2016-08-27 06:41:35
Link | Citer | R
 
one thing I did do when buying 500 displacers was buy fairly quickly. about every second. didnt get any errors or GMs suddenly there so not sure if there is any automatic flags that would trip but i am still alive for time being.
 Asura.Clack
Offline
Serveur: Asura
Game: FFXI
user: cocl
Posts: 9
By Asura.Clack 2016-08-27 23:49:38
Link | Citer | R
 
is it possible to do this with cells?
 Odin.Godofgods
Offline
Serveur: Odin
Game: FFXI
Posts: 3982
By Odin.Godofgods 2016-08-31 20:24:58
Link | Citer | R
 
Fenrir.Baelfire said: »





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!
 Phoenix.Tigertail
Offline
Serveur: Phoenix
Game: FFXI
user: Tigertail
Posts: 118
By Phoenix.Tigertail 2016-09-06 11:31:54
Link | Citer | R
 
This lua doesn't appear to work now after the update. Anyone else having issues?
First Page 2
Log in to post.