Life gain

For fulfilled maps that most likely don't work on the latest patch (1.24 or later).

Moderator: Cheaters

User avatar
MySpaceBarBroke
Newcomer
Posts: 14
Joined: January 4th, 2009, 1:22 pm
Location: Australia

Life gain

Post by MySpaceBarBroke »

Well i'm working on my vampirism map (thanks to water for his temp), and i thought of an idea for an item but i can't seem how to go about it. Well heres what i want help with;

Every time a unit attacks an enemy unit/structure, he has a small chance of gaining lost hp, 10k hp or 20k hp. Same applys with mana cept 5k and 10k.

Guess what! Two more ideas came to mind

Every time a unit attacks an enemy unit/structure (same unit/structure) it automatically adds +50 damage to the same unit/structure. After 5 seconds, if the unit doesn't attack the same unit/structure, the ability wares off.

Second to last,

Everytime a unit attacks the same unit/structure the attacker gains 5 str permantly, but for a costly 50 mana points.

Thanks, Spacebar
User avatar
Lanaya
Banned-To-Be
Posts: 1378
Joined: July 28th, 2008, 6:28 pm
Title: Administrator

Re: Life gain

Post by Lanaya »

i think i know 1 for the life gain.

Code: Select all

Life Gain
    Events
        Unit - A unit Is attacked
    Conditions
        (Unit-type of (Attacking unit)) Equal to (ur unit)
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Random integer number between 1 and 10) Equal to 1 (this will make it 10%)
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Random integer number between 1 and 2) Equal to 2 (this will make it either 1/2k hp 5/10k mana
                    Then - Actions
                        Item - Create Potion of 1khp at (Position of (Attacking unit))
                        Hero - Give (Last created item) to (Attacking unit)
                        Hero - Order (Attacking unit) to use (Last created item)
                        Item - Create Potion of 5kmana at (Position of (Attacking unit))
                        Hero - Give (Last created item) to (Attacking unit)
                        Hero - Order (Attacking unit) to use (Last created item)
                    Else - Actions
                        Item - Create Potion of 2khp at (Position of (Attacking unit))
                        Hero - Give (Last created item) to (Attacking unit)
                        Hero - Order (Attacking unit) to use (Last created item)
                        Item - Create 10khp at (Position of (Attacking unit))
                        Hero - Give (Last created item) to (Attacking unit)
                        Hero - Order (Attacking unit) to use (Last created item)
            Else - Actions
                Do nothing
i think i did it right with the Else - Actions

and i used items.. lol
edit------------------
here's the strenght +5 trigger

Code: Select all

Str
    Events
        Unit - A unit Is attacked
    Conditions
        ((Unit-type of (Triggering unit)) Equal to UrUnit) and ((Mana of (Attacking unit)) Greater than or equal to 50.00)
    Actions
        Set CurrentMana = (Mana of (Attacking unit))
        Unit - Set mana of (Attacking unit) to (CurrentMana - 50.00)
        Hero - Modify Strength of (Attacking unit): Add 5
The condition makes it that the trigger doesnt run when u dont have 50 mana.
pretty simple . .

and umm
MySpaceBarBroke wrote:Every time a unit attacks an enemy unit/structure (same unit/structure) it automatically adds +50 damage to the same unit/structure. After 5 seconds, if the unit doesn't attack the same unit/structure, the ability wares off.
do u mean +50 dmg every time u attack (like Fury Swipes) ? or just +50 dmg?
Image
League of legends North America - Nietono
User avatar
MySpaceBarBroke
Newcomer
Posts: 14
Joined: January 4th, 2009, 1:22 pm
Location: Australia

Re: Life gain

Post by MySpaceBarBroke »

Ok..I admit, i'm not the best with varibles, so can you please tell me the varible type is, thanks. And yeah Every time you attack an enemy unit/structure it adds +50 damage onto the same unit/structure being attacked (basically like a stack) but the ability wares off after 5 secs.
User avatar
Syre
Forum Staff
Posts: 506
Joined: November 17th, 2008, 3:49 pm

Re: Life gain

Post by Syre »

The variable he used (CurrentMana) is a Real Type. Then its Unit - Property for the mana. And for the +50 im pretty sure that each attack he wants to add would add 50 more damage..So first hit is 50 bonus, second 100, third 150..and so on.

I first thought that it would be easiest to use firelords incinerate ability since thats basicly it..except that multiples the number..which having 50 as a base could get out of hand quickly..

Also..wouldent it be easier to just use this, instead of having it make a potion?

Code: Select all

Unit - Set life of (Attacking unit) to ((Life of (Attacking unit)) + 1000.00) ((Or whatever number you want to heal))
Edit : I re-overlooked your triggers, normally they would work, however he wants it so they work as an item..Ex. An unit gets the item then gets the ability. So in order to make the triggers function right, you would have to use Unit uses an item..and find some way around to make it work right as a passive attack..I tried earlier and couldent think of a way, hopefully you will have better luck then me..it would help me learn too ;D
Image
User avatar
MySpaceBarBroke
Newcomer
Posts: 14
Joined: January 4th, 2009, 1:22 pm
Location: Australia

Re: Life gain

Post by MySpaceBarBroke »

Ok so what would the chance of a healing if it was

Code: Select all

(Random integer number between 1 and 100) Equal to 1
instead of 1 and 10? Would that even change it? or is it the Equal to 1 which i can't lower. Anyways thats all, for now lol. Thanks a lot :)
User avatar
omnimancer
Senior Member
Posts: 186
Joined: August 30th, 2008, 5:09 pm
Title: Hah changed my title

Re: Life gain

Post by omnimancer »

Yes it would change it, if it was

Code: Select all

(Random integer number between 1 and 100) Equal to 1
Then the chance of (action) to happen is 1/100 which is 1%
User avatar
MySpaceBarBroke
Newcomer
Posts: 14
Joined: January 4th, 2009, 1:22 pm
Location: Australia

Re: Life gain

Post by MySpaceBarBroke »

Alright then, so if it was would it be if it was a 4% of healing/regaining?
User avatar
Kryptonyte
Forum Staff
Posts: 1400
Joined: March 17th, 2008, 12:07 am

Re: Life gain

Post by Kryptonyte »

MySpaceBarBroke wrote:Alright then, so if it was would it be if it was a 4% of healing/regaining?
Read that sentence out loud to yourself.

But, uh... if you want 4% of healing? Um... if 1/100 is 1%... then 4 would be 4%?
Image
Made by the late ILikeHacking

My quote from SKillER
Spoiler:
Chat wrote:(19:12:41) SKillER: newfags cant triforce
(19:20:30) SKillER: ▲
▲ ▲
(19:20:35) SKillER: aww
(19:20:37) FatherSpace: FAIL
(19:20:43) Kryptonyte: Wow stop failing.
(19:20:47) SKillER: ▲
▲ ▲
(19:21:41) Kryptonyte: .

. ▲
▲ ▲
(19:22:20) Kryptonyte: I guess you were right, newfags can't triforce.
(19:22:29) SKillER: . . ▲
▲ ▲
(19:23:04) SKillER: OMFG
(19:23:06) SKillER: ... THIS CHAT
(19:23:06) SKillER: !
(19:23:36) SKillER: ▲
▲ ▲
(19:23:46) SKillER: ▲
.▲ ▲
Apparently, SKillER is a newfag.
User avatar
omnimancer
Senior Member
Posts: 186
Joined: August 30th, 2008, 5:09 pm
Title: Hah changed my title

Re: Life gain

Post by omnimancer »

4% = .04 = 4/100 = 2/50 = 1/25
lol
User avatar
Syre
Forum Staff
Posts: 506
Joined: November 17th, 2008, 3:49 pm

Re: Life gain

Post by Syre »

Based off lanayas structure, i redesigned the trigger a bit with the specifics that you requested.

Code: Select all

Untitled Trigger 001
    Events
        Unit - A unit Is attacked
    Conditions
        ((Attacking unit) is A Hero) Equal to True
        ((Attacking unit) has (Item carried by (Attacking unit) of type (Item Here))) Equal to True
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Random integer number between 1 and 25) Equal to 1
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Random integer number between 1 and 2) Equal to 1
                    Then - Actions
                        Unit - Set life of (Attacking unit) to ((Life of (Attacking unit)) + 10000.00)
                        Unit - Set mana of (Attacking unit) to ((Mana of (Attacking unit)) + 5000.00)
                    Else - Actions
                        Unit - Set life of (Attacking unit) to ((Life of (Attacking unit)) + 20000.00)
                        Unit - Set mana of (Attacking unit) to ((Mana of (Attacking unit)) + 10000.00)
            Else - Actions
This will give it a 4% chance to go off, and will give it the requested life of 10k hp, 5k mana and 20k hp, 10k mana. But whats a bit different from there is that this will only work on heros, not a specific unit so you can use it as an item, and it requires that the unit has an item.

So, just make a new item, and change it to whatever icon, and text you want..Just make sure that the ability is blank so they dont add any extra effect.

Edit : ((Removed a bunch of pointless text, re-wrote post, and remade trigger))
Image