so I was messing around with some npc’s and looking through the commands.rtf file that comes with the graal client and noticed that there was nothing about “mouseclick”. I could swear there was some kind of command like “if (doubleclicked)” or something. Then I also noticed that on someone else’s server pressing the “f” key caused something to happen. I see nothing in commands.rtf that tells me how to listen for key-strokes other than the standard 10: a,s,d,q,u,d,l,r,tab,etc…
So my question is, does anybody have, or know where I could find, some better documentation for npc scripting?
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):
ex. if (keydown2(keycode(z),false)
Normal Keydown numbers.
1 - M key (map)
2 - P key (pause)
4 - Q key (weapon select)
8 - R key (show ratings)
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:
enablefeatures flags;
A description of all flags:
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: