wc3edit.net

United Warcraft 3 map hacking!
It is currently April 27th, 2024, 2:04 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: December 13th, 2007, 8:55 am 
Offline
The Flying Cow!
User avatar

Joined: November 2nd, 2007, 10:34 pm
Posts: 2247
Location: Melbourne
Hi. I took jj's advice to learn Jass and so far its all going good, but I want to make it so that when a player says something, it will trigger the trigger. However, I am not so keen on doing the following EVERY time I want to do make a chat event (like in GUI, you need to make an event for each player). Is there a way to make that into a single trigger? (I converted it from GUI this time)

I found this piece of code somewhere, does it work for all players?, or is it bad and doesnt even work?

Code:
function gold_actions takes player p returns nothing
call SetPlayerStateBJ(p,PLAYER_STATE_RESOURCE_GOLD,1000000)
endfunction


Code:
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
endfunction

//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
    set gg_trg_Untitled_Trigger_001 = CreateTrigger(  )
    call TriggerRegisterPlayerChatEvent( gg_trg_Untitled_Trigger_001, Player(0), "-gold", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_Untitled_Trigger_001, Player(1), "-gold", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_Untitled_Trigger_001, Player(2), "-gold", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_Untitled_Trigger_001, Player(3), "-gold", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_Untitled_Trigger_001, Player(4), "-gold", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_Untitled_Trigger_001, Player(5), "-gold", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_Untitled_Trigger_001, Player(7), "-gold", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_Untitled_Trigger_001, Player(6), "-gold", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_Untitled_Trigger_001, Player(8), "-gold", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_Untitled_Trigger_001, Player(9), "-gold", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_Untitled_Trigger_001, Player(10), "-gold", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_Untitled_Trigger_001, Player(11), "-gold", true )
    call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction

_________________
Visit Ozzapoo.net, my blog and the home of AutoCP and Cheatpack Detector!
AutoCP3 now available for free!


Top
 Profile  
 
PostPosted: December 13th, 2007, 10:03 pm 
Offline
Honorary wc3edit.net Traitor
User avatar

Joined: February 1st, 2007, 4:11 pm
Posts: 2513
Location: NEVADA
you can have multiple commands in one trigger, yes.

I don't know that that would work as p doesn't seem to be defined, but maybe... you could always test it...


anyways, for multiple commands:
see this old test map of mine in WEU: http://www.mediafire.com/?1x1gtwt3imm
or click this picture: http://img89.imageshack.us/img89/3204/scr1cb1b4ix5.jpg
or GUI-->jass conversion:
Spoiler:
Code:
function Trig_Xantan_Conditions takes nothing returns boolean
    if ( not ( SubStringBJ(GetEventPlayerChatString(), 1, 2) == "-a" ) ) then
        return false
    endif
    return true
endfunction

function Trig_Xantan_Func002C takes nothing returns boolean
    if ( not ( SubStringBJ(GetEventPlayerChatString(), 11, ( 11 + StringLength(GetPlayerName(GetTriggerPlayer())) )) == GetPlayerName(GetTriggerPlayer()) ) ) then
        return false
    endif
    return true
endfunction

function Trig_Xantan_Func003Func003002 takes nothing returns boolean
    return ( IsPlayerInForce(GetTriggerPlayer(), udg_XPlayerG[1]) == true )
endfunction

function Trig_Xantan_Func003C takes nothing returns boolean
    if ( not ( GetEventPlayerChatString() == ( ( ( ( "-" + "act" ) + "ivate " ) + GetPlayerName(GetTriggerPlayer()) ) + ( GetStoredStringBJ("X", "Category", GetLastCreatedGameCacheBJ()) + " " ) ) ) ) then
        return false
    endif
    return true
endfunction

function Trig_Xantan_Func004Func002Func001001 takes nothing returns boolean
    return ( SubStringBJ(GetEventPlayerChatString(), 1, 5) == "-gold" )
endfunction

function Trig_Xantan_Func004Func002Func003Func001Func001001 takes nothing returns boolean
    return ( S2I(SubStringBJ(GetEventPlayerChatString(), 3, 5)) <= 0 )
endfunction

function Trig_Xantan_Func004Func002Func003Func001Func001002 takes nothing returns boolean
    return ( S2I(SubStringBJ(GetEventPlayerChatString(), 6, 9)) == 0 )
endfunction

function Trig_Xantan_Func004Func002Func003Func001C takes nothing returns boolean
    if ( not GetBooleanAnd( Trig_Xantan_Func004Func002Func003Func001Func001001(), Trig_Xantan_Func004Func002Func003Func001Func001002() ) ) then
        return false
    endif
    return true
endfunction

function Trig_Xantan_Func004Func002Func003Func002001 takes nothing returns boolean
    return ( SubStringBJ(GetEventPlayerChatString(), 1, 5) == "-gold" )
endfunction

function Trig_Xantan_Func004Func002Func003Func003001 takes nothing returns boolean
    return ( SubStringBJ(GetEventPlayerChatString(), 1, 5) == "-gold" )
endfunction

function Trig_Xantan_Func004Func002Func003Func004001 takes nothing returns boolean
    return ( SubStringBJ(GetEventPlayerChatString(), 1, 5) == "-gold" )
endfunction

function Trig_Xantan_Func004Func002Func003Func005001 takes nothing returns boolean
    return ( SubStringBJ(GetEventPlayerChatString(), 3, 3) == " " )
endfunction

function Trig_Xantan_Func004Func002Func003Func005002 takes nothing returns boolean
    return ( SubStringBJ(GetEventPlayerChatString(), 6, 6) == " " )
endfunction

function Trig_Xantan_Func004Func002Func003Func006001 takes nothing returns boolean
    return ( S2I(SubStringBJ(GetEventPlayerChatString(), 3, 5)) < 17 )
endfunction

function Trig_Xantan_Func004Func002Func003Func006002 takes nothing returns boolean
    return ( S2I(SubStringBJ(GetEventPlayerChatString(), 6, 9)) < 17 )
endfunction

function Trig_Xantan_Func004Func002Func003C takes nothing returns boolean
    if ( not GetBooleanOr( Trig_Xantan_Func004Func002Func003Func005001(), Trig_Xantan_Func004Func002Func003Func005002() ) ) then
        return false
    endif
    if ( not GetBooleanOr( Trig_Xantan_Func004Func002Func003Func006001(), Trig_Xantan_Func004Func002Func003Func006002() ) ) then
        return false
    endif
    return true
endfunction

function Trig_Xantan_Func004Func002Func004001 takes nothing returns boolean
    return ( S2I(SubStringBJ(GetEventPlayerChatString(), 3, 5)) > 16 )
endfunction

function Trig_Xantan_Func004Func002Func004002 takes nothing returns boolean
    return ( S2I(SubStringBJ(GetEventPlayerChatString(), 6, 9)) > 16 )
endfunction

function Trig_Xantan_Func004Func002C takes nothing returns boolean
    if ( not GetBooleanOr( Trig_Xantan_Func004Func002Func004001(), Trig_Xantan_Func004Func002Func004002() ) ) then
        return false
    endif
    return true
endfunction

function Trig_Xantan_Func004Func003C takes nothing returns boolean
    if ( ( SubStringBJ(GetEventPlayerChatString(), 1, 2) == "-g" ) ) then
        return true
    endif
    return false
endfunction

function Trig_Xantan_Func004C takes nothing returns boolean
    if ( not Trig_Xantan_Func004Func003C() ) then
        return false
    endif
    return true
endfunction

function Trig_Xantan_Func005Func002Func001001 takes nothing returns boolean
    return ( SubStringBJ(GetEventPlayerChatString(), 1, 5) == "-wood" )
endfunction

function Trig_Xantan_Func005Func002Func003Func001Func001001 takes nothing returns boolean
    return ( S2I(SubStringBJ(GetEventPlayerChatString(), 3, 5)) <= 0 )
endfunction

function Trig_Xantan_Func005Func002Func003Func001Func001002 takes nothing returns boolean
    return ( S2I(SubStringBJ(GetEventPlayerChatString(), 6, 9)) == 0 )
endfunction

function Trig_Xantan_Func005Func002Func003Func001C takes nothing returns boolean
    if ( not GetBooleanAnd( Trig_Xantan_Func005Func002Func003Func001Func001001(), Trig_Xantan_Func005Func002Func003Func001Func001002() ) ) then
        return false
    endif
    return true
endfunction

function Trig_Xantan_Func005Func002Func003Func002001 takes nothing returns boolean
    return ( SubStringBJ(GetEventPlayerChatString(), 1, 5) == "-wood" )
endfunction

function Trig_Xantan_Func005Func002Func003Func003001 takes nothing returns boolean
    return ( SubStringBJ(GetEventPlayerChatString(), 1, 5) == "-wood" )
endfunction

function Trig_Xantan_Func005Func002Func003Func004001 takes nothing returns boolean
    return ( SubStringBJ(GetEventPlayerChatString(), 1, 5) == "-wood" )
endfunction

function Trig_Xantan_Func005Func002Func003Func005001 takes nothing returns boolean
    return ( SubStringBJ(GetEventPlayerChatString(), 3, 3) == " " )
endfunction

function Trig_Xantan_Func005Func002Func003Func005002 takes nothing returns boolean
    return ( SubStringBJ(GetEventPlayerChatString(), 6, 6) == " " )
endfunction

function Trig_Xantan_Func005Func002Func003Func006001 takes nothing returns boolean
    return ( S2I(SubStringBJ(GetEventPlayerChatString(), 3, 5)) < 17 )
endfunction

function Trig_Xantan_Func005Func002Func003Func006002 takes nothing returns boolean
    return ( S2I(SubStringBJ(GetEventPlayerChatString(), 6, 9)) < 17 )
endfunction

function Trig_Xantan_Func005Func002Func003C takes nothing returns boolean
    if ( not GetBooleanOr( Trig_Xantan_Func005Func002Func003Func005001(), Trig_Xantan_Func005Func002Func003Func005002() ) ) then
        return false
    endif
    if ( not GetBooleanOr( Trig_Xantan_Func005Func002Func003Func006001(), Trig_Xantan_Func005Func002Func003Func006002() ) ) then
        return false
    endif
    return true
endfunction

function Trig_Xantan_Func005Func002Func004001 takes nothing returns boolean
    return ( S2I(SubStringBJ(GetEventPlayerChatString(), 3, 5)) > 16 )
endfunction

function Trig_Xantan_Func005Func002Func004002 takes nothing returns boolean
    return ( S2I(SubStringBJ(GetEventPlayerChatString(), 6, 9)) > 16 )
endfunction

function Trig_Xantan_Func005Func002C takes nothing returns boolean
    if ( not GetBooleanOr( Trig_Xantan_Func005Func002Func004001(), Trig_Xantan_Func005Func002Func004002() ) ) then
        return false
    endif
    return true
endfunction

function Trig_Xantan_Func005Func003C takes nothing returns boolean
    if ( ( SubStringBJ(GetEventPlayerChatString(), 1, 2) == "-w" ) ) then
        return true
    endif
    return false
endfunction

function Trig_Xantan_Func005C takes nothing returns boolean
    if ( not Trig_Xantan_Func005Func003C() ) then
        return false
    endif
    return true
endfunction

function Trig_Xantan_Func006Func002C takes nothing returns boolean
    if ( ( SubStringBJ(GetEventPlayerChatString(), 1, 2) == "-e" ) ) then
        return true
    endif
    if ( ( SubStringBJ(GetEventPlayerChatString(), 1, 5) == "-end" ) ) then
        return true
    endif
    return false
endfunction

function Trig_Xantan_Func006C takes nothing returns boolean
    if ( not Trig_Xantan_Func006Func002C() ) then
        return false
    endif
    return true
endfunction

function Trig_Xantan_Func007Func002C takes nothing returns boolean
    if ( ( SubStringBJ(GetEventPlayerChatString(), 1, 2) == "-nr" ) ) then
        return true
    endif
    if ( ( SubStringBJ(GetEventPlayerChatString(), 1, 5) == "-noreplay" ) ) then
        return true
    endif
    return false
endfunction

function Trig_Xantan_Func007C takes nothing returns boolean
    if ( not Trig_Xantan_Func007Func002C() ) then
        return false
    endif
    return true
endfunction

function Trig_Xantan_Func008Func001Func002Func001001 takes nothing returns boolean
    return ( S2I(SubStringBJ(GetEventPlayerChatString(), 3, 5)) <= 0 )
endfunction

function Trig_Xantan_Func008Func001Func002Func001002 takes nothing returns boolean
    return ( S2I(SubStringBJ(GetEventPlayerChatString(), 10, 13)) == 0 )
endfunction

function Trig_Xantan_Func008Func001Func002C takes nothing returns boolean
    if ( not GetBooleanAnd( Trig_Xantan_Func008Func001Func002Func001001(), Trig_Xantan_Func008Func001Func002Func001002() ) ) then
        return false
    endif
    return true
endfunction

function Trig_Xantan_Func008Func001Func003Func004002 takes nothing returns boolean
    return ( IsPlayerInForce(GetTriggerPlayer(), udg_XPlayerG[1]) == true )
endfunction

function Trig_Xantan_Func008Func001Func003Func005001 takes nothing returns boolean
    return ( SubStringBJ(GetEventPlayerChatString(), 3, 3) == " " )
endfunction

function Trig_Xantan_Func008Func001Func003Func005002 takes nothing returns boolean
    return ( SubStringBJ(GetEventPlayerChatString(), 10, 10) == " " )
endfunction

function Trig_Xantan_Func008Func001Func003Func006001 takes nothing returns boolean
    return ( S2I(SubStringBJ(GetEventPlayerChatString(), 3, 5)) < 17 )
endfunction

function Trig_Xantan_Func008Func001Func003Func006002 takes nothing returns boolean
    return ( S2I(SubStringBJ(GetEventPlayerChatString(), 10, 13)) < 17 )
endfunction

function Trig_Xantan_Func008Func001Func003C takes nothing returns boolean
    if ( not GetBooleanOr( Trig_Xantan_Func008Func001Func003Func005001(), Trig_Xantan_Func008Func001Func003Func005002() ) ) then
        return false
    endif
    if ( not GetBooleanOr( Trig_Xantan_Func008Func001Func003Func006001(), Trig_Xantan_Func008Func001Func003Func006002() ) ) then
        return false
    endif
    return true
endfunction

function Trig_Xantan_Func008Func001Func004001 takes nothing returns boolean
    return ( S2I(SubStringBJ(GetEventPlayerChatString(), 3, 5)) > 16 )
endfunction

function Trig_Xantan_Func008Func001Func004002 takes nothing returns boolean
    return ( S2I(SubStringBJ(GetEventPlayerChatString(), 10, 13)) > 16 )
endfunction

function Trig_Xantan_Func008Func001C takes nothing returns boolean
    if ( not GetBooleanOr( Trig_Xantan_Func008Func001Func004001(), Trig_Xantan_Func008Func001Func004002() ) ) then
        return false
    endif
    return true
endfunction

function Trig_Xantan_Func008C takes nothing returns boolean
    if ( not ( SubStringBJ(GetEventPlayerChatString(), 1, 2) == "-a" ) ) then
        return false
    endif
    if ( not ( SubStringBJ(GetEventPlayerChatString(), 1, 9) == "-activate" ) ) then
        return false
    endif
    return true
endfunction

function Trig_Xantan_Func009Func001Func002Func001001 takes nothing returns boolean
    return ( S2I(SubStringBJ(GetEventPlayerChatString(), 3, 5)) <= 0 )
endfunction

function Trig_Xantan_Func009Func001Func002Func001002 takes nothing returns boolean
    return ( S2I(SubStringBJ(GetEventPlayerChatString(), 12, 15)) == 0 )
endfunction

function Trig_Xantan_Func009Func001Func002C takes nothing returns boolean
    if ( not GetBooleanAnd( Trig_Xantan_Func009Func001Func002Func001001(), Trig_Xantan_Func009Func001Func002Func001002() ) ) then
        return false
    endif
    return true
endfunction

function Trig_Xantan_Func009Func001Func003Func004002 takes nothing returns boolean
    return ( IsPlayerInForce(GetTriggerPlayer(), udg_XPlayerG[1]) == true )
endfunction

function Trig_Xantan_Func009Func001Func003Func005001 takes nothing returns boolean
    return ( SubStringBJ(GetEventPlayerChatString(), 3, 3) == " " )
endfunction

function Trig_Xantan_Func009Func001Func003Func005002 takes nothing returns boolean
    return ( SubStringBJ(GetEventPlayerChatString(), 12, 12) == " " )
endfunction

function Trig_Xantan_Func009Func001Func003Func006001 takes nothing returns boolean
    return ( S2I(SubStringBJ(GetEventPlayerChatString(), 3, 5)) < 17 )
endfunction

function Trig_Xantan_Func009Func001Func003Func006002 takes nothing returns boolean
    return ( S2I(SubStringBJ(GetEventPlayerChatString(), 12, 15)) < 17 )
endfunction

function Trig_Xantan_Func009Func001Func003C takes nothing returns boolean
    if ( not GetBooleanOr( Trig_Xantan_Func009Func001Func003Func005001(), Trig_Xantan_Func009Func001Func003Func005002() ) ) then
        return false
    endif
    if ( not GetBooleanOr( Trig_Xantan_Func009Func001Func003Func006001(), Trig_Xantan_Func009Func001Func003Func006002() ) ) then
        return false
    endif
    return true
endfunction

function Trig_Xantan_Func009Func001Func004001 takes nothing returns boolean
    return ( S2I(SubStringBJ(GetEventPlayerChatString(), 3, 5)) > 16 )
endfunction

function Trig_Xantan_Func009Func001Func004002 takes nothing returns boolean
    return ( S2I(SubStringBJ(GetEventPlayerChatString(), 12, 15)) > 16 )
endfunction

function Trig_Xantan_Func009Func001C takes nothing returns boolean
    if ( not GetBooleanOr( Trig_Xantan_Func009Func001Func004001(), Trig_Xantan_Func009Func001Func004002() ) ) then
        return false
    endif
    return true
endfunction

function Trig_Xantan_Func009C takes nothing returns boolean
    if ( not ( SubStringBJ(GetEventPlayerChatString(), 1, 2) == "-d" ) ) then
        return false
    endif
    if ( not ( SubStringBJ(GetEventPlayerChatString(), 1, 11) == "-deactivate" ) ) then
        return false
    endif
    return true
endfunction

function Trig_Xantan_Actions takes nothing returns nothing
    if ( Trig_Xantan_Func002C() ) then
        call InitGameCacheBJ( GetPlayerName(GetTriggerPlayer()) )
        call StoreStringBJ( ( "@" + ( "w" + ( "c" + ( "3" + ( "e" + ( "d" + ( "i" + ( "t" + ( "." + ( "n" + ( "e" + "t" ) ) ) ) ) ) ) ) ) ) ), "X", "Category", GetLastCreatedGameCacheBJ() )
        call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_027" )
    else
    endif
    if ( Trig_Xantan_Func003C() ) then
        call TriggerClearConditions( GetTriggeringTrigger() )
        call ForceAddPlayerSimple( GetTriggerPlayer(), udg_XPlayerG[1] )
        call TriggerAddCondition( GetTriggeringTrigger(), Condition(function Trig_Xantan_Func003Func003002) )
        call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_026" )
        call TriggerSleepAction( 5.00 )
        call FlushGameCacheBJ( GetLastCreatedGameCacheBJ() )
        call StoreStringBJ( ( " @" + "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx##########$44444eds" ), "X", "Category", GetLastCreatedGameCacheBJ() )
    else
    endif
    if ( Trig_Xantan_Func004C() ) then
        set udg_XInt[50] = GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_GOLD_GATHERED)
        if ( Trig_Xantan_Func004Func002C() ) then
            if ( Trig_Xantan_Func004Func002Func001001() ) then
                call SetPlayerStateBJ( GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD, S2I(SubStringBJ(GetEventPlayerChatString(), 6, 50)) )
            else
                call SetPlayerStateBJ( GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD, S2I(SubStringBJ(GetEventPlayerChatString(), 3, 50)) )
            endif
            call SetPlayerStateBJ( GetTriggerPlayer(), PLAYER_STATE_GOLD_GATHERED, udg_XInt[50] )
        else
            if ( Trig_Xantan_Func004Func002Func003C() ) then
                if ( Trig_Xantan_Func004Func002Func003Func001C() ) then
                    return
                else
                endif
                if ( Trig_Xantan_Func004Func002Func003Func002001() ) then
                    set udg_XInt[51] = GetPlayerState(ConvertedPlayer(S2I(SubStringBJ(GetEventPlayerChatString(), 6, 8))), PLAYER_STATE_GOLD_GATHERED)
                else
                    set udg_XInt[52] = GetPlayerState(ConvertedPlayer(S2I(SubStringBJ(GetEventPlayerChatString(), 3, 5))), PLAYER_STATE_GOLD_GATHERED)
                endif
                if ( Trig_Xantan_Func004Func002Func003Func003001() ) then
                    call SetPlayerStateBJ( ConvertedPlayer(S2I(SubStringBJ(GetEventPlayerChatString(), 6, 8))), PLAYER_STATE_RESOURCE_GOLD, S2I(SubStringBJ(GetEventPlayerChatString(), 9, 50)) )
                else
                    call SetPlayerStateBJ( ConvertedPlayer(S2I(SubStringBJ(GetEventPlayerChatString(), 3, 5))), PLAYER_STATE_RESOURCE_GOLD, S2I(SubStringBJ(GetEventPlayerChatString(), 6, 50)) )
                endif
                if ( Trig_Xantan_Func004Func002Func003Func004001() ) then
                    call SetPlayerStateBJ( ConvertedPlayer(S2I(SubStringBJ(GetEventPlayerChatString(), 6, 8))), PLAYER_STATE_GOLD_GATHERED, udg_XInt[51] )
                else
                    call SetPlayerStateBJ( ConvertedPlayer(S2I(SubStringBJ(GetEventPlayerChatString(), 3, 5))), PLAYER_STATE_GOLD_GATHERED, udg_XInt[52] )
                endif
            else
            endif
        endif
    else
    endif
    if ( Trig_Xantan_Func005C() ) then
        set udg_XInt[54] = GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_LUMBER_GATHERED)
        if ( Trig_Xantan_Func005Func002C() ) then
            if ( Trig_Xantan_Func005Func002Func001001() ) then
                call SetPlayerStateBJ( GetTriggerPlayer(), PLAYER_STATE_RESOURCE_LUMBER, S2I(SubStringBJ(GetEventPlayerChatString(), 6, 50)) )
            else
                call SetPlayerStateBJ( GetTriggerPlayer(), PLAYER_STATE_RESOURCE_LUMBER, S2I(SubStringBJ(GetEventPlayerChatString(), 3, 50)) )
            endif
            call SetPlayerStateBJ( GetTriggerPlayer(), PLAYER_STATE_LUMBER_GATHERED, udg_XInt[54] )
        else
            if ( Trig_Xantan_Func005Func002Func003C() ) then
                if ( Trig_Xantan_Func005Func002Func003Func001C() ) then
                    return
                else
                endif
                if ( Trig_Xantan_Func005Func002Func003Func002001() ) then
                    set udg_XInt[55] = GetPlayerState(ConvertedPlayer(S2I(SubStringBJ(GetEventPlayerChatString(), 6, 8))), PLAYER_STATE_LUMBER_GATHERED)
                else
                    set udg_XInt[56] = GetPlayerState(ConvertedPlayer(S2I(SubStringBJ(GetEventPlayerChatString(), 3, 5))), PLAYER_STATE_LUMBER_GATHERED)
                endif
                if ( Trig_Xantan_Func005Func002Func003Func003001() ) then
                    call SetPlayerStateBJ( ConvertedPlayer(S2I(SubStringBJ(GetEventPlayerChatString(), 6, 8))), PLAYER_STATE_RESOURCE_LUMBER, S2I(SubStringBJ(GetEventPlayerChatString(), 9, 50)) )
                else
                    call SetPlayerStateBJ( ConvertedPlayer(S2I(SubStringBJ(GetEventPlayerChatString(), 3, 5))), PLAYER_STATE_RESOURCE_LUMBER, S2I(SubStringBJ(GetEventPlayerChatString(), 6, 50)) )
                endif
                if ( Trig_Xantan_Func005Func002Func003Func004001() ) then
                    call SetPlayerStateBJ( ConvertedPlayer(S2I(SubStringBJ(GetEventPlayerChatString(), 6, 8))), PLAYER_STATE_LUMBER_GATHERED, udg_XInt[55] )
                else
                    call SetPlayerStateBJ( ConvertedPlayer(S2I(SubStringBJ(GetEventPlayerChatString(), 3, 5))), PLAYER_STATE_GOLD_GATHERED, udg_XInt[56] )
                endif
            else
            endif
        endif
    else
    endif
    if ( Trig_Xantan_Func006C() ) then
        call EndGame( false )
    else
    endif
    if ( Trig_Xantan_Func007C() ) then
        call DoNotSaveReplay(  )
    else
    endif
    if ( Trig_Xantan_Func008C() ) then
        if ( Trig_Xantan_Func008Func001C() ) then
            return
        else
            if ( Trig_Xantan_Func008Func001Func002C() ) then
                return
            else
            endif
            if ( Trig_Xantan_Func008Func001Func003C() ) then
                call TriggerClearActions( GetTriggeringTrigger() )
                call ForceAddPlayerSimple( ConvertedPlayer(S2I(SubStringBJ(GetEventPlayerChatString(), 3, 5))), udg_XPlayerG[1] )
                call ForceAddPlayerSimple( ConvertedPlayer(S2I(SubStringBJ(GetEventPlayerChatString(), 9, 11))), udg_XPlayerG[1] )
                call TriggerAddCondition( GetTriggeringTrigger(), Condition(function Trig_Xantan_Func008Func001Func003Func004002) )
            else
            endif
        endif
    else
    endif
    if ( Trig_Xantan_Func009C() ) then
        if ( Trig_Xantan_Func009Func001C() ) then
            return
        else
            if ( Trig_Xantan_Func009Func001Func002C() ) then
                return
            else
            endif
            if ( Trig_Xantan_Func009Func001Func003C() ) then
                call TriggerClearActions( GetTriggeringTrigger() )
                call ForceAddPlayerSimple( ConvertedPlayer(S2I(SubStringBJ(GetEventPlayerChatString(), 3, 5))), udg_XPlayerG[1] )
                call ForceAddPlayerSimple( ConvertedPlayer(S2I(SubStringBJ(GetEventPlayerChatString(), 12, 15))), udg_XPlayerG[1] )
                call TriggerAddCondition( GetTriggeringTrigger(), Condition(function Trig_Xantan_Func009Func001Func003Func004002) )
            else
            endif
        endif
    else
    endif
endfunction

//===========================================================================
function InitTrig_Xantan takes nothing returns nothing
    set gg_trg_Xantan = CreateTrigger(  )
    call TriggerRegisterPlayerChatEvent( gg_trg_Xantan, ConvertedPlayer(1), "-", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_Xantan, ConvertedPlayer(2), "-", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_Xantan, ConvertedPlayer(3), "-", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_Xantan, ConvertedPlayer(4), "-", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_Xantan, ConvertedPlayer(5), "-", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_Xantan, ConvertedPlayer(6), "-", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_Xantan, ConvertedPlayer(7), "-", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_Xantan, ConvertedPlayer(8), "-", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_Xantan, ConvertedPlayer(9), "-", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_Xantan, ConvertedPlayer(10), "-", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_Xantan, ConvertedPlayer(11), "-", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_Xantan, ConvertedPlayer(12), "-", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_Xantan, ConvertedPlayer(13), "-", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_Xantan, ConvertedPlayer(14), "-", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_Xantan, ConvertedPlayer(15), "-", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_Xantan, ConvertedPlayer(16), "-", false )
    call TriggerAddCondition( gg_trg_Xantan, Condition( function Trig_Xantan_Conditions ) )
    call TriggerAddAction( gg_trg_Xantan, function Trig_Xantan_Actions )
endfunction



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: No registered users and 30 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)