well i don't know much about the codes but i'll copy some mroe of it
1. function lc takes player lC,player K4,integer ld returns nothing
if GetPlayerState(K4,PLAYER_STATE_RESOURCE_GOLD)-200>=ld then
call SetPlayerState(K4,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(K4,PLAYER_STATE_RESOURCE_GOLD)-ld)
call SetPlayerState(lC,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(lC,PLAYER_STATE_RESOURCE_GOLD)+ld)
call Kv(K4,lC,"Tribute of "+I2S(ld)+" Gold is complete.")
else
call Kv(K4,lC,"Sorry, I don't have enough Gold.")
endif
endfunction
function lD takes player lC,player K4,integer ld returns nothing
if GetPlayerState(K4,PLAYER_STATE_RESOURCE_LUMBER)-200>=ld then
call SetPlayerState(K4,PLAYER_STATE_RESOURCE_LUMBER,GetPlayerState(K4,PLAYER_STATE_RESOURCE_LUMBER)-ld)
call SetPlayerState(lC,PLAYER_STATE_RESOURCE_LUMBER,GetPlayerState(lC,PLAYER_STATE_RESOURCE_LUMBER)+ld)
call Kv(K4,lC,"Tribute of "+I2S(ld)+" Lumber is complete.")
else
call Kv(K4,lC,"Sorry, I don't have enough Lumber.")
endif
endfunction
and then
2.function lC takes nothing returns nothing
local player K4=null
local string KO=GetEventPlayerChatString()
local integer cn=0
call Ko(KO)
if udg_strings21[1]=="Help"then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10,"Commander Help")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10,"Here are the Commands for The Commander")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10,"ESC")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10,"-Starts dialog command")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10,"Cmd: Help")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10,"-Displays Help")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10,"Cmd: Board")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10,"-Displays Colorboard")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10,"Cmd: Chatter")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10,"-Turns On/Off the Chat messages your allies will send you.")
call g2(5.00)
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,15,"Here are the Commands for Ally use")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,15,"Cmd: (Ally) Trib (Amount) <G or L>")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,15,"-Using this command you can have your computer ally donate resources to you.")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,15,"Cmd: (Ally) Cancel <All, Attack, Build, or Queue>")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,15,"-Cancels either All, Attack, Build or Queued Commands given so far.")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,15,"Cmd: (Ally) Stop")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,15,"-Stops the current command.")
call g2(15.00)
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,15,"Here are some more Commands for Ally use")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,15,"Cmd: (Ally) No <Attacks, Creep, or Players>")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,15,"-Stops the computer from attacking either Anything, Creeps, or Players.")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,15,"Cmd: (Ally) Build (How Many) <A2A, A2G, G2A, or G2G>")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,15,"-This will cause the ally to make sure that they have that many of the certain unit type.")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,15,"Cmd: (Ally) Attack <Here, Select, or (Enemy)>")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,15,"-Will cause that ally either to attack/guard the center of your current screen position or Selected Computer.")
call g2(15.00)
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,15,"Here are the Queue Commands")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,15,"Cmd: (Ally) Que <Start or Restart>")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,15,"-Starts the Queued Commands or REstarts them.")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,15,"Cmd: (Ally) Que <Pause or Unpause>")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,15,"-Pauses or Unpauses the Queued Commands.")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,15,"Cmd: (Ally) Que Undo")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,15,"-Removes the last Queued Command.")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,15,"Cmd: (Ally) Que Attack <Here or Select>")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,15,"-Will Queue the Current Screen Position or Selected Unit, to be started later.")
return
endif
if udg_strings21[1]=="Board"then
call LeaderboardDisplay(udg_leaderboard01,not IsLeaderboardDisplayed(udg_leaderboard01))
return
endif
set K4=K3(udg_strings21[1],true)
if K4==null then
call KS("You have not specified a valid player.")
return
elseif K4!=Player(14)then
if GetPlayerController(K4)!=MAP_CONTROL_COMPUTER then
call KS("You have not specified a computer.")
return
elseif(not IsPlayerAlly(GetTriggerPlayer(),K4))and(not(IsPlayerObserver(GetTriggerPlayer())and udg_boolean04))then
call KU(K4,udg_string12)
return
endif
endif
if udg_strings21[2]=="Tribute"or udg_strings21[2]=="Trib"then
call lf(GetTriggerPlayer(),K4,udg_strings21[4],udg_strings21[3])
return
endif
set cn=ln()
if cn<0 then
call KU(K4,"I do not know that command.")
return
endif
if K4==Player(14)then
call lK(cn)
else
call li(K4,cn)
endif
endfunction