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
  #1  
Old 04-01-2006, 01:58 PM
Link3001 Link3001 is offline
Missing Link Merai
Link3001's Avatar
Join Date: Mar 2006
Location: Over there ------------>
Posts: 50
Link3001 is on a distinguished road
Send a message via AIM to Link3001 Send a message via MSN to Link3001
Scripts not working online.

Hey there!

I have been trying to revive X-Online and I must say that the new engine and everything totally confuses me.

I used to have Grim Squeaker (I bet some remember him) around to do the scripting for me, but he's been gone for ages and now I am on my own.
It's just too bad that I know nothing about scripting (except for some simple, old scripts) and therefore I fail at trying to fix his old scripts.

Now, one of those happen to be lighteffect scripts. They work perfectly offline, but once I try to test them online, they are not even showing me the slightest bit of light.

So what am I doing wrong here?

[edit]:

So someone told me to make it Clientside (I had no idea I had to..).

So when should I made something Clientside or serverside?
__________________





Last edited by Link3001; 04-01-2006 at 02:24 PM..
Reply With Quote
  #2  
Old 04-01-2006, 02:44 PM
konidias konidias is offline
Old Bee
konidias's Avatar
Join Date: Jul 2001
Location: Orlando, FL
Posts: 7,222
konidias will become famous soon enough
Send a message via AIM to konidias
You should make everything that is important (like saving data or calculating data) serverside. Stuff that should be made clientside is stuff such as lights, which would be the same if they were shown serverside or clientside anyway.

Think about it. If each client is seeing a light clientside, then they are all seeing the light, so it doesn't need to be serverside. Serverside scripting also prevents hackers from easily changing data... Lights are mostly just for show and stuff, so it really doesn't matter what hackers would do to them clientside.

Basically:

Important things that need hack-prevention - serverside
Everything else - clientside

There are a few exceptions... like if you have an npc that moves through levels, then it needs to be serverside, because it's x/y coordinates need to be more global and not tied down to each client.
Reply With Quote
  #3  
Old 04-01-2006, 03:45 PM
Link3001 Link3001 is offline
Missing Link Merai
Link3001's Avatar
Join Date: Mar 2006
Location: Over there ------------>
Posts: 50
Link3001 is on a distinguished road
Send a message via AIM to Link3001 Send a message via MSN to Link3001
I see. That will clear up a lot of errors from X-Online.

Thanks!

*hug*
__________________




Reply With Quote
  #4  
Old 04-01-2006, 05:19 PM
Bl0nkt Bl0nkt is offline
Era Developer
Bl0nkt's Avatar
Join Date: Mar 2005
Location: Pennsylvania
Posts: 1,589
Bl0nkt will become famous soon enough
Send a message via AIM to Bl0nkt
Also remember that a lot of GS1 doesn't work on the serverside of a GS2 server.
Reply With Quote
  #5  
Old 04-01-2006, 05:50 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 Bl0nkt
Also remember that a lot of GS1 doesn't work on the serverside of a GS2 server.
Old gscript is completely functional and compatible on a new engine-enabled server.

Things that don't work on the serverside simply don't work on the serverside, regardless of which language.
__________________
Skyld
Reply With Quote
  #6  
Old 04-01-2006, 06:47 PM
Link3001 Link3001 is offline
Missing Link Merai
Link3001's Avatar
Join Date: Mar 2006
Location: Over there ------------>
Posts: 50
Link3001 is on a distinguished road
Send a message via AIM to Link3001 Send a message via MSN to Link3001
So, I did some changing in light effects (making them clientside), but suddenly things pop up and are acting like light effects while they have no such scripts!

Suddenly a cloud went transparant and a door became glowing red and resizing itself.

Any idea how this could be happening? I added a screenshot for more information.
Attached Thumbnails
Click image for larger version

Name:	graal_1143909782.png
Views:	163
Size:	127.4 KB
ID:	35971   Click image for larger version

Name:	graal_1143910473.png
Views:	163
Size:	141.8 KB
ID:	35972  
__________________




Reply With Quote
  #7  
Old 04-01-2006, 07:11 PM
lordspawn lordspawn is offline
Registered User
Join Date: Aug 2004
Posts: 24
lordspawn is on a distinguished road
Usually happens if you update the level with RC or normally i guess, just reconnect, always worked for me.
Reply With Quote
  #8  
Old 04-01-2006, 09:31 PM
Link3001 Link3001 is offline
Missing Link Merai
Link3001's Avatar
Join Date: Mar 2006
Location: Over there ------------>
Posts: 50
Link3001 is on a distinguished road
Send a message via AIM to Link3001 Send a message via MSN to Link3001
Quote:
Originally Posted by lordspawn
Usually happens if you update the level with RC or normally i guess, just reconnect, always worked for me.

I see. Whenever I try to update a level, it updates the entire gmap and warps everyone to one particular level. Is there a way to fix that?
__________________




Reply With Quote
  #9  
Old 04-01-2006, 09:42 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 Link3001
I see. Whenever I try to update a level, it updates the entire gmap and warps everyone to one particular level. Is there a way to fix that?
Yes. Stop updating the entire GMAP.

Nobody on the server should receive an update of the entire GMAP. Ever.
__________________
Skyld
Reply With Quote
  #10  
Old 04-02-2006, 02:04 PM
Link3001 Link3001 is offline
Missing Link Merai
Link3001's Avatar
Join Date: Mar 2006
Location: Over there ------------>
Posts: 50
Link3001 is on a distinguished road
Send a message via AIM to Link3001 Send a message via MSN to Link3001
Maybe I applied the gmap wrongly then. Because no matter what I do, I remain on the gmap, even when I warp to a specific level.

But maybe that is because I am not used to using one (I mean, I first tried to make a bigmap.txt to work and stuff.. go figure. ).

Maybe I should just not update the level anymore. :P
__________________




Reply With Quote
  #11  
Old 04-02-2006, 04:02 PM
KuJi KuJi is offline
Banned
Join Date: Apr 2004
Location: Staten Island, New York
Posts: 2,202
KuJi will become famous soon enough
Send a message via ICQ to KuJi Send a message via AIM to KuJi Send a message via MSN to KuJi Send a message via Yahoo to KuJi
I believe levels automatically update, and if not, just reconnect.
Reply With Quote
  #12  
Old 04-03-2006, 03:29 PM
Link3001 Link3001 is offline
Missing Link Merai
Link3001's Avatar
Join Date: Mar 2006
Location: Over there ------------>
Posts: 50
Link3001 is on a distinguished road
Send a message via AIM to Link3001 Send a message via MSN to Link3001
Hmm. I still have a script that works flawlessly offline, but no matter if I do //#CLIENTSIDE or //#SERVERSIDE, it won't work offline!

I am stunned. I tried all sorts of things. :P
__________________




Reply With Quote
  #13  
Old 04-03-2006, 04:54 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 Link3001
Hmm. I still have a script that works flawlessly offline, but no matter if I do //#CLIENTSIDE or //#SERVERSIDE, it won't work offline!

I am stunned. I tried all sorts of things. :P
There is no such thing as "//#SERVERSIDE".

Here is how the model works.
PHP Code:
function myServersideFunctions()
{
  
// code
}

//#CLIENTSIDE

function myClientsideFunction()
{
  
// code

Everything before the "//#CLIENTSIDE" marker is executed on the serverside. Everything after it is executed on the clientside.
__________________
Skyld
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 01:06 PM.


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