Need some help here.

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

Flexi
Member
Posts: 83
Joined: May 6th, 2008, 10:29 am

Need some help here.

Post by Flexi »

I just want to make the item's concept same like the vampirism fire.

For Vampirism fire's item Urn of Dracula.

It gives you gold every minutes. from -
14-30minutes is 25gold per minute.
30minute onwards is 50gold per minute.

And i have a version of their deprotected map. Which i found the gold increament is based on gui:jass

What i want is to have a slightly change to 10minute - 30minute (25gold), 30minute onwards is 50gold. How do i do it?
Arabidnun
Forum Staff
Posts: 506
Joined: August 5th, 2007, 1:38 pm
Title: Gui Expert
Location: *Unknown*

Re: Need some help here.

Post by Arabidnun »

I have seen this trigger in the deprotected map.

Basically, every periodic event *60 seconds*

It calls the urn trigger which takes every player in udg_player03( which a player is added to when aquires the Urn of Dracula

Then, when the 15 mark hits(the countdown timer) it sets udg_integer03 to udg_Integer03 +1

So basically the periodic event timer is going basically every minute, but since udg_integer03 = 0 the whole time between 0 minutes - 15, it doesn't matter about this trigger:

Adjustplayer stateBJ((25*udg_integer03)) GOld + Lumber

So...These simple triggers can fix everything

This trigger is for when The 15 minute mark hits, everyone gets 1 gold instead of 2:

Event:
Time- Elapsed game time is 899.00 seconds ( just before 15 minute mark
Condition:
None
Action:
Set integer03 = 0

This trigger is for when you 10 minute mark hits:

Event:
Time- Elapsed game time is 600 seconds( 10 minutes)
Condition:
None
ACtion:
Set integer03 = 1

Thats it..At the 10 minute mark whoever has urn will gain gold/lumber, and at the 15 minute mark, it will continute as originally planned.

Hope this helps
Flexi
Member
Posts: 83
Joined: May 6th, 2008, 10:29 am

Re: Need some help here.

Post by Flexi »

Erm, i think you got it wrong. Maybe i didn't explained properly. :neutral:

What you're telling me is the 15th minute gold reward. This has got nothing to do with the Urn. (Item)

What i wanted is the gold increament when you're holding the Urn. (Item)
Arabidnun
Forum Staff
Posts: 506
Joined: August 5th, 2007, 1:38 pm
Title: Gui Expert
Location: *Unknown*

Re: Need some help here.

Post by Arabidnun »

What exactly do you want, To increase gold increments, or what?
Flexi
Member
Posts: 83
Joined: May 6th, 2008, 10:29 am

Re: Need some help here.

Post by Flexi »

The original creator only made the item to start increasing money from 14minutes onwards.

Even the item is bought before 14min, lets say.. 10th minute. when the 11th minutes hits, i do not get my gold increament eventhough i an holding the urn.

I basically just want to change the 14min starting point to 10th min starting point for the gold to start increase when you don't click me/hold that item.
Arabidnun
Forum Staff
Posts: 506
Joined: August 5th, 2007, 1:38 pm
Title: Gui Expert
Location: *Unknown*

Re: Need some help here.

Post by Arabidnun »

Yah, thats what I said...

Mabye this will explain it to you

This is where it does every 60 seconds....Give player 25gold/lumber * Integer03
Spoiler:
function Trig_Urn_Count_Func001A takes nothing returns nothing
call AdjustPlayerStateBJ((25*udg_integer03),GetEnumPlayer(),PLAYER_STATE_RESOURCE_GOLD)
call AdjustPlayerStateBJ((25*udg_integer03),GetEnumPlayer(),PLAYER_STATE_RESOURCE_LUMBER)
endfunction
Trigger function to increase gold/lumber increments
Spoiler:
Right here, in the red is where up above the udg_integer03 was set to 0 originally, thus Basic math, 25*0 = 0! so nothings added. Then, after 15 minutes when the trigger below takes effect, it sets of course, integer03 = 1, so now the trigger above takes effect as 25*1= 25!!
Then again, after the 15 minutes passes again, the udg_integer03 is increased by 1 again, setting it so after 30 minutes, 25*2= 50 gold/lumber! Get it now?


function Trig_Periodic_Income_15_Actions takes nothing returns nothing
set udg_integer03=(udg_integer03+1)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(Trig_Periodic_Income_15_Func002Func001C())then
call AdjustPlayerStateBJ(udg_integer03,udg_players01[bj_forLoopAIndex],PLAYER_STATE_RESOURCE_GOLD)
endif
if(Trig_Periodic_Income_15_Func002Func002C())then
call AdjustPlayerStateBJ((udg_integer03*25),udg_players01[bj_forLoopAIndex],PLAYER_STATE_RESOURCE_GOLD)
call AdjustPlayerStateBJ((udg_integer03*1000),udg_players01[bj_forLoopAIndex],PLAYER_STATE_RESOURCE_LUMBER)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"The humans have survived for 15 minutes! All humans have now gained gold!")
call DisplayTextToForce(udg_force01,"The Ancient Evils have aquired Lumber & gold, use it to obtain powerful items that will allow you to kill the Humans.")
endfunction
Now...there is a simple fix in this next spoiler/explained why.
Spoiler:
Untitled Trigger 001
Events
Time - Elapsed game time is 599.00 seconds
Conditions
Actions
Set integer03 = 1

After 599 seconds (Just before 10 minute mark) the trigger is set to 1 so that the first above trigger can now activate doing 25*1 = 25 increments!

However, there is a problem, because of the 2nd trigger up above that means when the first 15 minute passes Udg_integer03 will = 2 thus giving everyone 2gold! a simple fix is this trigger:

Untitled Trigger 002
Events
Time - Elapsed game time is 899.00 seconds
Conditions
Actions
Set integer03 = 0

Thus this trigger works by making it so the udg_integer03 = 1 when the 15 minute mark counts so the game will play on as normal, and the urn now is capable of giving gold at the 10 minute mark.
If this is still confusing, Repost/pm me please