Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Hawe a Question, for my script! (https://forums.graalonline.com/forums/showthread.php?t=134262963)

imbavik 04-24-2011 09:39 PM

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 ? ^^

fowlplay4 04-24-2011 09:48 PM

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();

Crow 04-24-2011 09:57 PM

Quote:

Originally Posted by fowlplay4 (Post 1645307)
playerObject.showProfile();

While we're at it: are functions like this one documented anywhere? Some kind of list or anything?

fowlplay4 04-24-2011 10:05 PM

Quote:

Originally Posted by Crow (Post 1645308)
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.

imbavik 04-24-2011 10:14 PM

Quote:

Originally Posted by fowlplay4 (Post 1645307)
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 :p


All times are GMT +2. The time now is 07:40 PM.

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