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.
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/?qb1sjavw5d5mo4lThanks to Blaze0 for... it.