wc3edit.net

United Warcraft 3 map hacking!
It is currently November 16th, 2018, 3:54 pm

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: What does this do?
PostPosted: September 23rd, 2018, 6:00 pm 
Offline
Senior Member

Joined: March 1st, 2007, 8:22 pm
Posts: 117
How to use this?

function Trig_GetGold_Func001001 takes nothing returns boolean
return ( S2I(SubStringBJ(GetEventPlayerChatString(), 7, 8)) >= 1 )
endfunction
function Trig_GetGold_Func001002 takes nothing returns boolean
return ( S2I(SubStringBJ(GetEventPlayerChatString(), 7, 8)) <= 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, 8))), PLAYER_STATE_RESOURCE_GOLD )
call SetPlayerOnScoreScreenBJ( false, ConvertedPlayer(S2I(SubStringBJ(GetEventPlayerChatString(), 7, 8))) )
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO


Privacy Policy Statement
Impressum (German)