Graal Forums

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

GoZelda 10-05-2003 11:09 PM

New Scripting Engine Suggestions
 
Well, i got this idea mainly from JavaScript. In Javascript, you can edit objects on a website, with comments like:
NPC Code:

document.write.Hi i know Javascript
form.name.write.Me too!


Wouldn't it be very useful if this was possible with GScript too?
NPC Code:

//Statue
name=Statue
function switch(){
setgani statue_switch;
}


This is a statue that will switch when a lever is pulled
NPC Code:

//Lever
if (playertouchsme){
level.npc.Statue.switch();
}


So you have to "declare" a NPC first (else it can't be accesed from outside). So you can also destroy a NPC from outside(level.npc.--name--.destroy;) and a lot of other functions. Also, maybe tiles could be accesable, and links.
Quote:

My list of accesable objects:

level.npc
level.tile
level.link
player.head
player.body
playery.chat
player.colors
player.sword
player.shield
player.attributes
server.players
server.npcs.type
server.tiles.type


Riot-Starter 10-05-2003 11:44 PM

I would not suggest until the language is released.

Cause it might already exist in it.

Goboom 10-05-2003 11:48 PM

Someone correct me if I am wrong, but I believe a few things are either pretty much exactly like that or very very similar with the new engine.

amonrabr 10-06-2003 12:00 AM

Re: New Scripting Engine Suggestions
 
Quote:

Originally posted by GoZelda
Well, i got this idea mainly from JavaScript. In Javascript, you can edit objects on a website, with comments like:
NPC Code:

document.write.Hi i know Javascript
form.name.write.Me too!


Wouldn't it be very useful if this was possible with GScript too?
NPC Code:

//Statue
name=Statue
function switch(){
setgani statue_switch;
}


This is a statue that will switch when a lever is pulled
NPC Code:

//Lever
if (playertouchsme){
level.npc.Statue.switch();
}


So you have to "declare" a NPC first (else it can't be accesed from outside). So you can also destroy a NPC from outside(level.npc.--name--.destroy;) and a lot of other functions. Also, maybe tiles could be accesable, and links.


That will be possible in the new script engine, just wait

Python523 10-06-2003 01:09 AM

it's called OOP

GoZelda 10-06-2003 06:32 PM

Quote:

Originally posted by Python523
it's called OOP
I already thought so, but i sorta learned you don't gotta speak to fast o.o


All times are GMT +2. The time now is 07:44 AM.

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