Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #61  
Old 12-12-2008, 09:33 PM
thatdwarf thatdwarf is offline
Former UN Dev Admin
Join Date: Nov 2005
Posts: 42
thatdwarf is on a distinguished road
Client/Server variable passing

Basically I am just curious as to if there is an easier way to do:

PHP Code:
function onActionServerSide() {
  if(
params[0] == "save") {
    
findplayer(params[1]).clientr.var = params[2];
  }
}

//#CLIENTSIDE
function onSomeEvent() {
  
triggerServer("gui"this.name"save"player.accountsomevalue);

Sorry it's such a short post.
Thanks!
Reply With Quote
  #62  
Old 12-12-2008, 09:44 PM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
Quote:
Originally Posted by thatdwarf View Post
Basically I am just curious as to if there is an easier way to do
Afraid not.
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #63  
Old 12-12-2008, 09:58 PM
LoneAngelIbesu LoneAngelIbesu is offline
master of infinite loops
LoneAngelIbesu's Avatar
Join Date: May 2007
Location: Toldeo, Ohio
Posts: 1,049
LoneAngelIbesu has a spectacular aura aboutLoneAngelIbesu has a spectacular aura about
Send a message via AIM to LoneAngelIbesu
Quote:
Originally Posted by thatdwarf View Post
Basically I am just curious as to if there is an easier way to do:
There's a way to write it as:
PHP Code:
function onCreated() {
  
// Not needed if you don't plan on triggering a clientside function
  
join("triggerclass");
}
function 
someOtherFunction(acctval) {
  
findplayer(acct).clientr.var = val;
}
//#CLIENTSIDE
function onCreated() {
  
join("triggerclass");
}
function 
someFunction() {
  
serverfunction2(null"someOtherFunction"player.accountval);

with Inverness' class, but it's pretty much the same thing; not sure if it's any easier. I prefer to use the class, because I hate working with cluttered onActionServerside()'s.
__________________
"We are all in the gutter, but some of us are looking at the stars."
— Oscar Wilde, Lady Windermere's Fan
Reply With Quote
  #64  
Old 12-12-2008, 10:05 PM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
Why the hell are you joining a class to the same weapon twice?

If a class has a serversided part, join it on serverside. Otherwise, join it on serverside or clientside, doesn't matter.

You really shouldn't join the same class twice to a weapon though, not that it would break it, but it looks retarded.
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #65  
Old 12-13-2008, 06:34 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
Quote:
Originally Posted by xXziroXx View Post
Otherwise, join it on serverside or clientside, doesn't matter.
I'm sure you know that joining it clientside won't join it do the serverside too.
__________________
Reply With Quote
  #66  
Old 12-13-2008, 07:43 AM
thatdwarf thatdwarf is offline
Former UN Dev Admin
Join Date: Nov 2005
Posts: 42
thatdwarf is on a distinguished road
I just realized I posted this in the Gscript Wiki thread....woops :P

Anyways, thanks for your help guys
Reply With Quote
  #67  
Old 12-13-2008, 06:09 PM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
Quote:
Originally Posted by Inverness View Post
I'm sure you know that joining it clientside won't join it do the serverside too.
Which is why I said to join it on serverside if it have a serversided part in the class.
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #68  
Old 12-13-2008, 08:41 PM
Pelikano Pelikano is offline
Registered User
Pelikano's Avatar
Join Date: Oct 2008
Posts: 1,133
Pelikano has a little shameless behaviour in the past
LOL
This is the greates offtopic-chat I've ever seen lmao
Reply With Quote
  #69  
Old 12-13-2008, 08:50 PM
LoneAngelIbesu LoneAngelIbesu is offline
master of infinite loops
LoneAngelIbesu's Avatar
Join Date: May 2007
Location: Toldeo, Ohio
Posts: 1,049
LoneAngelIbesu has a spectacular aura aboutLoneAngelIbesu has a spectacular aura about
Send a message via AIM to LoneAngelIbesu
Quote:
Originally Posted by xXziroXx View Post
Which is why I said to join it on serverside if it have a serversided part in the class.
Which is why I said "// Not needed if you don't plan on triggering a clientside function ".
__________________
"We are all in the gutter, but some of us are looking at the stars."
— Oscar Wilde, Lady Windermere's Fan
Reply With Quote
  #70  
Old 12-13-2008, 09:09 PM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
Quote:
Originally Posted by LoneAngelIbesu View Post
Which is why I said "// Not needed if you don't plan on triggering a clientside function ".
I KNEW THAT, stop harassing me ffs!
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #71  
Old 01-10-2009, 03:13 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Since I've been unable to get a copy of the old MySQL database from the old GScript Wiki, I have decided to restart the project from scratch. I have installed a new Wikka installation at http://wiki.graal.us/.

This means I need your help. If you've got any knowledge about GScript, please register on the wiki and contribute it. There's some information on the Warboard which explains how you can help, and links to the category pages and template pages which you should use.

If you've got any questions, please post them here. Thanks!

edit: new link: http://wiki.graal.us/

Last edited by Skyld; 01-10-2009 at 08:21 PM..
Reply With Quote
  #72  
Old 01-10-2009, 08:24 PM
LoneAngelIbesu LoneAngelIbesu is offline
master of infinite loops
LoneAngelIbesu's Avatar
Join Date: May 2007
Location: Toldeo, Ohio
Posts: 1,049
LoneAngelIbesu has a spectacular aura aboutLoneAngelIbesu has a spectacular aura about
Send a message via AIM to LoneAngelIbesu
Quote:
Originally Posted by Skyld View Post
Since I've been unable to get a copy of the old MySQL database from the old GScript Wiki, I have decided to restart the project from scratch. I have installed a new Wikka installation at http://londeroth.org/~skyld/.

This means I need your help. If you've got any knowledge about GScript, please register on the wiki and contribute it. There's some information on the Warboard which explains how you can help, and links to the category pages and template pages which you should use.

If you've got any questions, please post them here. Thanks!
Just in time for the database over at gs.iamcosmouse.com to go bust. The WayBack Machine (google it) has got a pretty good archive of the old GScript Wiki, though it's not all accessible.

Edit: Looks like some permissions might be set wrong. I registered, but can't edit anything.
__________________
"We are all in the gutter, but some of us are looking at the stars."
— Oscar Wilde, Lady Windermere's Fan
Reply With Quote
  #73  
Old 01-10-2009, 08:35 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by LoneAngelIbesu View Post
Just in time for the database over at gs.iamcosmouse.com to go bust. The WayBack Machine (google it) has got a pretty good archive of the old GScript Wiki, though it's not all accessible.
I've got Stefan on a mission to try and find my old database, so if he can, I'll set it up on my computer and then copy across the old pages, fixing the formatting.
Quote:
Originally Posted by LoneAngelIbesu
Edit: Looks like some permissions might be set wrong. I registered, but can't edit anything.
Fixed. I accidentally broke the default ACL when moving to wiki.graal.us (brought back an old wikka.config.php).
Reply With Quote
  #74  
Old 01-10-2009, 11:03 PM
Codein Codein is offline
jwd
Codein's Avatar
Join Date: Oct 2005
Location: Greater Manchester
Posts: 2,423
Codein has a spectacular aura aboutCodein has a spectacular aura about
Send a message via AIM to Codein Send a message via MSN to Codein
Quote:
Originally Posted by Skyld View Post
Since I've been unable to get a copy of the old MySQL database from the old GScript Wiki, I have decided to restart the project from scratch. I have installed a new Wikka installation at http://wiki.graal.us/.

This means I need your help. If you've got any knowledge about GScript, please register on the wiki and contribute it. There's some information on the Warboard which explains how you can help, and links to the category pages and template pages which you should use.

If you've got any questions, please post them here. Thanks!

edit: new link: http://wiki.graal.us/
Man, if only I could rep++ you
Reply With Quote
  #75  
Old 01-11-2009, 12:19 AM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
I really like this wiki I've contributed some pages
__________________
Reply With Quote
Reply


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:40 PM.


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