Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   New Command Requests (https://forums.graalonline.com/forums/showthread.php?t=60709)

Maniaman 08-26-2005 02:05 AM

New Command Requests
 
I would like to have a couple new commands for the new engine.

A time(timezone) function. This would return the current time at the given timezone. If no timezone is supplied, it could just return the current server time.

Also, I would like to have a way to get the entire serverlist, not just the ones on Gold, 3D, Classic and Hosted tabs.

ForgottenLegacy 08-26-2005 04:09 AM

With a good use of timevar, a person can make a script like that o-o I've seen one made.

Maniaman 08-26-2005 04:34 AM

Only problem is, with timevar2 you would need to factor in months have 31 days opposed to 30, and you have to factor in leap years.

ForgottenLegacy 08-26-2005 05:00 AM

Yen: There's a timestamp function. We're both not sure how to use it, try %t or something? Not sure.

calani 08-27-2005 05:39 AM

You could always use the julian calendar.


Anyways, new staticvars/commands that would be very handy:
* currentserver = string (read only) // returns the current server name
* string=type_check(var) // returns "string" "int" "float" "array" etc
* playergold = bool (read only) // set if the player has gold or not
* playervip = bool (read only) // set if the player is vip or not
* ability to trigger an event on a separate server (triggeraction from babylon to npulse, for example. could be useful for coordinating events and suchlike, or a cross-server sparring tournament)
* ability to retreive data from a separate server (babylon getting a var or player position from npulse)
* for images: ability to set if they are global or client (allow more than 200 global indexes per npc)
* ability to make emitters global as well
* more than one timer (ability to create separate timers and per-timer timeout events instead of only having one built-in event)
* ability to check to see if an image was clicked on (not just in the bounds of the image.. actually per-pixel checking. think: round buttons)
* ability for DBs to trigger the clientside of a weapon, etc
* ability to rotate text (both showimg@@@ and showtext)


new gui controls that would be very handy:
* a pop-up window that does not take focus (in-line command listing like in MSVB)
* a transparent container
* push buttons (similar to radio buttons, but more button-like)

useful additions to gui controls:
* word left / word right (ctrl+left/right) in text boxes. same with selecting text (ctrl+shift+left/right)
* large undo stack (256 or so undos)
* ability to add hotkeys (if this isn't already implemented)


more to come when I think of them.

ForgottenLegacy 08-27-2005 06:24 AM

Quote:

Originally Posted by calani
* currentserver = string (read only) // returns the current server name

Quote:

Originally Posted by scriptfunctions_client.txt
PHP Code:

servername string (read only


Quote:

Originally Posted by calani
* string=type_check(var) // returns "string" "int" "float" "array" etc

Quote:

Originally Posted by docu_graalscript.doc
PHP Code:

obj.type()  - gets the type of the var (float 0string 1object 2, array 3


Quote:

Originally Posted by calani
* more than one timer (ability to create separate timers and per-timer timeout events instead of only having one built-in event)

Vars work too with a .05 timeout o_O Have a var with an MOD or something. I use it to have an event happen every one second inside a .05 timeout.
Quote:

Originally Posted by calani
* ability for DBs to trigger the clientside of a weapon, etc

PHP Code:

findplayer(account).triggeraction(0,0,"clientside",weaponname,params...); 


<3! :D

calani 08-27-2005 06:27 AM

Shows how much time I've had to play with gs2 >_<

Ajira 08-27-2005 06:50 AM

Quote:

Originally Posted by ForgottenLegacy
PHP Code:

findplayer(account).triggeraction(0,0,"clientside",weaponname,params...); 


PHP Code:

findPlayer(account).triggerclient("gui""weaponname""params"); 

=)

calani 08-27-2005 08:33 AM

Quote:

Originally Posted by Ajira
Poont.

^^


Another thing to add:
* the ability to rotate text (showimg@@@ and showtext)

(also added to my original post)

Ajira 08-27-2005 03:24 PM

Quote:

Originally Posted by calani
^^


Another thing to add:
* the ability to rotate text (showimg@@@ and showtext)

(also added to my original post)

findimg(index).rotation = angle;
I forgot if this was in radians or degrees, though I'm leaning toward radians. Use the degtorad() function to convert.

calani 08-27-2005 09:00 PM

Quote:

Originally Posted by Ajira
findimg(index).rotation = angle;
I forgot if this was in radians or degrees, though I'm leaning toward radians. Use the degtorad() function to convert.

doesn't work for text.

Python523 08-27-2005 09:07 PM

Quote:

Originally Posted by calani
doesn't work for text.

you sure...? it should

calani 08-27-2005 09:20 PM

Doesn't work for me. o.o

PHP Code:

//#CLIENTSIDE
function onCreated() {
  
showtext(1,300,200,0,0,"Hello World");
  
showimg(2,"@Arial@@Hello World",300,300);
  
changeimgvis(1,4);
  
changeimgvis(2,4);
  
findimg(1).rotation=pi/2;
  
findimg(2).rotation=pi/2;



( now watch this post get deleted -.- )

xAndrewx 08-27-2005 10:07 PM

I wouldn't mind the gold/vip either.

ForgottenLegacy 08-28-2005 02:18 AM

Quote:

Originally Posted by calani
( now watch this post get deleted -.- )

Lancelot won't delete it as long as it's not a whole script to help someone o-o. You're asking for help, so you post teh buggy script. Perfectly allowed. :D

And yeah, rotateimg does not work for text, either showimg@@@ or showtext. z-z Someone correct this problem...?

calani 08-29-2005 03:37 AM

Quote:

Originally Posted by ForgottenLegacy
so you post teh buggy script. Perfectly allowed. :D

my scripts for this. and thiso. vars also did not work - they demonstrated the difference between then and what they were used for, and it was also deleted for rule #2.


All times are GMT +2. The time now is 05:52 AM.

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