War2.ru Slogan
News: Back by popular demand, the SMF Arcade!!!
PLAY NOW!!!!!!!!!!!!!!!!!!!!!!!!


Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Welcome to the forums! We're glad to have you here! :) You can register your account here, then feel free to introduce yourself in the Server.War2.ru board & let us know who you are on the server.

F2 COLOR ALLY plug in. 435  3

Death Knight Posts: 3627 Karma: +144/-99 *********

Equinox

  • Death Knight
  • *********
  • *
  • Posts: 3627
    • View Profile
F2 COLOR ALLY plug in.
« on: December 15, 2019, 09:10:18 AM »
There a probleme with the F2 color ally plug in..

Everytime you press F2 it bring you back to your starting location... is that possible to keep the focus where you are?
Ogre Mage Posts: 1539 Karma: +82/-1 ********

Lambchops

  • Ogre Mage
  • ********
  • *
  • Posts: 1539
    • View Profile
Re: F2 COLOR ALLY plug in.
« Reply #1 on: December 16, 2019, 12:54:33 AM »
I think the return to start is the original game function of the F2 key.

On my system the call to GetAsyncKeyState() intercepts the F2 key before it gets to the game. If it is activating both the allied colors and the return to start then the only fix would be changing the allied colors to a different key.

You can change the activation key with a hex editor if you want.

If you edit allied_color.w2p you should find a 0x71 byte at offset 0x00000572

This is the virtual key code for the F2 key. You can replace this byte with a different code to change the key.

i.e. if you make that byte 0xC0 you will change it to the [`/~] tilde key (next to the [1] key).
Grunt Posts: 62 Karma: +0/-0 We're smarter than you. ***

Available

  • Grunt
  • ***
  • *
  • Posts: 62
  • We're smarter than you.
    • View Profile
Re: F2 COLOR ALLY plug in.
« Reply #2 on: December 16, 2019, 11:07:16 AM »
That not so easy
"tilda", "delete", "backslash" keys won't work, probably because "w2local", idk.

Here is version with "insert" key.
Ogre Mage Posts: 1539 Karma: +82/-1 ********

Lambchops

  • Ogre Mage
  • ********
  • *
  • Posts: 1539
    • View Profile
Re: F2 COLOR ALLY plug in.
« Reply #3 on: December 17, 2019, 04:11:59 AM »
That not so easy
"tilda", "delete", "backslash" keys won't work, probably because "w2local", idk.

Here is version with "insert" key.

Cool. Thanks for that :)