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.


Messages - Furling²

Pages: 1 ... 92 93 94 95 96 [97] 98 99 100 101 102 ... 121
1441
Off Topic / Re: so today i mowed the lawn
« on: June 25, 2013, 12:16:34 AM »
I want pay to you can mow over my hair need cut.

1442
Modification Help / Re: My Script ( agreement rules)
« on: June 25, 2013, 12:14:19 AM »
Sorry, this is unrelated to your question. You need to change this:
Code: [Select]
Parent::OnClientEnterGame(%this);
to this:
Code: [Select]
return parent::OnClientEnterGame(%this);
or apparently the server will eventually crash.
I did tested it has not crashed. I keep same old code. once I release it, so you can edit it, if you like to.

1443
Modification Help / Re: Brick Spawn Script
« on: June 25, 2013, 12:10:44 AM »
Code: [Select]
package NewSpawn
{
    function fxDtsBrick::getSpawnpoint(%brick)
    {
        %trans = Parent::getSpawnpoint(%brick);
        if(%brick.getDatablock().getID() == brickNewSpawnData.getID())
        { return vectorAdd(%trans, "0 0 1.2") SPC getWords(%trans, 3, 6); }
        else return %trans;
    }
};
activatePackage("NewSpawn");

That should work.

Code: [Select]
datablock fxDTSBrickData (brick4xOctagonSpawnData : brickSpawnPointData)
{
   brickFile = "Add-Ons/Brick_Revloution_Spawn/4xOctagonSpawn.blb";

   specialBrickType = "Brick Spawn";

   orientationFix = 1;

   canCover = false;

   category = "Special";
   subCategory = "Revloution Spawn";
   uiName = "4 x Octagon";
   iconName = "Add-Ons/Brick_Revloution_Spawn/4xOctagon";

   indestructable = true;
};

function brick4xOctagonSpawnData::onPlant(%data, %brick)
{
    brickSpawnpointData::onPlant(%data, %brick);
}

function brick4xOctagonSpawnData::onLoadPlant(%data, %brick)
{
    brickSpawnpointData::onLoadPlant(%data, %brick);
}

package NewSpawn
{
    function fxDtsBrick::getSpawnpoint(%brick)
    {
        %trans = Parent::getSpawnpoint(%brick);
        if(%brick.getDatablock().getID() == brickNewSpawnData.getID())
        { return vectorAdd(%trans, "0 0 1.2") SPC getWords(%trans, 3, 6); }
        else return %trans;
    }
};
activatePackage("NewSpawn");

I did changed to  return vectorAdd(%trans, "0 0 5.2") are same result as spawn under the floor and drop long way down to bottomless.

1444
Modification Help / Re: Endless Mining the 2nd - Let's try this again
« on: June 24, 2013, 10:02:03 PM »
I was considering this, but it would cause a massive framerate drop.
look at [GSF]Ghost's PTP has prints script.
 http://forum.blockland.us/index.php?topic=227601.0
I hope this would be helpful.

1445
Modification Help / Re: Endless Mining the 2nd - Let's try this again
« on: June 24, 2013, 09:50:35 PM »
I love that new ideas, May I suggest add the print on the cubes.

1446
Modification Help / Re: My Script ( agreement rules)
« on: June 24, 2013, 09:34:53 PM »
    $Rules_Title = %file.readLine();
    $Rules_Body = %file.readLine();

You have this, which reads the same line, I think.

Also, make a text file for both of them.

The default has to exist.
Where I put them in the line?

1447
Modification Help / Re: My Script ( agreement rules)
« on: June 24, 2013, 09:14:23 PM »
Global variables is a server variable that never goes away unless the server ends, RTB prefs use global variables, and so does the server.
Global variables use $ and they do not have to be in functions.
Example: $Pref::Server::MaxPlayers = "32"; this would set the max players of your server to 32. When using global variables they can do anything in use.

So like as your script:
$Rules_Title, $Rules_Body <-- These are global variables. But they have to be set though, I will make a script that shows as server-sided.

Code: [Select]
$CanHaveNachos = true; //Resulted as 1

function serverCmdTacos(%c)
{
  if($CanHaveNachos) //Checks if it is enabled
  {
    messageClient(%c,'',"No you cannot.");
    return;
  }
 messageClient(%c,'',"Here are your nachos.");
}
Little understand, anyway I really want finish on this script for text put in title and body.

1448
Modification Help / Re: Furling's Project
« on: June 24, 2013, 08:14:10 PM »
add number 12. Almost finish with agreement rule should be release anytime and slow processing work on number 5

1449
Modification Help / Re: My Script ( agreement rules)
« on: June 24, 2013, 08:03:15 PM »
Do the global variables exist? ($Rules_Title and $Rules_Body)
I not know what this mean? please explain to me.

1450
Modification Help / Re: My Script ( agreement rules)
« on: June 24, 2013, 07:54:30 PM »
You didn't define $Rules_Body before you tried to trim it and get the next line. Also when sending a 'messageBoxYesNo' to a client one of the arguments is the yes command which you need to include. If the client clicks no then MessageBoxNo will be called. It's kinda awkward but it's just the way it is.

Try this:
Code: [Select]
$Rules_File = "config/server/agreementrules.txt";
$DefaultRules_File = "Add-ons/Server_AgreementRules/defaultagreementrules.txt";

function loadRuleFile()
{
    if(!isFile($Rules_File)) //If it doesn't find the rules file...
    fileCopy($DefaultRules_File, $Rules_File); //Copy the one we have.

    %file = new FileObject(); //Create the object to read/write files.
    %file.openForRead($Rules_File); //Open the rules file.
    $Rules_Title = %file.readLine(); //The first line of the file is the title.
    $Rules_Body = %file.readLine(); //Define $Rules_Body
    while(!%file.isEOF()) //Keep reading lines until we reach the end of the file.
    $Rules_Body = trim($Rules_Body NL %file.readLine()); //Add the next line to the rules body. Doing the trim function removes things like spaces and tabs that we don't want.
    %file.close(); //Close the file; important.
    %file.delete(); //Delete the file object.
}
loadRuleFile();

package Rules //we want to make a package
{
    function GameConnection::OnClientEnterGame(%this)
    {
    %this.schedule(2500, sendRules);
    Parent::OnClientEnterGame(%this);
    }

    function GameConnection::sendRules(%this)
    {
    commandToClient(%this,'messageBoxYesNo', $Rules_Title, $Rules_Body,'AcceptRules'); //Send the messagebox properly
    }

    function serverCmdAcceptRules(%cl) //Unsure if this is works, but I think it should. Supposedly this is done when they press yes.
    {
    messageAll('',"\c3" @ %cl.getPlayerName() @ "\c2(ID:" SPC %cl.getBLID() @ ") \c6agreed with Host's Rules.");
           
    }

    function serverCmdMessageBoxNo(%cl) //This is the serverCmd that is done when they press no. (hopefully)
    {
    messageAll('',"\c3Host \c2kicked \c3" @ %cl.getPlayerName() @ "\c2(ID:" SPC %cl.getBLID() @ ") \c6for not agree with Host's Rules.");
    %cl.delete("You were not agree with Host's Rules.");
    }
};
activatePackage(Rules);
Thank you that message in chat box are worked! Last thing the problem issued are pop up box are blank.

1451
Off Topic / Re: loveIEST FORUMER 2013
« on: June 24, 2013, 06:56:05 PM »
Thank GOD! I'm not there!!! Because I never want be there in that damn list. WHEW!!! I would suggest add BADSPOT in that list.

1452
Modification Help / Re: Brick Spawn Script
« on: June 24, 2013, 06:48:19 PM »
That should work. Try it.
YES! It does work!  when I press Ctrl and K to die after I did spawned was under the brick spawn and drop long way down, how I can adjust position put player top at the brick spawn?

1453
Modification Help / My Script ( agreement rules)
« on: June 24, 2013, 04:31:05 PM »
I work on this script and I have help from otton-san, we can't figure out about why does not load the file put in title and body inside the box and title aslo all message does not show in the chat box. the notepad does not install to config/server/agreementrules.txt... here my full code:
Anyway fileobject does not read the text file, I wonder why I am missing here of these lines and messageAll need fix too.

Code: [Select]
$Rules_File = "config/server/agreementrules.txt";
$DefaultRules_File = "Add-ons/Server_AgreementRules/defaultagreementrules.txt";

function loadRuleFile()
{
    if(!isFile($Rules_File)) //If it doesn't find the rules file...
    fileCopy($DefaultRules_File, $Rules_File); //Copy the one we have.

    %file = new FileObject(); //Create the object to read/write files.
    %file.openForRead($Rules_File); //Open the rules file.
    $Rules_Title = %file.readLine(); //The first line of the file is the title.
    while(!%file.isEOF()) //Keep reading lines until we reach the end of the file.
    $Rules_Body = trim($Rules_Body NL %file.readLine()); //Add the next line to the rules body. Doing the trim function removes things like spaces and tabs that we don't want.
    %file.close(); //Close the file; important.
    %file.delete(); //Delete the file object.
}
loadRuleFile();

package Rules //we want to make a package
{
    function GameConnection::OnClientEnterGame(%this)
    {
    %this.schedule(2500, sendRules);
    Parent::OnClientEnterGame(%this);
    }

    function GameConnection::sendRules(%this)
    {
    commandToClient(%this,'messageBoxYesNo', $Rules_Title, $Rules_Body);
    }

    function serverCmdMessageBoxAccept(%cl) //Unsure if this is works, but I think it should. Supposedly this is done when they press yes.
    {
    messageAll('',"\c3" @ %cl.getPlayerName() @ "\c2(ID:" SPC %cl.getBLID() @ ") \c6agreed with Host's Rules.");
            
    }

    function serverCmdMessageBoxNo(%cl) //This is the serverCmd that is done when they press no. (hopefully)
    {
    messageAll('',"\c3Host \c2kicked \c3" @ %cl.getPlayerName() @ "\c2(ID:" SPC %cl.getBLID() @ ") \c6for not agree with Host's Rules.");
    %cl.delete("You were not agree with Host's Rules.");
    }
};
activatePackage(Rules); //activate package after the package is created
Yes and No button are worked.

1454
Modification Help / Re: Brick Spawn Script
« on: June 24, 2013, 02:31:35 PM »
...Guys, spawnpoints are just bricks. The only thing that makes them spawn players is the code in their onPlant and onLoadPlant functions. You're going to have to call that if you want new spawnpoint bricks to work robustly.

Code: [Select]
function brickNewSpawnData::onPlant(%data, %brick)
{
    brickSpawnpointData::onPlant(%data, %brick);
}

function brickNewSpawnData::onLoadPlant(%data, %brick)
{
    brickSpawnpointData::onLoadPlant(%data, %brick);
}
I have add these lines something like this?

Code: [Select]
datablock fxDTSBrickData (brick4xOctagonSpawnData : brickSpawnPointData)
{
   brickFile = "Add-Ons/Brick_Revloution_Spawn/4xOctagonSpawn.blb";

   specialBrickType = "Brick Spawn";

   orientationFix = 1;

   canCover = false;

   category = "Special";
   subCategory = "Revloution Spawn";
   uiName = "4 x Octagon";
   iconName = "Add-Ons/Brick_Revloution_Spawn/4xOctagon";

   indestructable = true;
};

function brick4xOctagonSpawnData::onPlant(%data, %brick)
{
    brickSpawnpointData::onPlant(%data, %brick);
}

function brick4xOctagonSpawnData::onLoadPlant(%data, %brick)
{
    brickSpawnpointData::onLoadPlant(%data, %brick);
}
I am correct or wrong?

1455
General Discussion / Re: YorkTown95's CRP Server
« on: June 24, 2013, 12:28:21 PM »
My suggestion is much better. Make rental/sub-lots so you can build an apartment building and then lease out or sell apartments.
This.

Pages: 1 ... 92 93 94 95 96 [97] 98 99 100 101 102 ... 121