Graal Forums  

Go Back   Graal Forums > Graal V6 forums > Announcements
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 07-24-2005, 07:32 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
NPCServer updates (6)

There are new versions of gserver and npcserver, they are uploaded to all machines, but might need to be restarted manually. There are a few updates for the new scripting engine:

- Fixed Switch-in-switch commands, before the switch command was eating the case label that was in front of it
- new onInitialized() event for database npcs when the server has been restarted
- You can create scriptable objects now (besides players and npcs):
this.item1 = new TStaticVar();
this.item1.join("itemfunctions");
...
this.item1.destroy();
Differences to normal objects:
- they are never copied, they are only linked - same behaviour like with GUI objects and players or npcs, if you do pl = player then pl will not recreate the player, if you access pl.account then it will actually access player.account
- they are scriptable, which means they can join classes and run scripts (think of living inventory objects)
- they are destroyed once no variable is linking to it anymore (e.g. if you do this.item1 = NULL; this is using a garbage collector system like in Java), or if you call destroy() for the object
- they can have a name, you can do this.item1 = new TStaticVar("MyFirstItem") and then also access it directly by name, e.g. MyFirstItem.subvar = 123
Reply With Quote
  #2  
Old 07-25-2005, 04:08 AM
Rick Rick is offline
PipBoy Extraordinaire!
Rick's Avatar
Join Date: Jul 2004
Location: Long Beach, California.
Posts: 831
Rick is on a distinguished road
Wahoo! Stefan added my suggestions!

This makes me very happy.
Reply With Quote
  #3  
Old 07-25-2005, 03:55 PM
Malinko Malinko is offline
Unholy Nation
Join Date: Mar 2004
Location: Massachusetts, U.S.A.
Posts: 1,782
Malinko is on a distinguished road
Send a message via AIM to Malinko
Quote:
Originally Posted by Stefan
this.item1.join("itemfunctions");
...
this.item1.destroy();
Thanks.

Quote:
Originally Posted by Rick
Wahoo! Stefan added my suggestions!

This makes me very happy.
Now you can own all playerworlds with Era.

MAYBE.
Reply With Quote
  #4  
Old 07-27-2005, 04:20 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Would it be possible to do:

new TStaticVar("Test123") {
h = 3;
}
and then use Test123.h to get 3?
I'm basing this off of the Gui Controls...
__________________
Reply With Quote
  #5  
Old 07-28-2005, 04:02 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
It seems that Aeon didn't go up after the update ...
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #6  
Old 07-28-2005, 05:21 AM
ChibiChibiLuc ChibiChibiLuc is offline
Cookie Monster. :3
Join Date: Jan 2005
Location: Nova Scotia, Canada
Posts: 111
ChibiChibiLuc is on a distinguished road
Send a message via AIM to ChibiChibiLuc Send a message via MSN to ChibiChibiLuc
I really can't see any use for this.. Can someone give me an example?

Why not just use something like whatever.huh = 3?
Unless I'm mislead on how it functions..
Reply With Quote
  #7  
Old 07-28-2005, 02:24 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
You would need to do this.h = 3
Like I said, it can join classes, then you can define public functions in the class and then you can do stuff like object.functionname(). Also it can use timeouts and such. I guess it's good for inventory systems, and for complex data.
Reply With Quote
  #8  
Old 07-28-2005, 03:37 PM
ChibiChibiLuc ChibiChibiLuc is offline
Cookie Monster. :3
Join Date: Jan 2005
Location: Nova Scotia, Canada
Posts: 111
ChibiChibiLuc is on a distinguished road
Send a message via AIM to ChibiChibiLuc Send a message via MSN to ChibiChibiLuc
Oh, sorry, I was being an idiot.

For some reason, I thought it could only hold variables.. And then I read it again and I'm like.. Wow..
Reply With Quote
  #9  
Old 07-29-2005, 03:41 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
This works fine, thanks for help.

Having its own timeout is very nice.

It would be useful if it was possible to call public functions without an object like you do with normal functions.
__________________
Reply With Quote
  #10  
Old 07-29-2005, 11:44 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
What doesn't work with those functions ?
Reply With Quote
  #11  
Old 07-30-2005, 02:31 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
When you do call a public function you have to put the weapon name before it, i'd like to be able to call it without using the weapon object:
addItem()
instead of:
weaponname.addItem()

I'd also like to be able to call functions clientside<->serverside. It would help greatly in my inventory system.
__________________
Reply With Quote
  #12  
Old 07-30-2005, 02:42 AM
Rick Rick is offline
PipBoy Extraordinaire!
Rick's Avatar
Join Date: Jul 2004
Location: Long Beach, California.
Posts: 831
Rick is on a distinguished road
Quote:
Originally Posted by Inverness
When you do call a public function you have to put the weapon name before it, i'd like to be able to call it without using the weapon object:
addItem()
instead of:
weaponname.addItem()
Why? This obfuscates your code.

Quote:
Originally Posted by Inverness
I'd also like to be able to call functions clientside<->serverside. It would help greatly in my inventory system.
While I agree, I find that using triggers is more logical. Your scripts should be designed to do as little as possible between server and client to keep network usage down.
Reply With Quote
  #13  
Old 08-02-2005, 05:02 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
Quote:
Originally Posted by Stefan
- new onInitialized() event for database npcs when the server has been restarted
Is that when the whole server restarts, or also when the NPC server is restarted?

I have in a database NPC:
NPC Code:
function onInitialized() {
echo("Test");
}




But when I restart the NPC server, it doesn't work.
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 05:38 AM.


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