Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-20-2005, 11:18 PM
Aethorpe Aethorpe is offline
Their black hands protect
Aethorpe's Avatar
Join Date: Dec 2004
Location: Beyond infinite.
Posts: 265
Aethorpe is on a distinguished road
Send a message via AIM to Aethorpe Send a message via MSN to Aethorpe
keydown?

Does anyone know the keycodes for keydown, and/or a better way to find them? :x
__________________
Reply With Quote
  #2  
Old 02-21-2005, 01:28 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by Aethorpe
Does anyone know the keycodes for keydown, and/or a better way to find them? :x
commands.rtf
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #3  
Old 02-21-2005, 01:47 AM
Aethorpe Aethorpe is offline
Their black hands protect
Aethorpe's Avatar
Join Date: Dec 2004
Location: Beyond infinite.
Posts: 265
Aethorpe is on a distinguished road
Send a message via AIM to Aethorpe Send a message via MSN to Aethorpe
Quote:
Originally Posted by ApothiX
commands.rtf
I am talking about using any key from the keyboard, not just default commands, like A,S,D,Q,M,Tab, etc.
__________________
Reply With Quote
  #4  
Old 02-21-2005, 02:19 AM
Spiker Spiker is offline
I n t e l l i g e n c e
Spiker's Avatar
Join Date: Jan 2005
Location: Wisconsin
Posts: 517
Spiker has a spectacular aura aboutSpiker has a spectacular aura about
well all you have to do is click in the space to the right of thing you want to have on hot key and type a letter, a letter should show up in the space to the right.
Reply With Quote
  #5  
Old 02-21-2005, 05:28 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by Aethorpe
I am talking about using any key from the keyboard, not just default commands, like A,S,D,Q,M,Tab, etc.
Then this thread should be named 'keydown2?'

PHP Code:
if(keypressed) {
  
setplayerprop #c,#p(0) pressed.;

or if you want ones that don't work with keypressed,

PHP Code:
if(timeout) {
  for(
i=0;i<255;i++) {
    if(
keydown2(ifalse)) {
      
setplayerprop #c,#v(i) pressed.;
    
}
  }

__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #6  
Old 02-21-2005, 06:09 AM
Aethorpe Aethorpe is offline
Their black hands protect
Aethorpe's Avatar
Join Date: Dec 2004
Location: Beyond infinite.
Posts: 265
Aethorpe is on a distinguished road
Send a message via AIM to Aethorpe Send a message via MSN to Aethorpe
Quote:
Originally Posted by Spiker
well all you have to do is click in the space to the right of thing you want to have on hot key and type a letter, a letter should show up in the space to the right.
Nice try, but I fear you have no idea what we are talking about here. >.>
__________________
Reply With Quote
  #7  
Old 02-21-2005, 06:12 AM
Aethorpe Aethorpe is offline
Their black hands protect
Aethorpe's Avatar
Join Date: Dec 2004
Location: Beyond infinite.
Posts: 265
Aethorpe is on a distinguished road
Send a message via AIM to Aethorpe Send a message via MSN to Aethorpe
Quote:
Originally Posted by ApothiX
Then this thread should be named 'keydown2?'

PHP Code:
if(keypressed) {
  
setplayerprop #c,#p(0) pressed.;

or if you want ones that don't work with keypressed,

PHP Code:
if(timeout) {
  for(
i=0;i<255;i++) {
    if(
keydown2(ifalse)) {
      
setplayerprop #c,#v(i) pressed.;
    
}
  }

Well, I appreciate the help, or would be help, had I any idea how that actually works.
__________________
Reply With Quote
  #8  
Old 02-21-2005, 06:12 AM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
NPC Code:

if (keypressed&&strequals(#p(0),key you want)) {
//script
}


There.
__________________
BEst Insult ever: If I had a dollar for every brain you DIDNT have, i'd have one dollar!
Reply With Quote
  #9  
Old 02-21-2005, 06:21 AM
Aethorpe Aethorpe is offline
Their black hands protect
Aethorpe's Avatar
Join Date: Dec 2004
Location: Beyond infinite.
Posts: 265
Aethorpe is on a distinguished road
Send a message via AIM to Aethorpe Send a message via MSN to Aethorpe
Quote:
Originally Posted by falco10291029
NPC Code:

if (keypressed&&strequals(#p(0),key you want)) {
//script
}


There.
Strangely, it's not working. >.>

NPC Code:
if (keypressed&&strequals(#p(0),k)) {

say2 working;

}



Is this correct? :x
__________________
Reply With Quote
  #10  
Old 02-21-2005, 06:26 AM
Ajira Ajira is offline
Poont.
Join Date: Oct 2004
Location: NY, USA
Posts: 477
Ajira is on a distinguished road
Quote:
Originally Posted by falco10291029
NPC Code:

if (keypressed&&strequals(#p(0),key you want)) {
//script
}


There.
=/
#p(0) is the actual keycode, whereas #p(1) is the actual character.
__________________
Liek omigosh.

Reply With Quote
  #11  
Old 02-21-2005, 07:22 AM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
OH yes, Im used to my brother using the pointless
NPC Code:

if (keypressed&&keydown2(#p(0),)) {
//stuff
}


so you would need it to be:
NPC Code:

if (keypressed&&strequals(#p(1),k)) {

say2 working;

}

__________________
BEst Insult ever: If I had a dollar for every brain you DIDNT have, i'd have one dollar!
Reply With Quote
  #12  
Old 02-21-2005, 02:32 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by Aethorpe
Well, I appreciate the help, or would be help, had I any idea how that actually works.
Put that in a script, and begin pressing buttons on your keyboard..
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #13  
Old 02-21-2005, 08:25 PM
Dach Dach is offline
call me Chad, it's cooler
Dach's Avatar
Join Date: Aug 2002
Posts: 1,899
Dach is on a distinguished road
Quote:
Originally Posted by my commands.rtf
Key Numbers
8 back
9 tab (does not work with keypressed)
13 return
16 shift (does not work with keypressed)
17 control (does not work with keypressed)
18 alt (does not work with keypressed)
33 page up (does not work with keypressed)
34 page down (does not work with keypressed)
35 end (does not work with keypressed)
36 home (does not work with keypressed)
42 print key (does not work with keypressed)
45 insert (does not work with keypressed)
46 delete (does not work with keypressed)
91 left windows key (does not work with keypressed)
92 right windows key (does not work with keypressed)
93 mouse popup key (does not work with keypressed)
112-123 F1-F12 (does not work with keypressed)
144 numlock (does not work with keypressed)
160 left shift (does not work with keypressed)
161 right shift (does not work with keypressed)
162 left control (does not work with keypressed)
163 right control (does not work with keypressed)
164 left alt/menu (does not work with keypressed)
165 right alt/menu (does not work with keypressed)
the shameless plug wasn't necessarily intentional
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote
  #14  
Old 02-21-2005, 10:23 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by Dach
the shameless plug wasn't necessarily intentional
? I already directed him to commands.rtf in a previous post. Actually quoting commands.rtf was unnessisary.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #15  
Old 02-21-2005, 10:35 PM
Malinko Malinko is offline
Unholy Nation
Join Date: Mar 2004
Location: Massachusetts, U.S.A.
Posts: 1,782
Malinko is on a distinguished road
Send a message via AIM to Malinko
Don't forget your good friends of newfeatures.txt!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 11:27 AM.


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