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

Pages: [1]
1
Modification Help / getDatablock returning Nil
« on: July 10, 2009, 01:57:11 AM »
So, I've created a nifty little dynamic brick placing function, yet for some odd reason all of my echos are returning nil except for "%type" which returns an ID, 1032 to be precise. Anyway, when I place the brick it recognizes it as the datablock but all of the other fields do not compute.

Note: LeftPrint is a function I made. Also, the brick is TreeBrickData, not brickTreedata.

Code: [Select]
$StrName["TreeBrickData"] = "TreeBrickData";
$StrMat["TreeBrickData"] = "Root";
$StrCost["TreeBrickData"] = 1;
$StrConfirm["TreeBrickData"] = "You planted a tree!";

package Lolplant
{
function fxDtsBrick::onPlant(%brick)
{
%client = getBrickGroupFromObject(%brick).client;
%brickdatablock = %brick.getDataBlock();
%type = %brick.getDataBlock();

if(%brickdatablock $= nameToID($StrName[%type]) && %client.quantity[$StrMat[%type]] >= $StrCost[%type])
{
echo(%type);
echo($StrConfirm[%type]);
echo($StrCost[%type]);
echo($StrMat[%type]);

%client.Leftprint("\c1" @ $StrConfirm[%type] @ "");
%client.quantity[$StrMat[%type]] -= $StrCost[%type];
%client.quantity["Weight"] -= $StrCost[%type];
parent::onPlant(%brick);
return;
}
}
};
activatepackage(Lolplant);

2
Modification Help / getDts
« on: July 09, 2009, 07:59:32 PM »
How do I find a specific dts rather then datablock.

Such as:
Code: [Select]
if(%col.getDatablock() $= nametoid("Stuffdata"))

Example:?
Code: [Select]
if(%col.getDts() $= nametoid("Add-ons/Script_Test/testshape.dts"))

3
Modification Help / Local Chat
« on: May 30, 2009, 04:15:17 PM »
Hello, I'm trying to make a local chat for my server but for some odd reason when I type something, Ex:
Quote
Hello, my name is bob.
All of the other args I didn't not set have Myname then a zero after it.

Code: [Select]
function serverCmdL(%client,%m,%m2,%m3,%m4,%m5,%m6,%m7,%m8,%m9,%m10,%m11,%m12,%m13,%m14,%m15,%m16,%m17,%m18,%m19,%m20)
{
%position=%client.player.position;
InitContainerRadiusSearch(%position,15,$TypeMasks::PlayerObjectType);
$LocalMsgString='\c7%1 says:\c6 %2 %3 %4 %5 %6 %7 %8 %9 %10 %11 %12 %13 %14 %16 %16 %17 %18 %19 %20';
while((%targetObject=containerSearchNext()) !$= 0)
{
%c = %targetObject.client;
messageClient(%c,'',$LocalMsgString,%client.name,%m,%m2,%m3,%m4,%m5,%m6,%m7,%m8,%m9,%m10,%m11,%m12,%m13,%m14,%m15,%m16,%m17,%m18,%m19,%m20);
}
}

4
Modification Help / Are there any GameConnections left.
« on: May 25, 2009, 05:57:50 PM »
Well, Most of the GameConnections I try to use don't seem to work because Badspot blocked them or something along those lines.

Tried:
  • Createplayer
  • ConnectionRequest + Schedule
  • ClientEnterGame

5
Modification Help / Detecting a strings length.
« on: May 24, 2009, 11:29:01 PM »
How would I go about detecting a strings length for a customizable system.

Code: [Select]
function serverCmdCreateTribe(%client, %Tribename)
{
if(%Tribename//Stringlength > 10)
return;
//stuff
}

6
Modification Help / Destroying a brick *Fixed*
« on: May 24, 2009, 05:36:20 PM »
How would I destroy a brick in general.

Pages: [1]