Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-24-2011, 09:39 PM
imbavik imbavik is offline
Mercia
imbavik's Avatar
Join Date: Apr 2011
Location: Norway
Posts: 23
imbavik has a little shameless behaviour in the past
Send a message via MSN to imbavik
Exclamation Hawe a Question, for my script!

Well, i try to make me a script, if you right click a player you can chose from like "Show Profile, Trade or invite to party" etc, my problem is that i dont know what the function is called when you right click a player

PHP Code:
function onActionRightMouseDown() 

 
//STUFF 
dont seems to work, can some one tell me , fast ?
Reply With Quote
  #2  
Old 04-24-2011, 09:48 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
It looks something like this:

PHP Code:
//#CLIENTSIDE
function onCreated() {
  
// disable profile feature with enablefeatures
}

function 
onMouseDown(clicktype) {
  if (
clicktype == "right") {
    
// use mousex, mousey to find a player object
    // if there is a player
      // open profile context menu
  
}

You can open a player's profile by calling:

playerObject.showProfile();
__________________
Quote:
Reply With Quote
  #3  
Old 04-24-2011, 09:57 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by fowlplay4 View Post
playerObject.showProfile();
While we're at it: are functions like this one documented anywhere? Some kind of list or anything?
__________________
Reply With Quote
  #4  
Old 04-24-2011, 10:05 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by Crow View Post
While we're at it: are functions like this one documented anywhere? Some kind of list or anything?
Run: Graal.exe -listscriptfunctions
See TServerPlayer section.

Over here too: http://wiki.graal.net/index.php/Crea.../TServerPlayer

If someone had the clients, and ran diffs on the lists between updates we'd probably find new functions a lot quicker.

It'd also be nice if there was a way to over-ride the 'Found more than 50 functions' stop in /scripthelp.
__________________
Quote:
Reply With Quote
  #5  
Old 04-24-2011, 10:14 PM
imbavik imbavik is offline
Mercia
imbavik's Avatar
Join Date: Apr 2011
Location: Norway
Posts: 23
imbavik has a little shameless behaviour in the past
Send a message via MSN to imbavik
Quote:
Originally Posted by fowlplay4 View Post
It looks something like this:

PHP Code:
//#CLIENTSIDE
function onCreated() {
  
// disable profile feature with enablefeatures
}

function 
onMouseDown(clicktype) {
  if (
clicktype == "right") {
    
// use mousex, mousey to find a player object
    // if there is a player
      // open profile context menu
  
}

You can open a player's profile by calling:

playerObject.showProfile();
Thanks, now i got it to work
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 10:09 PM.


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