Author Topic: Lockpick  (Read 856 times)

Ok.  I've noticed that the LockPick from Iban's CityRPG no longer works due to the switchover to the new JVS-Content System.

Regardless of my motives, I want to get it working again.

I've tried changing some words here and there, but I can hardly be called a scripting expert, so I have no idea what I'm doing.

Anyway, heres the part that needs fixing.

Code: [Select]
function CityRPGPicklockImage::onHitObject(%this, %obj, %slot, %col, %pos, %normal)
{
if(%col.getType() & $TypeMasks::FxBrickObjectType)
{
%client = %obj.client;
%brickData = %col.getDatablock();
if(isObject(%col.door) && %col.door.closed)
{
if(getRandom(0, 3) > 2)
{
for(%i = 0; %col.eventInput[%i] !$= "" && !%doorPath; %i++)
{
if(%col.eventOutput[%i] $= "doorOpen")
%doorPath = %col.eventOutputParameter[%i, 2];
}

switch(%doorPath)
{
case 0: %doorResult = %col.doorOpenCW();
case 1: %doorResult = %col.doorOpenCCW();
default: %doorResult = %col.doorOpen();
}

%col.schedule(3000, "doorClose");

if(%doorResult == 1)
{
%col.schedule(3000, "doorClose");

commandToClient(%client, 'centerPrint', "\c6You have commited a crime. [\c3Breaking and Entering\c6]", 3);
CityRPG_AddDemerits(%client.bl_id, $CityRPG::demerits::breakingAndEntering);
}
else
{
commandToClient(%client, 'centerPrint', "\c6You have commited a crime. [\c3Attempted Breaking and Entering\c6]", 3);
CityRPG_AddDemerits(%client.bl_id, $CityRPG::demerits::attemptedBnE);
}
}
else
commandToClient(%client, 'centerPrint', "\c6Picklocking attempt failed", 1);
}
}
else if(%col.getType() & $TypeMasks::VehicleObjectType)
{
if(%col.locked)
{
%col.locked = false;
CityRPG_AddDemerits(%obj.client.bl_id, $CityRPG::demerits::grandTheftAuto);
commandToClient(%obj.client, 'centerPrint', "\c6You have committed a crime. [\c3Grand Theft Auto\c6]", 5);
}
}

parent::onHitObject(%this, %obj, %slot, %col, %pos, %normal);
}

Any help would be greatly appreciated.  

EDIT:  Issue has been resolved.  You can find the fixed file below.

http://www.mediafire.com/?qb1sjavw5d5mo4l

Thanks to Blaze0 for... it.
« Last Edit: March 25, 2011, 03:33:33 AM by Dglider »



« Last Edit: March 23, 2011, 01:03:25 AM by Dglider »

No what?

No its not Possible?
No you're not going to help?
Or no It doesn't need fixing?

I just want the lockpick.
You basically said,

"Hey there's this thing from Iban's mod I want to use. I won't tell you why but please fix it for me."

So, no. Nobody should offer to help you.

Edit: Cool ninja edit, bro.

You basically said,

"Hey there's this thing from Iban's mod I want to use. I won't tell you why but please fix it for me."

So, no. Nobody should offer to help you.

Edit: Cool ninja edit, bro.

I want it fixed for multiple reasons. 

First off, I hate going to other people's City RPs where they don't have a working lockpick.
Second, Having a tool that can break down doors would be cool wether it was in a City RP or not.
Third, you guessed it, I want to make a City RPG with a working lockpick In it.
« Last Edit: March 23, 2011, 01:12:43 AM by Dglider »

I want it fixed for multiple reasons. 

First off, I hate going to other people's City RPs where they dont have a working lockpick.
Second, Haveing a tool that can break down doors would be cool wether it was in a City RP or not.
Third, you guessed it, I want to make a City RPG with a working lockpick In it.

No.

*sigh* Once again. Why.

Heheh, Im locking the "Lockpick" Topic.

Am I not clever?  ;)

Issue has been resolved.  Locking.