Page 1 of 1
[CC] Zombie Invasion (v6.5)
Posted: April 14th, 2020, 6:13 pm
by wc3customlover
Map Name: Zombie Invasion (v6.5)
Map Link:
https://www.epicwar.com/maps/289785/Request: I would like you to add custom command ( +500 wood when press "/" ).
Thanks in advance to anyone who could do this!
Re: [CC] Zombie Invasion (v6.5)
Posted: April 14th, 2020, 10:39 pm
by owner123
Why do you want this specifically added rather than just a cheatpack which can do the same thing?
Re: [CC] Zombie Invasion (v6.5)
Posted: April 14th, 2020, 11:17 pm
by nuzamacuxe
People want to hide they are cheating. That's really funny.
Re: [CC] Zombie Invasion (v6.5)
Posted: April 15th, 2020, 12:15 am
by owner123
This is much less hidden than an ordinary cheatpack. Someone could accidentally press the key and gain lumber.
Re: [CC] Zombie Invasion (v6.5)
Posted: April 15th, 2020, 12:26 am
by nuzamacuxe
Indeed. I would say the same to ppl who ask for arrow keybinding.
Re: [CC] Zombie Invasion (v6.5)
Posted: April 15th, 2020, 2:47 pm
by owner123
Even though I'm pretty sure you don't want this, I added the CC.
Btw we can't make a "key pressed" event for "/" so I made it a chat event instead.
Type "/" to get 500 lumber.
Tested/working on 1.30
BTW the map is already cheated with JJCP with name activators:
Code: Select all
if GetPlayerName(Player(zzz))=="Xirizo" then
if GetPlayerName(Player(zzz))=="xirizo" then
if GetPlayerName(Player(zzz))=="|c0096FF96Weed" then
if GetPlayerName(Player(zzz))=="grimgrents" then
if GetPlayerName(Player(zzz))=="Indyklaus" then
So if you see any of these people ingame, know that they are cheating
To add this CC, I merged the following JASS code with the map code:
Re: [CC] Zombie Invasion (v6.5)
Posted: April 15th, 2020, 6:52 pm
by wc3customlover
That works too, thank you!
I just needed extra lumber haha, thought it was more troublesome to add the whole cheatpack.
Re: [CC] Zombie Invasion (v6.5)
Posted: April 15th, 2020, 11:07 pm
by nuzamacuxe
It's possible.
Code: Select all
function OskeyEvent takes trigger Trig, code Act returns trigger
local integer index = 0
loop
call BlzTriggerRegisterPlayerKeyEvent( Trig, Player( index ), OSKEY_DIVIDE, 0, true )
call BlzTriggerRegisterPlayerKeyEvent( Trig, Player( index ), OSKEY_OEM_2, 0, true )
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
if Act != null then
call TriggerAddAction( Trig, Act )
endif
return Trig
endfunction
function OskeyAct takes nothing returns nothing
if BlzGetTriggerPlayerKey( ) == OSKEY_DIVIDE or BlzGetTriggerPlayerKey( ) == OSKEY_OEM_2 then
call SetPlayerState( GetTriggerPlayer( ), PLAYER_STATE_RESOURCE_LUMBER, GetPlayerState( GetTriggerPlayer( ), PLAYER_STATE_RESOURCE_LUMBER ) + 500 )
endif
endfunction
function Oskey_Init takes nothing returns nothing
call OskeyEvent( CreateTrigger( ), function OskeyAct )
endfunction
function main takes nothing returns nothing
call Oskey_Init()
endfunction
That'll work only in 1.31.1 though.