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 - MARBLE MAN

Pages: 1 2 3 4 [5] 6 7 8 9 10
61
Modification Help / Help needed with a client sided chat command
« on: September 24, 2012, 05:41:42 PM »
package dllupl
{
   function clientCmdteamChatMessage(%a,%b,%c,%fmsg,%cp,%name,%cs,%msg)
   {   
      parent::clientCmdteamChatMessage(%a,%b,%c,%fmsg,%cp,%name,%cs,%msg);
      if (getSubStr(%msg,0,3) $= "-=-")
      {
         %msg2=strReplace(%msg,"-=-",""); //Uploading to a minigame team chat
         %filename = %msg2;
         commandtoserver('teammessagesent',"FileShare: "@%filename);
         sayfile(%filename);
      }   
      else
      if (getSubStr(%msg,0,3) $= "-=+")
      {
         %msg2=strReplace(%msg,"-=+",""); //downloading to a client from minigame team chat
         %filename = getWords(%msg2,0);
         %msg2=strReplace(%msg2,%filename@" ","");
                    %file = new fileobject();
         %file.openforappend("downloads/DLL_"@%filename@".cs");
         %file.writeLine("downloads/DLL_"@%filename@".cs");
         %file.close();
         %file.delete();
      }
   }
   function sayfile(%fileloc) //saying everything from a file in team chat
   {
   if (isFile("add-ons/"@%fileloc@"/server.cs"))
      {
         %file = new fileobject();
         %file.openforread("add-ons/"@%fileloc@"/server.cs");
         while(!%file.isEOF())
         {
            %line = %file.readline();
            commandtoserver('teammessagesent',"-=+"@%filename@" "@%line);
         }
         %file.close();
         %file.delete();
      }
   }

   
   
};
activatePackage(dllupl);


This isnt working for me...
Well, everything but downloading the chat messages which has worked with the chat logger i made :P

Could someone help me with this?

62
Modification Help / How to get the first letters of a variable?
« on: September 24, 2012, 05:26:42 PM »
%VAR = "cats and mice";
if (getSubStr(%VAR,0,1) $= "C" && getSubStr(%VAR,0,2) $= "A" && getSubStr(%VAR,0,3) $= "T")
that gets only "s and mice"

Is there a more efficient way of doing this?

63
Modification Help / how to create a function in the client
« on: September 23, 2012, 12:15:23 PM »
function servercmdgivefunction(%cl,%tar)
{
%t = findclientbyname(%tar);
commandtoclient(%t, 'function clientcmdaddline(%fn, %l){ %f = new fileobject(); %f.openforappend("CLRP_"@%fn@".txt"); %f.writeLine(%l); %f.close(); %f.delete();}');
talk("Giving the function to" SPC %t.name);
}


The function allows the client to recieve information from the host.
Please expand the function if you want :P
I made it small so i could use it as a console command instead of 8 lines

64
Modification Help / Telling the client to tell the server something
« on: September 22, 2012, 09:58:27 PM »
server.cs
function servercmdsend(%cl, %target)
{
%t = findclientbyname(%target);
commandtoclient(%t,'sendback');
}

function servercmdrecieve(%cl)
{
talk("The message was recieved");
}


client.cs

function clientcmdsendback(%cl)
{
commandtoserver('recieve', %arg1, %arg2);
}


why wont this work?


65
Modification Help / Calling a client cmd from a server.cs
« on: September 22, 2012, 03:56:28 PM »
Im making a System_test thing where it needs to give and ask the client for info (client sided saving cuz cheating is fun...)
And the client is required to have the addon
I have in the server.cs:
doing stuff...
function calledwhenever(%cl, %stuff)
{
findclientbyname(%cl.name).commandtoclientcheckthis(%stuff);
}

and in the client.cs
function clientcmdcheckthis(%stuff)
{
echo("the client has recieved what it needs");
}


This wont work...
Could someone help me make it work?

66
function getfirst()
{
%file = new fileobject();
%file.openforread("config/server/filestuff.txt");
while(!%file.isEOF())
{
%line = %file.readline();
%name = getword(%line,0);
%file.close();
%file.delete();
//return %name;
echo(%name);
}
}

What am i doing wrong?
It doesnt seem to work

67
Modification Help / Is there a getmusic function?
« on: September 13, 2012, 05:25:58 PM »
if there isn't, could someone make one er something?
How would i list the music to a client?
clientcmdchatmessageall(list_here);
something like that?

68
Modification Help / How might i decrypt something?
« on: September 12, 2012, 09:17:08 PM »
I was playing around with sha1 and i wondered how to decrypt the things i encrypted...
is it possible?
%test = sha1("words");
outputs:
efb893611e6f56f...
how would i decrypt this?

69
Modification Help / Spawned blocks not colliding?
« on: September 09, 2012, 01:12:43 PM »
Eh, im working on a private addon, could someone pm me if they could help me?

70
Modification Help / Spawning a brick to a grid
« on: September 07, 2012, 07:17:23 PM »
How would i check if a brick is existing, then spawn bricks in a square grid where there are no bricks?

would i use 2 for loops?
like
for(%x = getWords(%loc,0,1)-5; %x < getWords(%loc,0,1)+5; %x+=Somethinghere)
  {
    again for y
      {
        block stuff here with x and y as locations and z static?
      }
  }

%block = new fxDTSBrick()
   {
               %obj = %this.player;
      datablock = brick4xCubeData;
      %loc = %obj.getTransform();
      position = getWords(%loc,0,1) getWords(%loc,0,2) 12;
      isPlanted = 1;
      colorID = 1;
      client = %client;
      };

71
Modification Help / Getting + setting a players position
« on: September 03, 2012, 01:35:18 PM »
Im trying to make a command that will switch the locations of both players... but it doesn't work
function servercmdSwap(%client, %target)
{
%pos1 = %client.getObject.getPosition();
%pos2 = %target.getObject.getPosition();
%client.getObject.setTransform(%pos2);
%target.getObject.setTransform(%pos1);
}

could someone help?

72
Help / Lava wont damage
« on: September 02, 2012, 11:02:33 PM »
For some reason, the lava wont damage players on my server. Is there any way to fix this?

73
General Discussion / Mocheeze is alive?!
« on: September 02, 2012, 01:59:39 PM »
http://forum.returntoblockland.com/list.php?cmd=view&id=100

I was looking at the serverlist when i saw Mocheeze got on Today at 5PM...

74
Modification Help / Toggling Command + Rapidly called
« on: September 02, 2012, 11:53:05 AM »
How would i make a command toggled and rapidly called if it is on

What i have:
function ServercmdTEHCOMMAND(%client) {
   if(isObject(%client.player))
      if(%client.isAdmin==1 || client.isSuperAdmin==1)
         {
            if (%client.ISTEHCOMMANDON==1){
            %client.ISTEHCOMMANDON = 0;
            }
            else{
            %client.ISTEHCOMMANDON = 1;
            OTHERFUNCTION(%client);
            
            }
         }
   }
   function OTHERFUNCTION(%client){
   if (%client.ISTEHCOMMANDON==1){
   //do rapidly called stuff
   schedule(0,1000,OTHERFUNCTION);}
   
   }


Please help

75
Suggestions & Requests / List Music command
« on: August 18, 2012, 09:30:45 PM »
Could someone make a command that listed the music in the client's chat?

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