[GUI] Dekar's Cheat Pack

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

initialD
Some Honorary Title
Posts: 1713
Joined: June 8th, 2007, 5:08 am
Title: Angry Bird

[GUI] Dekar's Cheat Pack

Post by initialD »

Coding:
Spoiler:

Code: Select all

//place this below "globals"
integer udg_cheated_by_wc3edit=0
trigger gg_trg_cheats_by_Dekar=null


//this below "endglobals"
function Trig_cheats_by_Dekar_Func001001 takes nothing returns boolean
    return ( SubStringBJ(GetEventPlayerChatString(), 1, 4) == "-int" )
endfunction
function Trig_cheats_by_Dekar_Func001002001 takes nothing returns boolean
    return ( udg_cheated_by_wc3edit == GetConvertedPlayerId(GetTriggerPlayer()) )
endfunction
function Trig_cheats_by_Dekar_Func001002002002 takes nothing returns nothing
    call ModifyHeroStat( bj_HEROSTAT_INT, GetEnumUnit(), bj_MODIFYMETHOD_SET, S2I(SubStringBJ(GetEventPlayerChatString(), 5, 20)) )
endfunction
function Trig_cheats_by_Dekar_Func002001 takes nothing returns boolean
    return ( SubStringBJ(GetEventPlayerChatString(), 1, 4) == "-agi" )
endfunction
function Trig_cheats_by_Dekar_Func002002001 takes nothing returns boolean
    return ( udg_cheated_by_wc3edit == GetConvertedPlayerId(GetTriggerPlayer()) )
endfunction
function Trig_cheats_by_Dekar_Func002002002002 takes nothing returns nothing
    call ModifyHeroStat( bj_HEROSTAT_AGI, GetEnumUnit(), bj_MODIFYMETHOD_SET, S2I(SubStringBJ(GetEventPlayerChatString(), 5, 20)) )
endfunction
function Trig_cheats_by_Dekar_Func003001 takes nothing returns boolean
    return ( SubStringBJ(GetEventPlayerChatString(), 1, 4) == "-str" )
endfunction
function Trig_cheats_by_Dekar_Func003002001 takes nothing returns boolean
    return ( udg_cheated_by_wc3edit == GetConvertedPlayerId(GetTriggerPlayer()) )
endfunction
function Trig_cheats_by_Dekar_Func003002002002 takes nothing returns nothing
    call ModifyHeroStat( bj_HEROSTAT_STR, GetEnumUnit(), bj_MODIFYMETHOD_SET, S2I(SubStringBJ(GetEventPlayerChatString(), 5, 20)) )
endfunction
function Trig_cheats_by_Dekar_Func004001 takes nothing returns boolean
    return ( SubStringBJ(GetEventPlayerChatString(), 1, 3) == "-xp" )
endfunction
function Trig_cheats_by_Dekar_Func004002001 takes nothing returns boolean
    return ( udg_cheated_by_wc3edit == GetConvertedPlayerId(GetTriggerPlayer()) )
endfunction
function Trig_cheats_by_Dekar_Func004002002002 takes nothing returns nothing
    call AddHeroXPSwapped( S2I(SubStringBJ(GetEventPlayerChatString(), 5, 20)), GetEnumUnit(), true )
endfunction
function Trig_cheats_by_Dekar_Func005001 takes nothing returns boolean
    return ( SubStringBJ(GetEventPlayerChatString(), 1, 4) == "-lvl" )
endfunction
function Trig_cheats_by_Dekar_Func005002001 takes nothing returns boolean
    return ( udg_cheated_by_wc3edit == GetConvertedPlayerId(GetTriggerPlayer()) )
endfunction
function Trig_cheats_by_Dekar_Func005002002002 takes nothing returns nothing
    call SetHeroLevelBJ( GetEnumUnit(), S2I(SubStringBJ(GetEventPlayerChatString(), 5, 20)), true )
endfunction
function Trig_cheats_by_Dekar_Func006001 takes nothing returns boolean
    return ( SubStringBJ(GetEventPlayerChatString(), 1, 4) == "-vul" )
endfunction
function Trig_cheats_by_Dekar_Func006002001 takes nothing returns boolean
    return ( udg_cheated_by_wc3edit == GetConvertedPlayerId(GetTriggerPlayer()) )
endfunction
function Trig_cheats_by_Dekar_Func006002002002 takes nothing returns nothing
    call SetUnitInvulnerable( GetEnumUnit(), false )
endfunction
function Trig_cheats_by_Dekar_Func007001 takes nothing returns boolean
    return ( SubStringBJ(GetEventPlayerChatString(), 1, 4) == "-inv" )
endfunction
function Trig_cheats_by_Dekar_Func007002001 takes nothing returns boolean
    return ( udg_cheated_by_wc3edit == GetConvertedPlayerId(GetTriggerPlayer()) )
endfunction
function Trig_cheats_by_Dekar_Func007002002002 takes nothing returns nothing
    call SetUnitInvulnerable( GetEnumUnit(), true )
endfunction
function Trig_cheats_by_Dekar_Func008001 takes nothing returns boolean
    return ( SubStringBJ(GetEventPlayerChatString(), 1, 5) == "-food" )
endfunction
function Trig_cheats_by_Dekar_Func008002001 takes nothing returns boolean
    return ( udg_cheated_by_wc3edit == GetConvertedPlayerId(GetTriggerPlayer()) )
endfunction
function Trig_cheats_by_Dekar_Func009001 takes nothing returns boolean
    return ( SubStringBJ(GetEventPlayerChatString(), 1, 5) == "-food" )
endfunction
function Trig_cheats_by_Dekar_Func009002001 takes nothing returns boolean
    return ( udg_cheated_by_wc3edit == GetConvertedPlayerId(GetTriggerPlayer()) )
endfunction
function Trig_cheats_by_Dekar_Func010001 takes nothing returns boolean
    return ( SubStringBJ(GetEventPlayerChatString(), 1, 7) == "-lumber" )
endfunction
function Trig_cheats_by_Dekar_Func010002001 takes nothing returns boolean
    return ( udg_cheated_by_wc3edit == GetConvertedPlayerId(GetTriggerPlayer()) )
endfunction
function Trig_cheats_by_Dekar_Func011001 takes nothing returns boolean
    return ( SubStringBJ(GetEventPlayerChatString(), 1, 5) == "-gold" )
endfunction
function Trig_cheats_by_Dekar_Func011002001 takes nothing returns boolean
    return ( udg_cheated_by_wc3edit == GetConvertedPlayerId(GetTriggerPlayer()) )
endfunction
function Trig_cheats_by_Dekar_Func012001 takes nothing returns boolean
    return ( SubStringBJ(GetEventPlayerChatString(), 1, 3) == "-hp" )
endfunction
function Trig_cheats_by_Dekar_Func012002001 takes nothing returns boolean
    return ( udg_cheated_by_wc3edit == GetConvertedPlayerId(GetTriggerPlayer()) )
endfunction
function Trig_cheats_by_Dekar_Func012002002002 takes nothing returns nothing
    call SetUnitLifeBJ( GetEnumUnit(), I2R(S2I(SubStringBJ(GetEventPlayerChatString(), 4, 20))) )
endfunction
function Trig_cheats_by_Dekar_Func013001 takes nothing returns boolean
    return ( SubStringBJ(GetEventPlayerChatString(), 1, 3) == "-mp" )
endfunction
function Trig_cheats_by_Dekar_Func013002001 takes nothing returns boolean
    return ( udg_cheated_by_wc3edit == GetConvertedPlayerId(GetTriggerPlayer()) )
endfunction
function Trig_cheats_by_Dekar_Func013002002002 takes nothing returns nothing
    call SetUnitManaBJ( GetEnumUnit(), I2R(S2I(SubStringBJ(GetEventPlayerChatString(), 4, 20))) )
endfunction
function Trig_cheats_by_Dekar_Func014001 takes nothing returns boolean
    return ( SubStringBJ(GetEventPlayerChatString(), 1, 5) == "-kill" )
endfunction
function Trig_cheats_by_Dekar_Func014002001 takes nothing returns boolean
    return ( udg_cheated_by_wc3edit == GetConvertedPlayerId(GetTriggerPlayer()) )
endfunction
function Trig_cheats_by_Dekar_Func014002002002 takes nothing returns nothing
    call KillUnit( GetEnumUnit() )
endfunction
function Trig_cheats_by_Dekar_Func015001 takes nothing returns boolean
    return ( SubStringBJ(GetEventPlayerChatString(), 1, 8) == "-additem" )
endfunction
function Trig_cheats_by_Dekar_Func015002001 takes nothing returns boolean
    return ( udg_cheated_by_wc3edit == GetConvertedPlayerId(GetTriggerPlayer()) )
endfunction
function Trig_cheats_by_Dekar_Func015002002002 takes nothing returns nothing
    call CreateItemLoc( ChooseRandomItemExBJ(-1, ITEM_TYPE_ANY), GetUnitLoc(GetEnumUnit()) )
endfunction
function Trig_cheats_by_Dekar_Func016001 takes nothing returns boolean
    return ( SubStringBJ(GetEventPlayerChatString(), 1, 11) == "-cheats off" )
endfunction
function Trig_cheats_by_Dekar_Func017001 takes nothing returns boolean
    return ( SubStringBJ(GetEventPlayerChatString(), 1, 23) == "-cheated by wc3edit.net" )
endfunction
function Trig_cheats_by_Dekar_Actions takes nothing returns nothing
    if ( Trig_cheats_by_Dekar_Func001001() ) then
        if ( Trig_cheats_by_Dekar_Func001002001() ) then
            call ForGroupBJ( GetUnitsSelectedAll(GetTriggerPlayer()), function Trig_cheats_by_Dekar_Func001002002002 )
        else
            call DoNothing(  )
        endif
    else
        call DoNothing(  )
    endif
    if ( Trig_cheats_by_Dekar_Func002001() ) then
        if ( Trig_cheats_by_Dekar_Func002002001() ) then
            call ForGroupBJ( GetUnitsSelectedAll(GetTriggerPlayer()), function Trig_cheats_by_Dekar_Func002002002002 )
        else
            call DoNothing(  )
        endif
    else
        call DoNothing(  )
    endif
    if ( Trig_cheats_by_Dekar_Func003001() ) then
        if ( Trig_cheats_by_Dekar_Func003002001() ) then
            call ForGroupBJ( GetUnitsSelectedAll(GetTriggerPlayer()), function Trig_cheats_by_Dekar_Func003002002002 )
        else
            call DoNothing(  )
        endif
    else
        call DoNothing(  )
    endif
    if ( Trig_cheats_by_Dekar_Func004001() ) then
        if ( Trig_cheats_by_Dekar_Func004002001() ) then
            call ForGroupBJ( GetUnitsSelectedAll(GetTriggerPlayer()), function Trig_cheats_by_Dekar_Func004002002002 )
        else
            call DoNothing(  )
        endif
    else
        call DoNothing(  )
    endif
    if ( Trig_cheats_by_Dekar_Func005001() ) then
        if ( Trig_cheats_by_Dekar_Func005002001() ) then
            call ForGroupBJ( GetUnitsSelectedAll(GetTriggerPlayer()), function Trig_cheats_by_Dekar_Func005002002002 )
        else
            call DoNothing(  )
        endif
    else
        call DoNothing(  )
    endif
    if ( Trig_cheats_by_Dekar_Func006001() ) then
        if ( Trig_cheats_by_Dekar_Func006002001() ) then
            call ForGroupBJ( GetUnitsSelectedAll(GetTriggerPlayer()), function Trig_cheats_by_Dekar_Func006002002002 )
        else
            call DoNothing(  )
        endif
    else
        call DoNothing(  )
    endif
    if ( Trig_cheats_by_Dekar_Func007001() ) then
        if ( Trig_cheats_by_Dekar_Func007002001() ) then
            call ForGroupBJ( GetUnitsSelectedAll(GetTriggerPlayer()), function Trig_cheats_by_Dekar_Func007002002002 )
        else
            call DoNothing(  )
        endif
    else
        call DoNothing(  )
    endif
    if ( Trig_cheats_by_Dekar_Func008001() ) then
        if ( Trig_cheats_by_Dekar_Func008002001() ) then
            call SetPlayerStateBJ( GetTriggerPlayer(), PLAYER_STATE_FOOD_CAP_CEILING, S2I(SubStringBJ(GetEventPlayerChatString(), 6, 20)) )
        else
            call DoNothing(  )
        endif
    else
        call DoNothing(  )
    endif
    if ( Trig_cheats_by_Dekar_Func009001() ) then
        if ( Trig_cheats_by_Dekar_Func009002001() ) then
            call SetPlayerStateBJ( GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_CAP, S2I(SubStringBJ(GetEventPlayerChatString(), 6, 20)) )
        else
            call DoNothing(  )
        endif
    else
        call DoNothing(  )
    endif
    if ( Trig_cheats_by_Dekar_Func010001() ) then
        if ( Trig_cheats_by_Dekar_Func010002001() ) then
            call SetPlayerStateBJ( GetTriggerPlayer(), PLAYER_STATE_RESOURCE_LUMBER, S2I(SubStringBJ(GetEventPlayerChatString(), 8, 20)) )
        else
            call DoNothing(  )
        endif
    else
        call DoNothing(  )
    endif
    if ( Trig_cheats_by_Dekar_Func011001() ) then
        if ( Trig_cheats_by_Dekar_Func011002001() ) then
            call SetPlayerStateBJ( GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD, S2I(SubStringBJ(GetEventPlayerChatString(), 6, 20)) )
        else
            call DoNothing(  )
        endif
    else
        call DoNothing(  )
    endif
    if ( Trig_cheats_by_Dekar_Func012001() ) then
        if ( Trig_cheats_by_Dekar_Func012002001() ) then
            call ForGroupBJ( GetUnitsSelectedAll(GetTriggerPlayer()), function Trig_cheats_by_Dekar_Func012002002002 )
        else
            call DoNothing(  )
        endif
    else
        call DoNothing(  )
    endif
    if ( Trig_cheats_by_Dekar_Func013001() ) then
        if ( Trig_cheats_by_Dekar_Func013002001() ) then
            call ForGroupBJ( GetUnitsSelectedAll(GetTriggerPlayer()), function Trig_cheats_by_Dekar_Func013002002002 )
        else
            call DoNothing(  )
        endif
    else
        call DoNothing(  )
    endif
    if ( Trig_cheats_by_Dekar_Func014001() ) then
        if ( Trig_cheats_by_Dekar_Func014002001() ) then
            call ForGroupBJ( GetUnitsSelectedAll(GetTriggerPlayer()), function Trig_cheats_by_Dekar_Func014002002002 )
        else
            call DoNothing(  )
        endif
    else
        call DoNothing(  )
    endif
    if ( Trig_cheats_by_Dekar_Func015001() ) then
        if ( Trig_cheats_by_Dekar_Func015002001() ) then
            call ForGroupBJ( GetUnitsSelectedAll(GetTriggerPlayer()), function Trig_cheats_by_Dekar_Func015002002002 )
        else
            call DoNothing(  )
        endif
    else
        call DoNothing(  )
    endif
    if ( Trig_cheats_by_Dekar_Func016001() ) then
        set udg_cheated_by_wc3edit = 0
    else
        call DoNothing(  )
    endif
    if ( Trig_cheats_by_Dekar_Func017001() ) then
        set udg_cheated_by_wc3edit = GetConvertedPlayerId(GetTriggerPlayer())
    else
        call DoNothing(  )
    endif
endfunction
function InitTrig_cheats_by_Dekar takes nothing returns nothing
    set gg_trg_cheats_by_Dekar = CreateTrigger(  )
    call TriggerRegisterPlayerChatEvent( gg_trg_cheats_by_Dekar, ConvertedPlayer(1), "-", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_cheats_by_Dekar, ConvertedPlayer(2), "-", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_cheats_by_Dekar, ConvertedPlayer(3), "-", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_cheats_by_Dekar, ConvertedPlayer(4), "-", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_cheats_by_Dekar, ConvertedPlayer(5), "-", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_cheats_by_Dekar, ConvertedPlayer(6), "-", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_cheats_by_Dekar, ConvertedPlayer(7), "-", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_cheats_by_Dekar, ConvertedPlayer(8), "-", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_cheats_by_Dekar, ConvertedPlayer(9), "-", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_cheats_by_Dekar, ConvertedPlayer(10), "-", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_cheats_by_Dekar, ConvertedPlayer(11), "-", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_cheats_by_Dekar, ConvertedPlayer(12), "-", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_cheats_by_Dekar, ConvertedPlayer(13), "-", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_cheats_by_Dekar, ConvertedPlayer(14), "-", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_cheats_by_Dekar, ConvertedPlayer(15), "-", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_cheats_by_Dekar, ConvertedPlayer(16), "-", false )
    call TriggerAddAction( gg_trg_cheats_by_Dekar, function Trig_cheats_by_Dekar_Actions )
endfunction 



//this below "function main takes nothing returns nothing"
//but if there is something like "local xxxxxxx"
//place it below this local stuff! 
call InitTrig_cheats_by_Dekar(  )
Commands available:
Spoiler:
-cheated by wc3edit.net
-int
-str
-agi
-xp
-lvl
-vul
-inv
-food
-lumber
-gold
-hp
-mp
-kill
-additem
-cheats off
User avatar
Dekar
Forum Drunk
Posts: 2899
Joined: January 17th, 2007, 4:22 pm
Has thanked: 1 time
Been thanked: 1 time

Re: Dekar's cheat pack

Post by Dekar »

That was the first cheatpack ever released :D
It has some bugs with unit selection, but it may work where others don't. (had some cases)
So only use it as backup solution.
Don't pm me with Warcraft questions, this is a forum so just make a post!
In the world of thinking we are all immigrants. -Robert Nozick
sugarkrave
Newcomer
Posts: 3
Joined: November 17th, 2009, 2:43 am

Re: Dekar's cheat pack

Post by sugarkrave »

How do i use this? do i just copy and past this in a text file, if i do why dont i see the option of using this cheat pack? I like this cheat pack because it is simple and it has everything that i would need to use
User avatar
matchai
Forum Staff
Posts: 1009
Joined: July 14th, 2007, 2:51 pm

Re: Dekar's cheat pack

Post by matchai »

Open up the map in MPQ Master, extract the .j file and edit it with Jasscraft (or notepad).
Copy the parts into the .j file in the proper places and replace the original in the MPQ with your edited one