Back


LEVELS & MODIFICATIONS

Sort:
"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
#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
"Edward's Rolling!" TYPE 8 SEQ 1 # 10: 1 1 LEVEL Roller.jkl 0 0 -1 -1 end
# Baren bjuder p de fljande: # # 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
"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]:__=:65;<]\ZT8<_W U5Z;\Z:XT5<<];X:75=^>Z:X5::Z][;555655o6748;YT78U6o98659[76\669_6U\^_]9_67X:X8_::9]87_^]o\o>_>_[87Z:;[Zo[_Z_>]:\879;]Z\76ZYWWXY55[YVVX:Y65[ZY9Y\on]85[WPPVV84Z87[VIIUX;8Z58[VHH7[>68[WPPW[_56ZYXXYZ]58ZXWWXZ<55ZXWXXY9\55::99<::97<;8<97<;97:::77687998[9:=;;<;:ZX997ZV8968XN5998YR7:8YX9:7
MAT 2777777767777766777777776777777777777766677777777WWXXXXXXXXXXX66677777777777777WWXXXXXXXXXXXXxxxxxxx6666677777777777777WWWXXXXXXXXXXXxxxxxxxxxxyyyy666666777777777WWWWWXXXXXXXXxxxxxxxxxxxxxxyyyxxx66666666666666666666666666666777777WWWWXXXXXxxxxxxxxxxxxxxxxxxxxx6666666666666666666666666666667766666666666666666666666666666666666666666666666666666666666666777777WWWWXXXXXXxxxxxxxxxxxXXXX666666666666666666666666666666666666666667766776667666666666666666666666666666666666666666666666666666666666666666666666666777777WWWWWWXXXXXXXXXXXXX6666666666666666666666666666666776677777777766666666666666666666666666666666666666666666666666666666666666666666666666666666777777WWWWWWWWWWWWWW666666666666666677777777777777777777777777777666666666666666666666666666666666666666666666666666666666666666666666666666666677777777777WW7W776666666666666777777777777777777777777777W77777776666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666677W7WWWWW77W77WWWWW7WW77776666666666666666666666666666666666666666666666666666667777666666666666666666666666666666566666666666666666666666666666666666666677WWWWWW777WWWW77W77666666666666666666666666666666666666666677WWWWWWWWWWWWWW776666666666666666666666666666666666666666666666666666666666666666666666666666666666777WWWWWWWWWWWW7777766666666666665666666666666666777WWWWWWWWWWWWWWWWWWWWWWWWWWWW766666666666666666666666666666666666676666666666WWWWWWWWWWWWWWWWWWWWWWWWWWW66666666666667WWWWWWWWWWWWWWWWWWWW77666666666666666666666666WWWWWWWWWWWWXXxxxxxxxxxxXWWWWWWWWWWWW766666666666665666666666666666VV66WWWWWWWWWWWWWWWWWWWWxxxxxxxxxxxxxxxxxWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW766666666666566666666666666667WWWWWWWWWWWWXxxxxxxxxxxxxxxxxxxxxxxxXWWWWWWWWWWW66666V566666666666666VVV66WWWWWWWWWWWWWWWWWwxxxxxxxxxxxxxxxxxxxxxxxxWWWWWWWXxxxxxxxxxxxxxxXXXWWWWWWWWWWWW776666666666666666666666666666666666666666666WWWWWWWWWXxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxWWWWWWW55555556666666666666VVVVVWWWWWWWWWWWWWWWWwxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxXWWWWWWWWWWWWWWW666666666666666666666666666666666666WWWWWWWWxxxxxxxxxxxxxxxxxxxxyxxxxx55556666555555555556666666666V6VVVWWWWWWWWWWWWWWWWwxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxXxWWWWWWWWWWWWWWWWWWWWWWWWWWWVVVVVV6VVWWWWWWWWWWWWWWWWWWWwxxxxxxxxxxxxxx555555566666666666665555555555555555555566666666V6VVVWWWWWWWWwwwwwxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxXWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWwwxxxxxxxxxxxxxxxx555556666666666666666666666666666666655555555566666666VVVVVWWWWWWwwwwwxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxXWWWWWWWWWWWWWWWWWWWWWwwxxxxxxxxxxxxxxxxxx55555666666666666VVVVVVVVVVVVVVVVVVVVVVVVV66666666666666V66VVVVVWWWWWWWwwwwwwwwxxxxxxwxxxxxxxxxxyxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxwwwxxxxxxxxxxx666666666VVVVVVVVVWWWWWWWWWWWWWVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVWWWWWWWWWWwwwwwwwwwwwwwwwwxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxWWWWWWWWWWWWWWWWWWWWWwwwwWWWWWWWWWWWVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVWWWWWWWWWwwwwwwxxxxxxxxxxxxxxxxWWWWWWwwwwwwwwwwwwwwwwwwwwwwwWwwwWWWWWWWVVVVVVVVVVVVVVVVVVVVVVVVV66VVVVVVVVVVVVVVVVVVVVVWWWWwwwwwwxxxxWwwwwwwwxxxxxxxxwwwwwwwwwwwwwwwwwwwwwwWWWWWWWWWwWWWWVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVWWWWwwwwwwwwwwwxxxxxxWwwwwwxxxxxxxxxxxxxxxwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwWWVVVVVVVVVVVVVVVVVVVVVVVV666656666VVVVVVVVVVVVVWWWwwwwwwwxxWwwwwwwwxxxxxxxxxxxxxxxxxxxwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwWWVVVVVVVVVVVVVV6V65U555555555555555556VVVVVVVWwwwwwwxxxxxwwwwwwwwwwxxxxxxxxxxxxxxxxxxxxwwwwwwwwwwwwwwwwwwwwwwwwwwwwwWWwVVVVVVVVVVVVVVVVVVV555555555555555VVVVVVVVWwwwwwwwwxxwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVwwwwwwwwwwxxwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwvVvVVVVVVVVVVVVVVVVVVVVVVVVVVVvwwwwwwwwwwxwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwvvvVvvVVVVVVVVVVVVVvwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwvvvvvvvvvvvVVvvvvvvvwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwvvvvvvvvvvvvvvvvvvvvvwwwwwwwwwwwwvwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwvvvvvvvvvvvvwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwvvvvvvvvvvvvvvvvwwwwwwwwwwwwwwvvvvvvwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvwwwwwwwwwwwwwwwwwwwwwwvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvwwwwwwvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvwwwwwvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvwwwvvvvwwvvvvvvvvvvvvvvvvvvvvvvvvvvv<=====================<<<=============================<<<<<<============================<<<<<<<<<<<<=======<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<uuu<<<<<<<<<<========<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<;uuuuuu<<<<<<<<<<<<<=<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<;;uuuuuuuu;;<<<<<<<<<<<==]]]===]]=<<<<<<<<<<<<<<<<<<<<<<<<<;;;;;ttttuuuuuu;;;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<;;;;;;;;;;;uuuuuuuu;;;;;;;;;<<<<<<<<<<<<<<<<<<;;;;;;;;;;;;SVt kZiRLspѬZZPiRiRѬ3iZiZ+siZiZiZj+siRiZl{iZiZZZiZiZiZiZ5{ѬbiRiZZiRiZiZiZiZiRiRiRiZO.iRiRIRjOviRiRiRiRZѬOiZiZiZiZiRIRiRiRiZbuZIRIRIRIRiRZU4:::uiRiRiRIRIRiRvbiZiZiZiZIRIRiRiRiZiZIRIRiRIRiRiRiZiZZZZZ:::::::iRiRIRIRIRIRiRjRiZiZiZiZiRiRiRiRiRiZiZ.biRiRIRiRiZiZiZiZZZZZ+s:::::::::iRIRiRIRIRIRIRiRbiZiZiZiZiRiRiRiRiRiRiRbiRiRiRIRiRiZiZiZiZiZZZZZ::::9999::::::::::::::::::::::::::1iRIRiRIRIRIRIRiRiZZiZiZiZiZiRiZiZiZiZiZiRiRiZZiRIRIRIRiRiZiZiZiZiZZZZZZ459999:99999:::::::::::9999:::::::::::iRiRiRIRIRIRiRiRiRiZZiZiZiZiZiZiZiZiZiZiZiRiRiZiRiRIRIRiRiZiZiZiZiZiZiZZZZZl{41UЬb999999:::::9999999::99999999999999999999999999OiZiZiZiRiRIRIRiRiZiZZiZiZiRiZiZiZiZiZiZiRiRiRiRiRIRiRiRiRiZiZiZiZiZiZiZiZiZiZiZZiZiZiZiZbRbiZiRZ9999999999999999::::::::9::999999999999999999999999iZiZiZiRIRIRIRiRiZiZiZiZiZiRiRiZiZiZiZiRiRIRiRiZiRiRiRiRiZiZiZiZiZiZiZiZiZiZiZiZZZZiZiRiRZU5ތ{iZiZiZiZiZr9999999999999999:::::::::::::999999999999999999999999999999iZiZiZiRIRIRIRiRiZiZiZiZiZiRiRiZiZiZiZiZiZiRiZiZiRiRIRiRiZiZiZiZiZiZiZiZiRiZiZiZiZiZiZiZiRiRiZZiZiZiZZiRiZiZiZiZiZ99999999999999999999999999::::::::::::::::9999999999999999999999999999+siZiZiZiZiRIRIRiRiRiRiRiZiZiZiRiZiZiZiZiZiZiZiZiZiZiRiRiRiZiZiZiZiZiZiZiZiZiRiRiRiRiRiRiRiZiZiZZZZiZiZiRiRiZiZiZiZZ8889999999999999999999999999999999999:::::::::::::::::::::9999999999999999999biZiZiZiZiRIRIRiRiRIRiRiRiRiRiZiZiZiZiZiZiZiZiZiZiZiRiRiRiRiZiZiZiZiZiRiRiRiRiRIRIRiRiRiRiZiZiZiZZiZZiZiRiRiZiZiZiZiZ8888888999999999999999:::::::::::::ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ::::::::::::::iZiZiZiZiZiRIRIRiRiRiRiRiRiRiZiZiZiZiZZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiRiRIRiRiRIRiRiRiRiRiZiZiZiZiZiZiZiRiZiZiZiZiZiZiZ.8888888888888899999999999999999YYYZ:ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZuiRiZiZiZiZiRiRiRiRiRiRiRiRiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiRiRiRIRIRIRIRIRiRiRiRiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZb888888899999999999999999999999YYYYYZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ8888888888888888iZiZiZiZiZiRiRiRIRiRiRiRiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiRiRIRIRIRIRIRiRiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZ899999999999YYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ7888888888888888888888iZiZiZiZiRIRIRIRIRIRiRiRiZiZiZiZiZiZiZiZiZiZiZiZiZZiZiZiZiZiZiZiZiZiZiRIRIRiRiRiRiRiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiRo99999YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZzzzz{[ZZz{{{{{{{{{zZZZZZZZZZZZZZZZzzzz[Z[77777888888888888889YXXY9992iZiZiZiRIRIRIRIRIRIRIRiRiRiRiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiRIRiRiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZjYYYYYYYYYYYYYYYZZZZZZZZZZZZYYYYZZZZZZZZZZZZzzzzzzzzzzzzzzz{{{{{{{{{{{{{{{{{{zzzzzzZZzzzzzzzz{{z777777777777777777777777788888888XXXXYYYYYYYYYYYYYYФiRiRiZiRIRIRIRIRIRiRiRiRiRiRiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiRiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZZiZiZiZiZiZiZVYYYYYYYYYYYYZZZZZZZZZZZZZZZZzzzzzzzzzzzzzzzzz{zzzzzzzz{{{{{{{{{{{{{{{{{{{{{{{{zzzzzzzzzzzzzz{z77666666667777777777777777777777777777777777777777777777777788888888888XXXXXYYYYYYYYYYYYYYYYYYYYYYOIRiRiRIRIRIRIRIRiRiRiRiRiRiRiRiRiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZѬYYYYYYYYYYYYYZZZzzzzzzzzzzzzzzzzzzz{{{{{{{{{{{{{z{{{{zz{{{{{{{{{{{{{{{{{{{{{{{zz{{{zzzzzzzzzzz77777777777777777777777777777777777777777777777778888XXXXXXXXXXXXXXYYYYYYYYYYYYYYYYYYYYyyyzyzyyyyy΃IRIRIRIRiRiRiRiRiRiRIRiRiRiRiRiRiRiRiRiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiRiRiZiZiZiZiZiZiRiZiZiZiZiZiZiZiZiZiRiZiZiZiZiZiZiZiZiZLsYYYYYYYYYYyzzzzzzzzzzzzzzzzzzzz{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{zz{z{{{{{{{{{zzzzzzXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXYYYYYYYYYYYYYYyyyyyyyyyzzzzzzzzzzzzzzzzzzzlsiRIRIRiRiRiRiRiRiRiRiRiRiRiRiRiRiRiRiZiZiZiZiZiZiZiZiZiRiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiRiRiRiZiZiZyyyzzzzzzzzzzzzzzzzzzz{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{zzzzzzzzzzzzzzzXXXXXXXXXXXXXXXXXXXXXXXYYYYYYYYYYYYYYYYYYYYYYYyyyyyyyyyyyyyyyyyyyyyyyyyyzzzzzzzzzzzzzzzzzzzzzzzzzzbiRiRIRIRIRIRiRiRiZiZiZiZiZiZiRiRiRiZiZiZiZiZiZiZiZiZiRiRiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiRiRiZiZiRiRiZiZiZiZ2zzzzzzzzzzzzzzz{{{{{{{{{{{{{{{{{{{{{{{zz{zzzzzzzzzzzzzzyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzziZiZiRiRIRIRIRiRiRiZiZiZiZiZiRiRiRiRiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiRiRiRiZiRiRiRiRiRiZiZiZiZzzzz{{zzzzzzzzzyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyzzzzzzzzzzzzzzzzziZiZiRiRIRiRiRiRiRiZiZiZiZiZiZiZiZiRiZiZiZiZiZiZiZiZiZiZiZiZiZZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiRiRiRiRiRiZiRiRiRiZiZiZiZZzzyyyyyyyyyyzzzzzzzziZiZiZiRiRiZiZiZiRiZiZiZiZiZiZiZiZiRiRiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiRiRiRiRiZiZiZiRiZiRiRiRiZiZyyy6iZiZiRiRiZiZiZiZiZiZiZiZiZiZiZiZiRiRiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiRiZiZiZiZiZiZiZiZiZiZiRiRiRiRiRiRiRiRiRiZiZiRIRiRiZiZiZiZiRiZiZiZiZiZiRiZiZiZiZiZiZiRiRiRiZiZiZiRiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiRiRiRiRiRiRiZiZiRiRiRiRIRIRiRiZiZiZiRiZiZZzSiZiZiZiZiZiZiZiZiZiRiZiZiZiZiZiZiZiRiRiZiZiRIRiRiRiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiRiRIRiRiRiRiZiZiZiRiRIRIRiRiRiRiZiZiZiRiZiZiZΛѤiZiZiZiZiZiZiRiRiZiRiRiZiZiZiZiZiZiRiRiZiZiRiRIRiRiRiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiRiRiRIRIRiRiZiZiZiRiRiRiRiRiRiRiRiRiRiZiRiZiZiZpOiZiZiZiZiZiZiRiRiZiRiRiZiZiZiZiZiZiZiRiZiRiRiRiRiRiZiZiRiZiZiZiZiZiZiZiZiZiZiZiZiRiRIRiRiRIRIRiRiZiZiRiRiRiRiRiRiRiRIRiRiRiZiZiZiZiZb΃iZiZiZiZiZiZiRiRiZiRiRiZiZiZiZiZiZiZiZiRiZiZiZiRiRiRiRiRiZiZiZiZiZiZiZiZiZiZiZiZiZiZiRiRiRIRiRiRiRiRiRiRiRiZiRiRiZiRiRiRiRiZiZiZiZiZiZwּLsiZiZZiZiZiZiRiRiRiRiZiZiZiZiZiZiZiZiZiZiZiZiRiRiZiZiRiRiZiZiZiZiZiZiZiZiZiZZiZiZiZiZiZiRIRiRiRiRiRiRiRiRiZiZiZiZiZiRiRiRiRiZiZiZiZiZbiZiZiZiZiZiZiZiRiRiZiZiZiZiZiZiZiZiZiZiZiZiZiRiZiZiZiZiZiRiZiZZiZiZiZiZiZiZZiZiZZiZiZiRIRIRiRiRiRiRiRiZiZiZiZiZiZiZiRiRiZiZiZiZiZiZLsiZiZiZiZiZiZiRiRiRiRiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZZiZiZiRiZiZiZiZiZiZiZiZiZiZiRiRiRiZiRiRiZiZiZiZiZiZiRiRiZiRiZiZiZiZiZiZiZ[iZiZiZiZiZiZiRiRiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiRiZiZiZiZiZiZiZiZiZiZiRiRiRiZiZiZiZiZiZiRiZiZiRiRiZiRiZiZiZiZiZiZiZtiZiZiZiZiZiRiRiZiZiZiZZZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiRiRiZiZiZiRiZiZiZiZiZiZiZiRiRiRiZiZiZiZiZiRiZiZiZiZiZiZiZiZiZiZiZiZiZ΃xiZiZiZiZiZiRiRiZiZiZiZiZZZiZiZiZiZiZiZiZiZiZiZiRiRiZiZiZiZiZiZiZiZiRiRiRiRiRiRiRiZiZiZiZiZiZiRiRiRiRiRiRiRiRiRiZiZZiZiZiZiZiZiZiZiZiZiZZƍ{|[iZiZiZiZiZiRiRiZiZiZiZiZiZiZiZiZiZiZiZiRiZiRiRiRiZiZiZiZiZiZiZiZiZiZiZiRiRIRIRIRiRiZiZiZiZiZiZiZiZiZiZiZiZiZiZiRiZiZiZiZiZiZiZiRiZiZiZiZiZiZTiZiZLs\ֽb7iZiZiZiZiRIRiRiZiZiZiZiZiZiZiZiZiZiZiZiZiZiRiRiRiZiZiZiZiZiZiZZiZiZiZiZiRIRIRIRiRiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZIRIRiRiRiRiRiRPiZiZiZiZ,k;{HRIRҜbiZiRiRiRIRIRIRiRiZiZiZiZiZiZiZiZiZiZiZiRiRiRIRiRiZiRiZiZZZZiZiZiZiZiZiZiRIRIRiRiZiZiZiZiZiZiZiZZiZiZiZiZiZiZiZiZiZiZiRiRIRIJIJIRiRiRiZiZbPbiZiZiRiZiZiZms7q;HRIRHRIRms7΍{HRHRZ|iZIRIRIRIRIRIRIRiRiZiZiZiZiRiRiRiRiZiZiRiRiRiRiRiZiZiZiZiZZZiZiZiZiZiZiZiRIRiRiRiRiZiZiZiZiZiZiZZiZiZiZiZiZiZiZiZiZiRiRIRIJIJIJIJIRiRiZiZiZiZiRiRiZiZiZiZiZiRiRx޲ZHJHRHRHR,kҜPqqHRIRIRHRHRHRHRHRHRHR0iZiRIRIRIRIRIRIRiRiRiRiRiRiRiRiRiZiZiZiRiRiZiRiRiRiZiZiZiZZiZiZiZiZiZiZiZiRIRiRiRiZiZiZiZiZiZiZiZZiZiZiZiZiZiZiRiRiRiRIR(JIJIJIJHJIJIRiRiRiRHRHJIRiRiRiRiRiZiRIR kX(J(J(JHJHRHRHRHRHR;ZHR)J4ZIRIRIRIRIRIRIRHRHRHRHR8{iRiRIRIRIRIRIRIRiRiRiRiRiRiRiRiRiZiZiZiRiRiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiRIRiRiZiZiZiZiZiZiZiZiZiZZiZiZiZiZiZiRiRiRiRHJHJHJHJHJHJIJ)JIRIRIJ(J(JHJiRiRiRiRiZiRiRiZIRJ(J(JHJHRHJHJHJHJb,kHJHRms)JiRTuHRIRIRIRIRIRIRIRIRHRHRHRb kiRiRiRIRIRIRIRIRIRIRIRiRiRiRiRiRiZiZiZiRiRiRiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiRiRiRiZiZiZiZiZiZiZiZZiZiZiZiZiZiZiZiZiRHRHJHJHJHJHRHRHJHJIJ)J(JIJ(J(JHJHRiZiZiZiRiZiZiR(J(J(J(JHJHJ(J(J(JHJHJ{IRHJHJHJֽ)J(JjR4 cIRIRIRIRIRIRIRIRIRHRHRHRIRZiZiZiRiRIRIRIRIRIRIRIRIRIRIRiRIRiRiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiZiRiRiRiZiZiZiZiZiZiZZiZiZiZiZiZiZiRHRHJHJHJHJHJHJHJHRHRHRHJHJIJ(J(J(J(J(JHJiRiZiZiRiRiZHJ(J(J(J(JHJHJ(J(J(JHJHJsQHJHJHJHJHJbIJIRiRiRuXIJIRIRIRIRIRIRIRIRIRIRIRIRHRIRyiZiZiZiRiRiRIRIRIRIRIRIRiRIRIRiRiRiRiZiZiZiZiZiZiRiZiZiZiZiZiZiZiZiZiZiZiZiZIRIRiRiRiZiZiZiZiZiZiZiZiZiZiZiZIRHJ(J(JHJHRHRHRHRHRHRHRHRHRHJHJ(J(J(J(J(JHJHRiRiZiZiRIR(J(JHJHJHJ(JHJHJ(JHJHJHJHRyHJHJHJ(JHJHJHJ)JIJIR-kbIRIRIRIRIRIRIRIRIRIRIRIRIRIRHR,k
MAT 266777777777777777777777777777777WWWXXXXXXXxxyyyyyyyyyyyyyyyyyxyyyyyyyyyyyyxxxyyyyyyyyyyyyxxxxxxxxXXXXXXXWWWWWWWWWWWWWWWWWWWWWWXXXXXXXWWWW77766666666666666777WWWWxxxx7777777777777777777777777777777777WWWWWWXXXXXXXXxxxyyyyyyyyyyyyyyyyyyyyyyyyyyxxxxxxxxxXXXXXWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW777766666666666777WWWXxxxx7777777777777777777777777777777777WWWWWWWWWWXXXXXXXXXxxxxxxyyyyyyyyyyyyyyyyyyyyxxxxxxxxxXXXXXXXXXXXXXWWWWWWWWWWWWWWWWWWWWWWWWWW7777776777WWWWWWXxxxxx7777777777777777777777777777WWWWXXXXXXXXXXXXXXXXXXXXXxXxxxxxxxxxyyyyyyyyyyyxxxxxxxxxxxxxxxxxxxxxxxXXXXXXXXXXXXXXXXXXXXWWWWWW7777WWWWWWxxxxxxx7777777777777777777777WWWWWWWXXXXXXXXXXXXXXXXXXXXXXXXXXXXxxxxxxxxxxxyyyyyyyyxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxXWWWWWWWWWWxxxxx77777777777777WWWWWW7WWWWWXXXXXXXXXXXXXXWWWWWWXWWXXXXXXXXXXXXxXxxxxxxxyyyyyyxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxyxxxxxxxxxxxxxxxxx777777777WWWW7777777777WWWWWWWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxxxxxxxxxyyyyyxxxxxxxxxxxxxxxxxxxxxxxxxxxxXXXXXXXXXXXXWWWWWWWWWWWWWWWWWWWWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxxxxxxxyyyyxxxxXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXWXWWWWWWWWXXXxXxxxxxxxxyyyyyyxxxxxxxXxxxxxxXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXWXWWWWWWXXXXXXXXXXXxxxxxxxxxxxyyxxxxxxxxxXXxXXXXXXXXXXXXXXXXWXXXWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxxxxxxXXxxxxxxxxxxxyyxxxxxXXXXXXXXXWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWXXXXXXXxxxXXxxxxxxXXxxxXXXXXXXXXXXXXxxxxxxxxxxyyXXXXXXXWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWXXXxxXxxxxxxxxxxXXXXXXXXXXXxXXxxXxxxxxxxxxxxyWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWXXXXXXxxxxxxxxxxXXXXXxxxxxxxxxxxxxxxxxxxyy<<<<<=======WWWWWWWWWWWWWWWW7WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWXXXxxxxxxXXXxXxxxxxxxxxxxxxxxxxxy<<<<========77777777777777777W77WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWxxxxxxxxXXxXxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx<<<<<<===6666666666666666667777WWWWWWWWWWWXXXXXXXXxXXWWWWWWWWWWWWWWWWWWWWWWWwwxwwxxXxxxxxxxxxxXXxxxxxxxxxxxxxxxwwwwwwwwxxxxxxxxxxxxxx6666666666666666666677WWWWWWWWWxXXxXXxxxxxxxwWWWWWWXxxxxxxxxxxxxxxxxxxxXWwwXWXxxxxxxxxxwWWwWWWWWWWWWWwwWWWWWWWWWWWWWWWWWWWwwxxxxxxx6666666666666666667WWWWWWWWWWWWwXXxxxxxxxxxxxxxxxxxxxxxxwwxwwwwwwxxxxxxxxWXxwwwwwWWWWWWWWWWWWwwwWwxxwwwwWWWWWWWWWWWWWWWWWWWWWWWWWwwwxxxxxxx666666666666666WWWWWWWWWWWWWWxxxxxxxxxxxxxxxxxxxxxxxwWWWWWWWWWWWWWWWWWWWWWWwwwwwwWWWWWWWWWWWWwwwwxxxxxxxxwwwwWWWWWWWWWWWWWWWWWWWWWWwWWwwwwxxxxxx6666666666WWWWWWWWWWWWWxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxwwWWWWWWWWWWWWWWWWWWWWwwWwWwwwwwwwwxxxxxxxxxxxxxxxxxxxxxxxwwwwWWWWWWWWWWWWwwwwwwwwwwwwxxxxxWWWWWWWWWWWWWWWWWWWwwxWwxwwwwwwwwwwxxxxxxxxxxxxxxxxxxxxxxxwwWWWWWWWWWwwwxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxwwwwwwwwwwwwwwwwwwwwwwxxxxxxWWWWWWwwwwwwwxxwwwwwWWwwWWWWWWWWWWWWWWwwwwwxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxwWwwWWWWWWWWWWWWWWWwwWwwwxxxxxxxxxxxxxxxxxxxxxxxxxxwwWWWWWWWWWWWWWWWWWWWWWwwwwxxxxxxxxxxxxxxxxxxwwwWWWWWWWWWWWWWWWwwwwwxxxxxxxxxxxxxxxxxxxwwwwwwwxxxxxxxxxxxxxxxxxxxxxxxxx<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
MAT 2<<<<<<<<<<<<<<<<<<<;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;[[[[[[[[[;;;;;;;;;;;;;;;;;[[[[\\\\\\\\\[[;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;[[[[[\\\\\\\\\\\[[;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;[[[[[[[\\\\\\\\\\\\\\\\\\\\\\\\[[;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;[[[[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\||||||||||||||||||||||||\\\\\\[;;;;;;;;;;;;;;;;;;;;;;;;;[[[[[[[[\\\\\\\\\\\||||||||||||||||||||||||||||||||||||||||||||||||||||||||||\\\\\\<<<<<<<<<<<<;;;;;;;;;;;;;;;;[[[[\\\\\\||||||||||||||||||||||||||||||||||||||||||}}}}}}}|||||||||||||||||||||||||||\\\\<<<<<<<<<<<<<<;;;;;;;;;;;[[[\\\\\|||||||}}}}}}||||||||||||||||||}||||||||||||}}}|}}}|||||||||||||||||||||||||\\\\\<<<<<<<<<<<<<<<<;;;;;;;;;;;;[;[[\\\\\\||||||||||||||||||||||||||||||||}||||||||}|}}}|||||||||||||||\\\\\\\[[;;<<<<<<<<<<<<<<<<==]]]]]]]]=<<<<<<<<<<<<<<<<<<<<<<<<<;;;;;;;;;;;;;;;[[[[[[\\\\\||||||||||||||||||||||||||}|||||||||||||||||||||||\\\\\\\\\[\[[;;;<<<<<<=====]]]]]]]]]]]]]]]]]]]]]]]]]]]]\\\\\\\\\\\\\\<<<<<<<;;;;;;;;;;;;;;;;;;;;;;[[[[[[[\\\\\\||||||||}}|\\\\\\\\\\\\\\\\\\\\\\\[[[[[[[[[[;;;=======]=]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]\\\\<<<<<<;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;[[[[[\\\\\||||||}}\[[[[[[[[[[[[[[;;;;;;;;;;;;;;;;;;;============]]]]]]]]]]]]]]]]]]]]]]]]\\<<<\\\\]]]]]]]\\\\<\<<<<<<;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;[;[[[[\\\\||||||}[[[[[[;;;;;;;;;;;;;;;;;;;;;;;;;;=====<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\\\<\<<\\<<<<<<<<<<<;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::;;;;;;;[[[[[[\\\\|||||||||;;;;;;;;;;;;;;;;;;;;;;;:<<<<<<<<<<<<<<<<<<<<<\\\\\\\\\\<<<<;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;[[[[[[[[[[[[[[[|;;;;;;:::;<<<<<<\\\<<<<<;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;[;;;;;;;;;;;;;;;;;;;[[[[[[[[[[[[[[[\[[[[[[[[[[[[[[[[[[[;[[[[\;;;;;;;;;;;;;;;[[\\\\\\\\||\\\\||||||||\\\\\\[[[[[[[[[[[[[[[|||||\\:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;[[\\\\\||||||||||||||||||||||\|\\\\\\[[[[[[[[[[[[|||||\[[[[;;;;;;<<<<<<<<<<<<<<;;;;;;;;;;;;;;;;;;;;[[[\\\\\\|||||}}}||||||||||||||||||||||||||||||||||||\\\\||||||\[[[;;;;::::;;;;<<<<\\\\\\\\\\\\\\\\\\\\\\\\<;;;;;;;;;;;;;[\\\\\\|||||||||||||||||||||||||||||||||||||||}||||||||||||||||||||||\[[[;;::;;;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\\\\\\\\\\<;;;;;;;;;;;;;;;;;;;;;;;;;;[\\\\\||||||||||||||||||||||||||||||||||||||||||||||||||||||||||\\\\[[[\[[[[[;;:wwwwwvvvvvvvwwwwwwww;;;;<<<<<<<<<<<<<<<<<<<<<<<<;;;;<;;<<<;;;<<;;<;;;;;;;;;;;;;;;;;;;;;;;;;;;;;[[\\\\\\||||}}}}}}}}}}}}}||||||}||||||||||||||||||\\[[[[[[[[;::vvvvvvvvvvvvwwv;;;;;;<<<<<<<<<<\<<<<<<<<<<;;;;<<<<<<<<<<<<<<<<<<<<<<<<<\\\\\\\\\\\\\\\\\\\\\\\\\\\\||||}}}|||||||||||||||||\[[[;;:vvvvvvvvvvvwvvvvvv;<<<<<<<<<<<<<<<<<<<<<<<<<<<\\\\<<<<<<<<<\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\|||||||||||||||}}}}|||||||||||||||\[[;;:wvvvvvvvvvvvvvvvvv<<<<<<<<<<<<<<\\\\\\\]]\\\\\\\\\\\\\\\\\\\\\\\]]]}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}||||[[[[;;::<<<<<<<<\\<<<<<<<<<<\\\\\]]]]]]]]]]]]]]]]]]]]]}}}}}}}}}}}}|||||\[[[;;::<<<<<<<<\\\]\\\<\\\\\\\\\\\\\\\\\\\]]]]}}}}}}}}}}}}}}}}||||\[[[[;<<<<<<<<\]]]]]]\\\\\\\\\\\\\\\\\\\\\\\\\]]]]}}}}}}}}}}}}}|||||[<<<<<<<<<\\\\\<<\\\\\\\\\\\\\\\\]]]]]]}}}}}}}}}}}}}}}}}}}}}}}|||||||:<<<<<<<<<<\<<<<<<<<<\<\\\\]]]]]]]]]}}}}}}}}}}}}}~~iRIRIRiRiRiRiRiRiRiZiRiZiZiZiZiZiZj0t|||||||||<<<<<<<<<<<<<<<<<<<\\\\\\]]]]]}}}}}}}~~~}ZiRIRIRiRiZiZiZZZiZiZiZiZiZiZiZiZZZZZ k;||||||||||||||||||||||;;<<<<<<<<<<<<\\\\]]]]]}}}}}~~ҤiRiZiRiRiRiRiZZZZZZZiZiZZiZiZiZZZZZZ||||||||||||[[[[[[[[[[[[[[[[[[[|||||||||:;<<<<<<<<\\\\]]]]]}}}}}}~~~މZiRiRiRiZiRiZiZZZZiZZZiZiZZiZiZiZiZZZZZb|||||||||[[[[[[[[[[[[[[[[[[[[[[[[[[[||||||||[<<<<<<<\\\]]]]]}}}}}}~~~{iZiZiRiRiZiZiZiZZZiZZZZZZiZiZiRiZiZZZZZZP||||||||||[[[[;;;;;[;;[[[[[[[[[[[[[[[[[[[[||||[]]]]]]]]]]}}}}}}}~~~iRiZiZiRiRiZiZiZiZiZZZZZiZZZiZiZiZiZiZiZZZZiZiZx||||||||||[[[[[[[;;::::::::::::::;;;[[[[[[|||||]]}}}}~~~~~~~~~~~~~
MSGS 4000 # "" "" "MOTSEDITION" 0 "" "MOTSEDITION_TEXT_00" 0 "Welcome to the New Edition of" "MOTSEDITION_TEXT_01" 0 "^The Empire's REVANGE!" "MOTSEDITION_TEXT_02" 0 "Same crappy story, but now alot more spiffier! :D" # Intro.cog "COG_10000" 0 "I seem to be almost there." "COG_10001" 0 "I'd better have a look at the map..." "COG_10002" 0 "Ok, I see it may be best to land behind the planet." "COG_10003" 0 "Will take me longer to get to the base, but alot safer." "COG_10004" 0 "Change course..." "COG_10005" 0 "And exit!" "COG_10006" 0 "Hm. Looks like they are building an outpost here." # TroopTrans1 "COG_20000" 0 "Will you look at that! An abandoned transport." "COG_20001" 0 "Sure hope it's fast." "COG_20002" 0 "TRT: One of the droids picked up something at the new look-out tower." "COG_20003" 0 "TTL: Sure it wasn't another snowflake?" "COG_20004" 0 "TRT: No, this one was big. And human shaped!" "COG_20005" 0 "TTL: Maybe it was a Yetti!" "COG_20006" 0 "TRT: Please... The only things that are big and hairy in these parts" "COG_20007" 0 "of the galexy are either Wookies or Wampas!" "COG_20008" 0 "TTL: Oh... Gees, it's freezing here." "COG_20009" 0 "TRT: Turn up your heat regulator." "COG_20010" 0 "TTL: What heat regulator?" "COG_20011" 0 "TRT: There's a little nob on the side of your neck! Left hot, right cold!" "COG_20012" 0 "TTL: Hey, that's neat! I wonder how hot it can go?" "COG_20013" 0 "TTL: Hey, what's that smell?" "COG_20014" 0 "TTL: AH! I'M BURNING!" "COG_20015" 0 "TRT: Sheesh..." "COG_20016" 0 "No..." "COG_20017" 0 "Heating..." "COG_20018" 0 "What..." "COG_20019" 0 "So..." "COG_20020" 0 "Ever..." "COG_20021" 0 "*Snort* Uh, what? Oh, we're here!" # SedateJedi.cog "COG_30000" 0 "* You start to get sleepy... *" # ShipsLeaving.cog "COG_30001" 0 "Alot of people here. May need to be stealthy." "COG_30002" 0 "Looks like they are tansporting resources." "COG_30003" 0 "Possibly resources to this weapon." # EscapeWithTie.cog "COG_40000" 0 "They saved a ship for me. How nice of them." "COG_40001" 0 "But first, maybe I should open this door." "COG_40002" 0 "It's not open enough..." "COG_40003" 0 "Right, now to find where this Weapon is hiding." "COG_40004" 0 "Maybe I could follow those resource transports." "COG_40005" 0 "I should be there by now. I've got a proximitry..." "COG_40006" 0 "Oh, there it is!" "COG_40007" 0 "So big one could miss it." # AllAroundTheDude2.cog "COG_50000" 0 "Kyle: YOU?!" "COG_50001" 0 "Darth: I don't believe we've met..." "COG_50002" 0 "Kyle: Sorry, I thought you were Jerec." "COG_50003" 0 "Darth: Well, that is because I'm his..." "COG_50004" 0 "Darth: ...grand child, Darth HomChos!" "COG_50005" 0 "Kyle: Interesting name." "COG_50006" 0 "Kyle: So what is your plan?" "COG_50007" 0 "Darth: I'm thinking of destroying every star that is white or blue." "COG_50008" 0 "Kyle: But why?" "COG_50009" 0 "Darth: Because I hate those colors!" "COG_50010" 0 "Darth: And also I'd like some..." "COG_50011" 0 "Kyle: OVER MY DEAD BODY!" "COG_50012" 0 "What am I saying?" "COG_50013" 0 "Right, that's done. Now to destroy this thing and be home for supper." "COG_50100" 0 "G" "COG_50101" 0 "g" "COG_50102" 0 "R" "COG_50103" 0 "r" "COG_50104" 0 "E" "COG_50105" 0 "e" "COG_50106" 0 "A" "COG_50107" 0 "a" "COG_50108" 0 "T" "COG_50109" 0 "t" # Level2.cog "COG_60000" 0 "Kyle: Now back home in time for supper." "COG_60001" 0 "Rebel Officer: Major Katarn! Major Katarn! Do you read?" "COG_60002" 0 "Kyle: Reading you. Coming to pick me up?" "COG_60003" 0 "Rebel Officer: Negative. We left the systems incase you didn't make it. We are out of range." "COG_60004" 0 "Kyle: Well, thanks for that lack of confidence in me..." "COG_60005" 0 "Rebel Officer: However, we've gotten news about another Imperial facility where the weapon was constructed to begin with." "COG_60006" 0 "Rebel Officer: There is another one in the works." "COG_60007" 0 "Rebel Officer: We would like you to fly to these coordinates and secure the base." "COG_60008" 0 "Rebel Officer: We will be arriving shortly after." "COG_60009" 0 "Kyle: Can't I just wait here until you pick me up?" "COG_60010" 0 "Rebel Officer: Sadly no. By the time we get to you the weapon will have been moved." "COG_60011" 0 "Rebel Officer: Once we find something out the Imperials realize this and start preparing to hide themselves." "COG_60012" 0 "Rebel Officer: You are the closest we have." "COG_60013" 0 "Kyle: Fine, I'll go. Hope I've got enough fuel." "COG_60014" 0 "Rebel Officer: Thank you. May the force be with you." "COG_60015" 0 "Kyle: Ok, I'm there. Now to find a nice place to land." "COG_60016" 0 "Kyle: Oh snap. I'm out of fuel!" "COG_60017" 0 "Just great. The ship is busted." "COG_60018" 0 "At least my walk man is ok." # Welcome2.cog "COG_70000" 0 "Kyle: Hello! Welcome to the Taken Over Base." "COG_70001" 0 "Rebel Officer: Thank you for being so flexible." "COG_70002" 0 "Kyle: Yea... Shame I had to miss my supper..." "COG_70003" 0 "Rebel Officer: Well, we can also be flexible." "COG_70004" 0 "Rebel Officer: Your supper will be coming on the next ship." "COG_70005" 0 "Kyle: Thank you!" "COG_70006" 0 "Oh no you don't!" "COG_70007" 0 "I'm afraid you won't get your supper unless you join me!" "COG_70008" 0 "Kyle: Don't I ever get a break?" # ConstKidding.cog "COG_80000" 0 "Kyle: You have got to be kidding!" "COG_80001" 0 "What's the matter? Afraid of heights?" # TheNewDude.cog "COG_80002" 0 "Darth: Pleasure to meet you." "COG_80003" 0 "Kyle: Who are you?" "COG_80004" 0 "Darth: I happen to be, your..." "COG_80005" 0 "Darth: ...grand child Darth Bosnier." "COG_80006" 0 "Kyle: Am I really that ugly?" "COG_80007" 0 "Darth: Ha ha, very funny." "COG_80008" 0 "Darth: But seriously I am!" "COG_80009" 0 "Kyle: I have a feeling your going to tell me the story..." "COG_80010" 0 "Darth: That I am!" "COG_80011" 0 "Darth: When you got a child with Jan there were no problems with him," "COG_80012" 0 "Darth: until a few years after you went into stacis." "COG_80013" 0 "Darth: He changed. He got a second appendage and an interest for the Dark Side." "COG_80014" 0 "Darth: Then he fell in love with women and had children of his own." "COG_80015" 0 "Darth: And they had children who also had children and so on..." "COG_80016" 0 "Darth: And each child got more and more deformed." "COG_80017" 0 "Darth: And this is what I became." "COG_80018" 0 "Kyle: But now, why did the children get deformed?" "COG_80019" 0 "Darth: Because, Jan Ors happens to be your SISTER!" "COG_80020" 0 "Kyle: So that explains the face a bit..." "COG_80021" 0 "Kyle: Wait a minute! You expect me to believe you?" "COG_80022" 0 "Darth: No, just the audience!" "COG_80023" 0 "Kyle: YOU ARE GOING DOWN, SON!" "COG_80024" 0 "Hm, he must have kept the door up with the force." # Finally.cog "COG_80025" 0 "Hm... These must be the stories of my grandchildren." "COG_80026" 0 "The oldest below, and the recent above..." "COG_80027" 0 "But now, how do I get out of this place?" # Finally2.cog "COG_90000" 0 "Rebel Officer: Are you OK?" "COG_90001" 0 "Kyle: I'm not sure... I would say I'm fine in health," "COG_90002" 0 "Kyle: but not mentally." "COG_90003" 0 "Rebel Officer: Bit of a nasty shock for you down there." "COG_90004" 0 "Kyle: Yeah... To think that my wife was also my sister!" "COG_90005" 0 "Kyle: Sounds like one of Luke's adventures:" "COG_90006" 0 "Kyle: His father taking over the universe, his sister running for senator," "COG_90007" 0 "Kyle: R2D2 belonged to his mom, and C3PO, technically speaking, is also a sibling." "COG_90008" 0 "Kyle: and he had no idea until the very end..." "COG_90009" 0 "Rebel Officer: So, are you up for another sequel?" "COG_90010" 0 "Kyle: Na... I think I'll just kill myself..." "COG_90011" 0 "Rebel Officer: As you wish." # GOALS "GOAL_01000" 0 "Find your way to the other side of the planet." "GOAL_01001" 0 "Attempt to infiltrate the base." "GOAL_01002" 0 "WTF? You were hit with a dart, fell asleep, and now captured. You gonna stand for this? Find a way out of here and attempt to find this weapon." "GOAL_01003" 0 "Yay, you found a ship! Though, how to open this door? See if you can make sense of the controls." "GOAL_01004" 0 "Darn these modern imperial codes! Makes you want to destroy something!" "GOAL_01005" 0 "So, you are now at the weapon. So very big! Makes you wonder how people can find their way around, and if there are any transport systems." "GOAL_01006" 0 "Find the Dude who runs the show." "GOAL_01007" 0 "Fight the Little Dude in the Big Dude." "GOAL_01008" 0 "Find the self destruct button and make sure no one can reset it once pushed." "GOAL_01009" 0 "ESCAPE!!!" "GOAL_01010" 0 "Find your way to and into the base." "GOAL_01011" 0 "Secure the base and gain access to some hanger doors." "GOAL_01012" 0 "What When Where How Who Why Which? Someone closed the door on your friends!? Find him, kill him, and eat... well... ok, you are no canibal..." "GOAL_01013" 0 "Fight this guy!" "GOAL_01014" 0 "Right, you've done it. Now, how to get out of here? There seems to be some signifigance with the shaft and change in bricks." END
# Jedi Knight Cog Script # # 00_BREAKINGGLASS.COG # # Generic breaking glass script to be linked to both sides # of a breakable glass pane. # # Note: the template used is shard00, NOT shard0 ! # # [YB] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved symbols surface glass=-1 mask=0x448 desc=glass surface glass2=-1 mask=0x448 desc=glass_adjoin thing glass3=-1 mask=0x448 desc=glass thing glass4=-1 mask=0x448 desc=glass_adjoin int spawnpoints=2 desc=spawn_points int density=5 desc=density vector surface_center local int surface_sector local int surface_vertices local vector vertex local vector where local int i local int j local int k local int a_shard local int dummy local template shard_tpl=shard00 local sound glass_break=GlassBreak1.WAV local message damaged message startup end code startup: if(glass3!=-1) CaptureThing(glass3); if(glass4!=-1) CaptureThing(glass4); return; damaged: if(glass3!=-1) DestroyThing(glass3); if(glass4!=-1) DestroyThing(glass4); // Add 10 cm along the normal to solve some rounding error or non planar face... surface_center = VectorAdd(SurfaceCenter(GetSenderRef()), VectorScale(GetSurfaceNormal(GetSenderRef()), 0.01)); surface_sector = GetSurfaceSector(GetSenderRef()); surface_vertices = GetNumSurfaceVertices(GetSenderRef()); dummy = PlaySoundPos(glass_break, surface_center, 1.0, 10.0, 20.0, 0); // First spawn 'density' shards with random velocities at the center of the face. for(k=0; k
# Jedi Knight Cog Script # # 00_SINGLECAM.COG # # Multiple cameras cog. # These cameras are designed to be used in single player, # and they can be destroyed. # # [YB] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved symbols surface ViewSwitch surface ScreenTrigger thing disabledCamera nolink thing camera nolink thing camera1 nolink thing camera2 nolink thing camera3 nolink thing camera4 nolink thing camera5 nolink thing camera6 nolink thing camera7 nolink thing camera8 nolink thing camera9 nolink thing camera10 nolink int numCameras flex minChangeRate=0.5 int player local int active=0 local int activeCam=-1 local int old_camera local int allowChangeCam=1 local int startHealth=0.0 local vector startPosition local int triggerSource local int dummy local #sound SwitchOnSound=activate02.wav local sound SwitchOffSound=deactivate02.wav local sound camChangeSnd=beep2.wav local message startup message activated message playeraction message pulse message timer message trigger end # ======================================================================================== code startup: player = GetLocalPlayerThing(); SetWallCel(ViewSwitch, 0); Return; # ........................................................................................ activated: // Do not allow to activate the camera with the scope on... if(GetCurWeapon(player) == 13) Return; if(active) Return; active = 1; SetActorFlags(player, 0x80800000); StopThing(player); SetActionCog(GetSelfCog(), 0x7FFFFFFF); startHealth = GetThingHealth(player); startPosition = GetThingPos(player); SetPulse(0.5); SetWallCel(ViewSwitch, 1); // dummy = PlaySoundLocal(SwitchOnSound, 1.0, 0.0, 0); old_camera = GetCurrentCamera(); SetCurrentCamera(0); call next_cam; Return; # ........................................................................................ playeraction: if (GetParam(0) == 0.0) // Jump { if (GetParam(2) != 0.0) call prev_cam; ReturnEx(0.0); } else if (GetParam(0) == 1.0) // Crouch { if (GetParam(2) != 0.0) call next_cam; ReturnEx(0.0); } else if (GetParam(0) == 2.0) // Activated { call stop_cam; ReturnEx(0.0); } else if (GetParam(0) == 3.0) // Fire { // Allow the player to fire... ReturnEx(1.0); } else if (GetParam(0) == 4.0) // Strafe { if(GetParam(2) > 0) call next_cam; else call prev_cam; ReturnEx(0.0); } else if (GetParam(0) == 5.0) // Turn { if(GetParam(2) < 0) call next_cam; else call prev_cam; ReturnEx(0.0); } else if (GetParam(0) == 14.0) // Other Actions { if (GetParam(2) == 0.0) // Cycle Camera { if (GetCurrentCamera() == 0) { // We're in first person mode. } else { // We're in third person mode. } } ReturnEx(1.0); } else { ReturnEx(0.0); } Return; # ........................................................................................ pulse: SetPulse(0.5); // check that the player didn't die if(GetThingHealth(player) < 1) { call stop_cam; Return; } // If he took damage to health stop the camera if(GetThingHealth(player) < startHealth) { call stop_cam; Return; } // If he changed position (blown by explosion, pushed, ...) stop the camera if(!VectorEqual(startPosition, GetThingPos(player))) { call stop_cam; Return; } Return; # ........................................................................................ timer: allowChangeCam = 1; Return; # ........................................................................................ next_cam: if(!allowChangeCam) Return; activeCam = activeCam + 1; if(activeCam >= numCameras) activeCam = 0; call switch_cam; Return; prev_cam: if(!allowChangeCam) Return; activeCam = activeCam - 1; if(activeCam < 0) activeCam = numCameras - 1; call switch_cam; Return; switch_cam: Print(" "); Print(" "); Print(" "); Print(" "); Print(" "); jkStringClear(); jkStringConcatUNIString(365); jkStringConcatFormattedInt(activeCam, "%d "); jkStringOutput(-1, -1); dummy = PlaySoundLocal(camChangeSnd, 1.0, 0.0, 0); SetCameraFocus(0, camera[activeCam]); allowChangeCam = 0; SetTimerEx(minChangeRate, 1, 0, 0); Return; stop_cam: if(active) { SetCameraFocus(0, player); SetCurrentCamera(old_camera); } SetPulse(0); active = 0; SetWallCel(ViewSwitch,0); dummy = PlaySoundLocal(SwitchOffSound, 1.0, 0.0, 0); // Turn off control capture. SetActionCog(-1, 0); ClearActorFlags(player, 0x80800000); Print(" "); Print(" "); Print(" "); Print(" "); Print(" "); Return; # ........................................................................................ trigger: triggerSource = GetSourceRef(); // Handle only the cameras range if((triggerSource < 10023) || (triggerSource > 10033)) Return; camera[triggerSource - 10023] = disabledCamera; Return; end
# Jedi Knight Cog Script # # # [YB] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved #slashable animating surface #"grate" = front of adjoin #"grateback" = back of adjoin #set grate to no move #modified 4/5 by J.Stephens to set grateback to move through #modified July 21 M.Tateishi to slash on explosion+saber symbols message damaged message startup surface grate=-1 mask=0x448 surface grateback=-1 mask=0x448 thing tgrate=-1 mask=0x448 thing tgrateback=-1 mask=0x448 sound cutsound=LtSaberHit12.wav local int type local end ## COG code section code startup: if(tgrate!=-1) CaptureThing(tgrate); if(tgrateback!=-1) CaptureThing(tgrateback); return; damaged: // type = GetParam(1); // if (BitTest(type, 16 )) type = GetParam(1); if((type == 16) || (type == 4)) { PlaySoundPos(cutsound, SurfaceCenter(grate), 1, -1, -1, 0); setwallcel(grate,1); setwallcel(grateback,1); setadjoinflags(grate,2); setadjoinflags(grateback,2); if(tgrate!=-1) DestroyThing(tgrate); if(tgrateback!=-1) DestroyThing(tgrateback); } return; end
# Jedi Knight Cog Script # # 00_AISleep.cog # # Keeps an enemy asleep until triggered awake # Added damaged as awake - By Edward # # [RD] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved # ======================================================================================== symbols message startup message entered message user0 message damaged thing enemy mask=-1 sector trigger int awake=0 local end # ======================================================================================== code startup: CaptureThing(enemy); AISetMode(enemy, 0x2000); return; # ........................................................................................ damaged: entered: AIClearMode(enemy, 0x2000); AISetMode(enemy, 0x200); return; # ........................................................................................ user0: call entered; return; end
# You must destroy the DUDE STARE! # And this is how: # Take about five dozen eggs, start putting them in a bowl, # Mix the **** out of them, and what do you get? # ... # # By Edward symbols message startup message activated message playeraction message damaged message timer message pulse message user0 #----Start by getting to the DUDE of the operation----# thing hidden thing actor int played=0 local thing player local #----Then the Self Destruct Button-------------------# surface destruction mask=-1 thing destruction2 mask=-1 sound ky_bastproof sound ky_forceproof sound breakbutton sound SelfDestInit sound SelfDestAbort sound Dest0 sound Dest1 sound Dest2 sound Dest3 sound Dest4 sound Dest5 sound Dest6 sound Dest7 sound Dest8 sound Dest9 sound Dest10 sound Destend0 sound Destend1 sound Destend2 sound Destend3 sound Destend4 sound Destend5 sound Destend6 sound Destend7 sound Destend8 sound Destend9 sound Destend10 template explosions #----And escape faster than the speed of... Dest!----# thing escam0 thing escam1 thing escam2 thing expcam0 thing expcam1 thing GameOver model TBC thing escapecar linkid=50 thing escpuller template escarstunt thing fin0 thing fin1 thing fin2 thing fin3 thing fin4 thing fin5 thing fin6 thing fin7 thing fin8 thing fin9 thing fin10 thing fin11 thing fin12 thing fin13 thing fin14 thing fin15 thing fin16 thing fin17 thing fin18 thing fin19 thing fin20 thing fin21 thing fin22 thing fin23 thing fin24 thing fin25 thing fin26 thing fin27 thing escdoor thing escchair template escfire int esck=-1 local keyframe eschatch sound hatch sound finmove sound finstop sound esclaunch sound escmove sound escout sound TADA #----Failed To Destroy? surface ALERT nolink thing LazDoor0 thing LazDoor1 thing LazDoor2 thing LazDoor3 thing LazCam0 thing LazCam1 thing lazemmit thing escar2 template LAZOR sound WARNING sound IMMAFIRIN sound MAHLAZOR int view=0 local int lunch=0 local int ch0 local int c local flex i local cog part2 end # code startup: sleep(2); esck=PlayKey(escapecar,eschatch,1,0x0); player=GetLocalPlayerThing(); CaptureThing(escapecar); SetWallCel(destruction,0); CaptureThing(destruction2); return; activated: If(GetSenderRef()==destruction || GetSenderRef()==destruction2) { if(GetWallCel(destruction)==0) { print("SELF DESTRUCTION INITIATED"); SetWallCel(destruction,1); PlaySoundLocal(SelfDestInit,1,0,0x0); SetTimerEx(GetSoundLen(SelfDestInit),20,0,0); SetGoalFlags(player,9,1); } else if(GetWallCel(destruction)==1) { print("SELF DESTRUCTION ABORTED"); SetWallCel(destruction,0); PlaySoundLocal(SelfDestAbort,1,0,0x0); KillTimerEx(21); KillTimerEx(22); ClearGoalFlags(player,9,3); } } else if(GetSenderRef()==escapecar) { lunch=1; SetPulse(0.001); SetActorFlags(player,0x840008); TeleportThing(player,escapecar); StopKey(escapecar,esck,1); PlaySoundLocal(hatch,1,0,0x0); SetTimerEx(1,50,0,0); } return; playeraction: If(GetParam(0)==2 || GetParam(0)==3) { if(played==5) { SetActionCog(-1,0); SetActorFlags(player,0x400000); } } return; damaged: If(GetSenderRef()==destruction || GetSenderRef()==destruction2) { if(GetParam(1) & 0x1) { if(GetWallCel(destruction)==0) { print("SELF DESTRUCTION INITIATED"); SetWallCel(destruction,1); PlaySoundLocal(SelfDestInit,1,0,0x0); SetTimerEx(GetSoundLen(SelfDestInit),20,0,0); SetGoalFlags(player,9,1); } return; } if(GetParam(1) & 0x4) { PlaySoundLocal(ky_bastproof,1,0,0x100); print("This button is blastproof... But is it laser proof?"); return; } if(GetParam(1) & 0x8) { PlaySoundLocal(ky_forceproof,1,0,0x100); print("This thing's too well insulated..."); return; } PlaySoundPos(breakbutton,GetSurfaceCenter(destruction),1,-1,-1,0x0); If(GetWallCel(destruction)<2) { print("SELF DESTRUCTION INITIATED"); PlaySoundPos(SelfDestInit,GetSurfaceCenter(destruction),1,-1,100,0x0); SetTimerEx(GetSoundLen(SelfDestInit),20,0,0); SetWallCel(destruction,2); DestroyThing(destruction2); } SetGoalFlags(player,9,1); } return; timer: //Self Destruction if(GetSenderID()==20) { KillTimerEx(20); if(played<3) { print("SELF DESTRUCTION ABORTED"); if(GetWallCel(destruction)==1) SetWallCel(destruction,0); PlaySoundLocal(SelfDestAbort,1,0,0x0); ClearGoalFlags(player,9,3); return; } SetTimerEx(1,21,10,0); } else if(GetSenderID()==21) { KillTimerEx(21); if(GetParam(0)>0) { PlaySoundLocal(Dest0[GetParam(0)],1,0,0x0); } else { PlaySoundLocal(Destend0[rand()*10],1,0,0x0); } If(GetParam(0)>0) SetTimerEx(1,21,GetParam(0)-1,0); else SetTimerEx(.5,22,0,0); } else if(GetSenderID()==22) { KillTimerEx(22); SetPulse(0.001); played=4; SetTimerEx(0.1,23,0,0); } else if(GetSenderID()==23) { KillTimerEx(23); KillTimerEx(50); KillTimerEx(51); KillTimerEx(52); KillTimerEx(53); KillTimerEx(54); KillTimerEx(55); KillTimerEx(56); KillTimerEx(57); SetActorFlags(player,0x840000); CreateThing(explosions,GameOver); SetTimerEx(3,24,0,0); } else if(GetSenderID()==24) { KillTimerEx(24); if(lunch<3) { ClearThingFlags(GameOver,0x10); TeleportThing(player,hidden); TeleportThing(actor,escar2); MoveToFrame(GameOver,1,50); SetPulse(0); SetCameraFocus(0,expcam1); SetActionCog(GetSelfCog(),0x7FFFFFFF); played=5; return; } else { SetThingModel(GameOver,TBC); ClearThingFlags(GameOver,0x10); MoveToFrame(GameOver,1,50); WaitForStop(GameOver); PlaySoundLocal(TADA,1,0,0); played=10; lunch=5; SetGoalFlags(player,8,2); SetGoalFlags(player,9,2); SetTimerEx(3,25,0,0); } } else if(GetSenderID()==25) { SetPulse(0); ClearActorFlags(player,0x840008); ClearGoalFlags(player,5,3); ClearGoalFlags(player,6,3); ClearGoalFlags(player,7,3); ClearGoalFlags(player,8,3); ClearGoalFlags(player,9,3); SendMessageEx(part2,user0,view,0,0,0); } //Escaping da dude else if(GetSenderID()==50) { KillTimerEx(50); If(GetWallCel(destruction)==1) { SetWallCel(destruction,0); PlaySoundLocal(SelfDestAbort,1,0,0x0); KillTimerEx(21); KillTimerEx(22); } DestroyThing(escchair); TeleportThing(player,hidden); TeleportThing(actor,escar2); SetTimerEx(0.01,51,1,0); } else if(GetSenderID()==51) { KillTimerEx(51); DestroyThing(escapecar); escapecar=-1; while(escapecar==-1) { escapecar=CreateThing(escarstunt,escpuller); sleep(0.001); } CaptureThing(escapecar); ParseArg(escapecar,"move=none"); AttachThingToThing(escapecar,escpuller); for(i=0.1; i<1; i=i+0.1) { MoveToFrame(escpuller,1,i); sleep(0.05); } SetTimerEx(0.25,60,0,0); for(i=1; i>0; i=i-0.1) { MoveToFrame(escpuller,1,i); sleep(0.05); } for(i=0.1; i<1; i=i+0.1) { MoveToFrame(escpuller,0,i); sleep(0.05); } for(i=1; i>0; i=i-0.1) { MoveToFrame(escpuller,0,i); sleep(0.05); } SetTimerEx(1,55,1,0); } else if(GetSenderID()==55) { KillTimerEx(55); MoveToFrame(escdoor,1,4); PlaySoundThing(esclaunch,escapecar,1,-1,100,0x80); ch0=PlaySoundThing(escmove,escapecar,0,-1,100,0x81); ChangeSoundVol(ch0,1,1); ChangeSoundPitch(ch0,4,3); SetTimerEx(0.1,56,1,0); } else if(GetSenderID()==56) { KillTimerEx(56); ParseArg(escapecar,"move=none"); AttachThingToThing(escam0,escapecar); AttachThingToThing(escapecar,escpuller); MoveToFrame(escpuller,1,GetParam(0)); if(VectorDist( GetThingPos(escpuller),GetThingPos(escdoor) )>.6) { SetTimerEx(0.1,56,GetParam(0)+5,0); } else { MoveToFrame(escpuller,2,GetParam(0)); StopSound(ch0,1); lunch=2; SetTimerEx(1,57,0,0); PlaySoundLocal(escout,1,0,0x0); WaitForStop(escpuller); lunch=4; } } else if(GetSenderID()==57) { lunch=3; if(GetWallCel(destruction)==0) { SetTimerEx(1,62,0,0); played=20; } else if(GetWallCel(destruction)==2) { if(played<3) { SetTimerEx(1,62,0,0); played=20; } } } else if(GetSenderID()==60) { KillTimerEx(60); MoveToFrame(fin0[GetParam(0)],1,1); ch0=PlaySoundThing(finmove,fin0[GetParam(0)],1,-1,-1,0x80); ChangeSoundPitch(ch0,0.5,0.05); SetTimerEx(.75,61,GetParam(0),0); if(GetParam(0)<28) SetTimerEx(0.01,60,GetParam(0)+1,0); } else if(GetSenderID()==61) { KillTimerEx(61); PlaySoundThing(finstop,fin0[GetParam(0)],1,-1,-1,0x80); } //SHOOP DA WHOOP! else if(GetSenderID()==62) { KillTimerEx(62); MoveToFrame(LazDoor0,1,4); MoveToFrame(LazDoor1,1,4); MoveToFrame(LazDoor2,1,4); MoveToFrame(LazDoor3,1,4); PlaySoundLocal(WARNING,1,0,0x0); SetTimerEx(3,70,0,0); sleep(3); PlaySoundLocal(IMMAFIRIN,1,0,0x0); SetTimerEx(GetSoundLen(IMMAFIRIN),63,0,0); } else if(GetSenderID()==63) { KillTimerEx(63); PlaySoundLocal(MAHLAZOR,1,0,0x0); CreateThing(LAZOR,lazemmit); SetTimerEx(0.5,64,0,0); } else if(GetSenderID()==64) { KillTimerEx(64); played=21; MoveToFrame(escar2,1,50); SetTimerEx(0.5,65,0,0); } else if(GetSenderID()==65) { KillTimerEx(65); CreateThing(LAZOR,escar2); SetTimerEx(5,66,0,0); } else if(GetSenderID()==66) { KillTimerEx(66); for(c=0; c1) view=0; printint(view); } if(lunch==1) { if(view==0) SetCameraFocus(0,escam0); else SetCameraFocus(0,escam1); } else if(lunch==2) { if(view==0) SetCameraFocus(0,escam0); else SetCameraFocus(0,escam2); } else if(lunch==3) { if(GetWallCel(destruction)==2 && played>2) { SetCameraFocus(0,expcam0); } } else if(lunch==4) { SetCameraFocus(0,expcam0); } if(played==4) { SetCameraFocus(0,expcam1); } else if(played==20) { SetCameraFocus(0,LazCam0); } else if(played==21) { SetCameraFocus(0,LazCam1); } SetActorFlags(GetLocalPlayerThing(),0x2); FireProjectile(escapecar,escfire,-1,-1,'0 -.15 .1','0 0 0',0,0,0,0); return; user0: played=GetParam(0); return; end
# Ok, so not everything could fit in one cog. # # By Edward symbols message startup message entered message playeraction message killed message removed message timer message pulse thing Dudecam0 thing Dudecam1 thing Dudecam2 thing Dudecam3 thing Dudecam4 thing actor thing hidden thing player local sector DudeChamber thing DADUDE mask=-1 thing DudeDoor thing stepforward sound forceshut sound rumbledoor sound shutdoor sound falldoor sound TADA sound KY_YOU sound JE_HaventMet sound KY_Sorry sound JE_ImHisGreat sound JE_Great0 sound JE_Great1 sound JE_Great2 sound JE_Great3 sound JE_GrandChild sound KY_Interesting sound KY_AnyPlan sound JE_DestWhiteBlue sound KY_Why sound JE_HateColors sound JE_Also sound JE_REVANGE sound KY_OverDeadBody sound KY_WhatMeSaying sound KY_ThatsDone keyframe je_sitting int jk=-1 local int played=0 local material kkfagoat material j_facef3 int skipped=0 local int view=0 local int ch0 local int r local model WeapF model WeapG material rside_mat material rtip_mat template tpl_wall template tpl_blood template tpl_saber cog anotherpart end # code startup: sleep(2); jk=PlayKey(DADUDE,je_sitting,1,0x4); player=GetLocalPlayerThing(); AISetMode(DADUDE,0x2000); CaptureThing(DADUDE); return; entered: If(GetSenderRef()!=DudeChamber) return; if(played!=0) return; SetGoalFlags(player,6,2); PlaySong(14,14,0); SetMusicVol(0.5); played=1; SendMessageEx(anotherpart,user0,played,0,0,0); SetPulse(0.001); if(GetMajorMode(player)==0 || GetMajorMode(player)==3) { SetArmedMode(actor,0); jkSetWeaponMesh(actor,WeapF); } else if(GetMajorMode(player)==1 || GetMajorMode(player)==4) { SetArmedMode(actor,1); jkSetWeaponMesh(actor,WeapG); } else if(GetMajorMode(player)==2 || GetMajorMode(player)==5) { SetArmedMode(actor,2); SelectWeapon(player,1); jkSetWeaponMesh(actor,WeapF); } SetThingModel(actor,GetThingModel(player)); TeleportThing(actor,stepforward); TeleportThing(player,hidden); SetCameraFocus(0,Dudecam0); SetActorFlags(player,0x840000); SetActionCog(GetSelfCog(),0x7FFFFFFF); AISetLookPos(actor,GetThingPos(DADUDE)); SetTimerEx(0.5,0,0,0); return; playeraction: If(GetParam(0)==2 || GetParam(0)==3) { If(played==1 && skipped==0) { print(">>>>>>>> Spin on! >>>>>>>>"); for(r=0; r<200; r=r+1) KillTimerEx(r); SetTimerEx(0.1,17,0,0); MoveToFrame(DudeDoor,2,10); TeleportThing(player,actor); TeleportThing(actor,hidden); AIClearMode(DADUDE,0x2000); AISetMode(DADUDE,0x4); SelectWeapon(player,GetWeaponBin(11)); StopKey(DADUDE,jk,1); skipped=1; } ReturnEx(0); } return; timer: // Da DUDE! If(GetSenderID()==0) { KillTimerEx(0); if(skipped==1) return; PlaySoundThing(KY_YOU,actor,1,-1,100,0x80); jkPrintUniString(-3,50000); SetTimerEx(0.025,30,KY_YOU,Dudecam0); SetTimerEx(0.5,1,0,0); SetTimerEx(0.1,257,11,0); SetTimerEx(0.5,256,0,0); } else if(GetSenderID()==1) { KillTimerEx(1); if(skipped==1) return; PlaySoundThing(forceshut,DADUDE,1,-1,100,0x80); ch0=PlaySoundThing(rumbledoor,DudeDoor,0,-1,100,0x81); ChangeSoundVol(ch0,1,0.5); MoveToFrame(DudeDoor,2,4); SetTimerEx(0.25,2,0,0); WaitForStop(DudeDoor); StopSound(ch0,0.25); PlaySoundThing(shutdoor,DudeDoor,1,-1,100,0x80); } else if(GetSenderID()==2) { KillTimerEx(2); if(skipped==1) return; AISetLookPos(actor,GetThingPos(DudeDoor)); if(GetParam(0)<2) SetTimerEx(0.5,2,GetParam(0)+1,0); else SetTimerEx(1,3,0,0); } else if(GetSenderID()==3) { KillTimerEx(3); if(skipped==1) return; AISetLookPos(actor,GetThingPos(DADUDE)); SetTimerEx(0.5,4,0,0); } else if(GetSenderID()==4) { KillTimerEx(4); if(skipped==1) return; SetCameraFocus(0,Dudecam1); PlaySoundThing(JE_HaventMet,DADUDE,1,-1,100,0x80); jkPrintUniString(-3,50001); SetTimerEx(0.025,30,JE_HaventMet,Dudecam0); SetTimerEx(GetSoundLen(JE_HaventMet),5,0,0); SetTimerEx(0.1,511,0,0); SetTimerEx(GetSoundLen(JE_HaventMet),512,0,0); } else if(GetSenderID()==5) { KillTimerEx(5); if(skipped==1) return; SetCameraFocus(0,Dudecam0); PlaySoundThing(KY_Sorry,actor,1,-1,100,0x80); jkPrintUniString(-3,50002); SetTimerEx(0.025,30,KY_Sorry,Dudecam0); SetTimerEx(GetSoundLen(KY_Sorry),6,0,0); SetTimerEx(.1,255,0,0); SetTimerEx(GetSoundLen(KY_Sorry),256,0,0); } else if(GetSenderID()==6) { KillTimerEx(6); if(skipped==1) return; SetCameraFocus(0,Dudecam1); PlaySoundThing(JE_ImHisGreat,DADUDE,1,-1,100,0x80); jkPrintUniString(-3,50003); SetTimerEx(0.025,30,JE_ImHisGreat,Dudecam0); SetTimerEx(GetSoundLen(JE_ImHisGreat),7,0,0); SetTimerEx(.1,511,0,0); SetTimerEx(GetSoundLen(JE_ImHisGreat),512,0,0); } else if(GetSenderID()==7) { KillTimerEx(7); if(skipped==1) return; jkStringClear(); if(rand()>.5) jkStringConcatUniString(50100); else jkStringConcatUniString(50101); if(rand()>.5) jkStringConcatUniString(50102); else jkStringConcatUniString(50103); if(rand()>.5) jkStringConcatUniString(50104); else jkStringConcatUniString(50105); if(rand()>.5) jkStringConcatUniString(50106); else jkStringConcatUniString(50107); if(rand()>.5) jkStringConcatUniString(50108); else jkStringConcatUniString(50109); jkStringOutput(-3,-1); r=rand()*4; if(r>3) r=3; ch0=PlaySoundThing(JE_Great0[r],DADUDE,1,-1,100,0x80); ChangeSoundPitch(ch0,.9+(rand()/5),0.05); SetTimerEx(0.025,30,JE_Great0[r],Dudecam0); SetTimerEx(0.05,513,6,0); SetTimerEx(GetSoundLen(JE_Great0[r])-0.1,512,0,0); if(GetParam(0)<16) SetTimerEx(GetSoundLen(JE_Great0[r])-0.05,7,GetParam(0)+1,0); else SetTimerEx(0.5,8,0,0); } else if(GetSenderID()==8) { KillTimerEx(8); if(skipped==1) return; PlaySoundThing(JE_GrandChild,DADUDE,1,-1,100,0x80); jkPrintUniString(-3,50004); SetTimerEx(0.025,30,JE_GrandChild,Dudecam0); SetTimerEx(GetSoundLen(JE_GrandChild),9,0,0); SetTimerEx(.1,511,0,0); SetTimerEx(GetSoundLen(JE_GrandChild),512,0,0); } else if(GetSenderID()==9) { KillTimerEx(9); if(skipped==1) return; SetCameraFocus(0,Dudecam0); PlaySoundThing(KY_Interesting,actor,1,-1,100,0x80); jkPrintUniString(-3,50005); SetTimerEx(0.025,30,KY_Interesting,Dudecam0); StopKey(DADUDE,jk,1); AISetMovePos(DADUDE,GetSectorCenter(DudeChamber)); SetTimerEx(GetSoundLen(KY_Interesting),10,0,0); SetTimerEx(.1,255,0,0); SetTimerEx(GetSoundLen(KY_Interesting),256,0,0); } else if(GetSenderID()==10) { KillTimerEx(10); if(skipped==1) return; SetCameraFocus(0,Dudecam2); AISetLookPos(actor,GetThingPos(DADUDE)); PlaySoundThing(KY_AnyPlan,actor,1,-1,100,0x80); SetTimerEx(0.025,30,KY_AnyPlan,DADUDE); jkPrintUniString(-3,50006); SetTimerEx(GetSoundLen(KY_AnyPlan),11,0,0); SetTimerEx(.1,255,0,0); SetTimerEx(GetSoundLen(KY_AnyPlan),256,0,0); } else if(GetSenderID()==11) { KillTimerEx(11); if(skipped==1) return; AISetLookPos(actor,GetThingPos(DADUDE)); AISetLookPos(DADUDE,GetThingPos(actor)); PlaySoundThing(JE_DestWhiteBlue,DADUDE,1,-1,100,0x80); SetTimerEx(0.025,30,JE_DestWhiteBlue,DADUDE); jkPrintUniString(-3,50007); SetTimerEx(GetSoundLen(JE_DestWhiteBlue),12,0,0); SetTimerEx(.1,511,0,0); SetTimerEx(GetSoundLen(JE_DestWhiteBlue),512,0,0); } else if(GetSenderID()==12) { KillTimerEx(12); if(skipped==1) return; SetCameraFocus(0,Dudecam3); PlaySoundThing(KY_Why,actor,1,-1,100,0x80); jkPrintUniString(-3,50008); SetTimerEx(0.025,30,KY_Why,DADUDE); SetTimerEx(GetSoundLen(KY_Why),13,0,0); SetTimerEx(.1,255,0,0); SetTimerEx(GetSoundLen(KY_Why),256,0,0); } else if(GetSenderID()==13) { KillTimerEx(13); if(skipped==1) return; SetCameraFocus(0,Dudecam4); PlaySoundThing(JE_HateColors,DADUDE,1,-1,100,0x80); SetTimerEx(0.025,30,JE_HateColors,DADUDE); SetTimerEx(0.05,33,JE_HateColors,Dudecam0); jkPrintUniString(-3,50009); SetTimerEx(GetSoundLen(JE_HateColors),14,0,0); SetTimerEx(.1,511,0,0); SetTimerEx(GetSoundLen(JE_HateColors),512,0,0); } else if(GetSenderID()==14) { KillTimerEx(14); if(skipped==1) return; PlaySoundThing(JE_Also,DADUDE,1,-1,100,0x80); jkPrintUniString(-3,50010); SetTimerEx(0.025,30,JE_Also,DADUDE); SetTimerEx(GetSoundLen(JE_Also),15,0,0); SetTimerEx(.1,511,0,0); SetTimerEx(GetSoundLen(JE_Also),512,0,0); } else if(GetSenderID()==15) { KillTimerEx(15); if(skipped==1) return; MoveToFrame(Dudecam4,1,10); WaitForStop(Dudecam4); PlaySoundThing(JE_REVANGE,DADUDE,1,-1,100,0x80); SetTimerEx(0.025,30,JE_REVANGE,DADUDE); SetTimerEx(0.05,30,JE_REVANGE,Dudecam1); SetTimerEx(0.075,30,JE_REVANGE,DudeDoor); if(rand()>.5) print("REVANGE!"); else print("RWANGE!"); SetTimerEx(GetSoundLen(JE_REVANGE),16,0,0); SetTimerEx(0.1,513,14,0); SetTimerEx(0.5,513,5,0); SetTimerEx(0.6,513,13,0); SetTimerEx(0.8,512,0,0); TeleportThing(player,actor); TeleportThing(actor,hidden); } else if(GetSenderID()==16) { KillTimerEx(15); if(skipped==1) return; SetCameraFocus(0,Dudecam3); SelectWeapon(player,GetWeaponBin(11)); PlaySoundThing(KY_OverDeadBody,player,1,-1,100,0x80); SetTimerEx(0.025,30,KY_OverDeadBody,DADUDE); SetTimerEx(0.03,31,KY_OverDeadBody,Dudecam3); jkPrintUniString(-3,50011); SetTimerEx(GetSoundLen(KY_OverDeadBody),17,0,0); SetTimerEx(.1,255,0,0); SetTimerEx(GetSoundLen(KY_OverDeadBody),256,0,0); } else if(GetSenderID()==17) { KillTimerEx(17); PlaySoundThing(KY_WhatMeSaying,player,1,-1,100,0x80); jkSetSaberInfo(DADUDE, rside_mat, rtip_mat, 0.003, 0.001, 0.100, tpl_wall, tpl_blood, tpl_saber); jkSetFlags(DADUDE, 0x5); jkPrintUniString(-3,50012); SetTimerEx(0.025,30,KY_WhatMeSaying,DADUDE); SetTimerEx(GetSoundLen(KY_WhatMeSaying),18,0,0); SetTimerEx(.1,255,0,0); SetTimerEx(GetSoundLen(KY_WhatMeSaying),256,0,0); } else if(GetSenderID()==18) { KillTimerEx(18); SetCameraFocus(0,player); SetActionCog(-1, 0); ClearActorFlags(player,0x840000); AIClearMode(DADUDE,0x2000); AISetMode(DADUDE,0x4); if(view!=GetCurrentCamera()) CycleCamera(); played=2; skipped=1; SetGoalFlags(player,7,1); AutoSaveGame(); SetPulse(0); SendMessageEx(anotherpart,user0,played,0,0,0); } else if(GetSenderID()==30) { PlaySoundPos(GetParam(0),GetSurfaceCenter(GetSectorSurfaceRef(GetThingSector(GetParam(1)),rand()*GetNumSectorSurfaces(GetThingSector(GetParam(1))))),1,-1,100,0x0); SetTimerEx(0.025,31,GetParam(0),GetParam(1)); } else if(GetSenderID()==31) { PlaySoundPos(GetParam(0),GetSurfaceCenter(GetSectorSurfaceRef(GetThingSector(GetParam(1)),rand()*GetNumSectorSurfaces(GetThingSector(GetParam(1))))),0.75,-1,100,0x0); SetTimerEx(0.025,32,GetParam(0),GetParam(1)); } else if(GetSenderID()==32) { PlaySoundPos(GetParam(0),GetSurfaceCenter(GetSectorSurfaceRef(GetThingSector(GetParam(1)),rand()*GetNumSectorSurfaces(GetThingSector(GetParam(1))))),0.5625,-1,100,0x0); SetTimerEx(0.025,33,GetParam(0),GetParam(1)); } else if(GetSenderID()==33) { PlaySoundPos(GetParam(0),GetSurfaceCenter(GetSectorSurfaceRef(GetThingSector(GetParam(1)),rand()*GetNumSectorSurfaces(GetThingSector(GetParam(1))))),0.421875,-1,100,0x0); SetTimerEx(0.025,34,GetParam(0),GetParam(1)); } else if(GetSenderID()==34) { PlaySoundPos(GetParam(0),GetSurfaceCenter(GetSectorSurfaceRef(GetThingSector(GetParam(1)),rand()*GetNumSectorSurfaces(GetThingSector(GetParam(1))))),0.316406,-1,100,0x0); SetTimerEx(0.025,35,GetParam(0),GetParam(1)); } else if(GetSenderID()==35) { PlaySoundPos(GetParam(0),GetSurfaceCenter(GetSectorSurfaceRef(GetThingSector(GetParam(1)),rand()*GetNumSectorSurfaces(GetThingSector(GetParam(1))))),0.237304,-1,100,0x0); SetTimerEx(0.025,36,GetParam(0),GetParam(1)); } else if(GetSenderID()==36) { PlaySoundPos(GetParam(0),GetSurfaceCenter(GetSectorSurfaceRef(GetThingSector(GetParam(1)),rand()*GetNumSectorSurfaces(GetThingSector(GetParam(1))))),0.177978,-1,100,0x0); SetTimerEx(0.025,37,GetParam(0),GetParam(1)); } else if(GetSenderID()==37) { PlaySoundPos(GetParam(0),GetSurfaceCenter(GetSectorSurfaceRef(GetThingSector(GetParam(1)),rand()*GetNumSectorSurfaces(GetThingSector(GetParam(1))))),0.133483,-1,100,0x0); SetTimerEx(0.025,38,GetParam(0),GetParam(1)); } else if(GetSenderID()==38) { PlaySoundPos(GetParam(0),GetSurfaceCenter(GetSectorSurfaceRef(GetThingSector(GetParam(1)),rand()*GetNumSectorSurfaces(GetThingSector(GetParam(1))))),0.100112,-1,100,0x0); SetTimerEx(0.025,39,GetParam(0),GetParam(1)); } else if(GetSenderID()==39) { PlaySoundPos(GetParam(0),GetSurfaceCenter(GetSectorSurfaceRef(GetThingSector(GetParam(1)),rand()*GetNumSectorSurfaces(GetThingSector(GetParam(1))))),0.075084,-1,100,0x0); } //Faces: kkfagoat else if(GetSenderID()==255) { KillTimerEx(255); SetMaterialCel(kkfagoat,rand()*14); SetTimerEx(.1,255,0,0); } else if(GetSenderID()==256) { SetMaterialCel(kkfagoat,0); KillTimerEx(255); KillTimerEx(256); } else if(GetSenderID()==257) { SetMaterialCel(kkfagoat,GetParam(0)); } //Faces: j_facef3 else if(GetSenderID()==511) { KillTimerEx(511); SetMaterialCel(j_facef3,rand()*13); SetTimerEx(.1,511,0,0); } else if(GetSenderID()==512) { SetMaterialCel(j_facef3,0); KillTimerEx(511); KillTimerEx(512); } else if(GetSenderID()==513) { SetMaterialCel(j_facef3,GetParam(0)); } return; pulse: If(GetCurrentCamera()==1) { CycleCamera(); view=view+1; if(view>1) view=0; printint(view); } SetActorFlags(GetLocalPlayerThing(),0x2); return; removed: killed: If(GetSenderRef()==DADUDE) { SetMaterialCel(j_facef3,15); PlaySoundLocal(TADA,1,0,0); MoveToFrame(DudeDoor,3,2); WaitForStop(DudeDoor); PlaySoundThing(falldoor,DudeDoor,1,-1,100,0x80); PlaySoundLocal(KY_ThatsDone,1,0,0x0); jkPrintUniString(-3,50013); SetTimerEx(0.025,30,KY_ThatsDone,player); SetTimerEx(0.1,255,0,0); SetTimerEx(GetSoundLen(KY_ThatsDone),256,0,0); played=3; SendMessageEx(anotherpart,user0,played,0,0,0); SetGoalFlags(player,7,2); } return; end
# Always Facing # # By Edward symbols message startup message pulse thing facer thing facing flex rate end # code startup: SetPulse(rate); return; pulse: AISetLookPos(facer,GetThingPos(facing)); return; end
# Always Facing # # By Edward symbols message startup message pulse thing looker thing looking flex rate end # code startup: SetPulse(rate); return; pulse: SetThingLook(looker,VectorSub(GetThingPos(looking),GetThingPos(looker))); return; end
# You cheated, endure the annoyance! # # By Edward symbols message activated message pulse message timer message damaged thing player local surface dareactivate surface endofhole nolink material hole sound entering sound weeehaaa #----------------------------# thing pickin thing badgamehold thing sidecam thing crapgen template crap0 template crap1 template crap2 template crap3 template crap4 template crap5 template crap6 template crap7 template crap8 template crap9 template crapA template crapB template crapC template crapD template crapE template crapF template boom thing c local thing p local #---------------------------# thing returned int placed=0 local end # code activated: If(GetSenderRef()!=dareactivate) return; player=GetLocalPlayerThing(); SetActorFlags(player,0x800000); SetSurfaceMat(dareactivate,hole); SetFaceType(dareactivate,0x7); ClearSurfaceFlags(dareactivate,0xFFFFF); SetPulse(0.001); TeleportThing(player,pickin); PlaySoundLocal(entering,1,0,0x0); sleep(2); PlaySoundLocal(weeehaaa,1,0,0x0); sleep(GetSoundLen(weeehaaa)); placed=1; SetTimerEx(230,0,0,0); SetTimerEx(2,1,0,0); SetCameraFocus(0,sidecam); return; pulse: if(placed==0) { DetachThing(player); ApplyForce(player,VectorNorm(VectorSub( GetSurfaceCenter(endofhole),GetThingPos(player) ))); } else if(placed==1) { If(GetCurrentCamera()==1) CycleCamera(); p=-1; p=FireProjectile(player,crap0,-1,-1,'0 0 0','0 0 0',0,0,0,0); if(p!=-1) { if(VectorX(GetThingLVec(player))>0) SetThingPos(badgamehold,VectorAdd(GetThingPos(badgamehold),'0 .1 0')); else if(VectorX(GetThingLVec(player))<0) SetThingPos(badgamehold,VectorAdd(GetThingPos(badgamehold),'0 -.1 0')); if(VectorZ(GetThingLVec(p))>0) SetThingPos(badgamehold,VectorAdd(GetThingPos(badgamehold),'0 0 .1')); else if(VectorZ(GetThingLVec(p))<0) SetThingPos(badgamehold,VectorAdd(GetThingPos(badgamehold),'0 0 -.1')); DestroyThing(p); } If(VectorX(GetThingThrust(player))>0) SetThingPos(badgamehold,VectorAdd(GetThingPos(badgamehold),'0 .1 0')); else If(VectorX(GetThingThrust(player))>0) SetThingPos(badgamehold,VectorAdd(GetThingPos(badgamehold),'0 -.1 0')); If(VectorY(GetThingThrust(player))>0) SetThingPos(badgamehold,VectorAdd(GetThingPos(badgamehold),'0 0 .1')); else If(VectorY(GetThingThrust(player))>0) SetThingPos(badgamehold,VectorAdd(GetThingPos(badgamehold),'0 0 -.1')); If(VectorY(GetThingPos(badgamehold))<29.1) SetThingPos(badgamehold,VectorSet( 84.1,29.1,VectorZ(GetThingPos(badgamehold)) )); If(VectorY(GetThingPos(badgamehold))>29.9) SetThingPos(badgamehold,VectorSet( 84.1,29.9,VectorZ(GetThingPos(badgamehold)) )); If(VectorZ(GetThingPos(badgamehold))>-11.1) SetThingPos(badgamehold,VectorSet( 84.1,VectorY(GetThingPos(badgamehold)),-11.1 )); If(VectorZ(GetThingPos(badgamehold))<-11.9) SetThingPos(badgamehold,VectorSet( 84.1,VectorY(GetThingPos(badgamehold)),-11.9 )); TeleportThing(player,badgamehold); SetActorFlags(player,0x2); } print("*======================================================*"); print("YES! I SHALL ANNOY YOU! JUST BECAUSE YOU WENT THIS FAR!"); print("AND YES! IT IS A VERY UNECESSARY THING I MADE HERE!"); print("AND YES AGAIN! I AM A MAD LITTLE BOY! YOU MIND TERRIBLY?"); print("*======================================================*"); return; damaged: If(GetThingType(GetSenderRef())==10 || GetThingType(GetSenderRef())==2) return; If(GetSenderRef()==player || GetSenderRef()==badgamehold) return; CreateThing(boom,GetSenderRef()); DestroyThing(GetSenderRef()); return; timer: If(GetSenderID()==0) { KillTimerEx(2); SetPulse(0); ClearFaceType(dareactivate,0x7); SetSurfaceFlags(dareactivate,0x4); TeleportThing(player,returned); SetCameraFocus(0,player); SetThingLight(player,0,1); SetThingLight(badgamehold,0,1); SetThingLight(sidecam,0,1); SetThingLight(crapgen,0,1); SetTimerEx(1,3,0,0); } else if(GetSenderID()==1) { AddDynamicAdd(player,290,290,290); SetThingLight(player,1,1); SetThingLight(badgamehold,1,1); SetThingLight(sidecam,1,1); SetThingLight(crapgen,1,1); SetTimerEx(3,2,0,0); } else if(GetSenderID()==2) { KillTimerEx(2); MoveToFrame(crapgen,rand()*2,10+rand()*10); c=CreateThing(crap0[rand()*15],crapgen); CaptureThing(c); ParseArg(c,"move=physics staticdrag=1 airdrag=0 surfdrag=0 mass=1 soundclass=none"); SetCollideType(c,1); SetThingCollideSize(c,0.09); SetThingMoveSize(c,0.09); SetPhysicsFlags(c,0x44221); SetThingVel(c,VectorScale(GetThingLVec(crapgen),rand()*3) ); SetThingRotVel(c,VectorSet( (rand()*90)-45,(rand()*90)-45,(rand()*90)-45 )); SetTimerEx(rand(),2,0,0); } else if(GetSenderID()==3) { TeleportThing(player,returned); SetCameraFocus(0,player); } return; end
# Constantly check if player is here and if he cheats, well.... # # By Edward flags=0x240 symbols message startup message pulse sector amIhere0=-1 sector amIhere1=-1 sector amIhere2=-1 sector amIhere3=-1 sector amIhere4=-1 sector amIhere5=-1 sector amIhere6=-1 sector amIhere7=-1 sector amIhere8=-1 sector amIhere9=-1 sector amIhereA=-1 sector amIhereB=-1 sector amIhereC=-1 sector amIhereD=-1 sector amIhereE=-1 sector amIhereF=-1 int player local int i local end # code startup: SetPulse(0.1); return; pulse: player=GetLocalPlayerThing(); for(i=0; i<16; i=i+1) { if(GetThingSector(player)==amIhere0[i]) { if(!(GetPhysicsFlags(player) & 0x1)) SetPhysicsFlags(player,0x1); if(GetPhysicsFlags(player) & 0x400000) ClearPhysicsFlags(player,0x400000); if(GetActorFlags(player) & 0x8) ClearActorFlags(player,0x8); if(GetThingFlags(player) & 0x4) ClearThingFlags(player,0x4); } } return; end
# Jedi Knight Cog Script # # aotlensflair.cog # # Controls a semi-cool lens flair effect when an 3do is visible to the player. # # [SM Sith Lord] # # This cog is not made or distributed by LucasArts Entertainment Co. flags=0x240 symbols message startup message pulse message newplayer thing flairobject=-1 thing flairhelp1=-1 thing flairhelp2=-1 thing curflair=-1 local flex brightness=1 int R=255 int G=255 int B=255 flex fadeout=0.5 flex playerviewdot local flex dot=-1 local flex olddot local flex r_y local flex r_m local flex r_m2 local flex g_y local flex g_m local flex g_m2 local flex b_y local flex b_m local flex b_m2 local flex playerdist local flex dist2object local flex dist2help1 local flex dist2help2 local int tintamt local int ramt local int gamt local int bamt local int lenseffecthandle local int player local end # ======================================================================================== code startup: fadeout = fadeout/10; R = R*brightness; G = G*brightness; B = B*brightness; r_y = R/1.7; r_m = r_y/0.85; r_m2 = (R-r_y)/0.15; g_y = G/1.7; g_m = g_y/0.85; g_m2 = (G-g_y)/0.15; b_y = B/1.7; b_m = b_y/0.85; b_m2 = (B-b_y)/0.15; SetPulse(0.01); return; pulse: if( BitTest(GetSectorFlags(GetThingSector(GetLocalPlayerThing())),0x40) ) stop; FreeColorEffect(lenseffecthandle); olddot = dot; curflair = -1; if( HasLOS(flairobject,player) ) curflair = flairobject; else if( HasLOS(flairhelp2,player) ) curflair = flairhelp2; else if( IsThingVisible(flairhelp1) ) curflair = flairhelp1; if( curflair != -1 ) playerviewdot = ThingViewDot(player,curflair); else playerviewdot = -1; dist2object = VectorDist(GetThingPos(player),GetThingPos(flairobject)); dist2help1 = VectorDist(GetThingPos(player),GetThingPos(flairhelp1)); dist2help2 = VectorDist(GetThingPos(player),GetThingPos(flairhelp2)); if( dist2help2 < dist2help1 && dist2help2 < dist2object ) playerdist = dist2help2; else if( dist2help1 < dist2help2 && dist2help1 < dist2object ) playerdist = dist2help2; else playerdist = dist2object; //VectorDot(ThingViewDot(player,flairobject),VectorNorm(VectorSub(GetThingPos(flairobject),GetThingPos(player)))); if( playerviewdot < 0 ) playerviewdot = 0; dot = (playerviewdot/2) + (1/((playerdist*playerdist)+2)); //dot = 1/(VectorDist(GetThingPos(player),GetThingPos(flairobject))+1); if( dot != -1 ){ if( dot <= 0.85 && dot > 0 ){ ramt = r_m*dot; gamt = g_m*dot; bamt = b_m*dot; lenseffecthandle = NewColorEffect(0,0,0,0,0,0,ramt,gamt,bamt,1); } else if( dot > 0.85 ){ ramt = r_m2*(dot-0.85)+r_y; gamt = g_m2*(dot-0.85)+g_y; bamt = b_m2*(dot-0.85)+b_y; lenseffecthandle = NewColorEffect(0,0,0,0,0,0,ramt,gamt,bamt,1); } } if(!IsMulti()) { player = GetPrimaryFocus(GetCurrentCamera()); } return; newplayer: player = GetLocalPlayerThing(); return; # ........................................................................................ end
# Bump Light # # By Edward and help from DSLS_DeathSythe #=============== flags=0x240 symbols #--------------- message startup: message activated message damaged message trigger message timer thing light mask=-1 thing x keyframe bump int is_busy=0 local #--------------- end #=============== code #--------------- startup: //-Clear the IS_BUSY... is_busy = 0; CaptureThing(light); 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,GetSelfCog(), 0, 0, 0, 0); return; #--------------- trigger: //-Make sure that its the right trigger... if(GetSourceRef() != GetSelfCog()) 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
# Oh you have got to be kidding me! # No way am I gonna be jumping that construction. # # By Edward symbols message entered message pulse message timer sector enter thing cam sector lookin sound YourKidding sound AmI int done=0 local thing player local int view local end # code entered: If(GetSenderRef()!=enter) return; if(done==1) return; done=1; view=GetCurrentCamera(); player=GetLocalPlayerThing(); SetCameraFocus(0,cam); SetActorFlags(player,0x840000); SetTimerEx(1,1,1,1); SetPulse(0.01); return; pulse: If(GetCurrentCamera()==1) CycleCamera(); If( VectorDist(GetThingPos(player),GetThingPos(cam))
# Oi! I foun' a crapper! # Be''er ge' i' ou'! # HNG! # # Best Humor From The Loo, brought to you by... # um... what ever you may find down there... <.< symbols message startup message activated message pulse thing toilet0 linkid=10,mask=-1 thing toilet1 linkid=10,mask=-1 thing toilet2 linkid=10,mask=-1 thing toilet3 linkid=10,mask=-1 thing toilet4 linkid=11,mask=-1 thing toilet5 linkid=11,mask=-1 thing toilet6 linkid=11,mask=-1 thing toilet7 linkid=11,mask=-1 thing toilet8 linkid=12,mask=-1 thing toilet9 linkid=12,mask=-1 thing toiletA linkid=12,mask=-1 thing toiletB linkid=12,mask=-1 thing toiletC linkid=12,mask=-1 thing toiletD linkid=12,mask=-1 thing toiletE linkid=12,mask=-1 thing toiletF linkid=12,mask=-1 #--------Crappers0: Caipirinha------------------# # toilet0-3 keyframe caipri sound caipirinha thing caipiricam #--------Crappers1: Caramell--------------------# # toilet4-7 keyframe caramelldansen sound caramell thing caramellkameran #--------Crappers2: Skitan samt Spy-------------# # toilet8-F sound skitan0 sound skitan1 sound skitan2 thing skitikameran #-----------------------------------------------# sound others0 sound others1 sound others2 sound others3 material kkfagoat int kk=-1 local int busy=0 local int r local thing player local thing actor local end # code startup: sleep(rand()); for(r=0; r<16; r=r+1) CaptureThing(toilet0[r]); return; activated: If(busy!=0) return; busy=1; player=GetLocalPlayerThing(); actor=GetSourceRef(); if(GetSenderRef()==toilet0 || GetSenderRef()==toilet1 || GetSenderRef()==toilet2 || GetSenderRef()==toilet3) { if(rand()<.5) { SetActorFlags(actor,0x40000); if(actor==player) { SetThingLook(player,VectorSub( GetThingPos(caipiricam),GetThingPos(player) )); DetachThing(player); SetCameraFocus(0,caipiricam); SetPulse(0.01); } kk=PlayKey(actor,caipri,1,0x0); PlaySoundThing(caipirinha,GetSenderRef(),1,-1,50,0x80); sleep(GetSoundLen(caipirinha)); StopKey(actor,kk,0); ClearActorFlags(actor,0x40000); if(actor==player) { SetPulse(0); SetCameraFocus(0,player); SetMaterialCel(kkfagoat,0); } } else { r=rand()*4; if(r>3) r=3; PlaySoundThing(others0[r],GetSenderRef(),1,-1,100,0x80); } } else if(GetSenderRef()==toilet4 || GetSenderRef()==toilet5 || GetSenderRef()==toilet6 || GetSenderRef()==toilet7) { if(rand()<.5) { SetActorFlags(actor,0x40000); if(actor==player) { SetThingLook(player,VectorSub( GetThingPos(caramellkameran),GetThingPos(player) )); DetachThing(player); SetCameraFocus(0,caramellkameran); SetMaterialCel(kkfagoat,6); } kk=PlayKey(actor,caramelldansen,1,0x0); PlaySoundThing(caramell,GetSenderRef(),1,-1,50,0x80); sleep(GetSoundLen(caramell)); StopKey(actor,kk,0); if(actor==player) { SetMaterialCel(kkfagoat,0); sleep(1); SetMaterialCel(kkfagoat,1); sleep(0.5); SetMaterialCel(kkfagoat,0); sleep(1); SetMaterialCel(kkfagoat,1); sleep(0.5); SetMaterialCel(kkfagoat,0); sleep(1); SetCameraFocus(0,player); } ClearActorFlags(actor,0x40000); } else { r=rand()*4; if(r>3) r=3; PlaySoundThing(others0[r],GetSenderRef(),1,-1,100,0x80); } } else if(GetSenderRef()==toilet8 || GetSenderRef()==toilet9 || GetSenderRef()==toiletA || GetSenderRef()==toiletB || GetSenderRef()==toiletC || GetSenderRef()==toiletD || GetSenderRef()==toiletE || GetSenderRef()==toiletF) { if(rand()<.5) { SetActorFlags(actor,0x840000); if(actor==player) { SetCameraFocus(0,skitikameran); SetCameraFocus(1,skitikameran); } r=rand()*3; if(r>2) r=2; PlaySoundLocal(skitan0[r],1,0,0x0); sleep(GetSoundLen(skitan0[r])); if(actor==player) { SetCameraFocus(0,player); SetCameraFocus(1,player); } ClearActorFlags(actor,0x840000); } else { r=rand()*4; if(r>3) r=3; PlaySoundThing(others0[r],GetSenderRef(),1,-1,100,0x80); } } busy=0; return; pulse: SetMaterialCel(kkfagoat,rand()*16); return; end
# Crates and stuff, part 1. # straight forwards # # By Edward symbols message startup message pulse message arrived thing spawner template crate0 template crate1 template crate2 template crate3 template crate4 template crate5 template crate6 template crate7 flex easy_interval flex med_interval flex hard_interval flex easy_speed flex med_speed flex hard_speed surface conveyor0=-1 nolink surface conveyor1=-1 nolink surface conveyor2=-1 nolink surface conveyor3=-1 nolink surface conveyor4=-1 nolink surface conveyor5=-1 nolink surface conveyor6=-1 nolink surface conveyor7=-1 nolink vector convdir0 vector convdir1 vector convdir2 vector convdir3 vector convdir4 vector convdir5 vector convdir6 vector convdir7 int numframes flex withinrange int r local int t local end # code startup: sleep(rand()); for(t=0; t<8; t=t+1) { if(conveyor0[t]!=-1) slidewall(conveyor0[t],convdir0[t],easy_speed[GetDifficulty()]); } SetPulse(easy_interval[GetDifficulty()]); return; pulse: If(VectorDist(GetThingPos(GetPrimaryFocus(GetCurrentCamera())),GetThingPos(spawner))7) r=7; t=CreateThing(crate0[r],spawner); CaptureThing(t); MoveToFrame(t,numframes,easy_speed[GetDifficulty()]); } return; arrived: DestroyThing(GetSenderRef()); return; end
# Crates and stuff, part 2. # elev crate # # By Edward symbols message startup message pulse message arrived message user0 message user1 thing spawner template crate0 template crate1 template crate2 template crate3 template crate4 template crate5 template crate6 template crate7 surface conveyor0=-1 nolink surface conveyor1=-1 nolink surface conveyor2=-1 nolink surface conveyor3=-1 nolink surface conveyor4=-1 nolink surface conveyor5=-1 nolink surface conveyor6=-1 nolink surface conveyor7=-1 nolink vector convdir0 vector convdir1 vector convdir2 vector convdir3 vector convdir4 vector convdir5 vector convdir6 vector convdir7 int pauseframe int numframes flex withinrange int r local int t local int justspawn=0 local flex easy_interval flex med_interval flex hard_interval flex easy_speed flex med_speed flex hard_speed end # code startup: sleep(rand()); for(t=0; t<8; t=t+1) { if(conveyor0[t]!=-1) slidewall(conveyor0[t],convdir0[t],easy_speed[GetDifficulty()]); } SetPulse(easy_interval[GetDifficulty()]); return; pulse: If(VectorDist(GetThingPos(GetLocalPlayerThing()),GetThingPos(spawner))7) r=7; t=CreateThing(crate0[r],spawner); CaptureThing(t); ParseArg(t,"soundclass=crates.snd"); MoveToFrame(t,pauseframe,easy_speed[GetDifficulty()]); } if(justspawn==1) { r=rand()*8; if(r>7) r=7; t=CreateThing(crate0[r],spawner); CaptureThing(t); MoveToFrame(t,pauseframe,easy_speed[GetDifficulty()]); } return; arrived: If(GetCurFrame(GetSenderRef())==pauseframe) { ParseArg(GetSenderRef(),"soundclass=crates.snd"); MoveToFrame(GetSenderRef(),numframes,easy_speed[GetDifficulty()]); } else { DestroyThing(GetSenderRef()); } return; user0: justspawn=0; SetPulse(easy_interval[GetDifficulty()]); return; user1: justspawn=1; SetPulse(5); return; end
# Crates and stuff, part 3. # queuing crates for elevator # # By Edward symbols message entered message timer message arrived sector startmenow thing spawner0 thing spawner1 thing spawner2 thing spawner3 thing spawner4 thing spawner5 thing spawner6 template crate0 template crate1 template crate2 template crate3 template crate4 template crate5 template crate6 template crate7 thing elev surface conveyor0 nolink surface conveyor1 nolink surface conveyor2 nolink surface conveyor3 nolink surface conveyor4 nolink surface conveyor5 nolink surface conveyor6 nolink surface conveyor7 nolink surface conveyor8 nolink vector convdir0 vector convdir1 vector convdir2 vector convdir3 vector convdir4 vector convdir5 vector convdir6 vector convdir7 vector convdir8 vector hold flex easy_speed flex med_speed flex hard_speed int anim0=-1 local int anim1=-1 local flex i local flex j local int r local thing t0=-1 local thing t1=-1 local thing t2=-1 local thing t3=-1 local thing t4=-1 local thing t5=-1 local thing t6=-1 local int done=0 local sound shoved sound moveit sound andhold end # code entered: if(GetSenderRef()!=startmenow) return; if(done==1) return; done=1; CaptureThing(elev); for(r=2; r<9; r=r+1) if(conveyor0[r]!=-1) slidewall(conveyor0[r],convdir0[r],easy_speed[GetDifficulty()]); for(i=0; i<7; i=i+1) { t0[i]=-1; while(t0[i]==-1) { r=rand()*8; if(r>7) r=7; t0[i]=CreateThing(crate0[r],spawner0[i]); sleep(0.001); } } SkipToFrame(t6,2,100); SkipToFrame(t5,1,100); SetTimerEx(1,0,0,0); return; timer: if(GetSenderID()==0) { MoveToFrame(elev,1,easy_speed[GetDifficulty()]/3); MoveToFrame(t6,3,easy_speed[GetDifficulty()]/3); } else if(GetSenderID()==1) { PlaySoundThing(shoved,t6,1,-1,-1,0x80); PlaySoundThing(moveit,elev,1,-1,-1,0x80); for(j=0.1; j7) r=7; t0=CreateThing(crate0[r],spawner0); sleep(0.001); } for(i=0; i<7; i=i+1) CaptureThing(t0[i]); SetTimerEx(1/(GetDifficulty()+1),0,0,0); } else { if(GetCurFrame(GetSenderRef())>=5) DestroyThing(GetSenderRef()); } return; end
# Um... Yeah... I just create stuff... # # By Edward symbols message startup message pulse message entered message touched message damaged message timer thing Crystal mask=-1 surface hold0=-1 surface hold1=-1 surface hold2=-1 surface hold3=-1 surface hold4=-1 surface hold5=-1 surface hold6=-1 surface hold7=-1 template Energy int t local sound explosion sound zapzers int hum_cog flex hvol=0 local flex hb=0.01 local flex ctc=65536 local int ats=0 local int a local int b local int c local int s local int f local int v local int CR local int CG local int CB local int chr=0 local int charge=0 local int i local int j local int k local int l local int z local flex timing local flex gtime local end # code startup: sleep(1+rand()); a=(rand()*90)-45; b=(rand()*2)-1; charge=rand()*100; chr=0; CR=0; CG=0; CB=0; while(CR==0 && CG==0 && CB==0) { if(rand()>.5) CR=1; else CR=0; if(rand()>.5) CG=1; else CG=0; if(rand()>.5) CB=1; else CB=0; } for(i=0; i<8; i=i+1) { if(hold0[i]!=-1) { for(k=0; k=1) { hvol=1; if(a<0) hb=-((-a)/100); else hb=-(a/100); } hvol=hvol+hb; SendMessageEx(hum_cog,user1,0,hvol,10,charge); if(ats>0) { s=GetThingSector(Crystal); f=GetSectorSurfaceRef(s,rand()*GetNumSectorSurfaces(s)); v=rand()*GetNumSectorVertices(s); t=-1; if(HasLOS(GetPrimaryFocus(GetCurrentCamera()),Crystal)) t=FireProjectile(Crystal,Energy,-1,-1,'0 0 0','0 0 0',0,0,0,0); if(t!=-1) { SetThingVel(t,VectorSub( GetSectorVertexPos(s,v) ,GetThingPos(t))); SetThingLook(t,VectorSub( GetSectorVertexPos(s,v) ,GetThingPos(t))); } t=-1; if(HasLOS(GetPrimaryFocus(GetCurrentCamera()),Crystal)) t=FireProjectile(Crystal,Energy,-1,-1,'0 0 0','0 0 0',0,0,0,0); if(t!=-1) { SetThingVel(t,VectorSub( GetSurfaceCenter(f) ,GetThingPos(t))); SetThingLook(t,VectorSub( GetSurfaceCenter(f) ,GetThingPos(t))); } ats=ats-1; if(a<0) PlaySoundThing(zapzers,Crystal,1,-1,charge*(-a),0x180); else PlaySoundThing(zapzers,Crystal,1,-1,charge*a,0x180); } if(chr==0) { a=a+b; if(a>charge) { b=-1; charge=charge+1; } else if(a<-charge) { b=1; charge=charge+1; } for(i=0; i<8; i=i+1) { if(hold0[i]!=-1) { for(k=0; k100) SetSurfaceVertexLightRGB(hold0[i],k,VectorScale(VectorSet(charge/(charge-100),charge/(charge-100),charge/(charge-100)),1)); else SetSurfaceVertexLightRGB(hold0[i],k,VectorScale(VectorSet(CR,CG,CB),charge/100)); } } } } # if(VectorDist(GetThingPos(GetPrimaryFocus(GetCurrentCamera())),GetThingPos(Crystal))<10) if(HasLOS(GetPrimaryFocus(GetCurrentCamera()),Crystal)) { SetThingLight(Crystal,charge/50,0); } else { SetThingLight(Crystal,0,0); ClearThingFlags(Crystal,0x1); } if(charge>=100) { chr=1; } } else if(chr==1) { for(i=0; i<8; i=i+1) { if(hold0[i]!=-1) { for(k=0; k100) SetSurfaceVertexLightRGB(hold0[i],k,VectorScale(VectorSet(charge/(charge-100),charge/(charge-100),charge/(charge-100)),1)); else SetSurfaceVertexLightRGB(hold0[i],k,VectorScale(VectorSet(CR,CG,CB),charge/100)); } else { if(charge>100) SetSurfaceVertexLightRGB(hold0[i],k,VectorScale(VectorSet(CR,CG,CB),1)); else SetSurfaceVertexLightRGB(hold0[i],k,VectorScale(VectorSet(CR,CG,CB),1-(charge/100))); } } } } if(a>0) a=a-1; else if(a<0) a=a+1; charge=charge-1; if(HasLOS(GetPrimaryFocus(GetCurrentCamera()),Crystal)) { SetThingLight(Crystal,charge/25,0); } else { SetThingLight(Crystal,0,0); ClearThingFlags(Crystal,0x1); } if(charge<=0) { charge=100; chr=2; } } else if(chr==2) { for(i=0; i<8; i=i+1) { if(hold0[i]!=-1) { for(k=0; kctc+0.1) SetSurfaceVertexLightRGB(hold0[i],k,VectorScale(VectorSet(CR,CG,CB),charge/100)); } } } if(a>0) a=a-1; else if(a<0) a=a+1; charge=charge-1; if(charge<=0) { charge=0; chr=0; } } gtime=GetFlexGameTime()%1; return; entered: touched: t=-1; t=FireProjectile(Crystal,Energy,-1,-1,'0 0 0','0 0 0',0,0,0,0); if(t!=-1) { SetThingVel(t,VectorSub(GetThingPos(GetSourceRef()),GetThingPos(t))); SetThingLook(t,VectorSub(GetThingPos(GetSourceRef()),GetThingPos(t))); } PlaySoundThing(zapzers,Crystal,1,-1,VectorDist(GetThingPos(GetSourceRef()),GetThingPos(Crystal))*10,0x180); PlaySoundThing(zapzers,GetSourceRef(),1,-1,VectorDist(GetThingPos(GetSourceRef()),GetThingPos(Crystal))*10,0x180); DamageThing(GetSourceRef(),65535,0x7F,Crystal); return; damaged: charge=GetParam(0)*GetParam(1); a=b*(GetParam(0)*GetParam(1)); ats=GetParam(0)*GetParam(1); PlaySoundThing(explosion,Crystal,VectorDist(GetSurfaceCenter(f),GetThingPos(Crystal)),-1,100,0x180); SetTimerEx(timing,1,1,0); return; timer: if(GetSenderID()==1) { KillTimerEx(1); z=GetSectorSurfaceRef(GetThingSector(Crystal),rand()*GetNumSectorSurfaces(GetThingSector(Crystal))); PlaySoundPos(explosion,GetSurfaceCenter(z),GetParam(0),-1,100,0x180); if(GetParam(0)>timing) SetTimerEx(timing,1,GetParam(0)/1.25,0); } return; end
# Damage a thing if touched by thing. # # By Edward symbols message startup message entered message touched message exited message pulse thing damager mask=-1 flex dmgamount=10 int dmgflags=1 flex dmginterval=0.5 thing player local end # code startup: sleep(1); CaptureThing(damager); return; entered: If(GetSenderRef()!=damager) return; player=GetSourceRef(); SetPulse(dmginterval); return; touched: If(GetsenderRef()!=damager) return; DamageThing(GetSourceRef(),dmgamount,dmgflags,damager); return; exited: If(GetSenderRef()!=damager) return; SetPulse(0); return; pulse: DamageThing(player,dmgamount,dmgflags,damager); return; end
# Jedi Knight Cog Script # # DARKJEDI_BOC.COG # # DARK JEDI Script - Boc # # [YB] # # 8/22 [CR] Added ability to turn on force powers from other COG. # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved symbols message startup message newplayer message damaged message killed message user0 message user1 message skill thing darkjedi mask=0xfff material tip_mat=saberpurple0.mat local material side_mat=saberpurple1.mat local template tpl_wall=+ssparks_wall local template tpl_blood=+ssparks_blood local template tpl_saber=+ssparks_saber local int victim local int forcepower local int forcepulse local template destProj=+force_dest_p3 local sound destSound=ForceDestruct01.wav local flex autoAimFOV=10 local flex autoAimMaxDist=5 local template repel=+force_repel local sound s1z=I00bo01z.wav local sound s2z=I00bo02z.wav local sound s3z=I00bo03z.wav local sound s4z=I00bo04z.wav local sound s5z=I00bo05z.wav local sound s6z=I00bo06z.wav local sound s7z=I00bo07z.wav local sound s71=I00bo071.wav local sound s72=I00bo072.wav local sound s73=I00bo073.wav local int snd=-1 local int okay local end # ======================================================================================== code startup: newplayer: jkSetSaberInfo(darkjedi, side_mat, tip_mat, 0.003, 0.001, 0.110, tpl_wall, tpl_blood, tpl_saber); jkSetFlags(darkjedi, 0x15); Return; # ........................................................................................ killed: SetPulse(0); jkSetFlags(darkjedi, 0x8); snd = PlaySoundThing(s1z, darkjedi, 1.0, -1, -1, 0x180); Sleep(GetSoundLen(snd)); Sleep(1); snd = PlaySoundThing(s71, darkjedi, 1.0, -1, -1, 0x180); Sleep(GetSoundLen(snd)); Sleep(0.01); snd = PlaySoundThing(s1z, darkjedi, 0.33, -1, -1, 0x180); Sleep(GetSoundLen(snd)); Sleep(0.01); snd = PlaySoundThing(s2z, darkjedi, 0.66, -1, -1, 0x180); Sleep(GetSoundLen(snd)); Sleep(1); snd = PlaySoundThing(s72, darkjedi, 1.0, -1, -1, 0x180); Sleep(GetSoundLen(snd)); Sleep(1); snd = PlaySoundThing(s73, darkjedi, 1.0, -1, -1, 0x180); Sleep(GetSoundLen(snd)); Sleep(1.5); snd = PlaySoundThing(s7z, darkjedi, 1.0, -1, -1, 0x180); Sleep(GetSoundLen(snd)); Sleep(1); snd = PlaySoundThing(s2z, darkjedi, 0.5, -1, -1, 0x180); Sleep(GetSoundLen(snd)); Sleep(0.01); snd = PlaySoundThing(s4z, darkjedi, 0.5, -1, -1, 0x180); Sleep(GetSoundLen(snd)); Sleep(0.5); snd = PlaySoundThing(s2z, darkjedi, 0.5, -1, -1, 0x180); Sleep(GetSoundLen(snd)); Sleep(0.5); snd = PlaySoundThing(s2z, darkjedi, 0.33, -1, -1, 0x180); Sleep(GetSoundLen(snd)); StopSound(snd, 0); Return; # ........................................................................................ damaged: damage = GetParam(0); damageType = GetParam(1); if (damageType & 1) // IMPACT damage = damage / 2; else if (damageType & 2) // ENERGY damage = damage / 2; else if (damageType & 4) // FIRE damage = damage / 10; else if (damageType & 8) // FORCE damage = damage; else if (damageType & 16) // SABER damage = damage; ReturnEx(damage); Return; # ........................................................................................ user1: // Receives message from 20b_camera.cog or 20_rahnlines.cog okay = 1; return; user0: // Don't start using force powers until message is received if(okay == 0) return; victim = GetParam(0); forcepower = GetParam(1); if (forcepower == 1) { // Print("Force Power 2 : FORCE DESTRUCTION"); PlayMode(darkjedi, 24); Sleep(0.3); // He could die during the sleep if(GetThingHealth(darkjedi) <= 0) Return; AddDynamicTint(victim, 0.3, 0.0, 0.15); FireProjectile(darkjedi, destProj, destSound, -1, '0 0 0', '0 0 0', 1.0, 0, autoAimFOV, autoAimMaxDist); } else if (forcepower == 2) { // Print("Force Power 2 : FORCE REPEL..."); PlayMode(darkjedi, 35); Sleep(0.3); // He could die during the sleep if(GetThingHealth(darkjedi) <= 0) Return; CreateThing(repel, darkjedi); } else if (forcepower == 3) { // Print("Force Power 3"); } Return; # ........................................................................................ skill: bin = GetParam(0); if (bin == 31) // Force Grip { ReturnEx(0.5); // Mostly immune... Return; } else if (bin == 34) // Deadly Sight { ReturnEx(5); Return; } ReturnEx(-1); Return; end
# Jedi Knight Cog Script # # DARKJEDI_JEREC.COG # # DARK JEDI Script - Jerec # # [YB] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved symbols message startup message newplayer message damaged message killed message user0 message user1 message pulse message timer message skill thing darkjedi mask=0xfff material tip_mat=saberred0.mat local material side_mat=saberred1.mat local template tpl_wall=+ssparks_wall local template tpl_blood=+ssparks_blood local template tpl_saber=+ssparks_saber local int victim local int forcepower local int forcepulse local int count local int limit local int dummy local template lightning=+force_lightning local sound lightningSound=ForceLightnin01.wav local template destProj=+force_dest_p4 local sound destSound=ForceDestruct01.wav local flex autoAimFOV=10 local flex autoAimMaxDist=5 local sound pullSound=ForcePull01.WAV local template tpl=BryarPistol local template tpl1=BryarPistol local template tpl2=BryarPistol local template tpl3=STrifle local template tpl4=SingleDetonator local template tpl5=Crossbow local template tpl6=RepeaterGun local template tpl7=RailGun local template tpl8=SingleSeqCharge local template tpl9=ConcRifle local int PulledWeapon local int okay local end # ======================================================================================== code startup: newplayer: jkSetSaberInfo(darkjedi, side_mat, tip_mat, 0.003, 0.001, 0.101, tpl_wall, tpl_blood, tpl_saber); jkSetFlags(darkjedi, 0x5); Return; # ........................................................................................ killed: SetPulse(0); jkSetFlags(darkjedi, 0x8); Return; # ........................................................................................ damaged: damage = GetParam(0); damageType = GetParam(1); if(damageType & 1) // IMPACT damage = damage / 2; else if(damageType & 2) // ENERGY damage = damage / 2; else if(damageType & 4) // FIRE damage = damage / 10; else if(damageType & 8) // FORCE damage = damage; else if(damageType & 16) // SABER damage = damage; ReturnEx(damage); Return; # ........................................................................................ user1: // Receives message from 21b_camera.cog or 21_rahnlines.cog okay = 1; return; user0: // Don't start using force powers until message is received if(okay == 0) return; victim = GetParam(0); forcepower = GetParam(1); if(forcepower == 1) { // Print("Force Power 1 : FORCE LIGHTNING..."); FireProjectile(darkjedi, lightning, lightningSound, 35, '0 0 0', '0 0 0', 1.0, 0, autoAimFOV, autoAimMaxDist); } else if(forcepower == 2) { // Print("Force Power 2 : FORCE DESTRUCTION"); AddDynamicTint(victim, 0.3, 0.0, 0.15); FireProjectile(darkjedi, destProj, destSound, 24, '0 0 0', '0 0 0', 1.0, 0, autoAimFOV, autoAimMaxDist ); } else if(forcepower == 3) { // Print("Force Power 3 : FORCE PULL"); if(!IsInvActivated(victim, 28)) { forcepulse = 4; SetPulse(0.1); } } Return; # ........................................................................................ pulse: if(forcepulse == 4) // FORCE PULL { SetPulse(0); if(GetHealth(victim) > 0) { if((GetCurWeapon(victim) != 1) && (GetCurWeapon(victim) != 10)) { PlayMode(darkjedi, 36); Sleep(0.3); PlaySoundThing(pullSound, victim, 1.0, -1, -1, 0x80); // Create a powerup corresponding to the current weapon PulledWeapon = CreateThingAtPos(tpl[GetCurWeapon(victim)], GetThingSector(victim), GetThingPos(victim), '0 0 0'); // Set the created powerup to no collide for now... SetCollideType(PulledWeapon, 0); // ...and set a timer to make it collide again later SetTimerEx(0.3, 1, PulledWeapon, 0); // Throw the powerup at the DJ ApplyForce(PulledWeapon, VectorScale(VectorNorm(VectorSub(GetThingPos(darkjedi), GetThingPos(victim))), 30)); // Remove the weapon from the player ChangeInv(victim, GetCurWeapon(victim), -1); SelectWeapon(victim, 1); } } } Return; # ........................................................................................ timer: if(GetSenderId() == 1) // Pull { // A pulled weapon must be made takeable again SetCollideType(GetParam(0), 1); // Set gravity to them so they don't float around SetPhysicsFlags(GetParam(0), 1); // Make the powerup last hours SetLifeLeft(GetParam(0), 36000); } Return; # ........................................................................................ skill: bin = GetParam(0); if(bin == 31) // Force Grip { ReturnEx(10); Return; } else if(bin == 34) // Deadly Sight { ReturnEx(5); Return; } ReturnEx(-1); Return; end
# Mad drugged dream before "level2" # # By Edward symbols message user0 message timer thing dreamcam template moremess int ch local flex i local int view=0 local #----------------------------# thing bedcam1 thing bedcam2 thing actor thing player local thing putplay thing hidden sound groan keyframe ky_getup keyframe ky_pov model WeapF int k0=-1 local int k1=-1 local int eh=-1 local material kkfagoat end # code user0: player=GetLocalPlayerThing(); StopThing(player); TeleportThing(player,hidden); sleep(.25); SetCameraFocus(0,dreamcam); SetTimerEx(0.01,0,0,0); SetTimerEx(0.01,128,0,0); SetTimerEx(rand(),1,0,0); SetTimerEx(rand(),2,0,0); SetTimerEx(rand(),3,0,0); SetTimerEx(rand(),4,0,0); SetTimerEx(rand()*.25,5,0,0); SetTimerEx(rand(),6,0,0); SetTimerEx(5,7,0,0); SetCameraFocus(1,player); return; timer: If(GetSenderID()==0) { KillTimerEx(0); CreateThing(moremess,dreamcam); SetTimerEx(0.01,0,0,0); } else if(GetSenderID()==1) { KillTimerEx(1); AISetLookPos(dreamcam,VectorAdd(GetThingPos(dreamcam),VectorSet( (rand()*2)-1,(rand()*2)-1,(rand()*2)-1 ))); SetTimerEx(rand(),1,0,0); SetArmedMode(actor,0); } else if(GetSenderID()==2) { KillTimerEx(2); AISetMovePos(dreamcam,VectorAdd(GetThingPos(dreamcam),VectorSet( (rand()*2)-1,(rand()*2)-1,(rand()*2)-1 ))); SetTimerEx(rand(),2,0,0); } else if(GetSenderID()==3) { KillTimerEx(3); SetFaceGeoMode(GetSectorSurfaceRef(GetThingSector(dreamcam),rand()*GetNumSectorSurfaces(GetThingSector(dreamcam))),rand()*4); SetTimerEx(rand(),3,0,0); } else if(GetSenderID()==4) { KillTimerEx(4); ClearSurfaceFlags(GetSectorSurfaceRef(GetThingSector(dreamcam),rand()*GetNumSectorSurfaces(GetThingSector(dreamcam))),rand()*2097151); SetSurfaceFlags(GetSectorSurfaceRef(GetThingSector(dreamcam),rand()*GetNumSectorSurfaces(GetThingSector(dreamcam))),rand()*2097151); SlideSurface(GetSectorSurfaceRef(GetThingSector(dreamcam),rand()*GetNumSectorSurfaces(GetThingSector(dreamcam))),VectorSet( (rand()*2)-1,(rand()*2)-1,(rand()*2)-1 ),rand()*100); SetTimerEx(rand(),4,0,0); } else if(GetSenderID()==5) { KillTimerEx(5); ch=PlaySoundLocal(rand()*400,rand()*.1, (rand()*2)-1,0 ); ChangeSoundPitch(ch,rand()*4,.25+rand()*2); SetTimerEx(rand()*.1,5,0,0); } else if(GetSenderID()==6) { KillTimerEx(6); SetSurfaceLight(GetSectorSurfaceRef(GetThingSector(dreamcam),rand()*GetNumSectorSurfaces(GetThingSector(dreamcam))),rand(),rand()); SetTimerEx(rand(),6,0,0); } else if(GetSenderID()==7) { for(i=0; i<8; i=i+1) KillTimerEx(i); for(i=0; i<=GetNumSectorSurfaces(GetThingSector(dreamcam)); i=i+1) { ClearSurfaceFlags(GetSectorSurfaceRef(GetThingSector(dreamcam),i),0x1FFFFF); SetSurfaceFlags(GetSectorSurfaceRef(GetThingSector(dreamcam),i),0x4); SetFaceGeoMode(GetSectorSurfaceRef(GetThingSector(dreamcam),i),4); SetSurfaceLight(GetSectorSurfaceRef(GetThingSector(dreamcam),i),0,1); } SetTimerEx(1,8,0,0); } else if(GetSenderID()==8) { // Strip Him Naked! ... Well, not quite. SetInv(player, 121, 1); // fists SetInv(player, 122, 0); // bryar SetInv(player, 123, 0); // strifle SetInv(player, 124, 0); // thermal SetInv(player, 126, 0); // repeater SetInv(player, 127, 0); // raildet SetInv(player, 128, 0); // sequencers SetInv(player, 129, 0); // concrifle SetInv(player, 130, 0); // EWEB SetInv(player, 131, 0); // saber SetInv(player, 132, 0); // blastech SetInv(player, 133, 0); // scope SetInv(player, 134, 0); // flash SetInv(player, 135, 0); // crossbow SetInv(player, 137, 0); // railseek SetInv(player, 138, 0); // sequencers manual SetInv(player, 140, 0); // carbongun SetInv(player, 11, 00); // energy SetInv(player, 12, 00); // power SetInv(player, 15, 0); // railcharges SetInv(player, 90, 0); // carbonpellets SetInv(player, 91, 0); // seekrails SetInv(player, 92, 00); // EWEB_rounds HealThing(player,100); KillTimerEx(8); SetTimerEx(0.01,127,0,0); StopThing(actor); TeleportThing(actor,putplay); k0=PlayKey(bedcam1,ky_pov,1,0x1); k1=PlayKey(actor,ky_getup,1,0x1); jkSetWeaponMesh(actor,WeapF); SetTimerEx(0.01,9,0,0); } else if(GetSenderID()==9) { KillTimerEx(9); if(eh!=-1) FreeColorEffect(eh); eh=NewColorEffect(0,0,0, 0,0,0, 0,0,0, GetParam(0)); if(GetParam(0)<1) SetTimerEx(0.01,9,GetParam(0)+0.025,0); else SetTimerEx(0.01,10,0,0); } else if(GetSenderID()==10) { KillTimerEx(9); KillTimerEx(10); if(eh!=-1) FreeColorEffect(eh); SetTimerEx(.25,254,14,0); PlaySoundThing(groan,actor,1,-1,-1,0x80); StopKey(bedcam1,k0,0.1); k0=-1; k0=PlayKey(bedcam1,ky_pov,1,0x4); StopKey(actor,k1,0.1); k1=-1; k1=PlayKey(actor,ky_getup,1,0x4); SetTimerEx(GetKeyLen(ky_getup)+.5,11,0,0); SetTimerEx(1,127,0,0); } else if(GetSenderID()==11) { KillTimerEx(11); KillTimerEx(127); KillTimerEx(128); SetCameraFocus(0,player); StopThing(actor); StopThing(player); TeleportThing(player,actor); TeleportThing(actor,hidden); StopKey(bedcam1,k0,0); StopKey(actor,k1,0); StopThing(player); ClearActorFlags(player,0x840008); if(view!=GetCurrentCamera()) CycleCamera(); ClearGoalFlags(player,0,3); ClearGoalFlags(player,1,3); SetGoalFlags(player,2,1); AutoSaveGame(); AISetLookPos(player,GetThingPos(player)); StopKey(actor,k1,0); } else if(GetSenderID()==127) { if(view==0) SetCameraFocus(0,bedcam1); else SetCameraFocus(0,bedcam2); SetTimerEx(0.01,127,0,0); } else if(GetSenderID()==128) { If(GetCurrentCamera()==1) { CycleCamera(); view=view+1; if(view>1) view=0; printint(view); } SetTimerEx(0.01,128,0,0); } else if(GetSenderID()==254) { SetMaterialCel(kkfagoat,GetParam(0)); } else if(GetSenderID()==256) { SetMaterialCel(kkfagoat,0); } return; end
# Pulsating light from the core of that there super weapon type device... # # You heard me! # # By Edward symbols message startup message pulse sector shaft nolink int startsurf int i local surface s local surface stsf local flex a=0.005 local flex l=0 local end # code startup: SetPulse(0.001); return; pulse: stsf=GetSectorSurfaceRef(shaft,startsurf); SetSurfaceLight(stsf,l,0); if(l>1) { l=1; a=-0.005; } else if(l<0) { l=0; a=0; } l=l+a; for(i=0; i
# Pulsating light from the core of that there super weapon type device... # # You heard me! # # By Edward symbols message startup message pulse sector shaft nolink int startsurf surface picksurf nolink int i local surface s local end # code startup: SetPulse(0.001); return; pulse: s=GetSectorSurfaceRef(shaft,startsurf); SetSurfaceLight(s,GetSurfaceLight(picksurf),0); for(i=startsurf-1; i>=0; i=i-1) { s=GetSectorSurfaceRef(shaft,i); SetSurfaceLight(s,GetSurfaceLight(s+1),0); } return; end
# Single cam? Multi cam? See cam! um.,.. # # By Edward symbols message startup message activated message playeraction message pulse message timer message killed message removed surface ViewSwitch=-1 linkid=50 thing ViewSwitch2=-1 linkid=50 surface ScreenTrigger=-1 linkid=50 thing disabledCam thing camera00=-1 linkid=100 thing camera01=-1 linkid=101 thing camera02=-1 linkid=102 thing camera03=-1 linkid=103 thing camera04=-1 linkid=104 thing camera05=-1 linkid=105 thing camera06=-1 linkid=106 thing camera07=-1 linkid=107 thing camera08=-1 linkid=108 thing camera09=-1 linkid=109 thing camera10=-1 linkid=110 thing camera11=-1 linkid=111 thing camera12=-1 linkid=112 thing camera13=-1 linkid=113 thing camera14=-1 linkid=114 thing camera15=-1 linkid=115 thing camera16=-1 linkid=116 thing camera17=-1 linkid=117 thing camera18=-1 linkid=118 thing camera19=-1 linkid=119 thing camera20=-1 linkid=120 thing camera21=-1 linkid=121 thing camera22=-1 linkid=122 thing camera23=-1 linkid=123 thing camera24=-1 linkid=124 thing camera25=-1 linkid=125 thing camera26=-1 linkid=126 thing camera27=-1 linkid=127 thing camera28=-1 linkid=128 thing camera29=-1 linkid=129 thing camera30=-1 linkid=130 thing camera31=-1 linkid=131 int numcameras=32 flex minChangeRate=0.5 int player local int active=0 local int activeCam=0 local int old_camera local int allowChangeCam=1 local int startHealth=0 local vector startPosition local int dummy local int i local sound SwitchOffSound=deactivate02.wav sound camChangeSnd=beep2.wav sound badCamSnd end # code startup: sleep(0.25); player = GetLocalPlayerThing(); SetWallCel(ViewSwitch, 0); if(ViewSwitch2!=-1) CaptureThing(ViewSwictch2); for(i=0; i<32; i=i+1) { if(camera00[i]!=-1) CaptureThing(camera00[i]); } return; activated: if(GetSenderID()!=50) return; if(active) Return; active = 1; SetActorFlags(player, 0x80800000); StopThing(player); SetActionCog(GetSelfCog(), 0x7FFFFFFF); startHealth = GetThingHealth(player); startPosition = GetThingPos(player); SetPulse(0.1); SetWallCel(ViewSwitch, 1); // dummy = PlaySoundLocal(SwitchOnSound, 1.0, 0.0, 0); old_camera = GetCurrentCamera(); call switch_cam; return; playeraction: if (GetParam(0) == 0.0) // Jump { if (GetParam(2) != 0.0) call prev_cam; ReturnEx(0.0); } else if (GetParam(0) == 1.0) // Crouch { if (GetParam(2) != 0.0) call next_cam; ReturnEx(0.0); } else if (GetParam(0) == 2.0) // Activated { call stop_cam; ReturnEx(0.0); } else if (GetParam(0) == 3.0) // Fire { // Allow the player to fire... call stop_cam; ReturnEx(1.0); } else if (GetParam(0) == 4.0) // Strafe { if(GetParam(2) > 0) call next_cam; else call prev_cam; ReturnEx(0.0); } else if (GetParam(0) == 5.0) // Turn { if(GetParam(2) < 0) call next_cam; else call prev_cam; ReturnEx(0.0); } else if (GetParam(0) == 14.0) // Other Actions { if (GetParam(2) == 0.0) // Cycle Camera { call stop_cam; } ReturnEx(1.0); } else { ReturnEx(0.0); } Return; pulse: if(GetCurrentCamera()>0) CycleCamera(); // check that the player didn't die if(GetThingHealth(player) < 1) { call stop_cam; Return; } // If he took damage to health stop the camera if(GetThingHealth(player) < startHealth) { call stop_cam; Return; } // If he changed position (blown by explosion, pushed, ...) stop the camera if(!VectorEqual(startPosition, GetThingPos(player))) { call stop_cam; Return; } Return; timer: allowChangeCam = 1; Return; next_cam: if(!allowChangeCam) Return; activeCam = activeCam + 1; if(activeCam >= numCameras) activeCam = 0; call switch_cam; Return; prev_cam: if(!allowChangeCam) Return; activeCam = activeCam - 1; if(activeCam < 0) activeCam = numCameras - 1; call switch_cam; Return; switch_cam: jkStringClear(); jkStringConcatUNIString(365); jkStringConcatFormattedInt(activeCam, "%d "); jkStringOutput(-1, -1); dummy = PlaySoundLocal(camChangeSnd, 1.0, 0.0, 0); if(camera00[activeCam]==-1) { SetCameraFocus(0, disabledCam); dummy = PlaySoundLocal(badCamSnd, 1.0, 0.0, 0); } else SetCameraFocus(0, camera00[activeCam]); allowChangeCam = 0; SetTimerEx(minChangeRate, 1, 0, 0); Return; stop_cam: SetPulse(0); if(active) { SetCameraFocus(0, player); if(GetCurrentCamera()!=old_camera) CycleCamera(); } active = 0; SetWallCel(ViewSwitch,0); dummy = PlaySoundLocal(SwitchOffSound, 1.0, 0.0, 0); // Turn off control capture. SetActionCog(-1, 0); ClearActorFlags(player, 0x80800000); Return; killed: removed: if(GetSenderID()>99 && GetSenderID()<132) camera00[GetSenderID()-100]=-1; return; end
# Elevator Ride Arrow Handles # # By Edward symbols message user0 message user1 message pulse template ArrowBlackUP template ArrowBlackRIGHT template ArrowBlackDOWN template ArrowBlackLEFT template ArrowRedUP template ArrowRedRIGHT template ArrowRedDOWN template ArrowRedLEFT template ArrowYellowUP template ArrowYellowRIGHT template ArrowYellowDOWN template ArrowYellowLEFT template ArrowGreenUP template ArrowGreenRIGHT template ArrowGreenDOWN template ArrowGreenLEFT template ArrowBlueUP template ArrowBlueRIGHT template ArrowBlueDOWN template ArrowBlueLEFT thing arrow0=-1 local thing arrow1=-1 local thing arrow2=-1 local thing arrow3=-1 local thing arrow4=-1 local thing arrow5=-1 local thing arrow6=-1 local thing arrow7=-1 local thing arrow8=-1 local thing arrow9=-1 local thing arrow10=-1 local thing arrow11=-1 local thing arrow12=-1 local thing arrow13=-1 local thing arrow14=-1 local thing arrow15=-1 local thing arrow16=-1 local thing arrow17=-1 local thing arrow18=-1 local thing arrow19=-1 local int trans=0 local int CE local int i local end # code user0: SetPulse(0); for(i=0; i<20; i=i+1) { if(arrow0[i]!=-1) DestroyThing(arrow0[i]); arrow0[i]=-1; } return; user1: trans=GetParam(0); CE=GetParam(1); SetPulse(0.001); return; pulse: for(i=0; i<20; i=i+1) { if(arrow0[i]!=-1) DestroyThing(arrow0[i]); arrow0[i]=-1; } if(trans==1) { arrow0=CreateThingAtPos(ArrowGreenUP,GetThingSector(CE),VectorAdd(GetThingPos(CE),'0.025 0.15 0.05'),'0 0 0'); arrow1=CreateThingAtPos(ArrowRedUP,GetThingSector(CE),VectorAdd(GetThingPos(CE),'-0.025 0.15 0.05'),'0 0 0'); arrow2=CreateThingAtPos(ArrowYellowDOWN,GetThingSector(CE),VectorAdd(GetThingPos(CE),'-0.05 0.15 -0.05'),'0 0 0'); arrow3=CreateThingAtPos(ArrowGreenDOWN,GetThingSector(CE),VectorAdd(GetThingPos(CE),'0.0 0.15 -0.05'),'0 0 0'); arrow4=CreateThingAtPos(ArrowBlackDOWN,GetThingSector(CE),VectorAdd(GetThingPos(CE),'0.05 0.15 -0.05'),'0 0 0'); // Back arrow5=CreateThingAtPos(ArrowBlueRight,GetThingSector(CE),VectorAdd(GetThingPos(CE),'0.1 0.15 0.0'),'0 0 0'); } else if(trans==2) { arrow0=CreateThingAtPos(ArrowBlueUP,GetThingSector(CE),VectorAdd(GetThingPos(CE),'0.0 0.15 0.05'),'0 0 0'); arrow1=CreateThingAtPos(ArrowRedLEFT,GetThingSector(CE),VectorAdd(GetThingPos(CE),'-0.05 0.15 0.00'),'0 0 0'); arrow2=CreateThingAtPos(ArrowGreenLEFT,GetThingSector(CE),VectorAdd(GetThingPos(CE),'-0.05 0.15 0.05'),'0 0 0'); arrow3=CreateThingAtPos(ArrowYellowDOWN,GetThingSector(CE),VectorAdd(GetThingPos(CE),'-0.05 0.15 -0.05'),'0 0 0'); arrow4=CreateThingAtPos(ArrowGreenDOWN,GetThingSector(CE),VectorAdd(GetThingPos(CE),'0.0 0.15 -0.05'),'0 0 0'); arrow5=CreateThingAtPos(ArrowBlackDOWN,GetThingSector(CE),VectorAdd(GetThingPos(CE),'0.05 0.15 -0.05'),'0 0 0'); } else if(trans==3) { arrow0=CreateThingAtPos(ArrowBlueUP,GetThingSector(CE),VectorAdd(GetThingPos(CE),'0.0 0.15 0.05'),'0 0 0'); arrow1=CreateThingAtPos(ArrowYellowDOWN,GetThingSector(CE),VectorAdd(GetThingPos(CE),'0.0 0.15 -0.05'),'0 0 0'); // FWR arrow2=CreateThingAtPos(ArrowRedLEFT,GetThingSector(CE),VectorAdd(GetThingPos(CE),'-0.05 0.15 0.0'),'0 0 0'); arrow3=CreateThingAtPos(ArrowBlueLEFT,GetThingSector(CE),VectorAdd(GetThingPos(CE),'-0.05 0.15 0.05'),'0 0 0'); // BACK arrow4=CreateThingAtPos(ArrowBlackRIGHT,GetThingSector(CE),VectorAdd(GetThingPos(CE),'0.05 0.15 0.0'),'0 0 0'); arrow5=CreateThingAtPos(ArrowBlueRIGHT,GetThingSector(CE),VectorAdd(GetThingPos(CE),'0.05 0.15 0.05'),'0 0 0'); } else if(trans==4) { arrow0=CreateThingAtPos(ArrowRedUP,GetThingSector(CE),VectorAdd(GetThingPos(CE),'-0.05 0.15 0.05'),'0 0 0'); arrow1=CreateThingAtPos(ArrowYellowUP,GetThingSector(CE),VectorAdd(GetThingPos(CE),'0.0 0.15 0.05'),'0 0 0'); arrow2=CreateThingAtPos(ArrowGreenUP,GetThingSector(CE),VectorAdd(GetThingPos(CE),'0.05 0.15 0.05'),'0 0 0'); // FWR arrow3=CreateThingAtPos(ArrowGreenLEFT,GetThingSector(CE),VectorAdd(GetThingPos(CE),'-0.05 0.15 0.0'),'0 0 0'); arrow4=CreateThingAtPos(ArrowBlackLEFT,GetThingSector(CE),VectorAdd(GetThingPos(CE),'-0.05 0.15 -0.05'),'0 0 0'); // BACK arrow6=CreateThingAtPos(ArrowBlueRIGHT,GetThingSector(CE),VectorAdd(GetThingPos(CE),'0.05 0.15 0.0'),'0 0 0'); } else if(trans==5) { arrow0=CreateThingAtPos(ArrowGreenUP,GetThingSector(CE),VectorAdd(GetThingPos(CE),'0.0 0.15 0.05'),'0 0 0'); arrow1=CreateThingAtPos(ArrowBlackDOWN,GetThingSector(CE),VectorAdd(GetThingPos(CE),'0.0 0.15 -0.05'),'0 0 0'); // FWR arrow2=CreateThingAtPos(ArrowYellowLEFT,GetThingSector(CE),VectorAdd(GetThingPos(CE),'-0.05 0.15 0.05'),'0 0 0'); arrow3=CreateThingAtPos(ArrowBlueLEFT,GetThingSector(CE),VectorAdd(GetThingPos(CE),'-0.05 0.15 0.0'),'0 0 0'); arrow4=CreateThingAtPos(ArrowRedLEFT,GetThingSector(CE),VectorAdd(GetThingPos(CE),'-0.05 0.15 -0.05'),'0 0 0'); // BACK arrow5=CreateThingAtPos(ArrowBlackRIGHT,GetThingSector(CE),VectorAdd(GetThingPos(CE),'0.05 0.15 0.0'),'0 0 0'); } else if(trans==6) { arrow0=CreateThingAtPos(ArrowGreenUP,GetThingSector(CE),VectorAdd(GetThingPos(CE),'0.0 0.15 0.05'),'0 0 0'); arrow1=CreateThingAtPos(ArrowBlueDOWN,GetThingSector(CE),VectorAdd(GetThingPos(CE),'0.0 0.15 -0.05'),'0 0 0'); arrow2=CreateThingAtPos(ArrowBlackDOWN,GetThingSector(CE),VectorAdd(GetThingPos(CE),'-0.05 0.15 -0.05'),'0 0 0'); // BACK arrow3=CreateThingAtPos(ArrowRedRIGHT,GetThingSector(CE),VectorAdd(GetThingPos(CE),'0.05 0.15 0.05'),'0 0 0'); arrow4=CreateThingAtPos(ArrowYellowRIGHT,GetThingSector(CE),VectorAdd(GetThingPos(CE),'0.05 0.15 0.0'),'0 0 0'); } else if(trans==7) { arrow0=CreateThingAtPos(ArrowGreenUP,GetThingSector(CE),VectorAdd(GetThingPos(CE),'0.05 0.15 0.05'),'0 0 0'); arrow1=CreateThingAtPos(ArrowBlueUP,GetThingSector(CE),VectorAdd(GetThingPos(CE),'-0.05 0.15 0.05'),'0 0 0'); arrow2=CreateThingAtPos(ArrowRedDOWN,GetThingSector(CE),VectorAdd(GetThingPos(CE),'0.0 0.15 -0.05'),'0 0 0'); arrow3=CreateThingAtPos(ArrowYellowRIGHT,GetThingSector(CE),VectorAdd(GetThingPos(CE),'0.05 0.15 0.0'),'0 0 0'); arrow4=CreateThingAtPos(ArrowBlueRIGHT,GetThingSector(CE),VectorAdd(GetThingPos(CE),'0.05 0.15 -0.05'),'0 0 0'); arrow5=CreateThingAtPos(ArrowBlackRIGHT,GetThingSector(CE),VectorAdd(GetThingPos(CE),'0.1 0.15 0.0'),'0 0 0'); } return; end
# Extra elevators going everywhere. # # By Edward symbols message user0 message user1 message pulse message arrived thing starta0=-1 thing starta1=-1 thing starta2=-1 thing starta3=-1 thing starta4=-1 thing starta5=-1 thing starta6=-1 thing starta7=-1 thing starta8=-1 thing starta9=-1 thing starta10=-1 thing starta11=-1 thing startb0=-1 thing startb1=-1 thing startb2=-1 thing startb3=-1 thing startb4=-1 thing startb5=-1 thing startb6=-1 thing startb7=-1 thing startb8=-1 thing startb9=-1 thing startb10=-1 thing startb11=-1 int finalframe0=1 int finalframe1=1 int finalframe2=1 int finalframe3=1 int finalframe4=1 int finalframe5=1 int finalframe6=1 int finalframe7=1 int finalframe8=1 int finalframe9=1 int finalframe10=1 int finalframe11=1 int busy0=0 local int busy1=0 local int busy2=0 local int busy3=0 local int busy4=0 local int busy5=0 local int busy6=0 local int busy7=0 local int busy8=0 local int busy9=0 local int busy10=0 local int busy11=0 local template object0 template object1 template object2 template object3 template object4 template object5 template object6 template object7 template object8 template object9 template objectA template objectB template objectC template objectD template objectE template objectF int t local int r local end # code user0: SetPulse(0); return; user1: SetPulse(0.1); return; pulse: KillTimerEx(1); r=12; while(r>11) r=rand()*12; r=r-(r%1); if(busy0[r]==0 && starta0[r]!=-1 && startb0[r]!=-1) { t=-1; if(rand()>0.5) t=CreateThing(object0[rand()*15],starta0[r]); else t=CreateThing(object0[rand()*15],startb0[r]); if(t!=-1) { CaptureThing(t); MoveToFrame(t,finalframe0[r],20); SetThingUserData(t,r); busy0[r]=1; } } return; arrived: busy0[GetThingUserData(GetSenderRef())]=0; DestroyThing(GetSenderRef()); return; end
# Escaping the planet with a Tie. # # By Edward symbols message entered message activated message playeraction message pulse message timer message arrived sector hanger sector ctrlroom thing tie linkid=60 template tieliftoff_1115 thing ntie1115=-1 local template tieliftoff_1111 thing ntie1111=-1 local thing door1 linkid=101 thing door2 linkid=102 surface switch linkid=50 thing switch2 linkid=50 int view=0 local int said=0 local int opened=0 local int ch1 local int ch2 local sound act sound doorstart sound doormove sound doorstop sound tiefly sound KY_SavedShip sound KY_OpenDoor sound KY_NotOpen #----------follow res-----------------# thing planetcam nolink thing planetship nolink thing rescarry linkid=110 thing rescargo linkid=111 keyframe resship0 keyframe resship1 model res1 model res2 model tiefollow thing shipcam nolink sound KY_WhereWeap sound KY_FollowRes int sk=-1 local int animID=-1 local thing intiecam0 nolink thing intiecam1 nolink thing sittingky nolink keyframe ky_sitting=mjsit.key sound KY_ShouldBeThere sound KY_OhThere thing weapmockup nolink thing shootstars nolink template star thing s local #-----------Entering Weap-------------# thing tielander=-1 nolink thing tiefocus nolink template tielander_m10 thing tiel_m10=-1 local template tielander_ms1 thing tiel_ms1=-1 local template tielander_static thing tiel_static=-1 local thing weapcam0 nolink thing weapcam1 nolink thing weapcam2 nolink thing baycam nolink sector landhere thing baydoor0 nolink thing baydoor1 nolink vector baypark sound tieshout sound tiecrash int tiech=-1 local sound KY_MissBig #-------------------------------------# material kkfagoat thing tiecam0 nolink thing tiecam1 nolink thing player local thing hidden nolink int i local int skipped=0 local flex timing local flex gtime local end # code entered: CaptureThing(switch2); If(GetSenderRef()==hanger) { If(said==1) return; said=1; SetGoalFlags(player,3,1); CaptureThing(tie); PlayKey(sittingky,ky_sitting,1,0x0); player=GetLocalPlayerThing(); SetTimerEx(0.1,255,0,0); SetTimerEx(GetSoundLen(KY_Savedship)+GetSoundLen(KY_OpenDoor),256,0,0); PlaySoundLocal(KY_SavedShip,1,0,0); jkPrintUniString(-3,40000); sleep(GetSoundLen(KY_SavedShip)); PlaySoundLocal(KY_OpenDoor,1,0,0); jkPrintUniString(-3,40001); } else if(GetSenderRef()==ctrlroom) { SetGoalFlags(player,4,1); } return; activated: If(GetSenderID()==50) { If(opened!=0) return; SetWallCel(switch,1); PlaySoundPos(act,GetSurfaceCenter(switch),1,-1,-1,0); timing=GetFlexGameTime(); sleep(0.01); timing=GetFlexGameTime()-timing; opened=1; ch1=PlaySoundThing(doorstart,door1,1,-1,100,0x80); ChangeSoundPitch(ch1,.25,timing*2); ch2=PlaySoundThing(doorstart,door2,1,-1,100,0x80); ChangeSoundPitch(ch2,.25,timing*2); SetGoalFlags(player,3,2); SetGoalFlags(player,4,2); SetTimerEx(1,5,0,0); } else if(GetSenderID()==60) { if(opened==0) { SetTimerEx(0.1,255,0,0); PlaySoundLocal(KY_OpenDoor,1,0,0); jkPrintUniString(-3,40001); SetTimerEx(GetSoundLen(KY_OpenDoor),256,0,0); } else if(opened==1) { SetTimerEx(0.1,255,0,0); PlaySoundLocal(KY_NotOpen,1,0,0); jkPrintUniString(-3,40002); SetTimerEx(GetSoundLen(KY_NotOpen),256,0,0); } else { ntie1115=-1; while(ntie1115==-1) { ntie1115=FireProjectile(tie,tieliftoff_1115,-1,-1,'0 0 0','0 0 0',0,0,0,0); sleep(0.001); } SetThingFlags(tie,0x10); timing=GetFlexGameTime()%1; gtime=GetFlexGameTime()%1; SetPulse(0.001); SetActionCog(GetSelfCog(),0x7FFFFFFF); SetActorFlags(player,0x840000); TeleportThing(player,hidden); PlaySoundThing(tiefly,tie,1,-1,500,0x80); ClearGoalFlags(player,2,3); ClearGoalFlags(player,3,3); ClearGoalFlags(player,4,3); SetTimerEx(4,9,0,0); } } return; playeraction: If(GetParam(0)==2 || GetParam(0)==3) { if((opened<2) || (opened>13)) return; if(skipped==1) return; for(i=0; i<256; i=i+1) KillTimerEx(i); SetTimerEx(0.1,24,0,0); StopAnim(animID); print(">>>>>>>> Spin on! >>>>>>>>"); skipped=1; ReturnEx(0); } return; pulse: if(gtime2) view=0; printint(view); } if(opened==2 || opened==3) { If(view==0) SetCameraFocus(0,tiecam0); else SetCameraFocus(0,tiecam1); } else if(opened==4) { SetCameraFocus(0,planetcam); } else if(opened==5 || opened==6 || opened==7 || opened==8) { SetCameraFocus(0,shipcam); s=FireProjectile(shootstars,star,-1,-1,VectorSet( (rand()*2)-1,0,(rand()*2)-1 ),'0 0 0',0,0,0,0); # ParseArg(s,"airdrag=0 surfdrag=0"); SetLifeLeft(s,2); SetThingVel(s,VectorScale( GetThingLVec(shootstars),5 )); } else if(opened==9) { If(view==0) SetCameraFocus(0,intiecam0); else SetCameraFocus(0,intiecam1); } else if(opened==10 || opened==11) { If(view==0) SetCameraFocus(0,weapcam0); else if(view==1) SetCameraFocus(0,weapcam1); else SetCameraFocus(0,weapcam2); } else if(opened==12 || opened==13) { If(view==0) SetCameraFocus(0,baycam); else if(view==1) SetCameraFocus(0,weapcam1); else SetCameraFocus(0,weapcam2); } if(opened<4) SetThingLook(tiecam1,VectorSub( GetThingPos(tie),GetThingPos(tiecam1) )); If(VectorDist(GetThingPos(tie),GetThingPos(tiecam1))>.75) { ApplyForce(tiecam1,VectorSub( GetThingPos(tie),GetThingPos(tiecam1) )); SetCollideType(tiecam1,1); } else { SetCollideType(tiecam1,0); } if(tielander!=-1) { If(VectorDist(GetThingPos(tielander),GetThingPos(weapcam2))>.75) { SetThingLook(weapcam2,VectorSub( GetThingPos(tielander),GetThingPos(weapcam2) )); ApplyForce(weapcam2,VectorSub( GetThingPos(tielander),GetThingPos(weapcam2) )); SetCollideType(weapcam2,1); } else { SetCollideType(weapcam2,0); } SetThingLook(weapcam1,VectorSub( GetThingPos(tielander),GetThingPos(weapcam1) )); } else if(tiel_m10!=-1) { If(VectorDist(GetThingPos(tiel_m10),GetThingPos(weapcam2))>.75) { SetThingLook(weapcam2,VectorSub( GetThingPos(tiel_m10),GetThingPos(weapcam2) )); ApplyForce(weapcam2,VectorSub( GetThingPos(tiel_m10),GetThingPos(weapcam2) )); SetCollideType(weapcam2,1); } else { SetCollideType(weapcam2,0); } SetThingLook(weapcam1,VectorSub( GetThingPos(tiel_m10),GetThingPos(weapcam1) )); } else if(tiel_ms1!=-1) { If(VectorDist(GetThingPos(tiel_ms1),GetThingPos(weapcam2))>.75) { SetThingLook(weapcam2,VectorSub( GetThingPos(tiel_ms1),GetThingPos(weapcam2) )); ApplyForce(weapcam2,VectorSub( GetThingPos(tiel_ms1),GetThingPos(weapcam2) )); SetCollideType(weapcam2,1); } else { SetCollideType(weapcam2,0); } SetThingLook(weapcam1,VectorSub( GetThingPos(tiel_ms1),GetThingPos(weapcam1) )); } If(opened==2) { # ParseArg(tie,"move=physics staticdrag=1 airdrag=1 surfdrag=1 mass=5"); # ParseArg(tiecam1,"airdrag=5"); if(ntie1115!=-1) { SetPhysicsFlags(ntie1115,0x4222E); ApplyForce(ntie1115,VectorSub( '-26.5 -10 1.7',GetThingPos(tie) )); TeleportThing(tie,ntie1115); } } else if(opened==3) { # ParseArg(tie,"move=physics staticdrag=1 airdrag=1 surfdrag=1 mass=1"); # ParseArg(tiecam1,"airdrag=2"); if(ntie1111!=-1) { ApplyForce(ntie1111,GetThingLVec(ntie1111)); TeleportThing(tie,ntie1111); } } else if(opened==10) { # ParseArg(tielander,"move=physics staticdrag=1 airdrag=1 surfdrag=1 mass=15"); SetPhysicsFlags(tielander,0x4222E); SetThingLook(tielander,VectorSub( GetThingPos(tiefocus),GetThingPos(tielander) )); ApplyForce(tielander,VectorScale(VectorSub( GetThingPos(tiefocus),GetThingPos(tielander) ),0.1)); } else if(opened==11) { # ParseArg(tielander,"move=physics staticdrag=1 airdrag=1 surfdrag=1 mass=10"); if(tiel_m10!=-1) { SetPhysicsFlags(tiel_m10,0x4222E); SetThingLook(tiel_m10,VectorSub( GetThingPos(tiefocus),GetThingPos(tiel_m10) )); ApplyForce(tiel_m10,VectorScale(VectorSub( GetThingPos(tiefocus),GetThingPos(tiel_m10) ),timing*2.5)); } ApplyForce(tiefocus,VectorSub( GetSectorCenter(landhere),GetThingPos(tiefocus) )); } else if(opened==12) { # ParseArg(tielander,"move=physics staticdrag=1 airdrag=1 surfdrag=10 mass=1"); if(tiel_ms1!=-1) { SetPhysicsFlags(tiel_ms1,0x4227E); SetThingLook(tiel_ms1,VectorSub( baypark,GetThingPos(tiel_ms1) )); SetThingVel(tiel_ms1,VectorSub( baypark,GetThingPos(tiel_ms1) )); } } SetActorFlags(GetLocalPlayerThing(),0x2); gtime=GetFlexGameTime()%1; return; timer: if(GetSenderID()==5) { KillTimerEx(5); ch1=PlaySoundThing(doorstart,door1,1,-1,100,0x80); ChangeSoundPitch(ch1,.25,timing*2); ch2=PlaySoundThing(doorstart,door2,1,-1,100,0x80); ChangeSoundPitch(ch2,.25,timing*2); SetTimerEx(1,6,0,0); } else if(GetSenderID()==6) { KillTimerEx(6); ch1=PlaySoundThing(doorstop,door1,1,-1,100,0x80); ChangeSoundPitch(ch1,.25,timing*2); ch2=PlaySoundThing(doorstop,door2,1,-1,100,0x80); ChangeSoundPitch(ch2,.25,timing*2); ch1=PlaySoundThing(doormove,door1,0,-1,100,0x81); ch2=PlaySoundThing(doormove,door2,0,-1,100,0x81); ChangeSoundPitch(ch1,0.1/5,timing*2); ChangeSoundPitch(ch2,0.1/5,timing*2); SetTimerEx(0.25,7,0.1,0); } else if(GetSenderID()==7) { KillTimerEx(7); ChangeSoundVol(ch1,1,1); ChangeSoundVol(ch2,1,1); ChangeSoundPitch(ch1,GetParam(0)/5,1); ChangeSoundPitch(ch2,GetParam(0)/5,1); MoveToFrame(door1,1,GetParam(0)); MoveToFrame(door2,1,GetParam(0)); if(GetParam(0)>.8) opened=2; SetTimerEx(0.25,7,GetParam(0)+0.1,0); } else if(GetSenderID()==8) { KillTimerEx(7); KillTimerEx(8); ChangeSoundPitch(ch1,0.1,1); ChangeSoundPitch(ch2,0.1,1); StopSound(ch1,1); StopSound(ch2,1); ch1=PlaySoundThing(doorstart,door1,1,-1,100,0x80); ChangeSoundPitch(ch1,.25,timing*2); ch2=PlaySoundThing(doorstart,door2,1,-1,100,0x80); ChangeSoundPitch(ch2,.25,timing*2); ch1=PlaySoundThing(doorstop,door1,1,-1,100,0x80); ChangeSoundPitch(ch1,.25,timing*2); ch2=PlaySoundThing(doorstop,door2,1,-1,100,0x80); ChangeSoundPitch(ch2,.25,timing*2); } else if(GetSenderID()==9) { KillTimerEx(7); SetTimerEx(1,8,0,0); KillTimerEx(9); ntie1111=-1; while(ntie1111==-1) { ntie1111=FireProjectile(ntie1115,tieliftoff_1111,-1,-1,'0 0 0','0 0 0',0,0,0,0); sleep(0.001); } SetThingVel(ntie1111,GetThingVel(ntie1115)); DestroyThing(ntie1115); opened=3; SetTimerEx(3,10,0,0); } else if(GetSenderID()==10) { KillTimerEx(10); opened=4; PlaySong(10,10,0); SetMusicVol(1); SetTimerEx(1,11,0,0); } else if(GetSenderID()==11) { MoveToFrame(planetship,1,25); PlaySoundLocal(KY_WhereWeap,1,0,0); jkPrintUniString(-3,40003); SetTimerEx(GetSoundLen(KY_WhereWeap)+1,12,0,0); } else if(GetSenderID()==12) { PlaySoundLocal(KY_FollowRes,1,0,0); jkPrintUniString(-3,40004); SetTimerEx(GetSoundLen(KY_WhereWeap)-1,13,0,0); } else if(GetSenderID()==13) { // ImpShuttle Go opened=5; # ParseArg(rescargo,"move=none"); AttachThingToThing(rescargo,rescarry); ClearThingFlags(rescargo,0x10); MoveToFrame(rescarry,1,10); sk=PlayKey(rescargo,resship0,1,0x0); animID=SlideHorizonSky(10,0); } else if(GetSenderID()==14) { opened=9; StopAnim(animID); SetTimerEx(1,15,0,0); } else if(GetSenderID()==15) { PlaySoundLocal(KY_ShouldBeThere,1,0,0); SetTimerEx(0.1,255,0,0); SetTimerEx(GetSoundLen(KY_ShouldBeThere),256,0,0); jkPrintUniString(-3,40005); SetTimerEx(GetSoundLen(KY_ShouldBeThere),16,0,0); } else if(GetSenderID()==16) { MoveToFrame(weapmockup,1,1); SetTimerEx(2,17,0,0); } else if(GetSenderID()==17) { SetTimerEx(1,255,0,0); SetMaterialCel(kkfagoat,4); SetTimerEx(GetSoundLen(KY_OhThere),256,0,0); PlaySoundLocal(KY_OhThere,1,0,0); jkPrintUniString(-3,40006); SetTimerEx(GetSoundLen(KY_OhThere),18,0,0); } else if(GetSenderID()==18) { for(i=0; i<19; i=i+1) KillTimerEx(i); opened=10; PlaySoundLocal(KY_MissBig,1,0,0); jkPrintUniString(-3,40007); SetTimerEx(4,200,0,0); tiel_m10=-1; SetTimerEx(2,19,0,0); } else if(GetSenderID()==19) { KillTimerEx(19); while(tiel_m10==-1) { tiel_m10=FireProjectile(tielander,tielander_m10,-1,-1,'0 0 0','0 0 0',0,0,0,0); sleep(0.01); } if(tielander!=-1) { SetThingVel(tiel_m10,GetThingVel(tielander)); DestroyThing(tielander); } tielander=-1; opened=11; if(VectorDist( GetThingPos(tiel_m10),GetThingPos(tiefocus) )>.75) SetTimerEx(0.1,19,0,0); else SetTimerEx(0.1,20,0,0); } else if(GetSenderID()==20) { KillTimerEx(20); tiel_ms1=-1; while(tiel_ms1==-1) { tiel_ms1=FireProjectile(tiel_m10,tielander_ms1,-1,-1,'0 0 0','0 0 0',0,0,0,0); sleep(0.01); } SetThingVel(tiel_ms1,GetThingVel(tiel_m10)); DestroyThing(tiel_m10); tiel_m10=-1; opened=12; CycleCamera(); sleep(0.001); CycleCamera(); tiech=PlaySoundThing(tieshout,baycam,1,2,2,0x1); ChangeSoundPitch(tiech,0.1,5); StopSound(tiech,5); SetTimerEx(3,201,0,0); SetTimerEx(5,21,0,0); } else if(GetSenderID()==21) { opened=13; SetPhysicsFlags(tiel_ms1,1); SetTimerEx(0.5,22,0,0); } else if(GetSenderID()==22) { PlaySoundThing(tiecrash,tiel_ms1,1,-1,-1,0x80); SetTimerEx(2,23,0,0); } else if(GetSenderID()==23) { SetPulse(0); opened=14; skipped=1; # ParseArg(tielander,"move=physics staticdrag=1 airdrag=10 surfdrag=10 mass=100"); tiel_static=-1; while(tiel_static==-1) { tiel_static=FireProjectile(tiel_ms1,tielander_static,-1,-1,'0 0 0','0 0 0',0,0,0,0); sleep(0.01); } DestroyThing(tiel_ms1); TeleportThing(player,tiel_static); SetCameraFocus(0,player); CycleCamera(); sleep(0.001); CycleCamera(); SetActionCog(-1,0); ClearActorFlags(player,0x840000); SetGoalFlags(player,5,1); SetGoalFlags(player,6,1); SetGoalFlags(player,8,1); AutoSaveGame(); } else if(GetSenderID()==24) { SetPulse(0); opened=14; # ParseArg(tielander,"move=physics staticdrag=1 airdrag=10 surfdrag=10 mass=100"); s=-1; while(s==-1) { s=CreateThingAtPos(star,GetThingSector(baycam),baypark,'0 0 0'); sleep(0.001); } TeleportThing(tielander,s); DestroyThing(s); TeleportThing(player,tielander); SetCameraFocus(0,player); CycleCamera(); sleep(0.001); CycleCamera(); SetActionCog(-1,0); ClearActorFlags(player,0x840000); skipped=1; if(view!=GetCurrentCamera()) CycleCamera(); SetGoalFlags(player,5,1); SetGoalFlags(player,6,1); SetGoalFlags(player,8,1); AutoSaveGame(); } else if(GetSenderID()==200) { MoveToFrame(baydoor0,1,1); MoveToFrame(baydoor1,1,1); } else if(GetSenderID()==201) { MoveToFrame(baydoor0,0,1); MoveToFrame(baydoor1,0,1); } else If(GetSenderID()==255) { KillTimerEx(255); SetMaterialCel(kkfagoat,rand()*14); SetTimerEx(0.1,255,0,0); } else if(GetSenderID()==256) { KillTimerEx(255); KillTimerEx(256); SetMaterialCel(kkfagoat,0); } return; arrived: If(GetSenderRef()==door1) { SetTimerEx(0.1,8,0,0); } else if(GetSenderRef()==rescarry) { If(opened==5) { // ImpShuttle Done opened=100; if(skipped!=0) return; StopKey(rescargo,sk,0); SetThingFlags(rescargo,0x10); MoveToFrame(rescarry,0,50); SetThingModel(rescargo,res1); sk=PlayKey(rescargo,resship1,1,0x0); } else if(opened==6) { // Light Shuttle Done opened=101; if(skipped!=0) return; StopKey(rescargo,sk,0); SetThingFlags(rescargo,0x10); MoveToFrame(rescarry,0,1000); } else if(opened==7) { // Transport Done opened=102; if(skipped!=0) return; SetThingFlags(rescargo,0x10); MoveToFrame(rescarry,0,1000); } else if(opened==8) { // Tie Done if(skipped!=0) return; SetTimerEx(0.1,14,0,0); } else if(opened==100) { // ImpShuttle to Light Shuttle if(skipped!=0) return; opened=6; AttachThingToThing(rescargo,rescarry); ClearThingFlags(rescargo,0x10); MoveToFrame(rescarry,1,10); } else if(opened==101) { // Light Shuttle to Transport if(skipped!=0) return; opened=7; SetThingModel(rescargo,res2); AttachThingToThing(rescargo,rescarry); ClearThingFlags(rescargo,0x10); MoveToFrame(rescarry,1,10); } else if(opened==102) { // Transport to Tie if(skipped!=0) return; opened=8; SetThingModel(rescargo,tiefollow); AttachThingToThing(rescargo,rescarry); ClearThingFlags(rescargo,0x10); MoveToFrame(rescarry,1,10); } } return; end
# FINALLY WE'RE DONE! NYEHEHEHEHEHEHEHEHEEEE! # # By Edward symbols message user0 message entered message damaged message pulse message timer thing player local thing hidden thing rebel thing rightcam thing crow thing crow2 thing shipcam vector shipcamend surface bottom mask=0x441 thing bottom2 mask=0x441 sector fullroom thing light sector upthrust0 sector upthrust1 sector upthrust2 template blocks thing t local sound lightOn sound Thrust sound breakbottom sound crowengine sound KY_Nice0 sound KY_Nice1 sound KY_Nice2 cog finfin #---------------------------------# int dooropened=0 local int view=0 local int playpart=0 local int ch0 local int eh=-1 local flex i local int tick=0 local int beenin=0 local end # code user0: dooropened=1; CaptureThing(bottom2); return; entered: CaptureThing(bottom2); If(GetSenderRef()==fullroom) { if(beenin==1) return; beenin=1; player=GetLocalPlayerThing(); PlaySoundThing(lightOn,light,1,-1,-1,0x80); ThingLight(light,1,1); SetTimerEx(1,1,0,0); } return; damaged: If(GetSenderRef()==bottom || GetSenderRef()==bottom2) { tick=1; PlaySoundPos(breakbottom,GetSurfaceCenter(bottom),1,-1,-1,0x0); ClearSurfaceFlags(bottom,0x5); SetAdjoinFlags(bottom,0x7); DestroyThing(bottom2); SetFaceGeoMode(bottom,0); DetachThing(player); for(i=0; i<16; i=i+1) { t=-1; t=CreateThingAtPos(blocks,GetSurfaceSector(bottom),VectorAdd( GetSurfaceCenter(bottom),VectorSet( ((rand()*2)-1)/10,((rand()*2)-1)/10,0 ) ),VectorSet(rand()*360,rand()*360,rand()*360)); if(t!=-1) SetThingRotVel(t,vectorset( (rand()*90)-45,(rand()*90)-45,(rand()*90)-45 )); } while(GetThingSector(player)!=upthrust0) sleep(0.01); PlaySoundLocal(Thrust,1,0,0x0); SetSectorThrust(upthrust0,'0 0 1',10); SetSectorThrust(upthrust1,'0 0 1',10); SetSectorThrust(upthrust2,'0 0 1',10); SetTimerEx(1,5,0,0); } return; pulse: if(GetCurrentCamera()==1 && playpart>0) { CycleCamera(); view=view+1; if(view>1) view=0; } If(playpart==0) { SetThingLook(rightcam,VectorSub(GetThingPos(player),GetThingPos(rightcam))); SetCameraFocus(0,rightcam); SetCameraFocus(1,rightcam); SetCurrentCamera(1); ApplyForce(player,'-10 0 0'); } else if(playpart==1) { SetCameraFocus(0,rightcam); } else if(playpart==2) { SetCameraFocus(0,shipcam); If(VectorDist(GetThingPos(shipcam),shipcamend)<5 && VectorDist(GetThingPos(shipcam),shipcamend)>0.01) { if(eh!=-1) FreeColorEffect(eh); eh=NewColorEffect(0,0,0, 0,0,0, 0,0,0, VectorDist(GetThingPos(shipcam),shipcamend)/5); } else if(VectorDist(GetThingPos(shipcam),shipcamend)<0.01) { FreeColorEffect(eh); SetPulse(0); SendMessageEx(finfin,user0,view,0,0,0); } } return; timer: if(GetSenderID()==1) { if(tick==1) return; PlaySoundLocal(KY_Nice0,1,0,0); jkPrintUniString(-3,80025); SetTimerEx(4,2,0,0); } else if(GetSenderID()==2) { if(tick==1) return; PlaySoundLocal(KY_Nice1,1,0,0); jkPrintUniString(-3,80026); SetTimerEx(7,3,0,0); } else if(GetSenderID()==3) { if(tick==1) return; PlaySoundLocal(KY_Nice2,1,0,0); jkPrintUniString(-3,80027); SetGoalFlags(player,14,1); } else if(GetSenderID()==5) { If((GetThingHealth(rebel)<=0) || (GetThingFlags(rebel) & 0x200) || (dooropened==0)) { // Killed the rebel commander or haven't opened the doors? // You're pretty much screwed. :p SetThingFlags(crow,0x10); SetActorFlags(player,0xA00000); SetPulse(0.001); } else { SetActorFlags(player,0x840000); playpart=1; SetPulse(0.001); ClearThingFlags(crow,0x10); MoveToFrame(crow,1,100); ch0=PlaySoundThing(crowengine,crow,1,-1,25,0x81); SetTimerEx(0.5,6,0,0); SetTimerEx(1,7,0,0); SetGoalFlags(player,14,2); } } else if(GetSenderID()==6) { TeleportThing(player,hidden); SelectWeapon(player,1); } else if(GetSenderID()==7) { MoveToFrame(crow,2,100); SetTimerEx(2,8,0,0); } else if(GetSenderID()==8) { StopSound(ch0,1); PlaySong(4,4,0); SetMusicVol(1); SetTimerEx(20,9,0,0); playpart=2; MoveToFrame(crow2,1,50); MoveToFrame(shipcam,2,30); } else if(GetSenderID()==9) { PlaySong(0,0,0); SetMusicVol(0); } return; end
# What, that wasn't the final cog? There's more?? # # By Edward symbols message user0 message pulse message timer thing incam0 desc=closeky thing incam1 desc=closere thing incam2 desc=door thing incam3 desc=full thing inlight thing kyle thing rebel thing door sector killaudio local vector rebwalkto vector rebwalkback model fistv keyframe stance keyframe crumble int kk=-1 local int rk=-1 local surface window nolink sound RE_lines0 sound KY_lines1 sound KY_lines2 sound RE_lines3 sound KY_lines4 sound KY_lines5 sound KY_lines6 sound KY_lines7 sound KY_lines8 sound RE_lines9 sound KY_lines10 sound RE_lines11 #--------------------------------# sound mordi00=PlasticPop\Part00.wav sound mordi01=PlasticPop\Part01.wav sound mordi02=PlasticPop\Part02.wav sound mordi03=PlasticPop\Part03.wav sound mordi04=PlasticPop\Part04.wav sound mordi05=PlasticPop\Part05.wav sound mordi06=PlasticPop\Part06.wav sound mordi07=PlasticPop\Part07.wav sound mordi08=PlasticPop\Part08.wav sound mordi09=PlasticPop\Part09.wav sound mordi10=PlasticPop\Part10.wav sound mordi11=PlasticPop\Part11.wav sound mordi12=PlasticPop\Part12.wav thing janimg vector janpos template theend material te thing t local template thatwas material tw template credits1=+Credits1 template credits2=+Credits2 template credits3=+Credits3 template credits4=+Credits4 template credits5=+Credits5 template credits6=+Credits6 template credits7=+Credits7 thing outercam desc=dread__0_37___1_50 vector ocwayback desc=dread__0_37___1_32 vector ocroundout desc=dread__1_32___1_50 thing slideshow0 desc=weapon__1_50___2_10 thing slideshow1 desc=scene1__2_13___2_32 thing killflare thing slideshow2 desc=shipyard__2_32___2_50 surface focus2 nolink thing slideshow3 desc=trooptrans__2_50___3_10 thing trooptrans thing rider keyframe sitting template snowdust thing slideshow4 desc=towerboss__3_10___3_28 thing slideshow5 desc=canyon__3_28___3_46 thing focus5 thing slideshow6 desc=3_46___4_22 int ElevRideExtras1 int ElevRideExtras2 thing slideshow7 desc=space__4_22___4_31 int CrateSpawnCog thing returningcam desc=dreadcry__4_31___4_49 vector swing0 desc=dreadcry__4_31___ thing leavecam desc=zoomout__5_14l15___5_29 #--------------------------------# material kkfagoat material k3facef int view=0 local int eh=-1 local int playpart=0 local int g local flex i local flex fade=0 local flex timing local flex gtime local end # code user0: for(g=0; g<15; g=g+1) { ClearGoalFlags(player,g,3); } view=GetParam(0); SetActorFlags(GetLocalPlayerThing(),0x840000); kk=PlayKey(kyle,stance,1,0x0); rk=PlayKey(rebel,stance,1,0x0); jkSetWeaponMesh(rebel,fistv); timing=0; gtime=0; SetPulse(0.001); playpart=3; if(eh!=-1) FreeColorEffect(eh); eh=NewColorEffect(0,0,0, 0,0,0, 0,0,0, 0); sleep(1); for(i=0; i<1; i=i+0.05) { if(eh!=-1) FreeColorEffect(eh); eh=NewColorEffect(0,0,0, 0,0,0, 0,0,0, i); sleep(0.001); } if(eh!=-1) FreeColorEffect(eh); ThingLight(inlight,1,3); ThingLight(outercam,.25,3); sleep(5); # for(killaudio=0; killaudio<=GetSectorCount(); killaudio=killaudio+1) # { # SectorSound(killaudio,-1,0); # if(killaudio<256) # SendMessage(killaudio,user7); # } #SetTimerEx(1,15,0,0); return; playpart=2; MoveToFrame(door,1,8); sleep(1); StopKey(rebel,rk,0.25); AISetLookPos(rebel,rebwalkto); SetThingThrust(rebel,'0 1 0'); while(VectorDist( GetThingPos(rebel),rebwalkto )>.1) sleep(0.1); SetThingThrust(rebel,'0 0 0'); StopThing(rebel); playpart=3; MoveToFrame(door,0,8); rk=PlayKey(rebel,stance,1,0x0); sleep(0.5); SetTimerEx(0.1,257,0,0); SetTimerEx(GetSoundLen(RE_lines0),258,0,0); PlaySoundThing(RE_lines0,rebel,1,-1,100,0x80); jkPrintUniString(-3,90000); sleep(GetSoundLen(RE_lines0)+0.25); SetTimerEx(0.1,255,0,0); SetTimerEx(GetSoundLen(KY_lines1)-0.1,256,0,0); PlaySoundThing(KY_lines1,kyle,1,-1,100,0x80); jkPrintUniString(-3,90001); sleep(GetSoundLen(KY_lines1)); SetTimerEx(0.1,255,0,0); SetTimerEx(GetSoundLen(KY_lines2)-0.1,256,0,0); PlaySoundThing(KY_lines2,kyle,1,-1,100,0x80); jkPrintUniString(-3,90002); sleep(GetSoundLen(KY_lines2)+0.1); playpart=1; SetTimerEx(0.1,257,0,0); SetTimerEx(GetSoundLen(RE_lines3),258,0,0); PlaySoundLocal(RE_lines3,1,0,0x0); jkPrintUniString(-3,90003); sleep(GetSoundLen(RE_lines3)+0.1); playpart=0; SetTimerEx(0.1,255,0,0); SetTimerEx(GetSoundLen(KY_lines4)-0.1,256,0,0); PlaySoundLocal(KY_lines4,1,0,0x0); jkPrintUniString(-3,90004); sleep(GetSoundLen(KY_lines4)); SetTimerEx(0.1,255,0,0); SetTimerEx(GetSoundLen(KY_lines5)-0.1,256,0,0); PlaySoundLocal(KY_lines5,1,0,0x0); jkPrintUniString(-3,90005); sleep(GetSoundLen(KY_lines5)); SetTimerEx(0.1,255,0,0); SetTimerEx(GetSoundLen(KY_lines6)-0.1,256,0,0); PlaySoundLocal(KY_lines6,1,0,0x0); jkPrintUniString(-3,90006); sleep(GetSoundLen(KY_lines6)); SetTimerEx(0.1,255,0,0); SetTimerEx(GetSoundLen(KY_lines7)-0.1,256,0,0); PlaySoundLocal(KY_lines7,1,0,0x0); jkPrintUniString(-3,90007); sleep(GetSoundLen(KY_lines7)+2); playpart=1; SetTimerEx(0.1,257,0,0); SetTimerEx(GetSoundLen(RE_lines9),258,0,0); PlaySoundLocal(RE_lines9,1,0,0x0); jkPrintUniString(-3,90009); sleep(GetSoundLen(RE_lines9)+0.1); playpart=3; SetTimerEx(0.1,255,0,0); SetTimerEx(GetSoundLen(KY_lines10)-0.1,256,0,0); PlaySoundThing(KY_lines10,kyle,1,-1,100,0x80); jkPrintUniString(-3,90010); sleep(GetSoundLen(KY_lines10)); SetTimerEx(0.1,257,0,0); SetTimerEx(GetSoundLen(RE_lines11),258,0,0); PlaySoundThing(RE_lines11,rebel,1,-1,100,0x80); jkPrintUniString(-3,90011); sleep(.5); StopKey(rebel,rk,0.25); AISetLookPos(rebel,rebwalkback); AISetMovePos(rebel,rebwalkback); SetThingThrust(rebel,'0 .5 0'); MoveToFrame(door,1,8); SetTimerEx(3,1,0,0); SetTimerEx(1,10,0,0); return; pulse: if(gtime1) view=0; } if(playpart==0) { // close to kyle SetCameraFocus(0,incam0); } else if(playpart==1) { // close to rebel SetCameraFocus(0,incam1); } else if(playpart==2) { // door SetCameraFocus(0,incam2); } else if(playpart==3) { // full SetCameraFocus(0,incam3); } else if(playpart==4) { SetCameraFocus(0,incam3); MoveToFrame(janimg,1,VectorDist(GetThingPos(janimg),janpos)*2.5); } else if(playpart==5) { SetCameraFocus(0,incam3); MoveToFrame(janimg,0,VectorDist(GetThingPos(janimg),janpos)*2.5); } else if(playpart==6) { SetCameraFocus(0,outercam); SetThingLook(outercam,VectorSub(GetThingPos(kyle),GetThingPos(outercam))); ParseArg(outercam,"airdrag=5"); ApplyForce(outercam,VectorScale(VectorNorm(VectorSub(ocwayback,GetThingPos(outercam))),(timing*5))); } else if(playpart==7) { SetCameraFocus(0,outercam); SetThingLook(outercam,VectorSub(GetThingPos(kyle),GetThingPos(outercam))); ApplyForce(outercam,VectorScale(VectorNorm(VectorSub(ocroundout,GetThingPos(outercam))),(timing*5))); } else if(playpart==8) { SetCameraFocus(0,outercam); SetThingLook(outercam,VectorSub(GetThingPos(kyle),GetThingPos(outercam))); ApplyForce(outercam,VectorScale(VectorNorm(VectorSub(ocroundout,GetThingPos(outercam))),(timing*5))); if(fade>0) { if(eh!=-1) FreeColorEffect(eh); eh=NewColorEffect(0,0,0, 0,0,0, 0,0,0, fade); fade=fade-timing; } } else if(playpart==9) { SetCameraFocus(0,slideshow0); if(fade<1) { if(eh!=-1) FreeColorEffect(eh); eh=NewColorEffect(0,0,0, 0,0,0, 0,0,0, fade); fade=fade+timing; } } else if(playpart==10) { SetCameraFocus(0,slideshow0); if(fade>0) { if(eh!=-1) FreeColorEffect(eh); eh=NewColorEffect(0,0,0, 0,0,0, 0,0,0, fade); fade=fade-timing; } } else if(playpart==11) { SetCameraFocus(0,slideshow1); if(fade>300) fade=290; fade=fade+(timing*10); AddDynamicAdd(GetLocalPlayerThing(),fade,fade,fade); } else if(playpart==12) { SetCameraFocus(0,slideshow1); } else if(playpart==13) { SetCameraFocus(0,slideshow1); if(fade>0) { if(eh!=-1) FreeColorEffect(eh); eh=NewColorEffect(0,0,0, 0,0,0, 0,0,0, fade); fade=fade-(timing*2); } } else if(playpart==14) { if(t!=-1) DestroyThing(t); t=-1; t=FireProjectile(slideshow2,credits2,-1,-1,'0 .5 0','0 0 0',0,0,0,0); if(t!=-1) { AttachThingToThing(t,slideshow2); SetLifeLeft(t,0.1); } SetCameraFocus(0,slideshow2); SetThingLook(slideshow2,VectorSub(GetSurfaceCenter(focus2),GetThingPos(slideshow2))); if(fade<1) { if(eh!=-1) FreeColorEffect(eh); eh=NewColorEffect(0,0,0, 0,0,0, 0,0,0, fade); fade=fade+timing; } } else if(playpart==15) { if(t!=-1) DestroyThing(t); t=-1; t=FireProjectile(slideshow2,credits2,-1,-1,'0 .5 0','0 0 0',0,0,0,0); if(t!=-1) { AttachThingToThing(t,slideshow2); SetLifeLeft(t,0.1); } SetCameraFocus(0,slideshow2); SetThingLook(slideshow2,VectorSub(GetSurfaceCenter(focus2),GetThingPos(slideshow2))); if(fade>0) { if(eh!=-1) FreeColorEffect(eh); eh=NewColorEffect(0,0,0, 0,0,0, 0,0,0, fade); fade=fade-(timing*2); } } else if(playpart==16) { if(t!=-1) DestroyThing(t); t=-1; t=FireProjectile(slideshow3,credits3,-1,-1,'-0.2 .5 0','0 0 0',0,0,0,0); if(t!=-1) { AttachThingToThing(t,slideshow3); SetLifeLeft(t,0.1); } SetCameraFocus(0,slideshow3); SetThingLook(slideshow3,VectorSub(GetThingPos(trooptrans),GetThingPos(slideshow3))); FireProjectile(trooptrans,snowdust,-1,-1,'0 -.5 -.05','0 0 0',0,0,0,0); } else if(playpart==17) { if(t!=-1) DestroyThing(t); t=-1; t=FireProjectile(slideshow3,credits3,-1,-1,'-0.2 .5 0','0 0 0',0,0,0,0); if(t!=-1) { AttachThingToThing(t,slideshow3); SetLifeLeft(t,0.1); } SetCameraFocus(0,slideshow3); SetThingLook(slideshow3,VectorSub(GetThingPos(trooptrans),GetThingPos(slideshow3))); FireProjectile(trooptrans,snowdust,-1,-1,'0 -.5 -.05','0 0 0',0,0,0,0); if(fade>0) { if(eh!=-1) FreeColorEffect(eh); eh=NewColorEffect(0,0,0, 0,0,0, 0,0,0, fade); fade=fade-(timing*2); } } else if(playpart==18) { SetCameraFocus(0,slideshow4); if(fade<1) { if(eh!=-1) FreeColorEffect(eh); eh=NewColorEffect(0,0,0, 0,0,0, 0,0,0, fade); fade=fade+timing; } } else if(playpart==19) { SetCameraFocus(0,slideshow4); if(fade>0) { if(eh!=-1) FreeColorEffect(eh); eh=NewColorEffect(0,0,0, 0,0,0, 0,0,0, fade); fade=fade-(timing*2); } } else if(playpart==20) { if(t!=-1) DestroyThing(t); t=-1; t=FireProjectile(slideshow5,credits5,-1,-1,'0 .5 0','0 0 0',0,0,0,0); if(t!=-1) { AttachThingToThing(t,slideshow5); SetLifeLeft(t,0.1); } SetCameraFocus(0,slideshow5); SetThingLook(slideshow5,VectorSub(GetThingPos(focus5),GetThingPos(slideshow5))); if(fade<1) { if(eh!=-1) FreeColorEffect(eh); eh=NewColorEffect(0,0,0, 0,0,0, 0,0,0, fade); fade=fade+timing; } } else if(playpart==21) { if(t!=-1) DestroyThing(t); t=-1; t=FireProjectile(slideshow5,credits5,-1,-1,'0 .5 0','0 0 0',0,0,0,0); if(t!=-1) { AttachThingToThing(t,slideshow5); SetLifeLeft(t,0.1); } SetCameraFocus(0,slideshow5); SetThingLook(slideshow5,VectorSub(GetThingPos(focus5),GetThingPos(slideshow5))); if(fade>0) { if(eh!=-1) FreeColorEffect(eh); eh=NewColorEffect(0,0,0, 0,0,0, 0,0,0, fade); fade=fade-timing; } } else if(playpart==22) { if(t!=-1) DestroyThing(t); t=-1; t=FireProjectile(slideshow5,credits5,-1,-1,'0 .5 0','0 0 0',0,0,0,0); if(t!=-1) { AttachThingToThing(t,slideshow5); SetLifeLeft(t,0.1); } SetCameraFocus(0,slideshow5); if(fade>300) fade=290; fade=fade+(timing*1000); AddDynamicAdd(GetLocalPlayerThing(),fade,fade,fade); } else if(playpart==23) { SetCameraFocus(0,slideshow6); } else if(playpart==24) { SetCameraFocus(0,slideshow6); if(fade>0) { if(eh!=-1) FreeColorEffect(eh); eh=NewColorEffect(0,0,0, 0,0,0, 0,0,0, fade); fade=fade-timing; } } else if(playpart==25) { SetCameraFocus(0,slideshow7); if(fade<1) { if(eh!=-1) FreeColorEffect(eh); eh=NewColorEffect(0,0,0, 0,0,0, 0,0,0, fade); fade=fade+timing; } } else if(playpart==26) { SetCameraFocus(0,slideshow7); if(fade>0) { if(eh!=-1) FreeColorEffect(eh); eh=NewColorEffect(0,0,0, 0,0,0, 0,0,0, fade); fade=fade-timing; } } else if(playpart==27) { SetCameraFocus(0,returningcam); SetThingVel(returningcam,VectorAdd( VectorAdd( VectorScale(GetThingLVec(returningcam),-2),VectorScale(GetThingUVec(returningcam),-1)),VectorScale(GetThingRVec(returningcam),1) ) ); if(fade<1) { if(eh!=-1) FreeColorEffect(eh); eh=NewColorEffect(0,0,0, 0,0,0, 0,0,0, fade); fade=fade+timing; } } else if(playpart==28) { SetCameraFocus(0,returningcam); SetThingVel(returningcam,VectorAdd( VectorAdd( VectorScale(GetThingLVec(returningcam),-2),VectorScale(GetThingUVec(returningcam),-1)),VectorScale(GetThingRVec(returningcam),1) ) ); if(fade>300) fade=290; fade=fade+(timing*20); AddDynamicAdd(GetLocalPlayerThing(),fade,fade,fade); } else if(playpart==29) { SetCameraFocus(0,returningcam); SetThingLook(returningcam,VectorSub(swing0,GetThingPos(returningcam))); ApplyForce(returningcam,VectorAdd( VectorScale(GetThingLVec(returningcam),(timing*2)),VectorScale(GetThingRVec(returningcam),-(timing*1.5)) )); } else if(playpart==30) { SetCameraFocus(0,returningcam); SetThingLook(returningcam,VectorSub(swing0,GetThingPos(returningcam))); ApplyForce(returningcam,VectorAdd( VectorScale(GetThingLVec(returningcam),(timing*2.25)),VectorScale(GetThingRVec(returningcam),-(timing*0.5)) )); } else if(playpart==31) { SetCameraFocus(0,leavecam); } gtime=GetFlexGameTime()%1; return; timer: if(GetSenderID()==1) { KillTimerEx(1); MoveToFrame(door,0,8); } else if(GetSenderID()==2) { KillTimerEx(2); SetMaterialCel(te,GetParam(0)); if(GetParam(0)<15) SetTimerEx(0.1,2,GetParam(0)+1,GetParam(1)); else SetTimerEx(10,3,GetParam(0),GetParam(1)); } else if(GetSenderID()==3) { KillTimerEx(3); SetMaterialCel(te,GetParam(0)); if(GetParam(0)>0) SetTimerEx(0.1,3,GetParam(0)-1,GetParam(1)); else DestroyThing(GetParam(1)); } else if(GetSenderID()==4) { KillTimerEx(4); SetMaterialCel(tw,GetParam(0)); if(GetParam(0)<15) SetTimerEx(0.1,4,GetParam(0)+1,GetParam(1)); else SetTimerEx(10,5,GetParam(0),GetParam(1)); } else if(GetSenderID()==5) { KillTimerEx(5); SetMaterialCel(tw,GetParam(0)); if(GetParam(0)>0) SetTimerEx(0.1,5,GetParam(0)-1,GetParam(1)); else DestroyThing(GetParam(1)); } // End Credits else if(GetSenderID()==10) { KillTimerEx(10); ParseArg(door,"soundclass=none"); // Kyle looks out the window and see the ghost of Jan. PlaySoundLocal(mordi00,1,0,0x100); SetFaceGeoMode(window,0); sleep(1); //00:00:01.0 MoveToFrame(incam3,1,0.075); SetCollideType(outercam,0); eh=-1; sleep(18); //00:00:19.0 playpart=4; sleep(11); //00:00:30.0 playpart=5; sleep(5); //00:00:35.0 StopKey(kyle,kk,.5); kk=-1; kk=PlayKey(kyle,crumble,1,0x1); sleep(1); //00:00:36.0 StopKey(kyle,kk,.25); kk=-1; kk=PlayKey(kyle,crumble,1,0x4); SetMaterialCel(kkfagoat,1); sleep(1.4); //00:00:37.4 // Move away from window as Kyle crumbles. PlaySoundLocal(mordi01,1,0,0x100); SetTimerEx(GetSoundLen(mordi01)-0.1,11,0,0); DestroyThing(janimg); for(killaudio=0; killaudio<=GetSectorCount(); killaudio=killaudio+1) { SectorSound(killaudio,-1,0); if(killaudio<256) SendMessage(killaudio,user7); } ThingLight(inlight,0,5); ThingLight(outercam,1,5); playpart=6; sleep(1); //00:00:01.0 SetCollideType(outercam,1); sleep(2); //00:00:03.0 t=-1; while(t==-1) { t=FireProjectile(outercam,theend,-1,-1,'0 .5 0','0 0 0',0,0,0,0); sleep(0.0001); } AttachThingToThing(t,outercam); SetTimerEx(0.1,2,0,t); sleep(52); //00:00:55.0 // 53 seconds in, start going across the side of ship. ThingLight(outercam,0,5); playpart=7; sleep(14); //00:01:07.0 fade=1; playpart=8; } else if(GetSenderID()==11) { KillTimerEx(11); // View cannon's tie bomb texture. PlaySoundLocal(mordi02,1,0,0x100); playpart=9; for(i=0; i<=GetNumSectorSurfaces(GetThingSector(slideshow0)); i=i+1) { SetFaceType(GetSectorSurfaceRef(GetThingSector(slideshow0),i),0x2); } ThingLight(slideshow0,10,5); MoveToFrame(slideshow0,1,1); sleep(3); //00:00:03.0 t=-1; while(t==-1) { t=FireProjectile(slideshow0,thatwas,-1,-1,'0 .5 0','0 0 0',0,0,0,0); sleep(0.0001); } AttachThingToThing(t,slideshow0); SetTimerEx(0.1,4,0,t); sleep(14); //00:00:17.0 playpart=10; DestroyThing(killflare); ThingLight(slideshow0,0,5); sleep(4.5); //00:00:21.5 PlaySoundLocal(mordi03,1,0,0x100); SetTimerEx(GetSoundLen(mordi03)-.1,12,0,0); playpart=11; sleep(2); //00:00:02.0 if(eh!=-1) FreeColorEffect(eh); playpart=12; t=-1; while(t==-1) { t=FireProjectile(slideshow1,credits1,-1,-1,'0.1 .5 0','0 0 0',0,0,0,0); sleep(0.0001); } AttachThingToThing(t,slideshow1); SetLifeLeft(t,20); MoveToFrame(slideshow1,1,1); sleep(17); //00:00:19.0 fade=1; playpart=13; } else if(GetSenderID()==12) { KillTimerEx(12); // Fade to white, then bang, we are at the first outpost. PlaySoundLocal(mordi04,1,0,0x100); playpart=14; MoveToFrame(slideshow2,1,5); sleep(19); //00:00:20.2 // Fly across the fence to the resource ships location. PlaySoundLocal(mordi05,1,0,0x100); SetTimerEx(GetSoundLen(mordi05)-.1,13,0,0); playpart=15; sleep(1); //00:00:01 playpart=16; if(eh!=-1) FreeColorEffect(eh); AddDynamicAdd(GetLocalPlayerThing(),290,290,290); AttachThingToThing(rider,trooptrans); MoveToFrame(slideshow3,1,25); MoveToFrame(trooptrans,1,30); PlayKey(rider,sitting,1,0x0); sleep(17); //00:00:18 // Fade out from previous, then bang to: fade=1; playpart=17; } else if(GetSenderID()==13) { KillTimerEx(13); // Fly over temple PlaySoundLocal(mordi06,1,0,0x100); SetTimerEx(GetSoundLen(mordi06)-.1,14,0,0); playpart=18; t=-1; while(t==-1) { t=FireProjectile(slideshow4,credits4,-1,-1,'0 .5 0','0 0 0',0,0,0,0); sleep(0.0001); } AttachThingToThing(t,slideshow4); SetLifeLeft(t,20); MoveToFrame(slideshow4,1,25); sleep(17); playpart=19; } else if(GetSenderID()==14) { KillTimerEx(14); PlaySoundLocal(mordi07,1,0,0x100); SetTimerEx(GetSoundLen(mordi07)-.1,15,0,0); playpart=20; MoveToFrame(slideshow5,1,25); sleep(13); //00:00:13 playpart=21; sleep(4); //00:00:17 playpart=22; } else if(GetSenderID()==15) { KillTimerEx(15); // Flying through the works of the elevator maze. PlaySoundLocal(mordi08,1,0,0x100); SetTimerEx(GetSoundLen(mordi08)-.1,16,0,0); playpart=23; if(eh!=-1) FreeColorEffect(eh); t=-1; while(t==-1) { t=FireProjectile(slideshow6,credits6,-1,-1,'0.03 .075 0','0 0 0',0,0,0,0); sleep(0.0001); } AttachThingToThing(t,slideshow6); SetLifeLeft(t,20); MoveToFrame(slideshow6,2,8); SendMessage(ElevRideExtras1,user1); SendMessage(ElevRideExtras2,user1); SendMessage(CrateSpawnCog,user1); sleep(16); fade=1; playpart=24; } else if(GetSenderID()==16) { KillTimerEx(16); SendMessage(ElevRideExtras1,user0); SendMessage(ElevRideExtras2,user0); PlaySoundLocal(mordi09,1,0,0x100); SetTimerEx(GetSoundLen(mordi09)-.1,17,0,0); playpart=25; t=-1; while(t==-1) { t=FireProjectile(slideshow7,credits7,-1,-1,'0 .5 0','0 0 0',0,0,0,0); sleep(0.0001); } AttachThingToThing(t,slideshow7); SetLifeLeft(t,20); MoveToFrame(slideshow7,1,3); sleep(16); SendMessage(CrateSpawnCog,user0); playpart=26; } else if(GetSenderID()==17) { KillTimerEx(17); // empty space PlaySoundLocal(mordi10,1,0,0x100); SetTimerEx(GetSoundLen(mordi10)-.1,18,0,0); SlideHorizonSky(10,0); playpart=27; sleep(7); playpart=28; } else if(GetSenderID()==18) { KillTimerEx(18); // Fly around ship PlaySoundLocal(mordi11,1,0,0x100); SetTimerEx(GetSoundLen(mordi11)-.1,19,0,0); playpart=29; sleep(22.5); playpart=30; } else if(GetSenderID()==19) { KillTimerEx(19); // In ship PlaySoundLocal(mordi12,1,0,0x100); playpart=31; ThingLight(leavecam,1,0); MoveToFrame(leavecam,1,1); sleep(18); sleep(11); JKENDLEVEL(1); // The first, the last, the final... } // Kyface else If(GetSenderID()==255) { KillTimerEx(255); SetMaterialCel(kkfagoat,rand()*14); SetTimerEx(0.1,255,0,0); } else if(GetSenderID()==256) { KillTimerEx(255); KillTimerEx(256); SetMaterialCel(kkfagoat,0); } // Reface else If(GetSenderID()==257) { KillTimerEx(257); SetMaterialCel(k3facef,rand()*14); SetTimerEx(0.1,257,0,0); } else if(GetSenderID()==258) { KillTimerEx(257); KillTimerEx(258); SetMaterialCel(k3facef,0); } return; end
# Jedi Knight Cog Script # # FORCE_WELL.COG # # JEDI RANK Script # Bin 20 # # The rank of a Jedi determines his mana regeneration rate. # # [YB] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved symbols thing player local message startup message pulse # Frame Rate Limiter. Why? # Either for timing reasons, or cinematic effects. int count local int cycles=000000 local # Cycles FPS (fraps) # 50000 45 @ 1024, 80 @ 320 # 75000 32-33 # 80000 30-31 # 100000 24-25 # 150000 16-17 # 175000 14-15 # 200000 12 # 300000 8-9 # 400000 6 # 500000 5 # 600000 4 # 800000 3 #1250000 2 # Cycles FPS (-dispstats) #1250000 2.051 #1500000 1.701 end # ======================================================================================== code startup: player = GetLocalPlayerThing(); Sleep(1.0); SetPulse(1.0); while(1) { count=0; while(count GetInv(player, 20) * 50) SetInv(player, 14, GetInv(player, 20) * 50); Return; end
# Use force see to turn surface transparent. # # By Edward flags=0x240 symbols message startup message pulse surface glass nolink end # code startup: SetPulse(0.1); return; pulse: if(IsInvActivated(GetLocalPlayerThing(), 23)) { SetFaceType(glass,0x2); } else { ClearFaceType(glass,0x2); } return; end
############################################################################### # # # EEEEEE DD DD ** # # EE DD DD ** # # EE DDDDD WW WW AAAA RRRRR DDDDD ** SSSSS # # EEEEE DD DD WW WW AA RR RR DD DD SS # # EE DD DD WW W WW AAAAA RR DD DD SSSS # # EE DD DD WWWWW AA AA RR DD DD SS # # EEEEEE DDDDD WW WW AAAAA RR DDDDD SSSSS # # # # CCCC II II # # CC CC * * * TT # # CC *OOOO* GGGGG NNNNN III TTTTTT III VV VV EEEE # # CC OO OO GG GG NN NN II TT II VV VV EE EE # # CC *OO OO* GG GG NN NN II TT II VV VV EEEEEE # # CC CC OO OO GGGGG NN NN II TT II VVVV EE # # CCCC *OOOO* GG NN NN IIII TTT IIII VV EEEE # # * * * GGGGG # # # # @@@@ HH HH DD @@@@ # # @@@@ HH HH DD @@@@ # # @@ HH HH AAAA ZZZZZZ AAAA RRRRR DDDDD SSSSS @@ # # @@ HHHHHH AA ZZ AA RR RR DD DD SS @@ # # HH HH AAAAA ZZ AAAAA RR DD DD SSSS # # @@ HH HH AA AA ZZ AA AA RR DD DD SS @@ # # @@ HH HH AAAAA ZZZZZZ AAAAA RR DDDDD SSSSS @@ # # # ############################################################################### # # This is to be used in the very start of the game to introduce me as your # beloved COG Master. Well, actually when I've done almost all the crazy COGs # with interesting effects like neon flickery, cutscene smoothness, complex # puzzles, and whatnots. # Implementing this cog should be very straightforward. If not, then I suppose # I'll explain... # First be sure to add these templates: # Gear _walkstruct size=1.20108 movesize=1.20108 model3d=Gear.3DO move=physics staticdrag=1 airdrag=0.25 surfdrag=0 mass=1 angvel=(0/90/0) # FireMarble _powerup size=.08 movesize=.08 model3d=FM.3DO angvel=(0/0/90) airdrag=.25 # # Then merge in this little room with the rest of your level/cutscene. # Once that is done add this cog and assign # TopDownCam to the ghost high above, MainGear to the Gear facing up # (title and all blue, not grey), the otherGear0 & 1 to the Gears underneath # facing down (grey facing up), and the FireMarble to that red thingy # sandwitched between the MainGear and the otherGears. # # Sounds are pretty much free choice here, but here are a few pointers: # SpinGear_loop is the main spinning sound of a big heavy gear (or 3). # StopGear_loop should also be a looping sound of say the motor straining to # slow down the large gears. # ElevFunicStop is some normal clattering stopping sound like elev3-3 or # funicularstop or some kind of locking sound. # Woah_Effect can be some WOOOOOOOAAAAAAAH! music or some other Exciting Jingle # or Sound. But keep it under 5 seconds so that we are not stuck on me forever. # This is after all your show! :D # The Material with the extremely long name goes to the MAT file that has the # same name (not exactly, but close). It is connected to the top picture on the # Gear. # Finally, ContinuingCog should be linked to whatever COG that will continue # the level or cutscene/intro. This COG should have the message user0 instead # of startup. That is how it is Activated, via SendMessage(ContinuingCog,user0). # # Created by Edward in Everest symbols message startup message pulse message user1 thing TopDownCam thing MainGear thing otherGear0 thing otherGear1 thing FireMarble sound SpinGear_loop sound StopGear_loop sound ElevFunicStop sound Woah_Effect material grtzsphericalthing int ch1 local int ch2 local flex ogr0 local flex ogr1 local flex i local int fx=-1 local cog ContinuingCog flex timing local int skipme=0 local end # code startup: IF(!(GetActorFlags(GetLocalPlayerThing()) & 0x800000)) SetActorFlags(GetLocalPlayerThing(),0x800000); IF(GetCurrentCamera()>0) CycleCamera(); SetCameraFocus(0,TopDownCam); ch1=PlaySoundLocal(SpinGear_loop,0,0,1); ChangeSoundVol(ch1,1,4); if(skipme==0) sleep(0.5); ThingLight(TopDownCam,2,3); if(skipme==0) sleep(1); IF(RAND()>.5) ogr0=60+rand()*180; ELSE ogr0=-(60+rand()*180); IF(RAND()>.5) ogr1=60+rand()*180; ELSE ogr1=-(60+rand()*180); SetThingRotVel(otherGear0,VectorSet( 0,ogr0,0 )); SetThingRotVel(otherGear1,VectorSet( 0,ogr1,0 )); ApplyForce(otherGear0,VectorSet( (RAND()*2)-1,(RAND()*2)-1,0 )); ApplyForce(otherGear1,VectorSet( (RAND()*2)-1,(RAND()*2)-1,0 )); IF(GetCurrentCamera()>0) CycleCamera(); if(skipme==0) sleep(3); again: IF(GetCurrentCamera()>0) CycleCamera(); IF( (VectorY(GetThingLVec(MainGear))>-0.05 && VectorY(GetThingLVec(MainGear))<0.05) && VectorX(GetThingLVec(MainGear))<-0.95) { ch2=PlaySoundLocal(StopGear_loop,0,0,1); ChangeSoundVol(ch2,1,0.5); ChangeSoundPitch(ch1,0.1,4); timing=GetFlexGameTime(); if(skipme==0) sleep(0.001); timing=GetFlexGameTime()-timing; FOR(i=90; i>10; i=i-(timing*20)) { SetThingRotVel(MainGear,VectorSet(0,i,0)); SetThingRotVel(otherGear0,VectorSet(0,ogr0*(i/90),0)); SetThingRotVel(otherGear1,VectorSet(0,ogr1*(i/90),0)); ChangeSoundVol(ch1,i/90,0.02); ChangeSoundPitch(ch2,i/90,0.1); if(skipme==0) sleep(0.02); IF(GetCurrentCamera()>0) CycleCamera(); } ChangeSoundVol(ch2,0,1); WHILE( VectorY(GetThingLVec(MainGear))<0.999 && skipme==0) { IF(GetCurrentCamera()>0) CycleCamera(); sleep(0.02); } FOR(i=10; i>0; i=i-1) { SetThingRotVel(MainGear,VectorSet(0,i,0)); SetThingRotVel(otherGear0,VectorSet(0,ogr0*(i/90),0)); SetThingRotVel(otherGear1,VectorSet(0,ogr1*(i/90),0)); if(skipme==0) sleep(0.02); IF(GetCurrentCamera()>0) CycleCamera(); } StopThing(MainGear); StopSound(ch1,1); StopSound(ch2,1); ch1=PlaySoundLocal(ElevFunicStop,1,0,0); ChangeSoundPitch(ch1,0.5,0.1); ch1=PlaySoundLocal(ElevFunicStop,1,0,0); ChangeSoundPitch(ch1,0.25,0.1); ch1=PlaySoundLocal(ElevFunicStop,1,0,0); ChangeSoundPitch(ch1,0.125,0.1); if(skipme==0) sleep(1); IF(GetCurrentCamera()>0) CycleCamera(); PlaySoundLocal(Woah_Effect,1,0,0); MaterialAnim(grtzsphericalthing,12,0); FOR(i=0; i<2; i=i+0.1) { FreeColorEffect(fx); fx=NewColorEffect(0,0,0, 0,i/4,i, i*50,i*50,i*50, 1); IF(GetCurrentCamera()>0) CycleCamera(); if(skipme==0) sleep(0.02); } FOR(i=.5; i<2; i=i+0.1) { FreeColorEffect(fx); fx=NewColorEffect(0,0,0, 0,i,2, i*100,i*100,i*100, 1); IF(GetCurrentCamera()>0) CycleCamera(); if(skipme==0) sleep(0.02); } ch1=PlaySoundLocal(Woah_Effect,0.25,0,0); ChangeSoundPitch(ch1,0.25,0.1); ThingLight(FireMarble,1,1); ApplyForce(FireMarble,'0 0 6'); FOR(i=2; i>0; i=i-0.1) { FreeColorEffect(fx); fx=NewColorEffect(0,0,0, 0,2,i, i*100,i*100,i*100, 1); IF(GetCurrentCamera()>0) CycleCamera(); if(skipme==0) sleep(0.02); } FOR(i=2; i>0; i=i-0.1) { FreeColorEffect(fx); fx=NewColorEffect(0,0,0, 0,i,0, 0,0,0, 1); IF(GetCurrentCamera()>0) CycleCamera(); if(skipme==0) sleep(0.02); } if(skipme==0) sleep(GetSoundLen(Woah_Effect)+2); IF(GetCurrentCamera()>0) CycleCamera(); ThingLight(TopDownCam,0,5); if(skipme==0) sleep(3); IF(GetCurrentCamera()>0) CycleCamera(); ThingLight(FireMarble,0,2); FOR(i=1; i>0; i=i-0.01) { FreeColorEffect(fx); fx=NewColorEffect(0,0,0, 0,0,0, 0,0,0, i); IF(GetCurrentCamera()>0) CycleCamera(); if(skipme==0) sleep(0.001); } if(skipme==0) sleep(1); FreeColorEffect(fx); SendMessage(ContinuingCog,user0); } ELSE { if(skipme==1) { ChangeSoundPitch(ch1,3,1); ChangeSoundPitch(ch2,3,1); StopSound(ch1,1); StopSound(ch2,1); FreeColorEffect(fx); SendMessage(ContinuingCog,user0); return; } sleep(0.001); GOTO again; } return; pulse: printvector(getthinglvec(maingear)); return; user1: skipme=1; return; end
# Claw buzzing at girders. # # By Edward symbols message entered message timer message pulse sector in0 linkid=10 sector in1 linkid=10 sector out0 linkid=20 sector out1 linkid=20 thing xarm0 nolink thing xarm1 nolink thing yarm nolink template kzap flex x local flex x0=-182.6 flex x1=-179.7 flex y local flex y0=26.9 flex y1=29.1 int zappers=0 local sound starter sound move sound ending int ch0 local thing t local end # code entered: if(GetSenderID()==10) { SetPulse(0.01); SetTimerEx(1,50,1,0); } else if(GetSenderID()==20) { KillTimerEx(50); KillTimerEx(51); KillTimerEx(52); StopThing(xarm0); StopThing(xarm1); StopThing(yarm); StopSound(ch0,1); SetPulse(0); } return; timer: If(GetSenderID()==50) { KillTimerEx(50); x=x0+(rand()*(x1-x0)); y=y0+(rand()*(y1-y0)); zappers=0; PlaySoundThing(starter,yarm,1,50,100,0x0); ch0=PlaySoundThing(xarm0,move,1,50,100,0x81); ParseArg(yarm,"move=physics mass=1 staticdrag=1 airdrag=10 surfdrag=0"); SetCollideType(yarm,0); SetTimerEx(.5+rand()*2,52,0,0); } else if(GetSenderID()==52) { KillTimerEx(52); StopThing(yarm); StopSound(ch0,1); PlaySoundThing(ending,yarm,1,50,100,0x0); ParseArg(yarm,"move=none airdrag=100 surfdrag=100"); SetCollideType(yarm,3); zappers=1; SetTimerEx(5+rand()*5,50,1,0); } return; pulse: If(zappers==1) { if(HasLOS(GetPrimaryFocus(GetCurrentCamera()),yarm)) { t=FireProjectile(yarm,kzap,-1,-1,'0 0 -.4','0 0 0',0,0,0,0); SetThingVel(t,'0 -1 0'); } } else { ChangeSoundVol(ch0,VectorLen(GetThingVel(yarm))*10,0.1); ChangeSoundPitch(ch0,VectorLen(GetThingVel(yarm)),0.1); ApplyForce(yarm,VectorSub(VectorSet(x,33.9,y),GetThingPos(yarm))); SetThingPos(xarm0,VectorAdd(GetThingPos(yarm),VectorSet(-.1,.5,0))); SetThingPos(xarm1,VectorAdd(GetThingPos(yarm),VectorSet( .1,.5,0))); SetThingPos(xarm0,VectorSet( VectorX(GetThingPos(xarm0)),VectorY(GetThingPos(xarm0)),28 )); SetThingPos(xarm1,VectorSet( VectorX(GetThingPos(xarm1)),VectorY(GetThingPos(xarm1)),28 )); if(VectorDist(VectorSet(x,33.9,y),GetThingPos(yarm))<.1) SetTimerEx(0.01,52,0,0); } return; end
# housejourney # # Cog by Edward. MOD... Who knows. symbols message entered message pulse sector playnow thing emmits sound sam1=HOUSEJRD\tr909bass.wav local sound sam2=HOUSEJRD\tr909snare.wav local sound sam3=HOUSEJRD\trhihato.wav local sound samD=HOUSEJRD\cymbal.wav local flex speed=0.03 flex dist=1.0 int here=0 local int playing=0 local int r local end # code entered: if(GetSenderRef()!=playnow) return; SetPulse(speed); return; pulse: if(VectorDist( GetThingPos(GetLocalPlayerThing()),GetThingPos(emmits) )>dist) { here=0; } else { here=1; } if(playing==0 && here==1) { if(rand()>0 && rand()<=.5) { playing=1; call pattern1; } else if(rand()>.5 && rand()<=.75) { playing=1; call pattern2; } else if(rand()>.75 && rand()<=1) { playing=1; call pattern3; } } return; pattern1: PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(samD,emmits,1,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(samD,emmits,1,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(samD,emmits,16/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(samD,emmits,26/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); PlaySoundThing(samD,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(samD,emmits,16/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(samD,emmits,26/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); PlaySoundThing(samD,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(samD,emmits,16/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(samD,emmits,26/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); PlaySoundThing(samD,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam2,emmits,16/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(sam2,emmits,26/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); #-------------# PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(samD,emmits,1,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(samD,emmits,1,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(samD,emmits,16/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(samD,emmits,26/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); PlaySoundThing(samD,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(samD,emmits,16/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(samD,emmits,26/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); PlaySoundThing(samD,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam2,emmits,16/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(sam2,emmits,26/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(samD,emmits,16/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(samD,emmits,26/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam2,emmits,16/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(sam2,emmits,26/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); #-------------# playing=0; return; pattern2: for(r=0; r<1; r=r+1) { PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); PlaySoundThing(samD,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(sam2,emmits,26/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); PlaySoundThing(samD,emmits,16/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(samD,emmits,26/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); PlaySoundThing(samD,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); #-------------# } PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); PlaySoundThing(samD,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(sam2,emmits,26/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); PlaySoundThing(samD,emmits,16/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(samD,emmits,26/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); PlaySoundThing(samD,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam2,emmits,16/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(sam2,emmits,26/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); PlaySoundThing(sam2,emmits,16/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(sam2,emmits,26/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); #-------------# playing=0; return; pattern3: PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(samD,emmits,1,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(samD,emmits,1,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(samD,emmits,16/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(samD,emmits,26/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); PlaySoundThing(samD,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(samD,emmits,16/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(samD,emmits,26/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); PlaySoundThing(samD,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(samD,emmits,16/64,-1,dist*10.5,0x80); PlaySoundThing(sam2,emmits,16/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(samD,emmits,26/64,-1,dist*10.5,0x80); PlaySoundThing(sam2,emmits,26/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); PlaySoundThing(samD,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); PlaySoundThing(samD,emmits,16/64,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); #-------------# PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(samD,emmits,1,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(samD,emmits,1,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(samD,emmits,16/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(samD,emmits,26/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); PlaySoundThing(samD,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(samD,emmits,16/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(samD,emmits,26/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); PlaySoundThing(samD,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam1,emmits,1,-1,dist*10.5,0x80); sleep(speed*4); PlaySoundThing(sam3,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(samD,emmits,16/64,-1,dist*10.5,0x80); PlaySoundThing(sam2,emmits,16/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(samD,emmits,26/64,-1,dist*10.5,0x80); PlaySoundThing(sam2,emmits,26/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); PlaySoundThing(samD,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); PlaySoundThing(sam2,emmits,16/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(sam2,emmits,26/64,-1,dist*10.5,0x80); sleep(speed); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); PlaySoundThing(sam2,emmits,1,-1,dist*10.5,0x80); sleep(speed*2); #-------------# playing=0; return; end
# Make faces when hurt! # # By Edward symbols message created message damaged message killed message timer thing actor local material face=k3facef.mat local end # code created: CaptureThing(GetSenderRef()); return; damaged: SetTimerEx(.5,1,0,0); SetMaterialCel(face,14); return; timer: SetMaterialCel(face,GetParam(0)); return; killed: KillTimerEx(1); SetMaterialCel(face,15); return; end
# Hyper Rotation # # By Edward symbols message startup message pulse thing tunnel thing back end # code startup: SetPulse(0.01); return; pulse: # Parsearg(tunnel,"move=physics mass=1 airdrag=0 staticdrag=1 surfdrag=0"); # Parsearg(back,"move=physics mass=1 airdrag=0 staticdrag=1 surfdrag=0"); SetCollideType(tunnel,0); SetThingRotVel(tunnel,'0 0 128'); SetThingRotVel(back,'0 0 128'); SetThingVel(tunnel,'0 -2.5 0'); if(VectorDist(GetThingPos(tunnel),GetThingPos(back))>2.4) { TeleportThing(tunnel,back); } return; end
# Introduction to The Empire's Revange! # # By Edward symbols message startup message user0 message playeraction message pulse message timer message user7 thing cam0 desc=first_and_boxes thing light0 thing light1 thing light2 thing light3 thing box1 desc=square thing box2 desc=rect thing cam1 thing cam2 thing cam3 thing cam4 desc=title_and_hypercam surface title_hyper nolink material hyper thing arms thing cam5 desc=cockpit_cam thing cam6 desc=mapcam thing cam7 desc=normal_space thing cockpit2 thing arms2 thing cam7b thing cockpit2b thing cam8 desc=landing_cam thing landship thing playerout sound woosh sound jeish sound hyperin sound hyperout sound mapup sound mapdown sound landing sound KY_almost sound KY_LookAtMap sound KY_LandBehind sound KY_LongerSafer sound KY_ChangeSome sound KY_Exit sound KY_Outpost material kkfagoat vector landingpos int cogodgear flex i local int story=0 local int view=0 local int ch local int skipped=0 local end # code startup: sleep(1); SetActionCog(GetSelfCog(),0x7FFFFFFF); return; user0: SetPulse(0.001); story=0; SetActorFlags(GetLocalPlayerThing(),0x840000); SetCameraFocus(1,cam0); SetCameraFocus(0,cam0); PlaySoundLocal(woosh,1,0,0x0); for(i=0; i<4; i=i+1) { SetThingLight(light0[i],5,5); if(skipped==0) sleep(1); } if(skipped==0) sleep(3); ClearThingFlags(box1,0x10); MoveToFrame(box1,1,50); if(skipped==0) WaitForStop(box1); SetCameraFocus(0,cam4); PlaySoundLocal(jeish,1,0,0x0); SetMusicVol(1); PlaySong(3,3,0); if(skipped==0) MoveToFrame(box1,0,100); if(skipped==0) SetThingFlags(box1,0x10); for(i=0; i<4; i=i+1) { SetThingLight(light0[i],0,1); } if(skipped==0) sleep(2); SetCameraFocus(0,cam0); if(skipped==0) ClearThingFlags(box2,0x10); if(skipped==0) MoveToFrame(box2,1,50); if(skipped==0) WaitForStop(box2); SetCameraFocus(0,cam1); MoveToFrame(box2,0,100); SetThingFlags(box2,0x10); story=1; while(story<5) sleep(1); #---------------------------------------------------------------------------------# if(skipped==0) PlaySoundLocal(KY_almost,1,0,0x0); if(skipped==0) jkPrintUniString(-3,10000); if(skipped==0) sleep(GetSoundLen(KY_almost)+.5); if(skipped==0) PlaySoundLocal(KY_LookAtMap,1,0,0x0); if(skipped==0) jkPrintUniString(-3,10001); if(skipped==0) sleep(GetSoundLen(KY_LookAtMap)); MoveToFrame(arms,1,1); if(skipped==0) PlaySoundLocal(mapup,1,0,0x0); if(skipped==0) sleep(2.1); SetCameraFocus(0,cam6); if(skipped==0) sleep(1); if(skipped==0) PlaySoundLocal(KY_LandBehind,1,0,0x0); if(skipped==0) jkPrintUniString(-3,10002); if(skipped==0) sleep(GetSoundLen(KY_LandBehind)); if(skipped==0) PlaySoundLocal(KY_LongerSafer,1,0,0x0); if(skipped==0) jkPrintUniString(-3,10003); if(skipped==0) sleep(GetSoundLen(KY_LongerSafer)+1); if(skipped==0) PlaySoundLocal(mapdown,1,0,0x0); if(skipped==0) sleep(.25); SetCameraFocus(0,cam5); if(skipped==0) sleep(2.5); MoveToFrame(arms,0,1); if(skipped==0) WaitForStop(arms); SetCameraFocus(0,cam7); AttachThingToThing(cam7,cockpit2); AttachThingToThing(arms2,cockpit2); if(skipped==0) PlaySoundLocal(KY_ChangeSome,1,0,0x0); if(skipped==0) jkPrintUniString(-3,10004); MoveToFrame(cockpit2,1,50); if(skipped==0) sleep(GetSoundLen(KY_ChangeSome)); if(skipped==0) PlaySoundLocal(KY_Exit,1,0,0x0); if(skipped==0) jkPrintUniString(-3,10005); if(skipped==0) WaitForStop(cockpit2); story=10; MoveToFrame(cockpit2b,1,100); PlaySoundLocal(hyperout,1,0,0x0); MoveToFrame(cockpit2,2,2.5); if(skipped==0) WaitForStop(cockpit2b); MoveToFrame(cockpit2b,2,10); if(skipped==0) WaitForStop(cockpit2); SetCameraFocus(0,cam8); story=11; ch=PlaySoundThing(landing,landship,1,-1,50,0x81); while(VectorDist(GetThingPos(landship),landingpos)>0.1) { ChangeSoundPitch(ch,VectorDist(GetThingPos(landship),landingpos),1); if(skipped==0) MoveToFrame(landship,1,VectorDist(GetThingPos(landship),landingpos)*10); else MoveToFrame(landship,1,100); sleep(0.01); } if(skipped==1) MoveToFrame(landship,1,100); if(skipped==0) WaitForStop(landship); skipped=1; ChangeSoundVol(ch,.25,1); sleep(1); SetActionCog(-1, 0); SetCameraFocus(0,GetLocalPlayerThing()); SetCameraFocus(1,GetLocalPlayerThing()); SetPulse(0); TeleportThing(GetLocalPlayerThing(),playerout); ClearActorFlags(GetLocalPlayerThing(),0x840000); sleep(1); SetTimerEx(.01,255,0,0); SetTimerEx(GetSoundLen(KY_Outpost),256,0,0); PlaySoundLocal(KY_Outpost,1,0,0x0); jkPrintUniString(-3,10006); PlaySong(0,0,0); SetMusicVol(0); SetGoalFlags(player, 0, 1); AutoSaveGame(); sleep(0.1); ChangeSoundVol(ch,.25,1); if(view!=GetCurrentCamera()) CycleCamera(); view=0; return; playeraction: If(GetParam(0)==2 || GetParam(0)==3) { if(story==1) { SetCameraFocus(0,cam0); ClearThingFlags(box2,0x10); MoveToFrame(box2,1,50); WaitForStop(box2); SetCameraFocus(0,cam2); MoveToFrame(box2,0,100); SetThingFlags(box2,0x10); story=2; } else if(story==2) { SetCameraFocus(0,cam0); ClearThingFlags(box2,0x10); MoveToFrame(box2,1,50); WaitForStop(box2); SetCameraFocus(0,cam3); MoveToFrame(box2,0,100); SetThingFlags(box2,0x10); story=3; } else if(story==3) { PlaySoundLocal(hyperin,1,0,0x0); SetSurfaceMat(title_hyper,hyper); SetCameraFocus(0,cam0); ClearThingFlags(box1,0x10); MoveToFrame(box1,1,50); story=4; if(skipped==0) WaitForStop(box1); SetCameraFocus(0,cam4); MoveToFrame(box1,0,100); SetThingFlags(box1,0x10); MoveToFrame(cam4,1,2); if(skipped==0) WaitForStop(cam4); for(i=1; i<10; i=i+1) { MoveToFrame(cam4,2,i); if(skipped==0) sleep(0.05); } SetCameraFocus(0,cam5); MoveToFrame(cam5,1,1); if(skipped==0) WaitForStop(cam5); story=5; } else if((story>3 && story<12) || story<1) { if(skipped==0) { skipped=1; print(">>>>>>>> Spin on! >>>>>>>>"); SendMessage(cogodgear,user1); } } ReturnEx(0); } return; pulse: If(GetCurrentCamera()==1) { CycleCamera(); view=view+1; if(view>1) view=0; printint(view); } if(skipped==1 && story<5) story=5; if(story==10) { If(view==1) { SetCameraFocus(0,cam7b); } else { SetCameraFocus(0,cam7); } } SetActorFlags(GetLocalPlayerThing(),0x2); return; timer: If(GetSenderID()==255) { KillTimerEx(255); SetMaterialCel(kkfagoat,rand()*14); SetTimerEx(.1,255,0,0); } else if(GetSenderID()==256) { SetMaterialCel(kkfagoat,0); KillTimerEx(255); KillTimerEx(256); } return; user7: StopSound(ch,1); return; end
# Jungle Music. Only while you are outside. # # By Edward symbols message startup message user0 message entered message pulse sector indoors0 linkid=10 sector indoors1 linkid=10 sector indoors2 linkid=10 sector indoors3 linkid=10 sector outdoors0 linkid=20 sector outdoors1 linkid=20 sector outdoors2 linkid=20 sector outdoors3 linkid=20 sound music int ch=-1 local end # code startup: SetPulse(0.1); return; user0: if(GetParam(0)==0) { If(ch==-1) ch=PlaySoundGlobal(music,1,0,0x1); } else { if(ch!=-1) { StopSound(ch,1); ch=-1; } } return; entered: If(GetSenderID()==10) { if(ch!=-1) { StopSound(ch,1); ch=-1; } } else if(GetSenderID()==20) { If(ch==-1) ch=PlaySoundGlobal(music,1,0,0x1); } return; pulse: if(ch!=-1) { if(GetSectorFlags(GetThingSector(GetPrimaryFocus(GetCurrentCamera()))) & 0x2) { ChangeSoundPitch(ch,0.5,0.1); ChangeSoundVol(ch,0.75,0.1); } else { ChangeSoundPitch(ch,1,0.1); ChangeSoundVol(ch,1,0.1); } } return; end
# Jedi Knight Missions Cog Script # # KYLE_M.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 # The force-like weapon effects are handled in kyle_m.cog # (since the projectile will be gone by the time the # effects wear off.) thing victim local thing perp local thing meCarbonited local thing aiCarbonited local template carboDummy=+CarboniteChar local template csTpl=+CarboniteStem local template c0Tpl=+CarboDebris_0 local template c1Tpl=+CarboDebris_1 local template c2Tpl=+CarboDebris_2 local template c3Tpl=+CarboDebris_3 local template c4Tpl=+CarboDebris_4 local int debris local int carboSector local vector carboPosition local int oldFlags local sound hmmmSound=mj61031.wav local int iAlignmentPriority=-1 local int nextBlock=0 local int bin local int rank local int force_blinding=0 local int blindingEffectHandle=-1 local int frozenEffectHandle=-1 local int flashEffectHandle=-1 local int PulledWeapon local int i local int j local int k local int m local int playersector local vector playerpos local int bub local vector tempvec local flex tempflex local flex defenseFactor=1.0 local sound defenseSound=ForceDefense.wav local template carboExplode=+sparks local template tpl=+FPBryarPistol local template tpl1 local template tpl2=+FPBryarPistol local template tpl3=+FPSTrifle local template tpl4=+FPDetoLive local template tpl5 local template tpl6=+FPRepeaterGun local template tpl7=+FPRailGun local template tpl8=+seqchrg2 local template tpl9=+FPConcRifle local template tpl10=+FPBryarPistol local template tpl11=+FPLightSaber local template tpl12=+FPBlastech local template tpl13=+FPScope local template tpl14=+FPDetoLive local template tpl15=+FPCrossbow local template tpl16=+FPRepeaterGun local template tpl17=+FPRailSeek local template tpl18=+seqchrg2 local template tpl19=+FPConcRifle local template tpl20=+FPCarbGun local template batteryTpl=+FPBattery local template smoke_tpl=+heavysmoke local int smoke local int totalStop local template teleport_particles=+telesparks local sound teleportsnd=ForceThrow01.WAV local sound freezeSound=freeze.WAV local sound thawSound=thaw.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 material tip_mat=sabergreen0.mat local material side_mat=sabergreen1.mat local template tpl_wall=+ssparks_wall local template tpl_blood=+ssparks_blood local template tpl_saber=+ssparks_saber local int dummy=0 local int blockPOVTrack=-1 local int blockTrack=-1 local int curWeapon local int primaryWeapon local int griptrackID=-1 local int frozenNow=0 local int flashNow=0 local flex ftemp local flex extraFreezeTime=0 local flex extraBlindTime=0 local flex flashLevelR=0 local flex flashLevelG=0 local flex flashLevelB=0 local flex myParam=0.0 local flex damageType local flex damage local int killedByRancor=0 local int inbubble=0 local material kkfagoat=kkfagoat.mat local template lensflare=+LensFlare local thing ls local thing lss local message startup message killed message newplayer message timer message blocked message skill message damaged message splash message user0 message user1 message user5 message enterbubble message exitbubble message preblock message trigger message shutdown message pulse end # ======================================================================================== code startup: player = GetLocalPlayerThing(); // Let everyone know we're Kyle and not that Mara person. SetInv(player, 67, 0.0); // Turn Kyle's saber Orange. jkSetSaberInfo(player, side_mat, tip_mat, 0.003, 0.001, 0.120, tpl_wall, tpl_blood, tpl_saber); if(!IsMulti()) call init_kyle; SetTimerEx(0.1, 2006, 0, 0); // Reset camera zoom // Bubbles if(IsMulti()) SetTimerEx(4 + 5 * rand(), 2, 0, 0); else SetTimerEx(2 + 5 * rand(), 2, 0, 0); # SetPulse(0.01); aiRemoveAlignmentPriority(-1); // Remove any extant alignment priorities. Return; # ........................................................................................ shutdown: aiRemoveAlignmentPriority(-1); // Remove any extant alignment priorities. return; # ........................................................................................ killed: if(player != GetSenderRef()) Return; if(IsMulti()) { CreateBackpack(player); ClearActorFlags(player, 0x2000); } SetActionCog(-1, 0); // Clear the secondary freezing and blinding flags // (For carbonite and flash bombs). ClearActorFlags(player, 0x18000000); // clean up force powers stuff totalStop = 1; call stop_powers; // clean up items stuff if(frozenEffectHandle!=-1) { freeColorEffect(frozenEffectHandle); frozenEffectHandle = -1; } extraFreezeTime = 0.0; if(flashEffectHandle!=-1) { freeColorEffect(flashEffectHandle); flashEffectHandle = -1; } extraBlindTime = 0.0; flashNow = 0; // make a face ;) SetMaterialCel(kkfagoat,15); Return; # ........................................................................................ damaged: damageType = GetParam (1); damage = GetParam(0); // Special case for when the player is carbo frozen. if (frozenNow) { // Unfreeze the player. if(frozenEffectHandle!=-1) { freeColorEffect(frozenEffectHandle); frozenEffectHandle = -1; } ClearActorFlags(player, 0x200000); ClearActorFlags(player, 0x40000); ClearThingFlags(player, 0x14); ClearActorFlags(player, 0x40); if (meCarbonited) { DestroyThing(meCarbonited); meCarbonited = 0; } // broadcast the carbonite statue explosion to all players SendTrigger(-1, 99001, GetThingSector(player), VectorX(GetThingPos(player)), VectorY(GetThingPos(player)), VectorZ(GetThingPos(player))); frozenNow = 0; ReturnEx(GetThingHealth(player) * 10); } else { if (damage >= GetThingHealth(player)) // If the user is about to get killed on the EWEB, switch to fists. if (GetCurWeapon(player) == 10) SelectWeapon(player, GetWeaponBin(1)); if (!IsMulti()) { killedByRancor = 0; if (damage >= GetThingHealth(player)) { if (GetThingParent(GetSourceRef()) != player) SendMessageEx(GetThingClassCog(GetThingParent(GetSourceRef())), user5, GetThingParent(GetSourceRef()), 0, 0, 0); } if (killedByRancor) { if (damage >= GetThingHealth(player)) damage = GetThingHealth(player) - 0.1; } else if (BitTest (damageType, 0x20)) call make_bubbles; } else if (BitTest (damageType, 0x01)) damage = damage * jkGetMultiParam (22); else if (BitTest (damageType, 0x02)) damage = damage * jkGetMultiParam (23); else if (BitTest (damageType, 0x04)) damage = damage * jkGetMultiParam (24); else if (BitTest (damageType, 0x08)) damage = damage * jkGetMultiParam (25); else if (BitTest (damageType, 0x10)) damage = damage * jkGetMultiParam (26); else if (BitTest (damageType, 0x20)) { call make_bubbles; damage = damage * jkGetMultiParam (27); } else if (BitTest (damageType, 0x40)) damage = damage * jkGetMultiParam (28); ReturnEx(damage); } 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: // Shut all the power stuff down (just in case) totalStop = 1; call stop_powers; 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 { // make the player vulnerable again if 40 frames have // been displayed, else add another half second... if(jkGetOpenFrames() > 40) ClearActorFlags(GetParam(0), 8); else SetTimerEx(0.50, 1, player, 0); 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() == 19) { // Remove the Force Defense icon SetInvActivated(player, 19, 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; } else if(GetSenderId() == 1035) // Thaw out { if (frozenNow) { if (!extraFreezeTime) { PlaySoundThing(thawSound, player, 1.0, -1, -1, 0x180); if(frozenEffectHandle!=-1) { freeColorEffect(frozenEffectHandle); frozenEffectHandle = -1; } ClearActorFlags(player, 0x200000); ClearActorFlags(player, 0x40000); ClearThingFlags(player, 0x14); ClearActorFlags(player, 0x40); if (meCarbonited) { DestroyThing(meCarbonited); meCarbonited = 0; } frozenNow = 0; } else { // We've been hit more than once, so we need to extend the freeze time. SetTimerEx(extraFreezeTime, 1035, player, 0); // Make an appointment for "Unthawing" extraFreezeTime = 0.0; } } Return; } else if(GetSenderId() == 1036) // I can see! { if (flashLevelR > 0.3) { // If the effect handle was freed... if(flashEffectHandle!=-1) { flashLevelR = flashLevelR - 0.3; if (flashLevelG >= 0.3) flashLevelG = flashLevelG - 0.3; else flashLevelG = 0.0; if (flashLevelB >= 0.3) flashLevelB = flashLevelB - 0.3; else flashLevelB = 0.0; freeColorEffect(flashEffectHandle); flashEffectHandle = newColorEffect(0, 0, 0, 0, 0, 0, 40*flashLevelR, 40*flashLevelG, 40*flashLevelB, 1.0); SetTimerEx(0.3, 1036, player, 0); } } else { flashLevelR = 0.0; flashLevelG = 0.0; flashLevelB = 0.0; flashNow = 0; if(flashEffectHandle!=-1) { freeColorEffect(flashEffectHandle); flashEffectHandle = -1; } } Return; } else if(GetSenderId() == 1100) { PlaySoundThing(hmmmSound, player, 1.0, -1, -1, 0x180); } else if(GetSenderId() == 1200) { if (iAlignmentPriority != -1) { aiRemoveAlignmentPriority(iAlignmentPriority); iAlignmentPriority = -1; } } else if(GetSenderId() == 102) // They (i.e. an AI thing) can see! { victim = GetParam(0); ClearActorFlags(victim, 0x800); } else if(GetSenderId() == 101) // They (i.e. an AI thing) are thawed! { victim = GetParam(0); SendMessageEx(GetInvCog(player, 68), user1, victim, 0, 0, 0); // Make actor visible ClearThingFlags(victim, 0x14); // Enable actor's AI AIClearMode(victim, 0x2000); // Destroy actor's carbonite dummy DestroyThing(GetParam(1)); } else if(GetSenderId() == 2000) // Resync player pos over the net. { victim = GetParam(0); SyncThingPos(victim); } else if(GetSenderId() == 2001) // Arm the player with their primary weapon. { SelectWeapon(player, GetParam(0)); SetCurInvWeapon(player, GetParam(0)); // if it is the saber, make sure the blade is extended if(GetParam(0) == 131) jkSetFlags(player, 0x81); } else if((GetSenderId() == 2005) || (GetSenderID() > 2100 && GetSenderID() < 2199)) // Put a thing on top of another thing. { SendTrigger(-1, 99002, GetParam(0), GetParam(1), 0, 0); } else if(GetSenderId() == 2006) // Reset Zoom Params. { SetCameraZoom(0, 1.0, 500.0); } else if(GetSenderId() == 2007) // Set a remote thing user data. { k = GetThingGUID(GetParam(0)); m = k / 0x10000; k = k & 0xFFFF; i = GetThingGUID(GetParam(1)); j = i / 0x10000; i = i & 0xFFFF; SendTrigger(-1, 99010, k, m, i, j); } Return; # ........................................................................................ preblock: // if(player != GetSenderRef()) Return; // // // Do we want to block something with the saber? // if (GetInv(player, 14) < 0.1) // { // // Don't have the mana! // ReturnEx(0); // } // else // { // ChangeInv(player, 14, 0.1); ReturnEx(-1); // } 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_m.cog user0: if (blockPOVTrack != -1) { jkStopPOVKey( player, blockPOVTrack, 0.1 ); blockPOVTrack = -1; } if (blockTrack != -1) { StopKey( player, blockTrack, 0.1 ); blockTrack = -1; } Return; # ........................................................................................ // This message is sent by both the carbonite (exp_cpel) // and flash bomb (exp_flash) explosion cogs. user1: if (GetParam(0) == 1) // Carbonite { victim = GetParam(2); AISetMode(victim, 0x2000); // Disable the actor's AI. AISetMoveThing(victim, victim); // Set the thing as it's own // destination so it stops moving. // Make victim invisible SetThingFlags(victim, 0x14); aiCarbonited = CreateThing(carboDummy, victim); AttachThingToThing(aiCarbonited, victim); SendMessageEx(GetInvCog(player, 68), user0, victim, 0, 0, 0); SetTimerEx(GetParam(1), 101, victim, aiCarbonited); // Make an appointment for "Unthawing" } else if (GetParam(0) == 2) // Flash bomb { victim = GetParam(2); SetActorFlags(victim, 0x10000000); SetTimerEx(GetParam(1), 102, victim, 0); // Make an appointment for "Unblinding" } else if (GetParam(0) == 3) // Alignment jump { aiSetDistractor(-1); if (iAlignmentPriority != -1) { aiRemoveAlignmentPriority(iAlignmentPriority); iAlignmentPriority = -1; } iAlignmentPriority = aiAddAlignmentPriority(1.0, 3); KillTimerEx(1200); SetTimerEx(4.0, 1200, 0, 0); } Return; # ........................................................................................ user5: killedByRancor=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); defenseFactor = 1.0; if(bin == 24) // Force Pull { ReturnEx(0); if(inbubble || frozenNow) Return; curWeapon = GetCurWeapon(player); // check for unpullable weapons if(curWeapon == 1) Return; if(curWeapon == jkGetMultiParam(38)) Return; if(curWeapon == jkGetMultiParam(39)) Return; // Absorb makes player immune to Pull if(IsInvActivated(player, 28)) Return; // Force Defense if(rand() < GetInv(player, 19) * 0.25) { SetInvActivated(player, 19, 1); KillTimerEx(19); SetTimerEx(0.5, 19, 0, 0); defenseFactor = 1 - GetInv(player, 19) * 0.25; PlaySoundThing(defenseSound, player, 1.0, -1, -1, 0x80); } // If the EWEB gun is up, point it at whoever's using the force on us. if (curWeapon == 10) { if (GetSourceRef()) // if there is a source thing { // Calculate which part of the player was struck. playerpos = GetThingPos(player); tempvec = GetThingPos(GetThingParent(GetSourceRef())); tempvec = VectorSub(tempvec, playerpos); tempvec = VectorNorm(tempvec); SetThingLook(player, tempvec); } } else { // Special case for the scope. Pull the rifle instead. if (curWeapon == 13) curWeapon = 3; // Create a powerup corresponding to the current weapon // but if defense worked pull a battery instead... if(defenseFactor == 1.0) PulledWeapon = CreateThingAtPos(tpl[curWeapon], GetThingSector(player), GetThingPos(player), '0 0 0'); else PulledWeapon = CreateThingAtPos(batteryTpl, GetThingSector(player), GetThingPos(player), '0 0 0'); // Make the powerup collide later SetTimerEx(0.2, 24, PulledWeapon, 0); // Duplicate for internet games if (IsMulti()) SetTimerEx(0.25, 24, PulledWeapon, 0); // Throw the powerup at the player ApplyForce(PulledWeapon, VectorScale(VectorNorm(VectorSub(GetThingPos(GetSourceRef()), GetThingPos(player))), 30)); if(defenseFactor == 1.0) { // Remove the weapon from the player ChangeInv(player, GetWeaponBin(curWeapon), -1); // Switch to fists SelectWeapon(player, 121); } ReturnEx(1); } Return; } else if (bin == 27) // Force Blinding { ReturnEx(0); if(inbubble || frozenNow) Return; // Force Defense if(GetInv(player, 19) != 0.0) { SetInvActivated(player, 19, 1); KillTimerEx(19); SetTimerEx(0.5, 19, 0, 0); PlaySoundThing(defenseSound, player, 1.0, -1, -1, 0x80); } defenseFactor = 1 - GetInv(player, 19) * 0.1; 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 * jkGetMultiParam (31) * defenseFactor, 27, player, 0); ReturnEx(1); } Return; } else if (bin == 31) // Force Grip { ReturnEx(0); if(inbubble || frozenNow) Return; // Protection makes player immune to Grip if(IsInvActivated(player, 29)) Return; // Force Defense if(rand() < GetInv(player, 19) * 0.1) { SetInvActivated(player, 19, 1); KillTimerEx(19); SetTimerEx(0.5, 19, 0, 0); Return; } griptrackID = PlayMode(player, 25); SetActorFlags(player, 0x40000); // Print("You are taking Grip damage"); jkPrintUNIString(player, 300); DamageThing(player, 2 * rank * jkGetMultiParam(32) / (1 - GetInv(player, 19) * 0.125), 0x8, GetSourceRef()); SetTimerEx(0.5, 31, player, 0); ReturnEx(1); Return; } else if (bin == 34) // Deadly Sight { ReturnEx(0); if(inbubble) Return; // Force Defense if(rand() < GetInv(player, 19) * 0.1) { SetInvActivated(player, 19, 1); KillTimerEx(19); SetTimerEx(0.5, 19, 0, 0); Return; } // Print("You are taking Deadly Sight damage"); jkPrintUNIString(player, 301); DamageThing(player, 4 * rank * jkGetMultiParam (33), 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; } else if (bin == 38) // Force Push { ReturnEx(0); if(inbubble) Return; // Absorb makes player immune to Push if(IsInvActivated(player, 28)) Return; // Force Defense if(GetInv(player, 19) != 0.0) { SetInvActivated(player, 19, 1); KillTimerEx(19); SetTimerEx(0.5, 19, 0, 0); PlaySoundThing(defenseSound, player, 1.0, -1, -1, 0x80); } defenseFactor = 1 - GetInv(player, 19) * 0.1; ApplyForce(player, VectorScale(VectorNorm(VectorSub(GetThingPos(player),GetThingPos(GetSourceRef()))), 120 * rank * defenseFactor)); ReturnEx(1); Return; } else if (bin == 39) // Chain Lightning { ReturnEx(0); if(inbubble) Return; // Print("You are taking Chain Lightning damage"); jkPrintUNIString(player, 302); // rank is actually the damage here DamageThing(player, rank, 0x8, GetSourceRef()); ReturnEx(1); Return; } else if (bin == 1035) // Carbonite Freeze { if(!IsInvActivated(player, 62)) // Don't freeze if super shield is on. if (GetCurWeapon(player) != 10) // Don't freeze if the EWEB is up. { // This is a kludge to avoid double if (!frozenNow) // traffic on the 0x10 thing flag. { // Remind me to fix it if I forget - rf. // print("Brrr..."); extraFreezeTime = 0; frozenNow = 1; PlaySoundThing(freezeSound, player, 1.0, -1, -1, 0x180); StopThing(player); SetActorFlags(player, 0x200000); // Freeze the player SetActorFlags(player, 0x40000); // Freeze the player SetActorFlags(player, 0x40); // Invisibility SetThingFlags(player, 0x14); meCarbonited = CreateThing(carboDummy, player); AttachThingToThing(meCarbonited, player); // Warn some force powers that the player is carbonited so they terminate [YB] SendMessageEx(GetInvCog(player, 31), user0, 0, 0, 0, 0); // grip SendMessageEx(GetInvCog(player, 34), user0, 0, 0, 0, 0); // deadly sight SendMessageEx(GetInvCog(player, 35), user0, 0, 0, 0, 0); // far sight frozenEffectHandle = newColorEffect(0.5, 0.5, 1.0, 0, 0, 0, 0, 0, 0, 1.0); // Resync the player pos. SetTimerEx(0.3, 2000, player, 0); // Resync the statue pos SetTimerEx(0.4, 2000, meCarbonited, 0); // Stick the two things together. SetTimerEx(0.2, 2007, meCarbonited, player); SetTimerEx(0.7, 2007, meCarbonited, player); // SetTimerEx(0.5, 2005, meCarbonited, player); // SetTimerEx(0.7, 2100, meCarbonited, player); // SetTimerEx(0.9, 2101, meCarbonited, player); // SetTimerEx(0.6, 2102, player, meCarbonited); // SetTimerEx(0.8, 2103, player, meCarbonited); // SetTimerEx(1.0, 2104, player, meCarbonited); // Rank is the length of the freeze in seconds. SetTimerEx(rank * jkGetMultiParam (34), 1035, player, 0); // Make an appointment for "Unthawing" } else { // If we are already frozen, add the new freeze time to the old. // extraFreezeTime = extraFreezeTime + rank * jkGetMultiParam (34); } } } else if (bin == 1036) // Flash blinding { // Make the player "Blink" if ((rank == -2) || (IsInvActivated(player, 23))) // Seeing makes player immune to Flash bombs { if (!flashNow) { if(flashEffectHandle!=-1) freeColorEffect(flashEffectHandle); flashEffectHandle = newColorEffect(0, 0, 0, 0, 0, 0, 255, 255, 255, 1.0); flashLevelR = 0.0; flashLevelG = 0.0; flashLevelB = 0.0; SetTimerEx(0.1, 1036, player, 0); flashNow = 1; } } else if ((rank == -1) && (!IsInvActivated(player, 23))) // Seeing makes player immune to Flash bombs { if (!flashNow) { if(flashEffectHandle!=-1) freeColorEffect(flashEffectHandle); flashEffectHandle = newColorEffect(0, 0, 0, 0, 0, 0, 0, 255, 0, 1.0); flashLevelR = 0.0; flashLevelG = 0.0; flashLevelB = 0.0; SetTimerEx(0.1, 1036, player, 0); flashNow = 1; } } else if ((flashLevelB < rank) && (!IsInvActivated(player, 23))) // Seeing makes player immune to Flash bombs { // Existing flash blindness grants // partial resistance to new effects. rank = rank - (flashLevelB / 2); if (flashLevelB >= rank) { ReturnEx(-1); return; } // Affect red, green and blue differently. flashLevelR = rank*1.4; flashLevelG = rank*1.2; flashLevelB = rank*1.0; if(flashEffectHandle!=-1) freeColorEffect(flashEffectHandle); flashEffectHandle = newColorEffect(0, 0, 0, 0, 0, 0, 40*flashLevelR, 40*flashLevelG, 40*flashLevelB, 1.0); if (!flashNow) SetTimerEx(0.3, 1036, player, 0); flashNow = 1; } } else if (bin == 1100) { if (GetInv(player, 93) < 2.0) { SetTimerEx(2.0, 1100, 0, 0); SetInv(player, 93, 5.0 + rand() * 2.0); } else { ChangeInv(player, 93, -1.0); } } 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: SetTimerEx(0.1, 2006, 0, 0); // Reset camera zoom // make the player invul for a short time SetActorFlags(player, 8); SetTimerEx(2.00, 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, bryar, and a saber. SetInv(player, 121, 1.0); SetInv(player, 122, 1.0); SetInv(player, 131, 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: // Clear all ammo SetInv(player, 11, 50.0); SetInv(player, 12, 0.0); SetInv(player, 13, 75.0); SetInv(player, 15, 0.0); SetInv(player, 90, 0.0); SetInv(player, 91, 0.0); SetInv(player, 92, 0.0); // Clear all weapons (except fists) for (i = 122; i <= 140; i = i + 1) SetInv (player, i, 0); SetInv(player, GetWeaponBin(1), 1); // 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 by default SetInv(player, 60, 100); // Now initialize the inventory for (i = 1; i <= 10; i = i + 1) { myParam = jkGetMultiParam (i*2); if(myParam != 0) SetInv(player, myParam, jkGetMultiParam(i*2+1)); } // Make these available if they were initialized to non-zero if (GetInv (player, 40) > 0) SetInvAvailable (player, 40, 1); if (GetInv (player, 41) > 0) SetInvAvailable (player, 41, 1); // Set the default running speed ftemp = jkGetMultiParam (40); if (ftemp > 0) SetThingMaxVelocity (player, ftemp); ftemp = jkGetMultiParam (41); if (ftemp > 0) SetThingMaxAngularVelocity (player, ftemp); // Initialize mana ftemp = GetInv(player, 20) * 50; if (ftemp < jkGetMultiParam(120)) ftemp = jkGetMultiParam(120); SetInv(player, 14, ftemp); // Do respawn effects dummy = CreateThingAtPos(teleport_particles, GetThingSector(player), GetThingPos(player), '0 0 0'); dummy = PlaySoundThing(teleportsnd, player, 1.0, -1, -1, 0x180); // Yes this is a hack... I don't know who/what broke it but this kludges it [YB] SetFireWait(player, -1); SetMountWait(player, 0); SetCurInvWeapon(player, 121); SelectWeapon(player, jkGetMultiParam(1)); SetCurInvWeapon(player, jkGetMultiParam(1)); SetFireWait(player, -1); SetMountWait(player, 0); // Wait half a second, then select main weapon. SetTimerEx(0.5, 2001, jkGetMultiParam(1), 0); // saber only episode... if(GetMultiModeFlags() & 0x2000) { // remove all ammo SetInv(player, 11, 0.0); SetInv(player, 12, 0.0); SetInv(player, 15, 0.0); SetInv(player, 90, 0.0); SetInv(player, 91, 0.0); SetInv(player, 92, 0.0); // remove all weapons except fists and saber for (i = 122; i <= 140; i = i + 1) { if(i != 131) SetInv(player, i, 0); } } Return; # ........................................................................................ enterbubble: inbubble = 1; totalStop = 0; call stop_powers; Return; # ........................................................................................ exitbubble: inbubble = 0; Return; # ........................................................................................ stop_powers: if(blindingEffectHandle!=-1) { freeColorEffect(blindingEffectHandle); blindingEffectHandle = -1; } ClearActorFlags(player, 0x800); KillTimerEx(27); force_blinding = 0; // Do not turn off carbonite because we entered a bubble. if (totalStop || !frozenNow) { ClearActorFlags(player, 0x200000); ClearActorFlags(player, 0x40000); ClearThingFlags(player, 0x14); ClearActorFlags(player, 0x40); if (meCarbonited) { DestroyThing(meCarbonited); meCarbonited = 0; } } if(griptrackID != -1) { StopKey(player, griptrackID, 0.1); griptrackID = -1; } Return; # ........................................................................................ trigger: // TRIGGER_CARBXPLODE if(GetSourceRef() == 99001) { carboSector = GetParam(0); carboPosition = VectorSet(GetParam(1), GetParam(2), GetParam(3)); // switch to LOCAL | NOSYNC mode to do this operation // so these 10 network messages are not sent to everyone... oldFlags = GetCogFlags(GetSelfCog()); ClearCogFlags(GetSelfCog(), 0xffffffff); SetCogFlags(GetSelfCog(), 0x240); debris = CreateThingAtPos(c0Tpl, carboSector, carboPosition, '0 0 0'); SetThingVel(debris, VectorSet(rand()-0.5, rand()-0.5, 1.2)); debris = CreateThingAtPos(c1Tpl, carboSector, carboPosition, '0 0 0'); SetThingVel(debris, VectorSet(rand()-0.5, rand()-0.5, 1.2)); debris = CreateThingAtPos(c2Tpl, carboSector, carboPosition, '0 0 0'); SetThingVel(debris, VectorSet(rand()-0.5, rand()-0.5, 1.2)); debris = CreateThingAtPos(c3Tpl, carboSector, carboPosition, '0 0 0'); SetThingVel(debris, VectorSet(rand()-0.5, rand()-0.5, 1.2)); debris = CreateThingAtPos(c4Tpl, carboSector, carboPosition, '0 0 0'); SetThingVel(debris, VectorSet(rand()-0.5, rand()-0.5, 1.2)); // switch back to old mode ClearCogFlags(GetSelfCog(), 0xffffffff); SetCogFlags(GetSelfCog(), oldFlags); } else if(GetSourceRef() == 99002) // Position one object on another { // switch to LOCAL | NOSYNC mode to do this operation // so these 10 network messages are not sent to everyone... oldFlags = GetCogFlags(GetSelfCog()); ClearCogFlags(GetSelfCog(), 0xffffffff); SetCogFlags(GetSelfCog(), 0x240); victim = GetParam(0); perp = GetParam(1); SetThingPosEx(victim, GetThingPos(perp), GetThingSector(perp)); // switch back to old mode ClearCogFlags(GetSelfCog(), 0xffffffff); SetCogFlags(GetSelfCog(), oldFlags); } else if(GetSourceRef() == 99003) // Set an object's joint angle. { // switch to LOCAL | NOSYNC mode to do this operation // so these 10 network messages are not sent to everyone... oldFlags = GetCogFlags(GetSelfCog()); ClearCogFlags(GetSelfCog(), 0xffffffff); SetCogFlags(GetSelfCog(), 0x240); SetThingJointAngle(GetParam(0), GetParam(1), GetParam(2)); // Correct some stuff. tempvec = GetThingLVec(GetParam(0)); tempvec = VectorSet(VectorX(tempvec), VectorY(tempvec), 0.0); SetThingLook(GetParam(0), tempvec); // switch back to old mode ClearCogFlags(GetSelfCog(), 0xffffffff); SetCogFlags(GetSelfCog(), oldFlags); } else if(GetSourceRef() == 99010) // Set a thing's user data. { i = GetParam(2); j = GetParam(3); i = i | (j * 0x10000); k = GetParam(0); m = GetParam(1); k = k | (m * 0x10000); SetThingUserData(GetGuidThing(k), GetGuidThing(i)+5000); } Return; #---------------------------------------------------------------------------------- pulse: ls=-1; ls=FirstThingInView(GetPrimaryFocus(0), 179,100,0xFFE); while(ls!=-1) { If(VectorDist( GetThingPos(GetPrimaryFocus(0)),GetThingPos(ls) )
# Just quickly, for Goit symbols message startup message activated thing from thing to sound swoosh end # code startup: sleep(rand()); CaptureThing(from); return; activated: if(GetSenderRef()!=from) return; TeleportThing(GetSourceRef(),to); PlaySoundLocal(swoosh); return; end
# Blinding sunlight makes it hard to aim, as does the LAG of complex archi. :p # Reading off of SM Sith Lord's AoT Flair cog as I write this. # # By Edward symbols message startup message pulse message user7 thing lighthere flex R=255 flex G=255 flex B=255 flex brightness=1 int i local thing player local flex pviewdot local int eh=-1 local int seen=0 local end # code startup: R=R*brightness; G=G*brightness; B=B*brightness; SetPulse(0.01); return; pulse: FreeColorEffect(eh); eh=-1; if(lighthere==-1) { SetPulse(0); return; } player=GetPrimaryFocus(GetCurrentCamera()); pviewdot=ThingViewDot(player,lighthere); i=FirstThingInView(player, 170, 1000, 0xFFF); while(i!=-1) { If(HasLOS(player,i) && i==lighthere && pviewdot>0) { eh=NewColorEffect(0,0,0, 0,0,0, R*pviewdot,G*pviewdot,B*pviewdot, 1); // AddDynamicAdd(player,R*pviewdot,G*pviewdot,B*pviewdot); } i=NextThingInView(); } return; user7: SetPulse(0); return; end
# Level 2, it ain't over yet. # # By Edward symbols message user0 message playeraction message pulse message timer thing escaper thing actorsit thing chair keyframe sittingky template escfire template escburnout thing cam0 thing cam1 thing cam2 thing planetcam0 thing planetcam1 thing planetcar thing atmospherecam thing actor template burning0 template burning1 thing crashlander0 thing crashlander1 thing crashlander2 thing crashcam0 thing crashcam1 thing crashcam2 thing ground thing tree keyframe crashopen sound steadyship sound outagas sound fallingship sound hothull sound crashdown sound treefallover sound hatchopen sound blip sound KY_Home sound RE_HELLO sound KY_IReadYa sound RE_Sorry sound KY_Thanks sound RE_However0 sound RE_However1 sound RE_However2 sound RE_However3 sound KY_PickMeUp sound RE_SadlyNo0 sound RE_SadlyNo1 sound RE_SadlyNo2 sound KY_Fine sound RE_Thanks sound KY_ImThere sound KY_OhSnap sound KY_ShipBusted sound KY_WalkManOk int c local flex i local int view local thing t local thing cc local flex dist=0 local int part=0 local int skipped=0 local thing player local int eh=-1 local int animID=-1 local int ch0 local int ch1 local int ch2 local material kkfagoat cog jungle end # code user0: view=GetParam(0); SetPulse(0.001); player=GetLocalPlayerThing(); SetActionCog(GetSelfCog(),0x7FFFFFFF); SetActorFlags(player,0x840000); ParseArg(chair,"move=none"); ParseArg(actorsit,"move=none"); ParseArg(cam0,"move=none"); AttachThingToThing(chair,escaper); AttachThingToThing(actorsit,chair); AttachThingToThing(cam0,escaper); MoveToFrame(escaper,1,1); PlayKey(actorsit,sittingky,1,0x0); ParseArg(crashlander1,"move=none"); ParseArg(crashlander2,"move=none"); ParseArg(crashcam0,"move=none"); AttachThingToThing(crashlander1,crashlander0); AttachThingToThing(crashlander2,crashlander1); AttachThingToThing(crashcam0,crashlander0); MoveToFrame(crashlander0,1,1); PlayKey(crashlander2,sittingky,1,0x0); MoveToFrame(crashlander0,0,100); for(i=1; i>0; i=i-0.025) { if(eh!=-1) FreeColorEffect(eh); eh=NewColorEffect(0,0,0, 0,0,0, 0,0,0, i); if(skipped==0) sleep(0.01); } part=1; MoveToFrame(escaper,0,100); animID=SlideHorizonSky(-10,0); PlaySong(4,4,0); SetMusicVol(0.5); for(i=0; i<1; i=i+0.025) { if(eh!=-1) FreeColorEffect(eh); eh=NewColorEffect(0,0,0, 0,0,0, 0,0,0, i); if(skipped==0) sleep(0.01); } if(eh!=-1) FreeColorEffect(eh); SetTimerEx(0.1,255,0,0); if(skipped==0) PlaySoundLocal(KY_Home,1,0,0x0); if(skipped==0) jkPrintUniString(-3,60000); if(skipped==0) sleep(GetSoundLen(KY_Home)); SetTimerEx(0.1,256,0,0); PlaySoundThing(blip,actorsit,1,-1,-1,0x80); If(skipped==0) sleep(0.25); if(skipped==0) PlaySoundLocal(RE_HELLO,1,0,0x0); if(skipped==0) jkPrintUniString(-3,60001); if(skipped==0) sleep(GetSoundLen(RE_HELLO)); SetTimerEx(0.1,255,0,0); if(skipped==0) PlaySoundLocal(KY_IReadYa,1,0,0x0); if(skipped==0) jkPrintUniString(-3,60002); if(skipped==0) sleep(GetSoundLen(KY_IReadYa)); SetTimerEx(0.1,256,0,0); if(skipped==0) PlaySoundLocal(RE_Sorry,1,0,0x0); if(skipped==0) jkPrintUniString(-3,60003); if(skipped==0) sleep(GetSoundLen(RE_Sorry)); SetTimerEx(0.1,255,0,0); if(skipped==0) PlaySoundLocal(KY_Thanks,1,0,0x0); if(skipped==0) jkPrintUniString(-3,60004); if(skipped==0) sleep(GetSoundLen(KY_Thanks)); SetTimerEx(0.1,256,0,0); part=2; MoveToFrame(cam2,1,5); if(skipped==0) PlaySoundLocal(RE_However0,1,0,0x0); if(skipped==0) jkPrintUniString(-3,60005); if(skipped==0) sleep(GetSoundLen(RE_However0)); if(skipped==0) PlaySoundLocal(RE_However1,1,0,0x0); if(skipped==0) jkPrintUniString(-3,60006); if(skipped==0) sleep(GetSoundLen(RE_However1)); if(skipped==0) PlaySoundLocal(RE_However2,1,0,0x0); if(skipped==0) jkPrintUniString(-3,60007); if(skipped==0) sleep(GetSoundLen(RE_However2)); part=1; MoveToFrame(cam2,0,555); if(skipped==0) PlaySoundLocal(RE_However3,1,0,0x0); if(skipped==0) jkPrintUniString(-3,60008); if(skipped==0) sleep(GetSoundLen(RE_However3)); SetTimerEx(0.1,255,0,0); if(skipped==0) PlaySoundLocal(KY_PickMeUp,1,0,0x0); if(skipped==0) jkPrintUniString(-3,60009); if(skipped==0) sleep(GetSoundLen(KY_PickMeUp)); SetTimerEx(0.1,256,0,0); part=2; MoveToFrame(cam2,1,5); if(skipped==0) PlaySoundLocal(RE_SadlyNo0,1,0,0x0); if(skipped==0) jkPrintUniString(-3,60010); if(skipped==0) sleep(GetSoundLen(RE_SadlyNo0)); if(skipped==0) PlaySoundLocal(RE_SadlyNo1,1,0,0x0); if(skipped==0) jkPrintUniString(-3,60011); if(skipped==0) sleep(GetSoundLen(RE_SadlyNo1)); if(skipped==0) PlaySoundLocal(RE_SadlyNo2,1,0,0x0); part=1; if(skipped==0) jkPrintUniString(-3,60012); if(skipped==0) sleep(GetSoundLen(RE_SadlyNo2)+1); SetTimerEx(0.1,255,0,0); if(skipped==0) PlaySoundLocal(KY_Fine,1,0,0x0); if(skipped==0) jkPrintUniString(-3,60013); if(skipped==0) sleep(GetSoundLen(KY_Fine)); SetTimerEx(0.1,256,0,0); ch0=PlaySoundThing(steadyship,escaper,0,-1,4,0x81); ChangeSoundPitch(ch0,0.1,0.1); if(skipped==0) sleep(0.1); ChangeSoundPitch(ch0,1,1); ChangeSoundVol(ch0,1,1); if(skipped==0) PlaySoundLocal(RE_Thanks,1,0,0x0); if(skipped==0) jkPrintUniString(-3,60014); if(skipped==0) sleep(GetSoundLen(RE_Thanks)); ChangeSoundVol(ch0,0.01,1); for(i=1; i>0; i=i-0.025) { if(eh!=-1) FreeColorEffect(eh); eh=NewColorEffect(0,0,0, 0,0,0, 0,0,0, i); if(skipped==0) sleep(0.01); } part=3; StopAnim(animID); ParseArg(chair,"move=none"); ParseArg(actorsit,"move=none"); ParseArg(cam0,"move=none"); AttachThingToThing(chair,escaper); AttachThingToThing(actorsit,chair); AttachThingToThing(cam0,escaper); if(view==0) MoveToFrame(escaper,1,100); ChangeSoundVol(ch0,1,1); for(i=0; i<1; i=i+0.025) { if(eh!=-1) FreeColorEffect(eh); eh=NewColorEffect(0,0,0, 0,0,0, 0,0,0, i); if(skipped==0) sleep(0.01); } if(eh!=-1) FreeColorEffect(eh); if(view==1) { MoveToFrame(escaper,1,50); if(skipped==0) WaitForStop(escaper); } part=4; MoveToFrame(escaper,2,3); MoveToFrame(planetcar,1,7.5); MoveToFrame(planetcam1,1,7.5); SetTimerEx(0.1,255,0,0); if(skipped==0) PlaySoundLocal(KY_ImThere,1,0,0x0); if(skipped==0) jkPrintUniString(-3,60015); if(skipped==0) sleep(GetSoundLen(KY_ImThere)-.5); SetTimerEx(0.1,256,0,0); ChangeSoundPitch(ch0,0.1,3); StopSound(ch0,3); if(skipped==0) ch0=PlaySoundLocal(outagas,1,0,0x0); if(skipped==0) ChangeSoundPitch(ch0,.5,1); if(skipped==0) sleep(0.25); part=4+rand()*2; if(skipped==0) ch0=PlaySoundLocal(outagas,1,0,0x0); if(skipped==0) ChangeSoundPitch(ch0,.5,1); if(skipped==0) sleep(0.25); part=4+rand()*2; if(skipped==0) ch0=PlaySoundLocal(outagas,1,0,0x0); if(skipped==0) ChangeSoundPitch(ch0,.5,1); if(skipped==0) sleep(0.3); part=4+rand()*2; if(skipped==0) ch0=PlaySoundLocal(outagas,1,0,0x0); if(skipped==0) ChangeSoundPitch(ch0,.5,1); if(skipped==0) sleep(0.4); part=4+rand()*2; if(skipped==0) ch0=PlaySoundLocal(outagas,1,0,0x0); if(skipped==0) ChangeSoundPitch(ch0,.25,1); if(skipped==0) sleep(0.5); part=4+rand()*2; if(skipped==0) ch0=PlaySoundLocal(outagas,1,0,0x0); if(skipped==0) ChangeSoundPitch(ch0,.25,1); if(skipped==0) sleep(0.75); part=6; if(skipped==0) ch0=PlaySoundLocal(outagas,1,0,0x0); if(skipped==0) ChangeSoundPitch(ch0,.25,1); if(skipped==0) sleep(1); if(skipped==0) ch0=PlaySoundLocal(outagas,1,0,0x0); if(skipped==0) ChangeSoundPitch(ch0,.1,1); if(skipped==0) sleep(1); part=5; if(skipped==0) ch0=PlaySoundLocal(outagas,1,0,0x0); if(skipped==0) ChangeSoundPitch(ch0,.05,1); if(skipped==0) sleep(.5); SetTimerEx(0.1,255,0,0); if(skipped==0) PlaySoundLocal(KY_OhSnap,1,0,0x0); if(skipped==0) jkPrintUniString(-3,60016); if(skipped==0) sleep(GetSoundLen(KY_OhSnap)+1); SetTimerEx(0.1,256,0,0); part=7; ch0=PlaySoundThing(hothull,actorsit,0,-1,-1,0x81); ch1=PlaySoundThing(hothull,planetcar,0,-1,25,0x81); ChangeSoundVol(ch0,1,1); ChangeSoundVol(ch1,1,3); if(skipped==0) sleep(3); part=8; StopSound(ch0,1); ch0=PlaySoundThing(hothull,crashlander1,1,-1,100,0x81); ch2=PlaySoundThing(fallingship,planetcar,0,-1,100,0x81); ChangeSoundPitch(ch2,0.1,0.1); MoveToFrame(planetcar,2,50); if(skipped==0) sleep(0.1); ChangeSoundVol(ch2,1,3); ChangeSoundPitch(ch2,1,10); if(skipped==0) WaitForStop(planetcar); part=9; StopSound(ch0,1); StopSound(ch1,1); StopSound(ch2,1); ch0=PlaySoundThing(fallingship,crashlander1,0.1,-1,1000,0x81); ChangeSoundPitch(ch0,0.5,0.1); if(skipped==0) sleep(0.1); ChangeSoundVol(ch0,1,.5); ChangeSoundPitch(ch0,2,10); ParseArg(crashlander1,"move=none"); ParseArg(crashlander2,"move=none"); ParseArg(crashcam0,"move=none"); AttachThingToThing(crashlander1,crashlander0); AttachThingToThing(crashlander2,crashlander1); AttachThingToThing(crashcam0,crashlander0); if(skipped==0) MoveToFrame(crashlander0,1,50); else MoveToFrame(crashlander0,1,1000); WaitForStop(crashlander0); part=10; StopSound(ch0,0.25); PlaySoundLocal(crashdown,1,0,0x0); PlaySong(0,0,0); SetMusicVol(0); if(eh!=-1) FreeColorEffect(eh); eh=NewColorEffect(0,0,0, 0,0,0, 0,0,0, 0); if(skipped==0) sleep(1); DestroyThing(crashlander2); ClearThingflags(ground,0x10); for(i=0; i<1; i=i+0.01) { if(eh!=-1) FreeColorEffect(eh); eh=NewColorEffect(0,0,0, 0,0,0, 0,0,0, i); if(skipped==0) sleep(0.01); } if(eh!=-1) FreeColorEffect(eh); PlaySoundThing(treefallover,tree,1,-1,100,0x80); MoveToFrame(tree,1,8); if(skipped==0) WaitForStop(tree); if(skipped==0) sleep(1); PlayKey(crashlander0,crashopen,1,0x4); PlaySoundThing(hatchopen,crashlander0,1,-1,-1,0x80); if(skipped==0) sleep(GetKeyLen(crashopen)); c=-1; while(c==-1) { c=FireProjectile(crashlander0,burning0,-1,-1,'-.2 0 .2','0 0 0',0,0,0,0); sleep(0.001); } TeleportThing(player,c); SetThingLook(player,'-1 0 0'); SetThingVel(player,'-1 0 1'); if(skipped==0) sleep(1); part=11; skipped=1; SetActionCog(-1,0); ClearActorFlags(player,0x840000); SetCameraFocus(0,player); SetCameraFocus(1,player); if(view!=GetCurrentCamera()) CycleCamera(); sleep(1); SetTimerEx(0.1,255,0,0); PlaySoundLocal(KY_ShipBusted,1,0,0x0); jkPrintUniString(-3,60017); sleep(GetSoundLen(KY_ShipBusted)); SetTimerEx(0.1,256,0,0); SendMessageEx(jungle,user0,0,0,0,0); sleep(0.5); SetTimerEx(0.1,255,0,0); PlaySoundLocal(KY_WalkManOk,1,0,0x0); jkPrintUniString(-3,60018); sleep(GetSoundLen(KY_WalkManOk)); SetTimerEx(0.1,256,0,0); if(view!=GetCurrentCamera()) CycleCamera(); SetGoalFlags(player,10,1); AutoSaveGame(); return; playeraction: If(GetParam(0)==2 || GetParam(0)==3) { If(skipped==0 && part>0) { print(">>>>>>>> Spin on! >>>>>>>>"); skipped=1; } ReturnEx(0); } return; pulse: If(GetCurrentCamera()==1 && part<11) { CycleCamera(); view=view+1; if(view>1) view=0; printint(view); } if(part==1) { If(view==0) SetCameraFocus(0,cam0); else SetCameraFocus(0,cam1); } else if(part==2) { If(view==0) SetCameraFocus(0,cam0); else SetCameraFocus(0,cam2); } else if(part==3) { If(view==0) SetCameraFocus(0,cam0); else SetCameraFocus(0,planetcam0); FireProjectile(escaper,escfire,-1,-1,'0 -.15 .1','0 0 0',0,0,0,0); } else if(part==4) { If(view==0) SetCameraFocus(0,cam0); else SetCameraFocus(0,planetcam1); t=-1; t=FireProjectile(planetcar,escfire,-1,-1,'0 -.15 .1','0 0 0',0,0,0,0); if(t!=-1) SetThingVel(t,'0 -10 0'); } else if(part==5) { If(view==0) SetCameraFocus(0,cam0); else SetCameraFocus(0,planetcam1); t=-1; t=FireProjectile(planetcar,escburnout,-1,-1,'0 -.15 .1','0 0 0',0,0,0,0); if(t!=-1) SetThingVel(t,'0 -10 0'); } else if(part==6) { If(view==0) SetCameraFocus(0,cam0); else SetCameraFocus(0,planetcam1); } else if(part==7) { If(view==0) { SetCameraFocus(0,cam0); t=-1; t=FireProjectile(escaper,burning0,-1,-1,VectorSet( ((rand()*2)-1)/4 ,.3,rand()/10),'0 0 0',0,0,0,0); if(t!=-1) SetThingVel(t,VectorSet( ((rand()*2)-1)/10 ,-.1, 1 )); t=-1; t=FireProjectile(escaper,burning1,-1,-1,VectorSet( ((rand()*2)-1)/4 ,.3,rand()/10),'0 0 0',0,0,0,0); if(t!=-1) SetThingVel(t,VectorSet( ((rand()*2)-1)/10 ,-.1, 1 )); SetPOVShake(VectorSet( ((rand()*2)-1)/100,((rand()*2)-1)/100,((rand()*2)-1)/100 ), VectorSet( ((rand()*2)-1),((rand()*2)-1),((rand()*2)-1) ), .1, 80.0); } else { SetCameraFocus(0,planetcam1); t=-1; t=FireProjectile(planetcar,escburnout,-1,-1,'0 -.15 .1','0 0 0',0,0,0,0); if(t!=-1) SetThingVel(t,'0 -10 0'); t=-1; t=FireProjectile(planetcar,burning0,-1,-1,VectorSet( ((rand()*2)-1)/2 ,.3,rand()/10),'0 0 0',0,0,0,0); if(t!=-1) SetThingVel(t,VectorSet( ((rand()*2)-1)/10 ,-1, ((rand()*2)-1)/10 )); t=-1; t=FireProjectile(planetcar,burning1,-1,-1,VectorSet( ((rand()*2)-1)/10 ,.3,rand()/10),'0 0 0',0,0,0,0); if(t!=-1) SetThingVel(t,VectorSet( ((rand()*2)-1)/10 ,-1, ((rand()*2)-1)/2 )); } } else if(part==8) { If(view==0) { SetCameraFocus(0,crashcam0); t=-1; t=FireProjectile(crashlander0,burning0,-1,-1,VectorSet( ((rand()*2)-1)/4 ,.3,rand()/10),'0 0 0',0,0,0,0); if(t!=-1) SetThingVel(t,VectorSet( ((rand()*2)-1)/10 ,-.1, 1 )); t=-1; t=FireProjectile(crashlander0,burning1,-1,-1,VectorSet( ((rand()*2)-1)/4 ,.3,rand()/10),'0 0 0',0,0,0,0); if(t!=-1) SetThingVel(t,VectorSet( ((rand()*2)-1)/10 ,-.1, 1 )); SetPOVShake(VectorSet( ((rand()*2)-1)/100,((rand()*2)-1)/100,((rand()*2)-1)/100 ), VectorSet( ((rand()*2)-1),((rand()*2)-1),((rand()*2)-1) ), .1, 80.0); } else { SetCameraFocus(0,atmospherecam); t=-1; t=FireProjectile(planetcar,escburnout,-1,-1,'0 -.15 .1','0 0 0',0,0,0,0); if(t!=-1) SetThingVel(t,'0 -10 0'); t=-1; t=FireProjectile(planetcar,burning0,-1,-1,VectorSet( ((rand()*2)-1)/4 ,.3,rand()/10),'0 0 0',0,0,0,0); if(t!=-1) SetThingVel(t,VectorSet( ((rand()*2)-1)/10 ,0, ((rand()*2)-1)/10 )); t=-1; t=FireProjectile(planetcar,burning1,-1,-1,VectorSet( ((rand()*2)-1)/10 ,.3,rand()/10),'0 0 0',0,0,0,0); if(t!=-1) SetThingVel(t,VectorSet( ((rand()*2)-1)/10 ,0, ((rand()*2)-1)/4 )); } ChangeSoundPitch(ch1,1+(VectorDist( GetThingPos(GetPrimaryFocus(0)),GetThingPos(planetcar) )-dist),0.1); dist=VectorDist( GetThingPos(GetPrimaryFocus(0)),GetThingPos(planetcar) ); } else if(part==9) { If(view==0) { SetCameraFocus(0,crashcam0); SetPOVShake(VectorSet( ((rand()*2)-1)/1000,((rand()*2)-1)/1000,((rand()*2)-1)/1000 ), VectorSet( ((rand()*2)-1)/10,((rand()*2)-1)/10,((rand()*2)-1)/10 ), .05, 40.0); } else SetCameraFocus(0,crashcam1); FireProjectile(crashlander0,escburnout,-1,-1,'0 -.15 .1','0 0 0',0,0,0,0); } else if(part==10) { SetCameraFocus(0,crashcam2); if(HasLOS(GetPrimaryFocus(0),crashlander0)) FireProjectile(crashlander0,escburnout,-1,-1,'0 -.15 .1','0 0 0',0,0,0,0); } else if(part==11) { if(HasLOS(GetPrimaryFocus(0),crashlander0)) FireProjectile(crashlander0,escburnout,-1,-1,'0 -.15 .1','0 0 0',0,0,0,0); } if(part<11) SetActorFlags(GetLocalPlayerThing(),0x2); return; timer: If(GetSenderID()==255) { KillTimerEx(255); SetMaterialCel(kkfagoat,rand()*14); SetTimerEx(.1,255,0,0); } else if(GetSenderID()==256) { SetMaterialCel(kkfagoat,0); KillTimerEx(255); KillTimerEx(256); } return; end
# Light Switch. But will turn off between scenes. # # By Edward symbols message startup message activated message entered surface switch thing light flex amount sector switchoff sound click end # code startup: SetThingLight(light,0,.1); SetWallCel(switch,0); return; activated: If(GetWallCel(switch)==0) { SetWallCel(switch,1); PlaySoundPos(click,GetSurfaceCenter(switch),1,-1,-1,0); PlaySoundThing(click,light,1,-1,-1,0x80); SetThingLight(light,amount,.25); } else { SetWallCel(switch,0); PlaySoundPos(click,GetSurfaceCenter(switch),1,-1,-1,0); PlaySoundThing(click,light,1,-1,-1,0x80); SetThingLight(light,0,.25); } return; entered: SetWallCel(switch,0); PlaySoundPos(click,GetSurfaceCenter(switch),1,-1,-1,0); PlaySoundThing(click,light,1,-1,-1,0x80); SetThingLight(light,0,.25); return; end
# Locked Doors. Aren't they annoying? ;) # # By Edward symbols message activated thing doorthing=-1 surface doorsurf=-1 sound knocked sound locked end # code activated: If(GetSenderRef()==doorthing) PlaySoundThing(knocked,doorthing,1,-1,-1,0); else if(GetSenderRef()==doorsurf) PlaySoundPos(knocked,GetSurfaceCenter(doorsurf),1,-1,-1,0); sleep(1); PlaySoundThing(locked,GetSourceRef(),1,-1,-1,0x80); return; end
# glittery glitter # # By Edward flags=0x240 symbols message created message pulse message touched message damaged message killed thing g local thing p local sound h=pFMarbleStn_Hit01.wav local int c=1 local end # code created: g=GetSenderRef(); CaptureThing(g); p=GetThingParent(g); SetThingPulse(g,0.1); return; pulse: g=GetSenderRef(); If(VectorDist(GetThingPos(g),GetThingPos(GetLocalPlayerThing()))<.2) { ApplyForce(g,VectorScale( VectorSub(GetThingPos(g),GetThingPos(GetLocalPlayerThing())),(0.2-VectorDist(GetThingPos(g),GetThingPos(GetLocalPlayerThing())))*10 )); } return; damaged: if(GetSenderRef()==g) { ReturnEx(0); } return; killed: If(GetSenderRef()==g) { PlaySoundPos(h,GetThingPos(g),1,-1,-1,0x0); CreateThing(GetThingTemplate(g),p); } return; end
# Maze Maker. # Gonna try for a TC of my GFA programming. # This time alot faster. # ... Actually, turned into instant. # # By Edward with the help of ZeqMacaw symbols message startup model floor model wall int start_thing=0 int end_thing local int max_X=100 int max_Y=100 flex blockheight=0.4 flex bottomZ=0 int limX local int limY local int array local int y local int col local int row local int dir local int limit local int t local template hunder0 template hunder1 template hunder2 template hunder3 template hunder4 template hunder5 template hunder6 template hunder7 template hunder8 template hunder9 template hunderA template hunderB template hunderC template hunderD template hunderE template hunderF end # code startup: sleep(1+rand()); end_thing=start_thing+(max_X*max_Y); for(array=start_thing; arraybottomZ) { SetThingPos(array,VectorSet(VectorX(GetThingPos(array)),VectorY(GetThingPos(array)),bottomZ)); } # if(GetCollideType(array)>0) # SetThingModel(array,floor); } limit=0; sleep(1+rand()); if(limit!=0) return; end_thing=start_thing+(max_X*max_Y); limX=start_thing+max_X; limY=start_thing+(max_Y*max_X); row=1; row=rand()*(max_X/2); if (row == (max_X/2)) row = 1; if (row == 0) row = 1; row=row-(row%1); // truncate row=row*2; col=1; col=rand()*(max_Y/2); if (col == (max_Y/2)) col = 1; if (col == 0) col = 1; col=col-(col%1); // truncate col=col*2; array=start_thing+((row*max_X)+col); if(array>end_thing-2) array=end_thing-2; dir=2; y=0; call create_maze; return; create_maze: while(limit<2140) { while(y<8) { if(VectorZ(GetThingPos(array))==bottomZ) { if( (dir>=0 && dir<1) && array+20) { t=-1; t=CreateThing(hunder0[rand()*15],array); # if(t!=-1) # SetPhysicsFlags(t,0x1); SetThingPos(array,VectorAdd(GetThingPos(array),VectorSet(0,0,blockheight))); if(GetCollideType(array)>0) SetThingModel(array,wall); array=array+1; SetThingPos(array,VectorAdd(GetThingPos(array),VectorSet(0,0,blockheight))); if(GetCollideType(array)>0) SetThingModel(array,wall); array=array+1; limit=limit+1; y=0; } else y=y+1; } else if( (dir>=1 && dir<2) && array-2>start_thing) { row=(array-2)/max_X; row=row-(row%1); if((VectorZ(GetThingPos(array-1))==bottomZ && VectorZ(GetThingPos(array-2))==bottomZ) && row%2==0 && row>0) { t=-1; t=CreateThing(hunder0[rand()*15],array); # if(t!=-1) # SetPhysicsFlags(t,0x1); SetThingPos(array,VectorAdd(GetThingPos(array),VectorSet(0,0,blockheight))); if(GetCollideType(array)>0) SetThingModel(array,wall); array=array-1; SetThingPos(array,VectorAdd(GetThingPos(array),VectorSet(0,0,blockheight))); if(GetCollideType(array)>0) SetThingModel(array,wall); array=array-1; limit=limit+1; y=0; } else y=y+1; } else if( (dir>=2 && dir<3) && array+(max_X*2)0) { t=-1; t=CreateThing(hunder0[rand()*15],array); # if(t!=-1) # SetPhysicsFlags(t,0x1); SetThingPos(array,VectorAdd(GetThingPos(array),VectorSet(0,0,blockheight))); y=0; if(GetCollideType(array)>0) SetThingModel(array,wall); array=array+max_X; SetThingPos(array,VectorAdd(GetThingPos(array),VectorSet(0,0,blockheight))); if(GetCollideType(array)>0) SetThingModel(array,wall); array=array+max_X; limit=limit+1; y=0; } else y=y+1; } else if( (dir>=3 && dir<=4) && array-(max_X*2)>start_thing ) { row=(array)/max_X; row=row-(row%1); if((VectorZ(GetThingPos(array-max_X))==bottomZ && VectorZ(GetThingPos(array-(max_X*2)))==bottomZ) && row>0) { t=-1; t=CreateThing(hunder0[rand()*15],array); # if(t!=-1) # SetPhysicsFlags(t,0x1); SetThingPos(array,VectorAdd(GetThingPos(array),VectorSet(0,0,blockheight))); y=0; if(GetCollideType(array)>0) SetThingModel(array,wall); array=array-max_X; SetThingPos(array,VectorAdd(GetThingPos(array),VectorSet(0,0,blockheight))); if(GetCollideType(array)>0) SetThingModel(array,wall); array=array-max_X; limit=limit+1; y=0; } else y=y+1; } } else y=y+1; dir=rand()*4; } limX=start_thing+max_X; limY=start_thing+(max_Y*max_X); row=1; row=rand()*(max_X/2); if (row == (max_X/2)) row = 1; if (row == 0) row = 1; row=row-(row%1); // truncate row=row*2; col=1; col=rand()*(max_Y/2); if (col == (max_Y/2)) col = 1; if (col == 0) col = 1; col=col-(col%1); // truncate col=col*2; array=start_thing+((row*max_X)+col); if(array>end_thing-2) array=end_thing-2; limit=limit+1; y=0; } return; end
# Crackler class cog # # By Edward symbols message created template crack=+explosion_trails local thing c local int i local vector dir local flex x local flex y local flex z local end # code created: for(i=0; i<32; i=i+1) { x=(rand()*2)-1; y=(rand()*2)-1; z=(rand()*2)-1; c=-1; c=CreateThing(crack,GetSenderRef()); if(c!=-1) { dir=VectorScale(VectorSet( x,y,z ),10); SetThingLook(c,dir); SetThingVel(c,dir); SetLifeLeft(c,1); } } return; end
# Level master COG # Generated by ZED 20080131 symbols message startup message timer int player local end code startup: SetTimer(5); return; timer: // Register COG as master COG SetMasterCOG(GetSelfCOG()); player = GetLocalPlayerThing(); // Initialise Goals SetInv(player, 99, 1000); // Give player weapons and ammo SetInv(player, 121, 1); // fists SetInv(player, 122, 1); // bryar SetInv(player, 123, 1); // strifle SetInv(player, 124, 30); // thermal SetInv(player, 126, 1); // repeater SetInv(player, 127, 1); // raildet SetInv(player, 128, 30); // sequencers SetInv(player, 129, 1); // concrifle SetInv(player, 130, 32000); // EWEB SetInv(player, 131, 1); // saber SetInv(player, 132, 1); // blastech SetInv(player, 133, 1); // scope SetInv(player, 134, 30); // flash SetInv(player, 135, 1); // crossbow SetInv(player, 137, 1); // railseek SetInv(player, 138, 30); // sequencers manual SetInv(player, 11, 500); // energy SetInv(player, 12, 500); // power SetInv(player, 13, 200); // battery SetInv(player, 15, 30); // railcharges SetInv(player, 91, 30); // seekrails SetInv(player, 92, 800); // EWEB_rounds SetInv(player, 60, 200); // Shields // Initialize weapon. SetFireWait(player, -1); SetMountWait(player, 0); SetCurInvWeapon(player, 0); SelectWeapon(player, AutoSelectWeapon(player, 1)); // Force ranking SetInv(player, 20, 8); SetInv(player, 14, 400); SetInv(player, 21, 4); // f_jump SetInv(player, 22, 4); // f_speed SetInv(player, 23, 4); // f_seeing SetInv(player, 24, 4); // f_pull SetInv(player, 25, 4); // f_heal SetInv(player, 26, 4); // f_persuade # SetInv(player, 27, 4); // f_blind # SetInv(player, 28, 4); // f_absorb # SetInv(player, 29, 4); // f_protect #SetInv(player, 30, 4); // f_throw # SetInv(player, 31, 4); // f_grip #SetInv(player, 32, 4); // f_lightning SetInv(player, 33, 4); // f_destruct SetInv(player, 34, 4); // f_deadlysight # SetInv(player, 35, 4); // f_farsight # SetInv(player, 36, 4); // f_prject SetInv(player, 37, 4); // f_saber SetInv(player, 38, 4); // f_push # SetInv(player, 39, 4); // f_chainlight SetInvAvailable(player, 21, 2); SetInvAvailable(player, 22, 2); SetInvAvailable(player, 23, 2); SetInvAvailable(player, 24, 2); SetInvAvailable(player, 25, 2); SetInvAvailable(player, 26, 2); # SetInvAvailable(player, 27, 2); # SetInvAvailable(player, 28, 2); # SetInvAvailable(player, 29, 2); #SetInvAvailable(player, 30, 2); # SetInvAvailable(player, 31, 2); #SetInvAvailable(player, 32, 2); SetInvAvailable(player, 33, 2); SetInvAvailable(player, 34, 2); # SetInvAvailable(player, 35, 2); # SetInvAvailable(player, 36, 2); SetInvAvailable(player, 37, 2); SetInvAvailable(player, 38, 2); # SetInvAvailable(player, 39, 2); jkSyncForcePowers(); Return; end
# Jedi Knight Cog Script # 00_neonsign.cog # # this cog will cycle through frames 0-(lastFrame-1), at framerate fps # if damaged, it will go to frame lastFrame and stop, create sparks and sound # # Edited by Edward for extra spiffiness. # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved symbols message startup message pulse message damaged surface sign mask=0x448 float fps=2.0 desc=speed_of_anim template sparks=+sparks desc=created_when_shot sound exp_sound desc=played_when_shot int garbage local int startframe=2 int frame=2 local int i local int j local int k local int lastframe=4 vector RGB0 vector RGB1 vector RGB2 vector RGB3 vector RGB4 vector RGB5 vector RGB6 vector RGB7 vector RGB8 vector RGB9 vector RGBA vector RGBB vector RGBC vector RGBD vector RGBE vector RGBF end code //------------------------------------------------------------------------------------------------- startup: // Start the animation looping but skipping the first 2 frames SetWallCel(sign,1); SetPulse(1/fps); return; pulse: SetWallCel(sign,frame); for(i=0; i<=GetNumSurfaceVertices(sign); i=i+1) { SetSurfaceVertexLightRGB(sign,i,RGB0[frame]); # for(j=0; j<=GetNumSectorSufaces(GetSurfaceSector(sign)); j=j+1) # { # if(j!=sign) # { # for(k=0; k<=GetNumSurfaceVertices(j); k=k+1) # { # if(VectorDist( GetSurfaceVertexPos(j,k),GetSurfaceVertexPos(sign,i) )<.001) # SetSurfaceVertexLightRGB(j,k,RGB0[frame]); # } # } # } } frame=frame+1; if(frame>lastframe) frame=2; return; //------------------------------------------------------------------------------------------------- damaged: if (GetWallCel(sign) == 0) return; SetPulse(0); if (exp_sound) PlaySoundPos(exp_sound, SurfaceCenter(sign), 1.0, -1, -1, 0); frame=0; SetWallCel(sign, 0); for(i=0; i<=GetNumSurfaceVertices(sign); i=i+1) { SetSurfaceVertexLightRGB(sign,i,RGB0[frame]); # for(j=0; j<=GetNumSectorSufaces(GetSurfaceSector(sign)); j=j+1) # { # if(j!=sign) # { # for(k=0; k<=GetNumSurfaceVertices(j); k=k+1) # { # if(VectorDist( GetSurfaceVertexPos(j,k),GetSurfaceVertexPos(sign,i) )<.001) # SetSurfaceVertexLightRGB(j,k,RGB0[frame]); # } # } # } } garbage = CreateThing(sparks, GetSourceRef()); return; end
# Nishiran Meat Eating Plant. # # By Edwaaaaarrrrrrrrgh! symbols message created message pulse message killed thing plant local thing victim local material anim=NishPlant.MAT local template death=+grenade_exp local sound chomp=digit1.wav local int attack=0 local int caught=0 local end # code created: plant=GetSenderRef(); SetThingPulse(plant,0.25); return; pulse: victim=-1; victim=FirstThingInView(GetSenderRef(),90,1,0x404); while(victim!=-1) { If(HasLOS(GetSenderRef(),victim) && (VectorDist( GetThingPos(GetSenderRef()),GetThingPos(victim) )<.3) && !(GetThingFlags(victim) & 0x10) && (victim!=GetSenderRef())) { caught=1; StopThing(GetSenderRef()); attack=attack+1; if(attack>3) { DamageThing(victim,100,0x1,GetSenderRef()); PlaySoundThing(chomp,GetSenderRef(),1,-1,-1,0x80); attack=0; } } else { if(attack>0) attack=attack-1; SetThingRotVel(GetSenderRef(),'0 0 360'); } victim=NextThingInView(); } SetMaterialCel(anim,attack); if(caught==0) { if(attack>0) attack=attack-1; SetThingRotVel(GetSenderRef(),'0 0 360'); } caught=0; return; killed: CreateThingAtPos(death,GetThingSector(GetSenderRef()),VectorAdd(GetThingPos(GetSenderRef()),'0 0 0.2'),'0 0 0'); DestroyThing(GetSenderRef()); return; end
# Plastic Pop (I Miss You mix) # Mordi # http://Remix.Kwed.Org/ # 2008 # # C64remix # # 5:29 # 7902270 bytes # 160kb/s # 44100hz (11025hz) # 12598 frames # 66 pieces symbols message user0 sound pop01=PlasticPop\PlasticMordi01.wav local sound pop02=PlasticPop\PlasticMordi02.wav local sound pop03=PlasticPop\PlasticMordi03.wav local sound pop04=PlasticPop\PlasticMordi04.wav local sound pop05=PlasticPop\PlasticMordi05.wav local sound pop06=PlasticPop\PlasticMordi06.wav local sound pop07=PlasticPop\PlasticMordi07.wav local sound pop08=PlasticPop\PlasticMordi08.wav local sound pop09=PlasticPop\PlasticMordi09.wav local sound pop10=PlasticPop\PlasticMordi10.wav local sound pop11=PlasticPop\PlasticMordi11.wav local sound pop12=PlasticPop\PlasticMordi12.wav local sound pop13=PlasticPop\PlasticMordi13.wav local sound pop14=PlasticPop\PlasticMordi14.wav local sound pop15=PlasticPop\PlasticMordi15.wav local sound pop16=PlasticPop\PlasticMordi16.wav local sound pop17=PlasticPop\PlasticMordi17.wav local sound pop18=PlasticPop\PlasticMordi18.wav local sound pop19=PlasticPop\PlasticMordi19.wav local sound pop20=PlasticPop\PlasticMordi20.wav local sound pop21=PlasticPop\PlasticMordi21.wav local sound pop22=PlasticPop\PlasticMordi22.wav local sound pop23=PlasticPop\PlasticMordi23.wav local sound pop24=PlasticPop\PlasticMordi24.wav local sound pop25=PlasticPop\PlasticMordi25.wav local sound pop26=PlasticPop\PlasticMordi26.wav local sound pop27=PlasticPop\PlasticMordi27.wav local sound pop28=PlasticPop\PlasticMordi28.wav local sound pop29=PlasticPop\PlasticMordi29.wav local sound pop30=PlasticPop\PlasticMordi30.wav local sound pop31=PlasticPop\PlasticMordi31.wav local sound pop32=PlasticPop\PlasticMordi32.wav local sound pop33=PlasticPop\PlasticMordi33.wav local sound pop34=PlasticPop\PlasticMordi34.wav local sound pop35=PlasticPop\PlasticMordi35.wav local sound pop36=PlasticPop\PlasticMordi36.wav local sound pop37=PlasticPop\PlasticMordi37.wav local sound pop38=PlasticPop\PlasticMordi38.wav local sound pop39=PlasticPop\PlasticMordi39.wav local sound pop40=PlasticPop\PlasticMordi40.wav local sound pop41=PlasticPop\PlasticMordi41.wav local sound pop42=PlasticPop\PlasticMordi42.wav local sound pop43=PlasticPop\PlasticMordi43.wav local sound pop44=PlasticPop\PlasticMordi44.wav local sound pop45=PlasticPop\PlasticMordi45.wav local sound pop46=PlasticPop\PlasticMordi46.wav local sound pop47=PlasticPop\PlasticMordi47.wav local sound pop48=PlasticPop\PlasticMordi48.wav local sound pop49=PlasticPop\PlasticMordi49.wav local sound pop50=PlasticPop\PlasticMordi50.wav local sound pop51=PlasticPop\PlasticMordi51.wav local sound pop52=PlasticPop\PlasticMordi52.wav local sound pop53=PlasticPop\PlasticMordi53.wav local sound pop54=PlasticPop\PlasticMordi54.wav local sound pop55=PlasticPop\PlasticMordi55.wav local sound pop56=PlasticPop\PlasticMordi56.wav local sound pop57=PlasticPop\PlasticMordi57.wav local sound pop58=PlasticPop\PlasticMordi58.wav local sound pop59=PlasticPop\PlasticMordi59.wav local sound pop60=PlasticPop\PlasticMordi60.wav local sound pop61=PlasticPop\PlasticMordi61.wav local sound pop62=PlasticPop\PlasticMordi62.wav local sound pop63=PlasticPop\PlasticMordi63.wav local sound pop64=PlasticPop\PlasticMordi64.wav local sound pop65=PlasticPop\PlasticMordi65.wav local sound pop66=PlasticPop\PlasticMordi66.wav local int i local end # code user0: for(i=0; i<66; i=i+1) { PlaySoundLocal(pop01[i],1,0,0x100); sleep(GetSoundLen(pop01[i])); } return; end
# Plays a sound at a location, whether it be a thing, surface, sector or vector. # Followed by some advanced and optimized features. # # Revision - 2010/06/02 # Swapped the bool of the first param. # Now also added a trigger if used in multiplayer. # # # Revision - 2010/10/05 # Now able to play from multipul locations. # Value boolean for the different locations removed. # Seperate bools added. # # Now also available is changing the way the cog/sound behaves from # another cog. # An int (a cog pointer) is available so you can link this cog to, say # an echo cog. Set trigID to a positive number if you want this cog # to send a trigger rather than a message. Otherwise, 0 to -7 as user0-7. # Trigger ID sent will be the positive number. # Params sent are audio, volume + looped, max distance, and the pitch. # The volume is combined with the looped sound flag. # If the volume value is negative, the sound is looped. # However, if both the sound and volume is -2, then there should be # silence. # The pitch is a combination of the normal pitch and the watered # factor. The watered factor is multiplied by 100 000, then added # to the normal pitch. Therefore, a little maths is needed # to retrieve them seperately. This can be done because JK # won't allow a pitch lower than 0.01 or higher than 4. # # # Send a message to user0 with the first param being 0, # third param being the fade time # and fourth param being a flag 0x1 - 0xF if you wanna silence this thing. # # 0x1 = Turn off thing sound # 0x2 = Turn off surface sound # 0x4 = Turn off sector sound # 0x8 = Turn off free/vector sound # # Send again with the fourth param being 0 to turn on the noise. # # Example: SendMessageEx(PlaySoundCog, user0, 0, 0, 0, 0xF); # # If used in Multiplayer and you wish to use triggers: # Send a trigger to the Cog using this cog as the ID with the first param as 0, # third param being the fade time # and fourth param being a flag 0x1 - 0xF if you wanna silence this thing. # Send again with the fourth param being 0 to turn on the nouse. # # Example: SendTrigger(-1,PlaySoundCog, 0, 0, 0, 0xF); # # # Send a message to user1 to change volume properties. # First Param (param0) always 0 # Second Param (param1) new volume # Third Param (param2) min distance # Fourth Param (param3) max distance # # Example: SendMessageEx(PlaySoundCog, user1, 0, 0.75, -1, 50); # # If used in Multiplayer and you wish to use triggers: # Send a trigger to the Cog using this cog as the ID with the first param as 1 # and the other params as above. # # Example: SendTrigger(-1, PlaySoundCog, 1, 0.75, -1, 50); # # # Send a message to user2 to change the sound flags, current pitch, # and water pitch factor. # First Param (param0) always 0 # Second Param (param1) sound flags # Third Param (param2) current pitch # Fourth Param (param3) water factor # # Example: SendMessageEx(PlaySoundCog, user2, 0, 0x80, 0.75, 0.5); # # If used in Multiplayer and you wish to use triggers: # Send a trigger to the Cog using this cog as the ID with the first param as 2 # and the other params as above. # # Example: SendTrigger(-1, PlaySoundCog, 2, 0x80, 0.75, 0.5); # # Note: if the flags change it will restart the sound. # # # Send a message to user3 to over time change the volume. # During this time any special volume attributes will be paused. # First Param (param0) always 0 # Second Param (param1) new volume # Third Param (param2) duration # Fourth Param (param3) unused # # Example: SendMessageEx(PlaySoundCog, user3, 0, 0.0, 2.0, -1); # # If used in Multiplayer and you wish to use trigger: # Send a trigger to the Cog using this cog as the ID with the first param as 3 # and the other params as above. # # Example: SendTrigger(-1, PlaySoundCog, 3, 0.0, 2.0, -1); # # # Send a message to user4 to over time change the pitch. # During this time, however, the special pitching like the "passing speeds" # and water factors will be paused. # First Param (param0) always 0 # Second Param (param1) new pitch # Third Param (param2) duration # Fourth Param (param3) unused # # Example: SendMessageEx(PlaySoundCog, user4, 0, 0.25, 2.0, -1); # # If used in Multiplayer and you wish to use trigger: # Send a trigger to the Cog using this cog as the ID with the first param as 4 # and the other params as above. # # Example: SendTrigger(-1, PlaySoundCog, 4, 0.0, 2.0, -1); # # If you want to keep the specialties this cog has to offer while changing something # over time, then you'll have to do it manually; # that being sending the same message/trigger to user1 with a 0.1 interval # until you've reached the value you wanted. # # Examples: # for(v=0; v<=1; v=v+0.05) # { # SendMessageEx(PlaySoundCog, user1, 0, v, -1, 25); # sleep(0.1); # } # Volume starts at 0, and increases to full over a duration of 2 seconds, # keeping the extra volume attributes, and the min/maxdist properties. # # for(v=1; v<2; v=v+0.1) # { # SendTrigger(-1, PlaySoundCog, 2, 0x1, v, 0.5); # sleep(0.1); # } # Pitch starts at 1, and increases to double the pitch over a duration of 1 second, # keeping the extra pitch attributes, the flags, and the water factor # (can also be changed for surrealism). # (and yes, the sleep Has to be 0.1) # # # Send a message to user5 with the first param being 0, # third param being a fade time from the previous sound # and the fourth param being the new sound. # # Example: SendMessageEx(PlaySoundCog, user5, 0, 0, 0, NewSound); # # If used in Multiplayer and you wish to use triggers: # Send a trigger to the Cog using this cog as the ID with the first param as 5 # third param being a fade time from the previous sound # and fourth param being the new sound. # # Example: SendTrigger(-1, PlaySoundCog, 5, 0, 0, NewSound); # # # # # By Edward flags=0x240 symbols message startup message pulse message user0 message user1 message user2 message user3 message user4 message user5 message trigger message removed message timer sound audio thing thingLocation=-1 int playFromThing=0 surface surfLocation=-1 nolink int playFromSurface=0 sector sectorLocation=-1 nolink int playFromSector=0 vector Location int playFromVector=0 flex vol=1 flex mindist=1 flex maxdist=25 int sndflags=1 int player local int ch0=-1 local int ch1=-1 local int ch2=-1 local int ch3=-1 local flex vdist=100 local flex watered=1 local flex curvol=1 local flex extrapitch=1 flex waterpitchfactor=0.5 int silence=0 local int i local int chvol=0 local int chpch=0 local flex fadetime local flex looped=0 local int echo_cog=-1 int trigID=0 end # code startup: SetPulse(0.05); if(!(sndflags & 0x1)) { ch0=1; ch1=1; ch2=1; ch3=1; } if(echo_cog!=-1) call sendecho; return; sendecho: if(sndflags%2<.5) looped=1; else looped=-1; if((silence==0) || (playFromThing==1 && thingLocation!=-1)) { // not silenced and a thing is present. if(trigID>0) SendTrigger(-1,trigID,audio,vol*looped,maxdist,extrapitch+(waterpitchfactor*100000)); else if(trigID==0) SendMessageEx(echo_cog,user0,audio,vol*looped,maxdist,extrapitch+(waterpitchfactor*100000)); else if(trigID==-1) SendMessageEx(echo_cog,user1,audio,vol*looped,maxdist,extrapitch+(waterpitchfactor*100000)); else if(trigID==-2) SendMessageEx(echo_cog,user2,audio,vol*looped,maxdist,extrapitch+(waterpitchfactor*100000)); else if(trigID==-3) SendMessageEx(echo_cog,user3,audio,vol*looped,maxdist,extrapitch+(waterpitchfactor*100000)); else if(trigID==-4) SendMessageEx(echo_cog,user4,audio,vol*looped,maxdist,extrapitch+(waterpitchfactor*100000)); else if(trigID==-5) SendMessageEx(echo_cog,user5,audio,vol*looped,maxdist,extrapitch+(waterpitchfactor*100000)); else if(trigID==-6) SendMessageEx(echo_cog,user6,audio,vol*looped,maxdist,extrapitch+(waterpitchfactor*100000)); else if(trigID==-7) SendMessageEx(echo_cog,user7,audio,vol*looped,maxdist,extrapitch+(waterpitchfactor*100000)); } else { // otherwise, no echo if(trigID>0) SendTrigger(-1,trigID,-2,-2,maxdist,extrapitch+(waterpitchfactor*100000)); else if(trigID==0) SendMessageEx(echo_cog,user0,-2,-2,maxdist,extrapitch+(waterpitchfactor*100000)); else if(trigID==-1) SendMessageEx(echo_cog,user1,-2,-2,maxdist,extrapitch+(waterpitchfactor*100000)); else if(trigID==-2) SendMessageEx(echo_cog,user2,-2,-2,maxdist,extrapitch+(waterpitchfactor*100000)); else if(trigID==-3) SendMessageEx(echo_cog,user3,-2,-2,maxdist,extrapitch+(waterpitchfactor*100000)); else if(trigID==-4) SendMessageEx(echo_cog,user4,-2,-2,maxdist,extrapitch+(waterpitchfactor*100000)); else if(trigID==-5) SendMessageEx(echo_cog,user5,-2,-2,maxdist,extrapitch+(waterpitchfactor*100000)); else if(trigID==-6) SendMessageEx(echo_cog,user6,-2,-2,maxdist,extrapitch+(waterpitchfactor*100000)); else if(trigID==-7) SendMessageEx(echo_cog,user7,-2,-2,maxdist,extrapitch+(waterpitchfactor*100000)); } return; pulse: // If we called for silence from another cog, stop sounds. if(silence & 0x1) { if(ch0!=-1) { StopSound(ch0,fadetime); ch0=-1; } } else if(silence & 0x2) { if(ch1!=-1) { StopSound(ch1,fadetime); ch1=-1; } } else if(silence & 0x4) { if(ch2!=-1) { StopSound(ch2,fadetime); ch2=-1; } } else if(silence & 0x8) { if(ch3!=-1) { StopSound(ch3,fadetime); ch3=-1; } } // Not really a player. Gets the current camera thing. player=GetPrimaryFocus(GetCurrentCamera()); if( (GetSectorFlags(GetThingSector(player)) & 0x2) && !(GetPhysicsFlags(player) & 0x100000) ) { // If the "player" is in a water sector // but not at the surface of a water sector (aka head sticks up): // pitch the sound down, and half the volume. curvol=vol/2; watered=extrapitch*waterpitchfactor; } else { // Otherwise, whatever the user added is our current pitch and volume. curvol=vol; watered=extrapitch; } if((playFromThing==1) && (thingLocation!=-1) && !(silence & 0x1)) { // Play sound from thing. if(!HasLOS(player,thingLocation)) { // If the "player" can't see the thing emmitting the sound, // (like behind a corner) // Current volume is "half". curvol=curvol/2; } if((GetSectorFlags(GetThingSector(thingLocation)) & 0x2) && (watered==1)) { // If the thing is in a water sector and the "player" isn't // pitch the sound down, and half the volume. curvol=curvol/2; watered=extrapitch*waterpitchfactor; } if(vdist>maxdist/10) { // If we are out of earshot, // stop the sound and free the channel. if(ch0!=-1) { StopSound(ch0,1); // If not looping, do not play again when in earshot. if(sndflags & 0x1) ch0=-1; else ch0=1; } } else { if(ch0==-1) ch0=PlaySoundThing(audio,thingLocation,curvol,mindist,maxdist,sndflags); if(chpch==0) { // Change the pitch according to the "speed" at which the "player" (or the thing) is traveling at. ChangeSoundPitch(ch0,watered+((vdist-VectorDist(GetThingPos(player),GetThingPos(thingLocation)))/2),0.1); } if(chvol==0) { // Also update the volume. ChangeSoundVol(ch0,curvol,0.1); } } vdist=VectorDist(GetThingPos(player),GetThingPos(thingLocation)); } if((playFromSurface==1) && (surfLocation!=-1) && !(silence & 0x2)) { if((GetSectorFlags(GetSurfaceSector(surfLocation)) & 0x2) && (watered==1)) { // If the surface is in a water sector and the "player" isn't // pitch the sound down, and half the volume. curvol=curvol/2; watered=extrapitch*waterpitchfactor; } if(vdist>maxdist/10) { // If we are out of earshot, // stop the sound and free the channel. if(ch1!=-1) { StopSound(ch1,1); // If not looping, do not play again when in earshot. if(sndflags & 0x1) ch1=-1; else ch1=1; } } else { if(ch1==-1) ch1=PlaySoundPos(audio,GetSurfaceCenter(surfLocation),vol,mindist,maxdist,sndflags); if(chpch==0) { // Change the pitch according to the "speed" at which the "player" is traveling at. ChangeSoundPitch(ch1,watered+((vdist-VectorDist(GetThingPos(player),GetSurfaceCenter(surfLocation)))/2),0.1); } if(chvol==0) { // Also update the volume. ChangeSoundVol(ch1,vol,0.1); } } vdist=VectorDist(GetThingPos(player),GetSurfaceCenter(surfLocation)); } if((playFromSector==1) && (sectorLocation!=-1) && !(silence & 0x4)) { if((GetSectorFlags(sectorLocation) & 0x2) && (watered==1)) { // If the location is a water sector and the "player" isn't in one // pitch the sound down, and half the volume. curvol=curvol/2; watered=extrapitch*waterpitchfactor; } if(vdist>maxdist/10) { // If we are out of earshot, // stop the sound and free the channel. if(ch2!=-1) { StopSound(ch2,1); // If not looping, do not play again when in earshot. if(sndflags & 0x1) ch2=-1; else ch2=1; } } else { if(ch2==-1) ch2=PlaySoundPos(audio,GetSectorCenter(sectorLocation),vol,mindist,maxdist,sndflags); if(chpch==0) { // Change the pitch according to the "speed" at which the "player" is traveling at. ChangeSoundPitch(ch2,watered+((vdist-VectorDist(GetThingPos(player),GetSectorCenter(sectorLocation)))/2),0.1); } if(chvol==0) { // Also update the volume. ChangeSoundVol(ch2,vol,0.1); } } vdist=VectorDist(GetThingPos(player),GetSectorCenter(sectorLocation)); } if((playFromVector==1) && !(silence & 0x8)) { if(vdist>maxdist/10) { // If we are out of earshot, // stop the sound and free the channel. if(ch3!=-1) { StopSound(ch3,1); // If not looping, do not play again when in earshot. if(sndflags & 0x1) ch3=-1; else ch3=1; } } else { if(ch3==-1) ch3=PlaySoundPos(audio,Location,vol,mindist,maxdist,sndflags); if(chpch==0) { // Change the pitch according to the "speed" at which the "player" is traveling at. ChangeSoundPitch(ch3,extrapitch+((vdist-VectorDist(GetThingPos(player),Location))/2),0.1); } if(chvol==0) { // Also update the volume. ChangeSoundVol(ch3,vol,0.1); } } vdist=VectorDist(GetThingPos(player),Location); } return; removed: if(GetSenderRef()==thingLocation) { if(ch0!=-1) { StopSound(ch0,1); ch0=-1; } thingLocation=-1; if(echo_cog!=-1) call sendecho; } return; user0: if(GetParam(0)==0) { // Message Recieved for silencing the sounds. // Param(2) = fadetime // Param(3) = flags 0x0 - 0xF fadetime=GetParam(2); silence=GetParam(3); if(echo_cog!=-1) call sendecho; } return; user1: if(GetParam(0)==0) { // Message Recieved for changing volume properties. // Param(1) = vol // Param(2) = mindist // Param(3) = maxdist vol=GetParam(1); mindist=GetParam(2); maxdist=GetParam(3); if(echo_cog!=-1) call sendecho; } return; user2: if(GetParam(0)==0) { // Message Recieved for changing flags and pitches. // Param(1) = sndflags // Param(2) = extrapitch // Param(3) = waterpitchfactor if(GetParam(1)!=sndflags) { // If sound flags are different, stop all sounds. for(i=0; i<4; i=i+1) { if(ch0[i]!=-1) { StopSound(ch0[i],1); ch0[i]=-1; } } } // Will start again when in ear shot. sndflags=GetParam(1); extrapitch=GetParam(2); waterpitchfactor=GetParam(3); if(echo_cog!=-1) call sendecho; } return; user3: if(GetParam(0)==0) { // Message Recieved for fading volume // Param(1) = vol // Param(2) = time chvol=1; for(i=0; i<4; i=i+1) ChangeSoundVol(ch0[i],GetParam(1),GetParam(2)); vol=GetParam(1); KillTimerEx(3); SetTimerEx(GetParam(2),3,0,0); if(echo_cog!=-1) call sendecho; } return; user4: if(GetParam(0)==0) { // Message Recieved for fading pitch // Param(1) = pitch // Param(2) = time chpch=1; for(i=0; i<4; i=i+1) ChangeSoundPitch(ch0[i],GetParam(1)*watered,GetParam(2)); extrapitch=GetParam(1); KillTimerEx(4); SetTimerEx(GetParam(2),4,0,0); if(echo_cog!=-1) call sendecho; } return; user5: if(GetParam(0)==0) { // Message Recieved for changing sound // Param(2) = fadetime // Param(3) = sound audio=GetParam(3); for(i=0; i<4; i=i+1) { // Stop all sounds. if(ch0[i]!=-1) { if(GetParam(2)>=0) StopSound(ch0[i],GetParam(2)); ch0[i]=-1; } } // Will start again when in ear shot. if(echo_cog!=-1) call sendecho; } return; trigger: if(GetSourceRef()!=GetSelfCog()) return; if(GetParam(0)==0) { // Trigger Recieved for silencing the sounds. // Param(2) = fadetime // Param(3) = flags 0x0 - 0xF fadetime=GetParam(2); silence=GetParam(3); if(echo_cog!=-1) call sendecho; } else if(GetParam(0)==1) { // Trigger Recieved for changing volume properties. // Param(1) = vol // Param(2) = mindist // Param(3) = maxdist vol=GetParam(1); mindist=GetParam(2); maxdist=GetParam(3); if(echo_cog!=-1) call sendecho; } else if(GetParam(0)==2) { // Message Recieved for changing flags and pitches. // Param(1) = sndflags // Param(2) = extrapitch // Param(3) = waterpitchfactor if(GetParam(1)!=sndflags) { // If sound flags are different, stop all sounds. for(i=0; i<4; i=i+1) { if(ch0[i]!=-1) { StopSound(ch0[i],1); ch0[i]=-1; } } } // Will start again when in ear shot. sndflags=GetParam(1); extrapitch=GetParam(2); waterpitchfactor=GetParam(3); if(echo_cog!=-1) call sendecho; } else if(GetParam(0)==3) { // Trigger Recieved for fading volume // Param(1) = vol // Param(2) = time chvol=1; for(i=0; i<4; i=i+1) ChangeSoundVol(ch0[i],GetParam(1),GetParam(2)); vol=GetParam(1); SetTimerEx(GetParam(2),3,0,0); if(echo_cog!=-1) call sendecho; } else if(GetParam(0)==4) { // Trigger Recieved for fading pitch // Param(1) = pitch // Param(2) = time chpch=1; for(i=0; i<4; i=i+1) ChangeSoundPitch(ch0[i],GetParam(1)*watered,GetParam(2)); extrapitch=GetParam(1); KillTimerEx(4); SetTimerEx(GetParam(2),4,0,0); if(echo_cog!=-1) call sendecho; } else if(GetParam(0)==5) { // Message Recieved for changing sound // Param(2) = fadetime // Param(3) = sound audio=GetParam(3); for(i=0; i<4; i=i+1) { // Stop all sounds. if(ch0[i]!=-1) { if(GetParam(2)>=0) StopSound(ch0[i],GetParam(2)); ch0[i]=-1; } } // Will start again when in ear shot. if(echo_cog!=-1) call sendecho; } return; timer: if(GetSenderID()==3) { // Return volume control to the pulse. KillTimerEx(3); chvol=0; } else if(GetSenderID()==4) { // Return pitch control to the pulse. KillTimerEx(4); chpch=0; } return; end
# Plays sound at a specific thing. # # By Edward symbols message startup message pulse message user7 thing emmitter sound audio flex volume flex mindist flex maxdist int ch=-1 local end # code startup: SetPulse(rand()/10); return; pulse: If(VectorDist( GetThingPos(GetPrimaryFocus(0)),GetThingPos(emmitter) )
# Projectiling. # # By Edward symbols message startup message pulse thing projector template projection thing p local flex rate flex life=-1 desc=leave_for_default_life_time end # code startup: SetPulse(rate); return; pulse: If(HasLOS(GetPrimaryFocus(GetCurrentCamera()),projector)) { p=-1; p=CreateThing(projection,projector); If(p!=-1) SetLifeLeft(p,life); } return; end
# Projectiling. # # By Edward symbols message startup message pulse thing projector template projection thing p local flex withinrange desc=dont_start_until_there flex rate flex life=-1 desc=leave_for_default_life_time end # code startup: SetPulse(rate); return; pulse: If(VectorDist( GetThingPos(GetPrimaryFocus(0)),GetThingPos(projector) )
# Puzzling together a safe way down. # # By Edward symbols message startup message activated message playeraction message pulse surface acthere thing angledview nolink thing arm0 nolink thing arm1 nolink thing junk0 nolink thing junk1 nolink thing junk2 nolink thing junk3 nolink thing junk4 nolink thing junk5 nolink thing junk6 nolink thing junk7 nolink sound SetOn sound SetOff sound move sound ClampOn sound LetGo int ch0 local int ch1 local int ON=0 local int hasjunk=0 local int turned=0 local int i local int curjunk=-1 local flex vdist local flex startHealth=0.0 local vector startPosition local thing player local thing t local end # code startup: player=GetLocalPlayerThing(); return; activated: If(GetSenderRef()!=acthere) return; if(GetCurWeapon(player) == 13) Return; if(ON==0) { SetActorFlags(player,0x80800000); StopThing(player); SetActionCog(GetSelfCog(),0x7FFFFFFF); If(GetCurrentCamera()==1) CycleCamera(); SetPulse(0.01); ch0=PlaySoundThing(move,arm0,0,50,100,0x81); PlaySoundLocal(SetOn,1,0,0); startHealth = GetThingHealth(player); startPosition = GetThingPos(player); ON=1; } else { SetPulse(0); PlaySoundLocal(SetOff,1,0,0); StopSound(ch0,1); SetCameraFocus(0,player); SetActionCog(-1, 0); ClearActorFlags(player, 0x80800000); SetCollideType(arm0,3); SetCollideType(arm1,3); ON=0; } return; playeraction: If(GetParam(0)==2) // Activated { SetPulse(0); PlaySoundLocal(SetOff,1,0,0); StopSound(ch0,1); SetCameraFocus(0,player); SetActionCog(-1, 0); ClearActorFlags(player, 0x80800000); SetCollideType(arm0,3); SetCollideType(arm1,3); ON=0; ReturnEx(0); } else if(GetParam(0)==3) // Fire { // Take item if in range, or drop if holding. if(hasjunk==0) { vdist=1; curjunk=-1; for(i=0; i<8; i=i+1) { if(VectorDist(GetThingPos(junk0[i]),GetThingPos(arm1)).75) { hasjunk=1; PlaySoundThing(ClampOn,arm1,1,50,100,0x80); } else { PlaySoundThing(LetGo,arm1,1,50,100,0x80); } } else { PlaySoundThing(LetGo,arm1,1,50,100,0x80); } } else { hasjunk=0; PlaySoundThing(LetGo,arm1,1,50,100,0x80); SetPhysicsFlags(junk0[curjunk],0x1); } ReturnEx(0); } else if(GetParam(0)==4) // Strafe { if(GetParam(2)<0) { // Move arm1 Left if(VectorZ(GetThingPos(arm1))>27.8) { if(VectorY(GetThingPos(arm1))<31.3) ApplyForce(arm1,'0 1 0'); } else { if(VectorY(GetThingPos(arm1))<30.7) ApplyForce(arm1,'0 1 0'); } ReturnEx(0); } else if(GetParam(2)>0) { // Move arm1 Right if(VectorY(GetThingPos(arm1))>29.5) ApplyForce(arm1,'0 -1 0'); ReturnEx(0); } } else if(GetParam(0)==5) // Turn { // Turn arm1 according to GetParam(2) (amount) divided by summit. turned=1; SetThingRotVel(arm1,VectorSet(0,GetParam(2),0)); ReturnEx(0); } else if(GetParam(0)==6) // Walk { If(GetParam(2)<0) { // Move arm0 towards cam if(VectorX(GetThingPos(arm0))>-191.3) { ApplyForce(arm0,'-1 0 0'); ApplyForce(arm1,'-1 0 0'); } ReturnEx(0); } else if(GetParam(2)>0) { // Move arm0 towards player if(VectorX(GetThingPos(arm0))<-188.9) { ApplyForce(arm0,'1 0 0'); ApplyForce(arm1,'1 0 0'); } ReturnEx(0); } } else if(GetParam(0)==8) // PgUp/Dn { If(GetParam(1)<0) { // Move arm1 down if(VectorY(GetThingPos(arm1))<30.8) { if(VectorZ(GetThingPos(arm1))>25.6) ApplyForce(arm1,'0 0 -1'); } ReturnEx(0); } else if(GetParam(1)>0) { // Move arm1 up if(VectorZ(GetThingPos(arm1))<27.9) ApplyForce(arm1,'0 0 1'); ReturnEx(0); } } else if(GetParam(0)==14) // Others { If(GetParam(2)==0) // External View { SetPulse(0); PlaySoundLocal(SetOff,1,0,0); StopSound(ch0,1); SetCameraFocus(0,player); SetActionCog(-1, 0); ClearActorFlags(player, 0x80800000); SetCollideType(arm0,3); SetCollideType(arm1,3); ON=0; ReturnEx(0); } else { ReturnEx(1); } } else { ReturnEx(0); } return; pulse: SetCameraFocus(0,angledview); ChangeSoundVol(ch0,(VectorLen(GetThingVel(arm0))+VectorLen(GetThingVel(arm1))),0.1); ChangeSoundPitch(ch0,(VectorLen(GetThingVel(arm0))+VectorLen(GetThingVel(arm1)))/2.5,0.1); ParseArg(arm0,"move=physics mass=1 staticdrag=1 airdrag=10 surfdrag=0"); ParseArg(arm1,"move=physics mass=1 staticdrag=1 airdrag=10 surfdrag=0"); SetCollideType(arm0,0); SetCollideType(arm1,0); if(turned==1) { StopThing(arm1); turned=0; } if(hasjunk==1) { ClearPhysicsFlags(junk0[curjunk],0x1); t=-1; t=FireProjectile(arm1,GetThingTemplate(junk0),-1,-1,'0 0 -.6','0 0 0',0,0,0,0); If(t!=-1) { TeleportThing(junk0[curjunk],t); DestroyThing(t); } } return; end
# Quick Calling of another cog. # # By Edward symbols message activated surface hidden cog callthis flex param0 flex param1 flex param2 flex param3 end # code activated: SendMessageEx(callthis,user0,param0,param1,param2,param3); return; end
# Random Rotations. For that variety in forests that I can't be bothered with. # # By Edward symbols message startup template rotatewhat thing w local end # code startup: sleep(rand()); for(w=0; w
# Recreate some actors so that their AIs can get a lock. # # By Edward symbols message entered sector righthere template actors thing point00=-1 thing point01=-1 thing point02=-1 thing point03=-1 thing point04=-1 thing point05=-1 thing point06=-1 thing point07=-1 thing point08=-1 thing point09=-1 thing point0A=-1 thing point0B=-1 thing point0C=-1 thing point0D=-1 thing point0E=-1 thing point0F=-1 thing point10=-1 thing point11=-1 thing point12=-1 thing point13=-1 thing point14=-1 thing point15=-1 thing point16=-1 thing point17=-1 thing point18=-1 thing point19=-1 thing point1A=-1 thing point1B=-1 thing point1C=-1 thing point1D=-1 thing point1E=-1 thing point1F=-1 int c local int d=0 local end # code entered: if(d!=0) return; for(d=0; d<32; d=d+1) { if(point00[d]!=-1) { c=-1; while(c==-1) { c=CreateThing(actors,point00[d]); sleep(0.001); } DestroyThing(point00[d]); } } return; end
# Rotating door. Well, actually, swing... # # By Edward symbols message activated thing door mask=-1 thing hinge flex duration flex wait int busy=0 local end # code activated: if(GetSenderRef()!=door) return; If(busy!=0) return; busy=1; ParseArg(door,"move=none"); AttachThingToThing(door,hinge); RotatePivot(hinge,0,duration); waitforstop(hinge); sleep(wait); ParseArg(door,"move=none"); AttachThingToThing(door,hinge); RotatePivot(hinge,0,-duration); waitforstop(hinge); busy=0; return; end
# Rotating platform # # By Edward symbols message startup message pulse thing rotating flex time end # code startup: SetPulse(time-.01); return; pulse: RotatePivot(rotating,0,time); return; end
# Half-Life in JK? WHAT'S GOING ON!? # # By Edward symbols message startup message entered message pulse thing maintrain linkid=5 thing hulltrain linkid=5 thing newtrain nolink thing newhull nolink thing upgear linkid=7 thing temp=-1 local sound train_use sound train_start sound train_move sound train_stop sound lift_start sound lift_move sound lift_stop int ch=-1 local int done=0 local surface secretfloor nolink end # code startup: sleep(1); CaptureThing(maintrain); CaptureThing(hulltrain); CaptureThing(upgear); return; entered: if((GetSenderRef()==maintrain || GetSenderRef()==hulltrain) && done==0) { done=1; sleep(0.5); PlaySoundThing(train_use,maintrain,1,-1,-1,0x4); sleep(0.5); PlaySoundThing(train_start,maintrain,1,-1,-1,0x4); ch=PlaySoundThing(train_move,maintrain,1,-1,-1,0x85); AttachThingToThing(maintrain,hulltrain); SetPulse(0.001); for(i=0.25; i<3; i=i+0.25) { StopThing(hulltrain); MoveToFrame(hulltrain,13,i); sleep(0.1); } WaitForStop(hulltrain); MoveToFrame(hulltrain,14,5); SetPulse(0); ThingLight(maintrain,0,5); WaitForStop(hulltrain); sleep(5); PlaySoundThing(train_stop,maintrain,1,-1,-1,0x4); ChangeSoundPitch(ch,0.5,1); StopSound(ch,1); sleep(2); ThingLight(newtrain,0,0); SetThingLook(newhull,GetThingLVec(GetLocalPlayerThing())); StopThing(GetLocalPlayerThing()); TeleportThing(GetLocalPlayerThing(),newhull); DetachThing(GetLocalPlayerThing()); SetThingVel(GetLocalPlayerThing(),'0 0 1'); SetThingLook(newtrain,'-1 0 0'); SetThingLook(newhull,'-1 0 0'); SetInv(GetLocalPlayerThing(), 124, 30); // thermal SetInv(GetLocalPlayerThing(), 128, 30); // sequencers SetInv(GetLocalPlayerThing(), 134, 30); // flash SetInv(GetLocalPlayerThing(), 138, 30); // sequencers manual SetInv(GetLocalPlayerThing(), 11, 500); // energy SetInv(GetLocalPlayerThing(), 12, 500); // power SetInv(GetLocalPlayerThing(), 13, 200); // battery SetInv(GetLocalPlayerThing(), 15, 30); // railcharges SetInv(GetLocalPlayerThing(), 90, 20); // carbonpellets SetInv(GetLocalPlayerThing(), 91, 30); // seekrails SetInv(GetLocalPlayerThing(), 92, 800); // EWEB_rounds SetInv(GetLocalPlayerThing(), 60, 200); // Shields HealThing(GetLocalPlayerThing(),999); PlaySoundThing(train_door,newtrain,1,-1,-1,0x0); PlaySoundLocal(lift_start,1,0,0x0); ch=PlaySoundLocal(lift_move,1,0,0x1); AttachThingToThing(newtrain,upgear); AttachThingToThing(newhull,upgear); MoveToFrame(upgear,1,1); ChangeSoundVol(ch,0.25,30); SetFaceGeoMode(secretfloor,0); SetAdjoinFlags(secretfloor,0x2); sleep(10); ThingLight(newtrain,10,20); WaitForStop(upgear); ChangeSoundPitch(ch,0.5,1); StopSound(ch,1); PlaySoundThing(lift_stop,upgear,0.25,-1,-1,0x0); ThingLight(newtrain,0,0); ClearThingFlags(newtrain,0x1); } return; pulse: if(temp!=-1) DestroyThing(temp); temp=-1; temp=CreateThingAtPos(GetThingTemplate(maintrain),GetThingSector(GetLocalPlayerThing()),GetThingPos(maintrain),'0 0 0'); if(temp!=-1) { SetLifeLeft(temp,0.25); SetThingLook(temp,GetThingLVec(maintrain)); AttachThingToThing(temp,maintrain); } return; end
# Ok, so this is very lazy... # Enter sector, set goal flags... # # By Edward symbols message entered sector here int goal_num int goal_flag end # code entered: SetGoalFlags(player,goal_num,goal_flag); return; end
# Sedate the Jedi! # # By Edward symbols message startup message entered message pulse message timer message damaged message touched thing stormy00=-1 mask=0x448,linkid=10 thing stormy01=-1 mask=0x448,linkid=10 thing stormy02=-1 mask=0x448,linkid=10 thing stormy03=-1 mask=0x448,linkid=10 thing stormy04=-1 mask=0x448,linkid=10 thing stormy05=-1 mask=0x448,linkid=10 thing stormy06=-1 mask=0x448,linkid=10 thing stormy07=-1 mask=0x448,linkid=10 thing stormy08=-1 mask=0x448,linkid=10 thing stormy09=-1 mask=0x448,linkid=10 thing stormy10=-1 mask=0x448,linkid=10 thing stormy11=-1 mask=0x448,linkid=10 thing stormy12=-1 mask=0x448,linkid=10 thing stormy13=-1 mask=0x448,linkid=10 thing stormy14=-1 mask=0x448,linkid=10 thing stormy15=-1 mask=0x448,linkid=10 thing stormy16=-1 mask=0x448,linkid=10 thing stormy17=-1 mask=0x448,linkid=10 thing stormy18=-1 mask=0x448,linkid=10 thing stormy19=-1 mask=0x448,linkid=10 thing stormy20=-1 mask=0x448,linkid=10 thing stormy21=-1 mask=0x448,linkid=10 thing stormy22=-1 mask=0x448,linkid=10 thing stormy23=-1 mask=0x448,linkid=10 thing stormy24=-1 mask=0x448,linkid=10 thing stormy25=-1 mask=0x448,linkid=10 thing stormy26=-1 mask=0x448,linkid=10 thing stormy27=-1 mask=0x448,linkid=10 thing stormy28=-1 mask=0x448,linkid=10 thing stormy29=-1 mask=0x448,linkid=10 thing stormy30=-1 mask=0x448,linkid=10 thing stormy31=-1 mask=0x448,linkid=10 sector area ai roamer thing player local thing hidden thing actor int i local int j local int attack=0 local sound halt sound dart sound collapse cog nextlevel material kkfagoat end # code startup: sleep(2); for(i=0; i<32; i=i+1) { if(stormy00[i]!=-1) AISetClass(stormy00[i],roamer); } player=GetLocalPlayerThing(); return; entered: if(GetSenderRef()!=area) return; if(attack!=0) return; SetPulse(0.1); return; pulse: for(i=0; i<32; i=i+1) { if(attack==0) { if(stormy00[i]!=-1) { If(IsAITargetInSight(stormy00[i]) && !(GetThingFlags(player) & 0x10) && !(GetActorFlags(player) & 0x80)) { attack=1; SetTimerEx(0.1,4,0,0); SetTimerEx(2,5,0,0); PlaySoundThing(halt,stormy00[i],1,-1,1000,0x80); } } } else if(attack==2) { ApplyForce(actor,VectorSet( (rand()*2)-1,(rand()*2)-1,(rand()*2)-1 )); AISetLookPos(actor,VectorSet( (rand()*200)-100,(rand()*200)-100,(rand()*200)-100 )); } } return; touched: damaged: If(GetSenderID()==10) { if(attack!=0) return; attack=1; SetTimerEx(2,5,0,0); PlaySoundThing(halt,GetSenderRef(),1,-1,1000,0x80); } return; timer: if(GetSenderID()==4) { for(j=0; j<32; j=j+1) { if(stormy00[i]!=-1) AISetLookPos(stormy00[i],GetThingPos(player)); if(stormy00[j]!=-1) AISetMoveThing(stormy00[j],player); } } else If(GetSenderID()==5) { KillTimerEx(5); j=rand()*32; # for(j=0; j<32; j=j+1) # { # if(stormy00[j]!=-1) { # If(HasLOS(stormy00[j],player) && !(GetThingFlags(player) & 0x10)) # SetTimerEx(.25,6,stormy00[j],0); # else # SetTimerEx(.25,5,0,0); } # } # } # else if(GetSenderID()==6) # { KillTimerEx(5); KillTimerEx(6); if(GetThingHealth(player)<=0) return; PlaySoundThing(dart,stormy00[j],1,-1,1000,0x80); DamageThing(player,1,0x1,stormy00[j]); SetTimerEx(1,7,0,0); } else If(GetSenderID()==7) { KillTimerEx(5); KillTimerEx(6); KillTimerEx(7); attack=2; if(GetThingHealth(player)<=0) return; jkPrintUniString(-3,30000); SetActorFlags(player,0x40008); StopThing(actor); StopThing(player); TeleportThing(actor,player); TeleportThing(player,hidden); SetCameraFocus(0,actor); SetCameraFocus(1,actor); for(j=21; j<40; j=j+1) { if(IsInvActivated(player,j)) { SendMessage(GetInvCog(player,j),timer); } } for(j=0; j<=GetNumSectorSurfaces(GetThingSector(player)); j=j+1) { SetFaceType(GetSectorSurfaceRef(GetThingSector(player),j),0x2); } SelectWeapon(player,1); for(j=0; j<32; j=j+1) { if(stormy00[j]!=-1) AISetMode(stormy00[j],0x2000); } SetTimerEx(1,8,0,0); } else if(GetSenderID()==8) { SetMaterialCel(kkfagoat,1); KillTimerEx(5); KillTimerEx(6); KillTimerEx(7); KillTimerEx(8); SetPulse(0); ClearActorFlags(player,0x40000); SetActorFlags(player,0x840000); PlaySoundLocal(collapse,1,0,0x0); for(j=0; j<=GetNumSectorSurfaces(GetThingSector(hidden)); j=j+1) { SetFaceGeoMode(GetSectorSurfaceRef(GetThingSector(hidden),j),0); } SetCameraFocus(0,hidden); for(j=0; j<=GetNumSectorSurfaces(GetThingSector(player)); j=j+1) { ClearFaceType(GetSectorSurfaceRef(GetThingSector(player),j),0x2); } SendMessage(nextlevel,user0); } return; end
# Activate something and view is set. # External View for Reset. # # By Edward symbols message activated message pulse surface hidden thing newcam end # code activated: SetActorFlags(GetLocalPlayerThing(),0x800000); SetCameraFocus(0,newcam); if(GetCurrentCamera()==1) CycleCamera(); SetPulse(0.1); return; pulse: If(GetCurrentCamera()==1) { SetCameraFocus(0,GetLocalPlayerThing()); ClearActorFlags(GetLocalPlayerThing(),0x800000); SetPulse(0); } return; end
# Ships leave when you enter. # # By Edward symbols message entered message timer thing ship0 keyframe fly0 sound aud0 thing ship1 keyframe fly1 sound aud1 thing ship2 sound aud2 vector pos20 vector pos21 sector area sound KY_lines0 sound KY_lines1 sound KY_lines2 int done=0 local int i local int ch local thing player local material kkfagoat end # code entered: If(GetSenderRef()!=area) return; if(done==1) return; player=GetLocalPlayerThing(); done=1; SetGoalFlags(player, 0, 2); SetGoalFlags(player, 1, 1); SetTimerEx(.01,255,0,0); SetTimerEx(GetSoundLen(KY_lines0),256,0,0); PlaySoundLocal(KY_lines0,1,0,0x0); jkPrintUniString(-3, 30001); sleep(3); ch=PlaySoundThing(aud0,ship0,1,-1,500,0x80); changeSoundPitch(ch,.55,.1); PlayKey(ship0,fly0,1,0x4); SetTimerEx(5,10,0,0); SetTimerEx(5,255,0,0); sleep(GetKeyLen(fly0)); DestroyThing(ship0); sleep(5+rand()*3); PlaySoundThing(aud1,ship1,1,-1,500,0x80); PlayKey(ship1,fly1,1,0x4); sleep(GetKeyLen(fly1)); DestroyThing(ship1); sleep(5+rand()*3); ch=PlaySoundThing(aud2,ship2,1,-1,500,0x80); changeSoundPitch(ch,.5,.1); while( VectorDist(GetThingPos(ship2),pos20).1 ) { MoveToFrame(ship2,1,(VectorDist(GetThingPos(ship2),pos21))*10); sleep(0.01); } WaitForStop(ship2); for(i=1; i<50; i=i+1) { MoveToFrame(ship2,2,i); sleep(0.01); } return; timer: if(GetSenderID()==10) { if((GetActorFlags(player) & 800000) || (GetActorFlags(player) & 40000)) return; PlaySoundLocal(KY_lines1,1,0,0x0); jkPrintUniString(-3, 30002); SetTimerEx(GetSoundLen(KY_lines1),256,0,0); SetTimerEx(GetSoundLen(KY_lines1)+1,11,0,0); SetTimerEx(GetSoundLen(KY_lines1)+1,255,0,0); } else if(GetSenderID()==11) { if((GetActorFlags(player) & 800000) || (GetActorFlags(player) & 40000)) return; PlaySoundLocal(KY_lines2,1,0,0x0); jkPrintUniString(-3, 30003); SetTimerEx(GetSoundLen(KY_lines2),256,0,0); } else If(GetSenderID()==255) { KillTimerEx(255); SetMaterialCel(kkfagoat,rand()*14); SetTimerEx(.1,255,0,0); } else if(GetSenderID()==256) { SetMaterialCel(kkfagoat,0); KillTimerEx(255); KillTimerEx(256); } return; end
# Smooth Moving Door! :D # # By Edward symbols message startup message activated thing door mask=-1 vector opened local vector closed local sound startmove sound moving sound endmove flex wait int busy local flex i local int ch local flex tdist local flex timing local end # code startup: sleep(.25+rand()); busy=1; MoveToFrame(door,1,100); WaitForStop(door); opened=GetThingPos(door); MoveToFrame(door,0,100); WaitForStop(door); closed=GetThingPos(door); tdist=VectorDist(opened,closed); busy=0; CaptureThing(door); return; activated: if(GetSenderRef()!=door) return; if(busy==1) return; busy=1; timing=GetFlexGameTime(); sleep(0.01); timing=GetFlexGameTime()-timing; PlaySoundThing(startmove,door,1,-1,-1,0x80); ch=PlaySoundThing(moving,door,0,-1,-1,0x81); for(i=0.1*tdist; i0.1*tdist; i=VectorDist(GetThingPos(door),opened) ) { ParseArg(door,"soundclass=none"); MoveToFrame(door,1,i*10); ChangeSoundPitch(ch,i/(tdist/2),0.1); sleep(0.01); } WaitForStop(door); StopSound(ch,1); PlaySoundThing(endmove,door,1,-1,-1,0x80); sleep(wait); timing=GetFlexGameTime(); sleep(0.01); timing=GetFlexGameTime()-timing; PlaySoundThing(startmove,door,1,-1,-1,0x80); ch=PlaySoundThing(moving,door,0,-1,-1,0x81); for(i=0.1*tdist; i0.1*tdist; i=VectorDist(GetThingPos(door),closed) ) { ParseArg(door,"soundclass=none"); MoveToFrame(door,0,i*10); ChangeSoundPitch(ch,i/(tdist/2),0.1); sleep(0.01); } WaitForStop(door); StopSound(ch,1); PlaySoundThing(endmove,door,1,-1,-1,0x80); busy=0; return; end
# Smooth Moving Door! :D # # By Edward symbols message startup message activated message user0 thing door mask=-1 surface switch0 mask=-1 surface switch1 mask=-1 vector opened local vector closed local sound startmove sound moving sound endmove sound switchit int busy local flex i local int ch local flex tdist local flex timing local end # code startup: sleep(.25+rand()); busy=2; MoveToFrame(door,1,100); WaitForStop(door); opened=GetThingPos(door); MoveToFrame(door,0,100); WaitForStop(door); closed=GetThingPos(door); tdist=VectorDist(opened,closed); busy=0; CaptureThing(door); SetWallCel(switch0,0); SetWallCel(switch1,0); return; activated: if(GetSenderRef()==door) { PlaySoundThing(endmove,door,1,-1,-1,0x80); return; } else if(GetSenderRef()==switch0 || GetSenderRef()==switch1) { if(busy==0) { SetWallCel(switch0,1); SetWallCel(switch1,1); busy=2; timing=GetFlexGameTime(); sleep(0.01); timing=GetFlexGameTime()-timing; PlaySoundThing(startmove,door,1,-1,-1,0x80); ch=PlaySoundThing(moving,door,0,-1,-1,0x81); for(i=0.1*tdist; i0.1*tdist; i=VectorDist(GetThingPos(door),opened) ) { ParseArg(door,"soundclass=none"); MoveToFrame(door,1,i*10); ChangeSoundPitch(ch,i/(tdist/2),0.1); sleep(0.01); } WaitForStop(door); StopSound(ch,1); PlaySoundThing(endmove,door,1,-1,-1,0x80); busy=1; } else if(busy==1) { SetWallCel(switch0,0); SetWallCel(switch1,0); busy=2; timing=GetFlexGameTime(); sleep(0.01); timing=GetFlexGameTime()-timing; PlaySoundThing(startmove,door,1,-1,-1,0x80); ch=PlaySoundThing(moving,door,0,-1,-1,0x81); for(i=0.1*tdist; i0.1*tdist; i=VectorDist(GetThingPos(door),closed) ) { ParseArg(door,"soundclass=none"); MoveToFrame(door,0,i*10); ChangeSoundPitch(ch,i/(tdist/2),0.1); sleep(0.01); } WaitForStop(door); StopSound(ch,1); PlaySoundThing(endmove,door,1,-1,-1,0x80); busy=0; } } return; user0: if(GetParam(0)==1) { // Open Door if(busy==0) { SetWallCel(switch0,1); SetWallCel(switch1,1); ReturnEx(1); busy=2; timing=GetFlexGameTime(); sleep(0.01); timing=GetFlexGameTime()-timing; PlaySoundThing(startmove,door,1,-1,-1,0x80); ch=PlaySoundThing(moving,door,0,-1,-1,0x81); for(i=0.1*tdist; i0.1*tdist; i=VectorDist(GetThingPos(door),opened) ) { ParseArg(door,"soundclass=none"); MoveToFrame(door,1,i*10); ChangeSoundPitch(ch,i/(tdist/2),0.1); sleep(0.01); } WaitForStop(door); StopSound(ch,1); PlaySoundThing(endmove,door,1,-1,-1,0x80); busy=1; } else if(busy==2) { // Is Moving, please hold. ReturnEx(4); } else if(busy==1) { // Already Open. ReturnEx(8); } } else if(GetParam(0)==0) { // Close Door if(busy==1) { SetWallCel(switch0,0); SetWallCel(switch1,0); ReturnEx(1); busy=2; timing=GetFlexGameTime(); sleep(0.01); timing=GetFlexGameTime()-timing; PlaySoundThing(startmove,door,1,-1,-1,0x80); ch=PlaySoundThing(moving,door,0,-1,-1,0x81); for(i=0.1*tdist; i0.1*tdist; i=VectorDist(GetThingPos(door),closed) ) { ParseArg(door,"soundclass=none"); MoveToFrame(door,0,i*10); ChangeSoundPitch(ch,i/(tdist/2),0.1); sleep(0.01); } WaitForStop(door); StopSound(ch,1); PlaySoundThing(endmove,door,1,-1,-1,0x80); busy=0; } else if(busy==2) { // Is Moving, Please Hold. ReturnEx(4); } else if(busy==0) { // Already Closed. ReturnEx(8); } } return; end
# Smooth Elevator # # By Edward symbols message startup message activated thing elev surface goto0 surface goto1 surface call0 surface call1 thing gt0 thing gt1 thing cl0 thing cl1 int busy=1 local vector frame0 local vector frame1 local sound startmove sound moving sound endmove sound switch int ch local flex timing local end # code startup: sleep(rand()); MoveToFrame(elev,1,1000); WaitForStop(elev); frame1=GetThingPos(elev); MoveToFrame(elev,0,1000); WaitForStop(elev); frame0=GetThingPos(elev); SetWallCel(goto0,1); SetWallCel(goto1,0); SetWallCel(call0,1); SetWallCel(call1,0); busy=0; CaptureThing(elev); CaptureThing(cl0); CaptureThing(cl1); CaptureThing(gt0); CaptureThing(gt1); return; activated: if(busy==1) return; busy=1; timing=GetFlexGameTime(); sleep(0.01); timing=GetFlexGameTime()-timing; PlaySoundThing(startmove,elev,1,-1,-1,0x80); ch=PlaySoundThing(moving,elev,0,-1,-1,0x81); PlaySoundPos(switch,GetSurfaceCenter(goto0),1,-1,-1,0); PlaySoundPos(switch,GetSurfaceCenter(goto1),1,-1,-1,0); PlaySoundPos(switch,GetSurfaceCenter(call0),1,-1,-1,0); PlaySoundPos(switch,GetSurfaceCenter(call1),1,-1,-1,0); if(GetWallCel(goto0)==1) { SetWallCel(goto0,1); SetWallCel(goto1,1); SetWallCel(call0,1); SetWallCel(call1,1); while( VectorDist(GetThingPos(elev),frame0).1 ) { ParseArg(elev,"soundclass=none"); MoveToFrame(elev,1,(VectorDist(GetThingPos(elev),frame1))*10); ChangeSoundPitch(ch, (VectorDist(GetThingPos(elev),frame1)/VectorDist(frame0,frame1))*2 ,0.1); sleep(0.01); } WaitForStop(elev); SetWallCel(goto0,0); SetWallCel(goto1,1); SetWallCel(call0,0); SetWallCel(call1,1); PlaySoundPos(switch,GetSurfaceCenter(goto0),1,-1,-1,0); PlaySoundPos(switch,GetSurfaceCenter(call0),1,-1,-1,0); } else if(GetWallCel(goto0)==0) { SetWallCel(goto0,1); SetWallCel(goto1,1); SetWallCel(call0,1); SetWallCel(call1,1); while( VectorDist(GetThingPos(elev),frame1).1 ) { MoveToFrame(elev,0,(VectorDist(GetThingPos(elev),frame0))*10); ChangeSoundPitch(ch, (VectorDist(GetThingPos(elev),frame0)/VectorDist(frame1,frame0))*2 ,0.1); sleep(0.01); } WaitForStop(elev); SetWallCel(goto0,1); SetWallCel(goto1,0); SetWallCel(call0,1); SetWallCel(call1,0); PlaySoundPos(switch,GetSurfaceCenter(goto1),1,-1,-1,0); PlaySoundPos(switch,GetSurfaceCenter(call1),1,-1,-1,0); } StopSound(ch,1); PlaySoundThing(endmove,elev,1,-1,-1,0x80); busy=0; return; end
# Smooth elev with more floors. # # By Edward symbols message startup message activated thing elev surface call0 linkid=30 surface call1 linkid=30 surface call2 linkid=30 surface call3 linkid=30 surface call4 linkid=30 surface call5 linkid=30 surface call6 linkid=30 surface call7 linkid=30 surface up0 linkid=10 surface up1 linkid=10 surface up2 linkid=10 surface up3 linkid=10 surface up4 linkid=10 surface up5 linkid=10 surface up6 linkid=10 surface up7 linkid=10 surface down0 linkid=20 surface down1 linkid=20 surface down2 linkid=20 surface down3 linkid=20 surface down4 linkid=20 surface down5 linkid=20 surface down6 linkid=20 surface down7 linkid=20 thing c0 linkid=30 thing c1 linkid=30 thing c2 linkid=30 thing c3 linkid=30 thing c4 linkid=30 thing c5 linkid=30 thing c6 linkid=30 thing c7 linkid=30 thing u0 linkid=10 thing u1 linkid=10 thing u2 linkid=10 thing u3 linkid=10 thing u4 linkid=10 thing u5 linkid=10 thing u6 linkid=10 thing u7 linkid=10 thing d0 linkid=20 thing d1 linkid=20 thing d2 linkid=20 thing d3 linkid=20 thing d4 linkid=20 thing d5 linkid=20 thing d6 linkid=20 thing d7 linkid=20 int numfloors=8 sound startmove sound moving sound endmove sound switch vector floor0 local vector floor1 local vector floor2 local vector floor3 local vector floor4 local vector floor5 local vector floor6 local vector floor7 local flex i local int c local int ch local int busy=0 local int start=0 flex speed=4 flex timing local end # code startup: sleep(1+rand()); busy=1; for(c=0; cspeed/10) { ParseArg(elev,"soundclass=none"); MoveToFrame(elev,start+1,speed); sleep(0.01); } while(VectorDist( GetThingPos(elev),floor0[start+1] )>0.1) { ParseArg(elev,"soundclass=none"); MoveToFrame(elev,start+1,(VectorDist( GetThingPos(elev),floor0[start+1] )+0.05)*10); ChangeSoundPitch(ch, (VectorDist( GetThingPos(elev),floor0[start+1] )*10)/speed ,0.1); sleep(0.01); } WaitForStop(elev); start=start+1; StopSound(ch,1); PlaySoundThing(endmove,elev,1,-1,-1,0x80); for(c=0; cspeed/10) { ParseArg(elev,"soundclass=none"); MoveToFrame(elev,start-1,speed); sleep(0.01); } while(VectorDist( GetThingPos(elev),floor0[start-1] )>0.1) { ParseArg(elev,"soundclass=none"); MoveToFrame(elev,start-1,(VectorDist( GetThingPos(elev),floor0[start-1] )+0.05)*10); ChangeSoundPitch(ch, (VectorDist( GetThingPos(elev),floor0[start-1] )*10)/speed ,0.1); sleep(0.01); } WaitForStop(elev); start=start-1; StopSound(ch,1); PlaySoundThing(endmove,elev,1,-1,-1,0x80); for(c=0; cspeed/10) { ParseArg(elev,"soundclass=none"); MoveToFrame(elev,c,speed); sleep(0.01); } while(VectorDist( GetThingPos(elev),floor0[c] )>0.1) { ParseArg(elev,"soundclass=none"); MoveToFrame(elev,c,(VectorDist( GetThingPos(elev),floor0[c] )+0.05)*10); ChangeSoundPitch(ch, (VectorDist( GetThingPos(elev),floor0[c] )*10)/speed ,0.1); sleep(0.01); } WaitForStop(elev); start=c; StopSound(ch,1); PlaySoundThing(endmove,elev,1,-1,-1,0x80); busy=0; } } } for(c=0; c
# Special Blinky Lights # # By Edward symbols message startup message timer surface light0 nolink surface light1 nolink surface light2 nolink surface light3 nolink surface light4 nolink surface light5 nolink surface light6 nolink surface light7 nolink surface light8 nolink surface light9 nolink surface lightA nolink surface lightB nolink surface lightC nolink surface lightD nolink surface lightE nolink surface lightF nolink int i local flex interleave flex interval end # code startup: for(i=0; i<16; i=i+1) { SetTimerEx(interval,i,0,0); sleep(interleave); } return; timer: KillTimerEx(GetSenderID()); if(GetSurfaceLight(light0[GetSenderID()])>.5) SetSurfaceLight(light0[GetSenderID()],0,interval); else SetSurfaceLight(light0[GetSenderID()],1,interval); SetTimerEx(interval,GetSenderID(),0,0); return; end
symbols message activated thing con thing des end code activated: teleportthing(getsourceref(),des); return; end
# Spawn Enemies when near, and remove when done. # # By Edward symbols message entered sector in0 linkid=10 sector in1 linkid=10 sector in2 linkid=10 sector in3 linkid=10 sector out0 linkid=20 sector out1 linkid=20 sector out2 linkid=20 sector out3 linkid=20 sector place template enemy0 template enemy1 template enemy2 template enemy3 template enemy4 template enemy5 template enemy6 template enemy7 template enemy8 template enemy9 template enemyA template enemyB template enemyC template enemyD template enemyE template enemyF thing e00=-1 local thing e01=-1 local thing e02=-1 local thing e03=-1 local thing e04=-1 local thing e05=-1 local thing e06=-1 local thing e07=-1 local thing e08=-1 local thing e09=-1 local thing e0A=-1 local thing e0B=-1 local thing e0C=-1 local thing e0D=-1 local thing e0E=-1 local thing e0F=-1 local thing e10=-1 local thing e11=-1 local thing e12=-1 local thing e13=-1 local thing e14=-1 local thing e15=-1 local thing e16=-1 local thing e17=-1 local thing e18=-1 local thing e19=-1 local thing e1A=-1 local thing e1B=-1 local thing e1C=-1 local thing e1D=-1 local thing e1E=-1 local thing e1F=-1 local int max32=32 int inside=0 local int i local end # code entered: if(GetSenderID()==10) { if(inside==1) return; for(i=0; i
# Yeah, that new dude that made this into a 2 parter. :p # # By Edward symbols message startup message activated message playeraction message timer message pulse message damaged message killed message removed thing elev thing elev_switch thing elev_light sound elev_start sound elev_move sound elev_stop sound jamelev vector lastframe #----------------------------# thing cam0 thing cam1 thing cam2 thing cam0point thing player local thing actor thing hidden thing boss mask=-1 vector playergetto vector cam0pos0 vector cam0pos1 model WeapF model WeapG model mirror keyframe seeself sound BO_Pleasure sound KY_ORU sound BO_Iam sound BO_Great0 sound BO_Great1 sound BO_Great2 sound BO_Great3 sound BO_GrandChild sound KY_MeUgly sound BO_HaHa sound BO_ButSeriously sound KY_TellStories sound BO_SureThing sound BO_Storyteller0 sound BO_Storyteller1 sound BO_Storyteller2 sound BO_Storyteller3 sound BO_Storyteller4 sound BO_Storyteller5 sound BO_Storyteller6 sound KY_ButWhy sound BO_JanSister sound KY_Explains sound KY_WaitBelieve sound BO_Audience sound audience sound KY_DIESON material kkfagoat material kyfascar #------------------------------------# thing backdoor sound backdoorrumble sound backdoorbang sound forcedoor flex i local int ch local material rside_mat material rtip_mat template tpl_wall template tpl_blood template tpl_saber int skipped=0 local int skap=0 local int view=0 local int playback=0 local int kk=-1 local int r local surface surf local flex timing local flex gtime local end # code startup: sleep(2); player=GetLocalPlayerThing(); AISetMode(boss,0x2000); CaptureThing(boss); CaptureThing(elev_switch); CaptureThing(cam0point); return; activated: If(GetSenderRef()==elev_switch) { PlaySoundThing(elev_start,elev,1,-1,-1,0x80); ch=PlaySoundThing(elev_move,elev,0,-1,-1,0x81); PlaySong(3,3,0); SetMusicVol(0.5); for(i=0; i<8; i=i+0.25) { AttachThingToThing(elev_switch,elev); AttachThingToThing(elev_light,elev); ChangeSoundVol(ch,i/8,0.1); ChangeSoundPitch(ch,i/8,0.1); MoveToFrame(elev,1,i); sleep(0.025); } SetTimerEx(3,1,0,0); timing=GetFlexGameTime()%1; gtime=GetFlexGameTime()%1; SetPulse(0.001); while(VectorDist( GetThingPos(elev),lastframe )>1) { If(skipped==1) MoveToFrame(elev,1,100); sleep(0.001); } if(skipped==0) { while(VectorDist( GetThingPos(elev),lastframe )>0.01) { i=VectorDist( GetThingPos(elev),lastframe )*10; AttachThingToThing(elev_switch,elev); AttachThingToThing(elev_light,elev); ChangeSoundPitch(ch,i/8,0.1); if(skipped==1) MoveToFrame(elev,1,i*100); else MoveToFrame(elev,1,i); sleep(0.025); } } WaitForStop(elev); StopSound(ch,1); PlaySoundThing(elev_stop,elev,1,-1,-1,0x80); playback=2; SetTimerEx(1,2,0,0); while(VectorDist(GetThingPos(actor),playergetto)>.2) { SetThingThrust(actor,'0 1 0'); AISetLookPos(actor,GetThingPos(boss)); sleep(0.1); } SetThingThrust(actor,'0 0 0'); StopThing(actor); skap=1; if(skipped==1) { TeleportThing(player,actor); TeleportThing(actor,hidden); SelectWeapon(player,11); SetTimerEx(0.1,34,0,0); } } return; playeraction: If(GetParam(0)==2 || GetParam(0)==3) { if(skipped==0 && playback>0) { print(">>>>>>>> Spin on! >>>>>>>>"); skipped=1; if(skap==1) { TeleportThing(player,actor); TeleportThing(actor,hidden); SelectWeapon(player,11); SetTimerEx(0.1,34,0,0); } } ReturnEx(0); } return; pulse: if(gtime0) { if(GetCurrentCamera()==1) { CycleCamera(); view=view+1; if(view>1) view=0; } SetActorFlags(GetLocalPlayerThing(),0x2); } If(playback==1) { SetCameraFocus(0,cam0); SetThingLook(cam0,VectorSub( GetThingPos(actor),GetThingPos(cam0) )); ApplyForce(cam0, VectorScale(VectorSub(cam0pos0,GetThingPos(cam0)),timing/10) ); AISetLookPos(actor,GetThingPos(boss)); } else if(playback==2) { SetCameraFocus(0,cam0); SetThingLook(cam0,VectorSub( GetThingPos(actor),GetThingPos(cam0) )); ApplyForce(cam0, VectorScale(VectorSub(cam0pos1,GetThingPos(cam0)),timing) ); } else if(playback==3) { SetCameraFocus(0,cam0); SetThingLook(cam0,VectorSub( GetThingPos(cam0point),GetThingPos(cam0) )); ApplyForce(cam0, VectorScale(VectorSub(cam0pos1,GetThingPos(cam0)),timing*2) ); SetCollideType(cam0point,0); ApplyForce(cam0point, VectorScale(VectorNorm(VectorSub(GetSurfaceCenter(surf),GetThingPos(cam0point))),timing*5) ); If(VectorDist( GetThingPos(cam0point),GetSurfaceCenter(surf) )<.2) playback=4; } else if(playback==4) { SetCameraFocus(0,cam0); SetThingLook(cam0,VectorSub( GetThingPos(cam0point),GetThingPos(cam0) )); ApplyForce(cam0, VectorScale(VectorSub(cam0pos1,GetThingPos(cam0)),timing*5) ); ApplyForce(cam0point, VectorScale(VectorNorm(VectorSub( VectorAdd(GetThingPos(boss),VectorScale(GetThingLVec(boss),0.2)), GetThingPos(cam0point) )),timing*5) ); If(VectorDist( GetThingPos(cam0),cam0pos1 )<.1 && VectorDist( GetThingPos(cam0point), VectorAdd(GetThingPos(boss),VectorScale(GetThingLVec(boss),0.2)) )<.01) { playback=5; SetTimerEx(0.25,10,0,0); } } else if(playback==5) { SetcameraFocus(0,cam0); } else if(playback==6) { SetCameraFocus(0,cam1); } else if(playback==7) { SetCameraFocus(0,cam2); } gtime=GetFlexGameTime()%1; return; timer: if(GetSenderID()==1) { SetActionCog(GetSelfCog(),0x7FFFFFFF); SetActorFlags(player,0x840000); playback=1; if(GetMajorMode(player)==0 || GetMajorMode(player)==3) { SetArmedMode(actor,0); jkSetWeaponMesh(actor,WeapF); } else if(GetMajorMode(player)==1 || GetMajorMode(player)==4) { SetArmedMode(actor,1); jkSetWeaponMesh(actor,WeapG); } else if(GetMajorMode(player)==2 || GetMajorMode(player)==5) { SetArmedMode(actor,2); SelectWeapon(player,1); jkSetWeaponMesh(actor,WeapF); } TeleportThing(actor,player); TeleportThing(player,hidden); } else if(GetSenderID()==2) { TeleportThing(cam0point,actor); playback=3; surf=GetSectorSurfaceRef(GetThingSector(cam1),rand()*GetNumSectorSurfaces(GetThingSector(cam1))); } else if(GetSenderID()==10) { KillTimerEx(10); if(skipped==1) return; SetTimerEx(0.1,511,0,0); PlaySoundThing(BO_Pleasure,boss,1,-1,100,0x80); jkPrintUniString(-3,80002); SetTimerEx(GetSoundLen(BO_Pleasure)-0.1,11,0,0); SetTimerEx(GetSoundLen(BO_Pleasure),512,0,0); } else if(GetSenderID()==11) { KillTimerEx(11); if(skipped==1) return; playback=6; SetTimerEx(0.1,255,0,0); PlaySoundThing(KY_ORU,actor,1,-1,100,0x80); jkPrintUniString(-3,80003); SetTimerEx(GetSoundLen(KY_ORU),12,0,0); SetTimerEx(GetSoundLen(KY_ORU),256,0,0); } else if(GetSenderID()==12) { KillTimerEx(12); if(skipped==1) return; playback=5; SetTimerEx(0.1,511,0,0); PlaySoundThing(BO_Iam,boss,1,-1,100,0x80); jkPrintUniString(-3,80004); SetTimerEx(GetSoundLen(BO_Iam)-0.1,13,0,0); SetTimerEx(GetSoundLen(BO_Iam),512,0,0); } else if(GetSenderID()==13) { KillTimerEx(13); if(skipped==1) return; jkStringClear(); if(rand()>.5) jkStringConcatUniString(50100); else jkStringConcatUniString(50101); if(rand()>.5) jkStringConcatUniString(50102); else jkStringConcatUniString(50103); if(rand()>.5) jkStringConcatUniString(50104); else jkStringConcatUniString(50105); if(rand()>.5) jkStringConcatUniString(50106); else jkStringConcatUniString(50107); if(rand()>.5) jkStringConcatUniString(50108); else jkStringConcatUniString(50109); jkStringOutput(-3,-1); r=rand()*4; if(r>3) r=3; ch=PlaySoundThing(BO_Great0[r],boss,1,-1,100,0x80); ChangeSoundPitch(ch,.9+(rand()/5),0.05); SetTimerEx(0.05,513,5,0); SetTimerEx(GetSoundLen(BO_Great0[r])-0.5,512,0,0); if(GetParam(0)<16) SetTimerEx(GetSoundLen(BO_Great0[r])-0.25,13,GetParam(0)+1,0); else SetTimerEx(0.7,14,0,0); } else if(GetSenderID()==14) { KillTimerEx(14); if(skipped==1) return; SetTimerEx(0.1,511,0,0); PlaySoundThing(BO_GrandChild,boss,1,-1,100,0x80); jkPrintUniString(-3,80005); SetTimerEx(GetSoundLen(BO_GrandChild)-0.1,15,0,0); SetTimerEx(GetSoundLen(BO_GrandChild)-1,50,0,0); SetTimerEx(GetSoundLen(BO_GrandChild),512,0,0); } else if(GetSenderID()==15) { KillTimerEx(15); if(skipped==1) return; playback=6; kk=PlayKey(actor,seeself,1,0x4); SetTimerEx(0.1,255,0,0); PlaySoundThing(KY_MeUgly,actor,1,-1,100,0x80); jkPrintUniString(-3,80006); SetTimerEx(GetSoundLen(KY_MeUgly),16,0,0); SetTimerEx(GetSoundLen(KY_MeUgly),256,0,0); } else if(GetSenderID()==16) { KillTimerEx(16); if(skipped==1) return; playback=5; StopKey(actor,kk,1); jkSetWeaponMesh(actor,WeapF); SetTimerEx(0.1,511,0,0); PlaySoundThing(BO_HaHa,boss,1,-1,100,0x80); jkPrintUniString(-3,80007); SetTimerEx(GetSoundLen(BO_HaHa),17,0,0); SetTimerEx(GetSoundLen(BO_HaHa)-0.1,512,0,0); } else if(GetSenderID()==17) { KillTimerEx(17); if(skipped==1) return; playback=5; SetTimerEx(0.1,511,0,0); PlaySoundThing(BO_ButSeriously,boss,1,-1,100,0x80); jkPrintUniString(-3,80008); SetTimerEx(GetSoundLen(BO_ButSeriously),18,0,0); SetTimerEx(GetSoundLen(BO_ButSeriously)-0.1,512,0,0); } else if(GetSenderID()==18) { KillTimerEx(18); if(skipped==1) return; playback=6; SetTimerEx(0.1,255,0,0); PlaySoundThing(KY_TellStories,actor,1,-1,100,0x80); jkPrintUniString(-3,80009); SetTimerEx(GetSoundLen(KY_TellStories)-0.1,19,0,0); SetTimerEx(GetSoundLen(KY_TellStories),256,0,0); } else if(GetSenderID()==19) { KillTimerEx(19); if(skipped==1) return; playback=5; SetTimerEx(0.1,511,0,0); PlaySoundThing(BO_SureThing,boss,1,-1,100,0x80); jkPrintUniString(-3,80010); SetTimerEx(GetSoundLen(BO_SureThing),20,0,0); SetTimerEx(GetSoundLen(BO_SureThing)-0.1,512,0,0); } else if(GetSenderID()==20) { KillTimerEx(20); if(skipped==1) return; playback=5; SetTimerEx(0.1,511,0,0); PlaySoundThing(BO_Storyteller0,boss,1,-1,100,0x80); jkPrintUniString(-3,80011); SetTimerEx(GetSoundLen(BO_Storyteller0),21,0,0); SetTimerEx(GetSoundLen(BO_Storyteller0)-0.1,512,0,0); } else if(GetSenderID()==21) { KillTimerEx(21); if(skipped==1) return; playback=5; SetTimerEx(0.1,511,0,0); PlaySoundThing(BO_Storyteller1,boss,1,-1,100,0x80); jkPrintUniString(-3,80012); SetTimerEx(GetSoundLen(BO_Storyteller1),22,0,0); SetTimerEx(GetSoundLen(BO_Storyteller1)-0.1,512,0,0); } else if(GetSenderID()==22) { KillTimerEx(22); if(skipped==1) return; playback=5; SetTimerEx(0.1,511,0,0); PlaySoundThing(BO_Storyteller2,boss,1,-1,100,0x80); jkPrintUniString(-3,80013); SetTimerEx(GetSoundLen(BO_Storyteller2),23,0,0); SetTimerEx(GetSoundLen(BO_Storyteller2)-0.1,512,0,0); } else if(GetSenderID()==23) { KillTimerEx(23); if(skipped==1) return; playback=5; SetTimerEx(0.1,511,0,0); PlaySoundThing(BO_Storyteller3,boss,1,-1,100,0x80); jkPrintUniString(-3,80014); SetTimerEx(GetSoundLen(BO_Storyteller3),24,0,0); SetTimerEx(GetSoundLen(BO_Storyteller3)-0.1,512,0,0); } else if(GetSenderID()==24) { KillTimerEx(24); if(skipped==1) return; playback=5; SetTimerEx(0.1,511,0,0); PlaySoundThing(BO_Storyteller4,boss,1,-1,100,0x80); jkPrintUniString(-3,80015); SetTimerEx(GetSoundLen(BO_Storyteller4),25,0,0); SetTimerEx(GetSoundLen(BO_Storyteller4)-0.1,512,0,0); } else if(GetSenderID()==25) { KillTimerEx(25); if(skipped==1) return; playback=5; SetTimerEx(0.1,511,0,0); PlaySoundThing(BO_Storyteller5,boss,1,-1,100,0x80); jkPrintUniString(-3,80016); SetTimerEx(GetSoundLen(BO_Storyteller5),26,0,0); SetTimerEx(GetSoundLen(BO_Storyteller5)-0.1,512,0,0); } else if(GetSenderID()==26) { KillTimerEx(26); if(skipped==1) return; playback=5; SetTimerEx(0.1,511,0,0); PlaySoundThing(BO_Storyteller6,boss,1,-1,100,0x80); jkPrintUniString(-3,80017); SetTimerEx(GetSoundLen(BO_Storyteller6)-0.1,27,0,0); SetTimerEx(GetSoundLen(BO_Storyteller6)-0.1,512,0,0); } else if(GetSenderID()==27) { KillTimerEx(27); if(skipped==1) return; playback=6; SetTimerEx(0.1,255,0,0); PlaySoundThing(KY_ButWhy,actor,1,-1,100,0x80); jkPrintUniString(-3,80018); SetTimerEx(GetSoundLen(KY_ButWhy),28,0,0); SetTimerEx(GetSoundLen(KY_ButWhy),256,0,0); } else if(GetSenderID()==28) { KillTimerEx(28); if(skipped==1) return; playback=5; SetTimerEx(0.1,513,6,0); SetTimerEx(1,513,0,0); SetTimerEx(1.5,511,0,0); PlaySoundThing(BO_JanSister,boss,1,-1,100,0x80); jkPrintUniString(-3,80019); SetTimerEx(GetSoundLen(BO_JanSister)-0.1,29,0,0); SetTimerEx(GetSoundLen(BO_JanSister),512,0,0); } else if(GetSenderID()==29) { KillTimerEx(29); if(skipped==1) return; playback=6; SetTimerEx(0.1,255,0,0); PlaySoundThing(KY_Explains,actor,1,-1,100,0x80); jkPrintUniString(-3,80020); SetTimerEx(GetSoundLen(KY_Explains),30,0,0); SetTimerEx(GetSoundLen(KY_Explains),256,0,0); } else if(GetSenderID()==30) { KillTimerEx(30); if(skipped==1) return; playback=6; SetTimerEx(0.1,255,0,0); PlaySoundThing(KY_WaitBelieve,actor,1,-1,100,0x80); jkPrintUniString(-3,80021); SetTimerEx(GetSoundLen(KY_WaitBelieve),31,0,0); SetTimerEx(GetSoundLen(KY_WaitBelieve),256,0,0); } else if(GetSenderID()==31) { KillTimerEx(31); if(skipped==1) return; playback=7; AISetLookPos(boss,GetThingPos(cam2)); SetTimerEx(0.1,511,0,0); PlaySoundThing(BO_Audience,boss,1,-1,100,0x80); jkPrintUniString(-3,80022); SetTimerEx(GetSoundLen(BO_Audience)-0.1,32,0,0); SetTimerEx(GetSoundLen(BO_Audience),512,0,0); } else if(GetSenderID()==32) { KillTimerEx(32); if(skipped==1) return; PlaySoundLocal(audience,1,0,0x0); AISetLookPos(boss,GetThingPos(actor)); TeleportThing(player,actor); TeleportThing(actor,hidden); SetTimerEx(2,33,0,0); } else if(GetSenderID()==33) { KillTimerEx(33); if(skipped==1) return; playback=6; SelectWeapon(player,GetWeaponBin(11)); SetTimerEx(0.1,255,0,0); PlaySoundThing(KY_DIESON,actor,1,-1,100,0x80); PlaySoundLocal(KY_DIESON,1,0,0x0); jkPrintUniString(-3,80023); SetTimerEx(GetSoundLen(KY_DIE),34,0,0); SetTimerEx(GetSoundLen(KY_DIE),256,0,0); } else if(GetSenderID()==34) { jkSetSaberInfo(boss, rside_mat, rtip_mat, 0.003, 0.001, 0.100, tpl_wall, tpl_blood, tpl_saber); jkSetFlags(boss, 0x15); MoveToFrame(elev,2,10); PlaySoundThing(jamelev,elev,1,-1,-1,0x80); SetCameraFocus(0,player); SetActionCog(-1,0); ClearActorFlags(player,0x840000); AIClearMode(boss,0x2000); AISetMode(boss,0x4); SetGoalFlags(player,12,2); SetGoalFlags(player,13,1); AutoSaveGame(); SetPulse(0); if(view!=GetCurrentCamera()) CycleCamera(); playback=8; skipped=1; If(VectorDist(GetThingPos(player),GetThingPos(actor))<.2) TeleportThing(player,boss); } else if(GetSenderID()==50) { SelectWeapon(player,1); SetArmedMode(actor,0); jkSetWeaponMesh(actor,mirror); } //Faces: kkfagoat else if(GetSenderID()==255) { KillTimerEx(255); SetMaterialCel(kkfagoat,rand()*14); SetTimerEx(.1,255,0,0); } else if(GetSenderID()==256) { SetMaterialCel(kkfagoat,0); KillTimerEx(255); KillTimerEx(256); } else if(GetSenderID()==257) { SetMaterialCel(kkfagoat,GetParam(0)); } //Faces: kyfascar else if(GetSenderID()==511) { KillTimerEx(511); SetMaterialCel(kyfascar,rand()*13); SetTimerEx(.1,511,0,0); } else if(GetSenderID()==512) { SetMaterialCel(kyfascar,0); KillTimerEx(511); KillTimerEx(512); } else if(GetSenderID()==513) { SetMaterialCel(kyfascar,GetParam(0)); } return; removed: if(GetSenderRef()==cam0point) { print("ERROR!"); skipped=1; if(skap==1) { TeleportThing(player,actor); TeleportThing(actor,hidden); SelectWeapon(player,11); SetTimerEx(0.1,34,0,0); } } killed: If(GetSenderRef()!=boss) return; SetMaterialCel(kyfascar,2); sleep(0.4); SetGoalFlags(player,13,2); ParseArg(backdoor,"soundclass=none"); SetMaterialCel(kyfascar,14); ch=PlaySoundThing(backdoorrumble,backdoor,0,-1,100,0x81); ChangeSoundPitch(ch,0.5,0.1); sleep(0.1); ChangeSoundVol(ch,1,0.25); MoveToFrame(backdoor,1,0.1); sleep(0.5); SetMaterialCel(kyfascar,13); StopThing(backdoor); ChangeSoundVol(ch,0,0.25); sleep(1); SetMaterialCel(kyfascar,14); ChangeSoundVol(ch,1,0.25); MoveToFrame(backdoor,1,0.1); sleep(0.5); SetMaterialCel(kyfascar,13); StopThing(backdoor); ChangeSoundVol(ch,0,0.25); sleep(0.5); SetMaterialCel(kyfascar,14); ChangeSoundVol(ch,1,0.25); MoveToFrame(backdoor,1,1); sleep(0.25); SetMaterialCel(kyfascar,13); StopThing(backdoor); ChangeSoundVol(ch,0,0.25); sleep(1); ChangeSoundVol(ch,1,0.25); MoveToFrame(backdoor,1,0.1); sleep(0.5); SetMaterialCel(kyfascar,13); StopThing(backdoor); ChangeSoundVol(ch,0,0.25); sleep(1); SetMaterialCel(kyfascar,14); ChangeSoundVol(ch,1,0.25); MoveToFrame(backdoor,1,0.1); sleep(0.5); SetMaterialCel(kyfascar,13); StopThing(backdoor); ChangeSoundVol(ch,0,0.25); sleep(0.5); SetMaterialCel(kyfascar,14); ChangeSoundVol(ch,1,0.25); MoveToFrame(backdoor,1,1); sleep(0.25); SetMaterialCel(kyfascar,13); StopThing(backdoor); ChangeSoundVol(ch,0,0.25); sleep(1); SetMaterialCel(kyfascar,15); ChangeSoundVol(ch,1,0.25); MoveToFrame(backdoor,1,8); WaitForStop(backdoor); StopSound(ch,0.25); PlaySoundThing(backdoorbang,backdoor,1,-1,100,0x80); sleep(1); PlaySoundLocal(forcedoor,1,0,0x0); jkPrintUniString(-3,80024); return; damaged: If(GetSenderRef()==boss) { SetMaterialCel(kyfascar,13); SetTimerEx(0.5,512,0,0); } return; end
# Jedi Knight Cog Script # # 00_SMOKETRAIL.COG # # Leave a smoke trail behind a moving object # # [YB] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved flags=0x240 symbols template smoke=+tiebomb_exp local int dummy local message created message pulse end # ======================================================================================== code created: SetThingPulse(GetSenderRef(), 0.01); // set 50 msec timer for smoke release Return; # ........................................................................................ pulse: if(!(GetThingFlags(GetSenderRef()) & 0x10)) dummy = CreateThing(smoke, GetSenderRef()); // create smoke at our current location Return; end
# As soon as you get there, trains are leaving. # # By Edward symbols message startup message entered message pulse message user7 thing fleetroop thing train0 thing train1 thing train2 thing train3 thing train4 thing train5 thing train6 thing train7 sector fromhere sound engine sound wheels flex i local int c local int busy=0 local cog frontdoor int fb local int ch0 local int ch1 local int ch2 local int ch3 local int ch4 local int ch5 local int ch6 local int ch7 local int ch8 local vector checkpoint sector tunnel0 sector tunnel1 sector tunnel2 sector tunnel3 end # code startup: sleep(1); fb=4; while(fb==4) { // Feedback 1 is successful. // Feedback 4 is that it is still moving, come back later. // Feedback 8 is that it is already at that state. fb=SendMessageEx(frontdoor,user0,1,0,0,0); sleep(1); } return; entered: If(GetSenderRef()==fromhere) { if(busy==1) return; busy=1; SetPulse(0.1); sleep(1); ch8=PlaySoundThing(engine,train0,0,-1,250,0x81); ChangeSoundPitch(ch8,0.05,0.1); sleep(0.1); ChangeSoundVol(ch8,1,1); ChangeSoundPitch(ch8,1,1); sleep(1); AISetLookPos(fleetroop,VectorAdd(GetThingPos(fleetroop),'0 -1 0')); sleep(0.5); DetachThing(fleetroop); SetThingVel(fleetroop,'0 -1 1'); sleep(1); for(c=0; c<8; c=c+1) { ch0[c]=PlaySoundThing(wheels,train0[c],0,-1,100,0x81); } for(i=1; i<80; i=i+2) { if((GetThingSector(train0)==tunnel0) || (GetThingSector(train0)==tunnel1) || (GetThingSector(train0)==tunnel2) || (GetThingSector(train0)==tunnel3)) { i=80; } else { for(c=0; c<8; c=c+1) { MoveToFrame(train0[c],5,i); ChangeSoundVol(ch0[c],i/10,0.1); ChangeSoundPitch(ch8,1+(i/50),1); } sleep(1); } } } return; pulse: If(VectorDist(GetThingPos(train7),checkpoint)<.5) { SetPulse(0); fb=4; while(fb==4) { // Feedback 1 is successful. // Feedback 4 is that it is still moving, come back later. // Feedback 8 is that it is already at that state. fb=SendMessageEx(frontdoor,user0,0,0,0,0); sleep(1); } } return; user7: StopSound(ch0,1); StopSound(ch1,1); StopSound(ch2,1); StopSound(ch3,1); StopSound(ch4,1); StopSound(ch5,1); StopSound(ch6,1); StopSound(ch7,1); StopSound(ch8,1); return; end
# Trash Goes Here # # By Edward symbols message entered sector trashme mask=-1 end # code entered: If(GetThingType(GetSourceRef())==10) { DamageThing(GetSourceRef(),1000000,0x1,GetSourceRef()); return; } DestroyThing(GetSourceRef()); return; end
# First Transport across the planet. # # By Edward symbols message entered message damaged message activated message playeraction message pulse message timer thing transport0 thing invconsole linkid=5 thing player local thing actor thing hidden template actor_tpl model WeapF model WeapG sector chamber thing startcam keyframe KY_tap sound KY_Abandoned sound KY_Fast sound tapcon sound startoff sound moving #--------Can Happen------- #thing transport1 #thing frontend #thing backend # #thing outcam0 desc=interval_change #thing outcam1 desc=center_follow #thing outcam2 desc=chase_cam # #thing destination # #template snow # #--------Of course-------- thing transport2 thing putplayer thing incam0 thing incam1 thing incam2 sound finish sound KY_NoHeating sound KY_Snore keyframe ky_freeze keyframe ky_sleep model frozenKY #--------Hot Troopers------------ thing troop1 thing troop2 thing troopcam sound TR1_PickedUp0 sound TR1_PickedUp1 sound TR1_PickedUp2 sound TR2_Snowflake0 sound TR2_Snowflake1 sound TR2_Snowflake2 sound TR1_BigHuman0 sound TR1_BigHuman1 sound TR1_BigHuman2 sound TR2_Yetti0 sound TR2_Yetti1 sound TR2_Yetti2 sound TR1_Wookie0 sound TR1_Wookie1 sound TR1_Wookie2 sound TR2_Freezing0 sound TR2_Freezing1 sound TR2_Freezing2 sound TR1_TurnUp0 sound TR1_TurnUp1 sound TR1_TurnUp2 sound TR2_WhatWhat0 sound TR2_WhatWhat1 sound TR2_WhatWhat2 sound TR1_Regulator0 sound TR1_Regulator1 sound TR1_Regulator2 sound TR2_Neat0 sound TR2_Neat1 sound TR2_Neat2 sound TR2_Smell0 sound TR2_Smell1 sound TR2_Smell2 sound TR2_Burning0 sound TR2_Burning1 sound TR2_Burning2 sound TR1_Sheesh sound TR2_Burn0 sound TR2_Burn1 sound TR2_Burn2 sound TR2_Burn3 sound TR2_Burn4 sound TR2_Burn5 sound TR2_Burn6 sound TR2_Burn7 sound TR2_Burn8 sound TR2_Burn9 sound TR2_BurnA sound TR2_BurnB sound TR2_BurnC sound TR2_BurnD sound TR2_BurnE sound TR2_BurnF sound TR2_BurnG sound TR2_BurnH sound TR2_BurnI sound TR2_BurnJ sound TR2_BurnK sound TR2_BurnL sound TR2_BurnM sound TR2_BurnN sound TR2_BurnO sound TR2_BurnP sound TR2_BurnQ sound TR2_BurnR sound TR2_BurnS sound TR2_BurnT sound TR2_BurnU sound TR2_BurnV sound TR2_BurnW sound TR2_BurnX sound burning keyframe tr2_turning keyframe tr2_whatthe keyframe tr2_jumpabout keyframe tr2_stunned keyframe tr2_collapse template smoky template helmet template meanwhile template explode thing t local thing tt local int r1 local int r2 local model toastedTR model revertTR vector returnpos local #----------------------------------- flex i local flex j local flex x local int done=0 local int ch local int k=-1 local int view=0 local int eh=-1 local int skipped=0 local material kkfagoat flex timing local end # code entered: if(GetSenderRef()!=chamber) return; if(done!=0) return; CaptureThing(actor); SetPulse(0.005); # SetPhysicsFlags(backend,0x1); # SetPhysicsFlags(frontend,0x1); done=1; SetTimerEx(.01,255,0,0); SetTimerEx(GetSoundLen(KY_Abandoned)+GetSoundLen(KY_Fast),256,0,0); player=GetLocalPlayerThing(); PlaySoundLocal(KY_Abandoned,1,0,0x0); jkPrintUniString(-3,20000); sleep(GetSoundLen(KY_Abandoned)); if(done>1) return; PlaySoundLocal(KY_Fast,1,0,0x0); jkPrintUniString(-3,20001); return; activated: If(GetSenderID()==5) { PlaySoundPos(tapcon,GetThingPos(invconsole),1,-1,-1,0); if(GetMajorMode(player)==0 || GetMajorMode(player)==3) { SetArmedMode(actor,0); jkSetWeaponMesh(actor,WeapF); } else if(GetMajorMode(player)==1 || GetMajorMode(player)==4) { SetArmedMode(actor,1); jkSetWeaponMesh(actor,WeapG); } else if(GetMajorMode(player)==2 || GetMajorMode(player)==5) { SetArmedMode(actor,2); SelectWeapon(player,1); jkSetWeaponMesh(actor,WeapF); } SetThingModel(actor,GetThingModel(player)); // Normal Run: if(rand()>.5) { DestroyThing(invconsole); SetActorFlags(player,0x040000); PlaySoundThing(startoff,transport0,1,-1,-1,0x80); ch=PlaySoundThing(moving,transport0,0,-1,50,0x81); ChangeSoundPitch(ch,0.1,0.05); sleep(0.05); ChangeSoundPitch(ch,1,5); ChangeSoundVol(ch,1,2); done=2; timing=GetFlexGameTime(); sleep(0.01); timing=GetFlexGameTime()-timing; for(i=0; i<25; i=i+(timing*25)) { MoveToFrame(transport0,1,i); sleep(0.01); } j=.03; } // Fun Run: else { TeleportThing(actor,player); TeleportThing(player,hidden); SetCameraFocus(0,startcam); done=2; SetActionCog(GetSelfCog(),0x7FFFFFFF); SetActorFlags(player,0x840000); AISetLookPos(actor,GetThingPos(invconsole)); if(skipped==0) k=PlayKey(actor,KY_tap,1,0x2); if(skipped==0) sleep(GetKeyLen(KY_tap)); if(skipped==0) StopKey(actor,k,.25); AISetLookPos(actor,GetThingPos(startcam)); if(skipped==0) sleep(.5); AISetLookPos(actor,GetThingPos(invconsole)); if(skipped==0) sleep(1); for(i=0; i<3; i=i+1) { PlaySoundPos(tapcon,GetThingPos(invconsole),1,-1,-1,0); if(skipped==0) k=PlayKey(actor,KY_tap,1,0x2); if(skipped==0) sleep(GetKeyLen(KY_tap)); if(skipped==0) StopKey(actor,k,.25); k=-1; } PlaySoundPos(tapcon,GetThingPos(invconsole),1,-1,-1,0); DestroyThing(invconsole); PlaySoundThing(startoff,transport0,1,-1,-1,0x80); ch=PlaySoundThing(moving,transport0,0,-1,50,0x80); ChangeSoundPitch(ch,2,1); ChangeSoundVol(ch,1,1); MoveToFrame(transport0,1,50); if(skipped==0) sleep(0.25); TeleportThing(actor,transport0); if(skipped==0) sleep(1); j=0; } // Meanwhile... StopSound(ch,1); timing=GetFlexGameTime(); sleep(0.01); timing=GetFlexGameTime()-timing; if(timing/25>0.005) { for(i=.3; i>0; i=i-(timing/25)) { FireProjectile(GetPrimaryFocus(0),meanwhile,-1,-1,VectorSet(i,.1,j),'0 0 0',0,0,0,0); if(skipped==0) sleep(0.01); } } else { for(i=.3; i>0; i=i-0.005) { FireProjectile(GetPrimaryFocus(0),meanwhile,-1,-1,VectorSet(i,.1,j),'0 0 0',0,0,0,0); if(skipped==0) sleep(0.01); } } TeleportThing(actor,player); TeleportThing(player,hidden); SetActionCog(GetSelfCog(),0x7FFFFFFF); SetActorFlags(player,0x840000); SetCameraFocus(0,troopcam); if(timing/25>0.005) { for(i=0; i>-.3; i=i-(timing/25)) { FireProjectile(GetPrimaryFocus(0),meanwhile,-1,-1,VectorSet(i,.1,0),'0 0 0',0,0,0,0); if(skipped==0) sleep(0.01); } } else { for(i=0; i>-.3; i=i-0.005) { FireProjectile(GetPrimaryFocus(0),meanwhile,-1,-1,VectorSet(i,.1,0),'0 0 0',0,0,0,0); if(skipped==0) sleep(0.01); } } r1=rand()*3; if(r1>2) r1=2; r2=rand()*3; if(r2>2) r2=2; PlaySoundThing(TR1_PickedUp0[r1],troop1,1,-1,-1,0x80); if(skipped==0) jkPrintUniString(-3,20002); if(skipped==0) sleep(GetSoundLen(TR1_PickedUp0[r1])); PlaySoundThing(TR2_Snowflake0[r2],troop2,1,-1,-1,0x80); if(skipped==0) jkPrintUniString(-3,20003); if(skipped==0) sleep(GetSoundLen(TR2_Snowflake0[r2])); PlaySoundThing(TR1_BigHuman0[r1],troop1,1,-1,-1,0x80); if(skipped==0) jkPrintUniString(-3,20004); if(skipped==0) sleep(GetSoundLen(TR1_BigHuman0[r1])); PlaySoundThing(TR2_Yetti0[r2],troop2,1,-1,-1,0x80); if(skipped==0) jkPrintUniString(-3,20005); if(skipped==0) sleep(GetSoundLen(TR2_Yetti0[r2])); PlaySoundThing(TR1_Wookie0[r1],troop1,1,-1,-1,0x80); if(skipped==0) jkPrintUniString(-3,20006); if(skipped==0) jkPrintUniString(-3,20007); if(skipped==0) sleep(GetSoundLen(TR1_Wookie0[r1])); PlaySoundThing(TR2_Freezing0[r2],troop2,1,-1,-1,0x80); if(skipped==0) jkPrintUniString(-3,20008); if(skipped==0) sleep(GetSoundLen(TR2_Freezing0[r2])); PlaySoundThing(TR1_TurnUp0[r1],troop1,1,-1,-1,0x80); if(skipped==0) jkPrintUniString(-3,20009); if(skipped==0) sleep(GetSoundLen(TR1_TurnUp0[r1])); PlaySoundThing(TR2_WhatWhat0[r2],troop2,1,-1,-1,0x80); if(skipped==0) jkPrintUniString(-3,20010); if(skipped==0) sleep(GetSoundLen(TR2_WhatWhat0[r2])); PlaySoundThing(TR1_Regulator0[r1],troop1,1,-1,-1,0x80); if(skipped==0) jkPrintUniString(-3,20011); if(skipped==0) sleep(GetSoundLen(TR1_Regulator0[r1])-2); if(skipped==0) k=PlayKey(troop2,tr2_turning,1,0x4); if(skipped==0) SetTimerEx(GetKeyLen(tr2_turning),1,troop2,.25); if(skipped==0) sleep(2); PlaySoundThing(TR2_Neat0[r2],troop2,1,-1,-1,0x80); if(skipped==0) jkPrintUniString(-3,20012); KillTimerEx(1); if(skipped==0) sleep(GetSoundLen(TR2_Neat0[r2])); done=3; returnpos=GetThingPos(troop2); if(skipped==0) ch=PlaySoundThing(burning,troop2,0,-1,-1,0x81); if(skipped==0) ChangeSoundVol(ch,.25,1); if(skipped==0) sleep(.5); StopKey(troop2,k,1); k=-1; if(skipped==0) k=PlayKey(troop2,tr2_whatthe,1,0x4); PlaySoundThing(TR2_Smell0[r2],troop2,1,-1,-1,0x80); if(skipped==0) jkPrintUniString(-3,20013); if(skipped==0) sleep(GetSoundLen(TR2_Smell0[r2])); StopKey(troop2,k,1); k=-1; if(skipped==0) k=PlayKey(troop2,tr2_jumpabout,1,0x0); PlaySoundThing(TR2_Burning0[r2],troop2,1,-1,-1,0x80); if(skipped==0) jkPrintUniString(-3,20014); if(skipped==0) sleep(GetSoundLen(TR2_Burning0[r2])); if(skipped==0) SetTimerEx(.25,2,0,0); for(i=0; i<5; i=i+1) { SetThingThrust(troop2,VectorSet( ((rand()*2)-1)/10,2,(rand()*2)-1 )); AISetLookPos(troop2,VectorAdd(GetThingPos(troop2), VectorSet(rand(), (rand()*2)-1, (rand()*2)-1 ) )); if(skipped==0) sleep(1); } t=-1; while(t==-1) { sleep(0.1); t=CreateThingAtPos(meanwhile,GetThingSector(troop2),VectorAdd(returnpos,'.5 0 0'),'0 0 0'); } SetThingLook(t,VectorSub(returnpos,GetThingPos(t))); SetThingThrust(troop2,'0 0 0'); StopThing(troop2); TeleportThing(troop2,t); DestroyThing(t); t=0; while(VectorDist(GetThingPos(troop2),returnpos)>.1 && skipped==0) { AISetLookPos(troop2,returnpos); SetThingThrust(troop2,'0 2 0'); t=t+1; sleep(0.1); if(t>30) TeleportThing(troop2,troop1); } SetCollideType(troop1,0); SetCollideType(troop2,0); SetThingThrust(troop2,'0 0 0'); StopThing(troop2); KillTimerEx(2); AISetLookPos(troop2,GetThingPos(troop1)); done=4; StopSound(ch,1); FireProjectile(troop2,explode,-1,-1,'0 0 .1','0 0 0',0,0,0,0); t=FireProjectile(troop2,helmet,-1,-1,'0 0 .1','0 0 0',0,0,0,0); SetThingVel(t,'-.1 -.1 6'); SetPhysicsFlags(t,0x20); StopKey(troop2,k,.1); k=-1; if(skipped==0) k=PlayKey(troop2,tr2_stunned,1,0x1); SetThingModel(troop2,toastedTR); if(skipped==0) sleep(2); SetCollideType(troop1,1); SetCollideType(troop2,1); StopKey(troop2,k,1); k=-1; if(skipped==0) k=PlayKey(troop2,tr2_collapse,1,0x4); if(skipped==0) sleep(GetKeyLen(tr2_collapse)+1); PlaySoundThing(TR1_Sheesh,troop1,1,-1,-1,0x80); if(skipped==0) jkPrintUniString(-3,20015); if(skipped==0) sleep(GetSoundLen(TR1_Sheesh)+1); timing=GetFlexGameTime(); sleep(0.01); timing=GetFlexGameTime()-timing; for(i=1; i>0; i=i-(timing)) { if(eh!=-1) FreeColorEffect(eh); eh=NewColorEffect(0,0,0, 0,0,0, 0,0,0, i); if(skipped==0) sleep(0.01); } if(skipped==0) sleep(1); StopKey(troop2,k,1); SetThingModel(troop2,revertTR); // Comical Run: # if(rand()>.5) # { # done=5; # ch=PlaySoundThing(moving,transport1,1,-1,100,0x81); # for(i=0; i<1; i=i+0.025) # { # if(eh!=-1) FreeColorEffect(eh); # eh=NewColorEffect(0,0,0, 0,0,0, 0,0,0, i); # if(skipped==0) sleep(0.01); # } # if(eh!=-1) FreeColorEffect(eh); # SetTimerEx(1.92,3,0,0); # while( VectorDist( GetThingPos(transport1),GetThingPos(destination) )>.2 ) # sleep(.1); # KillTimerEx(3); # MoveToFrame(destination,1,20); # WaitForStop(destination); StopSound(ch,1); # # } # else # { SetCameraFocus(0,incam0); timing=GetFlexGameTime(); sleep(0.01); timing=GetFlexGameTime()-timing; for(i=0; i<1; i=i+(timing)) { if(eh!=-1) FreeColorEffect(eh); eh=NewColorEffect(0,0,0, 0,0,0, 0,0,0, i); if(skipped==0) sleep(0.01); } if(eh!=-1) FreeColorEffect(eh); # } done=6; TeleportThing(actor,putplayer); sleep(0.1); if(GetThingSector(actor)!=GetThingSector(putplayer)) { for(r2=0; r2.75) { SetThingModel(actor,frozenKY); k=PlayKey(actor,ky_freeze,1,0x1); if(skipped==0) sleep(1); AttachThingToThing(actor,transport2); while(VectorDist( '-45.3 -11.4 -1.9',GetThingPos(transport2) )>.1 && skipped==0) { MoveToFrame(transport2,1, VectorDist( '-45.3 -11.4 -1.9',GetThingPos(transport2) )*10 ); ChangeSoundPitch(ch,VectorDist( '-45.3 -11.4 -1.9',GetThingPos(transport2) ),1); sleep(0.01); } if(skipped==1) MoveToFrame(transport2,1,100); WaitForStop(transport2); StopSound(ch,1); PlaySoundThing(finish,transport2,1,-1,50,0x80); if(skipped==0) sleep(3); SetCameraFocus(0,incam1); if(skipped==0) sleep(1); if(skipped==0) PlaySoundLocal(KY_NoHeating,1,0,0x0); if(skipped==0) jkPrintUniString(-3,20016); if(skipped==0) sleep(2); if(skipped==0) jkPrintUniString(-3,20017); if(skipped==0) sleep(3); if(skipped==0) jkPrintUniString(-3,20018); if(skipped==0) sleep(2); if(skipped==0) jkPrintUniString(-3,20019); if(skipped==0) sleep(2); if(skipped==0) jkPrintUniString(-3,20020); if(skipped==0) sleep(2); StopKey(actor,k,1); k=-1; } // Boring Ride: else { k=PlayKey(actor,ky_sleep,1,0x1); if(skipped==0) sleep(1); AttachThingToThing(actor,transport2); while(VectorDist( '-45.3 -11.4 -1.9',GetThingPos(transport2) )>.1 && skipped==0) { MoveToFrame(transport2,1, VectorDist( '-45.3 -11.4 -1.9',GetThingPos(transport2) )*10 ); ChangeSoundPitch(ch,VectorDist( '-45.3 -11.4 -1.9',GetThingPos(transport2) ),1); sleep(0.01); } if(skipped==1) MoveToFrame(transport2,1,100); WaitForStop(transport2); StopSound(ch,1); PlaySoundThing(finish,transport2,1,-1,50,0x80); if(skipped==0) sleep(1); SetCameraFocus(0,incam2); StopKey(actor,k,0.1); k=-1; if(skipped==0) k=PlayKey(actor,ky_sleep,1,0x4); if(skipped==0) PlaySoundLocal(KY_Snore,1,0,0x0); if(skipped==0) jkPrintUniString(-3,20021); if(skipped==0) sleep(GetSoundLen(KY_Snore)); StopKey(actor,k,1); k=-1; } SetThingModel(actor,GetThingModel(player)); DetachThing(actor); TeleportThing(player,actor); TeleportThing(actor,hidden); SetCameraFocus(0,player); SetActionCog(-1,0); ClearActorFlags(player,0x840000); skipped=1; SetPulse(0); if(view!=GetCurrentCamera()) CycleCamera(); AutoSaveGame(); } return; playeraction: If(GetParam(0)==2 || GetParam(0)==3) { If(skipped==0 && done>1) { skipped=1; print(">>>>>>>> Spin on! >>>>>>>>"); } ReturnEx(0); } return; pulse: If(GetCurrentCamera()==1 && done>1) { CycleCamera(); view=view+1; if(view>2) view=0; printint(view); } if(done==3) { CreateThing(smoky,troop2); } return; # if(done==5) # { # ParseArg(frontend,"airdrag=5 surfdrag=.25"); # ParseArg(backend,"airdrag=5 surfdrag=.25"); # ParseArg(outcam2,"airdrag=5"); # ApplyForce(frontend, VectorNorm(VectorSub( GetThingPos(destination),GetThingPos(frontend) )) ); # If(HasLOS(frontend,destination)) # { # x=0; # } # else # { # if(x==0) x=(rand()*2)-1; # } # ApplyForce(frontend,VectorSet(x,0,0)); # if(rand()>.75) # ChangeSoundPitch(ch,.5+rand(),.25+rand()*2); # t=-1; # t=FireProjectile(transport1,meanwhile,-1,-1,'-.05 .4 .025','0 0 0',0,0,0,0); # If(t!=-1) # { # TeleportThing(actor,t); # DestroyThing(t); # } # SetCameraFocus(0,outcam0[view]); # SetThingLook(outcam2,VectorSub(GetThingPos(transport1),GetThingPos(outcam2))); # ApplyForce(outcam2,VectorSub(GetThingPos(transport1),GetThingPos(outcam2))); # FireProjectile(backend,snow,-1,-1,'0 0 0','0 0 0',0,0,0,0); # } # ParseArg(transport1,"move=none"); # AttachThingToThing(transport1,backend); # SetThingLook(transport1,VectorSub( GetThingPos(frontend),GetThingPos(backend) )); # if(VectorDist( GetThingPos(backend),GetThingPos(frontend) )>.9) # ApplyForce(backend, VectorNorm(VectorSub( GetThingPos(frontend),GetThingPos(backend) )) ); timer: If(GetSenderID()==1) { StopKey(GetParam(0),k,GetParam(1)); k=-1; } else if(GetSenderID()==2) { KillTimerEx(2); PlaySoundThing(TR2_Burn0[rand()*33],troop2,1,-1,-1,0x80); SetTimerEx(GetSoundLen(TR2_Burn0[rand()*33]),2,0,0); } else if(GetSenderID()==3) { # KillTimerEx(3); # tt=-1; # tt=FireProjectile(transport1,helmet,-1,-1,VectorSet(rand()*2,2+(rand()*2),(rand()*2)-1 ),'0 0 0',0,0,0,0); # if(tt!=-1) # { # TeleportThing(outcam0,tt); # DestroyThing(tt); # SetThingLook(outcam0,VectorAdd( VectorSub( GetThingPos(frontend),GetThingPos(outcam0) ) ,GetThingVel(frontend) )); # SetTimerEx(1.92,3,0,0); # } # else # { SetTimerEx(0.03,3,0,0); # } } else If(GetSenderID()==255) { KillTimerEx(255); SetMaterialCel(kkfagoat,rand()*14); SetTimerEx(.1,255,0,0); } else if(GetSenderID()==256) { SetMaterialCel(kkfagoat,0); KillTimerEx(255); KillTimerEx(256); } return; damaged: ReturnEx(0); return; end
# Jedi Knight Missions Cog Script # # WEAP_RAILSEEK_M.COG # # WEAPON 17 Script - Seeking Rail Detonator Gun # # This is a missile launcher type of weapon. It sends out an explosive device with # two options, impact or trigger explosion. The charge with the trigger option will # stick to a wall. # # - Not affected by MagSealed sectors/surfaces. # # [YB & CYW] + [RF] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved symbols model povModel=skrv.3do local model povModel_m=skrv_m.3do local model weaponMesh=skrg.3do local sound mountSound=RailChargeArm01.WAV local sound dismountSound=PutWeaponAway01.wav local sound fireSound=RailChargeFire01.WAV local sound outSound=RailChargeEmpty01.WAV local sound failSound=weapfail.wav local thing player local keyframe mountAnim=RldVmnt.key local keyframe dismountAnim=RldVdis.key local keyframe povfireAnim=RldVpst1.key local keyframe holsterAnim=kyhlstr.key local template projectileB=+dudseek local template lprojectile=+lhraildet local template projectile=+hraildet local template projectile2=+hraildet2 local template sprojectile=+raildet local template sprojectile2=+raildet2 local template NCRail=+nchraildet local template NCRail2=+nchraildet2 local template gtemp=ghost local thing moochGhost=-1 local int oldFlags local #template exp=+raildet_exp local thing rail local thing target local flex fireWait=0.1 local flex powerBoost local flex autoAimFOV=1 local flex holsterWait local flex fMaxDot local flex dot local thing tMaybe local keyframe railAnim=rld0anim.key local int trackID=-1 local int mode local int holsterTrack local int iShotCounter=0 local int selectMode=1 local int data local int i local #int j local #int k local #int m local #thing RLauncher local #thing RTarget local #thing RProjectile local #int RailSlotID local #int RailSlotID2 local #int RailSlotID3 local #int RailSlotID4 local #int RailSlotID5 local #int RailSlotID6 local #int RailSlotID7 local #int RailSlotID8 local #int RailSlotID9 local #int RailSlotID10 local #int RailSlotID11 local #int RailSlotID12 local #int RailSlotID13 local #int RailSlotID14 local #int RailSlotID51 local #int RailSlotID16 local #int RailSlotID17 local #int RailSlotID18 local #int RailSlotID19 local #int RailSlotID20 local # #int RailSlotDest local #int RailSlotDest2 local #int RailSlotDest3 local #int RailSlotDest4 local #int RailSlotDest5 local #int RailSlotDest6 local #int RailSlotDest7 local #int RailSlotDest8 local #int RailSlotDest9 local #int RailSlotDest10 local #int RailSlotDest11 local #int RailSlotDest12 local #int RailSlotDest13 local #int RailSlotDest14 local #int RailSlotDest51 local #int RailSlotDest16 local #int RailSlotDest17 local #int RailSlotDest18 local #int RailSlotDest19 local #int RailSlotDest20 local # #thing RailSlotThing local #thing RailSlotThing2 local #thing RailSlotThing3 local #thing RailSlotThing4 local #thing RailSlotThing5 local #thing RailSlotThing6 local #thing RailSlotThing7 local #thing RailSlotThing8 local #thing RailSlotThing9 local #thing RailSlotThing10 local #thing RailSlotThing11 local #thing RailSlotThing12 local #thing RailSlotThing13 local #thing RailSlotThing14 local #thing RailSlotThing51 local #thing RailSlotThing16 local #thing RailSlotThing17 local #thing RailSlotThing18 local #thing RailSlotThing19 local #thing RailSlotThing20 local #message startup message activated message deactivated message selected message deselected #message newplayer message autoselect message fire message timer #message trigger end # ======================================================================================== code //startup: // for (i = 0; i < 20; i = i + 1) // RailSlotID[i] = -1; // return; fire: player = GetSourceRef(); mode = GetSenderRef(); // Check that the player is still alive. if(GetThingHealth(player) <= 0) { Return; } // Check Ammo - If we are out, autoselect best weapon. if(GetInv(player, 91) < 1.0) { PlaySoundThing(outSound, player, 1.0, -1, -1, 0x80); if(GetAutoSwitch() & 1) SelectWeapon(player, GetWeaponBin(AutoSelectWeapon(player, 1))); Return; } SendMessageEx(GetThingClassCog(GetLocalPlayerThing()), user1, 3, 0, 0, 0); jkPlayPOVKey(player, povfireAnim, 1, 0x38); SetPOVShake('0.0 -.01 0.0', '4.0 0.0 0.0', .05, 80.0); if (GetInv(player, 93) > 0.0) { mode = 2; rail = FireProjectile(player, projectileB, failSound, 18, '0.0214 0.15 0.00', '0 0 0', 1.0, 0x00, 1, 1); } else { tMaybe = FirstThingInView(player, 120, 100, 0x404); fMaxDot = -1; target = -1; // Search for the thing with the highest dot. while (tMaybe != -1) { dot = ThingViewDot(player, tMaybe); if ((dot > fMaxDot) && (player != tMaybe)) { target = tMaybe; fMaxDot = dot; } tMaybe = NextThingInView(); } // target = player; if (target != -1) { data = target; if (mode == 0) data = data + 5000; rail = FireProjectileData(player, lprojectile, fireSound, 18, '0.0214 0.15 0.00', '0 0 0', 1.0, 0x20, 1, 1, data); } else { rail = FireProjectile(player, sprojectile[mode], fireSound, 18, '0.0214 0.15 0.00', '0 0 0', 1.0, 0x20, 1, 1); } } // Provide a kick backwards if (mode != 2) ApplyForce(player, VectorScale(GetThingLVec(player), -40)); else SendMessageEx(GetThingClassCog(player), skill, 1100, 0, 0, 0); powerBoost = GetInv(player, 63); ChangeFireRate(player, fireWait/powerBoost); Return; # ........................................................................................ activated: player = GetSourceRef(); mode = GetSenderRef(); jkSetWaggle(player, '0.0 0.0 0.0', 0); powerBoost = GetInv(player, 63); ActivateWeapon( player, fireWait/powerBoost, mode ); Return; # ........................................................................................ deactivated: player = GetSourceRef(); mode = GetSenderRef(); jkSetWaggle(player, '10.0 7.0 0.0', 350); DeactivateWeapon( player, mode ); Return; # ........................................................................................ selected: player = GetSourceRef(); if (moochGhost == -1) { moochGhost = CreateThing(gTemp, GetLocalPlayerThing()); SetThingParent(moochGhost, GetThingGuid(GetLocalPlayerThing())); } PlayMode(player, 41); PlaySoundThing(mountSound, player, 1.0, -1, -1, 0x80); if (GetInv(player, 67) == 0.0) jkSetPOVModel(player, povModel); // Kyle hand else jkSetPOVModel(player, povModel_m); // Mara Hand SetArmedMode(player, 1); jkSetWeaponMesh(player, weaponMesh); jkSetWaggle(player, '10.0 7.0 0.0', 350); trackID = jkPlayPOVKey(player, mountAnim, 0, 20); SetMountWait(player, GetKeyLen(mountAnim)); jkClearFlags(player, 0x5); SetCurWeapon(player, GetWeaponBin(17)); // Check Ammo - If we are out, autoselect best weapon. if(GetInv( player, 91 ) < 1.0) { PlaySoundThing(outSound, player, 1.0, -1, -1, 0x80); if(GetAutoSwitch() & 1) SelectWeapon(player, GetWeaponBin(AutoSelectWeapon(player, 1))); } Return; # ........................................................................................ deselected: player = GetSourceRef(); PlaySoundThing(dismountSound, player, 1.0, -1, -1, 0x80); 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); // // Return; # ........................................................................................ autoselect: selectMode = GetSenderRef(); player = GetSourceRef(); // If the player has the weapon if(GetInv(player, GetWeaponBin(17)) != 0.0) { // If the player has ammo if(GetInv(player, 91) != 0.0) { // query for ammo if(selectMode == -1) { ReturnEx(901.0); Return; } if((selectMode == 0) && !(GetAutoPickup() & 2)) { ReturnEx(901.0); Return; } if((selectMode == 1) && !(GetAutoSwitch() & 2)) { ReturnEx(901.0); Return; } if((selectMode == 2) && !(GetAutoPickup() & 2)) { ReturnEx(901.0); Return; } ReturnEx(-2.0); Return; } else { ReturnEx(-1.0); Return; } } else { ReturnEx(-1.0); } Return; # ........................................................................................ timer: if (GetSenderID() == 2) { StopKey(player, holsterTrack, 0.0); } // else if (GetSenderID() == 3500) // { // SetWeaponTarget(GetParam(0), GetParam(1), 450.0); // } Return; //# ........................................................................................ // //trigger: // // Handle Seeking Rail Dets // if(GetSourceRef() == 3500 || GetSourceRef() == 3501) // { // //print("Creating Rail Det!"); // // // Add this rail det to the projectile list (so that it // // can be destroyed when it's doppelganger explodes). // for (m = 0; m < 20; m = m + 1) // { // if (RailSlotID[m] == -1) // { // RailSlotID[m] = GetParam(2); // // j = m; // // // Break the for loop. // m = 30; // } // } // // // If there were no slots open, don't allow the rail det to be created // // (we would wind up with a rail det buzzing around over someone's head // // like an angry hornet, but never exploding). // if (m == 20) // { // //print("No Slots available!"); // return; // } // // m = j; // // RLauncher = GetParam(0); // RTarget = GetParam(1); // // if (RTarget == GetLocalPlayerThing()) // { //// print("Firing Live Round!"); // // if (GetSourceRef() == 3500) // RProjectile = FireProjectileLocal(RLauncher, projectile, fireSound, 18, '0.0214 0.15 0.00', '0 0 0', 1.0, 0x20, 1, 1); // else // RProjectile = FireProjectileLocal(RLauncher, projectile2, fireSound, 18, '0.0214 0.15 0.00', '0 0 0', 1.0, 0x20, 1, 1); // } // else // { //// print("Firing Dummy Round!"); // // if (GetSourceRef() == 3500) // RProjectile = FireProjectileLocal(RLauncher, NCRail, fireSound, 18, '0.0214 0.15 0.00', '0 0 0', 1.0, 0x20, 1, 1); // else // RProjectile = FireProjectileLocal(RLauncher, NCRail2, fireSound, 18, '0.0214 0.15 0.00', '0 0 0', 1.0, 0x20, 1, 1); // } // //// print("Marking Projectile!"); // // if (RProjectile != -1) // { // // Note down the reference of this seeker. // SetThingUserData(RProjectile, m); // // // Make sure ownership is correct. // SetThingParent(RProjectile, GetThingGuid(RLauncher)); // // // Note down the projectile thing. // RailSlotThing[m] = RProjectile; // RailSlotDest[m] = RLauncher; // //// Sleep(3.0); // // SetTimerEx(0.3, 3500, RProjectile, RTarget); // } // else // { // RailSlotID[m] = -1; // } // } // else if(GetSourceRef() == 3502) // Destroy a dummy seeker // { // //print("Destroying Ghost Rail Det!"); // // // Search the list for a match. // for (k = 0; k < 20; k = k + 1) // if (RailSlotID[k] == GetParam(0)) // if (RailSlotDest[k] == GetParam(1)) // { // DestroyThing(RailSlotThing[k]); // RailSlotID[k] = -1; // // k = 30; // } // } // else if(GetSourceRef() == 3503) // Destroy a real seeker // { // //print("Destroying Real Rail Det!"); // // i = GetParam(0); // j = RailSlotID[i]; // // if (j != -1) // { // RailSlotID[i] = -1; // // CreateThingAtPosOwner(exp, GetThingSector(GetParam(1)), GetThingPos(GetParam(1)), '0 0 0', RailSlotDest[i]); //// SendTrigger(RailSlotDest[i], 3504, VectorX(GetThingPos(GetParam(1))), VectorY(GetThingPos(GetParam(1))), VectorZ(GetThingPos(GetParam(1))), GetThingSector(GetParam(1))); // SendTrigger(-1, 3502, j, RailSlotDest[i], 0, 0); // } // } // else if(GetSourceRef() == 3504) // Create an explosion // { // CreateThingAtPosOwner(exp, GetParam(3), VectorSet(GetParam(0), GetParam(1), GetParam(2)), '0 0 0', GetLocalPlayerThing()); // } // // Return; end
# Jedi Knight Cog Script # # 00_conveyor.cog # # generic conveyor belt script # # This script will control 1-8 conveyor belts moving in the same direction # and with the same velocity. The conveyors run continuously. # # [IS] # # LKOH_SniperWolf # 07/2004 # Updated to slide selected surfaces the X & Y, in relation to the surface # itself. # Same effect as changing position of texture in 2d relations. # Positive X is to the right, positive Y is up. These act as vector components, # and so an amount. IE, X:5 Y:5 will have a greater effect than X:1 Y:1 # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved #============================================================================== symbols message startup message user0 float X desc=conveyor_x_direction float Y desc=conveyor_y_direction vector vec0 local vector newVec local vector tempVec local vector tempVec2 local float speed=2.0 desc=conveyor_speed surface convey0 nolink surface convey1 nolink surface convey2 nolink surface convey3 nolink surface convey4 nolink surface convey5 nolink surface convey6 nolink surface convey7 nolink int anim0=-1 local int anim1=-1 local int anim2=-1 local int anim3=-1 local int anim4=-1 local int anim5=-1 local int anim6=-1 local int anim7=-1 local int garbage local int cnt local end #=============================================================================== code user0: if(GetParam(0) & 0x1) X=GetParam(1); if(GetParam(0) & 0x2) Y=GetParam(2); if(GetParam(0) & 0x4) speed=GetParam(3); startup: for (cnt = 0; cnt <=7; cnt=cnt+1){ if (convey0[cnt] >= 0){ // The following uses various calculations to create a new vector // appropriate for the surface // Basically, it just creates a new vector already aligned to the // conveyor surface, and uses it to slide // the surface the X and Y in the inputted vector relative to the // surface. tempVec = VectorCross(GetSurfaceNormal(convey0[cnt]), '0 0 -1'); if ((VectorX(GetSurfaceNormal(convey0[cnt])) == 0) && (VectorY(GetSurfaceNormal(convey0[cnt])) == 0)){ tempVec = VectorCross(GetSurfaceNormal(convey0[cnt]), '0 -1 0'); } tempVec = VectorNorm(tempVec); vec0 = VectorSet(X*VectorX(tempVec), X*VectorY(tempVec), X*VectorZ(tempVec)); tempVec2 = VectorCross(GetSurfaceNormal(convey0[cnt]), tempVec); tempVec2 = VectorNorm(tempVec2); tempVec2 = VectorSet(Y*VectorX(tempVec2), Y*VectorY(tempVec2), Y*VectorZ(tempVec2)); tempVec = vec0; newVec = VectorAdd(tempVec, tempVec2); if(anim0[cnt]!=-1) StopAnim(anim0[cnt]); anim0[cnt]=slidewall(convey0[cnt], newVec, speed); } } return; end
# Open the door and allow your friends to enter. # # By Edward symbols message activated message playeraction message pulse message timer message arrived message startup surface opendadoor linkid=15 thing opendadoor2 linkid=15 thing door1 nolink thing door2 nolink thing ship1 nolink thing ship2 nolink template ship1_static thing ship1_s=-1 local template ship2_air1 thing ship2_a1=-1 local thing cam0 nolink,desc=on_door thing cam1 nolink,desc=land_ship thing cam2 nolink,desc=behind_ship thing cam3 nolink,desc=them_two thing player local thing actor nolink thing hidden nolink thing rebel nolink thing playpoint nolink sector hanger nolink model flight model landing model fistv surface newdoor nolink sound dynamb sound engine1 sound engine2 sound screach sound doorstart sound doormove sound doorstop sound KY_Welcome sound RE_Thanks sound KY_Supper sound RE_Flexible sound RE_YesSupper sound KY_Thanks sound BO_OhNo sound BO_NoSupper sound KY_Sigh sound denied int opened=0 local int view=0 local int ch local int ch1 local int ch2 local int t local flex topspeed=1 local int skipped=0 local cog confirmdoor material kkfagoat material k3facef flex timing local flex gtime local end # code startup: CaptureThing(opendadoor2); return; activated: player=GetLocalPlayerThing(); If(GetSenderRef()==opendadoor || GetSenderRef()==opendadoor2) { if(opened==0) { SetThingModel(ship1,flight); CaptureThing(door1); CaptureThing(door2); TeleportThing(player,hidden); SetActionCog(GetSelfCog(),0x7FFFFFFF); SetActorFlags(player,0x840000); SelectWeapon(player,1); SectorSound(hanger,dynamb,0.25); SetArmedMode(actor,0); jkSetWeaponMesh(actor,fistv); jkSetWeaponMesh(rebel,fistv); ch=PlaySoundThing(engine1,ship1,1,-1,100,0x81); TeleportThing(actor,playpoint); opened=1; timing=GetFlexGameTime()%1; gtime=GetFlexGameTime()%1; SetPulse(0.001); SetTimerEx(1,4,0,0); SendMessage(confirmdoor,user0); SetGoalFlags(player,11,2); } else { PlaySoundPos(denied,GetSurfaceCenter(opendadoor),1,-1,-1,0x0); } } return; playeraction: If(GetParam(0)==2 || GetParam(0)==3) { If(skipped!=0) return; if(opened<1) return; print(">>>>>>>> Spin on >>>>>>>>"); skipped=1; for(t=0; t<25; t=t+1) KillTimerEx(t); ChangeSoundPitch(ch,3,1); ChangeSoundPitch(ch1,3,1); ChangeSoundPitch(ch2,3,1); StopSound(ch,1); StopSound(ch1,1); StopSound(ch2,1); opened=7; MoveToFrame(door1,0,100); MoveToFrame(door2,0,100); TeleportThing(ship1,door1); TeleportThing(player,actor); TeleportThing(actor,hidden); SetActionCog(-1,0); ClearActorFlags(player,0x840000); SetPulse(0); SetCameraFocus(0,player); SetAdjoinFlags(newdoor,0x7); ClearSurfaceFlags(newdoor,0x7); if(view!=GetCurrentCamera()) CycleCamera(); AutoSaveGame(); ReturnEx(0); } return; pulse: if(gtime1) view=0; } if(opened==1) { SetCameraFocus(0,cam0); # ParseArg(ship1,"move=physics staticdrag=1 airdrag=10 surfdrag=100 mass=10"); SetThingCollideSize(ship1,0.15); SetThingMoveSize(ship1,0.15); SetPhysicsFlags(ship1,0x42220); if(timing<0.025) { ApplyForce(ship1,VectorScale(VectorSub(GetSectorCenter(hanger),GetThingPos(ship1)),0.5)); ApplyForce(ship1,VectorSet(0,0,-1)); } else { ApplyForce(ship1,VectorScale(VectorSub(GetSectorCenter(hanger),GetThingPos(ship1)),timing*topspeed)); if(VectorLen(GetThingVel(ship1))>0) { if(VectorLen(GetThingVel(ship1))0) { if(VectorLen(GetThingVel(ship2))2) { # ParseArg(cam3,"airdrag=10"); SetThingLook(cam3,VectorSub(VectorAdd(GetThingPos(actor),VectorScale(GetThingLVec(actor),.2) ),GetThingPos(cam3))); If(VectorDist(GetThingPos(cam3),GetThingPos(actor))>.8) { ApplyForce(cam3,VectorSub( GetThingPos(actor),GetThingPos(cam3) )); SetCollideType(cam3,0); } else If(VectorDist(GetThingPos(cam3),GetThingPos(actor))<.5) { ApplyForce(cam3,VectorSub( GetThingPos(cam3),GetThingPos(actor) )); SetCollideType(cam3,0); } else { ApplyForce(cam3,VectorScale(GetThingRVec(cam3),timing*2.5)); SetCollideType(cam3,1); } } SetActorFlags(GetLocalPlayerThing(),0x2); gtime=GetFlexGameTime()%1; return; timer: If(GetSenderID()==4) { ClearThingFlags(ship1,0x10); ch1=PlaySoundThing(doorstart,door1,1,-1,100,0x80); ChangeSoundPitch(ch1,.25,timing*2); ch2=PlaySoundThing(doorstart,door2,1,-1,100,0x80); ChangeSoundPitch(ch2,.25,timing*2); SetTimerEx(1,5,0,0); } else If(GetSenderID()==5) { KillTimerEx(5); ch1=PlaySoundThing(doorstart,door1,1,-1,100,0x80); ChangeSoundPitch(ch1,.25,timing*2); ch2=PlaySoundThing(doorstart,door2,1,-1,100,0x80); ChangeSoundPitch(ch2,.25,timing*2); SetTimerEx(1,6,0,0); } else if(GetSenderID()==6) { KillTimerEx(6); ch1=PlaySoundThing(doorstop,door1,1,-1,100,0x80); ChangeSoundPitch(ch1,.25,timing*2); ch2=PlaySoundThing(doorstop,door2,1,-1,100,0x80); ChangeSoundPitch(ch2,.25,timing*2); ch1=PlaySoundThing(doormove,door1,0,-1,100,0x81); ch2=PlaySoundThing(doormove,door2,0,-1,100,0x81); ChangeSoundPitch(ch1,0.1/5,0.25); ChangeSoundPitch(ch2,0.1/5,0.25); SetTimerEx(0.25,7,0.1,0); } else if(GetSenderID()==7) { KillTimerEx(7); ChangeSoundVol(ch1,1,1); ChangeSoundVol(ch2,1,1); ChangeSoundPitch(ch1,GetParam(0)/5,1); ChangeSoundPitch(ch2,GetParam(0)/5,1); MoveToFrame(door1,1,GetParam(0)); MoveToFrame(door2,1,GetParam(0)); SetTimerEx(0.25,7,GetParam(0)+0.1,0); } else if(GetSenderID()==8) { KillTimerEx(7); KillTimerEx(8); KillTimerEx(19); ChangeSoundPitch(ch1,0.1,1); ChangeSoundPitch(ch2,0.1,1); StopSound(ch1,1); StopSound(ch2,1); ch1=PlaySoundThing(doorstart,door1,1,-1,100,0x80); ChangeSoundPitch(ch1,.25,timing*2); ch2=PlaySoundThing(doorstart,door2,1,-1,100,0x80); ChangeSoundPitch(ch2,.25,timing*2); ch1=PlaySoundThing(doorstop,door1,1,-1,100,0x80); ChangeSoundPitch(ch1,.25,timing*2); ch2=PlaySoundThing(doorstop,door2,1,-1,100,0x80); ChangeSoundPitch(ch2,.25,timing*2); } else if(GetSenderID()==9) { KillTimerEx(9); opened=3; # ParseArg(ship1,"move=path staticdrag=1 airdrag=1000 surfdrag=1000 mass=1000"); ship1_s=-1; while(ship1_s==-1) { ship1_s=FireProjectile(ship1,ship1_static,-1,-1,'0 0 0','0 0 0',0,0,0,0); sleep(0.001); } DestroyThing(ship1); ship1=-1; while(VectorDist(GetThingPos(rebel),GetThingPos(ship1_s))>.8) { t=-1; t=FireProjectile(ship1_s,GetThingTemplate(cam3),-1,-1,'.5 .2 .1','0 0 0',0,0,0,0); if(t!=-1) { TeleportThing(rebel,t); DestroyThing(t); } sleep(0.001); } } else if(GetSenderID()==10) { KillTimerEx(10); SetTimerEx(0.1,255,0,0); PlaySoundThing(KY_Welcome,actor,1,-1,100,0x80); jkPrintUniString(-3,70000); SetTimerEx(GetSoundLen(KY_Welcome),11,0,0); SetTimerEx(GetSoundLen(KY_Welcome),256,0,0); } else if(GetSenderID()==11) { KillTimerEx(11); SetTimerEx(0.1,257,0,0); PlaySoundThing(RE_Thanks,actor,1,-1,100,0x80); jkPrintUniString(-3,70001); SetTimerEx(GetSoundLen(RE_Thanks),12,0,0); SetTimerEx(GetSoundLen(RE_Thanks),258,0,0); } else if(GetSenderID()==12) { KillTimerEx(12); SetTimerEx(0.1,255,0,0); PlaySoundThing(KY_Supper,actor,1,-1,100,0x80); jkPrintUniString(-3,70002); SetTimerEx(GetSoundLen(KY_Supper),13,0,0); SetTimerEx(GetSoundLen(KY_Supper),256,0,0); } else if(GetSenderID()==13) { KillTimerEx(13); SetTimerEx(0.1,257,0,0); PlaySoundThing(RE_Flexible,actor,1,-1,100,0x80); jkPrintUniString(-3,70003); SetTimerEx(GetSoundLen(RE_Flexible),14,0,0); SetTimerEx(GetSoundLen(RE_Flexible),258,0,0); } else if(GetSenderID()==14) { KillTimerEx(14); SetTimerEx(0.1,257,0,0); PlaySoundThing(RE_YesSupper,actor,1,-1,100,0x80); jkPrintUniString(-3,70004); SetTimerEx(GetSoundLen(RE_YesSupper),15,0,0); SetTimerEx(GetSoundLen(RE_YesSupper),258,0,0); } else if(GetSenderID()==15) { KillTimerEx(15); SetTimerEx(0.1,255,0,0); PlaySoundThing(KY_Thanks,actor,1,-1,100,0x80); jkPrintUniString(-3,70005); SetTimerEx(GetSoundLen(KY_Thanks),16,0,0); SetTimerEx(GetSoundLen(KY_Thanks),256,0,0); } else if(GetSenderID()==16) { KillTimerEx(16); opened=5; AISetLookPos(actor,GetThingPos(ship2)); AISetLookPos(rebel,GetThingPos(ship2)); ClearThingFlags(ship2,0x10); ch=PlaySoundThing(engine2,ship2,1,-1,100,0x81); ch1=PlaySoundThing(doorstart,door1,1,-1,100,0x80); ChangeSoundPitch(ch1,.25,timing*2); ch2=PlaySoundThing(doorstart,door2,1,-1,100,0x80); ChangeSoundPitch(ch2,.25,timing*2); SetTimerEx(.5,17,0,0); } else If(GetSenderID()==17) { KillTimerEx(17); ch1=PlaySoundThing(doorstart,door1,1,-1,100,0x80); ChangeSoundPitch(ch1,.25,timing*2); ch2=PlaySoundThing(doorstart,door2,1,-1,100,0x80); ChangeSoundPitch(ch2,.25,timing*2); SetTimerEx(1,18,0,0); } else if(GetSenderID()==18) { KillTimerEx(18); ch1=PlaySoundThing(doorstop,door1,1,-1,100,0x80); ChangeSoundPitch(ch1,.25,timing*2); ch2=PlaySoundThing(doorstop,door2,1,-1,100,0x80); ChangeSoundPitch(ch2,.25,timing*2); ch1=PlaySoundThing(doormove,door1,0,-1,100,0x81); ch2=PlaySoundThing(doormove,door2,0,-1,100,0x81); ChangeSoundPitch(ch1,0.1/5,0.25); ChangeSoundPitch(ch2,0.1/5,0.25); SetTimerEx(0.25,19,0.1,0); } else if(GetSenderID()==19) { KillTimerEx(19); ChangeSoundVol(ch1,1,1); ChangeSoundVol(ch2,1,1); ChangeSoundPitch(ch1,GetParam(0)/5,1); ChangeSoundPitch(ch2,GetParam(0)/5,1); MoveToFrame(door1,0,GetParam(0)); MoveToFrame(door2,0,GetParam(0)); SetTimerEx(0.25,19,GetParam(0)+0.1,0); } else if(GetSenderID()==20) { KillTimerEx(20); SectorSound(hanger,dynamb,0.05); ChangeSoundPitch(ch,0.1,3); StopSound(ch,3); SetTimerEx(1,21,0,0); } else if(GetSenderID()==21) { KillTimerEx(21); AISetLookPos(actor,GetThingPos(ship2)); AISetLookPos(rebel,GetThingPos(ship2)); opened=7; SetTimerEx(0.025,30,BO_OhNo,0); PlaySoundLocal(BO_OhNo,1,0,0x0); jkPrintUniString(-3,70006); SetTimerEx(GetSoundLen(BO_OhNo),22,0,0); } else if(GetSenderID()==22) { KillTimerEx(22); SetTimerEx(0.025,30,BO_NoSupper,0); PlaySoundLocal(BO_NoSupper,1,0,0x0); jkPrintUniString(-3,70007); SetTimerEx(GetSoundLen(BO_NoSupper)+1,23,0,0); } else if(GetSenderID()==23) { KillTimerEx(23); AISetLookPos(actor,GetThingPos(rebel)); AISetLookPos(rebel,GetThingPos(actor)); SetTimerEx(0.1,255,0,0); PlaySoundThing(KY_Sigh,actor,1,-1,100,0x80); jkPrintUniString(-3,70008); SetTimerEx(GetSoundLen(KY_Sigh),24,0,0); SetTimerEx(GetSoundLen(KY_Sigh),256,0,0); } else if(GetSenderID()==24) { TeleportThing(player,actor); TeleportThing(actor,hidden); SetActionCog(-1,0); ClearActorFlags(player,0x840000); SetPulse(0); SetCameraFocus(0,player); SetAdjoinFlags(newdoor,0x7); ClearSurfaceFlags(newdoor,0x7); ClearGoalFlags(player,10,3); ClearGoalFlags(player,11,3); SetGoalFlags(player,12,1); AutoSaveGame(); skipped=1; PlaySong(10,10,0); SetMusicVol(1); } else if(GetSenderID()==25) { ChangeSoundPitch(ch,.1,5); StopSound(ch,5); opened=2; } else if(GetSenderID()==30) { PlaySoundLocal(GetParam(0),0.8,(rand()*2)-1,0); SetTimerEx(0.025,31,GetParam(0),0); } else if(GetSenderID()==31) { PlaySoundLocal(GetParam(0),0.64,(rand()*2)-1,0); SetTimerEx(0.025,32,GetParam(0),0); } else if(GetSenderID()==32) { PlaySoundLocal(GetParam(0),0.512,(rand()*2)-1,0); SetTimerEx(0.025,33,GetParam(0),0); } else if(GetSenderID()==33) { PlaySoundLocal(GetParam(0),0.4096,(rand()*2)-1,0); SetTimerEx(0.025,34,GetParam(0),0); } else if(GetSenderID()==34) { PlaySoundLocal(GetParam(0),0.32768,(rand()*2)-1,0); SetTimerEx(0.025,35,GetParam(0),0); } else if(GetSenderID()==35) { PlaySoundLocal(GetParam(0),0.262144,(rand()*2)-1,0); SetTimerEx(0.025,36,GetParam(0),0); } else if(GetSenderID()==36) { PlaySoundLocal(GetParam(0),0.2097152,(rand()*2)-1,0); SetTimerEx(0.025,37,GetParam(0),0); } else if(GetSenderID()==37) { PlaySoundLocal(GetParam(0),0.16777216,(rand()*2)-1,0); SetTimerEx(0.025,38,GetParam(0),0); } else if(GetSenderID()==38) { PlaySoundLocal(GetParam(0),0.134217728,(rand()*2)-1,0); SetTimerEx(0.025,39,GetParam(0),0); } else if(GetSenderID()==39) { PlaySoundLocal(GetParam(0),0.1073741824,(rand()*2)-1,0); } else If(GetSenderID()==255) { KillTimerEx(255); SetMaterialCel(kkfagoat,rand()*14); SetTimerEx(0.1,255,0,0); } else if(GetSenderID()==256) { KillTimerEx(255); KillTimerEx(256); SetMaterialCel(kkfagoat,0); } else If(GetSenderID()==257) { KillTimerEx(257); SetMaterialCel(k3facef,rand()*14); SetTimerEx(0.1,257,0,0); } else if(GetSenderID()==258) { KillTimerEx(257); KillTimerEx(258); SetMaterialCel(k3facef,0); } return; arrived: If(GetSenderRef()==door1) { SetTimerEx(0.1,8,0,0); } return; end
# Void Hole! Connect two adjoins that aren't adjecent to each other. # ... Ok, just a small teleporter... # # By Edward symbols message entered sector inhere mask=-1 thing outhere end # code entered: If(GetSenderRef()!=inhere) return; if(VectorLen(GetThingLVec(GetSourceRef()))!=0) SetThingLook(outhere,GetThingLVec(GetSourceRef())); TeleportThing(GetSourceRef(),outhere); return; end
# This is a journey, into sound. # # By Edward symbols message startup message activated message arrived message pulse message touched message playeraction template Elevator template DormTroops template Rails thing ElevDorm thing ConsoleDorm thing DestDorm1 sector Dorm1 thing AwayDorm1 thing ElevDude thing ConsoleDude thing DestDude1 thing DestDude2 thing AwayDude1 thing AwayDude2 thing ElevCMD thing ConsoleCMD thing DestCMD thing AwayCMD thing DestDorm2 sector Dorm2 thing DestDorm3 sector Dorm3 thing TransUP1 thing TransDOWN1 # TransBACK - DestDorm1 #DOWN1 thing TransUP2 thing TransDOWN2 thing TransLEFT2 #END DOWN1 #DOWN2 # TransUP - DestDorm3 # TransDOWN - DestCMD thing TransFWR3 thing TransBACK3 #END DOWN2 #BACK3 thing TransUP4 thing TransFWR4 # TransBACK - DestDorm2 #END BACK3 #FWR4 thing TransFWR5 thing DestReactor1 thing DestReactor2 thing DestSpaceBACK thing DestSpaceDOWN #END FWR4 #UP1 thing DestReactor3 thing DestReactor4 thing TransDOWN6 thing TransBACK6 #END UP1 thing TransFWR7 thing TransRIGHT7 # TransBACK - DestDude1 sound ElevStart=df_elev2-1.wav sound ElevMove=df_elev2-2.wav sound ElevStop=df_elev3-3.wav sound ConsoleMove=stoneelevstart2.wav sound WeaponBoom=ejectpod.wav sound Crunch=landhard01.wav surface bnihambonus nolink thing CE=-1 local thing CE2=-1 local int ch0=-1 local int ch1=-1 local int chi local int i local int t local flex x local flex y local int inelev=0 local int goalframe local int trans=0 local int player local flex speed=20 local int arrow_cog int extras_cog end # code startup: player = GetLocalPlayerThing(); sleep(1); MoveToFrame(ConsoleDorm,1,1); MoveToFrame(ConsoleDude,1,1); MoveToFrame(ConsoleCMD,1,1); CaptureThing(ConsoleDorm); CaptureThing(ConsoleDude); CaptureThing(ConsoleCMD); return; activated: if(inelev!=0) return; if(GetSenderRef()==ConsoleDorm) { inelev=1; trans=0; PlaySoundThing(ConsoleMove,ConsoleDorm,1,-1,-1,0x80); MoveToFrame(ConsoleDorm,0,1); MoveToFrame(ConsoleDude,0,1); MoveToFrame(ConsoleCMD,0,1); SetPulse(0.001); SetActionCog(GetSelfCog(), 0x7FFFFFFF); } else if(GetSenderRef()==ConsoleCMD) { inelev=1; trans=30; PlaySoundThing(ConsoleMove,ConsoleCMD,1,-1,-1,0x80); MoveToFrame(ConsoleDorm,0,1); MoveToFrame(ConsoleDude,0,1); MoveToFrame(ConsoleCMD,0,1); SetPulse(0.001); SetActionCog(GetSelfCog(), 0x7FFFFFFF); } else if(GetSenderRef()==ConsoleDude) { inelev=1; trans=50; PlaySoundThing(ConsoleMove,ConsoleDude,1,-1,-1,0x80); MoveToFrame(ConsoleDorm,0,1); MoveToFrame(ConsoleDude,0,1); MoveToFrame(ConsoleCMD,0,1); SetPulse(0.001); SetActionCog(GetSelfCog(), 0x7FFFFFFF); } return; arrived: if(inelev==1) { if(GetSenderRef()==ConsoleDorm && GetThingSector(player)==GetThingSector(ElevDorm)) { if(GetCurFrame(ConsoleDorm)==1) { inelev=0; SetActionCog(-1, 0); } else if(GetCurFrame(ConsoleDorm)==0) { SetPulse(0); CE=-1; while(CE==-1) { CE=CreateThing(Elevator,AwayDorm1); sleep(0.001); } CaptureThing(CE); printint(ElevDorm); SetCollideType(ConsoleDorm,0); SetThingFlags(ConsoleDorm,0x10); printint(GetCollideType(ElevDorm)); while(GetCollideType(ElevDorm)!=0) { printint(GetCollideType(ElevDorm)); SetCollideType(ElevDorm,0); printint(GetCollideType(ElevDorm)); SetThingFlags(ElevDorm,0x10); } SetCollideType(ConsoleDude,0); SetThingFlags(ConsoleDude,0x10); while(GetCollideType(ElevDude)!=0) { SetCollideType(ElevDude,0); SetThingFlags(ElevDude,0x10); } SetCollideType(ConsoleCMD,0); SetThingFlags(ConsoleCMD,0x10); while(GetCollideType(ElevCMD)!=0) { SetCollideType(ElevCMD,0); SetThingFlags(ElevCMD,0x10); } SetThingFlags(CE,0x5); SetThingLight(CE,1,0); PlaySoundThing(ElevStart,CE,1,-1,-1,0x80); if(ch0==-1) ch0=PlaySoundThing(ElevMove,CE,1,-1,-1,0x81); MoveToFrame(CE,1,speed); trans=1; goalframe=2; } } else if(GetSenderRef()==ConsoleCMD && GetThingSector(player)==GetThingSector(ElevCMD)) { if(GetCurFrame(ConsoleCMD)==1) { inelev=0; SetActionCog(-1, 0); } else if(GetCurFrame(ConsoleCMD)==0) { SetPulse(0); CE=-1; while(CE==-1) { CE=CreateThing(Elevator,AwayCMD); sleep(0.001); } CaptureThing(CE); SetCollideType(ConsoleDorm,0); SetThingFlags(ConsoleDorm,0x10); while(GetCollideType(ElevDorm)!=0) { SetCollideType(ElevDorm,0); SetThingFlags(ElevDorm,0x10); } SetCollideType(ConsoleDude,0); SetThingFlags(ConsoleDude,0x10); while(GetCollideType(ElevDude)!=0) { SetCollideType(ElevDude,0); SetThingFlags(ElevDude,0x10); } SetCollideType(ConsoleCMD,0); SetThingFlags(ConsoleCMD,0x10); while(GetCollideType(ElevCMD)!=0) { SetCollideType(ElevCMD,0); SetThingFlags(ElevCMD,0x10); } SetThingFlags(CE,0x5); SetThingLight(CE,1,0); PlaySoundThing(ElevStart,CE,1,-1,-1,0x80); if(ch0==-1) ch0=PlaySoundThing(ElevMove,CE,1,-1,-1,0x81); MoveToFrame(CE,1,speed); trans=3; goalframe=3; } } else if(GetSenderRef()==ConsoleDude && GetThingSector(player)==GetThingSector(ElevDude)) { if(GetCurFrame(ConsoleDude)==1) { inelev=0; SetActionCog(-1, 0); } else if(GetCurFrame(ConsoleDude)==0) { SetPulse(0); CE=-1; while(CE==-1) { CE=CreateThing(Elevator,AwayDude1); sleep(0.001); } CaptureThing(CE); SetCollideType(ConsoleDorm,0); SetThingFlags(ConsoleDorm,0x10); while(GetCollideType(ElevDorm)!=0) { SetCollideType(ElevDorm,0); SetThingFlags(ElevDorm,0x10); } SetCollideType(ConsoleDude,0); SetThingFlags(ConsoleDude,0x10); while(GetCollideType(ElevDude)!=0) { SetCollideType(ElevDude,0); SetThingFlags(ElevDude,0x10); } SetCollideType(ConsoleCMD,0); SetThingFlags(ConsoleCMD,0x10); while(GetCollideType(ElevCMD)!=0) { SetCollideType(ElevCMD,0); SetThingFlags(ElevCMD,0x10); } SetThingFlags(CE,0x5); SetThingLight(CE,1,0); PlaySoundThing(ElevStart,CE,1,-1,-1,0x80); if(ch0==-1) ch0=PlaySoundThing(ElevMove,CE,1,-1,-1,0x81); MoveToFrame(CE,1,speed); trans=60; goalframe=1; } } else if(GetSenderRef()==CE) { if(GetCurFrame(CE)>=goalframe) { StopSound(ch0,0.25); ch0=-1; PlaySoundPos(ElevStop,GetThingPos(CE),1,-1,-1,0x0); if(trans==100) { for(x=-0.15; x<=0.15; x=x+0.01) { for(y=-0.15; y<=0.15; y=y+0.01) { FireProjectile(CE,Rails,-1,-1,VectorSet(x,0.2,y),'0 180 0',0,0,0,0); ClearActorFlags(player,0x8); } sleep(0.001); } } else { if(trans==30) { DestroyThing(CE); CE=-1; ClearThingFlags(ConsoleCMD,0x10); ClearThingFlags(ElevCMD,0x10); SetCollideType(ConsoleCMD,3); SetCollideType(ElevCMD,3); PlaySoundThing(ConsoleMove,ConsoleCMD,1,-1,-1,0x80); MoveToFrame(ConsoleCMD,1,1); } else if(trans==40) { inelev=1; CE2=-1; while(CE2==-1) { CE2=CreateThing(Elevator,DestDude2); sleep(0.001); } call elev_setup; SetSurfaceLight(bnihambonus,0,0); trans=50; goalframe=1; } else if(trans==50) { DestroyThing(CE); CE=-1; ClearThingFlags(ConsoleDude,0x10); ClearThingFlags(ElevDude,0x10); SetCollideType(ConsoleDude,3); SetCollideType(ElevDude,3); PlaySoundThing(ConsoleMove,ConsoleDude,1,-1,-1,0x80); MoveToFrame(ConsoleDude,1,1); } else if(trans==60) { inelev=1; CE2=-1; while(CE2==-1) { CE2=CreateThing(Elevator,AwayDude2); sleep(0.001); } call elev_setup; SetSurfaceLight(bnihambonus,1,0); trans=7; goalframe=7; } else if(trans==120) { inelev=1; CE2=-1; while(CE2==-1) { CE2=CreateThing(Elevator,DestReactor2); sleep(0.001); } call elev_setup; trans=121; goalframe=1; } else if(trans==121) { ClearActorFlags(player,0x8); DamageThing(player,65535,0x1F,player); for(i=0; i<8; i=i+1) { ch1=PlaySoundLocal(WeaponBoom,1,0,0x100); ChangeSoundPitch(ch1,0.25,0.1); } if(ch0==-1) ch0=PlaySoundThing(ElevMove,CE,1,-1,-1,0x81); AddDynamicAdd(player,290,290,290); MoveToFrame(CE,2,speed); goalframe=2; trans=0; } else if(trans==130) { inelev=1; CE2=-1; while(CE2==-1) { CE2=CreateThing(Elevator,DestReactor4); sleep(0.001); } call elev_setup; trans=121; goalframe=1; } else if(trans==150) { inelev=0; trans=151; MoveToFrame(CE,goalframe+1,speed); SetPulse(0.001); } else { inelev=2; SendMessageEx(arrow_cog,user1,trans,CE,0,0); } } } else { PlaySoundThing(ElevStart,CE,1,-1,-1,0x80); MoveToFrame(CE,GetCurFrame(CE)+1,speed); } } } return; pulse: if(CE==-1) { if(trans==0) SetThingVel(player,VectorScale(VectorSub(GetThingPos(ElevDorm),GetThingPos(player)),10)); else if(trans==30) SetThingVel(player,VectorScale(VectorSub(GetThingPos(ElevCMD),GetThingPos(player)),10)); else if(trans==50) SetThingVel(player,VectorScale(VectorSub(GetThingPos(ElevDude),GetThingPos(player)),10)); } else { if(trans==151) { for(i=65537; i<131072; i=i+1) StopSound(i,0); ClearActorFlags(player,0x8); DamageThing(player,1,0x20,player); DetachThing(player); } } return; touched: if(GetSenderRef()==CE && GetThingType(GetSourceRef())==2) { PlaySoundThing(Crunch,GetSourceRef(),1,-1,-1,0x100); DamageThing(GetSourceRef(),65535,0x1,GetSenderRef()); DetachThing(GetSourceRef()); SetThingVel(GetSourceRef(),VectorSet( (rand()*2)-1,10,2 )); } return; elev_setup: SendMessageEx(arrow_cog,user0,0,0,0,0); ReleaseThing(CE); DestroyThing(CE); CE=CE2; CaptureThing(CE); SetThingLook(CE,GetThingLVec(player)); StopThing(player); CycleCamera(); TeleportThing(player,CE); sleep(0.001); CycleCamera(); SetThingLook(CE,'0 1 0'); SetThingLight(CE,1,0); PlaySoundThing(ElevStart,CE,1,-1,-1,0x80); if(ch0==-1) ch0=PlaySoundThing(ElevMove,CE,1,-1,-1,0x81); MoveToFrame(CE,1,speed); return; playeraction: if(GetParam(0)==4) // Strafe { // cont if(GetParam(2)<0) // Left { if(inelev==2) { if(trans==2) { inelev=1; CE2=-1; while(CE2==-1) { CE2=CreateThing(Elevator,TransLEFT2); sleep(0.001); } call elev_setup; trans=7; goalframe=1; } else if(trans==3) { inelev=1; CE2=-1; while(CE2==-1) { CE2=CreateThing(Elevator,TransFWR3); sleep(0.001); } SendMessage(extras_cog,user0); call elev_setup; trans=2; goalframe=2; } else if(trans==4) { inelev=1; CE2=-1; while(CE2==-1) { CE2=CreateThing(Elevator,TransFWR4); sleep(0.001); } call elev_setup; trans=5; goalframe=6; } else if(trans==5) { inelev=1; CE2=-1; while(CE2==-1) { CE2=CreateThing(Elevator,TransFWR5); sleep(0.001); } call elev_setup; trans=4; goalframe=6; } } } else if(GetParam(2)>0) // Right { if(inelev==2) { if(trans==1) { inelev=1; CE2=-1; while(CE2==-1) { CE2=CreateThing(Elevator,DestDorm1); sleep(0.001); } call elev_setup; trans=100; goalframe=2; for(i=0; i<32; i=i+1) { t=-1; t=CreateThingAtPos(DormTroops,Dorm1,GetSectorCenter(Dorm1),'0 180 0'); if(t!=-1) SetThingVel(t,VectorSet( (rand()*2)-1,(rand()*2)-1,(rand()*2)-1 )); } } else if(trans==3) { inelev=1; CE2=-1; while(CE2==-1) { CE2=CreateThing(Elevator,TransBACK3); sleep(0.001); } SendMessage(extras_cog,user1); call elev_setup; trans=4; goalframe=4; } else if(trans==4) { inelev=1; CE2=-1; while(CE2==-1) { CE2=CreateThing(Elevator,DestDorm2); sleep(0.001); } call elev_setup; trans=100; goalframe=5; for(i=0; i<32; i=i+1) { t=-1; t=CreateThingAtPos(DormTroops,Dorm2,GetSectorCenter(Dorm2),'0 180 0'); if(t!=-1) SetThingVel(t,VectorSet( (rand()*2)-1,(rand()*2)-1,(rand()*2)-1 )); } } else if(trans==5) { inelev=1; CE2=-1; while(CE2==-1) { CE2=CreateThing(Elevator,DestSpaceBACK); sleep(0.001); } call elev_setup; trans=150; goalframe=1; } else if(trans==6) { inelev=1; CE2=-1; while(CE2==-1) { CE2=CreateThing(Elevator,TransBACK6); sleep(0.001); } call elev_setup; trans=7; goalframe=1; } else if(trans==7) { inelev=1; CE2=-1; while(CE2==-1) { CE2=CreateThing(Elevator,TransRIGHT7); sleep(0.001); } call elev_setup; SetSurfaceLight(bnihambonus,0,0); trans=2; goalframe=1; } } } ReturnEx(0); } else if(GetParam(0)==6) // Walk { // cont if(GetParam(2)<0) // Back { if(inelev==2) { if(trans==1) { inelev=1; CE2=-1; while(CE2==-1) { CE2=CreateThing(Elevator,TransDOWN1); sleep(0.001); } call elev_setup; trans=2; goalframe=11; } else if(trans==2) { inelev=1; CE2=-1; while(CE2==-1) { CE2=CreateThing(Elevator,TransDOWN2); sleep(0.001); } call elev_setup; trans=3; goalframe=2; } else if(trans==3) { inelev=1; CE2=-1; while(CE2==-1) { CE2=CreateThing(Elevator,DestCMD); sleep(0.001); } SendMessage(extras_cog,user0); call elev_setup; trans=30; goalframe=3; } else if(trans==5) { inelev=1; CE2=-1; while(CE2==-1) { CE2=CreateThing(Elevator,DestSpaceDOWN); sleep(0.001); } call elev_setup; trans=150; goalframe=2; } else if(trans==6) { inelev=1; CE2=-1; while(CE2==-1) { CE2=CreateThing(Elevator,TransDOWN6); sleep(0.001); } call elev_setup; trans=1; goalframe=1; } else if(trans==7) { inelev=1; CE2=-1; while(CE2==-1) { CE2=CreateThing(Elevator,DestDude1); sleep(0.001); } call elev_setup; SetSurfaceLight(bnihambonus,1,0); trans=40; goalframe=7; } } } else if(GetParam(2)>0) // Forward { if(inelev==2) { if(trans==1) { inelev=1; CE2=-1; while(CE2==-1) { CE2=CreateThing(Elevator,TransUP1); sleep(0.001); } call elev_setup; trans=6; goalframe=1; } else if(trans==2) { inelev=1; CE2=-1; while(CE2==-1) { CE2=CreateThing(Elevator,TransUP2); sleep(0.001); } call elev_setup; trans=1; goalframe=11; } else if(trans==3) { inelev=1; CE2=-1; while(CE2==-1) { CE2=CreateThing(Elevator,DestDorm3); sleep(0.001); } call elev_setup; trans=100; goalframe=5; SendMessage(extras_cog,user1); for(i=0; i<32; i=i+1) { t=-1; t=CreateThingAtPos(DormTroops,Dorm3,GetSectorCenter(Dorm3),'0 180 0'); if(t!=-1) SetThingVel(t,VectorSet( (rand()*2)-1,(rand()*2)-1,(rand()*2)-1 )); } } else if(trans==4) { inelev=1; CE2=-1; while(CE2==-1) { CE2=CreateThing(Elevator,TransUP4); sleep(0.001); } call elev_setup; trans=3; goalframe=4; } else if(trans==5) { inelev=1; CE2=-1; while(CE2==-1) { CE2=CreateThing(Elevator,DestReactor1); sleep(0.001); } call elev_setup; trans=120; goalframe=2; } else if(trans==6) { inelev=1; CE2=-1; while(CE2==-1) { CE2=CreateThing(Elevator,DestReactor3); sleep(0.001); } call elev_setup; trans=130; goalframe=8; } else if(trans==7) { inelev=1; CE2=-1; while(CE2==-1) { CE2=CreateThing(Elevator,TransFWR7); sleep(0.001); } call elev_setup; SetSurfaceLight(bnihambonus,0,0); trans=6; goalframe=1; } } } ReturnEx(0); } return; end
"Thrusting" TYPE 8 SEQ 1 # 10: 0 1 LEVEL JETSONS.jkl 0 0 -1 -1 end
#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
# Jedi Knight Cog Script # # 00_BREAKINGGLASS.COG # # Generic breaking glass script to be linked to both sides # of a breakable glass pane. # # Note: the template used is shard00, NOT shard0 ! # # [YB] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved symbols surface glass mask=0x448 desc=glass surface glass2 mask=0x448 desc=glass_adjoin int spawnpoints=2 desc=spawn_points int density=5 desc=density vector surface_center local int surface_sector local int surface_vertices local vector vertex local vector where local int i local int j local int k local int a_shard local int dummy local template shard_tpl=shard00 local sound glass_break=GlassBreak1.WAV local message damaged end code damaged: // Add 10 cm along the normal to solve some rounding error or non planar face... surface_center = VectorAdd(SurfaceCenter(GetSenderRef()), VectorScale(GetSurfaceNormal(GetSenderRef()), 0.01)); surface_sector = GetSurfaceSector(GetSenderRef()); surface_vertices = GetNumSurfaceVertices(GetSenderRef()); dummy = PlaySoundPos(glass_break, surface_center, 1.0, 10.0, 20.0, 0); // First spawn 'density' shards with random velocities at the center of the face. for(k=0; k
# Jedi Knight Cog Script # # C2_BREAKINGGLASSCLIENT.COG # # all changes (c) Mark Jones 1998 # Client side part of the generic breaking glass script # This technique avoids sending info about glass shards # and the sound over the network. # # Note: the template used is shard00, NOT shard0 ! # # [YB] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved flags=0x240 symbols surface glass local surface glass2 local int spawnpoints=2 local int density=5 local vector surface_center local int surface_sector local int surface_sector2 local int surface_vertices local vector vertex local vector where local int i local int j local int k local int a_shard local int dummy local int player local template shard_tpl=shard00 local sound glass_break=GlassBreak1.WAV local sound wind_snd=00wind03.wav local sound blah=activate01.wav local message trigger message startup end # ======================================================================================== code startup: player=GetLocalPlayerThing(); return; trigger: If(GetSourceRef()==10002 + id) { glass = GetParam(0); glass2 = GetParam(1); SetFaceGeoMode(glass, 4); // GEOMETRY_NONE SetFaceGeoMode(glass2, 4); ClearAdjoinFlags(glass, 2); // Set ADJOIN_MOVE (allow passage) ClearAdjoinFlags(glass2, 2); PlaySoundPos(blah, GetSurfaceCenter(glass), 0.8, 5.0, 10.0, 0); if(IsServer()) { SyncSurface(glass); SyncSurface(glass2); } } // Handle only TRIGGER_BREAKINGGLASS if(GetSourceRef() != 10001 + id) Return; glass = GetParam(0); glass2 = GetParam(1); spawnpoints = GetParam(2); density = GetParam(3); // Add 10 cm along the normal to solve some rounding error or non planar face... surface_center = VectorAdd(SurfaceCenter(glass), VectorScale(GetSurfaceNormal(glass), 0.01)); surface_sector = GetSurfaceSector(glass); surface_sector2 = GetSurfaceSector(glass2); surface_vertices = GetNumSurfaceVertices(glass); dummy = PlaySoundPos(glass_break, surface_center, 1.0, 10.0, 20.0, 0); // First spawn 'density' shards with random velocities at the center of the face. for(k=0; k
# Jedi Knight Cog Script # # C2_BREAKINGGLASS.COG # # all changes (c) Mark Jones 1998 # respawns every 60 seconds # Generic breaking glass script to be linked to both sides # of a breakable glass pane. Will work in conjunction with # a client side only script to reduce network trafic. # # [YB] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved symbols surface glass mask=0x448 desc=glass surface glass2 mask=0x448 desc=glass_adjoin int spawnpoints=2 desc=spawn_points int density=5 desc=density int hurt=0 local int respawntime=60 message damaged message timer end # ======================================================================================== code damaged: if(hurt==1) Return; hurt = 1; SetTimer(respawntime); // Damage the projectile (so raildets don't stick in windows) DamageThing(GetSourceRef(), 10, 0x1, GetSourceRef()); // Send a TRIGGER_BREAKINGGLASS with its parameters if(GetSenderRef() == glass) SendTrigger(-1, 10001, glass, glass2, spawnpoints, density); else SendTrigger(-1, 10001, glass2, glass, spawnpoints, density); Return; timer: hurt=0; SendTrigger(-1, 10002, glass, glass2, 0, 0); Return; end
# Jedi Knight Cog Script # # M2_dettrap.cog # # This will generate a series of 4 TD's per 'round' when # the switch is activated. # The trap resets in 'delay' seconds afterwards. # # [YB/JS] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved # ======================================================================================== symbols surface switch desc=switch thing tdg1 nolink,desc=tdg1 thing tdg2 nolink,desc=tdg2 thing tdg3 nolink,desc=tdg3 thing tdg4 nolink,desc=tdg4 int rounds=2 desc=rounds flex rate=0.1 desc=rate flex delay=3.0 desc=delay int firing=0 local int cur_round=0 local int dummy local template proj_tpl=+grenade2 local sound on_snd=set_hi2.wav local sound off_snd=lgclick1.wav local message activated end # ======================================================================================== code activated: if(firing == 1) Return; firing = 1; dummy = SetWallCel(switch, 1); dummy = PlaySoundPos(on_snd, SurfaceCenter(switch), 1.0, 5.0, 10.0, 0); cur_round = 0; while(cur_round < rounds) { dummy = CreateThing(proj_tpl, tdg1); Sleep(rate); dummy = CreateThing(proj_tpl, tdg2); Sleep(rate); dummy = CreateThing(proj_tpl, tdg3); Sleep(rate); dummy = CreateThing(proj_tpl, tdg4); Sleep(rate); cur_round = cur_round + 1; } Sleep(delay); dummy = SetWallCel(switch, 0); dummy = PlaySoundPos(off_snd, SurfaceCenter(switch), 1.0, 5.0, 10.0, 0); firing = 0; Return; end
# teleport.cog # # Teleports the player to a ghost position upon entry into a sector # # Nightmare (6/16/98) #============================================================================ flags=0x240 symbols message entered message startup sector telechamber thing gotospot int player local int dummy local sound telesound=ForceThrow01.WAV template sparks=+telesparks end #============================================================================ code entered: player=GetLocalPlayerThing(); StopThing(player); dummy = CreateThing(sparks, player); dummy = PlaySoundLocal(telesound, 1.0, 0, 0); TeleportThing(player, gotospot); dummy = CreateThing(sparks, player); return; end
# particlestream.cog # # Creates a particle stream from a ghost position. # # based on 00_particlesystem by LEC # # 5/15/98 Joshua Knudsen symbols message startup message pulse thing streampos template stream=+upenergyhi int dummy local flex pul end code startup: setpulse(pul); return; pulse: dummy=CreateThing(stream, streampos); return; end
# # Jedi Knight Missions Cog Script # # MDM04_SLASHGRATE.COG # # [JM] added some fail safes, because in mp games, the surface may be able to be slashed twice before adjoin flags set, cause of lag. # # [TT] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved # symbols message damaged message pulse surface grate mask=0x440 surface grateback mask=0x440 sound cutsound=LtSaberHit12.wav local sound restore= material whole material hole int type local int time=0 local int iscut=0 local flex length=60.0 end code damaged: type = GetParam(1); if((type == 16) || (type == 4)) { if (iscut == 1) return; PlaySoundPos(cutsound, SurfaceCenter(grate), 1, -1, -1, 0); setsurfacemat(grate,hole); setsurfacemat(grateback,hole); setadjoinflags(grate,2); setadjoinflags(grateback,2); setpulse(1.0); iscut = 1; } return; pulse: If(time=length) { if (iscut == 0) return; PlaySoundPos(restore, SurfaceCenter(grate), 1, -1, -1, 0); setsurfacemat(grate, whole); setsurfacemat(grateback, whole); clearadjoinflags(grate, 2); clearadjoinflags(grateback, 2); setpulse(0); time=0; iscut = 0; } return; end
MSGS 3 # "" "" "JETSONS" 0 "Jetsons Tubes." "JETSONS_TEXT_00" 0 "Stand on the white platform and JUMP!" "JETSONS_TEXT_01" 0 "" END
# Jedi Knight Cog Script # # Extra camera view . COG # # This will allow you to see from another THING, like a MouseBot or a # Powerdroid, for a certain amount of time. # # # This Cog is Not supported by LucasArts Entertainment Co flags=0x240 symbols message startup message activated surface switch thing camera sound activation sound deactivation int nOn=2 local end #======================================================== #================================ code startup: SetWallCel(switch, 0); activated: if(GetSenderRef() != switch) return; nOn = 3 - nOn; if( nOn==1 ) { SetWallCel(switch, 1); print("Press F1 to see the detonation switch..."); SetCurrentCamera( 0 ); SetCameraFocus(0, camera); PlaySoundLocal(activation,2,-.5,0); } else { SetWallCel(switch, 0); #print("off"); SetCurrentCamera( 0 ); SetCameraFocus(0, GetLocalPlayerThing()); SetCurrentCamera( 1 ); SetCameraFocus(1, GetLocalPlayerThing()); PlaySoundLocal(deactivation,2,-.5,0); } return; #........................................................................................ end
#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
#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, 2000); // 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
#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, 3000); // 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
#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, 3000); // 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
#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, 4000); // 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
# Jedi Knight Cog Script # # modified 00_EXPLODEBRIS.COG # # Generic debris/sub explosions generation script # It can normally be linked to any star fighter, ... # # [YB]/ [DB] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved symbols thing explode_thing mask=0xfff thing piece1 thing piece2 thing piece3 thing piece4 thing piece5 int debris=5 desc=num_debris int a_debris local template explosion_tpl=+Vaporator_exp template pieces message damaged end code damaged: a_debris = CreateThing(explosion_tpl, explode_thing); CreateThing(pieces, piece1); CreateThing(pieces, piece2); CreateThing(pieces, piece3); CreateThing(pieces, piece4); CreateThing(pieces, piece5); DestroyThing(explode_thing); Return; end
# Jedi Knight Cog Script # # 07_boomchair.COG # # exploding chair cog # # [sxc] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved symbols message damaged thing wholechair mask=0x408 linkid=1 thing explosion template exp=+furniture_exp int damage=0 local int type local end # ======================================================================================== code damaged: type = GetParam(1); if (BitTest(type, 16)) { damage=damage+1; if (damage == 1) { CreateThing(exp, explosion); DestroyThing(wholechair); } } return; end
# Jedi Knight Cog Script # # 07_boomtable.COG # # exploding table cog # # [SXC] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved symbols message damaged thing wholetable mask=0x408 linkid=1 thing ghostpart0 mask=0x408 linkid=2 thing ghostpart1 mask=0x408 linkid=2 thing part0 local thing part1 local thing explosion template break0 template break1 template exp=+furniture_exp template pieces1 template pieces2 template pieces3 template pieces4 template pieces5 int damage=0 local int type local float movespeed=1.0 end # ======================================================================================== code damaged: type = GetParam(1); if (BitTest(type, 16)) { damage=damage+1; if (damage == 1) { CreateThing(exp, explosion); DestroyThing(wholetable); part0=CreateThing(break0, ghostpart0); part1=CreateThing(break1, ghostpart1); CreateThing(pieces1, ghostpart1); CreateThing(pieces2, ghostpart0); CreateThing(pieces3, ghostpart1); CreateThing(pieces4, ghostpart0); CreateThing(pieces5, ghostpart1); CaptureThing(part0); CaptureThing(part1); MoveToFrame(part0, 1, movespeed); MoveToFrame(part1, 1, movespeed); } } return; end
# Jedi Knight Cog Script # # 09_FuelExplode.cog # # This script makes a section of fuel pipes "explode" when # a weapon bolt hits the fuel. # # [YB/IS/RD] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved # ======================================================================================== symbols surface surf0 mask=0x8,linkid=0 surface surf1 mask=0x8,linkid=1 surface surf2 mask=0x8,linkid=2 surface surf3 mask=0x8,linkid=3 surface surf4 mask=0x8,linkid=4 surface surf5 mask=0x8,linkid=5 surface surf6 mask=0x8,linkid=6 surface surf7 mask=0x8,linkid=7 surface surf8 mask=0x8,linkid=8 int num_surfaces=0 local template explosion_tpl=+tie_exp local int i=0 local int j=0 local int explosion local int locked=0 local int tempVec local flex multiboom=1.0 // multiplier for extending boomtime flex scaleX=1.0 flex scaleY=1.0 flex scaleZ=0.7 message startup message crossed end # ======================================================================================== code startup: for (i=0; i<9; i=i+1) { if (surf0[i] == -1) return; num_surfaces = num_surfaces + 1; } return; crossed: if (GetFaceGeoMode(GetSenderRef()) == 0) return; // Face not rendered, fuel at different level, exit // This makes an explosion at the "impact" point. explosion = CreateThing(explosion_tpl, GetSourceRef()); DestroyThing(GetSourceRef()); // Ignore any new cross while in the loops, // except the impact point explosion above. if (locked) Return; locked = 1; for(i=GetSenderId(); i>=0; i=i-1) { for(j=0; j<4+(multiboom * 12 * Rand()); j=j+1) { sleep(.2); tempVec = VectorSet(scaleX*(Rand()-0.5), scaleY*(Rand()-0.5), scaleZ*Rand()); tempVec = VectorAdd(SurfaceCenter(surf0[i]), tempVec); explosion = CreateThingAtPos(explosion_tpl, GetSurfaceSector(surf0[i]), tempVec, '0.0 0.0 0.0'); } } for(i=GetSenderId()+1; i < num_surfaces; i=i+1) { for(j=0; j<4+(multiboom * 12 * Rand()); j=j+1) { sleep(.2); tempVec = VectorSet(scaleX*(Rand()-0.5), scaleY*(Rand()-0.5), scaleZ*Rand()); tempVec = VectorAdd(SurfaceCenter(surf0[i]), tempVec); explosion = CreateThingAtPos(explosion_tpl, GetSurfaceSector(surf0[i]), tempVec, '0.0 0.0 0.0'); } } locked = 0; return; end
# Jedi Knight Cog Script # # 11_sound.cog # # Script to play a sound in two sectors # # [DB] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved symbols message startup thing ghost0 thing ghost1 sound wind=18particlestream01.wav local end ## Code Section code startup: Sleep(5.0); PlaySoundPos(wind, GetThingPos(ghost0), 0.75, -1, 7.5, 1); PlaySoundPos(wind, GetThingPos(ghost1), 0.75, -1, 7.5, 1); return; end
# Jedi Knight Cog Script # # 16a_apocalypse.cog # # Drops object at adjoin trigger. # # [JS] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved symbols message startup message crossed message arrived message timer sound wav0 sound wav1 sound wav2 thing ghost0 desc=a_ghost_thing_in_leia thing ghost1 desc=a_ghost_thing_in_leia thing ghost2 desc=a_ghost_thing_in_leia thing ghost3 desc=a_ghost_thing_in_leia thing ghost4 desc=a_ghost_thing_in_leia thing ghost5 desc=a_ghost_thing_in_leia thing ghost6 desc=a_ghost_thing_in_leia thing crate0 int bnosound=0 local int explosion local float movespeed=2 template explosion_tpl=+grenade_exp local template pieces surface trigface end # ======================================================================================== code startup: bnosound=0; return; # ........................................................................................ crossed: if (bnosound==0) { PlaySoundLocal(wav0, 1.0, 0.0, 0); explosion = CreateThing(explosion_tpl, ghost0); CreateThing(pieces, ghost0); explosion = CreateThing(explosion_tpl, ghost1); CreateThing(pieces, ghost1); MoveToFrame(crate0, 1, movespeed); SetTimer(2.0); bnosound=1; } return; # ........................................................................................ timer: explosion = CreateThing(explosion_tpl, ghost2); CreateThing(pieces, ghost2); explosion = CreateThing(explosion_tpl, ghost3); CreateThing(pieces, ghost3); explosion = CreateThing(explosion_tpl, ghost4); CreateThing(pieces, ghost4); return; # ........................................................................................ arrived: PlaySoundLocal(wav1, 1.0, 0.0, 0); explosion = CreateThing(explosion_tpl, ghost5); CreateThing(pieces, ghost5); explosion = CreateThing(explosion_tpl, ghost6); CreateThing(pieces, ghost6); return; end
# Jedi Knight Cog Script # # 16a_calamity.cog # # Drops object at adjoin trigger. # # [JS] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved symbols message startup message crossed message timer message arrived sound wav0 sound wav1 sound wav2 thing ghost0 desc=a_ghost_thing_in_leia thing ghost1 desc=a_ghost_thing_in_leia thing ghost2 desc=a_ghost_thing_in_leia thing ghost3 desc=a_ghost_thing_in_leia thing ghost4 desc=a_ghost_thing_in_leia thing ghost5 desc=a_ghost_thing_in_leia thing crate0 int bnosound=0 local int explosion local float movespeed=2 template explosion_tpl=+grenade_exp local template pieces surface trigface surface trigface2 end # ======================================================================================== code startup: bnosound=0; return; # ........................................................................................ crossed: if (bnosound==0) SetTimer(0.25); return; # ........................................................................................ timer: { PlaySoundLocal(wav0, 1.0, 0.0, 0); explosion = CreateThing(explosion_tpl, ghost0); CreateThing(pieces, ghost0); explosion = CreateThing(explosion_tpl, ghost1); CreateThing(pieces, ghost1); MoveToFrame(crate0, 1, movespeed); bnosound=1; } return; # ........................................................................................ arrived: PlaySoundLocal(wav1, 1.0, 0.0, 0); explosion = CreateThing(explosion_tpl, ghost2); CreateThing(pieces, ghost2); explosion = CreateThing(explosion_tpl, ghost3); CreateThing(pieces, ghost3); explosion = CreateThing(explosion_tpl, ghost4); CreateThing(pieces, ghost4); explosion = CreateThing(explosion_tpl, ghost5); CreateThing(pieces, ghost5); return; end
# Jedi Knight Cog Script # # 16a_catwalk.cog # # This script extends a catwalk activated by a switch # # [IS] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved # ======================================================================================== symbols message activate surface switch0 linkid=1 surface switch1 linkid=1 thing catwalk0 nolink1 thing catwalk1 nolink1 float speed=1.0 sound wav0=beep1.wav end # ======================================================================================== code activate: if (GetWallCel(switch0) == 1) // put down if already activated SetWallCel(switch0, 0); SetWallCel(switch1, 0); PlaySoundPos(wav0, SurfaceCenter(switch0), 1, -1, -1, 0); PlaySoundPos(wav0, SurfaceCenter(switch1), 1, -1, -1, 0); MoveToFrame(catwalk0, 0, speed); MoveToFrame(catwalk1, 0, speed); return; if (GetWallCel(switch1) == 1) SetWallCel(switch0, 0); SetWallCel(switch1, 0); PlaySoundPos(wav0, SurfaceCenter(switch0), 1, -1, -1, 0); PlaySoundPos(wav0, SurfaceCenter(switch1), 1, -1, -1, 0); MoveToFrame(catwalk0, 0, speed); MoveToFrame(catwalk1, 0, speed); return; // bring up if not SetWallCel(switch0, 1); SetWallCel(switch1, 1); PlaySoundPos(wav0, SurfaceCenter(switch0), 1, -1, -1, 0); PlaySoundPos(wav0, SurfaceCenter(switch1), 1, -1, -1, 0); MoveToFrame(catwalk0, 1, speed); MoveToFrame(catwalk1, 1, speed); return; end
# Jedi Knight Cog Script # # 16a_chase.cog # # Object moves to frames at adjoin trigger. # # [JS] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved # ======================================================================================== symbols message startup message crossed message arrived sound wav0 sound wav1 sound wav2 thing ghost0 desc=a_ghost_thing_in_leia thing ghost1 desc=a_ghost_thing_in_leia thing ghost2 desc=a_ghost_thing_in_leia thing ghost3 desc=a_ghost_thing_in_leia thing ghost4 desc=a_ghost_thing_in_leia thing ghost5 desc=a_ghost_thing_in_leia thing ghost6 desc=a_ghost_thing_in_leia thing crate0 int bnosound=0 local int explosion local int curframe local int channel local float movespeed=2 float curspeed=2 local template explosion_tpl=+grenade_exp local template pieces surface trigface end # ======================================================================================== code startup: curspeed=movespeed; bnosound=0; return; # ........................................................................................ crossed: if (bnosound==0) { PlaySoundLocal(wav0, 1.0, 0.0, 0); MoveToFrame(crate0, 1, curspeed); channel=PlaySoundThing(wav1, crate0, 1.0, -1, 200, 1.0); bnosound=1; } return; # ........................................................................................ arrived: curframe=GetCurFrame(crate0); if (curframe==1) { curspeed=movespeed+4; } else if (curframe==2) { curspeed=movespeed+4; } else if (curframe==3) { curspeed=movespeed; } else if (curframe==5) { curspeed=movespeed+8; StopSound(channel, 0.0); } else if (curframe==6) { DestroyThing(crate0); explosion = CreateThing(explosion_tpl, ghost0); CreateThing(pieces, ghost0); explosion = CreateThing(explosion_tpl, ghost1); CreateThing(pieces, ghost1); explosion = CreateThing(explosion_tpl, ghost2); CreateThing(pieces, ghost2); explosion = CreateThing(explosion_tpl, ghost3); CreateThing(pieces, ghost3); explosion = CreateThing(explosion_tpl, ghost4); CreateThing(pieces, ghost4); explosion = CreateThing(explosion_tpl, ghost5); CreateThing(pieces, ghost5); explosion = CreateThing(explosion_tpl, ghost6); CreateThing(pieces, ghost6); return; } MoveToFrame(crate0, curframe+1, curspeed); return; end
# Jedi Knight Cog Script # # 16a_crowarm.cog # # This script lowers the mooring arm and the crow. # # [IS/JS] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved # ======================================================================================== symbols message startup message activate message timer surface switch0 linkid=1 thing crow nolink thing arm nolink thing ghost0 desc=a_ghost_thing_in_leia thing ghost1 desc=a_ghost_thing_in_leia thing ghost2 desc=a_ghost_thing_in_leia template explosion_tpl=+grenade_exp float speed=1.0 sound wav0=beep1.wav end # ======================================================================================== code startup: AttachThingToThing(arm, crow); return; # ........................................................................................ activate: if (GetWallCel(switch0) == 1) // ignore if already activated return; SetWallCel(switch0, 1); PlaySoundPos(wav0, SurfaceCenter(switch0), 1, -1, -1, 0); MoveToFrame(crow, 1, speed); explosion = CreateThing(explosion_tpl, ghost0); SetTimer(2.0); return; # ........................................................................................ timer: explosion = CreateThing(explosion_tpl, ghost1); explosion = CreateThing(explosion_tpl, ghost2); return; end
# Jedi Knight Cog Script # # 16a_outerdoors.cog # # Closes two sets of doors at startup. # # [IS/JS] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved # ======================================================================================== symbols message startup message timer thing door0 nolink thing door1 nolink thing door2 nolink thing door3 nolink thing ghost0 desc=a_ghost_thing_in_leia thing ghost1 desc=a_ghost_thing_in_leia thing ghost2 desc=a_ghost_thing_in_leia float speed=2.0 template explosion_tpl=+grenade_exp local end # ======================================================================================== code startup: // need to play some sound here MoveToFrame(door0, 1, speed); MoveToFrame(door1, 1, speed); MoveToFrame(door2, 1, speed); MoveToFrame(door3, 1, speed); explosion = CreateThing(explosion_tpl, ghost0); SetTimer(3.0); return; # ................................................................................. timer: explosion = CreateThing(explosion_tpl, ghost1); explosion = CreateThing(explosion_tpl, ghost2); return; end
# Jedi Knight Cog Script # # 16a_RandomExplosions.cog # # Creates random explosions in the sector the player is in. # # Explosion damage based on level difficulty settings. # # [JS] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved # ======================================================================================== symbols message startup message pulse float expChance=0.3 float pulseRate=2.0 template explosion_tpl1=16_exp template explosion_tpl2=16_exp template explosion_tpl3=16_exp template explosion_tpl4=16_exp template explosion_tpl5=16_exp int curSector local float exp local end # ======================================================================================== code startup: SetPulse(pulseRate); return; # ................................................................................. pulse: curSector = GetThingSector(jkGetLocalPlayer()); // print("Current sector:"); // printint(curSector); // find out if we make explosion if (rand() > expChance) return; // print("Making Explosion."); exp=rand()*5 // make explosion if (exp = 0) { CreateThingAtPos(explosion_tpl1, curSector, GetSectorVertexPos(curSector, (Rand()*GetNumSectorVertices(curSector))), '0.0 0.0 0.0'); } else if (exp = 1) { CreateThingAtPos(explosion_tpl2, curSector, GetSectorVertexPos(curSector, (Rand()*GetNumSectorVertices(curSector))), '0.0 0.0 0.0'); } else if (exp = 2) { CreateThingAtPos(explosion_tpl3, curSector, GetSectorVertexPos(curSector, (Rand()*GetNumSectorVertices(curSector))), '0.0 0.0 0.0'); } else if (exp = 3) { CreateThingAtPos(explosion_tpl4, curSector, GetSectorVertexPos(curSector, (Rand()*GetNumSectorVertices(curSector))), '0.0 0.0 0.0'); } else if (exp = 4) { CreateThingAtPos(explosion_tpl5, curSector, GetSectorVertexPos(curSector, (Rand()*GetNumSectorVertices(curSector))), '0.0 0.0 0.0'); return; end
# Jedi Knight Cog Script # # 16a_RandomAmbient.cog # # Plays a random sound at random intervals with random volume and panning # # [JS] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved # ======================================================================================== symbols message startup message timer message pulse sound wav0 sound wav1 sound wav2 sound wav3 sound wav4 sound wav5 sound wav6 sound wav7 sound wav8 sound wav9 int numsounds flex min_interval flex range_interval flex min_volume flex range_volume int temp local int counter=0 local vector posOffset local vector angOffset local end # ======================================================================================== code startup: SetTimer(min_interval+(rand()*range_interval)); return; # ................................................................................. timer: temp = rand()*numsounds; PlaySoundLocal(wav0[temp], (min_volume+(rand()*range_volume)), ((rand()*2)-1.0), 0); SetPOVShake('0.0 -.01 0.0', '1.0 0.0 0.0', .5, 80.0); SetTimer(min_interval+(rand()*range_interval)); SetPulse(0.1); return; # ................................................................................. pulse: if (counter < 8) { counter=counter+1; posOffset = VectorSet(Rand()*0.01, Rand()*0.01, Rand()*0.01); angOffset = VectorSet(Rand(), Rand(), Rand()); SetPOVShake(posOffset, angOffset, .5, 80.0); // SetPOVShake('0.0 -.01 0.0', '1.0 0.0 0.0', .1, 80.0); } else if (counter == 8) { SetPulse(0); counter=0; } return; end
# Jedi Knight Cog Script # # 16a_redlight.cog # # Klaxon light for falling ship. # # This cog changes the assigned sectors' colormaps to red. # sleepTime0 = time to sleep with colormap 0 # sleepTime1 = time to sleep with colormap 1 # period = determines how quickly light fades to black # # [IS] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved # ======================================================================================== symbols message startup message pulse sector sect0 nolink sector sect1 nolink sector sect2 nolink sector sect3 nolink sector sect4 nolink sector sect5 nolink sector sect6 nolink sector sect7 nolink sector sect8 nolink sector sect9 nolink sector sect10 nolink sector sect11 nolink sector sect12 nolink sector sect13 nolink sector sect14 nolink sector sect15 nolink float period=1.0 int cmap=0 local int i=0 local end # ======================================================================================== code startup: SetPulse(period); return; # ................................................................................. pulse: cmap = 1 - cmap; for (i=0; i<=15; i=i+1) { if (sect0[i] >= 0) SetColorMap(sect0[i], cmap); } return; end
# Jedi Knight Cog Script # # 16b_Rahn's line # # Plays Rahn's voice after timer at startup. # # Wav files attached leia, different files for light side # and dark side. # # [JS] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved # ======================================================================================== symbols message startup sound wav0 sound wav1 sound wav2 sound wav3 sound wav4 end # ======================================================================================== code startup: Sleep(5.0); PlaySoundLocal(wav0, 1.0, 0.0, 0); Sleep(1.0); PlaySoundLocal(wav1, 1.0, 0.0, 0); Sleep(1.0); PlaySoundLocal(wav2, 1.0, 0.0, 0); Sleep(1.0); PlaySoundLocal(wav3, 1.0, 0.0, 0); Sleep(1.0); PlaySoundLocal(wav4, 1.0, 0.0, 0); Sleep(1.0); Print("This level has stopped falling!") return; end
# Jedi Knight Cog Script # # 19_counterweight.cog # # Counterweight puzzle. # # Pressing a 3do button causes the button to sink into a wall, # a stone door to open incrementally, and a counterweight to # adjust accordingly. This script has only a single button. # # [IS/JS] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved # ======================================================================================== symbols message activate message arrived message damaged thing door0 nolink thing counterweight linkid=1 thing button0 linkid=2 thing rope linkid=3 mask=-1 thing victim nolink local flex movespeed=2.0 flex fallspeed=18.0 flex lightvalue=0.5 int currentstop=0 local int type local int ropebroke=0 local end # ======================================================================================== code activate: if (ropebroke == 1) return; if (GetSenderRef() != button0) return; if (IsMoving(button0)) return; if (GetCurFrame(button0) != 0) return; currentstop = currentstop+1; if (currentstop == 5) { currentstop = 0; } MoveToFrame(button0, 1, movespeed); MoveToFrame(door0, currentstop, movespeed); MoveToFrame(counterweight, currentstop, movespeed); return; # ........................................................................................ arrived: if (ropebroke == 1) return; if (GetSenderRef() != counterweight) return; MoveToFrame(button0, 0, movespeed); return; # ........................................................................................ damaged: // only one thing generates damaged messages victim=GetSenderRef(); if (victim == rope) { type = GetParam(1); if(type == 16) { DestroyThing(rope); SkipToFrame(counterweight, 5, fallspeed); SkipToFrame(door0, 4, fallspeed); ropebroke=1; } } return; end
# Jedi Knight Cog Script # # 21_Core.cog # # Controls the valley core including: # Particle flow up the tube # Statue "creep" towards the center # # [IS] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved symbols message startup message activate message pulse message arrived message timer message user1 message user2 thing statue0 linkid=1 thing statue1 linkid=1 float creepRate local float creepRateEasy=0.25 local float creepRateMed=0.5 local float creepRateHard=1.0 local thing switch0 linkid=2 thing switch1 linkid=2 float thrustSpeed=6.0 local sector tube0 nolink sector tube1 nolink thing particleGhost nolink int disablingSwiches=0 local template coreFlow=+coreflow local template smallCoreFlow=+smallcoreflow local cog jerecAiCog cog endLevelCog int coreClosed=0 local sector sect0 nolink sector sect1 nolink sector sect2 nolink sector sect3 nolink sector sect4 nolink sector sect5 nolink sound wav0=21ForceAbsorb1.wav local template bolt=+force_lightning local thing ghostLight0 nolink int lightAnimNum local float thrustTime=3.0 vector upVec local int i=0 local int player local vector playerVec local vector newVec local int debug=0 local end # ================================================================================ # user0: unused # user1: Message from jerecAiCog saying that Jerec has arrived # in the core for healing # user2: Jerec's healing timer has finished # user3: unused # ================================================================================ code startup: player = jkGetLocalPlayer(); upVec = VectorSet(0.0, 0.0, 1.0); SetSectorThrust(tube0, upVec, thrustSpeed); SetSectorThrust(tube1, upVec, thrustSpeed); // particle generation rate SetPulse(0.25); // diable switches disablingSwitches = 1; MoveToFrame(switch0, 1, 1.0); MoveToFrame(switch1, 1, 1.0); creepRate = creepRateEasy[GetDifficulty()]; // ============================================================ // Debugging Stuff | // debug = 1; // | // ============================================================ return; # ................................................................................ activate: if (GetSenderId() != 2) return; if (IsThingMoving(GetSenderRef())) return; if (GetCurFrame(GetSenderRef()) == 1) return; MoveToFrame(GetSenderRef(), 1, 1.0); return; # ................................................................................ pulse: // make particle stream CreateThing(coreFlow, particleGhost); return; # ................................................................................ StartEffects: if (debug) print("21_Core.cog: Starting Effects."); PlaySoundLocal(wav0, 1.0, 0.0, 0x0); if (!coreClosed) { // enable switches MoveToFrame(switch0, 0, 1.0); MoveToFrame(switch1, 0, 1.0); // move statues MoveToFrame(statue0, 1, creepRate); MoveToFrame(statue1, 1, creepRate); } // chamber thinglight lightAnimNum = ThingLightAnim(ghostLight0, 0.5, 1.0, 3.0); // start sector thrust SetTimerEx(3.0, 1, 0.0, 0.0); // sectorthrust timer for (i=0; i<=5; i=i+1) { SetSectorThrust(sect0[i], upVec, 4.0); // Check to see if the player is in one of the thrust sectors and detach if (GetThingSector(player) == sect0[i]) { playerVec = GetThingVel(player); newVec = VectorAdd(upVec, playerVec); DetachThing(player); SetThingVel(player, newVec); } } // screen shake // lightning return; # ................................................................................ StopEffects: if (debug) print("21_Core.cog: Stopping Effects."); // stop statues // need this check because after a certain point, we just want the statues // to go all the way and close off the core. if (!coreClosed) { if (debug) print("21_Core.cog: stopping statues..."); StopThing(statue0); StopThing(statue1); } else { // diable switches disablingSwitches = 1; MoveToFrame(switch0, 1, 1.0); MoveToFrame(switch1, 1, 1.0); } // darken chamber thinglight StopAnim(lightAnimNum); SetThingLight(ghostlight0, 0.2, 1.0); // stop screen shake return; # ................................................................................ arrived: if (GetSenderId() == 1) { // it's a statue if (debug) print("21_Core.cog: ARRIVED (statue)"); if (debug) printint(GetCurFrame(GetSenderRef())); if (GetCurFrame(GetSenderRef()) == 2) { // statue has reached the center, so end the level SendMessage(endLevelCog, user7); } else if ((coreClosed) && (GetCurFrame(GetSenderRef()) == 1)) { // the second statue to reach frame 1 MoveToFrame(GetSenderRef(), 2, creepRate); } else if (GetCurFrame(GetSenderRef()) == 1) { // the first statue to reach frame 1 // if either statue reaches frame 1, just close off the core because // jerec will have problems getting into the core after that if (debug) print("21_Core.cog: Core is closed..."); SendMessage(jerecAiCog, user2); coreClosed = 1; MoveToFrame(GetSenderRef(), 2, creepRate); } } else if (GetSenderId() == 2) { // it's a switch if (debug) print("21_Core.cog: ARRIVED (switch)"); if ((GetCurFrame(switch0) == 1) && (GetCurFrame(switch1) == 1)) { if (disablingSwitches) { if (debug) print("21_Core.cog: switches disabled."); disablingSwitches = 0; } else { if (debug) print("21_Core.cog: both switches have been switched.."); // tell jerec to stop healing SendMessage(jerecAiCog, user1); call StopEffects; } } } return; # ................................................................................ user1: call StartEffects; return; # ................................................................................ user2: call StopEffects; return; # ................................................................................ timer: if (GetSenderId() == 1) { // stop sector thrust for (i=0; i<=5; i=i+1) SetSectorThrust(sect0[i], upVec, 0.0); } return; end
# Jedi Knight Cog Script # # Generic Lightning Trap Cog # # Generates Lighting From a ghost position # # [SXC] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved symbols message startup message entered message exited message activate message pulse thing ghostposition sector zapsector template lightning=+force_lightning int pulserate=0.5 int dummy local end # Code Section code entered: if (GetSenderRef() == zapsector) { SetPulse(pulserate); } else return; exited: if (GetSenderRef() == zapsector) { SetPulse(0); } else return; pulse: dummy = CreateThing(lightning, ghostposition); return; end
# Jedi Knight Cog Script # # M2_dettrap.cog # # This will generate a series of 4 TD's per 'round' when # the switch is activated. # The trap resets in 'delay' seconds afterwards. # # [YB/JS] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved # ======================================================================================== symbols surface switch desc=switch thing tdg1 nolink,desc=tdg1 thing tdg2 nolink,desc=tdg2 thing tdg3 nolink,desc=tdg3 thing tdg4 nolink,desc=tdg4 int rounds=2 desc=rounds flex rate=0.1 desc=rate flex delay=3.0 desc=delay int firing=0 local int cur_round=0 local int dummy local template proj_tpl=+grenade2 sound on_snd=set_hi2.wav sound off_snd=lgclick1.wav message activated end # ======================================================================================== code activated: if(firing == 1) Return; firing = 1; dummy = SetWallCel(switch, 1); dummy = PlaySoundPos(on_snd, SurfaceCenter(switch), 1.0, 5.0, 10.0, 0); cur_round = 0; while(cur_round < rounds) { dummy = CreateThing(proj_tpl, tdg1); Sleep(rate); dummy = CreateThing(proj_tpl, tdg2); Sleep(rate); dummy = CreateThing(proj_tpl, tdg3); Sleep(rate); dummy = CreateThing(proj_tpl, tdg4); Sleep(rate); cur_round = cur_round + 1; } Sleep(delay); dummy = SetWallCel(switch, 0); dummy = PlaySoundPos(off_snd, SurfaceCenter(switch), 1.0, 5.0, 10.0, 0); firing = 0; Return; end
MSGS 22 # "" "" "07YUN" 0 "YUN - The dark palace" "07YUN_TEXT_00" 0 "" "07YUN_TEXT_01" 0 " " "11GORC" 0 "GORC and PIC - Cargo Ship" "11GORC_TEXT_00" 0 "" "11GORC_TEXT_01" 0 " " "16AESCAPESHIP" 0 "16 - The Falling Ship" "16AESCAPESHIP_TEXT_00" 0 "Everything works OK now!" "16AESCAPESHIP_TEXT_01" 0 "" "16AESCAPESHIP_TEXT_02" 0 "We have just tilted the ship so that your opponents can" "16AESCAPESHIP_TEXT_03" 0 "DRIVE YOU UP THE WALL!" "16AESCAPESHIP_TEXT_04" 0 "" "16AESCAPESHIP_TEXT_05" 0 "Even though the wall is going up," "16AESCAPESHIP_TEXT_06" 0 "it is just an ellution..." "16AESCAPESHIP_TEXT_07" 0 "" "16AESCAPESHIP_TEXT_08" 0 "Have fun!" "20ABOC" 0 "BOC - The Jedi Mound" "20ABOC_TEXT_00" 0 "" "20ABOC_TEXT_01" 0 " " "21AJEREC" 0 "JEREC - Jedi Core" "21AJEREC_TEXT_00" 0 "" "21AJEREC_TEXT_01" 0 " " END
# This is a plain old door. # # By Edward symbols message startup message activated thing door flex speed flex delay int frame=0 local int channel=1 local end # code startup: MOVETOFRAME(door,0,1000); activated: IF(GETSENDERREF()!=door) RETURN; IF(frame==1) RETURN; frame=1; MOVETOFRAME(door,1,speed); WAITFORSTOP(door); SLEEP(delay); MOVETOFRAME(door,0,speed); WAITFORSTOP(door); frame=0; end
"Multiplayer" TYPE 8 SEQ 5 # 10: 1 1 LEVEL 07yun.jkl 0 0 11 11 11: 0 2 LEVEL 11gorc.jkl 0 0 12 12 12: 0 3 LEVEL 16aescapeship.jkl 0 0 13 13 13: 0 3 LEVEL 20aboc.jkl 0 0 14 14 14: 0 4 LEVEL 21ajerec.jkl 0 0 10 10 end
# Jedi Knight Cog Script # # Extra camera view . COG # # This will allow you to see from another THING, like a MouseBot or a # Powerdroid, for a certain amount of time. # # # This Cog is Not supported by LucasArts Entertainment Co flags=0x240 symbols message startup message activated surface switch thing camera sound activation sound deactivation int nOn=2 local end #======================================================== #================================ code startup: SetWallCel(switch, 0); activated: if(GetSenderRef() != switch) return; nOn = 3 - nOn; if( nOn==1 ) { SetWallCel(switch, 1); print("Press F1 to see the detonation switch..."); SetCurrentCamera( 0 ); SetCameraFocus(0, camera); PlaySoundLocal(activation,2,-.5,0); } else { SetWallCel(switch, 0); #print("off"); SetCurrentCamera( 0 ); SetCameraFocus(0, GetLocalPlayerThing()); SetCurrentCamera( 1 ); SetCameraFocus(1, GetLocalPlayerThing()); PlaySoundLocal(deactivation,2,-.5,0); } return; #........................................................................................ end
"Pipe Lines" TYPE 8 SEQ 2 # 10: 1 1 LEVEL Piping.jkl 0 0 -1 -1 11: 0 2 LEVEL Piping2.jkl 0 0 -1 -1 end
# Jedi Knight Cog Script # Generic elevator # SectorThrust added by Edward # # [YB] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved symbols message startup thing elevator desc=elevator_object flex speed=2.0 desc=movement_speed flex waittime=4.0 desc=wait_time_at_stop sector sector_thrust vector frameisone vector frameistwo flex sector_speed sound start sound move sound stopp int channel1=1 local int channel2=2 local end #COG code section code //----------------------------------------------------------------------------- startup: while (1) { channel1=playsoundthing(start,elevator,10,1,100,0x80); channel2=playsoundthing(move,elevator,10,1,100,0x81); movetoframe(elevator, 1, speed); SetSectorThrust(sector_thrust,frameistwo,sector_speed); waitforstop(elevator); stopsound(channel2,1); channel1=playsoundthing(stopp,elevator,10,1,100,0x80); sleep(waittime); channel1=playsoundthing(start,elevator,10,1,100,0x80); channel2=playsoundthing(move,elevator,10,1,100,0x81); movetoframe(elevator, 0, speed); SetSectorThrust(sector_thrust,frameisone,sector_speed); waitforstop(elevator); stopsound(channel2,1); channel1=playsoundthing(stopp,elevator,10,1,100,0x80); sleep(waittime); } end
# Door that opens when switch is on and closes when switch is off! # Toggle door! # # By Edward symbols message startup message activated thing door surface switch1 surface switch2 flex speed=8 material openwhenswitchis= material closedwhenswitchis= material middle sound on sound off sound locked end #============================================================================================================================================= code startup: MOVETOFRAME(door,0,100); SETWALLCEL(switch1,openwhenswitchis); SETWALLCEL(switch2,openwhenswitchis); activated: IF(GETSENDERREF()==door) { PLAYSOUNDLOCAL(locked,1,0,0x40); PRINT("This door requires a switch!"); } ELSE IF(GETSENDERREF()==switch1) { IF(GETSURFACEMAT(switch1)==openwhenswitchis) { SETSURFACEMAT(switch1,middle); SETSURFACEMAT(switch2,middle); MOVETOFRAME(door,1,speed); PLAYSOUNDLOCAL(on,1,0,0x40); WAITFORSTOP(door); SETSURFACEMAT(switch1,closedwhenswitchis); SETSURFACEMAT(switch2,closedwhenswitchis); } ELSE IF(GETSURFACEMAT(switch1)==closedwhenswitchis) { SETSURFACEMAT(switch1,middle); SETSURFACEMAT(switch2,middle); MOVETOFRAME(door,0,speed); PLAYSOUNDLOCAL(off,1,0,0x40); WAITFORSTOP(door); SETSURFACEMAT(switch1,openwhenswitchis); SETSURFACEMAT(switch2,openwhenswitchis); } } ELSE IF(GETSENDERREF()==switch2) { IF(GETSURFACEMAT(switch2)==openwhenswitchis) { SETSURFACEMAT(switch1,middle); SETSURFACEMAT(switch2,middle); MOVETOFRAME(door,1,speed); PLAYSOUNDLOCAL(on,1,0,0x40); WAITFORSTOP(door); SETSURFACEMAT(switch1,closedwhenswitchis); SETSURFACEMAT(switch2,closedwhenswitchis); } ELSE IF(GETSURFACEMAT(switch2)==closedwhenswitchis) { SETWALLCEL(switch1,middle); SETWALLCEL(switch2,middle); MOVETOFRAME(door,0,speed); PLAYSOUNDLOCAL(off,1,0,0x40); WAITFORSTOP(door); SETWALLCEL(switch1,openwhenswitchis); SETWALLCEL(switch2,openwhenswitchis); } } 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); } // 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; 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"); Print("You're Choking!"); 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"); Print("You're cooking!"); 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
# Jedi Knight Cog Script # # M2_dettrap.cog # # This will generate a series of 4 TD's per 'round' when # the switch is activated. # The trap resets in 'delay' seconds afterwards. # # [YB/JS] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved # ======================================================================================== symbols surface switch desc=switch thing tdg1 nolink,desc=tdg1 thing tdg2 nolink,desc=tdg2 thing tdg3 nolink,desc=tdg3 thing tdg4 nolink,desc=tdg4 int rounds=2 desc=rounds flex rate=0.1 desc=rate flex delay=3.0 desc=delay int firing=0 local int cur_round=0 local int dummy local template proj_tpl=+grenade2 sound on_snd=set_hi2.wav sound off_snd=lgclick1.wav material oning material offing message activated end # ======================================================================================== code activated: if(firing == 1) Return; firing = 1; dummy = SetSurfaceMat(switch, oning); dummy = PlaySoundPos(on_snd, GetThingPos(tdg1), 1.0, 5.0, 10.0, 0); dummy = PlaySoundPos(on_snd, GetThingPos(tdg2), 1.0, 5.0, 10.0, 0); dummy = PlaySoundPos(on_snd, GetThingPos(tdg3), 1.0, 5.0, 10.0, 0); dummy = PlaySoundPos(on_snd, GetThingPos(tdg4), 1.0, 5.0, 10.0, 0); cur_round = 0; while(cur_round < rounds) { dummy = CreateThing(proj_tpl, tdg1); Sleep(rate); dummy = CreateThing(proj_tpl, tdg2); Sleep(rate); dummy = CreateThing(proj_tpl, tdg3); Sleep(rate); dummy = CreateThing(proj_tpl, tdg4); Sleep(rate); cur_round = cur_round + 1; } Sleep(delay); dummy = SetSurfaceMat(switch, offing); dummy = PlaySoundPos(off_snd, GetThingPos(tdg1), 1.0, 5.0, 10.0, 0); dummy = PlaySoundPos(off_snd, GetThingPos(tdg2), 1.0, 5.0, 10.0, 0); dummy = PlaySoundPos(off_snd, GetThingPos(tdg3), 1.0, 5.0, 10.0, 0); dummy = PlaySoundPos(off_snd, GetThingPos(tdg4), 1.0, 5.0, 10.0, 0); firing = 0; Return; end
#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, 3, 1); // ST Rifle SetInv(player, 4, 30); // TD SetInv(player, 5, 1); // Crossbow SetInv(player, 6, 1); // Repeater SetInv(player, 7, 1); // Railgun SetInv(player, 8, 30); // Sequencer charges SetInv(player, 9, 1); // Concussion Rifle SetInv(player, 10, 1); // Lightsaber SetInv(player, 11, 500); // Energy SetInv(player, 12, 500); // Power SetInv(player, 15, 30); // Railcharges // 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
# Jedi Knight Cog Script # # POW_BACKPACK.COG # # POWERUP Script - Backpack # # [YB & CYW] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved symbols thing powerup local thing player local sound pickupsnd=BactaPu1.wav local int autopickup=0 local int autoselect_weapon=-1 local message touched message taken end # ======================================================================================== code touched: player = GetSourceRef(); powerup = GetSenderRef(); if (GetThingHealth(player) > 0) TakeItem(powerup, player); Return; # ........................................................................................ taken: player = GetSourceRef(); powerup = GetSenderRef(); Print("BackPack!"); // Do effects. PlaySoundThing(pickupsnd, powerup, 1.0, -1, -1, 0); AddDynamicTint(player, 0.2, 0.2, 0.2); // Pickup the backpack PickupBackpack(player, powerup); // New ammo is already assigned, so this is like a autopickup/autoreload mix, // it will select the best weapon overall with all the stuff in the backpack // taken into account. autopickup = GetAutoPickup(); autoselect_weapon = AutoSelectWeapon(player, 0); if(autopickup & 1) { if( !((autopickup & 2) && ((autoselect_weapon == 4) || (autoselect_weapon == 8) || (autoselect_weapon == 9)) )) { if(!((autopickup & 4) && (GetWeaponPriority(player, GetCurWeapon(player), 0) >= GetWeaponPriority(player, autoselect_weapon, 0) ))) { if(!((autopickup & 8) && (GetCurWeapon(player) == 10))) { SelectWeapon(player, autoselect_weapon); Return; } } } } Return; end
# Jedi Knight Cog Script # # POW_BACTA.COG # # POWERUP Script - Bacta tank # # [YB & CYW] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved symbols thing powerup local thing player local int bin=40 local sound pickupsnd=BactaPu1.wav local sound respawnsnd=Activate01.wav local flex amount local message touched message taken message respawn end # ======================================================================================== code touched: player = GetSourceRef(); amount = GetInv(player, bin); if (amount < GetInvMax(player, bin)) { powerup = GetSenderRef(); TakeItem(powerup, player); } Return; # ........................................................................................ taken: player = GetSourceRef(); powerup = GetSenderRef(); // Print("Bacta Tank"); Print("The all new Healing Soda from YODA industries!"); // Do effects. PlaySoundThing(pickupsnd, powerup, 1.0, -1, -1, 0); AddDynamicTint(player, 1, 0.0, 0.0); // Increment powerup amount. ChangeInv(player, bin, 1.0); SetInvAvailable(player, bin, 1); Return; # ........................................................................................ respawn: powerup = GetSenderRef(); PlaySoundThing(respawnsnd, powerup, 0.6, 5.0, 10.0, 0); Return; end
# Jedi Knight Cog Script # # POW_BATTERY.COG # # POWERUP Script - Battery # # [YB & CYW] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved symbols thing powerup local thing player local int bin=13 local sound pickupsnd=BactaPu1.wav local sound respawnsnd=Activate01.wav local flex amount local message touched message taken message respawn end # ======================================================================================== code touched: player = GetSourceRef(); amount = GetInv(player, bin); if (amount < GetInvMax(player, bin)) { powerup = GetSenderRef(); TakeItem(powerup, player); } Return; # ........................................................................................ taken: player = GetSourceRef(); powerup = GetSenderRef(); // Print("Battery"); Print("Duracell M3!"); // Do effects. PlaySoundThing(pickupsnd, powerup, 1.0, -1, -1, 0); AddDynamicTint(player, 0.0, 0.0, 1); // Increment powerup amount. ChangeInv(player, bin, 25.0); SetInvAvailable(player, bin, 1); Return; # ........................................................................................ respawn: powerup = GetSenderRef(); PlaySoundThing(respawnsnd, powerup, 0.6, 5.0, 10.0, 0); Return; end
# Jedi Knight Cog Script # # POW_BRYAR.COG # # POWERUP Script - Bryar Pistol pickup # # [YB & CYW] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved symbols thing powerup local thing player local int bin=2 local int ammobin=11 local sound pickupsnd=thrmlpu2.wav local sound respawnsnd=Activate01.wav local flex amount local int bin_contents=0 local int autopickup=0 local int autoselect_weapon=-1 local message touched message taken message respawn end # ======================================================================================== code touched: player = GetSourceRef(); powerup = GetSenderRef(); if((GetInv(player, bin) == 0) || (GetInv(player, ammobin) < GetInvMax(player, ammobin))) { TakeItem(powerup, player); } Return; # ........................................................................................ taken: player = GetSourceRef(); powerup = GetSenderRef(); // Do effects. PlaySoundThing(pickupsnd, powerup, 1.0, -1, -1, 0); AddDynamicTint(player, 0.2, 0.2, 0.2); if(GetInv(player, bin) == 0) { // Pickup gun and ammo. // Print("Bryar Pistol"); Print("Bryan's Pistol"); ChangeInv(player, bin, 1.0); // store the old bin contents bin_contents = GetInv(player, ammobin); ChangeInv(player, ammobin, 10.0); // Check for Auto Pickup autopickup = GetAutoPickup(); if(autopickup & 1) { if(!((autopickup & 4) && (GetWeaponPriority(player, GetCurWeapon(player), 0) >= GetWeaponPriority(player, bin, 0)))) { if(!((autopickup & 8) && (GetCurWeapon(player) == 10))) { SelectWeapon(player, bin); Return; } } } // Check for Auto Reload if(GetAutoReload() & 1) { if(!bin_contents) { if(!((GetAutoReload() & 2) && (GetCurWeapon(player) == 10))) { // Try to autoselect and see if the best weapon is an energy cell weapon autoselect_weapon = AutoSelectWeapon(player, 2); if((autoselect_weapon == 2) || (autoselect_weapon == 3)) SelectWeapon(player, autoselect_weapon); } } } } else if(GetInv(player, ammobin) < GetInvMax(player, ammobin)) { // Pickup ammo only. // Print("Energy Cells"); Print("Energy Cells!"); // store the old bin contents bin_contents = GetInv(player, ammobin); ChangeInv(player, ammobin, 10.0); // Check for Auto Reload if(GetAutoReload() & 1) { if(!bin_contents) { if(!((GetAutoReload() & 2) && (GetCurWeapon(player) == 10))) { // Try to autoselect and see if the best weapon is an energy cell weapon autoselect_weapon = AutoSelectWeapon(player, 2); if((autoselect_weapon == 2) || (autoselect_weapon == 3)) SelectWeapon(player, autoselect_weapon); } } } } Return; # ........................................................................................ respawn: powerup = GetSenderRef(); PlaySoundThing(respawnsnd, powerup, 0.6, 5.0, 10.0, 0); Return; end
# Jedi Knight Cog Script # # POW_CONCRIFLE.COG # # POWERUP Script - Concussion Rifle # # [YB & CYW] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved symbols thing powerup local thing player local int bin=9 local int ammobin=12 local sound pickupsnd=CRPickup01.WAV local sound respawnsnd=Activate01.wav local flex amount local int bin_contents=0 local int autopickup=0 local int autoselect_weapon=-1 local message touched message taken message respawn end # ======================================================================================== code touched: player = GetSourceRef(); powerup = GetSenderRef(); if((GetInv(player, bin) == 0) || (GetInv(player, ammobin) < GetInvMax(player, ammobin))) { TakeItem(powerup, player); } Return; # ........................................................................................ taken: player = GetSourceRef(); powerup = GetSenderRef(); // Do effects. PlaySoundThing(pickupsnd, powerup, 1.0, -1, -1, 0); AddDynamicTint(player, 0.3, 0.2, 0.2); if(GetInv(player, bin) == 0) { // Pickup gun and ammo. // Print("Concussion Rifle"); Print("Concussion Rifle!"); ChangeInv(player, bin, 1.0); // store the old bin contents bin_contents = GetInv(player, ammobin); ChangeInv(player, ammobin, 32.0); // Check for Auto Pickup autopickup = GetAutoPickup(); if((autopickup & 1) && !(autopickup & 2)) // DANGEROUS { if(!((autopickup & 4) && (GetWeaponPriority(player, GetCurWeapon(player), 0) >= GetWeaponPriority(player, bin, 0)))) { if(!((autopickup & 8) && (GetCurWeapon(player) == 10))) { SelectWeapon(player, bin); Return; } } } // Check for Auto Reload if(GetAutoReload() & 1) { if(!bin_contents) { if(!((GetAutoReload() & 2) && (GetCurWeapon(player) == 10))) { // Try to autose
NAME Description Size Screenies
60000fightsJK 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
CratesJK 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!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 EditionMotS SP LEVEL
Levels: 1

The Empire's REVANGE (New Special MotS Second Edition)

Based on one of my first released Single Player levels. It was more or less an excuse to edit Jedi Knight's Expansion Mysteries of the Sith when I got it to see how different it was as well as check out the colored lighting.
Oh, and it uses the CD game music alot. Some things would seem strange without it.

58.66 Mb
ThrustingJK MP LEVEL
Levels: 1

Jetsons Tubes

This is a level where you get thrusted around through tubes. One of my very first MP levels inspired by the cartoon series The Jetsons.

87.90 Kb
MultiplayerJK MP LEVEL
Levels: 5

MultiPlayer

Conversion of a few Singleplayer levels to Multiplayer. These include the battle with Yun, Gorc and Pic, Boc, Jerec, and the Falling Ship. Few secrets added.
579.05 Kb