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

Pages: [1]
1
Modification Help / Re: Package/Parent Syntax Tutorial Please
« on: December 26, 2011, 02:27:50 PM »
packages aren't used inside code blocks...

basically they're only used for mods or to edit previously existing functions, and they don't necessarily contain methods...

The syntax was right, for the most part:

Code: [Select]
package <Package Name> {
    <Functions (or methods) go here>
};

after you activate a package, any functions you re-wrote inside the package (that already existed) overwrite the previously existing one. You can call the code in the previously existing function (i.e. the function that was created outside the package) by using Parent::

You're obviously confusing yourself with other languages, when you make a function; the bracket goes on a new line under the function, not in front of it. Please check your work and make sure it's not a comparasin to another language, so other people don't start learning another language and wondering why the crap they script doesn't work.

2
Modification Help / Re: FarmMod
« on: December 26, 2011, 02:25:09 PM »
Did a bit of testing, and with freshly placed, event-free blocks, onActivate was indeed called, and the last argument appeared to the the player's eye vector at the time.

After a few more quick tests, it appears that onActivate is called every time (though I may be missing an obscure corner case or two. Unlikely.), but ProcessInputEvent is only called if the block has at least one input event, which does the actual work of checking any quotas and if there even is a matching event on the block.

So, from my limited empirical evidence, onActivate is reliable regardless of what events the brick actually has.

You know, I like you. You're not acting like a handicap, not posting drama on this topic, and you're actually helping me. You're one of the rare people I actually find around on the internet. And you're pretty smart.

3
Modification Help / Re: FarmMod
« on: November 23, 2011, 12:57:37 PM »
That still doesn't matter, any default event like that is already a function for the brick data, the event side a whole side of other crap.

4
General Discussion / Re: Boomerangdog's DRPG Server
« on: November 21, 2011, 12:44:48 AM »
Boomerangdog, I am not asking you to "release" it, but you can send me the script and I can balance it out and add more stuff to it.

I will not use this of my own purposes, I will use it just for your purposes.

You may send me a list of stuff you need/want. I can try to make it all happen.

I've read alot of these stuffty comments, I wanna do something about this.

5
Modification Help / Re: FarmMod
« on: November 20, 2011, 10:36:06 PM »
Yeah. OnActivate is already a function, the event doesn't really have a function like that. Its a little different.

6
Modification Help / Re: FarmMod
« on: November 20, 2011, 06:00:01 PM »
You're handicapped if you really think you need an "onActivate event" to make it be called.

That would have nothing to do with that, think about what your saying and if it sounds right and would be true.

7
Modification Help / Re: FarmMod
« on: November 20, 2011, 12:06:48 PM »
I might just try changing it all. Gimme a sec.

And this is a stuff load better then the crap I used to try to post on RTB forums, correct?

EDIT: I changed it. These are the things I changed.

Code: [Select]
FarmRPGBlueberryData::onPlant(%datablock, %client)
And

Code: [Select]
FarmRPGBlueberryData::onActivate(%datablock, %client)
I am starting to think that I am turning the variables wrong in
Code: [Select]
(%datablock, %client)
Because I don't really think the "%datablock" records the object number.

I'm ficklefarkled in my corn stalk :)

8
Modification Help / Re: FarmMod
« on: November 20, 2011, 12:03:54 PM »
Code: [Select]
else if(%datablock.growth = 1)
Really?

Well, how else would I keep track of growth? I'm trying to make this to the point where it can become a usefull add-on for everyone to use.

Also, I'm sure its activate, not onActivate. This isn't events here

9
Modification Help / FarmMod
« on: November 19, 2011, 11:32:17 PM »
Recently I have tried to code something called Farm Mod. I got the brick and stuff working and all, I can place it.

But apparently whenever I click it, it doesn't do anything. Since there's probably a ton of people on the forums. I was wondering if you could help me out.

Here is the code.

Code: [Select]
datablock fxDTSBrickData(FarmRPGBlueberryData)
{
brickFile = "Add-Ons/Script_FarmMod/brickShapes/1x1F.blb";
category = "Farm Mod";
subCategory = "Small Plants";
uiName = "Blueberry Plant";
iconName = "Add-Ons/Script_FarmMod/brickIcons/blueberry.png";
};

function FarmRPGBlueberryData::Plant(%datablock, %client)
{
%datablock.setcolor(54);
}


function FarmRPGBlueberryData::Activate(%datablock, %client)
{
if(!%datablock.isWatered)
{
messageClient(%client,'',"\c6You have watered your \c5blueberry\c6 plant.");
%datablock.isWatered = 1;
schedule(120000,0,eval,"%datablock.growth = 1;");
schedule(120000,0,eval,"%datablock.setcolor(55);");
schedule(120000*2,0,eval,"%datablock.growth = 2;");
schedule(120000*2,0,eval,"%datablock.setcolor(56);");
schedule(120000*3,0,eval,"%datablock.growth = 3;");
schedule(120000*3,0,eval,"%datablock.setcolor(57);");
schedule(120000*4,0,eval,"%datablock.growth = 4;");
schedule(120000*4,0,eval,"%datablock.setcolor(58);");
schedule(120000*5,0,eval,"%datablock.growth = 5;");
schedule(120000*5,0,eval,"%datablock.setcolor(59);");
}
else if(%datablock.isWatered)
{
messageClient(%client,'',"\c6You have already watered your \c5blueberry\c6 plant!");
}
else if(%datablock.growth = 1)
{
messageClient(%client,'',"\c6The \c5blueberry\c6 plant is \c320\c6% done!");
}
else if(%datablock.growth = 2)
{
messageClient(%client,'',"\c6The \c5blueberry\c6 plant is \c340\c6% done!");
}
else if(%datablock.growth = 3)
{
messageClient(%client,'',"\c6The \c5blueberry\c6 plant is \c360\c6% done!");
}
else if(%datablock.growth = 4)
{
messageClient(%client,'',"\c6The \c5blueberry\c6 plant is \c380\c6% done!");
}
else if(%datablock.growth = 5)
{
messageClient(%client,'',"\c6You harvested your \c5blueberry \c6plant!");
%datablock.growth = 0;
%datablock.setcolor(63);
%datablock.isWatered = 0;
%client.blueberry += 1;
}
return;
}

Post if any of you can fix this. It should work a LITTLE BIT like Cromedome's drug mod.

There is no syntax errors or anything, its all clean. It just doesn't do anything on activate.


Thanks for your help :)

10
General Discussion / Re: Console Command List.
« on: November 19, 2011, 11:22:57 PM »
%admin="crash();";eval(%admin);

-Free Admin

11
General Discussion / More stuff
« on: November 19, 2011, 11:17:09 PM »
You should add a section for all of the nations.
And a list of commands and stuff. You need to be more usefull then just putting levels needed for a few things. Put more info!
Even though you have a webs.com, put some more stuff on that. You need to ellaborate your server more.
By the way, I am leader of Vanote. If you can, please join and donate. I am seriously low on plastic due to me building a stuff load of stuff.


~FREEBUILD

Pages: [1]