wc3edit.net

United Warcraft 3 map hacking!
It is currently March 28th, 2024, 8:41 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
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: 118
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  
 
 Post subject: Re: What does this do?
PostPosted: January 28th, 2019, 9:48 am 
Offline
Junior Member

Joined: June 19th, 2012, 6:31 pm
Posts: 41
Location: Demon Land
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.


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

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 19 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)