Hi all,
Long time no speak!
I am getting a server crash on this one specific map. It always happens when the map reaches it's 8min timelimit.
It refuses to cycle to next map in rotation. (and indeed, this map is definitely the culprit)
I have scoured the script, and cannot see what could be happening.
It is a botmap. I have converted or used multiple existing botmaps for this server.
Ive compared this to other working scripts, and cannot see the one thing that could be causing the crash.
One point - if a player joins the map mid-session..it does NOT crash. Weird.
q_console log also does not really give me anything. It just dies mid-script.
Your expert eyes would be appreciated!
Spoiler: // The Lost Village
// ARCHITECTURE: Ghost Dog
// SCRIPTING: Ghost Dog
// SPECIAL THANKS TO: Balr14, Jv_map, Vonderbakluft, Oddball_Woof, Scorpio and THE MODDING THEATER ([urlwww.modtheater.com[/url])
// Bot Tweaks by Oh_Gaz - [RAC] Rent-A-Crowd
main:
waitexec maps/obj/The_Lost_Village.bot
setcvar "g_obj_alliedtext1" "Destroy the safe!" // set scoreboard messages
setcvar "g_obj_alliedtext2" "Steal the Documents!"
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" "Stop Allies from"
setcvar "g_obj_axistext2" "Stealing the Documents!"
setcvar "g_obj_axistext3" "=tweaked by [RAC]="
setcvar "timelimit" "8"
setcvar "fraglimit" "1"
setcvar "g_scoreboardpic" "The_Lost_Village"
setcvar "jvbot_showavatar" "0"
setcvar "jvbot_prefix" "[BOT]"
setcvar "g_gametypestring" "jv_bot01"
setcvar jvbot_skill 4
switch (waitthread global/libmef/util.scr::get_gametype)
{
case "ctf":
case "ftctf":
case "dem":
case "ftdem":
waitthread setup_bases
break
case "obj":
case "ftobj":
thread objectivethread
break
}
// set the parameters for this round based match
if (level.mef_gametype != "ftobj")
{
level.dmrespawning = 1 // 1 or 0
}
setcvar g_gametype 2
level waitTill prespawn
setcvar g_gametype 4
exec global/DMprecache.scr //*** Precache Dm Stuff
level.script = maps/obj/The_Lost_Village.scr //point this to your ".scr"
exec global/ambient.scr obj_team1
exec global/door_locked.scr::lock
exec global/exploder.scr
exec global/shutter.scr
thread global/minefield.scr::minefield_setup
thread global/exploder.scr::main
spawn models/sound/The_Lost_Village/The_Lost_Village.tik
level.dmrespawning = 1 // 1 or 0
level.dmroundlimit = 8 // round time limit in minutes
level.clockside = axis // set to axis, allies, kills, or draw
thread cmessage
level waittill spawn
level.bomb_damage = 100
level.bomb_explosion_radius = 100 //was 640
level.defusing_team = "axis"
level.planting_team = "allies"
level.targets_to_destroy = 1
thread global/shutter.scr::shuttrig 1
thread global/shutter.scr::shuttrig 2
thread hatch1start
thread documents_init
$hatch2 thread processhatch2
$luik thread openluik
thread boat1switch1
thread boat2switch1
$floor thread openfloor
thread waterambient
//level waittill roundstart //make comment to test objectives
level.bRoundStarted = 1
thread documentvoice
//objectives init
level.alliesbots = 7
level.axisbots = 7
$safe_bomb thread global/jv_obj_dm.scr::bomb_thinker
waitthread global/jv_bots/jv_mp_ai.scr::addroute triggernode
waitthread global/jv_bots/jv_mp_ai.scr::enable 0 0 0 0
waitthread level.jvbot_main_script::addtask trigger 1
thread allies_win_bomb // Start the win check thread for allies
$safe_bomb thread axis_win_timer // Start the win check thread for axis
end //main-end
////////////////////////////////////////******DOCUMENT SPEECH******//////////////////////////////////////
documentvoice:
wait 240
//iprintln "playing documentvoice"
$safe_bomb playsound dfr_M1L2_113m_1 //"The documents and explosives I had were confiscated."
wait 2.8
$safe_bomb playsound dfr_M1L2_114m_1 //"We've got to recover them, or this mission is lost."
wait 2.2
$safe_bomb playsound dfr_M1L2_115m_1 //"They're probably in the Commandant's office."
wait 2.5
end
////////////////////////////////////////******SOUND FOR WATER******//////////////////////////////////////
waterambient:
wait 1
$watersound1 loopsound river
$watersound2 loopsound river
$watersound3 loopsound river
$watersound4 loopsound river
/*
$basementwater1 loopsound basement_water
$basementwater1 volume 1
$basementwater2 loopsound basement_water
$basementwater2 volume 1
$basementwater3 loopsound basement_water
$basementwater3 volume 1
$basementwater4 loopsound basement_water
$basementwater4 volume 1
$basementwater5 loopsound basement_water
$basementwater5 volume 1
$basementwater6 loopsound basement_water
$basementwater6 volume 1
*/
end
////////////////////////////////////////******PROCESSHATCH2******////////////////////////////////////////
processhatch2:
self.hatchpos = 0
self time 3.3
thread monitorhatch2
end
monitorhatch2:
while (1)
{
$(self+"_trigger") waittill trigger
if(self.hatchpos == 0)
{
self rotateYup 90 // or Y or Z if your hatch opens that way.
self.hatchpos = 1
}
else
{
self rotateYdown 90 // or Y or Z if your hatch opens that way.
self.hatchpos = 0
}
self playsound m4l1_altar_slide
self waitmove
}
end
////////////////////////////////////////******luik******////////////////////////////////////////
openluik:
self.hatchpos = 0
self time 1.3
thread moveluik
end
moveluik:
while (1)
{
$(self+"_trigger") waittill trigger
if(self.hatchpos == 0)
{
self time 1.3
self rotateXup 90 // or Y or Z if your hatch opens that way.
self.hatchpos = 1
self playsound m4l3_gateopen
}
else
{
self time 1.1
self rotateXdown 90 // or Y or Z if your hatch opens that way.
self.hatchpos = 0
self playsound m4l3_gateclose
}
self waitmove
}
end
////////////////////////////////////////******floor******////////////////////////////////////////
openfloor:
self time 3
$pit volumedamage 100
thread movefloor
end
movefloor:
while (1)
{
$(self+"_trigger") waittill trigger
$(self+"_trigger") nottriggerable
$crushdoor1_trigger nottriggerable
$crushdoor2_trigger nottriggerable
$alarmswitch2 anim turnon
$alarmswitch2 playsound alarm_switch
self rotateXup 90 // or Y or Z if your hatch opens that way.
self playsound door_vault_roll_open
self waitmove
wait 3
$alarmswitch2 anim turnoff
$alarmswitch2 playsound alarm_switch
self rotateXdown 90 // or Y or Z if your hatch opens that way.
self playsound door_vault_roll_close
self waitmove
$(self+"_trigger") triggerable
$crushdoor1_trigger triggerable
$crushdoor2_trigger triggerable
}
end
////////////////////////////////////////******alarmswitch1******////////////////////////////////////////
move_alarmswitch1:
$floor_trigger nottriggerable
$crushdoor1_trigger nottriggerable
$crushdoor2_trigger nottriggerable
$alarmswitch1 anim turnon
$alarmswitch1 playsound alarm_switch
wait 50
//iprintln "switching off"
$alarmswitch1 anim turnoff
$crushdoor1_trigger triggerable
$crushdoor2_trigger triggerable
$floor_trigger triggerable
end
//////////////////////////////////////******SECRET PASSAGE******////////////////////////////////////////
//////////////////////////////////////////////hatch1start///////////////////////////////////////////////
hatch1start:
$hatch1 time 2
$hatch1switch1.pos = 1
$hatch1switch2.pos = 1
$hatch1.up = 0
thread hatch11
thread hatch12
end
////////////////////////////////////////////////hatch11//////////////////////////////////////////////////
hatch11:
$hatch1switch1_trigger triggerable
$hatch1switch2_trigger triggerable
$hatch1switch1_trigger waittill trigger
$hatch1switch1_trigger nottriggerable
$hatch1switch2_trigger nottriggerable
if ($hatch1switch1.pos == 1)
{
$hatch1switch1 anim turn
$hatch1switch1.pos = 0
}
else
{
$hatch1switch1 anim off
$hatch1switch1.pos = 1
}
$hatch1switch1 playsound alarm_switch
wait .5
thread hatch1move1
end
////////////////////////////////////////////////hatch12//////////////////////////////////////////////////
hatch12:
$hatch1switch2_trigger triggerable
$hatch1switch1_trigger triggerable
$hatch1switch2_trigger waittill trigger
$hatch1switch2_trigger nottriggerable
$hatch1switch1_trigger nottriggerable
if ($hatch1switch2.pos == 1)
{
$hatch1switch2 anim turn
$hatch1switch2.pos = 0
}
else
{
$hatch1switch2 anim off
$hatch1switch2.pos = 1
}
$hatch1switch2 playsound alarm_switch
wait .5
thread hatch1move2
end
////////////////////////////////////////////hatch1move1//////////////////////////////////////////////////
hatch1move1:
if ($hatch1.up == 0)
{
$hatch1 rotateZup 90
$hatch1.up = 1
}
else
{
$hatch1 rotateZdown 90
$hatch1.up = 0
}
$hatch1 playsound door_railcar_open
$hatch1 waitmove
wait .5
thread hatch11
end
////////////////////////////////////////////hatch1move2//////////////////////////////////////////////////
hatch1move2:
if ($hatch1.up == 0)
{
$hatch1 rotateZup 90
$hatch1.up = 1
}
else
{
$hatch1 rotateZdown 90
$hatch1.up = 0
}
$hatch1 playsound door_railcar_open
$hatch1 waitmove
wait .5
thread hatch12
end
///////////////////////////////////////////////BOAT1//////////////////////////////////////////////////////
boat1switch1:
$boat1_trigger1 waittill trigger
wait 0.5
thread boat1forward
end
boat1forward:
$boat1 speed 150
$boat1 moveto boat1start
$boat1 loopsound wave_crash1
$boat1 waitmove
$boat1 stoploopsound
thread boat1switch2
end
boat1switch2:
$boat1_trigger2 waittill trigger
wait 0.5
thread boat1backward
end
boat1backward:
$boat1 speed 150
$boat1 moveto boat1end
$boat1 loopsound wave_crash1
$boat1 waitmove
$boat1 stoploopsound
thread boat1switch1
end
///////////////////////////////////////////////BOAT2//////////////////////////////////////////////////////
boat2switch1:
$boat2_trigger1 waittill trigger
wait 0.5
thread boat2forward
end
boat2forward:
$boat2 speed 150
$boat2 moveto boat2start
$boat2 loopsound wave_crash1
$boat2 waitmove
$boat2 stoploopsound
thread boat2switch2
end
boat2switch2:
$boat2_trigger2 waittill trigger
wait 0.5
thread boat2backward
end
boat2backward:
$boat2 speed 150
$boat2 moveto boat2end
$boat2 loopsound wave_crash1
$boat2 waitmove
$boat2 stoploopsound
thread boat2switch1
end
/////////////////////////////////////******LIGHTSWITCH******/////////////////////////////////////////////
/*
lightswitch1:
$light light 1 1 1 120
$lightswitch_trigger triggerable
$lightswitch_trigger waittill trigger
$lightswitch_trigger nottriggerable
$lightswitch anim turn
$lightswitch playsound alarm_switch
wait .5
thread lightoff
end
lightoff:
$light light 0 0 0 64
$corona hide
wait .5
thread lightswitch2
end
lightswitch2:
$lightswitch_trigger triggerable
$lightswitch_trigger waittill trigger
$lightswitch_trigger nottriggerable
$lightswitch anim off
$lightswitch playsound alarm_switch
wait .5
thread lighton
end
lighton:
$light light 1 1 1 120
$corona show
wait .5
thread lightswitch1
end
*/
/////////////////////////////////////******DEATH_UNDER_MAP******/////////////////////////////////////////////
/*
death_under_map:
iprintln "Hahahaha, try again"
$electrofield nottriggerable
$electrofield volumedamage 20
wait 1
$electrofield volumedamage 20
wait 1
$electrofield volumedamage 20
wait 1
$electrofield volumedamage 20
wait 1
$electrofield volumedamage 20
wait 2
$electrofield triggerable
end
*/
///////////////////////////////////////******DOCUMENTS PART 1******/////////////////////////////////////
documents_init:
$documents_trigger nottriggerable
end
///////////////////////////////////////******DOCUMENTS PART 2******/////////////////////////////////////
documents_end:
while(1)
{
self triggerable
self waittill trigger
println (self + " triggered")
if(self.triggertime == level.time)
local.other = self.other
else
local.other = parm.other
if (local.other.dmteam == allies)
{
$documents hide
$documents playsound dfr_M1L2_132m_2 // "Okay, we've found the documents."
wait 0.5
iprintlnbold "The documents were stolen"
self.triggerteam = none
break // break out of the while loop
}
waitframe // protection against making this thread use too much CPU
}
teamwin allies
end
///////////////////////////////////////******OBJ******//////////////////////////////////////////////////
//*** --------------------------------------------
//*** "Axis Victory"
//*** --------------------------------------------
axis_win_timer:
level waittill axiswin
end
//*** --------------------------------------------
//*** "Allied Victory"
//*** --------------------------------------------
allies_win_bomb:
while !($safe_bomb.exploded)
waitframe
$safe_bomb remove
$documents_trigger.triggerteam = allies
$documents_trigger thread documents_end
iprintlnbold "The save has been blown up"
end
cmessage:
wait 10
iprintln "====Surprise Cockfaces!===="
iprintln "=Welcome to the [RAC] Server="
iprintln ""
wait 100
goto cmessage
end]