Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Keydown (https://forums.graalonline.com/forums/showthread.php?t=48986)

Kappa00p2p 11-05-2003 01:49 AM

Keydown
 
Can someone tell me the numbers for keydown?

ZeLpH_MyStiK 11-05-2003 01:54 AM

There are a lot, use keycode(keyhere) and figure it out yourself. =/

Kappa00p2p 11-05-2003 01:56 AM

found some of them but i need left arrow right arrow up arrow and down arrow

8 - back
9 - tab
13 - return
16 - shift
17 - control
18 - alt
33 - page up
34 - page down
35 - end
36 - home
42 - print key
45 - insert
46 - delete
91 - left windows key
92 - right windows key
93 - mouse popup key
112-123 - F1-F12
144 - numlock
160 - left shift
161 - right shift
162 - left control
163 - right control
164 - left alt/menu
165 - right alt/menu

-Ramirez- 11-05-2003 02:10 AM

Those are for keydown2(), not keydown(). The regular keydown() is what allows you to check for arrow keys and default Graal keys, regardless of what they have them set to in the options.

The values for keydown() are:
0 - up arrow
1 - left arrow
2 - down arrow
3 - right arrow
4 - D
5 - S
6 - A
7 - M
8 - Tab
9 - Q
10 - P

Kappa00p2p 11-05-2003 02:11 AM

thanks for the correction

ZeLpH_MyStiK 11-05-2003 02:18 AM

There is one more, I believe it is keydown(10), which is P.

-Ramirez- 11-05-2003 02:29 AM

Quote:

Originally posted by ZeLpH_MyStiK
There is one more, I believe it is keydown(10), which is P.
Oops, yes, that's correct.

DarkShadows_Legend 11-05-2003 03:58 AM

crap! For weeks I was looking for the number for the delete button and now someone posts it. x.x

EsCanavi 11-05-2003 04:08 AM

those thing are in the 2002 feature txt
also the feature ....

- keydown2 is fixed, when you dont add 256,512 or 1024
(shift, control, alt) to the key number then it doesn't
return 'true' when those special keys are not pressed;
a few keycodes that can be used in keydown2 to check for
normally unaccessible keys (have not test all of them though):
8 - back
9 - tab
13 - return
16 - shift
17 - control
18 - alt
33 - page up
34 - page down
35 - end
36 - home
42 - print key
45 - insert
46 - delete
91 - left windows key
92 - right windows key
93 - mouse popup key
112-123 - F1-F12
144 - numlock
160 - left shift
161 - right shift
162 - left control
163 - right control
164 - left alt/menu
165 - right alt/menu

and feature

- scriptfunction for disabling features
enablefeatures flags;
A description of all flags:
1 - M key (map)
2 - P key (pause)
4 - Q key (weapon select)
8 - R key (show ratings)
0x10 - S+A key combination for dropping items
0x20 - S+D key combination for switching weapons
0x40 - TAB key (if disabled then you cannot switch to the chat field with TAB)
0x80 - display of chat text
0x100 - display of the hearts over player heads
0x200 - display of nicknames
0x400 - toall/PM-icons on the minimap
0x800 - right-click on players opens their profile
0x1000 - emoticons (disable it if you want to do other stuff with control+keys)
0x2000 - Alt+5 for making snapshots
0x4000 - Alt+8/9 for zooming
0x8000 - the logframe where savelog stuff is added
allfeatures:
So to disable the profile click you can do:

enablefeatures allfeatures-0x800;

CheeToS2 11-05-2003 04:45 AM

Quote:

Originally posted by DarkShadows_Legend
crap! For weeks I was looking for the number for the delete button and now someone posts it. x.x
//#CLIENTSIDE
if (keypressed){
setcharprop #c,#p(0) #p(1);
}

-Ramirez- 11-05-2003 05:20 AM

Quote:

Originally posted by CheeToS2


//#CLIENTSIDE
if (keypressed){
setcharprop #c,#p(0) #p(1);
}

Ugh, chat text replacers. Message; is so much nicer.

Kaimetsu 11-05-2003 05:30 AM

Quote:

Originally posted by -Ramirez-

Ugh, chat text replacers. Message; is so much nicer.

Not in this situation. It means the user can see the text wherever he is, and it's not like it's going to replace anything if he's playing offline.

-Ramirez- 11-05-2003 05:43 AM

Quote:

Originally posted by Kaimetsu
Not in this situation. It means the user can see the text wherever he is, and it's not like it's going to replace anything if he's playing offline.
I guess I should have worded it differently. I was merely stating my opinion, not trying to get him to change what he was doing. I have always hated scripts that put things in your chat text.

Kaimetsu 11-05-2003 05:56 AM

Quote:

Originally posted by -Ramirez-
I guess I should have worded it differently. I was merely stating my opinion, not trying to get him to change what he was doing. I have always hated scripts that put things in your chat text.
*shrugs*

S'your prerogative. I just think the player.chat method is more practical in this case.

-Ramirez- 11-05-2003 06:10 AM

Quote:

Originally posted by Kaimetsu
*shrugs*

S'your prerogative. I just think the player.chat method is more practical in this case.

New engine torturer! :(


All times are GMT +2. The time now is 06:17 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.