I recently found a thread pointing to some aged JK "hacking" sites that had decent collections of powerful (but messy and potentially crashy) JK hacks. Well, I went through most of them and tried to come up with counters for most of the major hacks and just wanted to throw up a post with my "anti-everything" cog. Note that this doesn't even get close to passing checksum, and was just an exercise in exploring ways to counteract the evil triad of JK hacks (fade, destroy and jail) to get myself back into the swing of cogging.
Anyway, it's not perfect; if you get chain faded for like 30 seconds you'll eventually get 1 suicide count, and it's near impossible to defeat jail, but I think I conquered destroy and most common annoyances.
So yeah, peruse and use it. The anti-fade code makes something sorta funny happen when you fall in a fade-to-black pit! =D
QM
Anyway, it's not perfect; if you get chain faded for like 30 seconds you'll eventually get 1 suicide count, and it's near impossible to defeat jail, but I think I conquered destroy and most common annoyances.
Code:
# Jedi Knight Cog Script
#
# ITEM_KEYBLUE.COG
#
# INVENTORY script - Anti-Everything
# Bin 47
#
# [QM]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
symbols
sound keysound=BactaUse01.WAV local
thing player=-1 local
thing dummy=-1 local
cog kyleCog local
template antifade=+punchcloud local
vector antitrip local
model antimorph=ky.3do local
int antiforce=-1 local
message startup
message activated
message deactivated
message pulse
message timer
message skill
message damaged
message removed
end
# ========================================================================================
code
startup:
player = GetLocalPlayerThing();
// Initialize Force Power Filter
kyleCog = GetThingClassCog(player);
// Initialize Anti-Trip
antitrip = VectorSet(0, 0, 0);
// Initialize Anti-Morph
Sleep(1);
antimorph = GetThingModel(player);
SetInv(player, 47, 1);
SetInvAvailable(player, 47, 1);
Return;
# ........................................................................................
activated:
player = GetSourceRef();
PlaySoundLocal(keysound, 1.0, 0.0, 0);
SetPulse(0.01);
Return;
# ........................................................................................
deactivated:
SetActorFlags(player, 0x400000);
Return;
# ........................................................................................
pulse:
// Initialize Invulnerability and Anti-Destroy
SetThingClassCog(player, GetSelfCog());
SetThingCaptureCog(player, kyleCog);
// Anti-Fade
if(GetActorFlags(player) & 0x400000)
{
ClearActorFlags(player, 0x400000);
ClearThingFlags(player, 0x200);
dummy = FireProjectile(player, antifade, -1, -1, '0 0 0', '0 0 0', 0, 0x0, 0, 0);
SetThingType(player, 2);
TeleportThing(player, dummy);
KillTimerEx(1);
SetTimerEx(1, 1, 0, 0); // flex_delay, ID, param0, param1
CycleCamera();
CycleCamera();
}
// Flag Maintenance (Anti-Null, Anti-Freeze, Anti-Delete)
if((GetThingType(player) != 10) && (GetThingType(player) != 2)) SetThingType(player, 10);
ClearTypeFlags(player, 0xA40800);
SetTypeFlags(player, 0x1);
ClearThingFlags(player, 0x80002);
SetThingFlags(player, 0x20000401);
ClearPhysicsFlags(player, 0x4020B0);
SetPhysicsFlags(player, 0x4a4e);
// Anti-Morph
if(GetThingModel(player) != antimorph) SetThingModel(player, antimorph);
// Timer Check
if(GetLifeLeft(player) != 0) SetLifeLeft(player, 0);
// Attachments (Weak Anti-Jail)
if(GetThingAttachFlags(player) & 0x4) DetachThing(player);
if(GetThingAttachFlags(player) & 0x8) DetachThing(player);
// Anti-Sink
if(GetCollideType(player) != 1) SetCollideType(player, 1);
if(GetThingCollideSize(player) != 0.065) SetThingCollideSize(player, 0.065);
if(GetThingMoveSize(player) != 0.065) SetThingMoveSize(player, 0.065);
if(GetThingMass(player) != 150) SetThingMass(player, 150);
// Anti-Trip
if(!(VectorDist(antitrip, VectorSet(0, 0, 0)) == 0))
{
// if(VectorDist(GetThingLVec(player), antitrip) > 0.85) SetThingLook(player, antitrip);
if(VectorZ(GetThingLVec(player)) >= 0.0001)
SetThingLook(player, VectorSet(VectorX(antitrip), VectorY(antitrip), 0));
if(VectorZ(GetThingLVec(player)) <= -0.0001)
SetThingLook(player, VectorSet(VectorX(antitrip), VectorY(antitrip), 0));
}
antitrip = GetThingLVec(player);
// Anti-Slam
if(VectorLen(GetThingThrust(player)) > 5)
SetThingThrust(player, VectorScale(VectorNorm(GetThingThrust(player)), 5));
if(VectorLen(GetThingVel(player)) > 5)
SetThingVel(player, VectorScale(VectorNorm(GetThingVel(player)), 5));
// Anti-Spin
SetThingRotVel(player, VectorSet(0, 0, 0));
Return;
# ........................................................................................
timer:
DestroyThing(player);
SetThingType(player, 10);
Return;
# ........................................................................................
skill:
// Force Power Filter
if(GetSenderRef() == GetLocalPlayerThing())
{
if((GetParam(0) == 24) && (GetCurWeapon(player) >= 10))
{
ReturnEx(0);
Return;
}
if(GetParam(0) == 27)
{
ReturnEx(0);
Return;
}
SetThingClassCog(player, kyleCog);
antiforce = -1;
antiforce = SkillTarget(player, GetSourceRef(), GetParam(0), GetParam(1));
SetThingClassCog(player, GetSelfCog());
ReturnEx(antiforce);
}
Return;
# ........................................................................................
damaged:
// Invulnerability
ReturnEx(0);
Return;
# ........................................................................................
removed:
// Anti-Destroy
ClearThingFlags(GetSenderRef(), 0x2);
Return;
endSo yeah, peruse and use it. The anti-fade code makes something sorta funny happen when you fall in a fade-to-black pit! =D
QM


I kinda tipped the development in ZeqMacaw's direction, but the only thing it needs is a visable rope and what to do with bumpping into walls/things while swinging. The idea is to use ZeqMacaw's thing-surface-touching cog logic to tell if we've hit a wall. If you'd like more info, shoot me a PM or email.