• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

PowerUpTomesFix1.0

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
Tomes can be picked up, even by units, and used later.
If the Power Ups were used by a Hero they are removed nicely.

- Units can use Items in this Test map but can't use Tomes.
(Since that would crash the game..)

Work in Progress!

  • PowerUpIni
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Item[1] = Tome of Agility
      • Set Item[2] = Tome of Agility +2
      • Set Item[3] = Tome of Strength
      • Set Item[4] = Tome of Strength +2
      • Set Item[5] = Tome of Intelligence
      • Set Item[6] = Tome of Intelligence +2
      • Set Item[7] = Tome of Experience
      • Set Item[8] = Tome of Greater Experience
      • Set Item[9] = Tome of Knowledge
      • Set Item[10] = Tome of Power
      • Set Item[11] = Manual of Health
      • Set ItemDummy[1] = Tome of Agility D
      • Set ItemDummy[2] = Tome of Agility +2 D
      • Set ItemDummy[3] = Tome of Strength D
      • Set ItemDummy[4] = Tome of Strength +2 D
      • Set ItemDummy[5] = Tome of Intelligence D
      • Set ItemDummy[6] = Tome of Intelligence +2 D
      • Set ItemDummy[7] = Tome of Experience D
      • Set ItemDummy[8] = Tome of Greater Experience D
      • Set ItemDummy[9] = Tome of Knowledge D
      • Set ItemDummy[10] = Tome of Power D
      • Set ItemDummy[11] = Manual of Health D
      • Custom script: call DestroyTrigger(GetTriggeringTrigger())
  • PowerUp
    • Events
      • Unit - A unit Uses an item
    • Conditions
    • Actions
      • Set ItemMani = (Item-type of (Item being manipulated))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • ItemMani Equal to Item[1]
              • ItemMani Equal to Item[2]
              • ItemMani Equal to Item[3]
              • ItemMani Equal to Item[4]
              • ItemMani Equal to Item[5]
              • ItemMani Equal to Item[6]
              • ItemMani Equal to Item[7]
              • ItemMani Equal to Item[8]
              • ItemMani Equal to Item[9]
              • ItemMani Equal to Item[10]
              • ItemMani Equal to Item[11]
        • Then - Actions
          • Set TempUnit = (Triggering unit)
          • Set TempPoint = (Position of TempUnit)
          • Set ItemBug = (Item being manipulated)
          • Item - Remove ItemBug
          • Set ItemBug = No item
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (TempUnit is A Hero) Equal to True
            • Then - Actions
              • For each (Integer A) from 1 to 11, do (Actions)
                • Loop - Actions
                  • Set Index = (Index + 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ItemMani Equal to Item[Index]
                    • Then - Actions
                      • Item - Create ItemDummy[Index] at TempPoint
                    • Else - Actions
              • Set Index = 0
              • Set DummyItem = (Last created item)
              • Hero - Give DummyItem to TempUnit
              • Item - Remove DummyItem
              • Set DummyItem = No item
              • Set TempUnit = No unit
              • Custom script: call RemoveLocation( udg_TempPoint )
            • Else - Actions
              • Set tempPlayer = (Triggering player)
              • Set tempPlayerGroup = (Player group(tempPlayer))
              • Game - Display to tempPlayerGroup the text: |cffFFCC00Only Hero...
              • Item - Create ItemMani at TempPoint
              • Set DummyItem = (Last created item)
              • Hero - Give DummyItem to TempUnit
              • Set DummyItem = No item
              • Set TempUnit = No unit
              • Custom script: call RemoveLocation( udg_TempPoint )
              • Custom script: set udg_tempPlayer = null
              • Custom script: call DestroyForce(udg_tempPlayerGroup)
        • Else - Actions
      • Set ItemMani = (Item-type of No item)
Haters gonna Hate.. This "system" is too simple - i know but it works so fine.

Kind regards CaptainHero

Don't forget the Dummy - Buff, Ability and Items if you want to import this!


You can use a variable of type "ItemType" and one "Or, Multiple Condition", insetad of so many ITE blocks. - IcemanBo
Fixed Leaks
Fixed Item Leaks
Items and Dummy Items are now linked in the PowerUpIni
Implemented Loop
Removes used Tome effect leak
Units no longer drop tomes if they have a "full inventory"
Fixed player group leak


Keywords:
Power Ups, Tomes
Contents

PowerUpTomesFix1.0 (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. PowerUpTomesFix1.0 | Reviewed by Maker | 6th Oct 2013 NEEDS FIX Leaks player group I recommend using a hastable for this. Using a hashtable simplifies the trigger a lot...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.


PowerUpTomesFix1.0 | Reviewed by Maker | 6th Oct 2013
NEEDS FIX


126248-albums6177-picture66522.png


  • Leaks player group
  • I recommend using a hastable for this. Using a hashtable simplifies
    the trigger a lot and makes the trigger lighter
126248-albums6177-picture66524.png
[tr]



PowerUpTomesFix1.0 | Reviewed by Maker | 4th Oct 2013
NEEDS FIX


126248-albums6177-picture66522.png


  • The triggers have repeated actions and are not efficient
  • The system lacks proper configuration options
[tr]
 
Level 8
Joined
Sep 30, 2012
Messages
205
thx IcemanBo, but that only works on one Half, since i have to know which Item to replace with what item..

well you can pick up PowerUps!

Normally they are used the sec when you pic them up.
So if you went creeping and find a Strength Power Up with your Agility Hero, he can pick it up and bring it to your Strength Hero.
Even Units can pick up PowerUps and carry them around.
 
Level 19
Joined
Mar 18, 2012
Messages
1,716
the only purpose this has, is to prevent non-hero-units from using power-ups.

I recommend you to look at some approved GUI rescources in the data base, which have similarities on the things you try to code.
This will never be accepted the way it is.

Why don't you store you dummy item in a hashtable as parent key and the corresponding item as childkey on map init.
This would reduce your wall of code to 6 lines.
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
I would solve this problem in a much more elegant manner.

Remove all abilities from hero tomes(str,agi,int)
Then just trigger the effects of tomes, by using 4 arrays.
The first array lists an item type
The second, third and fourth list the str,agi and int bonuses, respectively.

Then when an item is used you loop through the first array to see what it was an whether it was a tome.
If it was a tome, then apply the bonus, else give back the item or put it on the ground(by creating a new item if it was used up or increasing charges if it wasn't)

As a default you could have all the usual tomes input into the arrays, for user convenience.
 
Level 8
Joined
Sep 30, 2012
Messages
205
so you would still need a dummy ability for the item otherwise you wouldn't be able to use it..

and i don't really see how xonok wants to do it..
how would you apply the bonuses? by simply adding the item ability to the hero? that works?
_______
nope.. it doesn't what is xonok talking about?
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
so you would still need a dummy ability for the item otherwise you wouldn't be able to use it..

and i don't really see how xonok wants to do it..
how would you apply the bonuses? by simply adding the item ability to the hero? that works?

For other stats you'd need a bonusmod, but str,agi,int have functions. If GUI doesn't have them, then JASS definitely does.
And yes, you would need a dummy ability. You can base it on channel to avoid conflicts.
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
Can't this be done in Object Editor? I think there was an option not to use power-ups when they are picked up.

They would still be possible to use on non-hero units though.

EDIT:
ah you see i will stick to GUI for now.

so hashtables maybe.. - can you just save Items of Typ (which weren't used already in a Hashtable or are present anywhere on the map)?
cause if not i guess that hassle might make it less efficient than my ITE tree

I just checked. The action in GUI is there. Just use this:
  • Hero - Modify (Triggering Unit) (Strength) : Add 10
 
Level 8
Joined
Sep 30, 2012
Messages
205
Very true you can say "use automatically when acquired" so thats off..
and for the Dummys thats on (Those Dummy Items who get created and are given to the Hero (if the user really is a Hero) and these give the Bonuses then)

Cool, ok that would save you some lines. Going to implement that.
Exp would work too..
But how would you increase max HP?


wait, wait, wait hold up a sec. you would also have to spawn the special effect at the position of triggering unit


sometimes i would really like to know what all the hassle is about... i mean we are probably talking about kilobytes and some kilo-flops
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
Very true you can say "use automatically when acquired" so thats off..
and for the Dummys thats on (Those Dummy Items who get created and are given to the Hero (if the user really is a Hero) and these give the Bonuses then)

Cool, ok that would save you some lines. Going to implement that.
Exp would work too..
But how would you increase max HP?


wait, wait, wait hold up a sec. you would also have to spawn the special effect at the position of triggering unit


sometimes i would really like to know what all the hassle is about... i mean we are probably talking about kilobytes and some kilo-flops

Yeah, the effect you should also create yourself. It can be done and cleared in 2 lines.
Create special effect on unit
Destroy last created special effect

It's not messy this way and it's also fairly easy.

Max HP, damage, attack rate, HP regeneration, etc can not be easily modified through triggers. They require a bonusmod, such as the one that I've made or some other.

The basic idea of a bonusmod is that you limit the amount of abilities by making each ability give a power of 2 in stats(1,2,4,8,16,32,64,128, etc).
Then through some clever binary math you combine the abilities into the bonus that you need.

My bonusmod requires JNGPE to use and also the abilities must be set up by the modder, as I haven't figured out how to use the object merger yet.

I use a hashtable to reduce the amount of code and thus make it easier to use.
The custom stats part is a planned update, but I've not actually done anything about it yet.
The stat changing is done by using
JASS:
call AddStat(unit,stat,amount)
Example:
JASS:
call AddStat(GetTriggerUnit(),STAT_DAMAGE,50)
JASS:
globals
    hashtable BMH_ConfigTable
    //Basic stats are 1 - 20. Custom stats start from 21
    integer STAT_DAMAGE = 1
    integer STAT_HEALTH = 2
    integer STAT_HEALTHREG = 3
    integer STAT_ARMOR = 4
    integer STAT_MANA = 5
    integer STAT_MANAREG = 6
    integer STAT_ATTACKRATE = 7
endglobals

library BonusModHash requires ExtraFunctions
    function AddStat takes unit u,integer Stat,integer amount returns nothing
        local integer i = 0
        local integer Max = LoadInteger(BMH_ConfigTable,Stat,StringHash("Abils"))
        local integer AbilityID
        loop
            exitwhen i > Max
            set AbilityID = LoadInteger(BMH_ConfigTable,Stat,StringHash("AbilIndex"+I2S(i)))
            if GetUnitAbilityLevel(u,AbilityID) > 0 then
                set amount = amount + IntPower(2,i)
                call UnitRemoveAbility(u,AbilityID)
            endif
            set i = i + 1
        endloop
        set i = Max
        loop
            exitwhen i < 0
            if amount >= IntPower(2,i) then
                call UnitAddAbility(u,LoadInteger(BMH_ConfigTable,Stat,StringHash("AbilIndex"+I2S(i))))
                set amount = amount - IntPower(2,i)
            endif
            set i = i - 1
        endloop
    endfunction

    //++
    function InitTrig_BonusModHash takes nothing returns nothing
        local integer i
        set BMH_ConfigTable = InitHashtable()
        //Damage
        call SaveInteger(BMH_ConfigTable,STAT_DAMAGE,StringHash("AbilIndex"+I2S(0)),'ADM0')
        call SaveInteger(BMH_ConfigTable,STAT_DAMAGE,StringHash("AbilIndex"+I2S(1)),'ADM1')
        call SaveInteger(BMH_ConfigTable,STAT_DAMAGE,StringHash("AbilIndex"+I2S(2)),'ADM2')
        call SaveInteger(BMH_ConfigTable,STAT_DAMAGE,StringHash("AbilIndex"+I2S(3)),'ADM3')
        call SaveInteger(BMH_ConfigTable,STAT_DAMAGE,StringHash("AbilIndex"+I2S(4)),'ADM4')
        call SaveInteger(BMH_ConfigTable,STAT_DAMAGE,StringHash("AbilIndex"+I2S(5)),'ADM5')
        call SaveInteger(BMH_ConfigTable,STAT_DAMAGE,StringHash("AbilIndex"+I2S(6)),'ADM6')
        call SaveInteger(BMH_ConfigTable,STAT_DAMAGE,StringHash("AbilIndex"+I2S(7)),'ADM7')
        call SaveInteger(BMH_ConfigTable,STAT_DAMAGE,StringHash("AbilIndex"+I2S(8)),'ADM8')
        call SaveInteger(BMH_ConfigTable,STAT_DAMAGE,StringHash("AbilIndex"+I2S(9)),'ADM9')
        call SaveInteger(BMH_ConfigTable,STAT_DAMAGE,StringHash("AbilIndex"+I2S(10)),'ADMA')
        call SaveInteger(BMH_ConfigTable,STAT_DAMAGE,StringHash("Abils"),10)
        
        call SaveInteger(BMH_ConfigTable,STAT_HEALTH,StringHash("AbilIndex"+I2S(0)),'AHP0')
        call SaveInteger(BMH_ConfigTable,STAT_HEALTH,StringHash("AbilIndex"+I2S(1)),'AHP1')
        call SaveInteger(BMH_ConfigTable,STAT_HEALTH,StringHash("AbilIndex"+I2S(2)),'AHP2')
        call SaveInteger(BMH_ConfigTable,STAT_HEALTH,StringHash("AbilIndex"+I2S(3)),'AHP3')
        call SaveInteger(BMH_ConfigTable,STAT_HEALTH,StringHash("AbilIndex"+I2S(4)),'AHP4')
        call SaveInteger(BMH_ConfigTable,STAT_HEALTH,StringHash("AbilIndex"+I2S(5)),'AHP5')
        call SaveInteger(BMH_ConfigTable,STAT_HEALTH,StringHash("AbilIndex"+I2S(6)),'AHP6')
        call SaveInteger(BMH_ConfigTable,STAT_HEALTH,StringHash("AbilIndex"+I2S(7)),'AHP7')
        call SaveInteger(BMH_ConfigTable,STAT_HEALTH,StringHash("AbilIndex"+I2S(8)),'AHP8')
        call SaveInteger(BMH_ConfigTable,STAT_HEALTH,StringHash("AbilIndex"+I2S(9)),'AHP9')
        call SaveInteger(BMH_ConfigTable,STAT_HEALTH,StringHash("AbilIndex"+I2S(10)),'AHPA')
        call SaveInteger(BMH_ConfigTable,STAT_HEALTH,StringHash("Abils"),10)
        
        call SaveInteger(BMH_ConfigTable,STAT_HEALTH,StringHash("AbilIndex"+I2S(0)),'AHR0')
        call SaveInteger(BMH_ConfigTable,STAT_HEALTH,StringHash("AbilIndex"+I2S(1)),'AHR1')
        call SaveInteger(BMH_ConfigTable,STAT_HEALTH,StringHash("AbilIndex"+I2S(2)),'AHR2')
        call SaveInteger(BMH_ConfigTable,STAT_HEALTH,StringHash("AbilIndex"+I2S(3)),'AHR3')
        call SaveInteger(BMH_ConfigTable,STAT_HEALTH,StringHash("AbilIndex"+I2S(4)),'AHR4')
        call SaveInteger(BMH_ConfigTable,STAT_HEALTH,StringHash("AbilIndex"+I2S(5)),'AHR5')
        call SaveInteger(BMH_ConfigTable,STAT_HEALTH,StringHash("AbilIndex"+I2S(6)),'AHR6')
        call SaveInteger(BMH_ConfigTable,STAT_HEALTH,StringHash("AbilIndex"+I2S(7)),'AHR7')
        call SaveInteger(BMH_ConfigTable,STAT_HEALTH,StringHash("AbilIndex"+I2S(8)),'AHR8')
        call SaveInteger(BMH_ConfigTable,STAT_HEALTH,StringHash("AbilIndex"+I2S(9)),'AHR9')
        call SaveInteger(BMH_ConfigTable,STAT_HEALTH,StringHash("AbilIndex"+I2S(10)),'AHRA')
        call SaveInteger(BMH_ConfigTable,STAT_HEALTH,StringHash("Abils"),10)
        
        call SaveInteger(BMH_ConfigTable,STAT_ARMOR,StringHash("AbilIndex"+I2S(0)),'AAM0')
        call SaveInteger(BMH_ConfigTable,STAT_ARMOR,StringHash("AbilIndex"+I2S(1)),'AAM1')
        call SaveInteger(BMH_ConfigTable,STAT_ARMOR,StringHash("AbilIndex"+I2S(2)),'AAM2')
        call SaveInteger(BMH_ConfigTable,STAT_ARMOR,StringHash("AbilIndex"+I2S(3)),'AAM3')
        call SaveInteger(BMH_ConfigTable,STAT_ARMOR,StringHash("AbilIndex"+I2S(4)),'AAM4')
        call SaveInteger(BMH_ConfigTable,STAT_ARMOR,StringHash("AbilIndex"+I2S(5)),'AAM5')
        call SaveInteger(BMH_ConfigTable,STAT_ARMOR,StringHash("AbilIndex"+I2S(6)),'AAM6')
        call SaveInteger(BMH_ConfigTable,STAT_ARMOR,StringHash("AbilIndex"+I2S(7)),'AAM7')
        call SaveInteger(BMH_ConfigTable,STAT_ARMOR,StringHash("AbilIndex"+I2S(8)),'AAM8')
        call SaveInteger(BMH_ConfigTable,STAT_ARMOR,StringHash("AbilIndex"+I2S(9)),'AAM9')
        call SaveInteger(BMH_ConfigTable,STAT_ARMOR,StringHash("AbilIndex"+I2S(10)),'AAMA')
        call SaveInteger(BMH_ConfigTable,STAT_ARMOR,StringHash("Abils"),10)
        
        call SaveInteger(BMH_ConfigTable,STAT_MANA,StringHash("AbilIndex"+I2S(0)),'AMN0')
        call SaveInteger(BMH_ConfigTable,STAT_MANA,StringHash("AbilIndex"+I2S(1)),'AMN1')
        call SaveInteger(BMH_ConfigTable,STAT_MANA,StringHash("AbilIndex"+I2S(2)),'AMN2')
        call SaveInteger(BMH_ConfigTable,STAT_MANA,StringHash("AbilIndex"+I2S(3)),'AMN3')
        call SaveInteger(BMH_ConfigTable,STAT_MANA,StringHash("AbilIndex"+I2S(4)),'AMN4')
        call SaveInteger(BMH_ConfigTable,STAT_MANA,StringHash("AbilIndex"+I2S(5)),'AMN5')
        call SaveInteger(BMH_ConfigTable,STAT_MANA,StringHash("AbilIndex"+I2S(6)),'AMN6')
        call SaveInteger(BMH_ConfigTable,STAT_MANA,StringHash("AbilIndex"+I2S(7)),'AMN7')
        call SaveInteger(BMH_ConfigTable,STAT_MANA,StringHash("AbilIndex"+I2S(8)),'AMN8')
        call SaveInteger(BMH_ConfigTable,STAT_MANA,StringHash("AbilIndex"+I2S(9)),'AMN9')
        call SaveInteger(BMH_ConfigTable,STAT_MANA,StringHash("AbilIndex"+I2S(10)),'AMNA')
        call SaveInteger(BMH_ConfigTable,STAT_MANA,StringHash("AbilIndex"+I2S(11)),'AMNB')
        call SaveInteger(BMH_ConfigTable,STAT_MANA,StringHash("AbilIndex"+I2S(12)),'AMNC')
        call SaveInteger(BMH_ConfigTable,STAT_MANA,StringHash("AbilIndex"+I2S(13)),'AMND')
        call SaveInteger(BMH_ConfigTable,STAT_MANA,StringHash("Abils"),13)
        
        call SaveInteger(BMH_ConfigTable,STAT_MANAREG,StringHash("AbilIndex"+I2S(0)),'AMR0')
        call SaveInteger(BMH_ConfigTable,STAT_MANAREG,StringHash("AbilIndex"+I2S(1)),'AMR1')
        call SaveInteger(BMH_ConfigTable,STAT_MANAREG,StringHash("AbilIndex"+I2S(2)),'AMR2')
        call SaveInteger(BMH_ConfigTable,STAT_MANAREG,StringHash("AbilIndex"+I2S(3)),'AMR3')
        call SaveInteger(BMH_ConfigTable,STAT_MANAREG,StringHash("AbilIndex"+I2S(4)),'AMR4')
        call SaveInteger(BMH_ConfigTable,STAT_MANAREG,StringHash("AbilIndex"+I2S(5)),'AMR5')
        call SaveInteger(BMH_ConfigTable,STAT_MANAREG,StringHash("AbilIndex"+I2S(6)),'AMR6')
        call SaveInteger(BMH_ConfigTable,STAT_MANAREG,StringHash("AbilIndex"+I2S(7)),'AMR7')
        call SaveInteger(BMH_ConfigTable,STAT_MANAREG,StringHash("AbilIndex"+I2S(8)),'AMR8')
        call SaveInteger(BMH_ConfigTable,STAT_MANAREG,StringHash("AbilIndex"+I2S(9)),'AMR9')
        call SaveInteger(BMH_ConfigTable,STAT_MANAREG,StringHash("AbilIndex"+I2S(10)),'AMRA')
        call SaveInteger(BMH_ConfigTable,STAT_MANAREG,StringHash("Abils"),10)
        
        call SaveInteger(BMH_ConfigTable,STAT_ATTACKRATE,StringHash("AbilIndex"+I2S(0)),'AAR0')
        call SaveInteger(BMH_ConfigTable,STAT_ATTACKRATE,StringHash("AbilIndex"+I2S(1)),'AAR1')
        call SaveInteger(BMH_ConfigTable,STAT_ATTACKRATE,StringHash("AbilIndex"+I2S(2)),'AAR2')
        call SaveInteger(BMH_ConfigTable,STAT_ATTACKRATE,StringHash("AbilIndex"+I2S(3)),'AAR3')
        call SaveInteger(BMH_ConfigTable,STAT_ATTACKRATE,StringHash("AbilIndex"+I2S(4)),'AAR4')
        call SaveInteger(BMH_ConfigTable,STAT_ATTACKRATE,StringHash("AbilIndex"+I2S(5)),'AAR5')
        call SaveInteger(BMH_ConfigTable,STAT_ATTACKRATE,StringHash("AbilIndex"+I2S(6)),'AAR6')
        call SaveInteger(BMH_ConfigTable,STAT_ATTACKRATE,StringHash("AbilIndex"+I2S(7)),'AAR7')
        call SaveInteger(BMH_ConfigTable,STAT_ATTACKRATE,StringHash("AbilIndex"+I2S(8)),'AAR8')
        call SaveInteger(BMH_ConfigTable,STAT_ATTACKRATE,StringHash("Abils"),8)
    endfunction
endlibrary
 
Level 9
Joined
Dec 12, 2007
Messages
489
at this current state, this is so hardcoded its hardly can be called as system. I suggest you to add a setup trigger so user can easily add or remove powerup item that the trigger should respond to for configurability.

since you insist in doing this in GUI, use an item type array global variable or hashtable to store all dummy powerup and its real counterpart in the setup trigger.

then on user use item, do an item type check, using loop to find its item type counterpart. then check if the user is Hero or not, then take action accordingly.

Haters gonna Hate.. This "system" is too simple - i know but it works so fine.
sad... how ignorant of you, the fact that you acknowledge the level of its simplicity and yet still upload it just because it works.

Rather than continuing to post "obvious" simple set of triggers you call as system, I suggest you finish your already posted "system" until its finest before posting a new one.
 
Level 8
Joined
Sep 30, 2012
Messages
205
as always thx Dark_Axl! I did what you suggested
and thx to deathismyfriend for pointing out leaks - again^^

yeah sure Dark_Axl. one of my stupid little simple systems just got approved :D The "auto-retrain" is going to get deleted and i can't see how such a simple (even i have to emphasize how simple it is) system can be turned into something complex, while doing such a straightforward task. So i see that this one isn't up for the task to enrich this community of schooled system makers.

The system you wrote and taught me in the request section, certainly might not be too simple imo, but i guess its your system and you should upload it :)
 
Last edited:
You could use Hashes like Maker said or index the system. Yeah, you are indexing it right now, but the way you check the items is not that necessary - putting every item in an 'Or'.

Indexing:
- Have an index global
- Upon acquire, loop from 1 to index, check if item being manipulated equal to Item[udg_Index] then do actions
 

Rheiko

Spell Reviewer
Level 25
Joined
Aug 27, 2013
Messages
4,121
make the number of item type is configurable
  • Set Item[1] = Tome of Agility
  • Set Item[2] = Tome of Agility +2
  • Set Item[3] = Tome of Strength
  • Set Item[4] = Tome of Strength +2
  • Set Item[5] = Tome of Intelligence
  • Set Item[6] = Tome of Intelligence +2
  • Set Item[7] = Tome of Experience
  • Set Item[8] = Tome of Greater Experience
  • Set Item[9] = Tome of Knowledge
  • Set Item[10] = Tome of Power
  • Set Item[11] = Manual of Health
  • Set ItemNumber = 11

something like that
For each (Integer A) from 1 to 11, do (Actions)
use your own variable instead
For each YourVar from 1 to ItemNumber, do (Actions)
so the user could add more than 11 items
 
Top