- Moltes coses!

This commit is contained in:
2024-02-14 14:34:28 +01:00
parent d82a61bd4c
commit 00423dfd73
10 changed files with 211 additions and 43 deletions

View File

@@ -48,6 +48,7 @@ actors={
draw=function()
actors.under_cursor=""
for i,v in ipairs(actors.list) do
if v.o=='' then goto continue end
local frame=((v.dx+v.dy)%2)*16
local x,y = v.x, v.y
if v.ox then x = x + v.ox end
@@ -71,6 +72,7 @@ actors={
end
if not btn(KEY_LSHIFT) then subpal() end
::continue::
end
end,

View File

@@ -20,8 +20,8 @@ game={
restart=function()
flags={}
objects.list={}
actors.main={name="jailer",x=8,y=5,o="u",gfx={x=32,y=0},level="prac2"}
game.init("prac2")
actors.main={name="jailer",x=14,y=11,o="l",gfx={x=32,y=0},level="arq"}
game.init("arq")
end,
init=function(levelname,f,objs)
@@ -140,6 +140,7 @@ game={
end
setmap(mapa.surface)
camera(0,0)
for i=0,15 do rectfill(20+i*4,0,20+i*4+4,4,i) end
end,
update=function()

View File

@@ -2,8 +2,37 @@ levels["arq"]={
load=function()
mapa.load("test.map")
actors.add({name="prohibit1",x=6,y=10,o="d",gfx={x=192,y=48},action=levels.arq.prohibit_action})
actors.add({name="prohibit2",x=12,y=10,o="d",gfx={x=192,y=48},action=levels.arq.prohibit_action})
actors.add({name="tallat1",x=0,y=11,o="d",gfx={x=208,y=48},action=levels.arq.tallat_action})
actors.add({name="tallat2",x=0,y=12,o="d",gfx={x=208,y=48},action=levels.arq.tallat_action})
actors.add({name="tallat3",x=0,y=13,o="d",gfx={x=208,y=48},action=levels.arq.tallat_action})
actors.add({name="estudiant1",x=18,y=11,o="r",gfx={x=0,y=48},action=levels.arq.estudiant1_action})
actors.add({name="estudiant2",x=16,y=12,o="l",gfx={x=128,y=0}})
actors.add({name="estudiant2",x=16,y=12,o="l",gfx={x=128,y=0},action=levels.arq.estudiant2_action})
actors.add({name="cartel_jail1_a",x=8,y=10,o="",action=levels.arq.cartel_jail1_action})
actors.add({name="cartel_jail1_b",x=14,y=10,o="",action=levels.arq.cartel_jail1_action})
actors.add({name="cartel_jail2",x=24,y=10,o="",action=levels.arq.cartel_jail2_action})
actors.add({name="cartel_docjail",x=36,y=10,o="",action=levels.arq.cartel_docjail_action})
actors.add({name="cartel_aula3",x=10,y=24,o="",action=levels.arq.cartel_aula3_action})
actors.add({name="cartel_aula2",x=22,y=24,o="",action=levels.arq.cartel_aula2_action})
actors.add({name="cartel_aula1",x=34,y=24,o="",action=levels.arq.cartel_aula1_action})
actors.add({name="cartel_repro",x=58,y=24,o="",action=levels.arq.cartel_repro_action})
actors.add({name="tablo_aula2",x=24,y=24,o="",action=levels.arq.tablo_aula2_action})
if not flags.prac3 or not flags.prac2 or not flags.prac1 or flags.prac1~=2 then
actors.add({name="alutablo1",x=3,y=25,o="d",gfx={x=32,y=64}})
actors.add({name="alutablo2",x=5,y=25,o="d",gfx={x=16,y=96},action=levels.arq.alutablo_action})
actors.add({name="alutablo3",x=4,y=26,o="d",gfx={x=48,y=96}})
actors.add({name="alutablo4",x=6,y=26,o="d",gfx={x=64,y=80},action=levels.arq.alutablo_action})
actors.add({name="alutablo5",x=5,y=27,o="d",gfx={x=96,y=80},action=levels.arq.alutablo_action})
actors.add({name="alutablo6",x=2,y=26,o="r",gfx={x=128,y=48}})
actors.add({name="alutablo7",x=3,y=27,o="d",gfx={x=0,y=96}})
end
switches.add({x=32,y=25,w=1,h=1,action=
function()
@@ -97,12 +126,95 @@ levels["arq"]={
end,
estudiant1_action=function()
local hero = actors.search(actors.main.name)
--if hero.o~="d" then return end
prohibit_action=function()
if not flags.jail_tancada_llegit then
flags.jail_tancada_llegit=1
scene.start({
function() balloon.show("PERO QUÉ...",2,"jailer",false,{x=4,w=8,h=1}) end,
function() balloon.show("'JAIL CERRADA POR\nACTUALIZACIONES\n¡TU MISMO!'",2,"jailer",false,{x=2,w=10,h=3}) end,
function() balloon.show("AÇÒ ES COSA D'USUFONDO!\nSERÀ MAMÓ!",2,"jailer",false,{x=2,w=14,h=2}) end,
function() balloon.show("HE DE TROBAR LA\nFORMA D'ACONSEGUIR\nEL MEU DISKITO...",2,"jailer",false,{x=2,w=11,h=3}) end,
})
else
scene.start({
function() balloon.show("LA JAIL 1\nCONTINUA TANCADA...",2,"jailer",false,{x=4,w=12,h=2}) end,
})
end
end,
tallat_action=function()
scene.start({
--function() actors.face("estudiant1", "jailer") scene.cont() end,
function() balloon.show("ME MOLA MIRAR LA\nBARRA DE PROGRÉS...",12,"estudiant1",false,{x=1,w=12,h=2}) end
function() balloon.show("NO ES POT PASSAR.\nACABEN DE FREGAR\nEL PISO",2,"jailer",false,{x=1,w=10,h=3}) end
})
end,
estudiant1_action=function()
scene.start({
function() balloon.show("SI VOLS ENTRAR A LA JAIL 1\nTINDRÀS QUE TROBAR LA FORMA\nDE TRAURE A USUFONDO DE AHÍ",12,"estudiant1",false,{x=2,w=16,h=3}) end,
function() balloon.show("ELL ÉS EL TÈCNIC, NO?\nPOTSER SI ALGUNA COSA\nS'ESTROPEARA...",12,"estudiant1",false,{x=4,w=12,h=3}) end,
})
end,
estudiant2_action=function()
scene.start({
function() actors.face("estudiant2", "jailer") scene.cont() end,
function() balloon.show("VAJA MERDA!\nARA TINDRÉ QUE ANAR A\nLES PRÀCTIQUES DE CMC",12,"estudiant2",false,{x=2,w=13,h=3}) end,
function() balloon.show("SI NO SÉ NI EN\nQUINA AULA SON!",12,"estudiant2",false,{x=5,w=10,h=2}) end,
})
end,
alutablo_action=function()
scene.start({
function() balloon.show("OSTI, ESTÀ PETAT!",2,"jailer",false,{x=2,w=11,h=1}) end,
function() balloon.show("MILLOR ESPERE\nUN RATO A QUE\nSE BUIDE...",2,"jailer",false,{x=3,w=9,h=3}) end,
})
end,
cartel_jail1_action=function()
scene.start({
function() balloon.show("-----------\n JAIL 1\n-----------",2,"jailer",false,{x=6,w=8,h=3}) end,
})
end,
cartel_jail2_action=function()
scene.start({
function() balloon.show("-----------\n JAIL 2\n-----------",2,"jailer",false,{x=6,w=8,h=3}) end,
})
end,
cartel_docjail_action=function()
scene.start({
function() balloon.show("-----------\n DOC JAIL\n-----------",2,"jailer",false,{x=6,w=8,h=3}) end,
})
end,
cartel_aula3_action=function()
scene.start({
function() balloon.show(" AULA 3\n-----------\nPRÀCTIQUES",2,"jailer",false,{x=6,w=8,h=3}) end,
})
end,
cartel_aula2_action=function()
scene.start({
function() balloon.show(" AULA 2\n-----------\nPRÀCTIQUES",2,"jailer",false,{x=6,w=8,h=3}) end,
})
end,
cartel_aula1_action=function()
scene.start({
function() balloon.show(" AULA 1\n-----------\nPRÀCTIQUES",2,"jailer",false,{x=6,w=8,h=3}) end,
})
end,
cartel_repro_action=function()
scene.start({
function() balloon.show("-----------\nREPROGRAFIA\n-----------",2,"jailer",false,{x=6,w=8,h=3}) end,
})
end,
tablo_aula2_action=function()
scene.start({
function() balloon.show("'...BUSCO COMPAÑERO DE PISO\nPREFERIBLEMENTE GATO...'",2,"jailer",false,{x=1,w=16,h=2}) end,
})
end,

View File

@@ -125,20 +125,35 @@ levels["jail1"]={
local hero = actors.search(actors.main.name)
--if hero.o~="d" then return end
scene.start({
function() balloon.show("ME MOLA MIRAR LA\nBARRA DE PROGRÉS...",12,"estudiant",true,{x=1,w=12,h=2}) end
function() balloon.show("EIXE COMP NO ESTÀ\nACTUALITZANT-SE?",2,"jailer",true,{x=4,w=11,h=2}) end,
function() balloon.show("SI...\nPERO...",12,"estudiant",true,{x=7,w=6,h=2}) end,
function() balloon.show("ME MOLA MIRAR LA\nBARRA DE PROGRÉS...",12,"estudiant",true,{x=4,w=12,h=2}) end
})
end,
knunk_action=function()
local hero = actors.search(actors.main.name)
--if hero.o~="d" then return end
scene.start({
function() balloon.show("EI KNUNK!",2,"jailer",true,{x=10,w=7,h=1}) end,
function() balloon.show("EIXE COMP NO\nESTÀ ACTUALITZANT-SE?",2,"jailer",true,{x=4,w=13,h=2}) end,
function() balloon.show("JO PASSE...",12,"knunk",true,{x=10,w=8,h=1}) end,
function() balloon.show("A TRAVÉS D'UN BUG EN LA BARRA\nDE PROGRÉS HE OBERT UN TUNEL\nSSH A UN SERVIDOR DE KAZAJSTÀN",12,"knunk",true,{x=1,w=17,h=3}) end,
function() balloon.show(" ...",2,"jailer",true,{x=10,w=7,h=1}) end,
})
--local hero = actors.search(actors.main.name)
if not objects.collected("diskito_knunk") then
scene.start({
function() balloon.show("EI KNUNK!",2,"jailer",true,{x=10,w=7,h=1}) end,
function() balloon.show("EIXE COMP NO ESTÀ\nACTUALITZANT-SE?",2,"jailer",true,{x=6,w=11,h=2}) end,
function() balloon.show("JO PASSE...",12,"knunk",true,{x=10,w=8,h=1}) end,
function() balloon.show("A TRAVÉS D'UN BUG EN LA BARRA\nDE PROGRÉS HE OBERT UN TUNEL\nSSH A UN SERVIDOR DE KAZAJSTÀN",12,"knunk",true,{x=1,w=17,h=3}) end,
function() balloon.show(" ...",2,"jailer",true,{x=10,w=7,h=1}) end,
function() balloon.show("OSTI, QUÉ ÉS AIXÓ?",2,"jailer",true,{x=8,w=11,h=1}) end,
function() balloon.show("HE FET UN DISQUET\nQUE PETA QUALSEVOL COMP",12,"knunk",true,{x=4,w=14,h=2}) end,
function() balloon.show("¿VOLS TESTECHARLO?",12,"knunk",true,{x=7,w=12,h=1}) end,
function() balloon.show("CLAR!",2,"jailer",true,{x=12,w=5,h=1}) end,
function() objects.collect("diskito_knunk") end
})
else
scene.start({
function() balloon.show("EI KNUNK!",2,"jailer",true,{x=10,w=7,h=1}) end,
function() balloon.show("EN QUÉ ESTAS ARA?",2,"jailer",true,{x=8,w=11,h=1}) end,
function() balloon.show("HE FET UN CONTADOR DE VISITES\nQUE NUKETJA EL COMP DEL QUE\nENTRA EN LA PACHINA WEB",12,"knunk",true,{x=1,w=17,h=3}) end,
function() balloon.show("QUE MEN...",2,"jailer",true,{x=10,w=7,h=1}) end,
})
end
end,
comp_usufondo_action=function()

View File

@@ -52,7 +52,7 @@ levels["prac1"]={
switches.add({x=4,y=14,w=10,h=1,action=
function()
flags.prac1=1
--flags.prac1=1
if not flags.prac1 then
flags.prac1=1
scene.start({

View File

@@ -68,13 +68,14 @@ levels["prac2"]={
end,
profe_action=function()
local hero = actors.search(actors.main.name)
flags.prac2=1
scene.start({
function() actors.face("profe","jailer") scene.cont() end,
function() balloon.show("¿QUÉ NECESITA,\nCABALLERETE?",2,"profe",true,{x=6,w=9,h=2}) end,
function() balloon.show("TENGO MUCHO TRABAJO...\n¡ESTOS EXMANEMS\nNO SE CORRIGEN SÓLOS!",2,"profe",true,{x=2,w=15,h=3}) end,
function() balloon.show("¿QUÉ NECESITA,\nCABALLERETE?",12,"profe",true,{x=6,w=9,h=2}) end,
function() balloon.show("PUES YO...",2,"jailer",true,{x=5,w=7,h=1}) end,
function() balloon.show("TENGO MUCHO TRABAJO...\n¡ESTOS EXMANEMS\nNO SE CORRIGEN SÓLOS!",12,"profe",true,{x=2,w=15,h=3}) end,
function() actors.search("profe").o="d" scene.cont() end,
function() balloon.show("NO PUEDO LEVANTARME\nNI PARA IR AL BAÑO...",2,"profe",true,{x=3,w=14,h=2}) end,
function() balloon.show("NO PUEDO LEVANTARME\nNI PARA IR AL BAÑO...",12,"profe",true,{x=3,w=14,h=2}) end,
})
end,

View File

@@ -2,7 +2,7 @@ levels["prac3"]={
load=function()
mapa.load("prac3.map")
actors.add({name="profe",x=11,y=5,o="u",gfx={x=224,y=0}})
actors.add({name="profe",x=11,y=5,o="u",gfx={x=224,y=0},action=levels.prac3.profe_action})
actors.add({name="comp_1_1",x=4,y=9,o="d",gfx={x=160,y=0},action=levels.prac3.comp_updating_action})
actors.add({name="comp_2_1",x=6,y=9,o="d",gfx={x=176,y=0},action=levels.prac3.comp_updating_action})
@@ -21,11 +21,11 @@ levels["prac3"]={
actors.add({name="comp_profe",x=6,y=6,o="d",gfx={x=96,y=0},action=levels.prac3.comp_profe_action})
actors.add({name="taula_profe",x=8,y=6,o="d",gfx={x=160,y=16}})
actors.add({name="alumne1",x=12,y=14,o="d",gfx={x=32,y=64}})
actors.add({name="alumne2",x=6,y=10,o="d",gfx={x=16,y=96}})
actors.add({name="alumne3",x=4,y=12,o="d",gfx={x=96,y=64}})
actors.add({name="alumne4",x=4,y=10,o="d",gfx={x=96,y=64}})
actors.add({name="alumne5",x=14,y=12,o="d",gfx={x=64,y=64}})
actors.add({name="alumne1",x=12,y=14,o="d",gfx={x=32,y=64},action=levels.prac3.alumne1_action})
actors.add({name="alumne2",x=6,y=10,o="d",gfx={x=16,y=96},action=levels.prac3.alumne2_action})
actors.add({name="alumne3",x=4,y=12,o="d",gfx={x=96,y=64},action=levels.prac3.alumne3_action})
actors.add({name="alumne4",x=4,y=10,o="d",gfx={x=96,y=64},action=levels.prac3.alumne4_action})
actors.add({name="alumne5",x=14,y=12,o="d",gfx={x=64,y=64},action=levels.prac3.alumne5_action})
--actors.add({name="taza_usufondo",x=14,y=15,o="d",gfx={x=112,y=32},action=levels.jail1.taza_usufondo_action})
--if not objects.search("diskito_usufondo") then actors.add({name="disquito_usufondo",x=15,y=10,o="d",gfx={x=96,y=32},action=levels.jail1.disquito_usufondo_action}) end
@@ -54,7 +54,7 @@ levels["prac3"]={
local hero = actors.search(actors.main.name)
if hero.o=="u" then
scene.start({
function() balloon.show("...COMO IBA DICIENDO...",12,"profe",true,{x=4,w=13,h=1}) end,
function() balloon.show("...COMO IBA DICIENDO...",12,"profe",true,{x=3,w=14,h=1}) end,
function() balloon.show("...BLAH BLAH BLAH...",12,"profe",true,{x=4,w=13,h=1}) end
})
return true
@@ -68,9 +68,23 @@ levels["prac3"]={
comp_updating_action=function()
local hero = actors.search(actors.main.name)
if hero.o~="d" then return end
if hero.o~="u" then return end
scene.start({
function() balloon.show("NO VAN ELS COMPS\nESTAN TOTS ACTUALITZANT",2,"jailer",true,{x=1,w=15,h=2}) end
function() balloon.show("SON COMPS DE PRÀCTIQUES\nESTAN MEGA CAPATS",2,"jailer",false,{x=1,w=15,h=2}) end
})
end,
profe_action=function()
local hero = actors.search(actors.main.name)
flags.prac3=1
scene.start({
function() actors.face("profe","jailer") scene.cont() end,
function() balloon.show("EI PERDONA...\nNO TE FUNCIONA\nEL COMP...",2,"jailer",true,{x=5,w=9,h=3}) end,
function() balloon.show("NO DEURIES AVISAR\nA USUFONDO?",2,"jailer",true,{x=4,w=11,h=2}) end,
function() balloon.show("NO PASA NADA,\nNO ME HACE FALTA.",12,"profe",true,{x=6,w=11,h=2}) end,
function() balloon.show("ESTA PRÁCTICA ES\nBASTANTE TEÓRICA.",12,"profe",true,{x=6,w=11,h=2}) end,
function() actors.search("profe").o="u" scene.cont() end,
function() balloon.show("MECACHIS...",2,"jailer",true,{x=5,w=8,h=1}) end,
})
end,
@@ -78,25 +92,40 @@ levels["prac3"]={
local hero = actors.search(actors.main.name)
if hero.o~="d" then return end
scene.start({
function() balloon.show("PAREIX QUE NO FUNCIONA...",2,"jailer",true,{x=1,w=13,h=1}) end
function() balloon.show("PAREIX QUE NO\nFUNCIONA...",2,"jailer",true,{x=3,w=9,h=2}) end
})
end,
taza_usufondo_action=function()
alumne1_action=function()
local hero = actors.search(actors.main.name)
if hero.o~="d" then return end
scene.start({
function() balloon.show("EL CAFÉ DE USUFONDO.\nESTÀ GELAT COM EL COR DEL DIMONI!",2,"jailer",true,{x=1,w=15,h=2}) end
function() balloon.show("ESTIC FENT UNA\nPÀGINA WEB!",12,"alumne1",false,{x=6,w=9,h=2}) end,
function() balloon.show("WWW.GEOCITIES.COM/PAQUITO",12,"alumne1",false,{x=3,w=15,h=1}) end,
function() balloon.show("VAIG A FICAR ESTE\nCONTADOR DE VISITES QUE\nM'HA PROGRAMAT KNUNK...",12,"alumne1",false,{x=3,w=15,h=3}) end,
function() balloon.show("...",2,"jailer",false,{x=8,w=4,h=1}) end,
})
end,
disquito_usufondo_action=function()
alumne2_action=function()
local hero = actors.search(actors.main.name)
--if hero.o~="d" then return end
scene.start({
function() balloon.show("NO ÉS EL MEU DISQUITO,\nPERÒ ME'L QUEDE!\nIGUAL ES IMPORTANT",2,"jailer",true,{x=1,w=15,h=3}) end,
function() actors.remove("disquito_usufondo") scene.cont() end,
function() objects.collect("diskito_usufondo") scene.cont() end,
function() balloon.show("ALFIL A C4...",12,"alumne2",true,{x=6,w=9,h=1}) end,
function() balloon.show("APERTURA DE ALFIL...\nINTERESANTE...",15,"alumne4",false,{x=3,w=12,h=2}) end,
})
end,
alumne3_action=function()
local hero = actors.search(actors.main.name)
scene.start({
function() balloon.show("SSHHH!!",12,"alumne3",false,{x=1,w=6,h=1}) end,
function() balloon.show("ESTOY ATENDIENDO...",12,"alumne3",false,{x=1,w=12,h=1}) end,
})
end,
alumne5_action=function()
local hero = actors.search(actors.main.name)
scene.start({
function() balloon.show("ZZZ...",12,"alumne5",false,{x=11,w=5,h=1}) end,
})
end,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 700 B

After

Width:  |  Height:  |  Size: 788 B

View File

@@ -23,9 +23,17 @@ objects={
return object[obj]
end
end
end
end,
collected=function(obj)
for i,o in ipairs(objects.list) do
if o==obj then return true end
end
return false
end,
}
object={
diskito_usufondo={name="DISQUITO DE USUFONDO",x=0,y=0}
diskito_knunk={name="DISQUITO DE KNUNK",x=0,y=0},
diskito_usufondo={name="DISQUITO DE USUFONDO",x=16,y=0}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB