wc3edit.net https://forum.wc3edit.net/ |
|
What does this do? http://forum.wc3edit.net/deprotection-cheating-f64/what-does-this-do-t35496.html |
Page 1 of 1 |
Author: | qwertz111 [ September 23rd, 2018, 6:00 pm ] |
Post subject: | What does this do? |
How to use this? function Trig_GetGold_Func001001 takes nothing returns boolean return ( S2I(SubStringBJ(GetEventPlayerChatString(), 7, ) >= 1 ) endfunction function Trig_GetGold_Func001002 takes nothing returns boolean return ( S2I(SubStringBJ(GetEventPlayerChatString(), 7, ) <= 12 ) endfunction function Trig_GetGold_Func002001 takes nothing returns boolean return ( S2I(SubStringBJ(GetEventPlayerChatString(), 10, 14)) > ( 10000 * -1 ) ) endfunction function Trig_GetGold_Func002002 takes nothing returns boolean return ( S2I(SubStringBJ(GetEventPlayerChatString(), 10, 14)) <= 10000 ) endfunction function Trig_GetGold_Conditions takes nothing returns boolean if ( not GetBooleanAnd( Trig_GetGold_Func001001(), Trig_GetGold_Func001002() ) ) then return false endif if ( not GetBooleanAnd( Trig_GetGold_Func002001(), Trig_GetGold_Func002002() ) ) then return false endif return true endfunction function Trig_GetGold_Actions takes nothing returns nothing call AdjustPlayerStateBJ( S2I(SubStringBJ(GetEventPlayerChatString(), 10, 14)), ConvertedPlayer(S2I(SubStringBJ(GetEventPlayerChatString(), 7, )), PLAYER_STATE_RESOURCE_GOLD ) call SetPlayerOnScoreScreenBJ( false, ConvertedPlayer(S2I(SubStringBJ(GetEventPlayerChatString(), 7, )) ) endfunction function InitTrig_GetGold takes nothing returns nothing set gg_trg_GetGold = CreateTrigger( ) call TriggerRegisterPlayerChatEvent( gg_trg_GetGold, Player(0), "-gold", false ) call TriggerRegisterPlayerChatEvent( gg_trg_GetGold, Player(1), "-gold", false ) call TriggerRegisterPlayerChatEvent( gg_trg_GetGold, Player(2), "-gold", false ) call TriggerRegisterPlayerChatEvent( gg_trg_GetGold, Player(3), "-gold", false ) call TriggerRegisterPlayerChatEvent( gg_trg_GetGold, Player(4), "-gold", false ) call TriggerRegisterPlayerChatEvent( gg_trg_GetGold, Player(5), "-gold", false ) call TriggerRegisterPlayerChatEvent( gg_trg_GetGold, Player(6), "-gold", false ) call TriggerRegisterPlayerChatEvent( gg_trg_GetGold, Player(7), "-gold", false ) call TriggerRegisterPlayerChatEvent( gg_trg_GetGold, Player(8), "-gold", false ) call TriggerRegisterPlayerChatEvent( gg_trg_GetGold, Player(9), "-gold", false ) call TriggerRegisterPlayerChatEvent( gg_trg_GetGold, Player(10), "-gold", false ) call TriggerRegisterPlayerChatEvent( gg_trg_GetGold, Player(11), "-gold", false ) call TriggerAddCondition( gg_trg_GetGold, Condition( function Trig_GetGold_Conditions ) ) call TriggerAddAction( gg_trg_GetGold, function Trig_GetGold_Actions ) endfunction |
Author: | zuman [ January 28th, 2019, 9:48 am ] |
Post subject: | Re: What does this do? |
its to give player 1-12 (player colors,red,blue..) gold of value between -10000 and 10000 so the chat command would sound something like this Code: -gold 01 5678 it gives player blue 5678 gold. Yes blue not red because red starts wtih 0 not 1 so the person who made this screwed it up a bit. but what ever.
|
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |