Thread: [DFX] Wac limits? :( (DFX/JO)
View Single Post
  #5  
Old 05-17-2018, 06:58 PM
Guest001 is offline Guest001
Registered User

Join Date: Aug 2008
Posts: 4,971

Now we get to always on events

Code:
// ***RANDOM***
if past(1) and elapse(12) and random(2) then
	set(v27,0) // weather on
	set(v28,1) // bombing off
endif
if past(14) and elapse(12) and random(2) then
	set(v27,1) // weather off
	set(v28,0) // bombing on
endif

if eq(v27,1) then
	if elapse(120) and random(2) then
		rain(40,20)
		overcast(40,20)
		set(v17,1)
	end
	if chain(60) and random(2) then
		rain(0,20)
		overcast(0,20)
		set(v17,0)
	end
endif

if eq(v28,1) then
if elapse(6) and random(16) and waveready() then
	wave("xpLgF4.wav")
	quake(14)
end
if chain(0) then
	lightning(50,5,5)
	flash()	
end
endif
if eq(v17,1) then
	if past(1) and elapse(4) and random(30) then
		lightning(100,30,30)
		flash()
	end
endif

// ***CHOOSE***
if area(15) and never() then
	if lt(v50,0) then 
		set(v64,1)
		elseif eq(v50,0) then  
			set(v64,2)
			elseif gt(v50,0) then  
				set(v64,3)
			end
		end
	end
endif
// var 64 2 area 16
if area(16) and never() then
	if lt(v50,0) then 
		set(v64,4)
		elseif eq(v50,0) then  
			set(v64,5)
			elseif gt(v50,0) then  
				set(v64,6)
			end
		end
	end
endif
// var 64 3 area 17
if area(17) and never() then
	if lt(v50,0) then 
		set(v64,7)
		elseif eq(v50,0) then  
			set(v64,8)
			elseif gt(v50,0) then  
				set(v64,9)
			end
		end
	end
endif

// ***REACTIONS***
if ssnalive(96) then
	if ssnarea(96,18) or ssnnearssn(96,121,30) then
		ssncspd(96,4)
		ssnpspd(96,4)
		else
		ssncspd(96,36)
		ssnpspd(96,36)
		end
	end
endif
// EZodiac ssn27
if ssnalive(27) and eq(v18,1) then
	if ssnarea(27,14) then
		ssncspd(27,26)
		ssnpspd(27,16)
		else
		ssncspd(27,46)
		ssnpspd(27,36)
		end
	end
endif
// Ferryboat ssn33
if ssnalive(33) and eq(v18,1) then
	if ssnarea(33,25) or ssnarea(33,26) or ssnnearssn(33,29,30) then
		ssncspd(33,4)
		ssnpspd(33,4)
		else
		ssncspd(33,36)
		ssnpspd(33,36)
		end
	end
endif
// Eboat2 ssn29
if ssnalive(29) and eq(v18,1) then
	if ssnarea(29,14) then
		ssncspd(29,22)
		ssnpspd(29,12)
		else
		ssncspd(29,46)
		ssnpspd(29,36)
		end
	end
endif

// ***DIVERSION***
;sniper under dock
if ssnalive(72) and ssnwounded(72) then
	SSNtoWP(72,15,0)
endif
;first enemy
if ssnalive(61) and ssnwounded(61) then
	SSNtoWP(61,20,0)
endif
Reply With Quote