Glitch City Laboratories Archives

Glitch City Laboratories closed on 1 September 2020 (announcement). This is an archived copy of a thread from Glitch City Laboratories Forums.

You can join Glitch City Research Institute to ask questions or discuss current developments.

You may also download the archive of this forum in .tar.gz, .sql.gz, or .sqlite.gz formats.

Arbitrary Code Execution Discussion

Having trouble obtaining multiple item stacks - Page 1

Having trouble obtaining multiple item stacks

Posted by: Mrfenette
Date: 2017-12-31 18:18:38
I have been trying to attempt some of the more complicated endeavors via the ws m glitch  item in pokemon yellow. The major issue that I keep running into is the item code that i am attempting to use contains multiple items stacks (past 99 or x0) of the same item.
For Example:

Lemonade x250
Carbos x209
X Accuracy x133
Poké Ball x119
Carbos x211
Lemonade x0
X Accuracy x34
Poké Ball x34
HP Up x34
HP Up x34
TM01 x0

(From another post on this site)

Every time I try to set up the inventory to run the code or deposit the items they get consolidated into one stack of 99 and another past 99. I just need help getting these items set up in my bag. Any help would be appreciated!

Re: Having trouble obtaining multiple item stacks

Posted by: Couldntthinkofaname
Date: 2017-12-31 18:39:11
It's a bit longer, but use:

Lemonade x250 (hex:FA)
Carbos x209 (hex:D1)
X Accuracy x193 (hex:C1)
Poké Ball x119 (hex:77)
Max Ether x38 (hex:26)
TM11 x175 (hex:AF)
Max Elixer x46 (hex:2E)
Fire Stone x74 (hex:4A)
Elixer x34 (hex:22)
HP Up x34 (hex:22)
Protein x44 (hex:2C)
TM01 x[Any qty]

I don't know who wrote the code, but I have no idea why they expected it's end-user to use multiple stacks of the same item. It's bad practice.

Re: Having trouble obtaining multiple item stacks

Posted by: Mrfenette
Date: 2017-12-31 19:45:27
I appreciate the quick response, as you could imagine I've been going through hell just trying to set it up. This particular code is only half of what I was doing but its supposed to make Pokémon shiny when transferred to gen 2 or 7 (post-gold/silver bank fix). I'm kinda new to this so I'm not sure how that would translate with the alternative you provided.

Re: Having trouble obtaining multiple item stacks

Posted by: Couldntthinkofaname
Date: 2017-12-31 20:08:18
Ah, I see. You're trying to turn a Pokemon shiny. You're in Yellow, right? If so, this should work for the first Pokemon in your current box. (I lack Yellow so i cannot test this, but this should work):


Awakening x170 (hex:AA)
Thunderstone x134 (hex:D2)
TM09 x121 (hex:79)
Poké Ball x50 (hex:32)
Lemonade x250 (hex:AF)
Ice Heal x119 (hex:77)
TM01 x[Any qty]

This should grant Pokemon 1 of your current box shinyness when transferred via Pokebank (fix taken into consideration). Please, let me know the code's intent ahead of time, otherwise I have to assume what the code does :P.

Hope this helps, and best of luck!

Re: Having trouble obtaining multiple item stacks

Posted by: Mrfenette
Date: 2017-12-31 21:03:39
Ok so a little more background information. I'm playing the English version of Pokémon yellow so of course I'm using ws m for ACE. The bootstrap I'm using goes a little something like this:

11 Pokémon in your current PC box
Seel as the 1st Pokémon in the current PC box
Parasect as the 2nd Pokémon in the current PC box
Growlithe as the 3rd Pokémon in the current PC box
Magikarp as the 4th Pokémon in the current PC box
Psyduck as the 5th Pokémon in the current PC box
Flareon as the 6th Pokémon in the current PC box
Tentacool as the 7th Pokémon in the current PC box
Female Nidoran as the 8th Pokémon in the current PC box
Plus three more randoms

Now my question is how I get the code to shinify my Pokémon of choice if the curre box is required to be set up as specified above to execute code?

Re: Having trouble obtaining multiple item stacks

Posted by: Couldntthinkofaname
Date: 2017-12-31 21:12:49
ohwhoops.jpeg

It seems my fondness of 8f scripts has made me forget how ws m works (I'm used to having to use the in-party bootstrapper)

Replace the quantity of thunderstones from x210 to x134, and replace TM18 with TM09 (same qnty). This will affect the first pokemon in your party instead

Super-uber sorry for making you jump through 50 hoops to get this far, but it's been a while since i've made scripts for gen1. Hopefully this works for you!

Re: Having trouble obtaining multiple item stacks

Posted by: Mrfenette
Date: 2017-12-31 22:56:17
Thanks for your help so far! Unfortunately it looks like I'm not done jumping through hoops yet. For some reason the code didn't work and it didn't appear to change any stats so I'm not quite sure what it did. Any ideas?

Current bag setup:
ws m
master ball x1
Awakening x170
Thunderstone x210
TM18 x121
Poke Ball x50
Lemonade x175
Ice Heal x119
TM01 x1

Re: Having trouble obtaining multiple item stacks

Posted by: Couldntthinkofaname
Date: 2017-12-31 23:03:17
You used the wrong code. See the changes I posted.


Replace the quantity of thunderstones from x210 to x134, and replace TM18 with TM09 (same qnty). This will affect the first pokemon in your party instead


Also, the code only edits DVs, so the change in stats may be very slight, if at all

Re: Having trouble obtaining multiple item stacks

Posted by: Mrfenette
Date: 2018-01-01 13:16:23
Some of my items, including my revive x201 stack, got stuck at the bottom of my pc (and also replaced my cancel button?). So after a quick side quest to obtain another revive stack I'm back at it. Still no success unfortunately, with my current setup:

ws m
Bicycle
Awakening x170
Thunderstone x134
TM09 x121
Poke Ball x50
Lemonade x175
Ice Heal x119
TM01 x1

Re: Having trouble obtaining multiple item stacks

Posted by: Couldntthinkofaname
Date: 2018-01-01 13:33:57
After testing the code for myself, I have confirmed that it is working fine, in regards to altering Pokemon stats to secure a shiny.

So you checked the Pokébank, and the pokémon did not appear shiny?

The only thing else I can think of is that Pokébank may have reverted the fix, but I doubt this.

Re: Having trouble obtaining multiple item stacks

Posted by: Mrfenette
Date: 2018-01-01 13:52:43
Yes I just tried sending some Pokemon to Ultra sun and they came out normal. Im assuming the code is correct as shown, but I feel like there's is something simple I'm just not getting. How exactly is this code supposed to work?

Re: Having trouble obtaining multiple item stacks

Posted by: Couldntthinkofaname
Date: 2018-01-01 14:11:10
What the code does is it sets the IVs (or "DVs" as they're called in Gen 1) into values that Pokebank would consider "shiny", as back then, it was these values that determined shininess. Specifically, it sets your Pokemon's Attack,Speed,and Special DVs all to 10, and then sets your defense IV to 15.

Evie made a comment regarding this in a topic related to shiny pokemon:

For making a Pokémon Shiny, as you said originally it was supposed to be 10 in Speed, Defense, Special and 2, 3, 6, 7, 10, 11, 14 or 15 in Attack. Pokémon Bank changed it for unknown reasons to be 10 in Speed, Attack, Special and 2, 3, 6, 7, 10, 11, 14 or 15 in Defense.


I asked the Discord whether or not something with Pokebank changed, hopefully i'll get an answer soon. My only other guess would be that Pokebank undid their "fix".

In the meantime, while i'm waiting for an answer from the Discord, try replacing Lemonade x175 with Lemonade x250. This uses the traditional values that Evie mentioned above. If that doesn't work, either there's something wrong on your end or Pokebank changed in a way we are not yet aware of.

EDIT: After asking the Discord, I have confirmed that Pokebank did indeed revert the change they made to Pokebank. In this case, in order to obtain a shiny, make the change I suggested prior (from Lemonade x175, to Lemonade x250), and then try it once more

Report back to me if it works, and have a safe and happy new years!

Re: Having trouble obtaining multiple item stacks

Posted by: Mrfenette
Date: 2018-01-01 14:50:40
The funny thing is, the original code I was attempting came from that very post. I just tried the lemonade x250, but I'm still not seeing any change in the stats. I know the change should be subtle but the first Pokemon in my party is a level 100 nidoking, so I at least expect the change to be noticeable.

I really appreciate the help and feedback btw, it makes this a lot less frustrating

Re: Having trouble obtaining multiple item stacks

Posted by: Couldntthinkofaname
Date: 2018-01-01 19:55:25

I just tried the lemonade x250, but I'm still not seeing any change in the stats. I know the change should be subtle but the first Pokemon in my party is a level 100 nidoking, so I at least expect the change to be noticeable.


Yeah, DVs tend to have even less of an effect on higher leveled Pokemon. To test this code, I used my lvl 100 Blastoise, and the stats remained the same, though from a RAM point of view you could tell that the alterations had been made.

Have you attempted to send over your first party Pokemon with the x250 lemonade setup? If so, did it work for you?

Re: Having trouble obtaining multiple item stacks

Posted by: Mrfenette
Date: 2018-01-01 20:13:53
It just deleted my save file :'(

I think I accidentally used it twice