Can anyone tell me how do you make the potion stacks?
Everytime I don't click me a potion it will use up another inventory slot even if there's only 1 charge there,is there a way to make it so that when you don't click me they all stack up together instead of wasting your inventory slots?
Potion Stacking
Moderator: Cheaters
-
- Newcomer
- Posts: 9
- Joined: February 3rd, 2008, 7:28 am
- Title: Slacker
- Location: Malaysia
-
- Forum Staff
- Posts: 926
- Joined: June 3rd, 2007, 8:03 pm
Re: Potion Stacking
Have a trigger that when you don't click me the pot if theirs already the same pot in inventory then it will remove the one ur buying now and increase the charges of the one already in inventory.
-
- The Flying Cow!
- Posts: 2196
- Joined: November 2nd, 2007, 10:34 pm
- Location: Melbourne
Re: Potion Stacking
=\ No way to make it automatically stack without triggers?
Visit Ozzapoo.net, my blog and the home of AutoCP and Cheatpack Detector!
AutoCP3 now available for free!
AutoCP3 now available for free!
-
- Forum Staff
- Posts: 829
- Joined: January 28th, 2007, 8:10 pm
- Title: JASS Programmer
- Location: Canada
Re: Potion Stacking
Haha, nope.
I made a block of jass code that stacks all charged items (To a constant limit ie: 50).
Post if interested . . .
I made a block of jass code that stacks all charged items (To a constant limit ie: 50).
Post if interested . . .
-
- The Flying Cow!
- Posts: 2196
- Joined: November 2nd, 2007, 10:34 pm
- Location: Melbourne
Re: Potion Stacking
Yes please!!! 

Visit Ozzapoo.net, my blog and the home of AutoCP and Cheatpack Detector!
AutoCP3 now available for free!
AutoCP3 now available for free!
-
- Junior Member
- Posts: 30
- Joined: March 26th, 2008, 2:54 pm
Re: Potion Stacking
Here it is, I'm also using this for my map.
Spoiler:
Spoiler:
Once here was something.
-
- Forum Staff
- Posts: 829
- Joined: January 28th, 2007, 8:10 pm
- Title: JASS Programmer
- Location: Canada
Re: Potion Stacking
Optimized the code a bit for you and added 'max-stack' functionality.
Also added multi-distribution.
For example: Item a has 37 charges, Item b has 40 charges, MAX_STACK is 50. I pick up item c that has 23 charges. It will distribute to a and b--the resultant will be item c is gone, a and b have 50 charges. If you were to pick up item c with 26 charges, a and b would have 50 charges and c would have 3. Enjoy.
As a note: When looking to optimize, look at what you call more than necessary. If you see 5 "GetManipulatedItem()" calls, store GetManipulatedItem into a variable and just use the variable. Also, to exit a loop without the condition being true (i>5), use "exitwhen true".
Also added multi-distribution.
For example: Item a has 37 charges, Item b has 40 charges, MAX_STACK is 50. I pick up item c that has 23 charges. It will distribute to a and b--the resultant will be item c is gone, a and b have 50 charges. If you were to pick up item c with 26 charges, a and b would have 50 charges and c would have 3. Enjoy.
Spoiler:
-
- Forum Staff
- Posts: 829
- Joined: January 28th, 2007, 8:10 pm
- Title: JASS Programmer
- Location: Canada
Re: Potion Stacking
God, nothing worse than people who ask for help and not even comment when they get it, let alone give thanks.
Makes me wonder why I bother
Makes me wonder why I bother

-
- The Flying Cow!
- Posts: 2196
- Joined: November 2nd, 2007, 10:34 pm
- Location: Melbourne
Re: Potion Stacking
I was at school -.- No need to get so down....
And dont double-post

And dont double-post




Visit Ozzapoo.net, my blog and the home of AutoCP and Cheatpack Detector!
AutoCP3 now available for free!
AutoCP3 now available for free!
-
- Newcomer
- Posts: 9
- Joined: February 3rd, 2008, 7:28 am
- Title: Slacker
- Location: Malaysia