Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   RC: Chests (https://forums.graalonline.com/forums/showthread.php?t=74142)

Deadly_Killer 05-23-2007 03:26 AM

RC: Chests
 
player.addChest(x, y, level);
player.hasChest(x, y, level);
player.remChest(x, y, level);

Making clientr.flags would end up getting large, my next idea was going to be textfiles, so yeah.

Tyhm 05-24-2007 02:04 AM

Servers still use actual chests instead of NPCs...?

zokemon 05-24-2007 02:07 AM

Quote:

Originally Posted by Tyhm (Post 1311203)
Servers still use actual chests instead of NPCs...?

:oo:

Inverness 05-24-2007 02:32 AM

I'm shocked and awed.

Deadly_Killer 05-24-2007 06:35 AM

Custom chest script, I just think storing it in the chests system would be easier and better accessible.

zokemon 05-24-2007 02:01 PM

And also insecure?
Almost everything from the default Graal systems are completely clientsided.

Deadly_Killer 05-24-2007 05:39 PM

Quote:

Originally Posted by zokemon (Post 1311366)
And also insecure?
Almost everything from the default Graal systems are completely clientsided.

... Serverside, use your head mr.

Tyhm 05-24-2007 05:55 PM

That raises an interesting point - I haven't been on RC lately, but does the "player properties" window still have a box for "Opened Chests Flags"? Could that be reappropriated for servers that use serverside chest-scripts to instead list "Flags that start with clientr.chest_"?

zokemon 05-24-2007 08:11 PM

Quote:

Originally Posted by Deadly_Killer (Post 1311443)
... Serverside, use your head mr.

Yes I know this, but they are still modifiable clientside.

Inverness 05-24-2007 08:13 PM

Quote:

Originally Posted by Deadly_Killer (Post 1311443)
... Serverside, use your head mr.

The chests system isn't Serverside, use your head mr.

Deadly_Killer 05-24-2007 09:38 PM

Quote:

Originally Posted by Inverness (Post 1311496)
The chests system isn't Serverside, use your head mr.

Oh, so you are saying that the client holds the mysql user/pass for the server in the client?

That seem's insecure.

And btw: You can't edit your chests through clientside, use your head.

cbk1994 05-25-2007 12:11 AM

Sure you can, or atleast you could four years ago-- the last time I've even chests even being used o.O

Deadly_Killer 05-25-2007 12:32 AM

Uhm, UN?

I just want to make custom weapons etc.. in chests

Tyhm 05-25-2007 07:04 AM

So you want something like
PHP Code:

if (playertouchsme) {
  
addweapon bazooka;
  
set clientr.chest98;
}
CLIENTSIDE
if (clientr.chest98){
  
hide;


?

Deadly_Killer 05-25-2007 07:10 AM

uhm.. kind of.

Except, it will be purely clientside and just triggeraction to itself to add items.

Have an enumerator value for every item etc.

zokemon 05-25-2007 09:32 PM

Quote:

Originally Posted by Deadly_Killer (Post 1311532)
Oh, so you are saying that the client holds the mysql user/pass for the server in the client?

That seem's insecure.

And btw: You can't edit your chests through clientside, use your head.

All of us have no choice but to just go with what you say since our only accreditation towards chests would be, like cbkbud said, from 4 years ago. But if they are no longer modifiable clientside, I guess it would be useful to use the system rather then just leave it there. I personally would rather see all the old Graal systems faded out from existence, though.

Deadly_Killer 05-25-2007 09:43 PM

Quote:

Originally Posted by zokemon (Post 1311815)
I personally would rather see all the old Graal systems faded out from existence, though.

And then you realize that graal is currently far below the player count it used to have.

zokemon 05-25-2007 09:45 PM

Quote:

Originally Posted by Deadly_Killer (Post 1311828)
And then you realize that graal is currently far below the player count it used to have.

That is a whole different issue. ;)

Deadly_Killer 05-25-2007 09:46 PM

Quote:

Originally Posted by zokemon (Post 1311830)
That is a whole different issue. ;)

Not exactly, tons of people like how things were before everything was literally.. revamped.

zokemon 05-25-2007 10:01 PM

Quote:

Originally Posted by Deadly_Killer (Post 1311831)
Not exactly, tons of people like how things were before everything was literally.. revamped.

Well I like how the scripting engine is now much better then it was before and thus I can conclude that my personal belief towards removing the old Graal systems is perfectly just being that it is only a personal belief.

Inverness 05-26-2007 12:55 AM

The old Graal systems can be duplicated in GS2 and improved, there is no reason to include support for the old systems other than people not wanting to make new ones. I would like to see all the old built-in systems removed but have like a standard set of system scripts that can be optionally downloaded to replace them.
Quote:

Originally Posted by Deadly_Killer (Post 1311831)
Not exactly, tons of people like how things were before everything was literally.. revamped.

Who told you this?

Tyhm 05-26-2007 02:28 AM

The old stuff may as well be deleted; it no longer works anyway.
BUT
it ought to be ported to GS2 as well. "First" hardly matters, as nobody can use the old baddies if they're still Even Remotely supported...but Also, certainly.

DustyPorViva 05-26-2007 02:42 AM

Well a lot of the old stuff like baddies/bombs/arrows work, just not on gmap's.

Deadly_Killer 05-26-2007 03:00 AM

Quote:

Originally Posted by DustyPorViva (Post 1311954)
Well a lot of the old stuff like baddies/bombs/arrows work, just not on gmap's.

Chests =[

Quote:

Originally Posted by Inverness (Post 1311925)
Who told you this?

Don't act as if I am new to the game, I have quite some time on this game. I know from first hand the player count difference.

My request was to only be able to add to the chests field in the RC.

Either way, I ended up (to save lag), make it so when you get a chest it saves a text file on the server of your chests, and sends one to your player. Your player uses the text file to set the correct image of the chest (clientside). It also checks the image on the clientside when touched to see if it is opened or closed. Then it does a serverside check to see if you can get the chest.

Should work fine, though I prefer using built-in stuff =[

Inverness 05-26-2007 05:27 AM

Quote:

Originally Posted by Deadly_Killer (Post 1311959)
Don't act as if I am new to the game, I have quite some time on this game. I know from first hand the player count difference.

Just don't speak for other people, give your own reasons.

Deadly_Killer 05-26-2007 06:07 AM

Quote:

Originally Posted by Inverness (Post 1311996)
Just don't speak for other people, give your own reasons.

The player count can speak for itself.

zokemon 05-26-2007 08:45 AM

Quote:

Originally Posted by Deadly_Killer (Post 1312001)
The player count can speak for itself.

You can't draw cause from correlation, sir.

cbk1994 05-26-2007 01:46 PM

PHP Code:

function onCreated()
{
  
this.wep "Weapons/Total Ownage";
}
function 
onPlayerTouchsMe()
{
  if ( 
getVar() == NULL )
  {
    
addWeaponthis.wep );
    
clientr.( @ "chest_" this.level.name "_" @  this.level."_" this.level.y) = this.wep
  }
}
function 
getVar()
{
  return 
clientr.( @ "chest_" this.level.name "_" @  this.level."_" this.level.y);
}
//#CLIENTSIDE
function onCreated()
{
  
show();
  
onTimeOut();
}
function 
onTimeOut()
{
  if ( 
getVar() != NULL )
  {
    
hide();
  }
  
setTimer);
}
function 
getVar()
{
  return 
clientr.( @ "chest_" this.level.name "_" @  this.level."_" this.level.y);


[EDIT]I didn't even realize there was a second page to this thread ... Hehe, sorry.[/EDIT]

Deadly_Killer 05-26-2007 04:24 PM

Quote:

Originally Posted by cbkbud (Post 1312076)
PHP Code:

function onCreated()
{
  
this.wep "Weapons/Total Ownage";
}
function 
onPlayerTouchsMe()
{
  if ( 
getVar() == NULL )
  {
    
addWeaponthis.wep );
    
clientr.( @ "chest_" this.level.name "_" @  this.level."_" this.level.y) = this.wep
  }
}
function 
getVar()
{
  return 
clientr.( @ "chest_" this.level.name "_" @  this.level."_" this.level.y);
}
//#CLIENTSIDE
function onCreated()
{
  
show();
  
onTimeOut();
}
function 
onTimeOut()
{
  if ( 
getVar() != NULL )
  {
    
hide();
  }
  
setTimer);
}
function 
getVar()
{
  return 
clientr.( @ "chest_" this.level.name "_" @  this.level."_" this.level.y);


[EDIT]I didn't even realize there was a second page to this thread ... Hehe, sorry.[/EDIT]

And then I had 5000 chests around the OW.. oh snap, 5k flags...

I didn't want to do that.

DustyPorViva 05-26-2007 06:46 PM

Maybe tone down on the chests then?

Tyhm 05-27-2007 04:14 AM

...dude, what do you think those chests use now?
What is ##c#level13.graal#13#32## (or whatever the syntax really is) if not a CHEST FLAG?

Inverness 05-27-2007 04:18 AM

lol, 5000 chests. And you can't even use an array because of the string size limit, lol. Use a text file.

Deadly_Killer 05-27-2007 07:26 AM

Quote:

Originally Posted by Tyhm (Post 1312384)
...dude, what do you think those chests use now?
What is ##c#level13.graal#13#32## (or whatever the syntax really is) if not a CHEST FLAG?

A) It doesn't store them together so I can easily find my chests.

Quote:

Originally Posted by Inverness (Post 1312385)
lol, 5000 chests. And you can't even use an array because of the string size limit, lol. Use a text file.

I know, thought of all those possibilities.

I ended up using a text file that encrypted it through base64encode. It only controls whether or not the chest shows up. If you delete the file, the chest would show again (once you leave + re-enter level). Touching the chest would then make the serverside check the real text file if you have it. If you do, it sends to rc saying 'hacker bs bs bs'

=D

Inverness 05-27-2007 04:35 PM

I mean use a text file on the serverside, you don't need to encode it then.

Deadly_Killer 05-27-2007 05:15 PM

Quote:

Originally Posted by Inverness (Post 1312453)
I mean use a text file on the serverside, you don't need to encode it then.

I am.

When you login, it sends you a copy of it encrypted to your client. ( so you can use this copy when you enter a level to check if the chest is opened / closed )

The real one is on serverside.

Re-read my statement please.

Inverness 05-27-2007 06:34 PM

Quote:

Originally Posted by Deadly_Killer (Post 1312457)
I am.

When you login, it sends you a copy of it encrypted to your client. ( so you can use this copy when you enter a level to check if the chest is opened / closed )

The real one is on serverside.

Re-read my statement please.

If the serverside is involved in the process at all, sending to client is unnecessary.

Deadly_Killer 05-27-2007 08:41 PM

Quote:

Originally Posted by Inverness (Post 1312465)
If the serverside is involved in the process at all, sending to client is unnecessary.

The clientside is required to set the image of the chest for that player.. not everyone.

Inverness 05-28-2007 02:34 AM

We're not on the same scope.

Deadly_Killer 05-28-2007 05:44 AM

!-> = can't send to
-> = can send to

Client -> Server
Server !-> Client ( in the same npc, that is )

Inverness 05-28-2007 07:15 PM

Quote:

Originally Posted by Deadly_Killer (Post 1312597)
!-> = can't send to
-> = can send to

Client -> Server
Server !-> Client ( in the same npc, that is )

Uh, yes it can, just use triggeraction(). The shape needs to be set on both sides.


All times are GMT +2. The time now is 04:55 AM.

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