Compare commits
4 Commits
d5a886987d
...
6332fa6d25
| Author | SHA1 | Date | |
|---|---|---|---|
| 6332fa6d25 | |||
| 042e071ef2 | |||
| d3fe7feff4 | |||
| 3de87f046e |
@@ -105,6 +105,19 @@ actors={
|
||||
end
|
||||
end,
|
||||
|
||||
moveto=function(name,dx,dy)
|
||||
local actor = actors.search(name)
|
||||
if actor.x==dx and actor.y==dy then
|
||||
actor.path=nil
|
||||
return
|
||||
end
|
||||
actor.path={pos=0,route=""}
|
||||
if (actor.x<dx) then for i=1,dx-actor.x do actor.path.route=actor.path.route.."r" end end
|
||||
if (actor.x>dx) then for i=1,actor.x-dx do actor.path.route=actor.path.route.."l" end end
|
||||
if (actor.y<dy) then for i=1,dy-actor.y do actor.path.route=actor.path.route.."d" end end
|
||||
if (actor.y>dy) then for i=1,actor.y-dy do actor.path.route=actor.path.route.."u" end end
|
||||
end,
|
||||
|
||||
update=function()
|
||||
if actors.updating then return end
|
||||
actors.updating=true
|
||||
@@ -118,7 +131,6 @@ actors={
|
||||
v.path=nil
|
||||
game.update()
|
||||
if in_scene then scene.cont() end
|
||||
v.keys=nil
|
||||
if v.name == actors.main.name then
|
||||
local switch = switches.search(v.x,v.y)
|
||||
if switch then
|
||||
|
||||
@@ -20,8 +20,8 @@ game={
|
||||
restart=function()
|
||||
flags={}
|
||||
objects.list={}
|
||||
actors.main={name="jailer",x=14,y=11,o="l",gfx={x=32,y=0},level="arq"}
|
||||
game.init("arq")
|
||||
actors.main={name="jailer",x=9,y=14,o="u",gfx={x=32,y=0},level="repro"}
|
||||
game.init("repro")
|
||||
end,
|
||||
|
||||
init=function(levelname,f,objs)
|
||||
@@ -49,11 +49,11 @@ game={
|
||||
|
||||
show_menu=function()
|
||||
game.pause()
|
||||
brymode.show(game.resume)
|
||||
--menu.show({ {"GUARDAR PARTIDA", game.save},
|
||||
-- {"CARREGAR PARTIDA", game.load},
|
||||
-- {"EIXIR", main_init},
|
||||
-- }, game.resume)
|
||||
--brymode.show(game.resume)
|
||||
menu.show({ {"GUARDAR PARTIDA", game.save},
|
||||
{"CARREGAR PARTIDA", game.load},
|
||||
{"EIXIR", main_init},
|
||||
}, game.resume)
|
||||
end,
|
||||
|
||||
save=function()
|
||||
|
||||
@@ -11,6 +11,8 @@ levels["arq"]={
|
||||
|
||||
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},action=levels.arq.estudiant2_action})
|
||||
actors.add({name="estudiant3",x=34,y=25,o="r",gfx={x=128,y=48},action=levels.arq.estudiant3_action})
|
||||
actors.add({name="estudiant4",x=27,y=25,o="d",gfx={x=0,y=64},action=levels.arq.estudiant4_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})
|
||||
@@ -22,9 +24,11 @@ levels["arq"]={
|
||||
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=36,y=24,o="",action=levels.arq.tablo_aula1_action})
|
||||
actors.add({name="tablo_aula2",x=24,y=24,o="",action=levels.arq.tablo_aula2_action})
|
||||
actors.add({name="tablo_aula3",x=4,y=24,o="",action=levels.arq.tablo_aula3_action})
|
||||
|
||||
if not flags.prac3 or not flags.prac2 or not flags.prac1 or flags.prac1~=2 then
|
||||
if not flags.prac3 or not flags.prac2 or not flags.prac1 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}})
|
||||
@@ -124,6 +128,20 @@ levels["arq"]={
|
||||
end
|
||||
})
|
||||
|
||||
switches.add({x=6,y=25,w=1,h=3,action=
|
||||
function()
|
||||
if not flags.prac3 or flags.prac3<2 then
|
||||
flags.prac3=2
|
||||
scene.start({
|
||||
function() balloon.show("MIRA, JA\nS'HA DESPEJAT...",2,"jailer",false,{x=5,w=10,h=2}) end,
|
||||
})
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
end,
|
||||
|
||||
prohibit_action=function()
|
||||
@@ -163,6 +181,24 @@ levels["arq"]={
|
||||
})
|
||||
end,
|
||||
|
||||
estudiant3_action=function()
|
||||
scene.start({
|
||||
function() actors.face("estudiant3", "jailer") scene.cont() end,
|
||||
function() balloon.show("EI, QUE HI HA\nEN ESTE PASILLO?",2,"jailer",false,{x=3,w=10,h=2}) end,
|
||||
function() balloon.show("SON LES AULES\nDE PRÀCTIQUES",12,"estudiant3",false,{x=8,w=9,h=2}) end,
|
||||
function() balloon.show("PERO NO VAIG A\nENTRAR. ME FAN POR\nELS PROFESORS!",12,"estudiant3",false,{x=7,w=11,h=3}) end,
|
||||
function() balloon.show("ES UNA ENFERMETAT REAL!\n...PROFAFOBIA!",12,"estudiant3",false,{x=5,w=13,h=2}) end,
|
||||
function() balloon.show("...O ALGO AIXÍ...",12,"estudiant3",false,{x=7,w=11,h=1}) end,
|
||||
})
|
||||
end,
|
||||
|
||||
estudiant4_action=function()
|
||||
scene.start({
|
||||
function() balloon.show("VOLS SABER EN QUINA\nAULA ES DONA\nCADA ASSIGNATURA?",12,"estudiant4",false,{x=4,w=12,h=3}) end,
|
||||
function() balloon.show("MIRA LA LLISTA EN\nEL TAULER AL FONDO\nDEL PASILLO",12,"estudiant4",false,{x=5,w=11,h=3}) end,
|
||||
})
|
||||
end,
|
||||
|
||||
alutablo_action=function()
|
||||
scene.start({
|
||||
function() balloon.show("OSTI, ESTÀ PETAT!",2,"jailer",false,{x=2,w=11,h=1}) end,
|
||||
@@ -212,10 +248,23 @@ levels["arq"]={
|
||||
})
|
||||
end,
|
||||
|
||||
tablo_aula1_action=function()
|
||||
scene.start({
|
||||
function() balloon.show("'WWW.TRIPOD.COM/BORRULL'",2,"jailer",false,{x=1,w=16,h=1}) 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,
|
||||
|
||||
tablo_aula3_action=function()
|
||||
flags.apuntes=1
|
||||
scene.start({
|
||||
function() balloon.show("AULES DE PRÀCTIQUES\n--------------------------\nDISTRIBUCIÓ D'ASSIGNATURES",2,"jailer",false,{x=1,w=16,h=3}) end,
|
||||
function() balloon.show("AULA 1: CMC\nAULA 2: ALG\nAULA 3: TCO",2,"jailer",false,{x=3,w=8,h=3}) end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
@@ -50,45 +50,45 @@ levels["prac1"]={
|
||||
end
|
||||
})
|
||||
|
||||
switches.add({x=4,y=14,w=10,h=1,action=
|
||||
switches.add({x=9,y=15,w=1,h=1,action=
|
||||
function()
|
||||
--flags.prac1=1
|
||||
if not flags.prac1 then
|
||||
flags.prac1=1
|
||||
scene.start({
|
||||
function() balloon.show("OYE TU!",12,"profe",false,{x=4,w=6,h=1}) end,
|
||||
function() actors.search("profe").path={pos=0,route='rrrdddddd'} end,
|
||||
function() actors.search("profe").path={pos=0,route='rrrddddddd'} end,
|
||||
function() balloon.show("TE PARECE HORA DE LLEGAR\nA LA PRÁCTICA?",12,"profe",false,{x=3,w=14,h=2}) end,
|
||||
function() balloon.show("AL MENOS TENDRÁS\nLOS APUNTES\n¿NO?",12,"profe",false,{x=3,w=14,h=3}) end,
|
||||
function() balloon.show("PUES...\nNO",2,"jailer",false,{x=5,w=7,h=2}) end,
|
||||
function() balloon.show("¿¿QUÉ??\n¡ESTO ES EL COLMO!",12,"profe",false,{x=3,w=14,h=2}) end,
|
||||
function() balloon.show("¡LARGO!\n¡Y NO VUELVAS SIN\nLOS APUNTES!",12,"profe",false,{x=3,w=14,h=3}) end,
|
||||
function() actors.search("jailer").path={pos=0,route='dd'} end
|
||||
function() actors.search("jailer").path={pos=0,route='d'} end
|
||||
})
|
||||
return true
|
||||
elseif flags.prac1==1 then
|
||||
if not objects.search("apuntes_1015") then
|
||||
if not objects.search("apuntes") then
|
||||
scene.start({
|
||||
function() balloon.show("¿OTRA VEZ TU?",12,"profe",false,{x=4,w=9,h=1}) end,
|
||||
function() actors.search("profe").path={pos=0,route='rrrdddddd'} end,
|
||||
function() actors.search("profe").path={pos=0,route='rrrddddddd'} end,
|
||||
function() balloon.show("¿TRAES LOS APUNTES?",12,"profe",false,{x=3,w=12,h=1}) end,
|
||||
function() balloon.show("SI ES QUE NO SÉ\nQUINS SON!",2,"jailer",false,{x=5,w=10,h=2}) end,
|
||||
function() balloon.show("NO...\nES QUE...",2,"jailer",false,{x=5,w=10,h=2}) end,
|
||||
function() balloon.show("¡PUES TE BUSCAS LAS CASTAÑAS!\n¡HABER VENIDO A CLASE!",12,"profe",false,{x=3,w=16,h=2}) end,
|
||||
function() balloon.show("CAGUEN L'OU...",2,"jailer",false,{x=5,w=9,h=1}) end,
|
||||
function() actors.search("jailer").path={pos=0,route='dd'} end,
|
||||
function() actors.search("jailer").path={pos=0,route='d'} end,
|
||||
function() wait.start(1.5) end,
|
||||
function() balloon.show("SI NO SÉ NI QUINA\nASSIGNATURA ES...",2,"jailer",false,{x=5,w=10,h=2}) end
|
||||
function() if not flags.apuntes then balloon.show("SI NO SÉ NI QUINA\nASSIGNATURA ES...",2,"jailer",false,{x=5,w=10,h=2}) end end
|
||||
})
|
||||
else
|
||||
flags.prac1=2
|
||||
scene.start({
|
||||
function() balloon.show("¿OTRA VEZ TU?",12,"profe",false,{x=4,w=6,h=1}) end,
|
||||
function() actors.search("profe").path={pos=0,route='rrrdddddd'} end,
|
||||
function() actors.search("profe").path={pos=0,route='rrrddddddd'} end,
|
||||
function() balloon.show("¿TRAES LOS APUNTES?",12,"profe",false,{x=3,w=14,h=1}) end,
|
||||
function() balloon.show("¡ACÍ ESTÀN!",2,"jailer",false,{x=5,w=7,h=1}) end,
|
||||
function() balloon.show("¡AH!\n¡ASÍ ME GUSTA!",12,"profe",false,{x=3,w=14,h=2}) end,
|
||||
function() balloon.show("BUSCA UN ORDENADOR\nLIBRE Y EMPIEZA",12,"profe",false,{x=3,w=14,h=2}) end,
|
||||
function() actors.search("profe").path={pos=0,route='uuuuuullla'} end,
|
||||
function() actors.search("profe").path={pos=0,route='uuuuuuullla'} end,
|
||||
})
|
||||
end
|
||||
return true
|
||||
|
||||
@@ -68,6 +68,7 @@ levels["prac2"]={
|
||||
end,
|
||||
|
||||
profe_action=function()
|
||||
if not flags.prac2 then
|
||||
flags.prac2=1
|
||||
scene.start({
|
||||
function() actors.face("profe","jailer") scene.cont() end,
|
||||
@@ -77,6 +78,14 @@ levels["prac2"]={
|
||||
function() actors.search("profe").o="d" scene.cont() end,
|
||||
function() balloon.show("NO PUEDO LEVANTARME\nNI PARA IR AL BAÑO...",12,"profe",true,{x=3,w=14,h=2}) end,
|
||||
})
|
||||
else
|
||||
flags.prac2=2
|
||||
scene.start({
|
||||
function() actors.face("profe","jailer") scene.cont() end,
|
||||
function() balloon.show("EN SERIO, NO TENGO,\nTIEMPO PARA TONTERÍAS",12,"profe",true,{x=3,w=14,h=2}) end,
|
||||
function() actors.search("profe").o="d" scene.cont() end,
|
||||
})
|
||||
end
|
||||
end,
|
||||
|
||||
alumne1_action=function()
|
||||
|
||||
@@ -76,6 +76,7 @@ levels["prac3"]={
|
||||
|
||||
profe_action=function()
|
||||
local hero = actors.search(actors.main.name)
|
||||
if not flags.prac3 then
|
||||
flags.prac3=1
|
||||
scene.start({
|
||||
function() actors.face("profe","jailer") scene.cont() end,
|
||||
@@ -86,6 +87,14 @@ levels["prac3"]={
|
||||
function() actors.search("profe").o="u" scene.cont() end,
|
||||
function() balloon.show("MECACHIS...",2,"jailer",true,{x=5,w=8,h=1}) end,
|
||||
})
|
||||
else
|
||||
scene.start({
|
||||
function() actors.face("profe","jailer") scene.cont() end,
|
||||
function() balloon.show("LE HE DICHO QUE\nNO SE PREOCUPE.",12,"profe",true,{x=6,w=11,h=2}) end,
|
||||
function() balloon.show("SIÉNTESE Y DEJE\nDE HACER LA MONA.",12,"profe",true,{x=6,w=11,h=2}) end,
|
||||
function() actors.search("profe").o="u" scene.cont() end,
|
||||
})
|
||||
end
|
||||
end,
|
||||
|
||||
comp_profe_action=function()
|
||||
|
||||
@@ -12,7 +12,7 @@ levels["repro"]={
|
||||
actors.add({name="comp",x=3,y=6,o="d",gfx={x=96,y=0}})
|
||||
actors.add({name="impresora",x=5,y=6,o="d",gfx={x=176,y=16}})
|
||||
|
||||
actors.add({name="currante1",x=9,y=11,o="d",gfx={x=16,y=48}})
|
||||
actors.add({name="currante1",x=9,y=11,o="d",gfx={x=128,y=48}})
|
||||
actors.add({name="currante2",x=4,y=5,o="d",gfx={x=16,y=80}})
|
||||
|
||||
switches.add({x=9,y=16,w=1,h=1,action=
|
||||
@@ -35,6 +35,7 @@ levels["repro"]={
|
||||
|
||||
switches.add({x=15,y=13,w=1,h=1,action=
|
||||
function()
|
||||
if not objects.collected("moneda") then table.insert(objects.list, "moneda") end
|
||||
local hero = actors.search(actors.main.name)
|
||||
if hero.o=="u" then
|
||||
scene.start({
|
||||
@@ -52,6 +53,9 @@ levels["repro"]={
|
||||
|
||||
currante1_action=function()
|
||||
local hero = actors.search(actors.main.name)
|
||||
flags.apuntes=1
|
||||
|
||||
if not flags.apuntes then
|
||||
scene.start({
|
||||
function() balloon.show("BON DIA!",12,"currante1",false,{x=6,w=7,h=1}) end,
|
||||
function() balloon.show("QUINS APUNTES\nNECESSITES?",12,"currante1",false,{x=6,w=8,h=2}) end,
|
||||
@@ -59,6 +63,36 @@ levels["repro"]={
|
||||
function() balloon.show("POS MAL ANEM...",12,"currante1",false,{x=5,w=10,h=1}) end,
|
||||
function() balloon.show("TORNA QUAN SAPIGUES\nEL QUE VOLS",12,"currante1",false,{x=4,w=12,h=2}) end,
|
||||
})
|
||||
else
|
||||
if not objects.collected("moneda") then
|
||||
scene.start({
|
||||
function() balloon.show("BON DIA!",12,"currante1",false,{x=6,w=7,h=1}) end,
|
||||
function() balloon.show("QUINS APUNTES\nNECESSITES?",12,"currante1",false,{x=6,w=8,h=2}) end,
|
||||
function() balloon.show("VULL ELS DE CMC",2,"jailer",true,{x=5,w=10,h=1}) end,
|
||||
function() balloon.show("PERFECTE!\nVAL 1 MONEDA!",12,"currante1",false,{x=5,w=9,h=2}) end,
|
||||
function() balloon.show("MONEDA!?\nNO DUC DINERS!",2,"jailer",true,{x=5,w=9,h=2}) end,
|
||||
function() balloon.show("HO SENT MOLT, PERO\nSENSE PASTA NO HI HA\nAPUNTES...",12,"currante1",false,{x=3,w=12,h=3}) end,
|
||||
})
|
||||
else
|
||||
scene.start({
|
||||
function() balloon.show("BON D...\nTU ALTRA VEGADA?",12,"currante1",false,{x=4,w=10,h=2}) end,
|
||||
function() balloon.show("QUINS APUNTES\nVOLIES?",12,"currante1",false,{x=6,w=8,h=2}) end,
|
||||
function() balloon.show("ELS DE CMC!",2,"jailer",true,{x=6,w=8,h=1}) end,
|
||||
function() balloon.show("PERO VALEN\n1 MONEDA...",12,"currante1",false,{x=5,w=8,h=2}) end,
|
||||
function() balloon.show("ACI TENS!",2,"jailer",true,{x=6,w=7,h=1}) end,
|
||||
function() objects.leave("moneda") scene.cont() end,
|
||||
function() balloon.show("PERFECTE!\nDONAM UN SEGON...",12,"currante1",false,{x=3,w=11,h=2}) end,
|
||||
function() actors.search("currante1").path={pos=0,route='ulluuur'} end,
|
||||
function() wait.start(1) end,
|
||||
function() actors.search("currante1").path={pos=0,route='uur'} end,
|
||||
function() wait.start(1.5) end,
|
||||
function() balloon.show("AH!\nACÍ ESTÀN",12,"currante1",true,{x=4,w=7,h=2}) end,
|
||||
function() actors.search("currante1").path={pos=0,route='dddddrrd'} end,
|
||||
function() balloon.show("ACÍ TENS!\nEL 1015 D'INFORMÀTICA",12,"currante1",false,{x=3,w=13,h=2}) end,
|
||||
function() objects.collect("apuntes") end,
|
||||
})
|
||||
end
|
||||
end
|
||||
end,
|
||||
|
||||
}
|
||||
BIN
data/objects.gif
BIN
data/objects.gif
Binary file not shown.
|
Before Width: | Height: | Size: 788 B After Width: | Height: | Size: 900 B |
@@ -10,7 +10,7 @@ objects={
|
||||
|
||||
leave=function(name)
|
||||
for i,obj in ipairs(objects.list) do
|
||||
if object[obj].name and object[obj].name==name then
|
||||
if obj==name then
|
||||
table.remove(objects.list,i)
|
||||
return
|
||||
end
|
||||
@@ -35,5 +35,7 @@ objects={
|
||||
|
||||
object={
|
||||
diskito_knunk={name="DISQUITO DE KNUNK",x=0,y=0},
|
||||
diskito_usufondo={name="DISQUITO DE USUFONDO",x=16,y=0}
|
||||
diskito_usufondo={name="DISQUITO DE USUFONDO",x=16,y=0},
|
||||
moneda={name="MONEDA",x=32,y=0},
|
||||
apuntes={name="APUNTES",x=48,y=0},
|
||||
}
|
||||
@@ -3,6 +3,7 @@ scene={
|
||||
pos=0,
|
||||
|
||||
start=function(script)
|
||||
if scene.script~=nil then return end
|
||||
scene.pos=0
|
||||
scene.script=script
|
||||
scene.cont()
|
||||
|
||||
Reference in New Issue
Block a user