Poll

Why do people never listen?

We are idiots!
15 (60%)
DERP
10 (40%)

Total Members Voted: 25

Author Topic: Random Add-Ons [DUMP] (W.I.P.)  (Read 4318 times)

Random Add-Ons [DUMP] (W.I.P.)

These Add-Ons I made are random, simple, and most likely not useful in anyway. (Aging is my first ever Add-On)





[Aging Mod]

Link: NVM

Description: Your avatar begins to grow up overtime. Say /resetAge to reset your age. Say /age to check your age.

EXAMPLE 1: At the age of 21 you will be fully grown.

EXAMPLE 2: At the age of 0 you will be a new born.

Known Bugs: Need to organize code.


[Delete Bot Events]

Link: NVM

Description: Lets you delete bots with "Delete();"

EXAMPLE 1: [onActivate] -> [Self] -> [deleteBot]-[X].

EXAMPLE 2: [onBotActivated] -> [Bot] -> [DeleteBot]-[X].

Known Bugs: None yet.
« Last Edit: March 30, 2015, 08:57:52 AM by Soretooth »

If anyone wants to talk about the code or coding in general PM me. This isn't Modification Discussion.















« Last Edit: March 30, 2015, 08:19:15 AM by Soretooth »

« Last Edit: March 21, 2015, 03:52:23 PM by Midevil Warrior »


The aging serverCmdReset is way too generic of a name.

Code: [Select]
function Player::activateStuff(%client)
{
%v = Parent::activateStuff(%client);
%client = %client.client;

%target = containerRayCast(%client.getEyePoint(),vectorAdd(vectorScale(vectorNormalize(%client.getEyeVector()),3),%client.getEyePoint()),$TypeMasks::playerObjectType,%client);
if(!isObject(%target) || %target == %client)
return %v;

%age = $Aging::Data::ID[%target.client.bl_id,Age];
%name = %target.client.name;
           if(%target.getClassName() $= "Player")
  {
   commandToClient(%client,'messageBoxOk',%name,"Age: " @ %age);
   return %v;
  }
}

Is this tested, because this seems like incorrect usage.



green's a weird color for links
just keep them blue

Not sure if you are actually new or not

Why are some functions packaged when they don't need to be? (The ones that don't have a parent)

I'm also confused on why %name exists.


function serverCmdage(%client,%name)
{
   if(%name $= "")
   {
      messageClient(%client,'',"<color:FFFFFF>You are <color:FFFF00>" @ $Aging::Data::ID[%client.bl_id,Age] @ " <color:FFFFFF>years old.");
   }
}
« Last Edit: March 21, 2015, 04:47:09 PM by Advanced Bot »

Not sure if you are actually new or not

Why are some functions packaged when they don't need to be? (The ones that don't have a parent)

I'm also confused on why %name exists.


   if(%name $= "")


For later usage of other commands I guess. I haven't looked at the code for a awhile honestly. I updated it now.

EDIT: Thanks btw!
« Last Edit: March 22, 2015, 07:02:42 AM by Soretooth »

Updated the DUMP!

-Added Delete Bot Events
« Last Edit: March 30, 2015, 08:28:47 AM by Soretooth »

Updated the DUMP!

-Added Delete Bot Events
Why would you add a boolean to the events and make it do absolutely nothing when the boolean is false.
You also only need 1 line of code for the event on the bot.

registerOutputEvent(Bot, "Delete", "", 1);