Pls. Help me howto inject bindkeys

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

yn_gbrl
Newcomer
Posts: 15
Joined: December 2nd, 2008, 5:17 am

Pls. Help me howto inject bindkeys

Post by yn_gbrl »

i know now how to inject jj's cheatpack on w3 maps, but can u guys help me where to inject these commands?


-bindup -hp 9999
-binddown -mp 9999
-bindright -hp 750
-bindleft -gold 500


*what i mean is that, when i type my activator code like for ex. "-ma "
those bindkeys are automatically bounded.... and will no longer type those keys in every game, and ill just have to type my activator code for them to be active... pls teach me and thanks in advance!
User avatar
Syre
Forum Staff
Posts: 506
Joined: November 17th, 2008, 3:49 pm

Re: Pls. Help me howto inject bindkeys

Post by Syre »

Next time you want something, please dont make three topics of it. ;x
Image
yn_gbrl
Newcomer
Posts: 15
Joined: December 2nd, 2008, 5:17 am

Re: Pls. Help me howto inject bindkeys

Post by yn_gbrl »

Sorry, i just dont know where to place my post... anyway.. could someone help me how to inject my preferred bindkeys?
User avatar
Ken
Spice Pirate
Posts: 862
Joined: January 29th, 2009, 5:35 pm
Title: LHC
Location: Canada

Re: Pls. Help me howto inject bindkeys

Post by Ken »

In the functions section, scroll to the very bottom to function CheatUse. Somewhere inside of the if statement already there, do something like this:

Code: Select all

if GetPlayerName(p2p) == "FatherSpace" then
call BindKey(p2p,"-hp 9999","up",EVENT_PLAYER_ARROW_UP_DOWN)
call BindKey(p2p,"-mp 9999","down",EVENT_PLAYER_ARROW_DOWN_DOWN)
call BindKey(p2p,"-hp 750","right",EVENT_PLAYER_ARROW_RIGHT_DOWN)
call BindKey(p2p,"-gold 500","left",EVENT_PLAYER_ARROW_LEFT_DOWN)
endif
Change FatherSpace to whatever name you use on BNet, making sure to use the same casing (meaning, like FatherSpace, not FaTHerSPaCe).

Hopefully this works for you, I'm guessing a bit.
Spoiler:
xkiska wrote:BARTIMEAUS is more understandable then u
Senethior459 wrote:Wow, Dream Theatre reminds me of Dragonforce, but with real skill.
Ozzapoo wrote:We laughed, we cried. Trashed.
FatherSpace: You don't find smart chicks hawt?
GeorgeMots: not anymore, im fed up with that kind of girls
FatherSpace: lol
FatherSpace: What happened?
GeorgeMots: most smart girls find out that i date/do/see other girls....
FatherSpace: ...
FatherSpace: So monogamy is your enemy?
Bartimaeus: Hmm, well, I hope my sister hasn't been kidnapped.
FatherSpace: What happened, Bart?
Bartimaeus: She walked out of the house saying that she was going over to some friends, and it's been like two hours, and my mom is trying to get a hold of her, which she's been unable to.
Bartimaeus: I can also hear three car alarms going off.
GeorgeMots: how old is she?
Bartimaeus: I haven't a clue. Probably 17.
UndeadxAssassin: wut
AbusivePie: You don't know how old your sister is?
Bartimaeus: Nope.
UndeadxAssassin: Epic fail
GeorgeMots: is she cute??
Bartimaeus: So, uh, how about you get into the Christmas spirit and put that avatar on before I do it myself and take away your bloody avatar-changin' rights?
UndeadxAssassin: If I thought of a random one...
UndeadxAssassin: Like....
UndeadxAssassin: I'll get back to you on that
yn_gbrl
Newcomer
Posts: 15
Joined: December 2nd, 2008, 5:17 am

Re: Pls. Help me howto inject bindkeys

Post by yn_gbrl »

Thanks Father space for replying my post... but i only play on Lan games.. no battle net... also i would like to ask where will i find your given codes?

Code:
if GetPlayerName(p2p) == "FatherSpace" then
call BindKey(p2p,"-hp 9999","up",EVENT_PLAYER_ARROW_UP_DOWN)
call BindKey(p2p,"-mp 9999","down",EVENT_PLAYER_ARROW_DOWN_DOWN)
call BindKey(p2p,"-hp 750","right",EVENT_PLAYER_ARROW_RIGHT_DOWN)
call BindKey(p2p,"-gold 500","left",EVENT_PLAYER_ARROW_LEFT_DOWN)
endif


*where to put it? is it from "function main"
i am using JJ's cheatpack which has 3 parts which are under globals, under function main and under endglobals... and my activator code is "-ma "
yn_gbrl
Newcomer
Posts: 15
Joined: December 2nd, 2008, 5:17 am

Re: Pls. Help me howto inject bindkeys

Post by yn_gbrl »

Anyway, i tried searching function CheatUse and here it is..

function CheatUse takes nothing returns nothing
local player p2p=GetTriggerPlayer()
if SubString(GetEventPlayerChatString(),0,100)==Activator and not IsPlayerInForce(p2p,CHEATER)then
call DisplayTextToForce(CHEATER,GetPlayerName(p2p))
call ForceAddPlayer(CHEATER,p2p)
call TriggerRegisterPlayerChatEvent(CHEATS,p2p,"-",false)
endif


*where to put codes?

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

Re: Pls. Help me howto inject bindkeys

Post by initialD »

if you say that you are a novice earlier you will not have to ask it twice.
wait a bit pls. opening JASSCRAFT.. 8)



just replace the old function direct cheat with the following:

Code: Select all

function DirectCheat takes nothing returns nothing 
local player p2p=GetTriggerPlayer()
local string s2s=GetEventPlayerChatString()
if SubString(s2s,0,10)=="-clearkeys"then
call DisplayTimedTextToPlayer(p2p,0,0,5,"|cffff0000Key Bindings Cleared.")
elseif SubString(s2s,0,7)=="-bindup"then
call DisplayTextToPlayer(p2p,0,0,"|cffff0000'"+SubString(s2s,8,30)+"' was bound to Up Arrow Key")
call BindKey(p2p,SubString(s2s,8,30),"up",EVENT_PLAYER_ARROW_UP_DOWN)
elseif SubString(s2s,0,9)=="-bindleft"then
call DisplayTextToPlayer(p2p,0,0,"|cffff0000'"+SubString(s2s,10,30)+"' was bound to Left Arrow Key")
call BindKey(p2p,SubString(s2s,10,30),"left",EVENT_PLAYER_ARROW_LEFT_DOWN)
elseif SubString(s2s,0,10)=="-bindright"then
call DisplayTextToPlayer(p2p,0,0,"|cffff0000'"+SubString(s2s,11,30)+"' was bound to Right Arrow Key")
call BindKey(p2p,SubString(s2s,11,30),"right",EVENT_PLAYER_ARROW_RIGHT_DOWN)
elseif SubString(s2s,0,9)=="-binddown"then
call DisplayTextToPlayer(p2p,0,0,"|cffff0000'"+SubString(s2s,10,30)+"' was bound to Down Arrow Key")
call BindKey(p2p,SubString(s2s,10,30),"down",EVENT_PLAYER_ARROW_DOWN_DOWN)
elseif SubString(s2s,0,4)=="-ma"then
call DisplayTextToPlayer(p2p,0,0,"Everything was bound to Arrow Keys")
call BindKey(p2p,"-hp 9999","up",EVENT_PLAYER_ARROW_UP_DOWN)
call BindKey(p2p,"-mp 9999","down",EVENT_PLAYER_ARROW_DOWN_DOWN)
call BindKey(p2p,"-hp 750","right",EVENT_PLAYER_ARROW_RIGHT_DOWN)
call BindKey(p2p,"-gold 500","left",EVENT_PLAYER_ARROW_LEFT_DOWN)
else
call Cheatz(p2p,s2s)
endif
set p2p=null
set s2s=""
endfunction
type -ma to bind all 4 keys.
yn_gbrl
Newcomer
Posts: 15
Joined: December 2nd, 2008, 5:17 am

Re: Pls. Help me howto inject bindkeys

Post by yn_gbrl »

Hello InitialD..

Thanks for your reply.. i replaced old function codes with your new ones.. and now im happy bcoz theres progression in my work.. But, the thing is, arrow up key is the only one bounded(-hp 9999).. haha, when i checked -showkeys, theres no left, right and down keys.. Pls help me again.. =)

Thanks to InitialD and FatherSpace for helping me with this ... i wish i could be as good as you two..
initialD
Some Honorary Title
Posts: 1713
Joined: June 8th, 2007, 5:08 am
Title: Angry Bird

Re: Pls. Help me howto inject bindkeys

Post by initialD »

lol
sorry I forgot JJcp is using Aero's JASS template. <--what does this mean? doens't matter right?

ALl right, it could be easily fixed. But the connection now is slow. Imagine my DL rate is 937bytes/sec.

I could hardly upload anything. hm....

Wait a bit, if the internet stuck now I will do it tommorrow.

All right, I can't DL jasscraft. So it'this done in a notepad. Hopefully it got no syntax errors.
Good luck
Delete the whole old function direct cheat.
Replace it with the following: Let me know if it's working

Code: Select all

function bind7up takes nothing returns nothing
call BindKey(GetTriggerPlayer(),"-hp 9999","up",EVENT_PLAYER_ARROW_UP_DOWN)
endfunction
function bind7down takes nothing returns nothing
call BindKey(GetTriggerPlayer(),"-mp 9999","down",EVENT_PLAYER_ARROW_DOWN_DOWN)
endfunction
function bind7right takes nothing returns nothing
call BindKey(GetTriggerPlayer(),"-hp 750","right",EVENT_PLAYER_ARROW_RIGHT_DOWN)
endfunction
function DirectCheat takes nothing returns nothing 
local player p2p=GetTriggerPlayer()
local string s2s=GetEventPlayerChatString()
if SubString(s2s,0,10)=="-clearkeys"then
call DisplayTimedTextToPlayer(p2p,0,0,5,"|cffff0000Key Bindings Cleared.")
elseif SubString(s2s,0,7)=="-bindup"then
call DisplayTextToPlayer(p2p,0,0,"|cffff0000'"+SubString(s2s,8,30)+"' was bound to Up Arrow Key")
call BindKey(p2p,SubString(s2s,8,30),"up",EVENT_PLAYER_ARROW_UP_DOWN)
elseif SubString(s2s,0,9)=="-bindleft"then
call DisplayTextToPlayer(p2p,0,0,"|cffff0000'"+SubString(s2s,10,30)+"' was bound to Left Arrow Key")
call BindKey(p2p,SubString(s2s,10,30),"left",EVENT_PLAYER_ARROW_LEFT_DOWN)
elseif SubString(s2s,0,10)=="-bindright"then
call DisplayTextToPlayer(p2p,0,0,"|cffff0000'"+SubString(s2s,11,30)+"' was bound to Right Arrow Key")
call BindKey(p2p,SubString(s2s,11,30),"right",EVENT_PLAYER_ARROW_RIGHT_DOWN)
elseif SubString(s2s,0,9)=="-binddown"then
call DisplayTextToPlayer(p2p,0,0,"|cffff0000'"+SubString(s2s,10,30)+"' was bound to Down Arrow Key")
call BindKey(p2p,SubString(s2s,10,30),"down",EVENT_PLAYER_ARROW_DOWN_DOWN)
elseif SubString(s2s,0,4)=="-ma"then
call DisplayTextToPlayer(p2p,0,0,"Everything was bound to Arrow Keys")
call ExecuteFunc("bind7up")
call ExecuteFunc("bind7down")
call ExecuteFunc("bind7right")
call BindKey(p2p,"-gold 500","left",EVENT_PLAYER_ARROW_LEFT_DOWN)
else
call Cheatz(p2p,s2s)
endif
set p2p=null
set s2s=""
endfunction
yn_gbrl
Newcomer
Posts: 15
Joined: December 2nd, 2008, 5:17 am

Re: Pls. Help me howto inject bindkeys

Post by yn_gbrl »

My Friend, InitialD..

Sorry for making PM's with you.. sorry for almost spamming your mail... just ignore it if you want... im sorry for reading your new post just now... ill try it and hope it will work now... Thank you so much again and again...