Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Serverside GUI (https://forums.graalonline.com/forums/showthread.php?t=83361)

Pelikano 12-26-2008 06:49 PM

Serverside GUI
 
Well, I'm currently trying to make a "Message System", something like Era got in the right corner, where it goes like: "You picked up a rock" or stuff like that..

But I noticed that you can't create GUIs serverside, so now I am really confused and have no idea how such a "Message System" can be created oO, isn't it just a transparent GUI?

Loriel 12-26-2008 07:04 PM

You do the GUI on the client side and send the data from the server to the client.

[email protected] 12-27-2008 03:42 AM

Hmm.....

You can use strings, and set strings like ( client.messages ) clientside. Also you could use showtext() clientside and use the string.

thatdwarf 12-27-2008 06:24 AM

You could also trigger a clientside function ( triggerClient() ) with the data you are wanting to show as a parameter, whether it be multiple parameters or one parameter as an array

xXziroXx 12-27-2008 09:27 AM

Quote:

Originally Posted by thatdwarf (Post 1452685)
You could also trigger a clientside function ( triggerClient() ) with the data you are wanting to show as a parameter, whether it be multiple parameters or one parameter as an array

I'd say Zeek's suggestion is the better choise, by using an array for messages that are read and updated clientside automatically.

Crow 12-27-2008 01:22 PM

Quote:

Originally Posted by xXziroXx (Post 1452705)
I'd say Zeek's suggestion is the better choise, by using an array for messages that are read and updated clientside automatically.

This would require a constant clientside timeout to check for entries in that array though. I still prefer the triggerClient() method, and it's also what I used on Era.

Pelikano 12-27-2008 04:35 PM

triggerclient forever :D

Crow 12-27-2008 04:37 PM

Quote:

Originally Posted by Pelikano (Post 1452745)
triggerclient forever :D

Depends on what you want to achieve.

xXziroXx 12-27-2008 05:23 PM

A clientsided timeout isn't really demanding, a triggerClient check would put more strain on the server, especially during "spam hours".

Pelikano 12-27-2008 06:04 PM

but isn't a clientside timeout running ALWAYS?
and isn't that way worse oO

xXziroXx 12-27-2008 06:06 PM

Quote:

Originally Posted by Pelikano (Post 1452759)
but isn't a clientside timeout running ALWAYS?
and isn't that way worse oO

No, a timeout in itself is causing no harm, it's if you crowd it with lots of ****, and even then it wouldn't be demanding on the server at all, but rather on your own computer.

Crow 12-27-2008 07:23 PM

Quote:

Originally Posted by xXziroXx (Post 1452762)
No, a timeout in itself is causing no harm, it's if you crowd it with lots of ****, and even then it wouldn't be demanding on the server at all, but rather on your own computer.

Keep in mind clientside timeouts can cause lots of trouble with iPhone Graal though :p

Tigairius 12-27-2008 07:26 PM

Quote:

Originally Posted by Crow (Post 1452778)
Keep in mind clientside timeouts can cause lots of trouble with iPhone Graal though :p

It can cause lots of trouble for anyone, not just iphone users.

[email protected] 12-27-2008 07:27 PM

Quote:

Originally Posted by xXziroXx (Post 1452762)
No, a timeout in itself is causing no harm, it's if you crowd it with lots of ****, and even then it wouldn't be demanding on the server at all, but rather on your own computer.

Agreed, I'm pretty sure that using a timeout clientside won't be harmful. Correct me if i'm wrong but, isn't clientside scripts take less CPU time then serverside.

Chompy 12-27-2008 07:37 PM

Quote:

Originally Posted by [email protected] (Post 1452780)
Agreed, I'm pretty sure that using a timeout clientside won't be harmful. Correct me if i'm wrong but, isn't clientside scripts take less CPU time then serverside.

Clientside scripts are done on the players computer.
Serverside scripts are not :)


All times are GMT +2. The time now is 10:53 PM.

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