• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Item charges permanent bonuses problem

Status
Not open for further replies.
Level 10
Joined
Mar 17, 2012
Messages
579
Hi everyone!

I have an item (for example) Null Talisman that gives:
+6 intelligence;
+3 strength;
+3 agility;
+3 damage.

What I want to make is:
When hero kills an enemy hero (not neutral hostile)? item gets +2 charges and when enemy hero dies in 1850 aoe - item gets +1 charge for assist.
Each charge have to give:
+2 intelligence;
+1 strength;
+1 agility;
+1 damage.

I know how to grow charges, but I don't know how to make each charge to give such bonuces... :vw_sad:

Could enyone help me to make it?
 
Hi everyone!

I have an item (for example) Null Talisman that gives:
+6 intelligence;
+3 strength;
+3 agility;
+3 damage.

What I want to make is:
When hero kills an enemy hero (not neutral hostile)? item gets +2 charges and when enemy hero dies in 1850 aoe - item gets +1 charge for assist.
Each charge have to give:
+2 intelligence;
+1 strength;
+1 agility;
+1 damage.

I know how to grow charges, but I don't know how to make each charge to give such bonuces... :vw_sad:

Could enyone help me to make it?
In Dota, the item is based on trigger that has the "event: every second of the game, Action set ug = units with item , make picked unit life healed by charges x hit points and mana", In your case, however, it is not a timed event, it just an effect that is added multiple times on special occasions. So in short, you must create an item ability that gives +1 all stats (and +1 int) and then ability that gives +1 damage and put both inside a spellbook that you have disabled via trigger, then add that spellbook for reach speciel event, to substruck, you will need to remove the ability spellbook and one "charge" will be substructed, also lower the item chrages via trigger when you do.
 
Level 10
Joined
Mar 17, 2012
Messages
579
In Dota, the item is based on trigger that has the "event: every second of the game, Action set ug = units with item , make picked unit life healed by charges x hit points and mana", In your case, however, it is not a timed event, it just an effect that is added multiple times on special occasions. So in short, you must create an item ability that gives +1 all stats (and +1 int) and then ability that gives +1 damage and put both inside a spellbook that you have disabled via trigger, then add that spellbook for reach speciel event, to substruck, you will need to remove the ability spellbook and one "charge" will be substructed, also lower the item chrages via trigger when you do.

So if I add spell book? hide it and remove - bonuses are still there??? :goblin_jawdrop:
 
So if I add spell book? hide it and remove - bonuses are still there??? :goblin_jawdrop:
For loop a from 1-13{
Player - disabled ability "spellbook" for player (Loop A)
}

*Disabled spellbook on unit will still effect with its passive abilities.
*Checking if active ability is there, will show as if the unit has the active ability -> even though the unit is unable to use it.
*It is possible to use spellbook inside of another spellbook if the spellbook id is different.
*Disbaled spellbook , for my own experience (I might be wrong on that specific part) will allways show on another spellbook, so that a non-disabled spellbook will show the hidden spellbook abilitis (suggesting that the unit has whatever clickable spellbook, it will see all the hidden spellbook spells) note that I never tried to check what happpens if I use different ID for the hidden spellbook so its not 100% true.
Q: is it?
Plz A.
 
Level 10
Joined
Mar 17, 2012
Messages
579
For loop a from 1-13{
Player - disabled ability "spellbook" for player (Loop A)
}

*Disabled spellbook on unit will still effect with its passive abilities.
*Checking if active ability is there, will show as if the unit has the active ability -> even though the unit is unable to use it.
*It is possible to use spellbook inside of another spellbook if the spellbook id is different.
*Disbaled spellbook , for my own experience (I might be wrong on that specific part) will allways show on another spellbook, so that a non-disabled spellbook will show the hidden spellbook abilitis (suggesting that the unit has whatever clickable spellbook, it will see all the hidden spellbook spells) note that I never tried to check what happpens if I use different ID for the hidden spellbook so its not 100% true.
Q: is it?
Plz A.

But we can't add spells to an Item... or can we? I can't see is it real or not... Could you explain it to me more concrete? Can item be upgraded by adding "item charges" that have such bonuses? If you know how - please write triggers of show an example becaus I didn't understand anything :goblin_cry:

If I add a hidden spell book to a hero and remove it if he doesn't keep the item - is it acceptable?
 
But we can't add spells to an Item... or can we? I can't see is it real or not... Could you explain it to me more concrete? Can item be upgraded by adding "item charges" that have such bonuses? If you know how - please write triggers of show an example becaus I didn't understand anything :goblin_cry:

If I add a hidden spell book to a hero and remove it if he doesn't keep the item - is it acceptable?

The ability has nothing to do with the item. The trigger can be used to make it seems as if it has. "unit drops an item" "unit pick up an item" and "unit get an item" (as in item transfer among heroes) Are the 3 cases in which the ability should be updated. This is one of the reason dota not allow to drop the item: icefrog was too lazy to make it complecated trigger and simply banned the dropping so there will be no update.
 
Level 16
Joined
Jul 31, 2012
Messages
2,217
The ability has nothing to do with the item. The trigger can be used to make it seems as if it has. "unit drops an item" "unit pick up an item" and "unit get an item" (as in item transfer among heroes) Are the 3 cases in which the ability should be updated. This is one of the reason dota not allow to drop the item: icefrog was too lazy to make it complecated trigger and simply banned the dropping so there will be no update.

yeah, best example "i think" black king bar
 
Level 10
Joined
Mar 17, 2012
Messages
579
just a question, are you making an " urn of shadows " item

Nope, I'm making PvP-Bracer, PvP-Null Talisman and PvP-Wraith Band...
And I need it to upgrade when hero kills or assists...

The ability has nothing to do with the item. The trigger can be used to make it seems as if it has. "unit drops an item" "unit pick up an item" and "unit get an item" (as in item transfer among heroes) Are the 3 cases in which the ability should be updated. This is one of the reason dota not allow to drop the item: icefrog was too lazy to make it complecated trigger and simply banned the dropping so there will be no update.

Still don't get it...
is it have to be smth like that?:
unit Aquires an item
item type of item bla-bla-bla equal to Null Talisman (starting) = true
set NullTalisman_Int=0
turn on <check trigger>

unit dies
unit type of dying unit blablabla...
killing unit has an item Null Talisman (starting)
NullTalisman_Int=0
remove item Null Talisman (starting)
add item Null Talisman (charged)
set NullTalisman_Int=NullTalisman_Int + 1
set charges of Null Talisman (charges) to NullTalisman_Int

???
 
Level 16
Joined
Jul 31, 2012
Messages
2,217
I don't if this idea is right: make the level of item ability of the PvP thingie and add level to the ability of the item "don't think it is possible
another idea: add an att bonus with hide button enabled to the hero when he aquires the item with at level 1 "0-0-0" when a hero dies within 1850 AoE add a level to the ability for the hero

i think it is done
 
yeah, best example "i think" black king bar

// Don't read if you dont wanna know about dota mechanics
Black king bar is an item switched on the first use. This is one of the reasons why the item is undroppable, the other reason is that "MAYBE" it is an avatar without buff of timer, if naix "avatar" and the item were used at the same time, it will cause the game to crush. (2 avatar won't stack) however, I belive naix avatar is made of metamorfesis into hero that has spell defense inside an hidden spellbook. another thing is that dropping avatar might cause game crush ( I didnt check it but I belive it cause instant game crush when the item is dropped ). So the item is a special case. Wand is an item who has dummy ability that gives 25 heal x number of item charges (having 2 wands will cause only the one who is in the first slot to active, the others ignored [this is because the spell do "if the hero has item of type" and not "for each integer for 1-6 is item hero in slot A is a wand?] ).
// Don't read if you dont wanna know about dota mechanics

The idea
  • Disable Books
    • Events
      • Time - Elapsed game time is 1.10 seconds
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Player - Disable Book: Dispelling Rage 1 for (Player((Integer A)))
          • Player - Disable Book: Dispelling Rage 2 for (Player((Integer A)))
          • Player - Disable Book: Dispelling Rage 3 for (Player((Integer A)))
          • Player - Disable Book: Dispelling Rage 4 for (Player((Integer A)))
Dispelling rage 1 contains an aura effects only self = the fake "buff", attack speed increaser and spell immunity.
Dispelling rage 2 contains an aura effects only self = the fake "buff", attack speed increaser of a greater level and spell immunity.
ETC.
^ upon activation it will not show the spellbook, the unit will be unable to be casted spell upon nor targeted by abilities and the player will see the buff "Dispelling Rage" as if it was some sort of roar, but the buff won't go on off on off on off before it disapear, its just an aura which is removed 2 seconds after I remove the spell book, then I use "Action: remove specific buff" and remove the aura buff to make it instantly removed, it wont go on off on off like its shows on windwalk that is about to end its duration<- this is not fixable.
Using that, you can do the same with items, just try and post the triggers, and I will try further to explain till you done it right.

" Doing something for somone else is helping him once, teaching someone is helping million times "
 
Level 16
Joined
Jul 31, 2012
Messages
2,217
// Don't read if you dont wanna know about dota mechanics
Black king bar is an item switched on the first use. This is one of the reasons why the item is undroppable, the other reason is that "MAYBE" it is an avatar without buff of timer, if naix "avatar" and the item were used at the same time, it will cause the game to crush. (2 avatar won't stack) however, I belive naix avatar is made of metamorfesis into hero that has spell defense inside an hidden spellbook. another thing is that dropping avatar might cause game crush ( I didnt check it but I belive it cause instant game crush when the item is dropped ). So the item is a special case. Wand is an item who has dummy ability that gives 25 heal x number of item charges (having 2 wands will cause only the one who is in the first slot to active, the others ignored [this is because the spell do "if the hero has item of type" and not "for each integer for 1-6 is item hero in slot A is a wand?] ).
// Don't read if you dont wanna know about dota mechanics

Lol dissasemble my user name: DotCa: Defense of the Corrupted Ancients..... i'm making a dota map :p so of course i want to know some of dota mechanincs and btw
i tried to make the magic wand thing that adds charges but didn't work
 
Lol dissasemble my user name: DotCa: Defense of the Corrupted Ancients..... i'm making a dota map :p so of course i want to know some of dota mechanincs and btw
i tried to make the magic wand thing that adds charges but didn't work

I can offer you a deal: If you fix my map I shall give you ownership over it, creditless for me. The map is dota based naruto with major bug in nearly each ability: set x=x of point set y= y of point, do something in (x,y) -> bug, need to be do something in P .
Intrested?
  • Better Evasion and a wand
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Level of Life Steal (Frostmourne) for (Triggering unit)) Equal to 0
    • Actions
      • Set ug = (Units within 1300.00 of (Point(real1, real2)) matching ((((((Matching unit) is alive) Equal to True) and (((Matching unit) is an illusion) Equal to False)) and (((Matching unit) belongs to an enemy of (Player(B))) Equal to True)) and (((Matching unit) has an
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (ug is empty) Equal to False
        • Then - Actions
          • Unit Group - Pick every unit in ug and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Charges remaining in (Item carried by (Picked unit) of type Wand (cheaper))) Less than 10
                • Then - Actions
                  • Item - Set charges remaining in (Item carried by (Picked unit) of type Wand (cheaper)) to ((Charges remaining in (Item carried by (Picked unit) of type Wand (cheaper))) + 1)
                • Else - Actions
        • Else - Actions
      • Custom script: call DestroyGroup(udg_ug)
      • Set ug = (Units within 1500.00 of (Point(real1, real2)) matching ((((((Matching unit) is alive) Equal to True) and (((Matching unit) is an illusion) Equal to False)) and (((Matching unit) belongs to an enemy of (Player(B))) Equal to True)) and (((Matching unit) has an
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (ug is empty) Equal to False
        • Then - Actions
          • Unit Group - Pick every unit in ug and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Charges remaining in (Item carried by (Picked unit) of type Better Wand (expensive))) Less than 20
                • Then - Actions
                  • Item - Set charges remaining in (Item carried by (Picked unit) of type Better Wand (expensive)) to ((Charges remaining in (Item carried by (Picked unit) of type Better Wand (expensive))) + 1)
                • Else - Actions
        • Else - Actions
      • Custom script: call DestroyGroup(udg_ug)
 
Level 16
Joined
Jul 31, 2012
Messages
2,217
I can offer you a deal: If you fix my map I shall give you ownership over it, creditless for me. The map is dota based naruto with major bug in nearly each ability: set x=x of point set y= y of point, do something in (x,y) -> bug, need to be do something in P .
Intrested?

I'm a map maker, i love creating things, of course yes, not really for the credit but mostly because i like doing things in WE
 
I'm a map maker, i love creating things, of course yes, not really for the credit but mostly because i like doing things in WE
I was looking for a partner for a long time, but most editors wasn't seryes enough... here is the map, fix all of its triggers and its yours.

(I'm doing it becuase I'm both lazy and I want to see my bugged map having non-bugged triggers with new ideals in it, also, when another person is editing the map, the map will amaze ME too)
 

Attachments

  • 4th Ninja World War V1.11.w3x
    5.3 MB · Views: 92
Level 16
Joined
Jul 31, 2012
Messages
2,217
I was looking for a partner for a long time, but most editors wasn't seryes enough... here is the map, fix all of its triggers and its yours.

(I'm doing it becuase I'm both lazy and I want to see my bugged map having non-bugged triggers with new ideals in it, also, when another person is editing the map, the map will amaze ME too)

ok i'll see what to do for your map

for the thread
  • Untitled Trigger 002
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Null Talisman
    • Actions
      • Unit - Add PvP ability att to (Triggering unit)
  • Untitled Trigger 003
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 1850.00 of (Position of (Triggering unit)) matching (((Matching unit) has an item of type Null Talisman) Equal to True)) and do (Actions)
        • Loop - Actions
          • For each (Integer x) from 1 to 6, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Item-type of (Item carried by (Picked unit) in slot x)) Equal to Null Talisman
                • Then - Actions
                  • Unit - Set level of PvP ability att for (Picked unit) to Level of PvP ability att for Picked unit +1
                • Else - Actions
 

Attachments

  • DotCa V. 1.02.w3x
    7 MB · Views: 35
Last edited:
ok i'll see what to do for your map

for the thread
  • Untitled Trigger 002
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Null Talisman
    • Actions
      • Unit - Add PvP ability att to (Triggering unit)
  • Untitled Trigger 003
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 1850.00 of (Position of (Triggering unit)) matching (((Matching unit) has an item of type Null Talisman) Equal to True)) and do (Actions)
        • Loop - Actions
          • For each (Integer x) from 1 to 6, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Item-type of (Item carried by (Picked unit) in slot x)) Equal to Null Talisman
                • Then - Actions
                  • Unit - Set level of PvP ability att for (Picked unit) to Level of PvP ability att for Picked unit +1
                • Else - Actions

I am sorry but I forgot to mantion: Spellbook Abilities may stack: +damage. and then give the unit the same spellbook, +damage, will stack. by that it means you don't must make milions spellbooks nor levels for spellbook with each level gradually better stats, but instead give the same spellbook multiple times to the same unit. This is not the solution, yet, and what is "integer x" ?

///off topic
Too big? I dont see it like this: just remove all the triggers and you have naruto terrain and dota built, some models are inside from naruto so its a great start, also, if u simply disable the triggers, and make ur own, u can make one while watching the old version which is helpfull. (remakeing triggers)
Anyways, I really want you to show me your own uniqe version of dota, and this is a one year project, it will lower your time of creating a dota-alike map in atlist half!
///of topoc
 
Level 16
Joined
Jul 31, 2012
Messages
2,217
I am sorry but I forgot to mantion: Spellbook Abilities may stack: +damage. and then give the unit the same spellbook, +damage, will stack. by that it means you don't must make milions spellbooks nor levels for spellbook with each level gradually better stats, but instead give the same spellbook multiple times to the same unit. This is not the solution, yet, and what is "integer x" ?

///off topic
Too big? I dont see it like this: just remove all the triggers and you have naruto terrain and dota built, some models are inside from naruto so its a great start, also, if u simply disable the triggers, and make ur own, u can make one while watching the old version which is helpfull. (remakeing triggers)
Anyways, I really want you to show me your own uniqe version of dota, and this is a one year project, it will lower your time of creating a dota-alike map in atlist half!
///of topoc

i don't know if spell books abilities stack, integer x is (integer your variable) x is an integer variable

///off topic
i saw your map and it needs a lot of fixing, spells are not so good [i only saw the ones of naruto]
 
i don't know if spell books abilities stack, integer x is (integer your variable) x is an integer variable

///off topic
i saw your map and it needs a lot of fixing, spells are not so good [i only saw the ones of naruto]

What do you mean by "Good"? Naruto is my fav, actually, and as I told, all spells share the same bug, which is leaking the P by creating needless point, what do you mean "GOOD" you mean exiting? new? since rasengan is imba and shadow clones imba and his passive also imba. I don't see what do you mean by that word.
 
What do you mean by "Good"? Naruto is my fav, actually, and as I told, all spells share the same bug, which is leaking the P by creating needless point, what do you mean "GOOD" you mean exiting? new? since rasengan is imba and shadow clones imba and his passive also imba. I don't see what do you mean by that word.

Dude I take back what I said,
I don't want a guy who think my map "is not good" to be force to help me to monitor it,
make your own map instead,
its better for us. :thumbs_up:
 
Level 16
Joined
Jul 31, 2012
Messages
2,217
1. don't double post :p
2.they are a bit let me explain:
first spell not bad, better if he was moving faster
second, good not bad but the only thing good is the way illusions appear, that's awesome
third normal ability [i think because i didn't pay attention to it
Ulti, i think it was like a firebolt [not sure]
I'm telling this and i didn't see it in WE i only played it in warcraft and btw the monster in the top left is a bit too big, animations don't fit with his size
 
Let me explain:
first spell not bad, better if he was moving faster
second, good not bad but the only thing good is the way illusions appear, that's awesome
I actually never aimed to overamazing special effect, but for more exiting than dota's and less buggy than dota's ( phantom lancer don't have cooldown to how many illusions are made, I made cd - etc )
Thing is: if overpower special effects are done, like in your lightning spell, it will cause a single hero to shut off the sight of a specific area on the battle field, also, having many special effects cause high dps (lag).
third normal ability [i think because i didn't pay attention to it
Pay attantion to abilities you give review for, its not nice to tell before your looking. Its an healing ability that also gives attack speed, and it stacks for illusions, it was made of disabled spellbook and unholy aura, which is useable on illusions due to game setting change and then i realized that when naruto is using metamorphasis into sage mode, his spellbook cause game crush on his miror image casting, so it was changed into upgrade of attack speed like in unit upgrade. It is not "normal".
Ulti, i think it was like a firebolt [not sure]
I'm telling this and i didn't see it in WE i only played it in warcraft
It is a firebolt with 1000 range and small casting time, matching sniper ultimate, and it gives vision untill the casting time is finished, to ensure a hit even on windwalkers, but they can still windwalk out of it if they timed the ww After the nuke procs (a bug that I just realized exists)
the monster in the top left is a bit too big, animations don't fit with his size
Its the THIRD TAILED, BABY. It never meant to be small.
 
man we shouldn't talk about your map here,,,,, and still waiting reply of ZIGOR
He is tring to create a system that will use hashtables to add spellbooks x the times a unit killed another unit. with 3 hashtables and 3 spellbooks, with both adding and removing the spellbooks completely by knowing how many spellbook a unit have as restored handle. and ofc a complecated item picking for a trigger that controll it... give him 3 days and then he comment back, maybe. and yes. :) MY map. I love the SOUND of it. :grin:
 
Level 16
Joined
Jul 31, 2012
Messages
2,217
He is tring to create a system that will use hashtables to add spellbooks x the times a unit killed another unit. with 3 hashtables and 3 spellbooks, with both adding and removing the spellbooks completely by knowing how many spellbook a unit have as restored handle. and ofc a complecated item picking for a trigger that controll it... give him 3 days and then he comment back, maybe. and yes. :) MY map. I love the SOUND of it. :grin:

:hohum:
 
Level 10
Joined
Mar 17, 2012
Messages
579
okay, I think I did it))) Thanks to DotCa :grin:
here is a code if you are interested:
  • Null Talisman aquire
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to PvP Null Talisman
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Charges remaining in (Item being manipulated)) Equal to 1
        • Then - Actions
          • Set Null_Talisman_Triggered = (Item being manipulated)
          • Set Null_Talisman_Int = 0
          • Set Null_Talisman_Owner = (Triggering unit)
          • Unit - Add Attribute Bonus (Nulltalisman, Braces, Wraithband) to Null_Talisman_Owner
          • Unit - Add Item Damage Bonus (NullTalisman Bracer Wraith Band) to Null_Talisman_Owner
          • Player - Disable Item Damage Bonus (NullTalisman Bracer Wraith Band) for (Owner of Null_Talisman_Owner)
        • Else - Actions
          • Set Null_Talisman_Triggered = (Item being manipulated)
          • Set Null_Talisman_Int = (Charges remaining in (Item being manipulated))
          • Unit - Add Attribute Bonus (Nulltalisman, Braces, Wraithband) to Null_Talisman_Owner
          • Unit - Add Item Damage Bonus (NullTalisman Bracer Wraith Band) to Null_Talisman_Owner
          • Player - Disable Item Damage Bonus (NullTalisman Bracer Wraith Band) for (Owner of Null_Talisman_Owner)
          • Unit - Set level of Item Damage Bonus (NullTalisman Bracer Wraith Band) for Null_Talisman_Owner to ((Charges remaining in (Item being manipulated)) + 0)
          • Unit - Set level of Attribute Bonus (Nulltalisman, Braces, Wraithband) for Null_Talisman_Owner to ((Charges remaining in (Item being manipulated)) + 0)
  • Null Talisman ability
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • ((Triggering unit) belongs to an enemy of Neutral Hostile) Equal to True
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 1600.00 of (Position of (Triggering unit))) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has an item of type PvP Null Talisman) Equal to True
              • (Charges remaining in (Item carried by (Picked unit) of type PvP Null Talisman)) Less than 10
            • Then - Actions
              • Item - Set charges remaining in (Item carried by (Picked unit) of type PvP Null Talisman) to ((Charges remaining in (Item carried by (Picked unit) of type PvP Null Talisman)) + 1)
              • Unit - Set level of Item Damage Bonus (NullTalisman Bracer Wraith Band) for (Picked unit) to (Charges remaining in (Item carried by (Picked unit) of type PvP Null Talisman))
              • Unit - Set level of Attribute Bonus (Nulltalisman, Braces, Wraithband) for (Picked unit) to (Charges remaining in (Item carried by (Picked unit) of type PvP Null Talisman))
            • Else - Actions
  • Null Talisman lose
    • Events
      • Unit - A unit Loses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to PvP Null Talisman
    • Actions
      • Set Null_Talisman_Int = 0
      • Unit - Remove Item Damage Bonus (NullTalisman Bracer Wraith Band) from (Triggering unit)
      • Unit - Remove Attribute Bonus (Nulltalisman, Braces, Wraithband) from (Triggering unit)
  • Null Talisman sell
    • Events
      • Unit - A unit Pawns an item (to shop)
    • Conditions
      • (Item-type of (Sold Item)) Equal to PvP Null Talisman
    • Actions
      • Set Null_Talisman_Int = 0
      • Unit - Remove Item Damage Bonus (NullTalisman Bracer Wraith Band) from (Triggering unit)
      • Unit - Remove Attribute Bonus (Nulltalisman, Braces, Wraithband) from (Triggering unit)
Item has limit of 10 charges and hero can't carry more than one (but that trigger I didn't write here)
 
Last edited:
okay, I think I did it))) Thanks to DotCa :grin:
here is a code if you are interested:
  • Null Talisman aquire
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to PvP Null Talisman
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Charges remaining in (Item being manipulated)) Equal to 1
        • Then - Actions
          • Set Null_Talisman_Triggered = (Item being manipulated)
          • Set Null_Talisman_Int = 0
          • Set Null_Talisman_Owner = (Triggering unit)
          • Unit - Add Attribute Bonus (Nulltalisman, Braces, Wraithband) to Null_Talisman_Owner
          • Unit - Add Item Damage Bonus (NullTalisman Bracer Wraith Band) to Null_Talisman_Owner
          • Player - Disable Item Damage Bonus (NullTalisman Bracer Wraith Band) for (Owner of Null_Talisman_Owner)
        • Else - Actions
          • Set Null_Talisman_Triggered = (Item being manipulated)
          • Set Null_Talisman_Int = (Charges remaining in (Item being manipulated))
          • Unit - Add Attribute Bonus (Nulltalisman, Braces, Wraithband) to Null_Talisman_Owner
          • Unit - Add Item Damage Bonus (NullTalisman Bracer Wraith Band) to Null_Talisman_Owner
          • Player - Disable Item Damage Bonus (NullTalisman Bracer Wraith Band) for (Owner of Null_Talisman_Owner)
          • Unit - Set level of Item Damage Bonus (NullTalisman Bracer Wraith Band) for Null_Talisman_Owner to ((Charges remaining in (Item being manipulated)) + 0)
          • Unit - Set level of Attribute Bonus (Nulltalisman, Braces, Wraithband) for Null_Talisman_Owner to ((Charges remaining in (Item being manipulated)) + 0)
  • Null Talisman ability
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • ((Triggering unit) belongs to an enemy of Neutral Hostile) Equal to True
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 1600.00 of (Position of (Triggering unit))) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has an item of type PvP Null Talisman) Equal to True
              • (Charges remaining in (Item carried by (Picked unit) of type PvP Null Talisman)) Less than 10
            • Then - Actions
              • Item - Set charges remaining in (Item carried by (Picked unit) of type PvP Null Talisman) to ((Charges remaining in (Item carried by (Picked unit) of type PvP Null Talisman)) + 1)
              • Unit - Set level of Item Damage Bonus (NullTalisman Bracer Wraith Band) for (Picked unit) to (Charges remaining in (Item carried by (Picked unit) of type PvP Null Talisman))
              • Unit - Set level of Attribute Bonus (Nulltalisman, Braces, Wraithband) for (Picked unit) to (Charges remaining in (Item carried by (Picked unit) of type PvP Null Talisman))
            • Else - Actions
  • Null Talisman lose
    • Events
      • Unit - A unit Loses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to PvP Null Talisman
    • Actions
      • Set Null_Talisman_Int = 0
      • Unit - Remove Item Damage Bonus (NullTalisman Bracer Wraith Band) from (Triggering unit)
      • Unit - Remove Attribute Bonus (Nulltalisman, Braces, Wraithband) from (Triggering unit)
  • Null Talisman sell
    • Events
      • Unit - A unit Pawns an item (to shop)
    • Conditions
      • (Item-type of (Sold Item)) Equal to PvP Null Talisman
    • Actions
      • Set Null_Talisman_Int = 0
      • Unit - Remove Item Damage Bonus (NullTalisman Bracer Wraith Band) from (Triggering unit)
      • Unit - Remove Attribute Bonus (Nulltalisman, Braces, Wraithband) from (Triggering unit)
Item has limit of 10 charges and hero can't carry more than one (but that trigger I didn't write here)

Either post a bugged map or say it got solved.
 
best_player_88, my item needs just 10 stacks so it is not so critical to make hashtables (btw I hardly understant what it is ^^,)

10 stacks for 3 items? that means 30 levels. that will increase the loading time by atlist 30 seconds. And about hashtables: its really hard thing to get but once you understood it, you can make loading screen as if there is nothing additional to it. Hashtable is like... well, an "Array" but unlike array who has [#], it have endless [#] and it is based on unit, not on a data (Not: int[1],unitgroup[2]. Yes: "that unit" in this hashtable [3].)
It was hard for me to understand this but now I will explain to you:
1) Event Map initiation. Create hashtable. Set HashItem1 = last created hashtable.
2) an event that add charges is occuring.
set int = 0
set int = load 1 of Key(Triggering unit/killing unit/ whatever u need) from Hashitem1
set int = int+1
save int as 1 of key(whatever unit) in Hashitem1
give that unit (+2/+2/+3) stats ability


3) unit need to lose all charges is occuring.
set int = 0
set int = load 1 of Key(Triggering unit/killing unit/ whatever u need) from Hashitem1
for loop integer a from 1 to int do{
remove (+2/+2/+3) stats ability from that unit
}
save 0 as 1 of Key(whatever unit) in hashitem 1

4) use this mothode for all 3 items, instead of 30 abilties you are using 3.
OPTIMIZED.
 
Status
Not open for further replies.
Top