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 - Advanced Bot

Pages: 1 ... 264 265 266 267 268 [269] 270 271 272 273 274 275
4021
Modification Help / Re: Adding max health on a datablock
« on: December 18, 2012, 08:18:15 AM »
Well, now I did things a different way thanks to Innocent. Instead of adding damage it adds a damage mulitplier as:

Code: [Select]
         %multiplier = clientGroup.getCount() * 50;
         %damage = %damage / %multiplier;

Now I have made 5 playertypes with different strengths and different health, now they can be bosses and don't have the same strength everytime.

4022
Modification Help / Re: Adding max health on a datablock
« on: December 17, 2012, 06:35:10 PM »
Thanks for the help. I will also look at the tf2 medigun about the max damage.

4023
Modification Help / Re: Adding max health on a datablock
« on: December 16, 2012, 10:51:52 PM »
It is not just that now. Now everytime I take out a brick or move, now it makes a death noise and then I can't move.. here is the code:

Code: [Select]
	function Armor::onTrigger(%datablock,%player,%slot,%io)
{
%newDamage = %player.getDatablock().maxDamage;
%clCount = ClientGroup.getcount();
%hp = (%player.getDatablock().maxDamage - %player.getDamageLevel());
%baseAddA = (%newDamage + (%clCount*75));
%class = %player.getClassName();
if(%class $= "AiPlayer" ||%class $= "Player")
{
%player.setDamageLevel(%player.getDatablock().maxDamage + %baseAddA);
messageClient(%client, 'MsgAdminForce', "<color:FFFFFF>Your new health is:<color:00FF00>" SPC %newDamage @ "<color:FF00FF>HP");
}
Parent::onTrigger(%datablock,%player,%slot,%io);
}

4024
Modification Help / Re: Adding max health on a datablock
« on: December 16, 2012, 09:57:34 PM »
Darn. It does not work... The playertype works, but the mod didn't work.. What is wrong?

4025
Modification Help / Re: Adding max health on a datablock
« on: December 16, 2012, 09:35:20 PM »
Would this work? Or do I need to edit it a little?

Code: [Select]
package Base100x75
{
function PlayerBase100x75::onAdd(%this, %client)
{
%newDamage = %this.getDatablock().maxDamage;
%clCount = ClientGroup.getcount();
%maxHP = %this.getFirstDatablock().maxDamage;
%hp = (%this.getFirstDatablock().maxDamage - %this.getDamageLevel());
%baseAddA = (%maxHP + (%clCount*75));
%class = %this.getClassName();
if(%class $= "AiPlayer" ||%class $= "Player")
{
%this.setDamageLevel(%this.getDatablock().maxDamage + %baseAddA);
messageClient(%client, '', "<color:FFFFFF>Your new health is:<color:00FF00>" SPC %newDamage @ "<color:FF00FF>HP");
}
}
};
ActivatePackage(Base100x75);
EDIT: I have updated this code.
NEW EDIT: It has now executed, testing right now if it works.

4026
Modification Help / Re: Adding max health on a datablock
« on: December 16, 2012, 09:31:57 PM »
Hold on, I am going to test this code:

Code: [Select]
package Base100x75
{
function PlayerBase100x75::onAdd(%this, %client)
  {
        %clCount = ClientGroup.getcount();
%maxHP = %this.getFirstDatablock().maxDamage;
%hp = (%this.getFirstDatablock().maxDamage - %this.getDamageLevel());
%baseAddA = (%maxHP + (%clCount*75));
{
        %this.setDamageLevel(%this.getDatablock().maxDamage + %baseAddA);
messageClient(%client, '', "<color:FFFFFF>Your new health is:<color:00FF00>" SPC %this.getDatablock().maxDamage "<color:FF00FF>HP<color:FFFFFF>");
}
  }
};
ActivatePackage(Base100x75);

4027
Modification Help / Re: Adding max health on a datablock
« on: December 16, 2012, 09:29:31 PM »
No...But I have heard that sometimes the error is above the ## error...

4028
Modification Help / Re: Adding max health on a datablock
« on: December 16, 2012, 09:20:19 PM »
Well, I have done this:
   
Code: [Select]
%baseAddA = %maxHP + (ClientGroup.getcount()*75);

But then the error was:

package Base100x75

{

^function PlayerBase100x75::onAdd(%this, %client)

  {

^%maxHP = %this.getFirstDatablock().maxDamage;

^%hp = (%this.getFirstDatablock().maxDamage - %this.getDamageLevel());

^%baseAddA = %maxHP + (ClientGroup.getcount()*75);

^{##
##
    %this.setDamageLevel(%this.getDatablock().maxDamage + %baseAddA);

^messageClient(%client, '', "<color:FFFFFF>Your new health is:<color:00FF00>" SPC %this.getDatablock().maxDamage "<color:FF00FF>HP<color:FFFFFF>");

^}

  }

};

ActivatePackage(Base100x75);

4029
Modification Help / Adding max health on a datablock
« on: December 16, 2012, 09:14:20 PM »
I have created a datablock and I am not sure with is wrong with the code. It will set the max health based on how many players are on the server. Here is the code:

Code: [Select]
package Base100x75
{
function PlayerBase100x75::onAdd(%this, %client)
  {
%maxHP = %this.getFirstDatablock().maxDamage;
%hp = (%this.getFirstDatablock().maxDamage - %this.getDamageLevel());
%baseAddA = %maxHP + (ClientGroup.getcount();*75);
{
    %this.setDamageLevel(%this.getDatablock().maxDamage + %baseAddA);
messageClient(%client, '', "<color:FFFFFF>Your new health is:<color:00FF00>" SPC %this.getDatablock().maxDamage "<color:FF00FF>HP<color:FFFFFF>");
}
  }
};
ActivatePackage(Base100x75);

Here is the error:

%baseAddA = %maxHP + (ClientGroup.getcount();##*##75);

I don't see anything wrong.

4030
Modification Help / Re: Mounting a image to a player with serverCmd
« on: December 12, 2012, 10:04:16 PM »
This is what made it work, here is the code.

Code: [Select]
		function serverCmdMakeMeFire(%client)
{
if(%client.IsAdmin)
  {
announce("<color:FFFFFF>" SPC %client.getPlayerName() SPC "<color:FFFF00>is now on fire.");
%client.player.mountImage("PlayerRainbowFireImage", 3);
  }
  else
  {
  %client.chatmessage("<color:FFFFFF>You must be admin to use this command.");
  }
}

I have also made a Event_setEmitter and it works pretty well. I have 5 different images in the event, I will be making more soon.

4031
General Discussion / Re: Okay, so I re-downloaded Blockland.
« on: December 10, 2012, 11:12:33 PM »
Hi.

I am Hugums.

I am amost known for being a very active of the community a few years back but due to circumstances beyond my control I was unable to play for a long while.

Hi.

Hi.

I am Advanced Bot.

Visolator in Blockland.

I have scripted a few tools, and servers addons. I also have made datablocks. Needed help at first, now I can figure it out on my own.
I have made a player emitter. Like how bricks use emitters.

4032
Modification Help / Re: Mounting a image to a player with serverCmd
« on: December 09, 2012, 11:18:49 PM »
Nvm guys, its works, its just I forgot to add ""
Code: [Select]
		%client.player.mountImage("PlayerColorFireImage", 3);

4033
Modification Help / Re: Mounting a image to a player with serverCmd
« on: December 09, 2012, 07:48:21 PM »
What I am trying to do is is that when they type the command, the image is on them, and it stays there, like an emitter. And the mount point I actually want it to be at is at the pants. The image is supposed to show rainbow fire on them. Here is the code, but it not showing up on them...

Code: [Select]
datablock ParticleData(PlayerRainbowFireParticle)
{
textureName          = "base/data/particles/cloud";
dragCoefficient      = 0.0;
gravityCoefficient   = -3.0;
inheritedVelFactor   = 0.0;
windCoefficient      = 0;
constantAcceleration = 5.0;
lifetimeMS           = 400;
lifetimeVarianceMS   = 100;
spinSpeed     = 0;
spinRandomMin = -90.0;
spinRandomMax =  90.0;
useInvAlpha   = false;

colors[0] = "1 0 0 1";
colors[1] = "0 1 0 1";
colors[2] = "0 0 1 1";
colors[3] = "1 0 1 0";

sizes[0] = 0.0;
sizes[1] = 1.0;
sizes[2] = 0.8;
sizes[3] = 0.6;

times[0] = 0.0;
times[1] = 0.4;
times[2] = 0.7;
times[3] = 1.0;
};

datablock ParticleEmitterData(PlayerRainbowFireEmitter)
{
   ejectionPeriodMS = 12;
   periodVarianceMS = 0;
   ejectionVelocity = 0.1;
   ejectionOffset   = 0.00;
   velocityVariance = 0.0;
   thetaMin         = 0;
   thetaMax         = 35;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvance = false;

   orientParticles = False;

   particles = PlayerRainbowFireParticle;   

uiName = "Player Rainbow Fire";
};

datablock ShapeBaseImageData(PlayerColorFireImage)
{
shapeFile = "base/data/shapes/empty.dts";
emap = false;

mountPoint = $PantsSlot;

stateName[0] = "Ready";
stateTransitionOnTimeout[0] = "FireA";
stateTimeoutValue[0] = 0.01;

stateName[1] = "FireA";
stateTransitionOnTimeout[1] = "Done";
stateWaitForTimeout[1] = True;
stateTimeoutValue[1] = 0.350;
stateEmitter[1] = PlayerRainbowFireEmitter;
stateEmitterTime[1] = 0.350;

stateName[2] = "Done";
stateScript[2] = "onDone";
};

//package is there, and other functions, but will not be seen.

function serverCmdMakeMeFire(%client)
{
if(%client.IsAdmin)
  {
announce("<color:FFFFFF>" SPC %client.getPlayerName() SPC "<color:FFFF00>is now on fire.");
MakeEmitter();
  }
  else
  {
  %client.chatmessage("<color:FFFFFF>You must be admin to use this command.");
  }
}

function MakeEmitter(%client)
{
%client.player.mountImage(PlayerColorFireImage, 3);
        schedule(100, 0, MakeEmitter);
}

4034
Modification Help / Re: Mounting a image to a player with serverCmd
« on: December 09, 2012, 07:39:30 PM »
It is still doing nothing...

4035
Modification Help / Re: Mounting a image to a player with serverCmd
« on: December 09, 2012, 06:57:32 PM »
Lol wow, I also noticed I need to add the ".player" also..

Pages: 1 ... 264 265 266 267 268 [269] 270 271 272 273 274 275