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

Pages: 1 ... 100 101 102 103 104 [105]
1561
Modification Help / Re: Incorrect script, need fixing
« on: January 10, 2012, 10:09:07 AM »
Do people seriously develop Add-Ons in .ZIP format?

1562
Modification Help / Re: Incorrect script, need fixing
« on: January 10, 2012, 10:05:15 AM »
Nothing is wrong with the code, its packaged incorrectly or not enabled or something similar.
You do not need to package new functions, only when overwriting existing ones.



Code: [Select]
function serverCmdRollDice(%client)
{
%rand = getRandom(1, 6);

switch(%rand)
{
case 6:
case 5:
case 4:
case 3:
case 2: messageClient(%client, '', "\c6You rolled a 2! LOL!"); %client.player.kill();
case 1:
default: messageClient(%client, '', "\c6What kind of die is that?");
}
}

getRandom will generate a number between 1 and 6. I don't know where you got 1 through 5 from.

switch() allows you to handle one variable based on many different values easily.

default: handles all exceptions not covered by specific cases. Since 1-6 is cased in the above code, the default message is entirely unnecessary -- hence the message.


The percent sign (%) is called the modulus sign. It gets the remainder of division by the following number. It's like division in elementary school, where the leftovers were put on the side as "r5" instead of being a decimal place.

Code: [Select]
function serverCmdTest(%client)
{
%rand = getRandom(0, 9);

if( (%rand % 3 == 0) && (%rand != 0) )
{
messageClient(%client, '', "You rolled a" SPC %rand @ ", which is evenly divisible by 3.");
}
}

1563
Off Topic / Re: Worst way to die?
« on: January 10, 2012, 04:05:26 AM »
Being swallowed whole.

1564
Add-Ons / Re: Alternative Eval (Support Larger Code)
« on: January 10, 2012, 03:45:06 AM »
I don't understand people's fascination with chat commands. Jookia did the ^carot deal and people are still running scans on all lines of chat for specific text...

The idea is solid, but I don't see why you can't just use the console.

1565
Are you sure it's just your map? If so, post it.

1566
Modification Help / Re: miniGameCanDamage not being invoked + other stuff
« on: January 10, 2012, 03:19:51 AM »
In no way shape or form does your "fix" make any sense. I strongly advise revisiting the problem.

To answer your second question, there is a function like getGroupFromObject(%obj).client
Fetch brick group, find client.

1567
Help / Re: Bug: Infinite Number of Spawned Vehicles from One Spawn
« on: January 10, 2012, 01:50:40 AM »
The spawntime for a vehicle outside of a minigame is immediate. The script does a check after a vehicle reaches 0 HP and is "destroyed". If it's outside a minigame, it immediately respawns it. If it's inside one, it sets a schedule for the vehicle respawn time x 1000ms.

-> On Spawn -> Do Damage -> Check Spawn Time -> Spawn -> On Spawn ... [∞]

Badspot needs to change the way this functions or the add-on creator needs to fix his mod. This is a crash exploit.

1568
There shouldn't be a problem with too little administration as long as it exist... Votekick to clear out troublesome users, admins to deal with prolonged issues.

If the gamemode was not so broken, it would be OK with a handful of moderators. But because it is, you need a bunch of baby sitters.

1569
Why is it so hard for you guys to patch friendly fire on sentry guns? Is it some sort of mismatch between "Slayer" and the Sentry Gun code?

1570
Modification Help / Re: miniGameCanDamage not being invoked + other stuff
« on: January 10, 2012, 12:39:18 AM »
My guess is you're trying to make some sort of gamemode that runs without a minigame.

This isn't a good idea. Blockland is designed to be a brick building game. All combat related stuff is handled by Minigames. Trying to break this system because you don't think your gamemode is "mini" anymore is ill-advised.

You can do a bunch of hacks, like returning a minigame object always in the function getMiniGameFromObject, but the end result is going to be exactly the same -- minus the leave/join messages. If that's your only grievance, your trickery might be better placed trying to hack out the messages.

1571
General Discussion / Re: YorkTown95's CityRPG Server v2.
« on: January 09, 2012, 07:03:40 PM »
Be careful what you add and what you remove. A lot of things included were done because it seemed nifty and would fit the theme, but did not necessarily add anything to game-play. Hunger and Debt are great examples of this. In the early versions of CityRPG, debt could not be forcibly collected. Adding an interest rate did not really urge anyone to pay it off any faster, and the only way that people could be inclined to pay it was by inventing a figure known as "Bob from the IRS" that would send you really angry phone calls and spam tank missiles from the sky at your general direction. Hunger worked similarly, killing you at 0%.

Rewarding players for spending into the economy instead of punishing them for not doing so is how you want to do things.

1572
General Discussion / Re: YorkTown95's CityRPG Server v2.
« on: January 09, 2012, 06:54:01 PM »
What makes this different from the default CityRPG mod?

1573
General Discussion / Re: Isn't the add on system a bit risky?
« on: January 09, 2012, 06:50:06 PM »
You do not understand the concept of a virus or an add-on.

An add-on is a set of scripts that interacts with the Torque Game Engine that Blockland uses. An add-on must conform to a strict set of semantics in order to function. An add-on cannot convince the engine to launch a virus. It does not work that way.

The only way for an add-on to become a virus is if the .ZIP archive contains a .EXE, .APP, .JAR, or similar executable file that is capable of running independently of Blockland. Because add-ons do not need to be extracted after version 9, the idea of launching a virus through a Blockland add-on is an extremely implausible and ineffective method.


The worst an add-on can do is: Delete client configuration files (such as preferences for RTB and your character costume), or use the crash(); function to crash the game.

Pages: 1 ... 100 101 102 103 104 [105]