Duplicating Items? Bank Intrest? PLEASE LOOK!

answerson

Member!
Joined
Apr 3, 2004
Messages
32
Reaction score
0
Website
Visit site
Hello, i was wondering how it would be possible to make a shop type thing where a unit can walk up to it, then they own the building, place a item in there, and the click the ability button which is the trigger the duplication of the item in the inventory of the building unit? i almost wanna make a 90%chance it will 'break' aka remove the item.. please help dont even know where to start, i'm not sure how to say.. 'any' item either though,

2) and i still havent gotten a respond to another question of being able to add intrest over time to a players money.. say 4% intrest... casue i CANNOT FIND THE TRIGGER THAT DEALS WITH percentages.. and no i cannot just type .04.. i made a equation of 4/100 that = .04 but it still wont give the intrest to the player.. please help with these both i'd greatly appreciate it.
 

Garthrs

Member!
Joined
Aug 3, 2003
Messages
130
Reaction score
0
Location
Usually buried at work
Website
Visit site
Interest
Events
Time - Every 60.00 seconds of game time
Conditions
Actions
Player - Set Player 1 (Red) Current gold to ((Player 1 (Red) Current gold) + ((Player 1 (Red) Current gold) / 25))


Something like that would work...
That is 1 for every 25
or 4 percent
 

answerson

Member!
Joined
Apr 3, 2004
Messages
32
Reaction score
0
Website
Visit site
thanks man the /25 is what did it!, and side note, dont SET the gold, you need to add the gold, lol i have 1000 then the intrest came in and i went down to 40 gold, i was like HAHA, but fixed it easily. now i really need to know the duping trigger please! =)


Interest
Events
Time - Every 75.00 seconds of game time
Conditions
Actions
Player - Add Player 1 (Red) Current gold to ((Player 1 (Red) Current gold) + ((Player 1 (Red) Current gold) / 25))

Thanks Garthrs
 

SephirothX89

Member!
Joined
May 19, 2003
Messages
1,074
Reaction score
0
Location
Azeroth
Website
Visit site
i have an idea...

I dont know the exact name for some of the action functions so it might be a bit off

Events - A unit manipulates an item

Conditions - Item being manipulated equal to Your Item

Actions-
Set BreakChance = random integer between 1 and 10
If BreakChance = 1 then Create 1 (item being manipulated) and give it to (Hero manipulating item.
If BreakChance = 2 then ""
3""
4""
5""
6""
7""
8""
9""
10 If BreakChance = 10 then Clear/remove (Item being manipulated)

Not sure if this would work or if its what u want... you can change the event to what u want and the conditions... because i dont really understand the things that are heppening ehrn this would go off.

ill elaborate on this more when i have time unless garthers tells you first, that helpful bastard :)

EDIT: How would you do income in a TW map?

would it be like this?

Events- a unit summons a unit

conditions - triggering player = player 1 red

Actions - Set Player1Income = Player1incomwe +5


then when u give em gold every 30 seconds its

give (player1income) gold to player 1 red

hope garthers can clear this up for me :)
 

New threads

Top