Multi Hotkey teleport

Posts 1–6 of 6 · Page 1 of 1
Multi Hotkey teleport
i have a problem with a teleport hack in warrock.

I try to make a hotkey for the teleport. I can make like Numpad1 saves the cords and numpad 2 goto the cords
But i try to make like this:
if i hold Shift + the numpad number it saves to the number
and then i onyl press the numpad nr i get to cords from the shift + the numpadnr.

Example:
i save the cord by pressing the Shift + Numpad 1
then i only press numpad 1 and go to the cords of Shift + numpad 1

heres my code:
Code:
Fo the save code i have:
if (GetAsyncKeyState(VK_SHIFT + VK_NUMPAD1))
		{
			the code for save the XYZ
		}

And the GOTO code is:
if (GetAsyncKeyState(VK_NUMPAD1))	
		{
			the code for get the cords of saved cords.
		}
it works to teleport but if the save dont work i only get to the edge of map like if you not put any cord, but i have press shift + numpad nr
It might have something to do with your keyboard. when u hit shift+numpad one u want the keyboard to send a shift command plus + #1 command. But wat it actually sends is:
Shift + !

Because Shift+1 = ! your keyboard never sends the one command.... So it reads shift + ! and a coord is never saved. See what I mean?

Tell me if Im wrong, but I think this might be the issue. If you changed the command to Control + 1 it might work.
The problem is GetAsyncKeyState(VK_SHIFT+VK_NUMPAD1 ) is wrong and so is GetAsyncKeystate(VK_NUMPAD1)

You have to use it in this format:
Code:
if(GetAsyncKeyState(VK_SHIFT)&1){
        if(GetAsyncKeyState(VK_NUMPAD1)&1){
              save s y z
     }
}

if(GetAsyncKeyState(VK_NUMPAD1)&1){
        teleport
}
Why06 it dosent read the exclamination mark...besides its the numpad shift + numpad dosent do anything
Quote Originally Posted by zhaoyun333 View Post
The problem is GetAsyncKeyState(VK_SHIFT+VK_NUMPAD1 ) is wrong and so is GetAsyncKeystate(VK_NUMPAD1)

You have to use it in this format:
Code:
if(GetAsyncKeyState(VK_SHIFT)&1){
        if(GetAsyncKeyState(VK_NUMPAD1)&1){
              save s y z
     }
}

if(GetAsyncKeyState(VK_NUMPAD1)&1){
        teleport
}
Why06 it dosent read the exclamination mark...besides its the numpad shift + numpad dosent do anything

oh i good idea i test it now i diden´t realise that i could use 2 if stats ^^
Quote Originally Posted by zhaoyun333 View Post
You have to use it in this format:
Code:
if(GetAsyncKeyState(VK_SHIFT)&1){
        if(GetAsyncKeyState(VK_NUMPAD1)&1){
              save x y z
     }
}

if(GetAsyncKeyState(VK_NUMPAD1)&1){
        teleport
}
Why06 it dosent read the exclamination mark...besides its the numpad shift + numpad dosent do anything
Oh....... So that's how that works. I wasn't sure what the right format was. thx zhaoyun333. Think I'll just keep my mouth shut for now unless I know 100% wat I'm talking about, as wild guesses just add to the confusion.
If that doesn't work try:

Code:
if(GetAsyncKeyState(VK_SHIFT)&1 && GetAsyncKeyState(VK_NUMPAD1)&1)
{
 save x y z
}

if(GetAsyncKeyState(VK_NUMPAD1)&1)
{
        teleport
}
Posts 1–6 of 6 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

Talk with us