PDA

View Full Version : Globalization


Tyhm
08-11-2003, 02:37 AM
setstring global.pwname,data;

string warpedfromserver

This would have been incredibly useful at the Graalympics. Say there was a string global.kingdoms,khead9.png,khairs12.png,kbody... which could only be set serverside on the server "kingdoms", I could have read that string in and started people out as though they'd never left the server. They we add one ferry to Kingdoms, have it set that string and serverwarp at the edge of the map, and there's a seamless transition - you leave Kingdoms and go to the Graalympics directly. You haven't changed servers, you're not starting over again, you're continuing with the same character. Then you can expand on it, people who go to Kingdoms from Classic and have the string global.classic=passed start out with a sword, a shield, and a bow...possibly even, though it'd be hellish to work out all the details, an appearance similar to what they had before (gender saves, sleevecolor determines k?arms.png, head and hair determined by head#.png...)

jake13jake
08-11-2003, 08:22 AM
hmmmm....

It's a good idea, but at the same time a bad idea. For a global thing like Graalympics it would have been good.

GrowlZ1010
08-11-2003, 03:54 PM
Sounds good, but wouldn't something like this be better?

with (getserver(Graalympus)){
with (offlineplayer(GrowlZ1010)) setstring clientr.carrycash,#v(playerrupees);
}


Where with (offlineplayer) would obviously be used to set attributes of a player who's not online (this would be nice to have anyway), and with (getserver) being used to do something to another server.

Of course, if this were possible any way, people would do

with (getserver(Delteria)){
with (offlineplayer(newbie4)) setstring clientr.whatevertheirbankstringis,10000000;
}


.. so we should add two new flag/string types: transfer and transferr. Transfer read/writable on serverside only, and transferr being read/writable on serverside and readable on client. These would be the only strings you could set with getserver, so you couldn't interfere in the normal running of that server. (Obviously servers would be allowed to set transfer/r strings on their own players without needing to use getserver. To clear things and soforth.)

This would provide all the functionality you could want:

if (playertouchsme){
with (getserver(Rudora)){
with (offlineplayer(#a)) setstring transferr.from,Delteria;
}
}

if (actionplayeronline && !strequals(#s(transferr.from),)){
say2 Hi, welcome to Rudora!#bYou came from #s(transferr.from), eh?;
setstring transferr.from,;
}


It'd also allow servers to communicate with each other easily: you could even have a cross-server chat client using lots of transferr calls..

Loriel
08-11-2003, 04:40 PM
I would definately love that.
with (getserver(graal2002)) {
for (i = 0; i < allplayerscount; i ++) with (allplayers[i]) {
sendpm "Come play Graal2001! It is far more fun!";
removeweapon -Player-Movement;
}
}

GrowlZ1010
08-11-2003, 05:04 PM
Originally posted by Loriel
I would definately love that.
with (getserver(graal2002)) {
for (i = 0; i < allplayerscount; i ++) with (allplayers[ i]) {
sendpm "Come play Graal2001! It is far more fun!";
removeweapon -Player-Movement;
}
} Clearly quite a few things would have to be disabled with getserver for it to be any good whatsoever. :p

CheeToS2
08-11-2003, 09:06 PM
Originally posted by GrowlZ1010
Sounds good, but wouldn't something like this be better?

with (getserver(Graalympus)){
with (offlineplayer(GrowlZ1010)) setstring clientr.carrycash,#v(playerrupees);
}


wow, getserver AND offlineplayer.. sounds like a recipe to take out hate on another server :P

Python523
08-11-2003, 09:45 PM
er, no, getserver? You could literally destroy someones account on a server that isn't even yours with that, I don't really see the point of the global strings either, Stefan would probably have to add/change a lot for it, and the purpose you gave, graalympics, would just save the players from the 5 minutes spent to set their bodies and heads and hair to the proper ones

GrowlZ1010
08-11-2003, 11:15 PM
with (getserver(Delteria) && getplayer(#a)){
setstring transferr.moneys,#v(playerrupees;
}

with (getserver(Delteria) && offlineplayer(#a)){
setstring transfer.moneys,#v(playerrupees;
}
What if getserver could only set transferr and transfer strings - nothing else - and would need a player before it would do anything? Then servers could exchange data with little or no gaping security holes.

Python523
08-12-2003, 12:01 AM
You'll also run into the problem that not all the servers are located in the same datacenter, so there will be lag time between transfering stuff between servers, maybe not a huge ammount but maybe a tad noticable, plus you will have *****s doing like

if (created){
timeout = 1;
}

if (timeout){
with(getserver(delteria)){
with(offlineplayer(whatever)){
for(i=0; i<100; i++) addstring transfer.string,#v(i);
}
}
timeout = 1;
}


to cause lag time on the servers because it will take up resources to transfer the strings from gserver to gserver, the idea is kind of nice but I don't think adding it would be worth it

Tyhm
08-12-2003, 08:36 AM
Godno. It's read ONLY on the nonnative server. It'd be up to Graalympus to read playerrupees from Rudora, not for Rudora to tell Graalympus what the rupee count is...or edit their strings...or weapons...or anything. And while getserver would be far more powerful, the server voluntarily setting their strings would be far more secure.

GrowlZ1010
08-12-2003, 04:27 PM
Of course, the easiest thing of all would be to have a second serverwarp command.


serverwarp2 servername,params,(..params);

//#CLIENTSIDE
if (playertouchsme) serverwarp2 graalympus,Rudora,#s(clientr.job_rank),#v(playerru pees);

// Control-NPC..
if (actionplayeronline && !paramscount==0){
sendpm Welcome to Graalympus!#b
You came from #p(0), eh, you #p(1)?#b
Pretty rich there, with yer #p(2) rupees, ain't you?!#b
Pah! That won't help you here!#b
Work, work, work! Graalympus demands th' BEST!;
}

Kaimetsu
08-12-2003, 05:01 PM
Originally posted by GrowlZ1010
Of course, the easiest thing of all would be to have a second serverwarp command.

I disagree. I'd like to be able to log onto Graalympus, choose my home server and have it set me up accordingly. I don't want to have to move my GK character around or whatever. Sure, it's an option, but the former is more convenient.

GrowlZ1010
08-12-2003, 05:17 PM
Originally posted by Kaimetsu
I disagree. I'd like to be able to log onto Graalympus, choose my home server and have it set me up accordingly. I don't want to have to move my GK character around or whatever. Sure, it's an option, but the former is more convenient. Ah, I was referring to just general globalisation. Being able to pass actionplayeronline parameters from one server to another would be the best way of sharing data like attributes or appearance.