Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - TheBlackParrot

Pages: 1 ... 3 4 5 6 7 [8] 9 10 11 12 13 ... 27
106
Modification Help / Message lines are being cut short
« on: February 14, 2015, 06:29:38 PM »

(bottom print, 2 chat messages reading the same thing)

Is there a way around that, or is this some torque limitation?

107
Gallery / I left my mining dev server up for a few days
« on: February 12, 2015, 04:48:05 PM »

RNG master race, down with z-axis

108
I need to do this as I'm assigning variables to different water bricks, and have the player be affected depending on those variables.

I've gotten this close, but it only seems to work on one half of the brick.
(this is on a static 4x4 grid (8x cubes))

Code: [Select]
package MiningLiquidPackage {
function PlayerStandardArmor::onEnterLiquid(%data,%obj,%coverage,%type) {
talk(%data SPC %obj SPC %coverage SPC %type);
%obj.schedule(100,doLiquidLoop);
return parent::onEnterLiquid(%data,%obj,%coverage,%type);
}
function PlayerStandardArmor::onLeaveLiquid(%data,%obj,%coverage,%type) {
cancel(%obj.liquidLoop);
talk(%data SPC %obj SPC %coverage SPC %type);
return parent::onLeaveLiquid(%data,%obj,%coverage,%type);
}
};
activatePackage(MiningLiquidPackage);

function Player::doLiquidLoop(%this) {
cancel(%this.liquidLoop);
%this.liquidLoop = %this.schedule(500,doLiquidLoop);

%player_pos = %this.getPosition();
%player_pos[x] = getWord(%player_pos,0);
%player_pos[y] = getWord(%player_pos,1);
%player_pos[z] = getWord(%player_pos,2);

// ugh
// can't %array[%another[1]] and it SUCKS
if(%player_pos[x] < 0) {
%player_pos_xf = mCeil(%player_pos[x] - (%player_pos[x] % 4));
} else {
%player_pos_xf = mFloor(%player_pos[x] - (%player_pos[x] % 4));
}
if(%player_pos[y] < 0) {
%player_pos_yf = mCeil(%player_pos[y] - (%player_pos[y] % 4));
} else {
%player_pos_yf = mFloor(%player_pos[y] - (%player_pos[y] % 4));
}
if(%player_pos[z] < 0) {
%player_pos_zf = mCeil(%player_pos[z] - (%player_pos[z] % 4));
} else {
%player_pos_zf = mFloor(%player_pos[z] - (%player_pos[z] % 4));
}

%brick = $Mining::Brick[%player_pos_xf,%player_pos_yf,%player_pos_zf];

if(!isObject(%brick)) {
talk("NOT OBJECT" SPC %brick SPC "$Mining::Brick[" @ %player_pos_xf @ "," @ %player_pos_yf @ "," @ %player_pos_zf @ "]" SPC %this.getPosition());
return;
}

%brick_box = %brick.getWorldBox();
%brick_box[x1] = getWord(%brick_box,0);
%brick_box[y1] = getWord(%brick_box,1);
%brick_box[z1] = getWord(%brick_box,2);
%brick_box[x2] = getWord(%brick_box,3);
%brick_box[y2] = getWord(%brick_box,4);
%brick_box[z2] = getWord(%brick_box,5);

if(%player_pos_xf >= %brick_box[x1] && %player_pos_yf >= %brick_box[y1] && %player_pos_zf >= %brick_box[z1] && %player_pos_xf <= %brick_box[x2] && %player_pos_yf <= %brick_box[y2] && %player_pos_zf <= %brick_box[z2]) {
if(%brick.liquidObj != -1) {
talk("IN" SPC %brick SPC "$Mining::Brick[" @ %player_pos_xf @ "," @ %player_pos_yf @ "," @ %player_pos_zf @ "]" SPC %this.getPosition());
} else {
talk("NOT LIQUID" SPC "$Mining::Brick[" @ %player_pos_xf @ "," @ %player_pos_yf @ "," @ %player_pos_zf @ "]" SPC %this.getPosition());
}
}
}

I've been at this for hours now and I'm tearing out my hair over this.
It'd be nice if y'know, the onEnter/LeaveLiquid would actually return the object, but nah, of course it doesn't.

EDIT: sorry for the formatting, PHP got habitual

109
I can't seem to figure out how to do this. Using trinick's script, and echoing out %this.cmd (with my added false Uptime variable), this is what shows up.

Code: [Select]
POST /postServer.php HTTP/1.0
Host: [REMOVED]
Content-Type: application/x-www-form-urlencoded
Content-Length: 163

ServerName=Freebuild&Port=28000&Players=1&MaxPlayers=6&Map=Freebuild&Mod=&Passworded=1&Dedicated=0&BrickCount=0&DemoPlayers=0&blid=18701&Uptime=4944948474&csg=1800&ver=21&build=1931

I assume this is not working right (nginx reports no such Uptime, ver, and build index (the hell happened to csg)) because of the Content-Length, I'm assuming. If I'm right, it's supposed to be 181 with the added variable, and 163 without.
Code: [Select]
2014/10/14 09:44:47 [error] 6958#0: *802 FastCGI sent in stderr: "PHP message: PHP Notice:  Undefined index: ver in /srv/http/blmaster/postServer.php on line 16
PHP message: PHP Notice:  Undefined index: build in /srv/http/blmaster/postServer.php on line 16
PHP message: PHP Notice:  Undefined index: Uptime in /srv/http/blmaster/postServer.php on line 16" while reading response header from upstream, client: [my IP], server: [my custom master server's URL], request: "POST /postServer.php HTTP/1.0", upstream: "fastcgi://127.0.0.1:64000", host: "[my custom master server's URL]"

Is there a better way to do this, or do I just need to outright make my own method of posting to my master server?

I ask this because I can't seem to figure out what Blockland is doing to remove dead servers from the main master list. My workaround idea was to send the uptime of each server everytime it posted using the default function, and have a script on the server check for duplicate uptimes via cron every so often (e.g. 10 minutes, since it posts every 5*timescale).

I'm also wanting to make a separate master server for my friends and I. We're all still paranoid of being DDoS'd and I've been told it still happens from other active users I keep in touch with. It works, except for this and names, which according to trinick, you need to tap into the auth server to do, and I'd rather stay far the hell away.
Someone's gonna ask, there's your answer.

110
Help / RTB_registerPref is a null function with default addons
« on: May 08, 2014, 02:13:48 AM »
Code: [Select]
==>trace(1);
   Console trace is on.
Leaving ConsoleEntry::eval() - return
Entering ConsoleEntry::eval()
   ==>RTB_registerPref("Admin Only", "Duplorcator", "Pref::Duplorcator::AdminOnly", "bool", "Tool_Duplicator", 0, 0, 0);
   Entering RTB_registerPref(Admin Only, Duplorcator, Pref::Duplorcator::AdminOnly, bool, Tool_Duplicator, 0, 0, 0)
   Leaving RTB_registerPref() - return 0
Leaving ConsoleEntry::eval() - return
Entering ConsoleEntry::eval()
   ==>trace(0);

why? This even does the same thing on the Freebuild gamemode.

111

    Probably doesn't need much of an introduction. :P



    BranchDownload
    StableN/A
    Unstable        http://parrokeet.duckdns.org/blockland/repo/Support_Preferences/unstable/Support_Preferences.zip




    API FUNCTIONS
    registerPref(%category,%name,%type,%variable,%default_value,%hide,%callback,%arguments);

    %categoryDefines in what list this pref shows up in, e.g. "General", "Admins", etc. It will appear in the list on the left.
    %nameDefines what the player will see beside inputs, e.g. "Admin Password", "Falling Damage", etc.
    %typeDefines what type the variable is. See below for the list of types.
    %variableThe affected variable.
    %default_value        The default value if nothing is set for the variable.
    %hideIf 0, update messages are allowed. If 1, they're always hidden. Useful for passwords.
    %callbackCommand to call when the variable updates.
    %argumentsArguments for the called command.

    TYPES
    • num [min] [max]
      • A number type. [min] is the lowest allowed amount, [max] is the highest.
      • registerPref("Samples","Sample Number Pref","num 0 100000","$NumberTest",24,0);

    • bool
      • True or false. 0 is false, 1 is true.
      • registerPref("Samples","Sample Bool Pref","bool","$BoolTest",1,0);

    • string [max characters]
      • A string type. [max characters] is the maximum allowed length of the string.
      • registerPref("Samples","Sample String Pref","string 255","$StringTest","TBP was here :O",0);

    • list TAB [value] [name in list] TAB [value 2] [name in list 2] TAB [value 3] [name in list 3]...
      • A dropdown list type. More than 2 types can be defined.
      • registerPref("Samples","Sample List Pref","list" TAB "1 Lowest value" TAB "2 A bit higher..." TAB "74 stupidly high cya","$ListTest",2,0);

    CALLBACKS
    Using callbacks is extremely simple and straightforward.

    In this example, we'll create a sample pref and use messageAll as the callback.
    • registerPref("Samples","Sample String w/ Callback","string 255","$CallbackTest","",0,"messageAll","\'MsgAdminForce\',$CallbackTest");

    After the %hide variable (0), you see "messageAll","\'MsgAdminForce\',$CallbackTest".
    "messageAll" is the called command, and "\'MsgAdminForce\',$CallbackTest" are the arguments sent to it. $CallbackTest is what we entered when changing the variable, \'MsgAdminForce\' simply plays a sound.

    Upon changing the sample pref, messageAll('MsgAdminForce',$CallbackTest); is called.



    Todo:

    - Legacy RTB support
    added in v0.6.0-dev-5
    "stable" in v0.6.0-dev-8

    Quote
    Port: needs callbacks
    »TheBlackParrot«: callbacks as in
    Port: being able to specify a function to call when the pref is changed
    added in v0.7.0-dev-2
    "stable" in v0.7.0-dev-5 *updated API

    - Option to hide messages even if checked when registering prefs
    added in v0.7.0-dev-2
    "stable" in v0.7.0-dev-5 *updated API

    - Slider type



    KNOWN ISSUES:
    • "Use RTB" shows up in the Start Game menu after first use, even with those that do not have RTB. (I'm assuming this check in BL's code may be dropped sooner or later, so I'm contemplating even doing anything about it)

    KNOWN ISSUES I CANNOT FIX:
    Duplorcator only shows it's prefs on the 1st created server. Because of the way it's coded, there is nothing I can do about this.
    It sets $Duplorcator::PrefsLoaded to true upon the first created server, and it never sets the variable back to false upon the server closing.
    One way you could work around it is by going into the bottom of server.cs in Tool_Duplorcator.zip, and add the following above line 1252 (it's a line with only };)
    [/list]
    Code: [Select]
    function onServerDestroyed()
    {
    $Duplorcator::PrefsLoaded = 0;
    parent::onServerDestroyed();
    }


      forget [/list]

      112
      parrokeet.duckdns.org
      port is 27960, should be the default

      http://dpmaster.deathmask.net/?game=openarena&server=162.243.148.85:27960&sort=ip

      I turned on voting for gametype and map choices, have at it

      113



      And like the previous one, this still gets music on the server you're currently playing.
      Bind a key to open it in your controls.

      114
      Game Modes / Qbe :: Development ceased until further notice
      « on: May 04, 2014, 10:27:18 PM »

      The goal in this gamemode is to gain and maintain the highest amount of points within 4 minutes



      BranchDownload
      StableN/A
      Unstable        http://parrokeet.duckdns.org/blockland/repo/Gamemode_Qbe/unstable/Gamemode_Qbe.zip
      Testinghttp://parrokeet.duckdns.org/blockland/repo/Gamemode_Qbe/testing/Gamemode_Qbe.zip



      To gain points, you mine blocks from the cube in the center of the arena. Players start around the cube on the grey spawn blocks.
      After everyone ghosts, players gain a "Qbe Hammer" to mine blocks, a gun, and a sword.

      Players can steal points by killing other players. 1/5 of the victim's points goes to the killer, and they must wait 15 seconds to respawn.



      The idea behind this spurred from people killing others in Mining gamemodes. Victims generally got pissed off at their attackers, and I wanted to make something where everyone could do that, with it being the point behind the gamemode.

      115
      Off Topic / I'm out of ideas on what to host on my server
      « on: May 01, 2014, 01:24:10 AM »
      Isn't BL related
      EDIT: let me make this bigger:
      Isn't BL related.

      I'm a bit bummed out that I bought a VPS to host some stuff on, but no one's interested in anything I'm hosting/have hosted.

      There's an IRC server running on it, but it's hardly ever used. My IRCBridge addon is p much the only thing using it.
      There's a Mumble server running, but I think everyone uses Teamspeak or Skype so it's just kinda there. Switched to Teamspeak
      A video game music stream runs on it 24/7. No one listens to it.
      I had an electronic music stream running, but there was absolutely 0 interest in it so I just took it down as it was wasting resources.
      There's a Cytube server on it, but I get the feeling everyone prefers the official server. Which I understand completely.

      I would host a BL server on it, but I'm sure everyone knows by now what happened to that.

      I don't know what else I could host, it kinda stinks.

      Is there anything in particular you guys want to see hosted that no one's really doing?

      http://parrokeet.duckdns.org/

      116
      This essentially merges Blockland's chat and an IRC channel into one.


      Messages from IRC users are turquoise in Blockland's chat. It also mentions when they join and leave.
      I may consider adding in the IRC commands later on, but this should suffice for now.

      The randomness on the end of the room name and Blockland users are to prevent issues with duplicates. IIRC duplicates are a big nono.

      I've left my IRC server as the "default" server, but you could easily change it if you feel the need to.

      Upon connecting, you are given the server address/port and what channel the addon is joining.



      BranchDownload
      StableN/A
      Unstable        http://parrokeet.duckdns.org/blockland/repo/Server_IRCBridge/unstable/Server_IRCBridge.zip
      Testinghttp://parrokeet.duckdns.org/blockland/repo/Server_IRCBridge/testing/Server_IRCBridge.zip

      Support_Updater will update this for you automatically depending on which branch you use.



      117

      Blockland themes, made easy!

      BranchDownload
      StableN/A
      Unstable        N/A
      Testinghttp://parrokeet.duckdns.org/blockland/repo/Client_Stylish4BL/testing/Client_Stylish4BL.zip

      Support_Updater will update this for you automatically depending on which branch you use.



      The point of this addon is to allow for a bit more customization in Blockland. Much more is planned to be added in the future, and I wanted to get some feedback and testing done very early in development.




      Planned features
      • Add in support to allow for other themes
      • Add in support to switch themes on-the-fly
      • Add a GUI to preview themes
      • Add in support for Support_Updater
      [/s]
      • Find some way to add a theme repository
      • Allow for chat customizing

      Known bugs
      • Find a much better way to recursively loop through GuiGroup. This ought to tackle most of the current issues



      Recent Updates
      v0.1.3-dev-4:
      • More tweaks were added

      v0.1.2-dev-2:
      • It now recursively loops through each GUI and sets new profiles only if they're default ones.
      • More tweaks were added

      118
      Off Topic / TBP's Synchtube/CyTube server
      « on: April 25, 2014, 08:35:34 PM »
      http://parrokeet.duckdns.org:7900/

      Got this set up the other night, and I don't feel like just letting it sit there.
      Feel free to check out the other stuff too if you want, just remove the port at the end.

      119
      Drama / You can add another DDOS victim to your lists.
      « on: April 20, 2014, 03:49:01 AM »


      thanks, starfish whoever you are. I host other stuff on this, too.

      120
      Modification Help / Teying to emulate PHP number_format
      « on: April 18, 2014, 06:13:33 PM »
      Code: [Select]
      function formatNumber(%num)
      {
      %len = strLen(%num);
      if(%len < 4)
      return %num;

      while(%len > 3)
      {
      %formatted = %formatted @ "," @ getSubStr(%num,%len-3,%len);
      %len -= 3;
      }
      return getSubStr(%num,0,%len) @ %formatted;
      }
      This works up until you get to a 7-digit number. strLen seems to work until a 10-digit number is reached. Am i missing something here?

      Pages: 1 ... 3 4 5 6 7 [8] 9 10 11 12 13 ... 27