• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Help with a script

Status
Not open for further replies.
Level 4
Joined
Dec 2, 2011
Messages
76
[jass=Option]function Trig_GoldFarm_Conditions takes nothing returns boolean
if GetEventDamage() == 0 then
return false
endif
call ShowDamages()
if IsPlayerEnemy(GetOwningPlayer(GetTriggerUnit()), GetOwningPlayer(GetEventDamageSource())) == false then
return false
endif
if GetUnitTypeId(GetEventDamageSource()) == 'H00D' then
return true
endif
if GetUnitTypeId(GetEventDamageSource()) == 'H000' then
return true
endif
return false
endfunction

function Trig_GoldFarm_Actions takes nothing returns nothing
call SetPlayerState( GetOwningPlayer(GetEventDamageSource()), PLAYER_STATE_RESOURCE_GOLD, GetPlayerState(GetOwningPlayer(GetEventDamageSource()), PLAYER_STATE_RESOURCE_GOLD) + R2I(GetEventDamage()) )
endfunction

//===========================================================================
function InitTrig_GoldFarm takes nothing returns nothing
set gg_trg_GoldFarm = CreateTrigger( )
call TriggerAddCondition( gg_trg_GoldFarm, Condition( function Trig_GoldFarm_Conditions ) )
call TriggerAddAction( gg_trg_GoldFarm, function Trig_GoldFarm_Actions )
endfunction[/code]

I would like to multiply the gold output by 2 in this script, if you would please help me, I'm very new to jass
Thanks to all that help.
 
Last edited:
Status
Not open for further replies.
Top