[Orion ML] Re: A proposito di OrionScript

  • From: Simone Tellini <orion@xxxxxxxxxxxx>
  • To: orion@xxxxxxxxxxxxx
  • Date: Mon, 16 May 2005 21:23:14 +0200

On Mon, 16 May 2005 20:59:35 +0200
gen'xha <genxha@xxxxxxxxx> wrote:

g> ...non hai qualche esempio di programma (o magari una guida)?

please write in English on this mailing list.

I don't have a scripting guide yet: I hope to find some volunteers to
write one, since I really don't have the time to do it myself.

Orion scripting is based on the Zend engine, so you can take PHP as a
reference. With the scripting console you can see the list of functions
and classes already available: most of them work exactly like in PHP.

Attached you can find a simple script I wrote as a test: it contains
some functions you can assign to aliases or call manually with the /call
command (e.g. "/call testRelPath()", "/call rndSlap()")

The script also tests the event system, registering an handler for the
ACTION event (triggered when someone sends a /me). The handler just
dumps its arguments in the console and if the /me text contains the word
"ignorami" it returns false, causing Orion to drop the event.

-- 
Simone Tellini
http://tellini.info


-- 
Orion support mailing list - http://tellini.info/software/orion/
List archive: //www.freelists.org/archives/orion
Subscribe/Unsubscribe requests: <orion-request@xxxxxxxxxxxxx>

Other related posts: