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 - Lugnut

Pages: 1 2 3 [4] 5 6 7 8 9 ... 16
46
Modification Help / Differences between SimSets and SimGroups?
« on: July 05, 2012, 11:38:28 PM »
as far as I can tell they are identical. am i missing something?

47
see subject. thanks in advance.

48
General Discussion / I NEED WALLPAPERS. BLOCKLAND WALLPAPERS.
« on: July 01, 2012, 10:16:34 PM »
I AM AT A DISTINCT LACK OF BLOCKLAND WALLPAPERS. NORMAL SCREENSHOTS THAT ARE 800X600 DO NOT CUT IT, AND I DO NOT HAVE ENOUGH ARTISTIC TALENT NOR A BIG ENOUGH MONITOR TO GET PRETTY BIG SCREENSHOTS.

WHAT CAN YOU DO FOR ME, BLOCKLAND FORUMS? [/caps]

49
Back when I was working with hankyje, I had a problem with lot ownership in the cityrpg I was running, so I made this mod.

Tool_Ownershipper

Simply use this command to set the target bl_id to transfer ownership to:

>/setOSW BL_ID
That's short for "set Owner-Shipper-Wand".
>/OSW
This puts the wand in your hand.
>hit the target build
-note: target build can not be your mothers ass, as this add-on does not support "hit'n dat"

For example, if I did /setOSW 16807 then hit boobface's build, I would then own his build.

oh yeah, it's super admin only too.

Bump with V2.
I've repaired the issue that wordy pointed out, and apparently the add-on was nested.
so, that means that the file structure was this
Tool_Ownershipper.zip
-Tool_Ownershipper - Folder
--server.cs
--description.txt


instead of this

Tool_Ownershipper.zip
-server.cs
-description.txt


fascinating that no one complained, cause that usually prevents add-ons from executing.

There are a few longhand commands, /setOwnershipper BL_ID and /ownershipper, but you'll never need to use them.

Download here.

50
so I was browsing the web for stuff related to torquescript and I found this website:
http://rosettacode.org/wiki/Reports:Tasks_not_implemented_in_Torq ueScript

Lets prove them wrong fix some stuff, shall we?
I wrote this code in about 60 seconds.
Bottles of Beer:
Code: [Select]
for(%i = 99; %i > 0; %i--)
{
%n = %i-1;
if(%i == 1)
echo(%i SPC "bottle of beer on the wall ~");
else
echo(%i SPC "bottles of beer on the wall ~");
echo("Take one down, pass it around,");
if(%n == 1)
echo(%n SPC "bottle of beer on the wall.");
else
echo(%n SPC "bottles of beer on the wall.");
}

EDIT: A+B is not done? Bullstuff.

51
I have these lovely functions by truce, but I have no idea how to use them on a non-ascii file, such as an image.

The best idea I can come up with is doing this:

Code: [Select]
%file = new fileObject();
%file.openForRead(%filepath);
while(!%file.isEOF())
$allfile = $allfile @ %file.readline();
%file.close();
%file.delete();

However, due to the fact that openForRead opens it in an ascii format (?), it won't read properly, and will give me the same gibberish as if I had opened it in a text editor.
What alternatives do I have?

Code: [Select]
////////////////////////////////////////
//  Base64 Pack             by Truce  //
////////////////////////////////////////

function convertBase(%val,%atype,%btype)
{
%vlen = strLen(%val);
%alen = strLen(%atype);
%blen = strLen(%btype);

for(%i = 0; %i < %vlen; %i++)
%sum += striPos(%atype,getSubStr(%val,%i,1)) * mPow(%alen,%vlen - %i - 1);

while(1)
{
%rem = %sum % %blen;
%new = getSubStr(%btype,%rem,1) @ %new;
%sum = mFloor(%sum / %blen);

if(!%sum)
break;
}

return %new;
}

function base64Encode(%str)
{
%base64map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
%asciimap  = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN" @
             "OPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~";

%len = strLen(%str);

for(%i = 0; %i < %len; %i++)
{
%chr   = getSubStr(%str,%i,1);
%ascii = strPos(%asciimap,%chr) + 32;
%bin   = convertBase(%ascii,"0123456789","01");

while(strLen(%bin) < 8)
%bin = "0" @ %bin;

%all = %all @ %bin;
}

%len = strLen(%all);

for(%i = 0; %i < %len; %i += 6)
{
%pack = getSubStr(%all,%i,6);

while(strLen(%pack) < 6)
%pack = %pack @ "0";

%dec = convertBase(%pack,"01","0123456789");
%new = %new @ getSubStr(%base64map,%dec,1);
}

while(strLen(%new) % 4 > 0)
%new = %new @ "=";

return %new;
}

function base64Decode(%str)
{
%base64map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
%asciimap  = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN" @
             "OPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~";

while(getSubStr(%str,strLen(%str) - 1,1) $= "=")
%str = getSubStr(%str,0,strLen(%str) - 1);

%len = strLen(%str);

for(%i = 0; %i < %len; %i++)
{
%chr = getSubStr(%str,%i,1);
%pos = strPos(%base64map,%chr);
%bin = convertBase(%pos,"0123456789","01");

while(strLen(%bin) < 6)
%bin = "0" @ %bin;

%all = %all @ %bin;
}

while(strLen(%all) % 8 > 0)
%all = getSubStr(%all,0,strLen(%all) - 1);

%len = strLen(%all);

for(%i = 0; %i < %len; %i += 8)
{
%bin = getSubStr(%all,%i,8);
%dec = convertBase(%bin,"01","0123456789") - 32;
%chr = getSubStr(%asciiMap,%dec,1);

%new = %new @ %chr;
}

return %new;
}

52
SERIOUSLY.


SAVE THE loving MONEY. STOP ASKING US WHAT YOU SHOULD SPEND IT ON.
IF YOU CANNOT DECIDE ON YOUR OWN, SAVE IT UNTIL YOU CAN DECIDE.


UNDERSTAND?

good. /rant

yes, this was worth a topic. all of you noobs who are mindlessly spending money
jegus, it's scary

53
...after disconnect.

I end up with at least 3k webclient tcpobjects, which are generated on connect, because of the auto-refresher I have on my page. I'm concerned this will cause connection issues somehow (see: that rogue mod on kalphiters servers that forgeted up connections), so I attempted to do this:

webClient::onDisconnect(%this)
{
%this.delete();
}


but unfortunately, that doesn't work.


Truces webserver - http://pastebin.com/9q06sz62


This probably won't actually cause a problem, but it is irritating to have this -

the server has been up for only five hours
1000 loving tcpobjects in FIVE HOURS? That's 200 an hour! 3.3 a minute! forget!
The server was up for a few days before I took it down for unrelated reasons, I'm sure it had way over 5000 tcpobjects.

54
Just started using these goddamned things and I cleaned up a file lickity-split.
Now I want to use them in Blockland. Is this possible? the only one I know of that's valid is *... it seems like they aren't, I haven't seen anyone talking about them.

55
Modification Help / Post to blockland forums with HTTP Objects?
« on: May 27, 2012, 10:43:14 PM »
I set up a little wireshark in an attempt to try to read through, but I don't know what the forget I'm doing. Can someone give me some pointers for posting on these forums via script?

56
Off Topic / forget, IT'S MOTHERS DAY
« on: May 13, 2012, 03:54:47 PM »
EMERGENCY; SAY HAPPY MOTHERS DAY TO YOUR MOTHER BEFORE SHE HAS TO REMIND YOU


SAVE YOURSELVESSSSSSSSSS

57
Modification Help / Where can * be used as a wildcard?
« on: May 07, 2012, 04:14:11 PM »
And just how wild is it?
if I put
A*D, will it work on ABCD or just ABD?

58
Simply put, whenever I attempt to make a server with a TCP object it fails.
Client ones, which connect to servers are fine.

One can plainly see the stuffload of echoes I have everywhere, but they rarely give me any useful information.

Code: [Select]
new TCPObject(lugsTCPServ);

function lugsTCPServ::onConnectRequest(%this, %ip, %socket)
{
   if(isObject(%this.connection[%ip]))
   {
      echo(%this.getName() @ ": Got duplicate connection from" SPC %ip);
      %this.connection[%ip].disconnect();
      %this.connection[%ip].delete();
   }
   echo(%this.getName() @ ": Creating connection to" SPC %ip);
   %this.connection[%ip] = new TCPobject("Client", %socket) { class = lugsTCPServ; parent = %this;};
}
 
function lugsTCPServ::onConnected(%this)
{
echo("SRVR:Connected");
}
 
function lugsTCPServ::onConnectFailed(%this)
{
echo("SRVR:Connection Failed");
}
 
function lugsTCPServ::onDisconnect(%this)
{
echo("SRVR:Disconnected");
}

function lugsTCPServ::onLine(%this, %line)
{
echo(%this);
echo(%line);
%mode = getword(%line, 0);
echo(%mode);
%msg = strReplace(%line, getword(%line, 0), "");
echo(%msg);
switch$(%mode)
{
case "CHAT:":
echo("SRVR:CHAT:" SPC %msg);
case "WARNMSG":
warn("SRVR:WARN:" SPC %msg);
default:
echo("SRVR:Message received, unknown mode:" SPC %line);
}
return;
}
lugsTCPServ.listen(8675);


solved: i needed to get onLine from "client" in the code.

see the part where there's "lugTCPServ::onLine"?

That needs to be Client::onLine, using the ambiguous (therefore poorly chosen) names above.

59
Off Topic / Peculiar performance drop on external monitor?
« on: May 06, 2012, 11:53:38 PM »
I got sick of living in 1024x600, so I attached a spare monitor that was laying around to my computer.
I felt like giving blockland a shot, so I loaded it up and moved it onto the external screen.

I got about 5 fps on the main menu.

I tried changing the resolution down to 800x600, that gave me about 10 fps.

I load up into a server for stuffs and giggles at 1024x768, I got about 5-10 fps.

Any ideas?
Not sure what kind of information I should give, so ask questions, please.

The monitor works fine for web browsing and other activities (read:anything but blockland (haven't tried any other games))

60
Add-Ons / Event_setPlayerScaleFull - Better than better!
« on: May 06, 2012, 06:12:16 PM »
So, have you ever used setPlayerScaleBetter?
Have you ever missed out on being a full 5x scale?

Not any more!
Behold, setPlayerScaleFull, where the only limitations are engine limitations!

There's so few limitations, the event doesn't even force you to use a silly slider bar; you get to fill in silly boxes use INTEGERS like REAL MEN.

[TESTOSTERONE]
[HOO-RAH]

onActivate -> Player -> setPlayerScaleFull [5] [5] [555555555555] (ok not really but you get the idea)

Download that crap right NOW!

Pending RTB approval NOW.

Pages: 1 2 3 [4] 5 6 7 8 9 ... 16