NAME |
Description |
Size |
Screenies |
"60000fights"
TYPE 8
SEQ 1
#
10: 1 1 LEVEL 60000.jkl 0 0 -1 -1
end
# A 4 Floor Elevator
#
# By Edward
symbols
message startup
message activated
thing elev
thing switch1
thing switch2
thing switch3
thing switch4
thing extra
surface call1
surface call2
surface call3
surface call4
flex speed
int floor=0
end
code
startup:
MoveToFrame(elev,floor,speed);
MoveToFrame(switch1,floor,speed);
MoveToFrame(switch2,floor,speed);
MoveToFrame(switch3,floor,speed);
MoveToFrame(switch4,floor,speed);
MoveToFrame(extra,floor,speed);
If(floor==0)
{
SetWallCel(call1,1);
SetWallCel(call2,0);
SetWallCel(call3,0);
SetWallCel(call4,0);
}
Else If(floor==1)
{
SetWallCel(call1,0);
SetWallCel(call2,1);
SetWallCel(call3,0);
SetWallCel(call4,0);
}
Else If(floor==2)
{
SetWallCel(call1,0);
SetWallCel(call2,0);
SetWallCel(call3,1);
SetWallCel(call4,0);
}
Else If(floor==3)
{
SetWallCel(call1,0);
SetWallCel(call2,0);
SetWallCel(call3,0);
SetWallCel(call4,1);
}
Return;
activated:
If(GetSenderRef()==switch1) { floor=0; }
Else If(GetSenderRef()==switch2) { floor=1; }
Else If(GetSenderRef()==switch3) { floor=2; }
Else If(GetSenderRef()==switch4) { floor=3; }
Else If(GetSenderRef()==call1) { floor=0; }
Else If(GetSenderRef()==call2) { floor=1; }
Else If(GetSenderRef()==call3) { floor=2; }
Else If(GetSenderRef()==call4) { floor=3; }
If(floor==0)
{
SetWallCel(call1,1);
SetWallCel(call2,0);
SetWallCel(call3,0);
SetWallCel(call4,0);
}
Else If(floor==1)
{
SetWallCel(call1,0);
SetWallCel(call2,1);
SetWallCel(call3,0);
SetWallCel(call4,0);
}
Else If(floor==2)
{
SetWallCel(call1,0);
SetWallCel(call2,0);
SetWallCel(call3,1);
SetWallCel(call4,0);
}
Else If(floor==3)
{
SetWallCel(call1,0);
SetWallCel(call2,0);
SetWallCel(call3,0);
SetWallCel(call4,1);
}
MoveToFrame(elev,floor,speed);
MoveToFrame(switch1,floor,speed);
MoveToFrame(switch2,floor,speed);
MoveToFrame(switch3,floor,speed);
MoveToFrame(switch4,floor,speed);
MoveToFrame(extra,floor,speed);
Return;
end
# Big Bay
#
# By Edward
symbols
message startup
message activated
message pulse
sector bigbay
thing door1
thing door2
thing door3
thing door4
thing door5
thing door6
thing door7
thing door8
thing support1
thing support2
thing support3
thing support4
thing baydoor
thing safetydoor1
thing safetydoor2
thing sppos0
thing sppos1
thing sppos2
thing sppos3
thing sppos4
thing sppos5
thing sppos6
thing sppos7
thing sppos8
thing sppos9
thing sppos10
thing sppos11
thing sppos12
thing sppos13
thing sppos14
thing sppos15
sound alert
sound splash0
sound splash1
sound splash2
sound splash3
sound empty_10
template sptem0
template sptem1
template sptem2
template sptem3
template sptem4
template sptem5
template sptem6
template sptem7
template bubbles0
template bubbles1
template bubbles2
surface switch
int open=0 local
int pul=0 local
int is local
int ip local
int it local
vector waterfall
vector bringup
surface floor
surface water1
surface water2
surface water3
sector wd1
sector wd2
sector wd3
sector wd4
sector wd5
sector wd6
sector wd7
thing watersounder
sound watersound
material waterf2
material waterf3
material waterf
int ch=1 local
end
#
code
startup:
SetFaceGeoMode(water1,0);
SetSurfaceMat(water2,waterf2);
SetSurfaceMat(water3,waterf3);
SetSectorFlags(bigbay,0x1000);
SetSectorThrust(bigbay,waterfall,0);
MoveToFrame(door1,0,100);
MoveToFrame(door2,0,100);
MoveToFrame(door3,0,100);
MoveToFrame(door4,0,100);
MoveToFrame(door5,0,100);
MoveToFrame(door6,0,100);
MoveToFrame(door7,0,100);
MoveToFrame(door8,0,100);
MoveToFrame(baydoor,0,100);
MoveToFrame(support1,0,100);
MoveToFrame(support2,0,100);
MoveToFrame(support3,0,100);
MoveToFrame(support4,0,100);
MoveToFrame(safetydoor1,1,100);
MoveToFrame(safetydoor2,1,100);
open=0;
return;
activated:
if(GetSenderRef()!=switch) return;
if(open==0)
{
SetWallCel(switch,1);
jkStringConcatAsciiString("Opening bay doors!");
jkStringOutput(-3, -1);
jkStringClear();
PlaySoundThing(alert,sppos15,1,0,100,0x80);
open=1;
MoveToFrame(safetydoor1,0,1);
MoveToFrame(safetydoor2,0,1);
WaitForStop(safetydoor2);
WaitForStop(safetydoor1);
MoveToFrame(door1,1,0.001);
MoveToFrame(door2,1,0.001);
MoveToFrame(door3,1,0.001);
MoveToFrame(door4,1,0.001);
MoveToFrame(door5,1,0.001);
MoveToFrame(door6,1,0.001);
MoveToFrame(door7,1,0.001);
MoveToFrame(door8,1,0.001);
WaitForStop(door1);
SetSurfaceFlags(floor,0x4);
SetSectorthrust(bigbay,bringup,100);
MoveToFrame(baydoor,1,1);
MoveToFrame(support1,1,1);
MoveToFrame(support2,1,1);
MoveToFrame(support3,1,1);
MoveToFrame(support4,1,1);
pul=0;
SetPulse(0.001);
SetSectorFlags(bigbay,0x1002);
SetSectorThrust(bigbay,waterfall,1000);
sleep(0.1);
SetSectorFlags(wd1,0x1002);
sleep(0.1);
SetSectorFlags(wd2,0x1002);
sleep(0.1);
SetSectorFlags(wd3,0x1002);
sleep(0.1);
SetSectorFlags(wd4,0x1002);
sleep(0.1);
SetSectorFlags(wd5,0x1002);
sleep(0.1);
SetSectorFlags(wd6,0x1002);
sleep(0.1);
SetSectorFlags(wd7,0x1002);
sleep(0.1);
SetFaceGeoMode(water1,4);
sleep(0.1);
SetSurfaceMat(water2,waterf);
sleep(0.1);
SetSurfaceMat(water3,waterf);
sleep(0.1);
ch=PlaySoundThing(watersound,watersounder,1,0,10,0x81);
sleep(5);
pul=1;
SetSectorThrust(bigbay,waterfall,0);
sleep(1);
SetPulse(0);
waitforstop(baydoor);
}
else
{
SetWallCel(switch,0);
jkStringConcatAsciiString("Closing bay doors!");
jkStringOutput(-3, -1);
jkStringClear();
PlaySoundThing(alert,sppos7,1,0,100,0x80);
open=0;
MoveToFrame(baydoor,0,1);
MoveToFrame(support1,0,1);
MoveToFrame(support2,0,1);
MoveToFrame(support3,0,1);
MoveToFrame(support4,0,1);
waitforstop(baydoor);
MoveToFrame(door1,0,0.001);
MoveToFrame(door2,0,0.001);
MoveToFrame(door3,0,0.001);
MoveToFrame(door4,0,0.001);
MoveToFrame(door5,0,0.001);
MoveToFrame(door6,0,0.001);
MoveToFrame(door7,0,0.001);
MoveToFrame(door8,0,0.001);
WaitForStop(door1);
PlaySoundThing(empty_10,sppos0[ip],1,0,100,0x80);
pul=1;
SetPulse(0.001);
SetSectorThrust(bigbay,waterfall,5);
SetSurfaceFlags(floor,0x5);
sleep(5);
sleep(0.1);
StopSound(ch,1);
sleep(0.1);
SetFaceGeoMode(water1,0);
sleep(0.1);
ClearSectorFlags(wd7,0x2);
sleep(0.1);
SetSurfaceMat(water2,waterf2);
sleep(0.1);
ClearSectorFlags(wd6,0x2);
sleep(0.1);
SetSurfaceMat(water3,waterf3);
sleep(0.1);
ClearSectorFlags(wd5,0x2);
sleep(0.1);
ClearSectorFlags(wd4,0x2);
sleep(0.1);
ClearSectorFlags(wd3,0x2);
sleep(0.1);
ClearSectorFlags(wd2,0x2);
sleep(0.1);
ClearSectorFlags(wd1,0x2);
sleep(0.1);
sleep(10);
SetPulse(0);
ClearSectorFlags(bigbay,0x2);
MoveToFrame(safetydoor1,1,1);
MoveToFrame(safetydoor2,1,1);
SetSectorThrust(bigbay,waterfall,0);
WaitForStop(safetydoor2);
WaitForStop(safetydoor1);
}
return;
pulse:
is=rand()*4;
ip=rand()*16;
it=rand()*8;
If(pul==0)
{
PlaySoundThing(splash0[is],sppos0[ip],1,-1,50,0x80);
createThing(sptem0[it],sppos0[ip]);
}
else
{
createThing(bubbles0[rand()*2],sppos0[ip]);
}
return;
end
# Bump Light
#
# By Edward and help from DSLS_DeathSythe
#===============
flags=0x240
symbols
#---------------
message activated
message damaged
message trigger
message timer
thing light mask=0x408
thing x
keyframe bump
int is_busy=0 local
int bump_trig
#---------------
end
#===============
code
#---------------
startup:
//-Clear the IS_BUSY...
is_busy = 0;
ThingLight(light, 0, 0.01);
return;
#---------------
activated:
//-Check to see if the cog is busy...
if(is_busy == 1)
return;
//-Make sure it was the light...
if(GetSenderRef() != light)
return;
SendTrigger(-1, bump_trig, 0, 0, 0, 0);
return;
#---------------
damaged:
//-Check to see if the cog is busy...
if(is_busy == 1)
return;
//-Make sure it was the light...
if(GetSenderRef() != light)
return;
SendTrigger(-1, bump_trig, 0, 0, 0, 0);
return;
#---------------
trigger:
//-Make sure that its the right trigger...
if(GetSourceRef() != bump_trig)
return;
//-Check to see if the cog is busy...
if(is_busy == 1)
return;
//-Make the cog busy and set a timer that is as
//-long as the bump keyframe...
is_busy = 1;
SetTimerEx(GetKeyLen(bump), 1, 0, 0);
//-Play key and turn the light on...
PlayKey(light, bump, 1, 0x2);
ThingLight(x, 1, 0.9);
SetTimerEx(1.0, 2, 0, 0);
return;
#---------------
timer:
//-Clear the IS_BUSY...
if(GetSenderID() == 1)
{
is_busy = 0;
return;
}
//-Turn light off...
else
if(GetSenderID() == 2)
ThingLight(x, 0, 1.1);
return;
#===============
end
# Cage
#
# By Edward
flags=0x240
symbols
message activated
message trigger
message pulse
message timer
message damaged
thing cage
thing collide
thing chair
surface switch1
surface switch2
surface onner
keyframe open
keyframe close
template theclone
template magicappear
template magicdisapp
int i=0 local
int key=-1 local
int on=0 local
int c=0 local
int humme=1 local
int humse=2 local
int globe=4000 local
int lite=2000 local
int clone=3001 local
thing z local
thing cloner local
thing player local
sector startsec
sector ss local
sound app
sound dis
sound up
sound hum
sound clholhum
thing light
end
#
code
activated:
if((GetSenderRef()==switch1) || (GetSenderRef()==switch2))
{
SendTrigger(-1,globe,i,0,0,0);
}
Else If(GetSenderRef()==onner)
{
SendTrigger(-1,lite,on,0,0,0);
}
ELSE IF(GetSenderRef()==chair)
{
SendTrigger(-1,clone,c,GetSourceRef(),0,0);
SetTimerEx(0.1,1,0,0);
}
return;
trigger:
if(GetSourceRef()==globe)
{
i=GetParam(0);
If(i==0)
{
if(on==1) return;
StopKey(cage,key,0.1);
key=PlayKey(cage,open,1,0x4);
ThingLight(light,1,1);
PlaySoundThing(up,cage,1,-1,20,0xC0);
i=1;
SetWallCel(switch1,1);
SetWallCel(switch2,1);
MoveToFrame(collide,1,1);
}
else
{
StopKey(cage,key,0.1);
key=PlayKey(cage,close,1,0x4);
PlaySoundThing(up,cage,1,-1,20,0xC0);
i=0;
ThingLight(light,0,1);
SetWallCel(switch1,0);
SetWallCel(switch2,0);
MoveToFrame(collide,0,1);
}
}
else if(GetSourceRef()==lite)
{
on=GetParam(0);
If(on==0)
{
if(i==1) return;
humme=PlaySoundThing(hum,cage,0,-1,10,0x81);
ChangeSoundVol(humme,1,1);
ThingLight(light,10,1);
SetWallCel(onner,1);
on=1;
}
Else
{
StopSound(humme,1);
SetWallCel(onner,0);
ThingLight(light,0,1);
on=0;
}
}
ELSE IF(GetSourceRef()==clone)
{
if(on==0) return;
player=GetParam(1);
c=GetParam(0);
if(c==0)
{
c=1;
SetActorFlags(player,0x800008);
cloner=CreateThingAtPos(theclone,startsec,GetSectorCenter(startsec),'0 0 0');
CaptureThing(cloner);
CreateThing(magicappear,cloner);
PlaySoundThing(app,cloner,1,-1,100,0x80);
humse=PlaySoundThing(clholhum,cloner,1,-1,-1,0x81);
SetThingModel(cloner,GetThingModel(player));
SetPulse(0.01);
}
else
{
c=0;
SetPulse(0);
StopSound(humse,1);
ClearActorFlags(player,0x800008);
SetTimerEx(0.2,2,0,0);
}
}
return;
timer:
if(GetSenderID()==1)
{
if(c==0)
{
SetCameraFocus(0,player);
SetCameraFocus(1,player);
}
else
{
SetCameraFocus(0,cloner);
SetCameraFocus(1,cloner);
}
}
else if(GetSenderID()==2)
{
CreateThing(magicdisapp,cloner);
PlaySoundPos(dis,GetThingPos(cloner),1,-1,100,0x0);
DestroyThing(cloner);
}
return;
pulse:
z=FireProjectile(player,magicappear,-1,-1,'0 0 0','0 0 0',0,0,0,0);
SetThingLook(cloner,GetThingLVec(z));
DestroyThing(z);
printvector(GetThingThrust(player));
SetThingVel(clone,GetThingThrust(player));
SetThingPos(player,GetThingPos(collide));
return;
damaged:
if(GetSenderRef()==cloner)
{
c=0;
SetPulse(0);
ClearActorFlags(player,0x800008);
StopSound(humse,1);
SetTimerEx(0.1,1,0,0);
SetTimerEx(0.2,2,0,0);
}
else
{
ss=rand()*GetSectorCount();
CreateThing(magicdisapp,cloner);
PlaySoundPos(dis,GetThingPos(cloner),1,-1,100,0x0);
z=CreateThingAtPos(magicappear,ss,GetSectorCenter(ss),'0 0 0');
TeleportThing(cloner,z);
PlaySoundThing(app,cloner,1,-1,100,0x80);
}
return;
end
# Cargo Doors
#
# By Edward
symbols
message startup
message activated
message pulse
surface top
surface bottom
surface side
thing door1
thing door2
thing door3
thing door4
thing door5
thing door6
thing door7
thing saftydoor
sound wrong
sound blip
sound warning
sector justoutside
sector indoors
sector vent1
sector vent2
sector vent3
sector vent4
sector vent5
surface water
thing t
thing b
thing s
int i=0 local
vector inwards
end
#
code
startup:
MoveToFrame(door1,0,100);
MoveToFrame(door2,0,100);
MoveToFrame(door3,0,100);
MoveToFrame(door4,0,100);
MoveToFrame(door5,0,100);
MoveToFrame(door6,0,100);
MoveToFrame(door7,0,100);
MoveToFrame(saftydoor,0,100);
SetWallCel(top,0);
SetWallCel(bottom,0);
SetWallCel(side,0);
SetSectorThrust(justoutside,inwards,0);
SetSectorThrust(indoors,inwards,0);
return;
activated:
If(GetSenderRef()==top)
{
SetWallCel(top,1);
PlaySoundThing(wrong,t,1,-1,25,0xC0);
sleep(GetSoundLen(wrong));
SetWallCel(top,0);
}
Else If(GetSenderRef()==bottom)
{
SetWallCel(bottom,1);
PlaySoundThing(wrong,b,1,-1,25,0xC0);
sleep(GetSoundLen(wrong));
SetWallCel(bottom,0);
}
Else If(GetSenderRef()==side)
{
i=0;
SetPulse(0.1);
}
Else
{
PlaySoundThing(wrong,door4,1,-1,25,0xC0);
}
return;
pulse:
i=i+1;
SetWallCel(side,rand()*5);
If(rand()<0.5)
PlaySoundThing(blip,s,1,-1,25,0xC0);
If(i>10)
{
SetPulse(0);
SetWallCel(side,5);
sleep(1);
SetWallCel(top,1);
SetWallCel(bottom,1);
PlaySoundThing(warning,door4,1,-1,50,0xC0);
sleep(1);
MoveToFrame(saftydoor,1,8);
MoveToFrame(door1,1,1);
MoveToFrame(door2,1,1);
MoveToFrame(door3,1,1);
MoveToFrame(door4,1,1);
MoveToFrame(door5,1,1);
MoveToFrame(door6,1,1);
MoveToFrame(door7,1,1);
SetSectorThrust(justoutside,inwards,25);
SetSectorThrust(indoors,inwards,25);
SetSectorFlags(indoors,0x1002);
SetSectorFlags(vent1,0x1002);
SetSectorFlags(vent2,0x1002);
SetSectorFlags(vent3,0x1002);
SetSectorFlags(vent4,0x1002);
SetSectorFlags(vent5,0x1002);
SetSurfaceGeoMode(water,0);
sleep(1);
SetSectorThrust(justoutside,inwards,0);
SetSectorThrust(indoors,inwards,0);
WaitForStop(door1);
SetWallCel(side,0);
sleep(3);
SetWallCel(top,0);
SetWallCel(bottom,0);
PlaySoundThing(warning,door4,1,-1,50,0xC0);
MoveToFrame(door1,0,1);
MoveToFrame(door2,0,1);
MoveToFrame(door3,0,1);
MoveToFrame(door4,0,1);
MoveToFrame(door5,0,1);
MoveToFrame(door6,0,1);
MoveToFrame(door7,0,1);
WaitForStop(door1);
MoveToFrame(saftydoor,0,8);
ClearSectorFlags(indoors,0x2);
ClearSectorFlags(vent1,0x1002);
ClearSectorFlags(vent2,0x1002);
ClearSectorFlags(vent3,0x1002);
ClearSectorFlags(vent4,0x1002);
ClearSectorFlags(vent5,0x1002);
SetSurfaceGeoMode(water,4);
}
return;
end
# Cargo Doors Trap!
#
# By Edward
flags=0x240
symbols
message startup
message activated
message trigger
message timer
thing gh
sector room
template grenades
surface switch
template magic
sound magicsound
sound nomagic
int trig
thing player local
thing m local
int i local
thing dummy local
thing d local
int on=0 local
vector spreadvec0 local
vector spreadvec1 local
vector spreadvec2 local
vector spreadvec3 local
vector spreadvec4 local
vector spreadvec5 local
vector spreadvec6 local
vector spreadvec7 local
vector spreadvec8 local
vector spreadvec9 local
vector spreadvec10 local
vector spreadvec11 local
vector spreadvec12 local
vector spreadvec13 local
vector spreadvec14 local
vector spreadvec15 local
vector spreadvec16 local
vector spreadvec17 local
end
#
code
startup:
sleep(1);
SetWallCel(switch,0);
spreadvec0=VectorSet(0,0,-1);
spreadvec1=VectorSet(0,1,-1);
spreadvec2=VectorSet(1,0,-1);
spreadvec3=VectorSet(0,-1,-1);
spreadvec4=VectorSet(-1,0,-1);
spreadvec5=VectorSet(0,1,0);
spreadvec6=VectorSet(1,1,0);
spreadvec7=VectorSet(1,0,0);
spreadvec8=VectorSet(1,-1,0);
spreadvec9=VectorSet(0,-1,0);
spreadvec10=VectorSet(-1,-1,0);
spreadvec11=VectorSet(-1,0,0);
spreadvec12=VectorSet(-1,1,0);
spreadvec13=VectorSet(0,1,1);
spreadvec14=VectorSet(1,0,1);
spreadvec15=VectorSet(0,-1,1);
spreadvec16=VectorSet(-1,0,1);
spreadvec17=VectorSet(0,0,1);
return;
activated:
if(GetSenderRef()!=switch) return;
if(on==1) return;
player=GetSourceRef();
SetActorFlags(player,0xA00000);
SetCameraFocus(0,gh);
SetTimer(6);
SendTrigger(-1, trig, 0, 0, 0, 0);
return;
timer:
SetCameraFocus(0,player);
ClearActorFlags(player,0xA00000);
return;
trigger:
if(GetSourceRef()!=trig) return;
if(on==1) return;
on=1;
SetWallCel(switch,1);
sleep(1);
m=CreateThingAtPos(magic,room,GetSectorCenter(room),'0 0 0');
CaptureThing(m);
PlaySoundPos(magicsound,GetSectorCenter(room),1,-1,100,0x0);
sleep(1);
d=FireProjectile(player,magic,-1,-1,'0 -0.01 0.01','0 0 0',0,0,0,0);
TeleportThing(player,m);
for(i=0; i<18; i=i+1)
{
dummy=FireProjectile(player, grenades, -1, -1, '0 0 0', '0 0 0', 1.0, 0x60, 0,0);
SetThingVel(dummy,spreadvec0[i]);
}
TeleportThing(player,d);
DestroyThing(d);
sleep(1);
DestroyThing(m);
PlaySoundPos(nomagic,GetSectorCenter(room),1,-1,10,0x0);
sleep(1);
SetWallCel(switch,0);
on=0;
return;
end
# CargoDrop door for this perticular level.
#
# By Edward
symbols
message startup
message activated
thing door
surface switch
sound activate
sound moving
flex speed=1
int i=0 local
end
#
code
startup:
MoveToFrame(door,1,100);
WaitForStop(door);
MoveToFrame(door,0,100);
return;
activated:
If(GetSenderRef()!=switch) return;
PlaySoundthing(activate, door, 1, 1, 10, 0xC0);
PlaySoundThing(moving,door,1,-1,10,0xC0);
If(GetCurFrame(door)==0)
{
SetWallCel(switch,1);
MoveToFrame(door,1,speed);
}
Else
{
SetWallCel(switch,0);
MoveToFrame(door,0,speed);
}
return;
end
# When you touch a thing you get damaged
#
# By Edward
symbols
message touched
thing player local
thing damager
flex mindamage
flex maxdamage
end
#
code
touched:
victim = GetSourceRef();
damage = (Rand() * (maxDamage - minDamage)) + minDamage;
DamageThing(victim, damage, 0x8, victim); // self-inflicted damage
return;
end
# A light with a flare
#
# By Edward
flags=0x240
symbols
message activated
message pulse
message trigger
thing x
surface s
template flare
int i=0 local
int bt=6553 local
end
#
code
activated:
If(GetSenderRef()!=s) return;
SendTrigger(-1,bt,i,0,0,0);
return;
pulse:
CreateThing(flare,x);
return;
trigger:
If(GetSourceRef()!=bt) return;
i=GetParam(0);
If(i==0)
{
SetPulse(0.1);
thinglight(x,10,1);
SetWallCel(s,1);
i=1;
}
else if(i==1)
{
setpulse(0);
thinglight(x,0,1);
SetWallCel(s,0);
i=0;
}
return;
end
# This is a plain old door.
#
# By Edward
symbols
message startup
message activated
thing door
flex speed1
flex speed2
flex delay
flex startdelay
sound opening
sound closing
int frame=0 local
int channel=1 local
end
#
code
startup:
MOVETOFRAME(door,0,1000);
activated:
IF(GETSENDERREF()!=door) RETURN;
IF(frame==1) RETURN;
PLAYSOUNDTHING(opening,door,1,1,10,0xC0);
frame=1;
MOVETOFRAME(door,1,speed1);
WAITFORSTOP(door);
SLEEP(startdelay);
MOVETOFRAME(door,2,speed2);
WAITFORSTOP(door);
SLEEP(delay);
MOVETOFRAME(door,0,speed2);
PLAYSOUNDTHING(closing,door,1,1,10,0xC0);
WAITFORSTOP(door);
frame=0;
end
# This elevator needs switches!
#
# By Edward
symbols
message startup
message activated
thing elev
surface bottom
surface up
surface top
surface down
flex speed
int floor=0
end
code
startup:
MoveToFrame(elev,floor,100);
if(floor==1) {
SetWallCel(bottom,0);
SetWallCel(down,0);
SetWallCel(top,1);
SetWallCel(up,1); }
else if(floor==0) {
SetWallCel(bottom,1);
SetWallCel(down,1);
SetWallCel(top,0);
SetWallCel(up,0); }
return;
activated:
If(GetSenderRef()==bottom)
{
SetWallCel(bottom,1);
SetWallCel(down,1);
SetWallCel(top,0);
SetWallCel(up,0);
if(floor==0) return;
floor=0;
MoveToFrame(elev,floor,speed);
}
Else If(GetSenderRef()==down)
{
SetWallCel(bottom,1);
SetWallCel(down,1);
SetWallCel(top,0);
SetWallCel(up,0);
if(floor==0) Return;
floor=0;
MoveToFrame(elev,floor,speed);
}
Else If(GetSenderRef()==up)
{
SetWallCel(bottom,0);
SetWallCel(down,0);
SetWallCel(top,1);
SetWallCel(up,1);
if(floor==1) Return;
floor=1;
MoveToFrame(elev,floor,speed);
}
Else If(GetSenderRef()==top)
{
SetWallCel(bottom,0);
SetWallCel(down,0);
SetWallCel(top,1);
SetWallCel(up,1);
if(floor==1) Return;
floor=1;
MoveToFrame(elev,floor,speed);
}
return;
end
# Activate Elevator to go up or Down
# When you up and elevator down, press switch
# When you down and elevator up, press switch
#
# By Edward
symbols
message startup
message activated
thing elevator
surface upswitch
surface downswitch
flex speed
int cur=0
end
code
startup:
if(cur==0)
{
SetWallCel(upswitch,1);
SetWallCel(downswitch,0);
MoveToFrame(elevator,0,100);
}
else
{
SetWallCel(upswitch,0);
SetWallCel(downswitch,1);
MoveToFrame(elevator,1,100);
}
Return;
activated:
IF(GetSenderRef()==elevator)
{
if(cur==0)
{
MoveToFrame(elevator,1,speed);
SetWallCel(upswitch,0);
SetWallCel(downswitch,1);
cur=1;
}
else
{
MoveToFrame(elevator,0,speed);
SetWallCel(upswitch,1);
SetWallCel(downswitch,0);
cur=0;
}
}
Else if(GetSenderRef()==upswitch)
{
If(cur==0) Return;
MoveToFrame(elevator,0,speed);
SetWallCel(upswitch,1);
SetWallCel(downswitch,0);
cur=0;
}
Else if(GetSenderRef()==downswitch)
{
If(cur==1) Return;
MoveToFrame(elevator,1,speed);
SetWallCel(upswitch,0);
SetWallCel(downswitch,1);
cur=1;
}
Return;
end
# Engine trap
#
# By Edward
flags=0x240
symbols
message startup
message trigger
message activated
message timer
surface switch
thing cam
thing turn1
thing turn2
template grenade
sound magic
int trig
int on=0 local
thing player local
thing m local
int i local
end
#
code
startup:
sleep(1);
SetWallCel(switch,0);
return;
activated:
If(GetSenderRef()!=switch) return;
if(on==1) return;
player=GetSourceRef();
SetActorFlags(player,0xA00000);
SetCameraFocus(0,cam);
SetTimer(5);
SendTrigger(-1,trig,0,0,0,0);
return;
timer:
SetCameraFocus(0,player);
ClearActorFlags(player,0xA00000);
return;
trigger:
if(GetSourceRef()!=trig) return;
if(on==1) return;
on=1;
SetWallCel(switch,1);
PlaySoundThing(magic,turn1,10,-1,100,0x0);
PlaySoundThing(magic,turn2,10,-1,100,0x0);
sleep(1);
for(i=0; i<32; i=i+1)
{
m=FireProjectile(player,grenade,-1,-1,'0 0 .01','0 0 0',0,0,0,0);
TeleportThing(player,turn1);
SetThingLook(player,VectorSet(rand()*360,rand()*360,rand()*360));
FireProjectile(player,grenade,-1,-1,'0 0 0','0 0 0',rand()*4.00000000,0x1,0,0);
TeleportThing(player,turn2);
SetThingLook(player,VectorSet(rand()*360,rand()*360,rand()*360));
FireProjectile(player,grenade,-1,-1,'0 0 0','0 0 0',rand()*4.00000000,0x1,0,0);
TeleportThing(player,m);
DestroyThing(m);
sleep((rand()*10.00000000)/100.00000000);
}
sleep(3);
SetWallCel(switch,0);
on=0;
return;
end
# Flick a lever and the elevator will move.
#
# startpos=0 bottom
# startpos=1 top
#
# By Edward
symbols
message startup
message activated
message damaged
thing bottomlev
thing toplev
thing elevator
thing liftlight
template boom
template pow
sound moveup
sound movedown
sound callingback
flex leverspeed1
flex leverspeed2
flex elevatorspeed
surface callback
surface callup
int startpos=0
int lastframe
end
# Clickclick... Clackang ratlerattlerattlerattle clompclishj
code
startup:
If(startpos==1)
{
SetWallCel(callback,0);
MoveToFrame(bottomlev,2,100);
MoveToFrame(toplev,0,100);
MoveToFrame(elevator,lastframe,100);
MoveToFrame(liftlight,lastframe,100);
}
Else
{
SetWallCel(callback,1);
MoveToFrame(bottomlev,0,100);
MoveToFrame(toplev,2,100);
MoveToFrame(elevator,0,100);
MoveToFrame(liftlight,0,100);
}
Return;
activated:
If(GetSenderRef()==bottomlev)
{
If(startpos==1) Return;
startpos=1;
SetWallCel(callback,0);
PlaySoundThing(moveup,elevator,1,1,10,0xC0);
MoveToFrame(bottomlev,1,leverspeed1);
WaitForStop(bottomlev);
MoveToFrame(bottomlev,2,leverspeed2);
WaitForStop(bottomlev);
sleep(2);
MoveToFrame(elevator,lastframe,elevatorspeed);
MoveToFrame(liftlight,lastframe,elevatorspeed);
WaitForStop(elevator);
MoveToFrame(toplev,0,leverspeed2);
}
Else If(GetSenderRef()==toplev)
{
If(startpos==0) Return;
startpos=0;
SetWallCel(callback,1);
PlaySoundThing(movedown,elevator,1,1,10,0xC0);
MoveToFrame(toplev,1,leverspeed1);
WaitForStop(toplev);
MoveToFrame(toplev,2,leverspeed2);
WaitForStop(toplev);
sleep(2);
MoveToFrame(elevator,0,elevatorspeed);
MoveToFrame(liftlight,0,elevatorspeed);
WaitForStop(elevator);
MoveToFrame(bottomlev,0,leverspeed2);
}
Else If(GetSenderRef()==callback)
{
startpos=0;
SetWallCel(callback,1);
PlaySoundThing(movedown,elevator,1,1,10,0xC0);
PlaySoundPos(callingback, GetSurfaceCenter(callback), 1, 1, 10, 0x0);
MoveToFrame(toplev,1,leverspeed1);
WaitForStop(toplev);
MoveToFrame(toplev,2,leverspeed2);
WaitForStop(toplev);
sleep(1);
MoveToFrame(elevator,0,elevatorspeed);
MoveToFrame(liftlight,0,elevatorspeed);
WaitForStop(elevator);
MoveToFrame(bottomlev,0,leverspeed2);
SetWallCel(callback,0);
}
Else If(GetSenderRef()==callup)
{
startpos=1;
SetWallCel(callup,1);
PlaySoundThing(movedown,elevator,1,1,10,0xC0);
PlaySoundPos(callingback, SurfaceCenter(callup), 1, 1, 10, 0x0);
MoveToFrame(bottomlev,1,leverspeed1);
WaitForStop(toplev);
MoveToFrame(bottomlev,2,leverspeed2);
WaitForStop(toplev);
sleep(1);
MoveToFrame(elevator,lastframe,elevatorspeed);
MoveToFrame(liftlight,lastframe,elevatorspeed);
WaitForStop(elevator);
MoveToFrame(toplev,0,leverspeed2);
SetWallCel(callup,0);
}
Return;
damaged:
If(GetSenderRef()!=liftlight) Return;
CreateThing(boom,liftlight);
CreateThing(pow,lightlight);
destroything(liftlight);
end
# Press Control panel to activate lights att full!
#
# By DSLS_DeathSythe
flags=0x40
symbols
message startup
message activated
message trigger
thing controlpannel
thing light
flex amount
int on=0 local
sound lighton
sound lightoff
int act_trig local
end
code
startup:
Setthinglight(light,0,0.0);
return;
activated:
//-Send the ACT_TRIG with ON as Param(0)...
SendTrigger(-1, light, on, 0, 0, 0);
return;
#----------
trigger:
//-Make sure that its the right trigger...
if(GetSourceRef() != light)
return;
//-Get the Param(0)...
on = GetParam(0);
//-If ON = 0, turn the light on...
if(on == 0)
{
on = 1;
PlaySoundThing(lighton, controlpannel, 1.0, -1, -1, 0xC0);
ThingLight(light, amount, 0.0);
return;
}
//-Otherwise turn the light off...
on = 0;
PlaySoundThing(lightoff, controlpannel, 1.0, -1, -1, 0xC0);
ThingLight(light, 0.0, 0.0);
return;
end
# Locked Door!
#
# By Edward
flags=0x240
symbols
message activated
surface door
sound locked
sound sayso
end
#
code
activated:
If(GetSenderRef()!=door) return;
PlaySoundLocal(locked,1,0,0xC0);
sleep(1);
PlaySoundLocal(sayso,1,0,0xC0);
return;
end
# Jedi Knight Cog Script
#
# M5_HEALINGSECTOR.COG
#
# Creates some healing areas in M5
# Just enter the sector to be healed at the rate of
# 'healspeed' hitpoints per second.
#
# This makes a pinging sound telling other players that
# someone uses an Healing Area, so watch out... :-)
#
# [YB]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
flags=0x40
symbols
sector healingsc desc=heal_sect
flex healspeed=3.0 desc=heal_speed
int player local
int dummy local
int ticks=0 local
sound sectorsound
message startup
message pulse
end
# ========================================================================================
code
startup:
SetPulse(GetSoundLen(sectorsound)/8);
Return;
# ........................................................................................
pulse:
player = FirstThingInSector(healingsc);
while(player != -1)
{
// If we have a player (10)
if(GetThingType(player)==10)
{
if((GetThingHealth(player) > 0) && (GetThingHealth(player) < 100))
{
ticks=ticks+1;
If(ticks==1) {
HealThing(player, 10);
} else if(ticks==3) {
HealThing(player, 5);
} else if(ticks==4) {
ticks=0;
} else {
HealThing(player, healspeed);
}
}
}
player = NextThingInSector(player);
}
Return;
end
# Jedi Knight Cog Script
#
# M5_HEALINGSECTOR.COG
#
# Creates some healing areas in M5
# Just enter the sector to be healed at the rate of
# 'healspeed' hitpoints per second.
#
# This makes a pinging sound telling other players that
# someone uses an Healing Area, so watch out... :-)
#
# [YB]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
flags=0x40
symbols
sector healingsc desc=heal_sect
flex healspeed=3.0 desc=heal_speed
int player local
int dummy local
sound sectorsound
int ticks=0 local
message startup
message pulse
end
# ========================================================================================
code
startup:
SetPulse(GetSoundLen(sectorsound)/16);
Return;
# ........................................................................................
pulse:
player = FirstThingInSector(healingsc);
while(player != -1)
{
// If we have a player (10)
if(GetThingType(player)==10)
{
if((GetThingHealth(player) > 0) && (GetThingHealth(player) < 100))
{
ticks=ticks+1;
If(tick==1)
{
HealThing(player, 10);
}
Else if(ticks==5)
{
HealThing(player, 5);
}
Else if(ticks==8)
{
ticks=0;
}
else
{
HealThing(player, healspeed);
}
}
}
player = NextThingInSector(player);
}
Return;
end
# Jedi Knight Cog Script
#
# M5_HEALINGSECTOR.COG
#
# Creates some healing areas in M5
# Just enter the sector to be healed at the rate of
# 'healspeed' hitpoints per second.
#
# This makes a pinging sound telling other players that
# someone uses an Healing Area, so watch out... :-)
#
# [YB]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
flags=0x40
symbols
sector healingsc desc=heal_sect
flex healspeed=3.0 desc=heal_speed
int player local
int dummy local
message startup
message pulse
end
# ========================================================================================
code
startup:
SetPulse(0.1);
Return;
# ........................................................................................
pulse:
player = FirstThingInSector(healingsc);
while(player != -1)
{
// If we have a player (10)
if(GetThingType(player)==10)
{
if((GetThingHealth(player) > 0) && (GetThingHealth(player) < 100))
{
HealThing(player, healspeed);
}
}
player = NextThingInSector(player);
}
Return;
end
# Jedi Knight Cog Script
#
# M5_HEALINGSECTOR.COG
#
# Creates some healing areas in M5
# Just enter the sector to be healed at the rate of
# 'healspeed' hitpoints per second.
#
# This makes a pinging sound telling other players that
# someone uses an Healing Area, so watch out... :-)
#
# [YB]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
flags=0x40
symbols
sector healingsc desc=heal_sect
flex healspeed=3.0 desc=heal_speed
int player local
int dummy local
int ticks=0 local
sound sectorsound
message startup
message pulse
end
# ========================================================================================
code
startup:
SetPulse(GetSoundLen(sectorsound)/16);
Return;
# ........................................................................................
pulse:
player = FirstThingInSector(healingsc);
while(player != -1)
{
// If we have a player (10)
if(GetThingType(player)==10)
{
if((GetThingHealth(player) > 0) && (GetThingHealth(player) < 100))
{
ticks=ticks+1;
If(ticks==1)
{
HealThing(player, 5);
}
Else if(ticks==8)
{
ticks=0;
}
else
{
HealThing(player, healspeed);
}
}
}
player = NextThingInSector(player);
}
Return;
end
# Main room trap
#
# By Edward
flags=0x240
symbols
message startup
message activated
message trigger
message timer
thing gh
sector room
template grenades
surface switch
template magic
sound magicsound
int trig
thing player local
thing m local
int i local
thing dummy local
thing d local
int on=0 local
vector lv local
vector lvr local
end
#
code
startup:
sleep(1);
SetWallCel(switch,0);
return;
activated:
if(GetSenderRef()!=switch) return;
if(on==1) return;
player=GetSourceRef();
SetActorFlags(player,0xA00000);
SetCameraFocus(0,gh);
SetTimer(5);
SendTrigger(-1, trig, 0, 0, 0, 0);
return;
timer:
SetCameraFocus(0,player);
ClearActorFlags(player,0xA00000);
return;
trigger:
if(GetSourceRef()!=trig) return;
if(on==1) return;
on=1;
SetWallCel(switch,1);
sleep(1);
m=CreateThingAtPos(magic,room,GetSectorCenter(room),'0 0 0');
CaptureThing(m);
PlaySoundPos(magicsound,GetSectorCenter(room),1,-1,100,0x0);
sleep(1);
m=FireProjectile(player,magic,-1,-1,'0 -0.01 0.01','0 0 0',0,0,0,0);
CaptureThing(m);
for(i=0; i<=GetNumSectorVertices(room); i=i+1)
{
dummy=CreateThingAtPos(grenades,room,GetSectorVertexPos(room, i),'0 0 0');
CaptureThing(dummy);
TeleportThing(player,dummy);
lv=VectorSub(GetThingPos(player),GetSectorCenter(room));
lvr=VectorSet(-VectorX(lv),-VectorY(lv),-VectorZ(lv));
SetThingLook(player,lvr);
d=FireProjectile(player,grenades,-1,-1,'0 0 0','0 0 0',0,0,0,0);
SetThingVel(d,lvr);
DestroyThing(dummy);
}
TeleportThing(player,m);
sleep(3);
SetWallCel(switch,0);
on=0;
return;
end
# Locked Door!
#
# By Edward
flags=0x240
symbols
message activated
surface door0
surface door1
surface door2
surface door3
surface door4
surface door5
surface door6
surface door7
surface door8
surface door9
surface door10
surface door11
surface door12
surface door13
surface door14
surface door15
sound locked
sound sayso0
sound sayso1
sound sayso2
sound sayso3
int i local
end
#
code
activated:
for(i=0; i<16; i=i+1)
{
If(GetSenderRef()==door0[i])
{
PlaySoundLocal(locked,1,0,0xC0);
sleep(1);
PlaySoundLocal(sayso0[rand()*3],1,0,0xC0);
}
}
return;
end
# An old elevator
#
# By Edward
symbols
message activated
thing elev
surface switch1
surface switch2
thing x1
thing x2
sound press
sound elevup
sound elevdown
flex delay
end
#
code
activated:
If(GetSenderRef()==switch1)
{
PlaySoundthing(press,x1,1,-1,10,0xC0);
SurfaceAnim(switch1,6,0x0);
sleep(1);
SetWallCel(switch1,0);
If(GetCurFrame(elev)==0)
{
PlaySoundThing(elevup,elev,1,-1,10,0xC0);
sleep(delay);
MoveToFrame(elev,1,2);
}
else If(GetCurFrame(elev)==1)
{
PlaySoundThing(elevdown,elev,1,-1,10,0xC0);
sleep(delay);
MoveToFrame(elev,0,2);
}
}
Else If(GetSenderRef()==switch2)
{
PlaySoundthing(press,x2,1,-1,10,0xC0);
SurfaceAnim(switch2,6,0x0);
sleep(1);
SetWallCel(switch2,0);
If(GetCurFrame(elev)==0)
{
PlaySoundThing(elevup,elev,1,-1,10,0xC0);
sleep(delay);
MoveToFrame(elev,1,2);
}
else If(GetCurFrame(elev)==1)
{
PlaySoundThing(elevdown,elev,1,-1,10,0xC0);
sleep(delay);
MoveToFrame(elev,0,2);
}
}
return;
end
# Players gets mines under their feet.
#
# By Edward
symbols
message activated
thing player local
int i local
template mines
template magic
sound magicsnd
surface switch
int on=0 local
thing dummy local
thing m local
end
#
code
activated:
If(GetSenderRef()!=switch) return;
If(on==1) return;
on=1;
SetWallCel(switch,1);
sleep(1);
for(i=0; i<=GetNumPlayers(); i=i+1)
{
player=GetPlayerThing(i);
dummy=CreateThing(magic,player);
AttachThingToThing(dummy,player);
PlaySoundThing(magicsnd,player,1,-1,100,0x80);
}
sleep(0.1);
m=FireProjectile(GetSourceRef(),magic,-1,-1,'0 -0.01 0.01','0 0 0',0,0,0,0);
for(i=0; i<=GetNumPlayers(); i=i+1)
{
player=GetPlayerThing(i);
TeleportThing(GetSourceRef(),player);
dummy=FireProjectile(GetSourceRef(),mines,-1,-1,'0 0 0','0 0 0',0,0,0,0);
}
TeleportThing(GetSourceRef(),m);
sleep(1);
SetWallCel(switch,0);
on=0;
return;
end
# Thing emitting sound
#
# By Edward
symbols
message startup
thing emitter
sound noise
flex vol
flex mind
flex maxd
int looping=1
end
#
code
startup:
if(looping==1)
{
PlaySoundThing(noise,emitter,vol,mind,maxd,0xC1);
}
Else
{
PlaySoundThing(noise,emitter,vol,mind,maxd,0xC0);
}
return;
end
# Particle flow
#
# By Edward
symbols
message startup
message pulse
thing emitter
template particles
flex delay
end
code
startup:
setpulse(delay);
return;
pulse:
creatething(particles,emitter);
return;
end
# Radar
#
# By Edward
flags=0x240
symbols
message startup
message pulse
surface radar
flex time
flex fps
end
#
code
startup:
SetPulse(time);
return;
pulse:
SurfaceAnim(radar,fps,0x0);
return;
end
# Random Ambient
#
# By Edward
flags=0x240
symbols
message startup
thing r
sound s0
sound s1
sound s2
sound s3
sound s4
sound s5
sound s6
sound s7
int used_sounds
flex vol
flex min
flex max
end
#
code
startup:
While(1)
{
i=rand()*used_sounds;
PlaySoundThing(s0[i],r,vol,min,max,0x80);
sleep(GetSoundLen(s0[i]));
}
return;
end
# RED ALERT
#
# By Edward
flags=0x240
symbols
message activated
message pulse
message trigger
surface alerter
thing player local
sound ALERT
int i local
int on=0 local
int trtt=666 local
end
#
code
activated:
if(GetSenderRef()!=alerter) return;
SendTrigger(-1,trtt,0,0,0,0);
return;
trigger:
if(GetSourceRef()!=trtt) return;
if(on==0)
{
jkStringConcatAsciiString("RED ALERT!");
jkStringOutput(-3, -1);
jkStringClear();
on=1;
SetPulse(GetSoundLen(ALERT));
}
Else
{
jkStringConcatAsciiString("Clear!");
jkStringOutput(-3, -1);
jkStringClear();
on=0;
SetPulse(0);
}
Return;
pulse:
PlaySoundLocal(ALERT,1,0,0x0);
AddDynamicAdd(GetLocalPlayerThing(), 255, 0, 0);
return;
end
# Rotating platform test
symbols
# type name value special
thing plat
message startup
flex speed
end
#COG code section
code
startup:
while (1) {
rotatepivot(plat, 1, speed);
WaitForStop(plat);
}
stop;
end
# Generic elevator
symbols
message startup
thing elevator desc=elevator_object
flex speed=2.0 desc=movement_speed
flex waittime=4.0 desc=wait_time_at_stop
end
#COG code section
code
startup:
while (1) {
movetoframe(elevator, 1, speed);
sleep(waittime);
movetoframe(elevator, 0, speed);
sleep(waittime);
}
end
# Kitchen sink
#
# By Edward
symbols
message activated
thing bubble
sound warm
sound lever
thing leaver
int i=0 local
end
#
code
activated:
If(GetSenderRef()!=leaver) Return;
If(i==0)
{
MoveToFrame(leaver,1,1);
MoveToFrame(bubble,1,1);
PlaySoundThing(lever,leaver,1,-1,10,0xC0);
PlaySoundThing(warm,bubble,1,-1,10,0xC0);
i=1;
}
Else If(i==1)
{
MoveToFrame(leaver,0,1);
MoveToFrame(bubble,0,1);
PlaySoundThing(lever,leaver,1,-1,10,0xC0);
i=0;
}
return;
end
# Stoves
#
# By Edward
symbols
message startup
message activated
surface stove0
surface stove1
surface stove2
surface stove3
int i local
int z=0 local
end
#
code
startup:
for(i=0; i<4; i=i+1)
SetWallCel(stove0[i],1);
return;
activated:
if(z==1) return;
For(i=0; i<4; i=i+1)
{
If(GetSenderRef()==stove0[i])
{
z=1;
SetWallCel(stove0[i],0);
sleep(1);
SetWallCel(stove0[i],1);
z=0;
}
}
return;
end
# Teleport by Surface
#
# By Edward
symbols
message startup
message timer
message activated
surface surf
thing theplacetobe
thing player local
template magic
sound teling
end
#
code
startup:
SetTimerEx(1,10,0,0);
return;
activated:
if(GetSenderRef()!=surf) return;
if(GetWallCel(surf)==1) return;
SetWallCel(surf,1);
player=GetSourceRef();
CreateThing(magic,GetSourceRef());
CreateThing(magic,theplacetobe);
PlaySoundThing(teling,GetSourceRef(),1,-1,-1,0x0);
PlaySoundThing(teling,GetSourceRef(),1,-1,-1,0x80);
PlaySoundThing(teling,theplacetobe,1,-1,-1,0x0);
SetTimerEx(.1,20,0,0);
return;
timer:
if(GetSenderID()==10)
{
SetWallCel(surf,0);
}
else if(GetSenderID()==20)
{
TeleportThing(player,theplacetobe);
SetTimerEx(1,30,0,0);
}
else if(GetSenderID()==30)
{
SetWallCel(surf,0);
}
return;
end
# Brings up a tele(pari)scope
#
# By Edward
symbols
message startup
message activated
thing toptele
int ttnf
thing bottomtele
int btnf
thing telehandle1
int th1nf
thing telehandle2
int th2nf
thing activatable
int vpnf
thing viewpoint
thing sound
thing rotater
int speed
sound click
sound move
sound levers
sound rotate
sound groaning
int viewing=0 local
int dir=1 local
int up=0 local
end
#
code
startup:
MoveToFrame(toptele,0,100);
moveTOframe(bottomtele,0,100);
MOVEtoFRAME(telehandle1,0,100);
MOVETOFRAME(telehandle2,0,100);
MoVeToFrAmE(viewpoint,0,100);
Return;
activated:
If(GetSenderRef()==activatable)
{
if(up==0)
{
dir=1;
up=1;
PlaySoundThing(click,activatable,1,1,10,0xc0);
sleep(1);
jkStringConcatAsciiString("Periscope UP!");
PlaySoundPos(move,GetThingPos(sound),1,1,10,0x0);
MoveToFrame(toptele,ttnf,speed);
moveTOframe(bottomtele,btnf,speed);
MOVEtoFRAME(telehandle1,1,speed);
MOVETOFRAME(telehandle2,1,speed);
MoVeToFrAmE(viewpoint,vpnf,speed);
waitforstop(telehandle1);
PlaySoundPos(levers,GetThingPos(sound),1,1,10,0x0);
MOVEtoFRAME(telehandle1,th1nf,speed);
MOVETOFRAME(telehandle2,th2nf,speed);
}
Else
{
up=0;
PlaySoundThing(click,activatable,1,1,10,0xc0);
sleep(1);
If(dir!=1)
{
skipToFrame(toptele,1,speed);
skipToFrame(rotater,0,speed);
WaitForStop(toptele);
MoveToFrame(toptele,1,speed);
WaitForStop(rotater);
MoveToFrame(rotater,0,speed);
PlaySoundPos(rotate,GetThingPos(sound),1,1,10,0x0);
WaitForStop(toptele);
}
dir=1;
PlaySoundPos(levers,GetThingPos(sound),1,1,10,0x0);
MOVEtoFRAME(telehandle1,1,speed);
MOVETOFRAME(telehandle2,1,speed);
WaitForStop(telehandle1);
jkStringConcatAsciiString("Periscope DOWN!");
PlaySoundPos(move,GetThingPos(sound),1,1,10,0x0);
MoveToFrame(toptele,0,speed);
moveTOframe(bottomtele,0,speed);
MOVEtoFRAME(telehandle1,0,speed);
MOVETOFRAME(telehandle2,0,speed);
MoVeToFrAmE(viewpoint,0,speed);
}
}
Else if(GetSenderRef()==rotater)
{
if(up==0)
{
PlaySoundPos(groaning,GetThingPos(sound),1,1,10,0x0);
}
Else
{
PlaySoundPos(rotate,GetThingPos(sound),1,1,10,0x0);
If(dir==1)
{
jkStringConcatAsciiString("View=Right");
MoveToFrame(toptele,2,speed);
MoveToFrame(viewpoint,2,speed);
MoveToFrame(rotater,1,speed);
dir=2;
}
Else If(dir==2)
{
jkStringConcatAsciiString("View=Rear");
MoveToFrame(toptele,3,speed);
MoveToFrame(viewpoint,3,speed);
MoveToFrame(rotater,2,speed);
dir=3;
}
Else If(dir==3)
{
jkStringConcatAsciiString("View=Left");
MoveToFrame(toptele,4,speed);
MoveToFrame(viewpoint,4,speed);
MoveToFrame(rotater,3,speed);
dir=4;
}
Else If(dir==4)
{
jkStringConcatAsciiString("View=Foward");
SkipToFrame(toptele,1,speed);
SkipToFrame(viewpoint,1,speed);
SkipToFrame(rotater,0,speed);
WaitForStop(toptele);
MoveToFrame(toptele,1,speed);
WaitForStop(viewpoint);
MoveToFrame(viewpoint,1,speed);
WaitForStop(rotater);
MoveToFrame(rotater,0,speed);
dir=1;
}
}
}
jkStringOutput(GetSourceRef(), -1);
jkStringClear();
Return;
end
# The other part of a telescope
#
# By Edward
flags=0x240
symbols
message activated
thing bottomtele
int viewing=0 local
thing viewpoint
end
#
code
activated:
if(GetSenderRef()==bottomtele)
{
If(viewing==0)
{
SetCurrentCamera(0);
SetCameraFocus(0,viewpoint);
viewing=1;
}
Else
{
SetCurrentCamera(0);
SetCameraFocus(0,GetLocalPlayerThing());
viewing=0;
}
}
return;
end
# Theaters
#
# By Edward
flags=0x240
symbols
message startup
message activated
message trigger
surface switch
surface duk
material blue
material movie
sound on
sound off
sound audio
thing light
int i=0 local
int c=1 local
int tr=1337 local
end
#
code
startup:
SetSurfaceMat(duk,blue);
SetWallCel(switch,0);
ThingLight(light,0,0.0);
SetFaceType(duk,0x2);
return;
activated:
If(GetSenderRef()!=switch) return;
SendTrigger(-1,tr,i,0,0,0);
return;
trigger:
if(GetSourceRef()!=tr) return;
i=GetParam(0);
If(i==0)
{
SetWallCel(switch,1);
PlaySoundThing(on,light,1,-1,10,0xC0);
ThingLight(light,1,1);
SetSurfaceMat(duk,movie);
sleep(0.5);
ClearFaceType(duk,0x2);
i=1;
c=PlaySoundThing(audio,light,1,-1,10,0xC1);
}
else if(i==1)
{
StopSound(c,1);
SetWallCel(switch,0);
PlaySoundThing(off,light,1,-1,10,0xC0);
ThingLight(light,0,1);
SetFaceType(duk,0x2);
sleep(0.5);
SetSurfaceMat(duk,blue);
i=0;
}
return;
end
# When cross an adjoin, Something gets created and sound is played.
#
# By Edward
flags=0x240
symbols
message crossed
thing player local
template createthis
surface crossable
sound playable
end
#____-*>---------------------->*--____
code
crossed:
If(GetSenderRef()!=crossable) Return;
player=GetSourceRef();
CreateThing(createthis,player);
PlaySoundPos(playable, GetThingPos(player), 1, -1, 10, 0x0);
PlaySoundThing(playable,player,1,0,10,0x80);
Return;
end
# Wheel Drop
#
# [PJB]
symbols
message startup
message activated
thing pan
thing left
thing right
thing wheel0
thing wheel1
thing wheel2
thing wheel3
thing wheel4
thing wheel5
thing wheel6
thing wheel7
sound move
sound pull
sound push
int i=0 local
int z local
end
#
code
startup:
for(z=0; z<8; z=z+1)
MoveToFrame(wheel0[z],0,100);
return;
activated:
If((GetSenderRef()==left) || (GetSenderRef()==pan) || (GetSenderRef()==right))
{
If(i==0)
{
i=2;
MoveToFrame(left,1,1);
MoveToFrame(right,1,1);
PlaySoundThing(pull,pan,1,-1,10,0xC0);
WaitForStop(left);
for(z=0; z<8; z=z+1)
{
MoveToFrame(wheel0[z],1,1);
PlaySoundThing(move,wheel0[z],1,-1,10,0xC0);
}
for(z=0; z<8; z=z+1)
WaitForStop(wheel0[z]);
i=1;
}
else if(i==1)
{
i=2;
MoveToFrame(left,0,1);
MoveToFrame(right,0,1);
PlaySoundThing(push,pan,1,-1,10,0xC0);
WaitForStop(left);
for(z=0; z<8; z=z+1)
{
MoveToFrame(wheel0[z],0,1);
PlaySoundThing(move,wheel0[z],1,-1,10,0xC0);
}
for(z=0; z<8; z=z+1)
WaitForStop(wheel0[z]);
i=0;
}
}
return;
end
MSGS 3
# "" ""
"60000" 0 "60000 Fights Under the Sea"
"60000_TEXT_00" 0 ""
"60000_TEXT_01" 0 " "
END
60000fights | JK MP LEVEL Levels: 1
60000 Fights Under the Sea
This here is one of my first levels made in JED. That would be the reason it is boxy. I haven't bothered smoothing it out because I'm lazy, and was afraid of invalid surfaces/adjoins (I know better now but can't be arsed to remake this one just yet). Anyway, this takes place in an exploration submarine, underwater, and is kinda good for machinema if you feel like it, or just simply drown each other. ;)
| 18.85 Mb |
|
#Level master COG
#Generated by JED 0.95 beta
symbols
message startup
message timer
int player local
end
code
startup:
// Register COG as master COG
SetMasterCOG(GetSelfCOG());
player = GetLocalPlayerThing();
// Initialise Goals
SetInv(player, 99, 1000);
// Give player weapons and ammo
SetInv(player, 1, 1); // fists
SetInv(player, 2, 1); // briar
SetInv(player, 10, 1); // Lightsaber
SetInv(player, 11, 100); // Energy
// Initialize weapon.
SetFireWait(player, -1);
SetMountWait(player, 0);
SetCurInvWeapon(player, 0);
SelectWeapon(player, AutoSelectWeapon(player, 1));
SetTimer(15);
timer:
// Force ranking
SetInv(player, 20, 8);
SetInv(player, 14, 4*50);
jkSyncForcePowers();
Return;
end
"Crates"
TYPE 8
SEQ 1
#
10: 0 1 LEVEL CrateCrazy.jkl 0 0 -1 -1
end
MSGS 3
# "" ""
"CRATECRAZY" 0 "Crate Crazy!"
"CRATECRAZY_TEXT_00" 0 "^GET LOST!"
"CRATECRAZY_TEXT_01" 0 " (Literally)"
END
Crates | JK MP LEVEL Levels: 1
Crate Crazy
This is a level where you are inside a maze of crates. One of my very first MP levels.
| 78.88 Kb |
|
"Edward's Rolling!"
TYPE 8
SEQ 1
#
10: 1 1 LEVEL Roller.jkl 0 0 -1 -1
end
# Baren bjuder på de följande:
#
# By Edward
symbols
message activated
surface hp
surface sb
surface bt
surface fb
surface b
thing drop0
thing drop1
thing drop2
thing drop3
template tel
sound vat
template health
template shield
template bacta
template force
template battery
int i=0 local
end
#
code
activated:
If(GetSenderRef()==hp)
{
for(i=0; i<4; i=i+1) {
CreateThing(tel,drop0[i]);
CreateThing(health,drop0[i]);
PlaySoundThing(vat,drop0[i],1,-1,10,0xC0);
sleep(0.25); }
}
else If(GetSenderRef()==sb)
{
for(i=0; i<4; i=i+1) {
CreateThing(tel,drop0[i]);
CreateThing(shield,drop0[i]);
PlaySoundThing(vat,drop0[i],1,-1,10,0xC0);
sleep(0.25); }
}
else If(GetSenderRef()==bt)
{
for(i=0; i<4; i=i+1) {
CreateThing(tel,drop0[i]);
CreateThing(bacta,drop0[i]);
PlaySoundThing(vat,drop0[i],1,-1,10,0xC0);
sleep(0.25); }
}
else If(GetSenderRef()==fb)
{
for(i=0; i<4; i=i+1) {
CreateThing(tel,drop0[i]);
CreateThing(force,drop0[i]);
PlaySoundThing(vat,drop0[i],1,-1,10,0xC0);
sleep(0.25); }
}
else If(GetSenderRef()==b)
{
for(i=0; i<4; i=i+1) {
CreateThing(tel,drop0[i]);
CreateThing(battery,drop0[i]);
PlaySoundThing(vat,drop0[i],1,-1,10,0xC0);
sleep(0.25); }
}
return;
end
##########################################################
# Jedi Knight Cog Script (JK)
#---------------------------------------------------------
# grabbottle00.COG
# Description
#---------------------------------------------------------
# Written By DSLS_DeathSythe
# This COG is NOT supported by LucasArts Entertainment Co.
##########################################################
symbols
#---------------------------------------------------------
message startup
message activated
message pulse
message join
thing player=-1 local
thing sender_thng=-1 local
thing dummy=-1 local
thing bottle0
thing bottle1
thing bottle2
thing bottle3
thing bottle4
thing bottle5
thing trash=-1
model bottle_tpl0
model bottle_tpl1
model bottle_tpl2
model bottle_tpl3
model bottle_tpl4
model bottle_tpl5
model weaponMesh=fistg.3do local
sound pickup_snd=-1
sound drop_snd=-1
flex wait=0.25
int a=0 local
int i=0 local
#---------------------------------------------------------
end
#=========================================================
code
#---------------------------------------------------------
startup:
Sleep(1.0);
if(IsServer())
{
player = GetLocalPlayerThing();
CaptureThing(player);
SetPulse(wait);
}
return;
#---------------------------------------------------------
activated:
sender_thng = GetSenderRef();
player = GetSourceRef();
for(i=0; i<6; i=i+1)
{
if(sender_thng == bottle0[i])
{
if(GetThingUserData(player) & 0x4000000)
return;
SetThingUserData(player, 0x4000000+i);
jksetweaponmesh(player,bottle_tpl0[i]);
PlaySoundThing(pickup_snd, player, 1.0, -1, -1, 0x80);
}
else if(sender_thng==trash)
{
if(GetThingUserData(player) & 0x4000000)
{
Print("throwing bottle...");
SetThingUserData(player, 0);
jksetweaponmesh(player,weaponMesh);
PlaySoundThing(drop_snd, player, 1.0, -1, -1, 0x80);
return;
}
}
}
return;
#--------------------------------------------------------
pulse:
for(a=0; a
# Bulls Eye!
#
# By Edward
# Triggers by DSLS_DeathSythe
flags=0x240
symbols
message entered
message trigger
sector middle
sound tada
thing player local
int trig=10000 local
end
#
code
entered:
If(GetSenderRef()!=middle) return;
player = GetSourceRef();
SendTrigger(-1, trig, player, 0, 0, 0);
return;
trigger:
if(GetSourceRef() != trig) return;
PlaySoundLocal(tada,1,0,0xC0);
SetPlayerKills(GetParam(0), GetPlayerKills(GetParam(0)) + 1);
SetPlayerScore(GetParam(0), GetPlayerScore(GetParam(0)) + 1);
jkStringClear();
jkStringConcatPlayerName(GetParam(0));
jkStringConcatAsciiString(" made a Bulls Eye and has resieved 1 extra point!");
jkStringOutput(-3, -1);
jkStringClear();
return;
end
# Bump Light
#
# By Edward and help from DSLS_DeathSythe
#===============
flags=0x240
symbols
#---------------
message activated
message damaged
message trigger
message timer
message touched
thing light mask=0x408
keyframe bump=bumplight.key local
int is_busy=0 local
int bump_trig
#---------------
end
#===============
code
#---------------
startup:
//-Clear the IS_BUSY...
is_busy = 0;
ThingLight(light, 0, 0.01);
return;
#---------------
activated:
//-Check to see if the cog is busy...
if(is_busy == 1)
return;
//-Make sure it was the light...
if(GetSenderRef() != light)
return;
SendTrigger(-1, bump_trig, 0, 0, 0, 0);
return;
#---------------
damaged:
//-Check to see if the cog is busy...
if(is_busy == 1)
return;
//-Make sure it was the light...
if(GetSenderRef() != light)
return;
SendTrigger(-1, bump_trig, 0, 0, 0, 0);
return;
#---------------
trigger:
//-Make sure that its the right trigger...
if(GetSourceRef() != bump_trig)
return;
//-Check to see if the cog is busy...
if(is_busy == 1)
return;
//-Make the cog busy and set a timer that is as
//-long as the bump keyframe...
is_busy = 1;
SetTimerEx(GetKeyLen(bump), 1, 0, 0);
//-Play key and turn the light on...
PlayKey(light, bump, 1, 0x2);
ThingLight(light, 1, 0.9);
SetTimerEx(1.0, 2, 0, 0);
return;
#---------------
timer:
//-Clear the IS_BUSY...
if(GetSenderID() == 1)
{
is_busy = 0;
return;
}
//-Turn light off...
else
if(GetSenderID() == 2)
ThingLight(light, 0, 1.1);
return;
#===============
touched:
//-Check to see if the cog is busy...
if(is_busy == 1)
return;
//-Make sure it was the light...
if(GetSenderRef() != light)
return;
SendTrigger(-1, bump_trig, 0, 0, 0, 0);
return;
end
# Jedi Knight Cog Script
#
# crouchroll.COG
#
# Roll
#
# Made for Rolling Revolution
#
# By ID_Junkguy
#
# (c) 2003 ID_Junkguy.
symbols
thing player local
keyframe frontroll=rolling.key local
int rollcount=0 local
int attachFlags local
message startup
message pulse
end
# ========================================================================================
code
startup:
player = GetLocalPlayerThing();
SetPulse(0.1);
Return;
# ----------------
pulse:
if (IsThingCrouching(player))
{
attachFlags = GetAttachFlags(player);
if((attachFlags & 1) || (attachFlags & 2))
{
DetachThing(player);
ApplyForce(player, VectorScale(GetThingUVec(player), 90.0));
ApplyForce(player, VectorScale(GetThingLVec(player), 150.0));
}
else
{
ApplyForce(player, VectorScale(GetThingLVec(player), 120.0));
}
if(rollcount == 0)
{
PlayKey(player, frontroll, 2, 32);
}
rollcount = rollcount + 1;
if(rollcount >= 3)
{
rollcount = 0;
}
}
else if (rollcount > 0)
{
rollcount = 0;
}
Return;
# --------------
end
# Done Lap!
#
# By Edward
# Trigger by DSLS_DeathSythe
flags=0x240
symbols
message crossed
message trigger
message timer
surface crossit
thing player local
sound done
int trig=1000 local
int dony=0 local
end
#
code
crossed:
If(GetSenderRef()!=crossit) return;
player = GetSourceRef();
SendTrigger(-1, trig, player, 0, 0, 0);
return;
trigger:
if(GetSourceRef()!=trig) return;
If(dony==1) return;
dony=1;
SetTimer(1);
PlaySoundLocal(done,1,0,0xC0);
SetPlayerKills(GetParam(0), GetPlayerKills(GetParam(0)) + 10);
SetPlayerScore(GetParam(0), GetPlayerScore(GetParam(0)) + 10);
jkStringClear();
jkStringConcatPlayerName(GetParam(0));
jkStringConcatAsciiString(" has crossed the finish line! 10 points!");
jkStringOutput(-3, -1);
jkStringClear();
return;
timer:'
dony=0;
return;
end
# A door Creation-of-Gears, complete with sounds.
#
# By Edward
symbols
message startup
message activated
thing door
flex speed
flex waittime
sound activate
sound moveopen
sound opened
sound closing
sound moveclose
sound closed
int chan=1 local
end
#
code
startup:
MoveToFrame(door,0,100);
return;
activated:
If(GetSenderRef()!=door) return;
PlaySoundThing(activate,door,1,-1,10,0xC0);
MoveToFrame(door,1,speed);
chan=PlaySoundThing(moveopen,door,1,-1,10,0xC1);
WaitForStop(door);
StopSound(chan,0.25);
PlaySoundThing(opened,door,1,-1,10,0xC0);
sleep(waittime);
PlaySoundThing(closing,door,1,-1,10,0xC0);
MoveToFrame(door,0,speed);
chan=PlaySoundThing(moveclose,door,1,-1,10,0xC1);
WaitForStop(door);
StopSound(chan,0.25);
PlaySoundThing(closed,door,1,-1,10,0xC0);
return;
end
# Jedi Knight Cog Script
#
# FORCE_HEALING.COG
#
# FORCEPOWER Script - Healing
# Light Side Power
# Bin 25
#
# [YB]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
symbols
thing player local
flex cost=200.0 local
int rank local
flex mana local
sound healingSound=ForceHealing01.WAV local
int soundChannel=-1 local
template sphere_tpl=+force_heal local
int sphere=-1 local
vector position local
message startup
message activated
message newplayer
message killed
message selected
end
# ========================================================================================
code
startup:
player = GetLocalPlayerThing();
call stop_power;
Return;
# ........................................................................................
activated:
if((!IsInvActivated(player, 25)) && (GetThingHealth(player) != 100) && (GetThingHealth(player) > 0))
{
mana = GetInv(player, 14);
if(mana >= cost)
{
SetInvActivated(player, 25, 1);
PlayMode(player, 24);
soundChannel = PlaySoundThing(healingSound, player, 1.0, -1, -1, 0x80);
rank = GetInv(player, 25);
// Create the sphere
position = VectorAdd(GetThingPos(player), '0.0 0.0 0.01');
sphere = CreateThingAtPosNR(sphere_tpl, GetThingSector(player), position, '0.0 0.0 0.0');
AttachThingToThingEx(sphere, player, 0x8);
Sleep(0.6);
SetParticleGrowthSpeed(sphere, -3.0);
// We don't want any strange things like a dead player with health in the HUD
if(GetThingHealth(player) > 0) HealThing(player, 20 * rank);
Sleep(0.40);
DestroyThing(sphere);
call stop_power;
}
}
Return;
# ........................................................................................
selected:
jkPrintUNIString(player, 25);
Return;
# ........................................................................................
killed:
if(GetSenderRef() != player) Return;
newplayer:
call stop_power;
Return;
# ........................................................................................
stop_power:
SetInvActivated(player, 25, 0);
Return;
end
# Grenades at Jump challange!
#
# By Edward
symbols
message activated
message pulse
message timer
surface lever
sound announce
thing place0
thing place1
thing place2
thing place3
thing place4
thing place5
thing place6
thing place7
thing place8
thing place9
thing place10
thing place11
thing place12
thing place13
thing place14
thing place15
template grenades
int i=0 local
int z=0 local
int go=0 local
end
#
code
activated:
If(GetSenderRef()!=lever) return;
if(go==0) {
PlaySoundGlobal(announce,1,0,0xC0);
jkStringClear();
jkStringConcatAsciiString("A challange is being thrown at the oily bronze corse.");
jkStringOutput(-3, -1);
jkStringClear();
i=0;
SetPulse(0.01);
SetWallCel(lever,1);
go=1;
SetTimer(5);
} else {
jkStringClear();
jkStringConcatAsciiString("Grenades have stopped...");
jkStringOutput(-3, -1);
jkStringClear();
SetPulse(0);
SetWallCel(lever,0);
go=0; }
return;
pulse:
# DSLS_DeathSythe
CreateThing(grenades,place0[i]);
i=i+1;
if(i>15) i=0;
return;
timer:
# SaberMaster
jkStringClear();
jkStringConcatAsciiString("Can you jump through a grenade field?");
jkStringOutput(-3, -1);
jkStringClear();
return;
end
# Plays a key.
#
# By Edward
flags=0x240
symbols
message startup
thing thing
keyframe key
end
#
code
startup:
PlayKey(thing,key,1,0x0);
return;
end
# Jedi Knight Cog Script
#
# KYLE.COG
#
# Main script for the player. Handles things like saber info,
# saber blocking animations, invulnerability at respawn, etc.
#
# [YB & CYW]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
symbols
thing player local
int nextBlock=0 local
int bin local
int rank local
int force_blinding=0 local
int blindingEffectHandle=-1 local
int PulledWeapon local
int playersector local
vector playerpos local
int bub local
template tpl=+FPBryarPistol local
template tpl1=+FPBryarPistol local
template tpl2=+FPBryarPistol local
template tpl3=+FPSTrifle local
template tpl4=+FPDetonator local
template tpl5=+FPCrossbow local
template tpl6=+FPRepeaterGun local
template tpl7=+FPRailGun local
template tpl8=+FPSeqCharge local
template tpl9=+FPConcRifle local
template smoke_tpl=+heavysmoke local
int smoke local
template teleport_particles=+telesparks local
sound teleportsnd=ForceThrow01.WAV local
template bubble_tpl=bubble local
template bubble_tpl2=bubble2 local
template bubble_tpl3=bubble3 local
template splash_tpl=+watersplash local
template splash_tpl2=+watersplash2 local
int a_splash local
int sender local
int source local
keyframe povBlockAnim0=SabVblk0.key local
keyframe povBlockAnim1=SabVblk1.key local
keyframe povBlockAnim2=SabVblk2.key local
keyframe blockAnim0=KYblock0.key local
keyframe blockAnim1=KYblock1.key local
keyframe blockAnim2=KYblock2.key local
int dummy=0 local
int blockPOVTrack=-1 local
int blockTrack=-1 local
int griptrackID=-1 local
message startup
message killed
message newplayer
message timer
message blocked
message skill
message damaged
message splash
message user0
end
# ========================================================================================
code
startup:
player = GetLocalPlayerThing();
if(!IsMulti()) call init_kyle;
// Bubbles
if(IsMulti())
SetTimerEx(4 + 5 * rand(), 2, 0, 0);
else
SetTimerEx(2 + 5 * rand(), 2, 0, 0);
Return;
# ........................................................................................
killed:
if(player != GetSenderRef()) Return;
if(IsMulti())
{
CreateBackpack(player);
ClearActorFlags(player, 0x2000);
}
if(GetThingUserData(player) & 0x4000000)
SetThingUserData(player, 0);
SetInv(player, 71, 0);
// clean up force powers stuff
if(blindingEffectHandle!=-1)
{
freeColorEffect(blindingEffectHandle);
blindingEffectHandle = -1;
}
ClearActorFlags(player, 0x800);
KillTimerEx(27);
force_blinding = 0;
ClearActorFlags(player, 0x40000);
if(griptrackID != -1)
{
StopKey(player, griptrackID, 0.1);
griptrackID = -1;
}
Return;
# ........................................................................................
damaged:
if(GetParam(1) == 32) call make_bubbles;
if(GetInv(player, 71) == 1.0) // TURNS OFF FALLING AND IMPACT DAMAGE IF INVENTORY 71 IS 1.0
{
if(GetParam(1)==64)
{
ReturnEx(0);
return;
}
}
ReturnEx(GetParam(0));
Return;
# ........................................................................................
make_bubbles:
playersector = GetThingSector(player);
playerpos = VectorAdd(GetThingPos(player), '0 0 0.075');
for(bub = 1; bub < 1 + 3 * rand(); bub = bub + 1)
{
CreateThingAtPosNR(bubble_tpl[3 * rand()], playersector, VectorAdd(playerpos, VectorScale(VectorNorm(VectorSet(rand()-0.5, rand()-0.5, rand()-0.5)), 0.05)), '0 0 0');
Sleep(0.05);
// Don't create too many bubbles over the network...
if(!IsMulti())
{
CreateThingAtPos(bubble_tpl3, playersector, VectorAdd(playerpos, VectorScale(VectorNorm(VectorSet(rand()-0.5, rand()-0.5, rand()-0.5)), 0.05)), '0 0 0');
Sleep(0.05);
}
}
Return;
# ........................................................................................
newplayer:
call init_kyle;
// If it's multiplayer
if(IsMulti()) call init_multi_kyle;
// Start Bubbles
SetTimerEx(2 + 5 * rand(), 2, 0, 0);
Return;
# ........................................................................................
timer:
if(GetSenderId() == 1) // Invulnerable for a while
{
// jkSetInvulnerable(GetParam(0), 0);
ClearActorFlags(GetParam(0), 8);
Return;
}
else
if(GetSenderId() == 2) // Bubbles check
{
if(GetThingHealth(player) < 1) Return;
if((GetThingFlags(player) & 0x2000000) && !(GetPhysicsFlags(player) & 0x100000))
call make_bubbles;
if(IsMulti())
SetTimerEx(4 + 5 * rand(), 2, 0, 0);
else
SetTimerEx(2 + 5 * rand(), 2, 0, 0);
Return;
}
else
if(GetSenderId() == 24)
{
// A pulled weapon must be made takeable again
SetCollideType(GetParam(0), 1);
Return;
}
else
if(GetSenderId() == 27)
{
if(blindingEffectHandle!=-1)
{
freeColorEffect(blindingEffectHandle);
blindingEffectHandle = -1;
}
// Get the effect ramping down
AddDynamicTint(player, 200 + 8 * rank, 210 + 10 * rank, 200 + 8 * rank);
ClearActorFlags(player, 0x800);
force_blinding = 0;
Return;
}
else
if(GetSenderId() == 31)
{
if(griptrackID != -1)
{
StopKey(player, griptrackID, 0.1);
griptrackID = -1;
}
ClearActorFlags(player, 0x40000);
Return;
}
Return;
# ........................................................................................
blocked:
if(player != GetSenderRef()) Return;
if (blockPOVTrack != -1)
{
jkStopPOVKey( player, blockPOVTrack, 0.1 );
blockPOVTrack = -1;
}
if (blockTrack != -1)
{
StopKey( player, blockTrack, 0.1 );
blockTrack = -1;
}
// PlaySoundThing(hitSound14, player, 1.0, -1, -1, 0);
blockPOVTrack = jkPlayPOVKey(player, povBlockAnim0[nextBlock], 2, 0x1a);
blockTrack = PlayKey(player, blockAnim0[nextBlock], 2, 0x1a);
nextBlock = nextBlock + 1;
if(nextBlock > 2)
nextBlock = 0;
Return;
# ........................................................................................
// This message is sent from the weap_saber.cog
user0:
if (blockPOVTrack != -1)
{
jkStopPOVKey( player, blockPOVTrack, 0.1 );
blockPOVTrack = -1;
}
if (blockTrack != -1)
{
StopKey( player, blockTrack, 0.1 );
blockTrack = -1;
}
Return;
# ........................................................................................
skill:
// player might be dead when skill: arrives over the net...
if(GetThingHealth(player) <= 0) Return;
// Handle multiplayer force power effects
bin = GetParam(0);
rank = GetParam(1);
if(bin == 24) // Force Pull
{
ReturnEx(0);
if(!IsInvActivated(player, 28)) // Absorb makes player immune to Pull
{
if((GetCurWeapon(player) != 1) && (GetCurWeapon(player) != 10))
{
// Create a powerup corresponding to the current weapon
PulledWeapon = CreateThingAtPos(tpl[GetCurWeapon(player)], GetThingSector(player), GetThingPos(player), '0 0 0');
// Make the powerup collide later
SetTimerEx(0.2, 24, PulledWeapon, 0);
// Duplicate for internet games
SetTimerEx(0.25, 24, PulledWeapon, 0);
// Throw the powerup at the player
ApplyForce(PulledWeapon, VectorScale(VectorNorm(VectorSub(GetThingPos(GetSourceRef()), GetThingPos(player))), 30));
// Remove the weapon from the player
ChangeInv(player, GetCurWeapon(player), -1);
// Switch to fists
SelectWeapon(player, 1);
ReturnEx(1);
}
}
Return;
}
else
if (bin == 27) // Force Blinding
{
if((!force_blinding) && (!IsInvActivated(player, 23))) // Seeing makes player immune to Blinding
{
force_blinding = 1;
blindingEffectHandle = newColorEffect(0, 0, 0, 0, 0, 0, 200 + 8 * rank, 210 + 10 * rank, 200 + 8 * rank, 1.0);
SetActorFlags(player, 0x800);
SetTimerEx(4 * rank, 27, player, 0);
ReturnEx(1);
}
else
{
ReturnEx(0);
}
Return;
}
else
if (bin == 31) // Force Grip
{
if(!IsInvActivated(player, 29)) // Protection makes player immune to Grip
{
griptrackID = PlayMode(player, 25);
SetActorFlags(player, 0x40000);
// Print("You are taking Grip damage");
jkPrintUNIString(player, 300);
DamageThing(player, 2 * rank, 0x8, GetSourceRef());
SetTimerEx(0.5, 31, player, 0);
ReturnEx(1);
}
else
{
ReturnEx(0);
}
Return;
}
else
if (bin == 34) // Deadly Sight
{
// Print("You are taking Deadly Sight damage");
jkPrintUNIString(player, 301);
DamageThing(player, 4 * rank, 0x8, GetSourceRef());
smoke = CreateThingAtPosNR(smoke_tpl, GetThingSector(player), GetThingPos(player), '0 0 0');
// Raise the tint above the normal damage tint
if(GetCurrentCamera() == 0)
AddDynamicTint(player, 0.15, 0.0, 0.07);
ReturnEx(1);
Return;
}
ReturnEx(-1);
Return;
# ........................................................................................
splash:
// splash: messages are only sent to the local player's cogs
// (class cog and capture cog) for performance reasons...
sender = GetSenderRef();
source = GetSourceRef();
// actor or player ?
if((GetThingType(sender) == 2) || (GetThingType(sender) == 10))
{
// whatever source (i.e. enter or leave, don't care)
a_splash = CreateThingAtPosNR(splash_tpl2, GetThingSector(sender), GetThingPos(sender), '0 0 0');
}
// these are mostly the projectiles...
else
{
// on entering only
if(source == 1)
// not if player is submerged, but still do it if he's on the surface
if(!(GetThingFlags(player) & 0x2000000) || (GetPhysicsFlags(player) & 0x100000))
a_splash = CreateThingNR(splash_tpl, sender);
}
Return;
# ........................................................................................
init_kyle:
SetActorFlags(player, 8);
SetTimerEx(1.50, 1, player, 0);
// Set Health to full
SetThingHealth(player, 100);
// Set Mana to full
SetInv(player, 14, GetInv(player, 20) * 50);
// Set Shields to 100 minimum
if(GetInv(player, 60) < 100) SetInv(player, 60, 100);
// Set Battery to 100 minimum
if(GetInv(player, 13) < 100) SetInv(player, 13, 100);
// Set the power boost to 1.0
SetInv(player, 63, 1.0);
// When player starts, give him fists, and a bryar.
SetInv(player, 1, 1.0);
SetInv(player, 2, 1.0);
// Give 50 energy minimum
if(GetInv(player, 11) < 50) SetInv(player, 11, 50.0);
// Bacta
if(GetInv(player, 40) == 0)
SetInvAvailable(player, 40, 0);
else
SetInvAvailable(player, 40, 1);
// IR Goggles
if(GetInv(player, 41))
SetInvAvailable(player, 41, 1);
else
SetInvAvailable(player, 41, 0);
SetInvActivated(player, 41, 0);
// Field Light
SetInv(player, 42, 1);
SetInvAvailable(player, 42, 1);
SetInvActivated(player, 42, 0);
ClearActorFlags(player, 4);
jkEndTarget();
Return;
# ........................................................................................
init_multi_kyle:
// Set Weapons
SetInv(player, 1, 1.0);
SetInv(player, 2, 1.0);
SetInv(player, 3, 0.0);
SetInv(player, 4, 0.0);
SetInv(player, 5, 0.0);
SetInv(player, 6, 0.0);
SetInv(player, 7, 0.0);
SetInv(player, 8, 0.0);
SetInv(player, 9, 0.0);
SetInv(player, 10, 1.0);
// Set Ammo
SetInv(player, 11, 50.0);
SetInv(player, 12, 0.0);
SetInv(player, 15, 0.0);
// Remove bacta tank and IR goggles
SetInv(player, 40, 0);
SetInv(player, 41, 0);
SetInvAvailable(player, 40, 0);
SetInvAvailable(player, 41, 0);
// Set shields to 100
SetInv(player, 60, 100);
// Do respawn effects
dummy = CreateThingAtPos(teleport_particles, GetThingSector(player), GetThingPos(player), '0 0 0');
dummy = PlaySoundThing(teleportsnd, player, 1.0, -1, -1, 0x180);
SetFireWait(player, -1);
SetMountWait(player, 0);
SetCurInvWeapon(player, 0);
SelectWeapon(player, AutoSelectWeapon(player, 1));
Return;
end
# Mines after Acid challange!
#
# By Edward
symbols
message activated
surface lever
sound announce
thing place0
thing place1
thing place2
thing place3
thing place4
thing place5
thing place6
thing place7
thing place8
thing place9
thing place10
thing place11
thing place12
thing place13
thing place14
thing place15
thing place16
thing place17
thing place18
template mines
int i=0 local
end
#
code
activated:
If(GetSenderRef()!=lever) return;
SetWallCel(lever,1);
PlaySoundGlobal(announce,1,0,0xC0);
jkStringClear();
jkStringConcatAsciiString("A challange has been layed out right after the Acid Build-Up.");
jkStringOutput(-3, -1);
jkStringClear();
for(i=0; i<19; i=i+1) {
CreateThing(mines,place0[i]);
sleep(0.01); }
sleep(5);
jkStringClear();
jkStringConcatAsciiString("Can you run by 19 mines before they explode?");
jkStringOutput(-3, -1);
jkStringClear();
SetWallCel(lever,0);
return;
end
# Jedi Knight Cog Script
#
# music.COG
#
# Toggle music. By ID_Junkguy. Manthem song by The Bouncing Souls.
#
# Cog (c) 2001-2003 ID_Junkguy.
flags=0x240
symbols
sound music1=HubbaHubbaZootZoot-Caramba.wav local
int chan=1 local
int on=0 local
message startup
message activated
end
# ========================================================================================
code
startup:
print("VELCOME TO EDVARD'S RRRROLLIN' RACE!");
Return;
# ...........................................
activated:
if(on==0) {
chan=PlaySoundLocal(music1,1,0,0xC1);
print("Now Playing: Hubba Hubba Zoot Zoot - Caramba"); on=1; } else {
StopSound(chan,1);
print("Music off..."); on=0; }
print("If you want more of my collection, contact me!");
Return;
# ........................................................................................
end
# See over the sholder of a player if the player is there.
#
# By Edward
flags=0x240
symbols
message startup
message pulse
message activated
message removed
thing player0
thing player1
thing player2
thing player3
thing player4
thing player5
thing player6
thing player7
thing player8
thing player9
thing player10
thing player11
thing player12
thing player13
thing player14
thing player15
thing player16
thing player17
thing player18
thing player19
thing player20
thing player21
thing player22
thing player23
thing player24
thing player25
thing player26
thing player27
thing player28
thing player29
thing player30
thing player31
surface see0
surface see1
surface see2
surface see3
surface see4
surface see5
surface see6
surface see7
surface see8
surface see9
surface see10
surface see11
surface see12
surface see13
surface see14
surface see15
surface see16
surface see17
surface see18
surface see19
surface see20
surface see21
surface see22
surface see23
surface see24
surface see25
surface see26
surface see27
surface see28
surface see29
surface see30
surface see31
int i local
int z local
int x local
end
#
code
startup:
for(i=0; i<32; i=i+1)
{
SetWallCel(see0[i],0);
}
SetPulse(1);
return;
pulse:
for(i=0; i<32; i=i+1)
{
if(GetPlayerNum(player0[i])!=-1)
{
if(GetWallCel(see0[i])==0) SetWallCel(see0[i],1);
}
else
{
SetWallCel(see0[i],0);
}
}
return;
activated:
for(z=0; z<32; z=z+1)
{
if(GetSenderRef()==see0[z])
{
if(GetWallCel(see0[z])==1)
{
SetActorFlags(GetSourceRef(),0x840000);
SetWallCel(see0[z],2);
if(GetCurrentCamera()==0) CycleCamera();
SetCameraFocus(1,player0[z]);
jkStringConcatAsciiString("You are now seeing over the sholder of ");
jkStringConcatPlayerName(player0[z]);
jkStringOutput(GetSourceRef(), -1);
jkStringClear();
}
else if(GetWallCel(see0[z])==2)
{
ClearActorFlags(GetSourceRef(),0x840000);
SetWallCel(see0[z],1);
SetCameraFocus(1,GetSourceRef());
}
}
}
return;
removed:
for(x=0; x<32; x=x+1);
{
if(GetSenderRef()==player0[x])
{
if(GetWallCel(see0[x])==2)
{
SetWallCel(see0[x],1);
SetCameraFocus(0,GetLocalPlayerThing());
}
SetWallCel(see0[x],0);
}
}
return;
end
# Thing emitting sound
#
# By Edward
symbols
message startup
thing emitter
sound noise
flex vol
flex mind
flex maxd
int looping=1
end
#
code
startup:
if(looping==1)
{
PlaySoundThing(noise,emitter,vol,mind,maxd,0xC1);
}
Else
{
PlaySoundThing(noise,emitter,vol,mind,maxd,0xC0);
}
return;
end
# Not another thing to fall from
#
# By Edward
flags=0x240
symbols
message entered
sound quote=i00ky60z.wav local
sector place
int a=0 local
end
#
code
entered:
If(GetSenderRef()!=place) return;
if(a!=0) return;
If(GetThingHelth(GetLocalPlayerThing())<=0) return;
a=1;
PlaySoundLocal(quote,1,0,0xC0);
print("Not another thing to fall from...");
sleep(5);
a=0;
return;
end
# Rail detonators at Catwlaks!
#
# By Edward
symbols
message activated
message pulse
message timer
surface lever
sound announce
thing place0
thing place1
thing place2
thing place3
thing place4
thing place5
thing place6
thing place7
template rails
int i=0 local
int z=0 local
int go=0 local
end
#
code
activated:
If(GetSenderRef()!=lever) return;
if(go==0) {
PlaySoundGlobal(announce,1,0,0xC0);
jkStringClear();
jkStringConcatAsciiString("A challange is being fired at the catlaks.");
jkStringOutput(-3, -1);
jkStringClear();
i=0;
SetPulse(0.01);
SetWallCel(lever,1);
go=1;
SetTimer(5);
} else {
jkStringClear();
jkStringConcatAsciiString("Rails have stopped...");
jkStringOutput(-3, -1);
jkStringClear();
SetPulse(0);
SetWallCel(lever,0);
go=0; }
return;
pulse:
# DSLS_DeathSythe
CreateThing(rails,place0[i]);
i=i+1;
if(i>7) i=0;
return;
timer:
# SaberMaster
jkStringClear();
jkStringConcatAsciiString("Can you roll through rail detonators?");
jkStringOutput(-3, -1);
jkStringClear();
return;
end
#Level master COG
#Generated by JED 0.95 beta
flags=0x240
symbols
message startup
message
message newplayer
int player local
keyframe appear=edwards_rolling.key local
end
code
startup:
player = GetLocalPlayerThing();
PlayKey(player,appear,2,32);
sleep(1);
// Register COG as master COG
SetMasterCOG(GetSelfCOG());
// Initialise Goals
SetInv(player, 99, 1000);
// Give player weapons and ammo
SetInv(player, 1, 1); // fists
SetInv(player, 2, 0); // briar
SetInv(player, 3, 0); // ST Rifle
SetInv(player, 4, 0); // TD
SetInv(player, 5, 0); // Crossbow
SetInv(player, 6, 0); // Repeater
SetInv(player, 7, 0); // Railgun
SetInv(player, 8, 0); // Sequencer charges
SetInv(player, 9, 0); // Concussion Rifle
SetInv(player, 10, 0); // Lightsaber
SetInv(player, 11, 0); // Energy
SetInv(player, 12, 0); // Power
SetInv(player, 15, 0); // Railcharges
// Initialize weapon.
SetFireWait(player, -1);
SetMountWait(player, 0);
SetCurInvWeapon(player, 0);
SelectWeapon(player, AutoSelectWeapon(player, 1));
Return;
newplayer:
player = Getsourceref();
PlayKey(player,appear,2,32);
sleep(1);
// Register COG as master COG
SetMasterCOG(GetSelfCOG());
// Initialise Goals
SetInv(player, 99, 1000);
// Give player weapons and ammo
SetInv(player, 1, 1); // fists
SetInv(player, 2, 0); // briar
SetInv(player, 3, 0); // ST Rifle
SetInv(player, 4, 0); // TD
SetInv(player, 5, 0); // Crossbow
SetInv(player, 6, 0); // Repeater
SetInv(player, 7, 0); // Railgun
SetInv(player, 8, 0); // Sequencer charges
SetInv(player, 9, 0); // Concussion Rifle
SetInv(player, 10, 0); // Lightsaber
SetInv(player, 11, 0); // Energy
SetInv(player, 12, 0); // Power
SetInv(player, 15, 0); // Railcharges
// Initialize weapon.
SetFireWait(player, -1);
SetMountWait(player, 0);
SetCurInvWeapon(player, 0);
SelectWeapon(player, AutoSelectWeapon(player, 1));
return;
end
# By ID_Junkguy
# For Rolling Revolution levels
#
# Makes player safe from falling/impact damage when they are inside a sector.
# Use on ramp sectors to prevent impact damage, if necessary.
# You may modify the cog to suit your needs.
# Modied by Edward
#============================================================================
flags=0x240
symbols
message crossed
surface SafeSector1
surface SafeSector2
end
#============================================================================
code
crossed:
if (GetSenderRef() == SafeSector1)
{
// Turn off impact damage
SetInv(GetLocalPlayerThing(), 71, 1);
}
else
if (GetSenderRef() == SafeSector2)
{
// Turn on impact damage
SetInv(GetLocalPlayerThing(), 71, 0);
}
return;
end
# By ID_Junkguy
# Made Universal By The Mega-ZZTer
#============================================================================
flags=0x240
symbols
message entered
sector Sector1 linkid=1
sector Sector2 linkid=1
sector Sector3 linkid=1
sector Sector4 linkid=1
sector Sector5 linkid=1
sector Sector6 linkid=1
sector Sector7 linkid=1
sector Sector8 linkid=1
sector Sector9 linkid=1
sector Sector0 linkid=1
int player local
flex FlingSpdX
flex FlingSpdY
flex FlingSpdZ
end
#============================================================================
code
entered:
if (GetSenderId() != 1) return;
player=GetLocalPlayerThing();
ApplyForce(player, VectorSet(FlingSpdX, FlingSpdY, FlingSpdZ));
return;
end
# Jedi Knight Cog Script
#
#
# [YB]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
# 00_sectordamage.cog
#
# Apply constant amount of damage to a player in a sector.
# Sector can heal instead, if a negative number is used for the "damage" variable.
#
# 01/31/97 [CYW]
# 04/14/97 [YB] Disabled the pulse if the damageSector is not linked in
# Reduced the damageInterval and increased the damage
# 06/27/97 [DB] Changed damage type to 0x1
# Edited by Edward
# ========================================================================================
symbols
message startup
message pulse
sector damageSector # the deadly sector.
flex damageInterval=1.0 # how often damage is applied in seconds.
flex damage=4.0 # how much damage is applied
template fry # Frying Smoke, by Edward
template nice # Healing stuff
sound frysnd # Frying sound, by Edward
sound nicesnd # Healing sound
thing victim local # actors and players affected.
int type local
int chan=1 local
int in=0 local
end
# ========================================================================================
code
# ........................................................................................
startup:
if(damageSector > -1) SetPulse(damageInterval);
return;
# ........................................................................................
pulse:
victim = FirstThingInSector(damageSector);
while (victim != -1)
{
type = GetThingType(victim);
// If we have an actor (2) or a player (10)
if ((type==2) || (type==10))
{
// Do the damage or healing.
if (damage > 0)
{
DamageThing(victim, damage, 0x1, victim);
CreateThing(fry,victim);
if(in==0) {
chan=PlaySoundThing(frysnd,victim,1,-1,10,0xC1); in=1; }
}
else
{
HealThing(victim, -damage);
CreateThing(nice,victim);
if(in==0) {
chan=PlaySoundThing(nicesnd,victim,1,-1,10,0xC1); in=1; }
}
}
victim = NextThingInSector(victim);
}
if(victim == -1) {
StopSound(chan,1); in=0; }
return;
# ........................................................................................
end
# Bolts at the U turning slope.
#
# By Edward
symbols
message activated
message pulse
message timer
surface lever
sound announce
template bolts
sector sector
thing bolt local
vector lv local
vector lvr local
int i=0 local
int z=0 local
int go=0 local
end
#
code
activated:
If(GetSenderRef()!=lever) return;
if(go==0) {
PlaySoundGlobal(announce,1,0,0xC0);
jkStringClear();
jkStringConcatAsciiString("BOSSK ATTACK!!!");
jkStringOutput(-3, -1);
jkStringClear();
i=0;
SetPulse(0.01);
SetWallCel(lever,1);
go=1;
SetTimer(5);
} else {
jkStringClear();
jkStringConcatAsciiString("Trandoshans have ceased...");
jkStringOutput(-3, -1);
jkStringClear();
SetPulse(0);
SetWallCel(lever,0);
go=0; }
return;
pulse:
lv=VectorSub(GetSectorVertexPos(sector, rand()*GetNumSectorVertices(sector)),GetSectorVertexPos(sector, rand()*GetNumSectorVertices(sector)));
lvr=VectorSet(-VectorX(lv),-VectorY(lv),-VectorZ(lv));
bolt=CreateThingAtPos(bolts,sector,GetSectorVertexPos(sector,rand()*GetNumSectorVertices(sector)),lvr);
SetThingVel(bolt,lvr);
SetThingLook(bolt,lvr);
return;
timer:
# SaberMaster
jkStringClear();
jkStringConcatAsciiString("Can you roll by Concussion bolts?");
jkStringOutput(-3, -1);
jkStringClear();
return;
end
# Staff Only (Server)
#
# By Edward
# Trigger by DSLS_DeathSythe
flags=0x240
symbols
message activated
message trigger
thing door
int trig=5
end
#
code
activated:
If(GetSenderRef()!=door) return;
if(IsServer())
{
SendTrigger(-1, trig, 1, 0, 0, 0);
return;
}
Print("STAFF ONLY!!!");
return;
trigger:
if(GetSourceRef() != trig)
return;
if(GetParam(0) == 1)
{
MoveToFrame(door, 1, 8.0);
Sleep(3.0);
MoveToFrame(door, 0, 8.0);
}
return;
end
# Bump Light
#
# By Edward and help from DSLS_DeathSythe
#===============
flags=0x240
symbols
#---------------
message activated
message trigger
message timer
thing trash
keyframe flip
sound squeek
int is_busy=0 local
int bump_trig
#---------------
end
#===============
code
#---------------
startup:
//-Clear the IS_BUSY...
is_busy = 0;
return;
#---------------
activated:
//-Check to see if the cog is busy...
if(is_busy == 1)
return;
//-Make sure it was the light...
if(GetSenderRef() != trash)
return;
SendTrigger(-1, bump_trig, 0, 0, 0, 0);
return;
#---------------
#---------------
trigger:
//-Make sure that its the right trigger...
if(GetSourceRef() != bump_trig)
return;
//-Check to see if the cog is busy...
if(is_busy == 1)
return;
//-Make the cog busy and set a timer that is as
//-long as the bump keyframe...
is_busy = 1;
SetTimerEx(GetKeyLen(bump), 1, 0, 0);
//-Play key and turn the light on...
PlayKey(trash, flip, 1, 0x2);
PlaySoundThing(squeek,trash,1,-1,10,0xC0);
SetTimerEx(1.0, 2, 0, 0);
return;
#---------------
timer:
//-Clear the IS_BUSY...
if(GetSenderID() == 1)
{
is_busy = 0;
return;
}
//-Turn light off...
return;
#===============
end
# Jedi Knight Cog Script
#
# WEAP_FISTS.COG
#
# WEAPON 1 Script - Fists
#
# The primary fire for is a punch with the left fist and then the right fist.
#
# - Not affected by MagSealed sectors/surfaces.
#
# [YB & CYW]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
symbols
model povModel=fistv.3do
model weaponMesh=fistg.3do
keyframe mountAnim=FistVmnt.key local
keyframe dismountAnim=FistVdis.key local
keyframe povfireAnim1=FistVl.key local
keyframe povfireAnim2=FistVr.key local
keyframe holsterAnim=kyhlstr.key local
keyframe bottle=drink.key local
keyframe firanimatic1=kypnchl0.key local
keyfrane firanimatic2=kypnchr0.key local
sound drinker=PINGU008.WAV local
sound fireSound1=SwingFist01.wav local
sound fireSound2=SwingFist04.wav local
template projectile=+punch local
thing player local
flex leftWait=0.25 local
flex rightWait=0.25 local
flex mountWait local
flex holsterWait local
int trackID=-1 local
int nextAnim=0 local
int holsterTrack local
message startup
message activated
message deactivated
message selected
message deselected
#message newplayer
message autoselect
message fire
message timer
end
# ========================================================================================
code
startup:
player = jkGetLocalPlayer();
// Setup delays.
leftWait = GetKeyLen(povfireAnim1);
rightWait = GetKeyLen(povfireAnim2);
mountWait = GetKeyLen(mountAnim);
Return;
# ........................................................................................
fire:
// Check that the player is still alive.
if(GetThingHealth(player) <= 0)
{
Return;
}
// Alternate fists.
if(GetThingUserData(player) & 0x4000000)
{
PlayKey(player,bottle,1,0x28);
jkPlayPOVKey(player, povfireAnim, 1, 0x38);
SetFireWait(player, GetKeyLen(drink));
PlaySoundThing(drinker,player,1,-1,-1,0x80);
SetTimer(GetKeyLen(drink));
return;
}
if(nextAnim == 0)
{
SetPOVShake('-0.01 -.01 0.0', '1.0 0.0 0.0', .05, 80.0);
PlaySoundThing(fireSound1, player, 1.0, 0.5, 2.5, 0x80);
PlayKey(player,firanimatic1,1,0x28);
FireProjectile(player, projectile, -1, 8, '-0.02 0.03 0', '0 0 0', 1.0, 0, 0.0, 0.0);
SetFireWait(player, leftWait);
}
else
{
SetPOVShake('0.01 -.01 0.0', '1.0 0.0 0.0', .05, 80.0);
PlaySoundThing(fireSound1, player, 1.0, 0.5, 2.5, 0x80);
PlayKey(player,firanimatic2,1,0x28);
FireProjectile(player, projectile, -1, 18, '0.02 0.03 0', '0 0 0', 1.0, 0, 0.0, 0.0);
SetFireWait(player, rightWait);
}
jkPlayPOVKey(player, povfireAnim1[nextAnim], 1, 0x0a);
nextAnim = 1-nextAnim;
Return;
# ........................................................................................
activated:
player = GetSourceRef();
mode = GetSenderRef();
jkSetWaggle(player, '0.0 0.0 0.0', 0);
ActivateWeapon( player, leftWait, mode );
Return;
# ........................................................................................
deactivated:
player = GetSourceRef();
mode = GetSenderRef();
jkSetWaggle(player, '10.0 7.0 0.0', 350);
DeactivateWeapon( player, mode );
Return;
# ........................................................................................
selected:
player = GetSourceRef();
PlayMode(player, 40);
// Setup the meshes and models.
jkSetPOVModel(player, povModel);
jkSetWeaponMesh(player, weaponMesh);
SetArmedMode(player, 0);
jkSetWaggle(player, '10.0 7.0 0.0', 350);
// Play the animation (NOLOOP + UNIQUE + ENDPAUSE).
// The animation is held at the last frame after it is played.
trackID = jkPlayPOVKey(player, mountAnim, 0, 20);
SetMountWait(player, mountWait);
// Clear saber flags, and allow activation of the weapon
jkClearFlags(player, 0x5);
SetCurWeapon(player, 1);
Return;
# ........................................................................................
deselected:
player = GetSourceRef();
// Stop the mount's last frame animation, and play the dismount.
jkPlayPOVKey(player, dismountAnim, 0, 18);
holsterWait = GetKeyLen(holsterAnim);
SetMountWait(player, holsterWait);
holsterTrack = PlayKey(player, holsterAnim, 1, 0x4);
SetTimerEx(holsterWait, 2, 0.0, 0.0);
if (trackID != -1)
{
jkStopPOVKey(player, trackID, 0);
trackID = -1;
}
jkSetWaggle(player, '0.0 0.0 0.0', 0);
Return;
# ........................................................................................
//newplayer:
// player = GetSourceRef();
//
// // Make sure that if the player is respawning, the old mount isn't playing anymore.
// if (trackID != -1)
// {
// jkStopPOVKey(player, trackID, 0);
// trackID = -1;
// }
//
// Return;
# ........................................................................................
autoselect:
// Select fists when out of everything else...
ReturnEx(100.0);
Return;
# ........................................................................................
timer:
StopKey(player, holsterTrack, 0.0);
Return;
end
MSGS 10
# "" ""
"ROLLER" 0 "Metal Roller"
"ROLLER_TEXT_00" 0 "Roll roll roll all you want"
"ROLLER_TEXT_01" 0 "But you'll never get away"
"ROLLER_TEXT_02" 0 "From the noisy Bryce metal"
"ROLLER_TEXT_03" 0 "You will have to stand it"
"ROLLER_TEXT_04" 0 "All the time, all the way..."
"ROLLER_TEXT_05" 0 "^MUHUHAHAHAHAHAHAHAHAHAHA!!!!"
"ROLLER_TEXT_06" 0 "Eim so ivel... [put's his pinky to his mouth]"
"ROLLER_TEXT_07" 0 "By Edward"
"ROLLER_TEXT_08" 0 "http://edward.leuf.org edward@leuf.org"
END
Edward's Rolling! | JK MP LEVEL Levels: 1
Edward's Rolling
MOD
This is my first Rolling Mod for JK. It is based on ID_Junkguy's Rolling Game Mod. It has very crappy archi (I admit), too short, and bad textures. But at the same time people found it fun non-the-less. All textures are from Bryce, the 3D program. And there are some fun road signs put in different places. Now, I know that the Rolling Game is a Mod, and that all levels that follow it should work with it, but this one's different. This is a Mod on its own! Therefore, you shall treat it as such by placing it in a folder on its own (not the Episode folder) and have some kind of Patching tool to activate this Mod (or just simply run JK.EXE -path newfolder).
| 8 532.03 Kb |
|
"The Empire's REVANGE New/MotS/Special/Second Edition"
TYPE 1
SEQ 1
#
10: 1 1 LEVEL MotSEdition.jkl 0 0 -1 -1
end
MAT 2 €? €? €? €? ‚„÷¿ @ ]^^^^^^^^=:^:=^^^^^^^®^^^^^®WW^^:::::::::<5]5]]]]X:X^¬]W8X^¬:WW]666666666:0Z0]: