Poll

I might need a poll later on.

drendran accidently voted for this
145 (72.9%)
I'm using this mod.
54 (27.1%)

Total Members Voted: 198

Author Topic: Blockland Essentials - Server being remade from scratch  (Read 32881 times)

Alright, so I forgot what else I was going to add next.
Any ideas?

edit: i might submit this to rtb
Maybe a float hack detector that comes with the server.

File name changed to "System_BlocklandEssentials" and submitted to RTB.

As an example:  How would I set stat one to a player vce value?

As an example:  How would I set stat one to a player vce value?
Well, what's the value?
Note: The system has nothing to do with vce.

For instance, how much gold a player would have.  <var:pl:gold>

Is there a way to link it to VCE?

For instance, how much gold a player would have.  <var:pl:gold>

Is there a way to link it to VCE?
I was gonna look at VCE's code, then realized it's a private add-on.
What gives lol?

Anyway, I sure it can be done easily, I'd just like to look at the mod before I start coding.
I want to assume it's just %client.player.gold but if I'm wrong I'll end up wasting my time.

Check back later and I'll post a script for you, I have to go find an old version of VCE I got somewhere around.

Maybe a float hack detector that comes with the server.
This.

Whenever a player is floating in mid-air (not colliding with any bricks) and does not have a ping of ---, it disconnects the player for floathacking. I'm sure this can be done.

For instance, how much gold a player would have.  <var:pl:gold>

Is there a way to link it to VCE?
Code: [Select]
function getPlayerVar(%player,%var)
{
if(!isObject(%player))
return 0;
return getVariableGroupFromObject(%player).valuePlayer["",%player,%var];
}

function getClientVar(%client,%var)
{
if(!isObject(%client))
return 0;
return getVariableGroupFromObject(%client).valueClient["",%client,%var];
}

$statOneName = "";
$statTwoName = "";

$statOnePlayer = 0;
$statOneClient = 0;
$statTwoPlayer = 0;
$statTwoClient = 0;

function servercmdvcestatoneplayer(%client,%var)
{
if(%client.isAdmin || %client.isSuperAdmin)
{
$statOneName = %var;
$statOnePlayer = 1;
$statOneClient = 0;
commandtoall('statOneName',%var);
}
}

function servercmdvcestatoneclient(%client,%var)
{
if(%client.isAdmin || %client.isSuperAdmin)
{
$statOneName = %var;
$statOnePlayer = 0;
$statOneClient = 1;
commandtoall('statOneName',%var);
}
}

function servercmdvcestattwoplayer(%client,%var)
{
if(%client.isAdmin || %client.isSuperAdmin)
{
$stattwoName = %var;
$stattwoPlayer = 1;
$stattwoClient = 0;
commandtoall('statTwoName',%var);
}
}

function servercmdvcestattwoclient(%client,%var)
{
if(%client.isAdmin || %client.isSuperAdmin)
{
$stattwoName = %var;
$stattwoPlayer = 0;
$stattwoClient = 1;
commandtoall('statTwoName',%var);
}
}

package vceStatOnUpdate
{
function Player::VCE_modVariable(%player,%var,%logic,%value,%client)
{
Parent::VCE_modVariable(%player,%var,%logic,%value,%client);
if($statOnePlayer)
updateStatOne(%client,getPlayerVar(%player,$statOneName));
if($statTwoPlayer)
updateStatTwo(%client,getPlayerVar(%player,$statTwoName));
}
function GameConnection::VCE_modVariable(%client,%var,%logic,%value,%clientagain)
{
Parent::VCE_modVariable(%client,%var,%logic,%value,%clientagain);
if($statOneClient)
updateStatOne(%client,getClientVar(%client,$statOneName));
if($statTwoClient)
updateStatTwo(%client,getClientVar(%client,$statTwoName));
}
};
activatepackage(vceStatOnUpdate);
Done!

Adds four commands:
/vcestatoneplayer %var
/vcestatoneclient %var
/vcestattwoplayer %var
/vcestattwoclient %var

Basically you choose which stat (one or two) you want to update, and then wheather or not it's a variable of the player or the client.
You said <var:pl:gold> so to use that you'd type:

/vcestatoneplayer gold

Simple enough, right?

For now you gotta type it each time you start the server. I'll make a version that saves your choices later on.

This.

Whenever a player is floating in mid-air (not colliding with any bricks) and does not have a ping of ---, it disconnects the player for floathacking. I'm sure this can be done.
I could do this, but is it a serious problem?

edit: http://syerjchep.org/server_statsvce.zip
« Last Edit: November 25, 2013, 02:52:24 PM by DrenDran »

http://forum.blockland.us/index.php?topic=238571.msg6799153#msg6799153
tezuni posted some working code to ban float hacking, you can look into it


Awesome, thanks!
Tell me how it works for ya.
I mean, I tested it, but I'm still curious.

Tell me how it works for ya.
I mean, I tested it, but I'm still curious.
is that link on the OP the same as that script packaged, because I just packaged it myself...

is that link on the OP the same as that script packaged, because I just packaged it myself...
yeah, same script
If you host I'll come visit since I'm working on BL right now.

Alright, sounds good.  I'm working on updating my server right now, so you caught me at a good time.  Can you rename the file for the system Add-On here to the Blockland Essentials from thesystem?

Alright, sounds good.  I'm working on updating my server right now, so you caught me at a good time.  Can you rename the file for the system Add-On here to the Blockland Essentials from thesystem?
uh, sure
new link posted, it includes the vce thing by default now