KeyPressed issue - key.VK_SHIFT

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
Romulan
Posts: 3
Joined: Mon Feb 01, 2010 6:34 pm

KeyPressed issue - key.VK_SHIFT

#1 Post by Romulan » Mon Feb 01, 2010 6:48 pm

Ok im setting up a waypoint file to get mail from the mailbox.
When pressing the shift key and then clicking on anything you can interact with in game makes other characters not possible to click on at that time.
So here is my waypoint file

Code: Select all

<waypoints>
	<!-- #  1 --><waypoint x="-443" z="-6114">	</waypoint>
	<!-- #  2 --><waypoint x="-416" z="-5996">		
		player:keyPressed(key.VK_SHIFT);
		player:mouseclickL(950, 515, 1920, 1148);
		player:keyboardRelease( key.VK_SHIFT );
		sendMacro("ChoiceOption(1);");
		player:rest(1);
		RoMScript( "RoMail_GetAllAttachments();" );
		player:rest(10);
		inventory:update();
		loadPaths("mail2spawn");
	</waypoint>
</waypoints>
Now i get an error in relation to the first keypressed command:

[string " ..."]:2: attempt to call method 'keyPressed' (a nil value)

Any ideas?

j_schlott
Posts: 119
Joined: Tue Aug 18, 2009 11:42 pm

Re: KeyPressed issue - key.VK_SHIFT

#2 Post by j_schlott » Mon Feb 01, 2010 10:11 pm

try

Code: Select all

keyboardHold(key.VK_SHIFT);
and

Code: Select all

keyboardRelease(key.VK_SHIFT);
and you dont need the "player:" part

User avatar
Administrator
Site Admin
Posts: 5313
Joined: Sat Jan 05, 2008 4:21 pm

Re: KeyPressed issue - key.VK_SHIFT

#3 Post by Administrator » Mon Feb 01, 2010 11:42 pm

keyPressed() is not a member of player, hence, it is nil.

Romulan
Posts: 3
Joined: Mon Feb 01, 2010 6:34 pm

Re: KeyPressed issue - key.VK_SHIFT

#4 Post by Romulan » Tue Feb 02, 2010 3:56 am

Ok cool ill give it a shot :)

I thought i needed player cos i saw it infront of the mouse movement part.
Good to know for future

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 8 guests