include, plotscr.hsd
include, fenoct31.hsi
include, utility.lib

define script (1,mapautorun,none)
define script (2,Dismount,none)
define script (3,ship,none)
define script (4,airship,none)
define script (5,humanfighter,none)
define script (6,dwarffighter,none)
define script (7,elffighter,none)
define script (8,zyranfighter,none)
define script (9,humanthief,none)
define script (10,dwarfthief,none)
define script (11,elfthief,none)
define script (12,zyranthief,none)
define script (13,humancleric,none)
define script (14,dwarfcleric,none)
define script (15,elfcleric,none)
define script (16,zyrancleric,none)
define script (17,humanwizard,none)
define script (18,dwarfwizard,none)
define script (19,elfwizard,none)
define script (20,zyranwizard,none)
define script (21,beginning,none)
define script (22,shade1,none)
define script (23,tyrvin1,none)
define script (24,sorrow1,none)
define script (25,seraph1,none)
define script (26,bridge,none)
define script (27,crystal1,none)
define script (28,quikboss1,none)
define script (29,meltdown,none)
define script (30,Hyne,none)
define script (31,quikboss2,none)
define script (32,quikboss3,none)


global variable(1,used vehicle)
global variable(2,ship X)
global variable(3,ship Y)
global variable(4,airship X)
global variable(5,airship Y)


#-------------------------------------


script,mapautorun,begin
  if (used vehicle)
  then,begin
    # replace the 0 with the NPC number of your vehicle
    set NPC position(0,ship X,ship Y)
    set NPC position(1,airship X,airship Y)
  end
end

script,Dismount,begin
 stop song
 # replace the 0 with the NPC number of your vehicle
 set variable(ship X,NPC X(0))
 set variable(ship Y,NPC Y(0))
 set variable(airship X,NPC X(1))
 set variable(airship Y,NPC Y(1))
 set variable(used vehicle, true)
 play song (song:World Map)
end

script,ship,begin
 play song (song:Ship)
end

script,airship,begin
 play song (song:Airship)
end

script,humanfighter,begin
 set hero picture (find hero (hero:Dart),0,inside battle)

 #add basic skills------------------

 write spell ((find hero (hero:Dart),0,0,99))
 if((get hero level (hero:Dart))>=15) then(write spell ((find hero (hero:Dart)),0,1,101))
 if((get hero level (hero:Dart))>=30) then(write spell ((find hero (hero:Dart)),0,2,103))
 if(check tag (tag:K1)==on) then(write spell ((find hero (hero:Dart)),0,3,74))
 if(check tag (tag:K2)==on) then(write spell ((find hero (hero:Dart)),0,4,75))
 if(check tag (tag:K3)==on) then(write spell ((find hero (hero:Dart)),0,5,76))
 if(check tag (tag:K4)==on) then(write spell ((find hero (hero:Dart)),0,6,77))
 if(check tag (tag:K5)==on) then(write spell ((find hero (hero:Dart)),0,7,78))
 if(check tag (tag:K6)==on) then(write spell ((find hero (hero:Dart)),0,8,79))
 if(check tag (tag:K7)==on) then(write spell ((find hero (hero:Dart)),0,9,80))
 if(check tag (tag:K8)==on) then(write spell ((find hero (hero:Dart)),0,10,81))
 if(check tag (tag:K9)==on) then(write spell ((find hero (hero:Dart)),0,11,82))
 if(check tag (tag:K10)==on) then(write spell ((find hero (hero:Dart)),0,12,83))
 if(check tag (tag:K11)==on) then(write spell ((find hero (hero:Dart)),0,13,84))
 if(check tag (tag:K12)==on) then(write spell ((find hero (hero:Dart)),0,14,85))
end


script,dwarffighter,begin
 set hero picture (find hero (hero:Tyrvin),4,inside battle)


 #add basic skills------------------
 write spell ((find hero (hero:Tyrvin),0,0,99))
 if((get hero level (hero:Tyrvin))>=15) then(write spell ((find hero (hero:Tyrvin)),0,1,101))
 if((get hero level (hero:Tyrvin))>=30) then(write spell ((find hero (hero:Tyrvin)),0,2,103))
 if(check tag (tag:K1)==on) then(write spell ((find hero (hero:Tyrvin)),0,3,74))
 if(check tag (tag:K2)==on) then(write spell ((find hero (hero:Tyrvin)),0,4,75))
 if(check tag (tag:K3)==on) then(write spell ((find hero (hero:Tyrvin)),0,5,76))
 if(check tag (tag:K4)==on) then(write spell ((find hero (hero:Tyrvin)),0,6,77))
 if(check tag (tag:K5)==on) then(write spell ((find hero (hero:Tyrvin)),0,7,78))
 if(check tag (tag:K6)==on) then(write spell ((find hero (hero:Tyrvin)),0,8,79))
 if(check tag (tag:K7)==on) then(write spell ((find hero (hero:Tyrvin)),0,9,80))
 if(check tag (tag:K8)==on) then(write spell ((find hero (hero:Tyrvin)),0,10,81))
 if(check tag (tag:K9)==on) then(write spell ((find hero (hero:Tyrvin)),0,11,82))
 if(check tag (tag:K10)==on) then(write spell ((find hero (hero:Tyrvin)),0,12,83))
 if(check tag (tag:K11)==on) then(write spell ((find hero (hero:Tyrvin)),0,13,84))
 if(check tag (tag:K12)==on) then(write spell ((find hero (hero:Tyrvin)),0,14,85))
end

script,elffighter,begin
 set hero picture (find hero (hero:Shade),8,inside battle)


 #add basic skills------------------
 write spell ((find hero (hero:Shade),0,0,99))
 if((get hero level (hero:Shade))>=15) then(write spell ((find hero (hero:Shade)),0,1,101))
 if((get hero level (hero:Shade))>=30) then(write spell ((find hero (hero:Shade)),0,2,103))
 if(check tag (tag:K1)==on) then(write spell ((find hero (hero:Shade)),0,3,74))
 if(check tag (tag:K2)==on) then(write spell ((find hero (hero:Shade)),0,4,75))
 if(check tag (tag:K3)==on) then(write spell ((find hero (hero:Shade)),0,5,76))
 if(check tag (tag:K4)==on) then(write spell ((find hero (hero:Shade)),0,6,77))
 if(check tag (tag:K5)==on) then(write spell ((find hero (hero:Shade)),0,7,78))
 if(check tag (tag:K6)==on) then(write spell ((find hero (hero:Shade)),0,8,79))
 if(check tag (tag:K7)==on) then(write spell ((find hero (hero:Shade)),0,9,80))
 if(check tag (tag:K8)==on) then(write spell ((find hero (hero:Shade)),0,10,81))
 if(check tag (tag:K9)==on) then(write spell ((find hero (hero:Shade)),0,11,82))
 if(check tag (tag:K10)==on) then(write spell ((find hero (hero:Shade)),0,12,83))
 if(check tag (tag:K11)==on) then(write spell ((find hero (hero:Shade)),0,13,84))
 if(check tag (tag:K12)==on) then(write spell ((find hero (hero:Shade)),0,14,85))
end

script,zyranfighter,begin
 set hero picture (find hero (hero:Sorrow),12,inside battle)



 #add basic skills------------------
 write spell ((find hero (hero:Sorrow),0,0,99))
 if((get hero level (hero:Sorrow))>=15) then(write spell ((find hero (hero:Sorrow)),0,1,101))
 if((get hero level (hero:Sorrow))>=30) then(write spell ((find hero (hero:Sorrow)),0,2,103))
 if(check tag (tag:K1)==on) then(write spell ((find hero (hero:Sorrow)),0,3,74))
 if(check tag (tag:K2)==on) then(write spell ((find hero (hero:Sorrow)),0,4,75))
 if(check tag (tag:K3)==on) then(write spell ((find hero (hero:Sorrow)),0,5,76))
 if(check tag (tag:K4)==on) then(write spell ((find hero (hero:Sorrow)),0,6,77))
 if(check tag (tag:K5)==on) then(write spell ((find hero (hero:Sorrow)),0,7,78))
 if(check tag (tag:K6)==on) then(write spell ((find hero (hero:Sorrow)),0,8,79))
 if(check tag (tag:K7)==on) then(write spell ((find hero (hero:Sorrow)),0,9,80))
 if(check tag (tag:K8)==on) then(write spell ((find hero (hero:Sorrow)),0,10,81))
 if(check tag (tag:K9)==on) then(write spell ((find hero (hero:Sorrow)),0,11,82))
 if(check tag (tag:K10)==on) then(write spell ((find hero (hero:Sorrow)),0,12,83))
 if(check tag (tag:K11)==on) then(write spell ((find hero (hero:Sorrow)),0,13,84))
 if(check tag (tag:K12)==on) then(write spell ((find hero (hero:Sorrow)),0,14,85))

end

script,humanthief,begin
 set hero picture (find hero (hero:Dart),1,inside battle)

 #add basic skills------------------
 write spell ((find hero (hero:Dart),0,0,104))
 if((get hero level (hero:Dart))>=15) then(write spell ((find hero (hero:Dart)),0,1,105))
 if((get hero level (hero:Dart))>=30) then(write spell ((find hero (hero:Dart)),0,2,117))
 if(check tag (tag:T1)==on) then(write spell ((find hero (hero:Dart)),0,3,62))
 if(check tag (tag:T2)==on) then(write spell ((find hero (hero:Dart)),0,4,63))
 if(check tag (tag:T3)==on) then(write spell ((find hero (hero:Dart)),0,5,64))
 if(check tag (tag:T4)==on) then(write spell ((find hero (hero:Dart)),0,6,65))
 if(check tag (tag:T5)==on) then(write spell ((find hero (hero:Dart)),0,7,66))
 if(check tag (tag:T6)==on) then(write spell ((find hero (hero:Dart)),0,8,67))
 if(check tag (tag:T7)==on) then(write spell ((find hero (hero:Dart)),0,9,68))
 if(check tag (tag:T8)==on) then(write spell ((find hero (hero:Dart)),0,10,69))
 if(check tag (tag:T9)==on) then(write spell ((find hero (hero:Dart)),0,11,70))
 if(check tag (tag:T10)==on) then(write spell ((find hero (hero:Dart)),0,12,71))
 if(check tag (tag:T11)==on) then(write spell ((find hero (hero:Dart)),0,13,72))
 if(check tag (tag:T12)==on) then(write spell ((find hero (hero:Dart)),0,14,73))

end


script,dwarfthief,begin
 set hero picture (find hero (hero:Tyrvin),5,inside battle)


 #add basic skills------------------
 write spell ((find hero (hero:Tyrvin),0,0,104))
 if((get hero level (hero:Tyrvin))>=15) then(write spell ((find hero (hero:Tyrvin)),0,1,105))
 if((get hero level (hero:Tyrvin))>=30) then(write spell ((find hero (hero:Tyrvin)),0,2,117))
 if(check tag (tag:T1)==on) then(write spell ((find hero (hero:Tyrvin)),0,3,62))
 if(check tag (tag:T2)==on) then(write spell ((find hero (hero:Tyrvin)),0,4,63))
 if(check tag (tag:T3)==on) then(write spell ((find hero (hero:Tyrvin)),0,5,64))
 if(check tag (tag:T4)==on) then(write spell ((find hero (hero:Tyrvin)),0,6,65))
 if(check tag (tag:T5)==on) then(write spell ((find hero (hero:Tyrvin)),0,7,66))
 if(check tag (tag:T6)==on) then(write spell ((find hero (hero:Tyrvin)),0,8,67))
 if(check tag (tag:T7)==on) then(write spell ((find hero (hero:Tyrvin)),0,9,68))
 if(check tag (tag:T8)==on) then(write spell ((find hero (hero:Tyrvin)),0,10,69))
 if(check tag (tag:T9)==on) then(write spell ((find hero (hero:Tyrvin)),0,11,70))
 if(check tag (tag:T10)==on) then(write spell ((find hero (hero:Tyrvin)),0,12,71))
 if(check tag (tag:T11)==on) then(write spell ((find hero (hero:Tyrvin)),0,13,72))
 if(check tag (tag:T12)==on) then(write spell ((find hero (hero:Tyrvin)),0,14,73))
end

script,elfthief,begin
 set hero picture (find hero (hero:Shade),9,inside battle)

 #add basic skills------------------
 write spell ((find hero (hero:Shade),0,0,104))
 if((get hero level (hero:Shade))>=15) then(write spell ((find hero (hero:Shade)),0,1,105))
 if((get hero level (hero:Shade))>=30) then(write spell ((find hero (hero:Shade)),0,2,117))
 if(check tag (tag:T1)==on) then(write spell ((find hero (hero:Shade)),0,3,62))
 if(check tag (tag:T2)==on) then(write spell ((find hero (hero:Shade)),0,4,63))
 if(check tag (tag:T3)==on) then(write spell ((find hero (hero:Shade)),0,5,64))
 if(check tag (tag:T4)==on) then(write spell ((find hero (hero:Shade)),0,6,65))
 if(check tag (tag:T5)==on) then(write spell ((find hero (hero:Shade)),0,7,66))
 if(check tag (tag:T6)==on) then(write spell ((find hero (hero:Shade)),0,8,67))
 if(check tag (tag:T7)==on) then(write spell ((find hero (hero:Shade)),0,9,68))
 if(check tag (tag:T8)==on) then(write spell ((find hero (hero:Shade)),0,10,69))
 if(check tag (tag:T9)==on) then(write spell ((find hero (hero:Shade)),0,11,70))
 if(check tag (tag:T10)==on) then(write spell ((find hero (hero:Shade)),0,12,71))
 if(check tag (tag:T11)==on) then(write spell ((find hero (hero:Shade)),0,13,72))
 if(check tag (tag:T12)==on) then(write spell ((find hero (hero:Shade)),0,14,73))

end

script,zyranthief,begin
 set hero picture (find hero (hero:Sorrow),13,inside battle)

 #add basic skills------------------
 write spell ((find hero (hero:Sorrow),0,0,104))
 if((get hero level (hero:Sorrow))>=15) then(write spell ((find hero (hero:Sorrow)),0,1,105))
 if((get hero level (hero:Sorrow))>=30) then(write spell ((find hero (hero:Sorrow)),0,2,117))
 if(check tag (tag:T1)==on) then(write spell ((find hero (hero:Sorrow)),0,3,62))
 if(check tag (tag:T2)==on) then(write spell ((find hero (hero:Sorrow)),0,4,63))
 if(check tag (tag:T3)==on) then(write spell ((find hero (hero:Sorrow)),0,5,64))
 if(check tag (tag:T4)==on) then(write spell ((find hero (hero:Sorrow)),0,6,65))
 if(check tag (tag:T5)==on) then(write spell ((find hero (hero:Sorrow)),0,7,66))
 if(check tag (tag:T6)==on) then(write spell ((find hero (hero:Sorrow)),0,8,67))
 if(check tag (tag:T7)==on) then(write spell ((find hero (hero:Sorrow)),0,9,68))
 if(check tag (tag:T8)==on) then(write spell ((find hero (hero:Sorrow)),0,10,69))
 if(check tag (tag:T9)==on) then(write spell ((find hero (hero:Sorrow)),0,11,70))
 if(check tag (tag:T10)==on) then(write spell ((find hero (hero:Sorrow)),0,12,71))
 if(check tag (tag:T11)==on) then(write spell ((find hero (hero:Sorrow)),0,13,72))
 if(check tag (tag:T12)==on) then(write spell ((find hero (hero:Sorrow)),0,14,73))

end

script,humancleric,begin
 set hero picture (find hero (hero:Dart),2,inside battle)

 #add basic skills------------------
 write spell ((find hero (hero:Dart),0,0,108))
 if((get hero level (hero:Dart))>=15) then(write spell ((find hero (hero:Dart)),0,1,109))
 if((get hero level (hero:Dart))>=30) then(write spell ((find hero (hero:Dart)),0,2,110))
 if(check tag (tag:C1)==on) then(write spell ((find hero (hero:Dart)),0,3,2))
 if(check tag (tag:C2)==on) then(write spell ((find hero (hero:Dart)),0,4,3))
 if(check tag (tag:C3)==on) then(write spell ((find hero (hero:Dart)),0,5,4))
 if(check tag (tag:C4)==on) then(write spell ((find hero (hero:Dart)),0,6,5))
 if(check tag (tag:C5)==on) then(write spell ((find hero (hero:Dart)),0,7,6))
 if(check tag (tag:C6)==on) then(write spell ((find hero (hero:Dart)),0,8,7))
 if(check tag (tag:C7)==on) then(write spell ((find hero (hero:Dart)),0,9,8))
 if(check tag (tag:C8)==on) then(write spell ((find hero (hero:Dart)),0,10,9))
 if(check tag (tag:C9)==on) then(write spell ((find hero (hero:Dart)),0,11,10))
 if(check tag (tag:C10)==on) then(write spell ((find hero (hero:Dart)),0,12,11))
 if(check tag (tag:C11)==on) then(write spell ((find hero (hero:Dart)),0,13,12))
 if(check tag (tag:C12)==on) then(write spell ((find hero (hero:Dart)),0,14,13))

end

script,dwarfcleric,begin
 set hero picture (find hero (hero:Tyrvin),6,inside battle)

 #add basic skills------------------
 write spell ((find hero (hero:Tyrvin),0,0,108))
 if((get hero level (hero:Tyrvin))>=15) then(write spell ((find hero (hero:Tyrvin)),0,1,109))
 if((get hero level (hero:Tyrvin))>=30) then(write spell ((find hero (hero:Tyrvin)),0,2,110))
 if(check tag (tag:C1)==on) then(write spell ((find hero (hero:Tyrvin)),0,3,2))
 if(check tag (tag:C2)==on) then(write spell ((find hero (hero:Tyrvin)),0,4,3))
 if(check tag (tag:C3)==on) then(write spell ((find hero (hero:Tyrvin)),0,5,4))
 if(check tag (tag:C4)==on) then(write spell ((find hero (hero:Tyrvin)),0,6,5))
 if(check tag (tag:C5)==on) then(write spell ((find hero (hero:Tyrvin)),0,7,6))
 if(check tag (tag:C6)==on) then(write spell ((find hero (hero:Tyrvin)),0,8,7))
 if(check tag (tag:C7)==on) then(write spell ((find hero (hero:Tyrvin)),0,9,8))
 if(check tag (tag:C8)==on) then(write spell ((find hero (hero:Tyrvin)),0,10,9))
 if(check tag (tag:C9)==on) then(write spell ((find hero (hero:Tyrvin)),0,11,10))
 if(check tag (tag:C10)==on) then(write spell ((find hero (hero:Tyrvin)),0,12,11))
 if(check tag (tag:C11)==on) then(write spell ((find hero (hero:Tyrvin)),0,13,12))
 if(check tag (tag:C12)==on) then(write spell ((find hero (hero:Tyrvin)),0,14,13))
end

script,elfcleric,begin
 set hero picture (find hero (hero:Shade),10,inside battle)

 #add basic skills------------------

 write spell ((find hero (hero:Shade),0,0,108))
 if((get hero level (hero:Shade))>=15) then(write spell ((find hero (hero:Shade)),0,1,109))
 if((get hero level (hero:Shade))>=30) then(write spell ((find hero (hero:Shade)),0,2,110))
 if(check tag (tag:C1)==on) then(write spell ((find hero (hero:Shade)),0,3,2))
 if(check tag (tag:C2)==on) then(write spell ((find hero (hero:Shade)),0,4,3))
 if(check tag (tag:C3)==on) then(write spell ((find hero (hero:Shade)),0,5,4))
 if(check tag (tag:C4)==on) then(write spell ((find hero (hero:Shade)),0,6,5))
 if(check tag (tag:C5)==on) then(write spell ((find hero (hero:Shade)),0,7,6))
 if(check tag (tag:C6)==on) then(write spell ((find hero (hero:Shade)),0,8,7))
 if(check tag (tag:C7)==on) then(write spell ((find hero (hero:Shade)),0,9,8))
 if(check tag (tag:C8)==on) then(write spell ((find hero (hero:Shade)),0,10,9))
 if(check tag (tag:C9)==on) then(write spell ((find hero (hero:Shade)),0,11,10))
 if(check tag (tag:C10)==on) then(write spell ((find hero (hero:Shade)),0,12,11))
 if(check tag (tag:C11)==on) then(write spell ((find hero (hero:Shade)),0,13,12))
 if(check tag (tag:C12)==on) then(write spell ((find hero (hero:Shade)),0,14,13))
end

script,zyrancleric,begin
 set hero picture (find hero (hero:Sorrow),14,inside battle)

 #add basic skills------------------

 write spell ((find hero (hero:Sorrow),0,0,108))
 if((get hero level (hero:Sorrow))>=15) then(write spell ((find hero (hero:Sorrow)),0,1,109))
 if((get hero level (hero:Sorrow))>=30) then(write spell ((find hero (hero:Sorrow)),0,2,110))
 if(check tag (tag:C1)==on) then(write spell ((find hero (hero:Sorrow)),0,3,2))
 if(check tag (tag:C2)==on) then(write spell ((find hero (hero:Sorrow)),0,4,3))
 if(check tag (tag:C3)==on) then(write spell ((find hero (hero:Sorrow)),0,5,4))
 if(check tag (tag:C4)==on) then(write spell ((find hero (hero:Sorrow)),0,6,5))
 if(check tag (tag:C5)==on) then(write spell ((find hero (hero:Sorrow)),0,7,6))
 if(check tag (tag:C6)==on) then(write spell ((find hero (hero:Sorrow)),0,8,7))
 if(check tag (tag:C7)==on) then(write spell ((find hero (hero:Sorrow)),0,9,8))
 if(check tag (tag:C8)==on) then(write spell ((find hero (hero:Sorrow)),0,10,9))
 if(check tag (tag:C9)==on) then(write spell ((find hero (hero:Sorrow)),0,11,10))
 if(check tag (tag:C10)==on) then(write spell ((find hero (hero:Sorrow)),0,12,11))
 if(check tag (tag:C11)==on) then(write spell ((find hero (hero:Sorrow)),0,13,12))
 if(check tag (tag:C12)==on) then(write spell ((find hero (hero:Sorrow)),0,14,13))
end

script,humanwizard,begin
 set hero picture (find hero (hero:Dart),3,inside battle)

 #add basic skills------------------

 write spell ((find hero (hero:Shade),0,0,111))
 if((get hero level (hero:Shade))>=15) then(write spell ((find hero (hero:Dart)),0,1,112))
 if((get hero level (hero:Shade))>=30) then(write spell ((find hero (hero:Dart)),0,2,113))
 if(check tag (tag:W1)==on) then(write spell ((find hero (hero:Dart)),0,3,14))
 if(check tag (tag:W2)==on) then(write spell ((find hero (hero:Dart)),0,4,15))
 if(check tag (tag:W3)==on) then(write spell ((find hero (hero:Dart)),0,5,16))
 if(check tag (tag:W4)==on) then(write spell ((find hero (hero:Dart)),0,6,17))
 if(check tag (tag:W5)==on) then(write spell ((find hero (hero:Dart)),0,7,18))
 if(check tag (tag:W6)==on) then(write spell ((find hero (hero:Dart)),0,8,19))
 if(check tag (tag:W7)==on) then(write spell ((find hero (hero:Dart)),0,9,20))
 if(check tag (tag:W8)==on) then(write spell ((find hero (hero:Dart)),0,10,21))
 if(check tag (tag:W9)==on) then(write spell ((find hero (hero:Dart)),0,11,22))
 if(check tag (tag:W10)==on) then(write spell ((find hero (hero:Dart)),0,12,23))
 if(check tag (tag:W11)==on) then(write spell ((find hero (hero:Dart)),0,13,24))
 if(check tag (tag:W12)==on) then(write spell ((find hero (hero:Dart)),0,14,25))
end

script,dwarfwizard,begin
 set hero picture (find hero (hero:Tyrvin),7,inside battle)

 #add basic skills------------------

 write spell ((find hero (hero:Shade),0,0,111))
 if((get hero level (hero:Shade))>=15) then(write spell ((find hero (hero:Tyrvin)),0,1,112))
 if((get hero level (hero:Shade))>=30) then(write spell ((find hero (hero:Tyrvin)),0,2,113))
 if(check tag (tag:W1)==on) then(write spell ((find hero (hero:Tyrvin)),0,3,14))
 if(check tag (tag:W2)==on) then(write spell ((find hero (hero:Tyrvin)),0,4,15))
 if(check tag (tag:W3)==on) then(write spell ((find hero (hero:Tyrvin)),0,5,16))
 if(check tag (tag:W4)==on) then(write spell ((find hero (hero:Tyrvin)),0,6,17))
 if(check tag (tag:W5)==on) then(write spell ((find hero (hero:Tyrvin)),0,7,18))
 if(check tag (tag:W6)==on) then(write spell ((find hero (hero:Tyrvin)),0,8,19))
 if(check tag (tag:W7)==on) then(write spell ((find hero (hero:Tyrvin)),0,9,20))
 if(check tag (tag:W8)==on) then(write spell ((find hero (hero:Tyrvin)),0,10,21))
 if(check tag (tag:W9)==on) then(write spell ((find hero (hero:Tyrvin)),0,11,22))
 if(check tag (tag:W10)==on) then(write spell ((find hero (hero:Tyrvin)),0,12,23))
 if(check tag (tag:W11)==on) then(write spell ((find hero (hero:Tyrvin)),0,13,24))
 if(check tag (tag:W12)==on) then(write spell ((find hero (hero:Tyrvin)),0,14,25))
end

script,elfwizard,begin
 set hero picture (find hero (hero:Shade),11,inside battle)

 #add basic skills------------------

 write spell ((find hero (hero:Shade),0,0,111))
 if((get hero level (hero:Shade))>=15) then(write spell ((find hero (hero:Shade)),0,1,112))
 if((get hero level (hero:Shade))>=30) then(write spell ((find hero (hero:Shade)),0,2,113))
 if(check tag (tag:W1)==on) then(write spell ((find hero (hero:Shade)),0,3,14))
 if(check tag (tag:W2)==on) then(write spell ((find hero (hero:Shade)),0,4,15))
 if(check tag (tag:W3)==on) then(write spell ((find hero (hero:Shade)),0,5,16))
 if(check tag (tag:W4)==on) then(write spell ((find hero (hero:Shade)),0,6,17))
 if(check tag (tag:W5)==on) then(write spell ((find hero (hero:Shade)),0,7,18))
 if(check tag (tag:W6)==on) then(write spell ((find hero (hero:Shade)),0,8,19))
 if(check tag (tag:W7)==on) then(write spell ((find hero (hero:Shade)),0,9,20))
 if(check tag (tag:W8)==on) then(write spell ((find hero (hero:Shade)),0,10,21))
 if(check tag (tag:W9)==on) then(write spell ((find hero (hero:Shade)),0,11,22))
 if(check tag (tag:W10)==on) then(write spell ((find hero (hero:Shade)),0,12,23))
 if(check tag (tag:W11)==on) then(write spell ((find hero (hero:Shade)),0,13,24))
 if(check tag (tag:W12)==on) then(write spell ((find hero (hero:Shade)),0,14,25))
end

script,zyranwizard,begin
 set hero picture (find hero (hero:Sorrow),15,inside battle)


 #add basic skills------------------

 write spell ((find hero (hero:Sorrow),0,0,111))
 if((get hero level (hero:Sorrow))>=15) then(write spell ((find hero (hero:Sorrow)),0,1,112))
 if((get hero level (hero:Sorrow))>=30) then(write spell ((find hero (hero:Sorrow)),0,2,113))
 if(check tag (tag:W1)==on) then(write spell ((find hero (hero:Sorrow)),0,3,14))
 if(check tag (tag:W2)==on) then(write spell ((find hero (hero:Sorrow)),0,4,15))
 if(check tag (tag:W3)==on) then(write spell ((find hero (hero:Sorrow)),0,5,16))
 if(check tag (tag:W4)==on) then(write spell ((find hero (hero:Sorrow)),0,6,17))
 if(check tag (tag:W5)==on) then(write spell ((find hero (hero:Sorrow)),0,7,18))
 if(check tag (tag:W6)==on) then(write spell ((find hero (hero:Sorrow)),0,8,19))
 if(check tag (tag:W7)==on) then(write spell ((find hero (hero:Sorrow)),0,9,20))
 if(check tag (tag:W8)==on) then(write spell ((find hero (hero:Sorrow)),0,10,21))
 if(check tag (tag:W9)==on) then(write spell ((find hero (hero:Sorrow)),0,11,22))
 if(check tag (tag:W10)==on) then(write spell ((find hero (hero:Sorrow)),0,12,23))
 if(check tag (tag:W11)==on) then(write spell ((find hero (hero:Sorrow)),0,13,24))
 if(check tag (tag:W12)==on) then(write spell ((find hero (hero:Sorrow)),0,14,25))
end

script,beginning,begin
 stop song
 suspend player
 suspend box advance
 show backdrop (2)
 wait (1)
 show text box (1)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (2)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (3)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (4)
 wait (7)
 wait for key (use key)
 advance text box
 wait (5)
 camera follows NPC (1)
 wait (5)
 fade screen out
 wait (2)
 show map
 wait (1)
 fade screen in
 wait (1)
 play song (song:SERAPH1)
 walk NPC (1,up,2)
 walk NPC (0,up,2)
 wait for NPC (1)
 show text box (5)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (6)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (7)
 wait (7)
 wait for key (use key)
 advance text box
 set NPC direction (0,right)
 show text box (8)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (9)
 wait (7)
 wait for key (use key)
 advance text box
 set NPC direction (1,left)
 show text box (10)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (11)
 wait (7)
 wait for key (use key)
 advance text box
 wait (5)
 set NPC direction (1,up)
 wait (2)
 set NPC direction (0,up)
 walk NPC (1,up,1)
 wait for NPC (1)
 walk NPC (1,up,8)
 walk NPC (0,up,9)
 wait for NPC (1)
 walk NPC (5,down,2)
 wait for NPC (5)
 show text box (12)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (13)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (14)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (15)
 wait (7)
 wait for key (use key)
 advance text box
 set NPC direction (1,left)
 show text box (16)
 wait (7)
 wait for key (use key)
 advance text box
 wait (5)
 set NPC direction (1,up)
 show text box (17)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (18)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (19)
 wait (7)
 wait for key (use key)
 advance text box
 walk NPC (5,left,1)
 wait (4)
 show text box (20)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (21)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (22)
 wait (7)
 wait for key (use key)
 advance text box
 set NPC direction (5,down)
 wait (5)
 play song (song:Dart)
 greyscale palette
 fade screen in
 wait (5)
 show text box (23)
 wait (7)
 wait for key (use key)
 advance text box
 wait (5)
 reset palette
 fade screen in
 wait (5)
 set NPC direction (5,right)
 wait (3)
 set NPC direction (5,up)
 show text box (24)
 wait (7)
 wait for key (use key)
 advance text box
 walk NPC (2,down,3)
 wait for NPC (2)
 show text box (25)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (26)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (27)
 wait (7)
 wait for key (use key)
 advance text box
 set NPC direction (3,left)
 show text box (28)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (29)
 wait (7)
 set NPC direction (3,down)
 wait for key (use key)
 swap by name (hero:Default,hero:Dart)
 delete hero (hero:Default)
 fade screen out
 wait (1)
 set tag (tag:52,on)
 wait (4)
 teleport to map (1,32,47)
 wait (1)
 camera follows hero (me)
 wait (1)
 advance text box
 wait (2)
 fade screen in
 wait (5)

 resume player
 resume box advance
end


script,shade1,begin
 suspend player
 suspend box advance
 greyscale palette
 fade screen in
 play song (song:Shade)
 show text box (33)
 wait (7)
 wait for key (use key)
 advance text box
 reset palette
 fade screen in
 show text box (34)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (35)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (36)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (37)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (38)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (39)
 wait (7)
 wait for key (use key)
 add hero (hero:Shade)
 fade screen out
 wait (2)
 set tag (tag:53,on)
 wait (2)
 advance text box
 fade screen in
 resume player
 resume box advance
end

script,tyrvin1,begin
 suspend player
 suspend box advance
 greyscale palette
 fade screen in
 play song (song:Tyrvin)
 show text box (40)
 wait (7)
 wait for key (use key)
 advance text box
 reset palette
 fade screen in
 show text box (41)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (42)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (43)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (44)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (45)
 wait (7)
 wait for key (use key)
 add hero (hero:Tyrvin)
 wait (1)
 fade screen out
 wait (2)
 set tag (tag:54,on)
 wait (2)
 advance text box
 fade screen in
 resume player
 resume box advance
end

script,sorrow1,begin
 suspend player
 suspend box advance
 walk hero (me,left,2)
 wait for hero (me)
 walk hero (me,up,3)
 walk hero (me,left,3)
 wait for hero (me)
 walk hero (me,up,2)
 wait for hero (me)
 wait (10)
 greyscale palette
 fade screen in
 play song (song:Sorrow)
 show text box (46)
 wait (7)
 wait for key (use key)
 advance text box
 reset palette
 fade screen in
 wait (10)
 set NPC direction (4,left)
 show text box (47)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (48)
 wait (7)
 wait for key (use key)
 advance text box
 wait (10)
 set NPC direction (4,up)
 wait (5)
 show text box (49)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (50)
 wait (7)
 wait for key (use key)
 advance text box
 set hero direction (me,left)
 wait (5)
 walk hero (me,down,1)
 show text box (51)
 wait (7)
 wait for key (use key)
 advance text box
 set hero direction (me,left)
 wait (5)
 set hero direction (me,up)
 wait (5)
 set NPC direction (4,left)
 wait (5)
 set NPC direction (4,down)
 wait (5)
 show text box (52)
 wait (7)
 wait for key (use key)
 advance text box
 set NPC direction (4,left)
 wait (15)
 set NPC direction (4,down)
 show text box (53)
 wait (7)
 wait for key (use key)
 advance text box
 wait (5)
 set hero direction (me,left)
 wait (5)
 set hero direction (me,right)
 wait (5)
 set hero direction (me,left)
 wait (5)
 set hero direction (me,right)
 wait (5)
 set hero direction (me,up)
 wait (5)
 show text box (54)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (55)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (56)
 wait (7)
 wait for key (use key)
 fade screen out
 wait (3)
 advance text box
 set tag (tag:55,on)
 wait (2)
 fade screen in
 add hero (hero:Sorrow)
 resume player
 resume box advance
end

script,seraph1,begin
 suspend player
 suspend box advance
 show text box (112)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (113)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (114)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (115)
 wait (7)
 wait for key (use key)
 advance text box
 wait (5)
 set NPC direction (10,down)
 wait (5)
 set NPC direction (10,right)
 wait (5)
 show text box (116)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (117)
 wait (7)
 wait for key (use key)
 advance text box
 walk NPC (10,right,2)
 show text box (118)
 wait (7)
 wait for key (use key)
 advance text box
 wait (5)
 set NPC direction (10,down)
 wait (5)
 set NPC direction (10,left)
 wait (5)
 show text box (119)
 wait (7)
 wait for key (use key)
 advance text box
 wait (20)
 set NPC direction (10,down)
 wait (5)
 set NPC direction (10,right)
 wait (5)
 show text box (120)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (121)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (122)
 wait (7)
 wait for key (use key)
 advance text box
 walk hero (me,right,1)
 wait for hero (me)
 show text box (123)
 wait (7)
 wait for key (use key)
 advance text box
 wait (5)
 set NPC direction (10,down)
 wait (5)
 set NPC direction (10,left)
 wait (5)
 show text box (124)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (125)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (126)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (127)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (128)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (129)
 wait (7)
 wait for key (use key)
 advance text box
 walk NPC (10,left,1)
 show text box (130)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (131)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (132)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (133)
 wait (7)
 wait for key (use key)
 advance text box
 resume box advance
 resume player
end

script,bridge,begin
 suspend player
 suspend box advance
 show text box (142)
 wait (7)
 wait for key (use key)
 advance text box
 walk NPC (1,down,2)
 wait for NPC (1)
 show text box (143)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (144)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (145)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (146)
 wait (7)
 wait for key (use key)
 advance text box
 walk hero (me,right,6)
 wait for hero (me)
 show text box (147)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (148)
 wait (7)
 wait for key (use key)
 advance text box
 walk hero (me,left,6)
 wait for hero (me)
 show text box (149)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (150)
 wait (7)
 wait for key (use key)
 advance text box
 walk hero (me,right,6)
 wait for hero (me)
 show text box (151)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (152)
 wait (7)
 wait for key (use key)
 advance text box
 Variable (var1) 
 Variable (var2) 
 For (var1,0,2,1) 
 Do(for(var2,0,255,1) 
 Do(Write color (var2,var1,63--read color (var2,var1)))) 
 Fade screen in 
 ##You can use 'update palette' instead of 
 ##'fade screen in' for an instant change 
 wait (5)
 reset palette
 fight formation (3)
 set tag (tag:Slime,on)
 wait (2)
 show text box (153)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (154)
 wait (7)
 wait for key (use key)
 advance text box
 resume player
 resume box advance
end

script,crystal1,begin
 suspend player
 suspend box advance
 stop song
 show text box (155)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (156)
 wait (7)
 wait for key (use key)
 advance text box
 wait (5)
 set hero direction (me,left)
 wait (5)
 set hero direction (me,right)
 wait (5)
 set hero direction (me,left)
 wait (5)
 set hero direction (me,right)
 wait (5)
 set hero direction (me,up)
 wait (5)
 show text box (157)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (158)
 wait (7)
 wait for key (use key)
 advance text box
 Variable (var1) 
 Variable (var2) 
 For (var1,0,2,1) 
 Do(for(var2,0,255,1) 
 Do(Write color (var2,var1,63--read color (var2,var1)))) 
 Fade screen in 
 ##You can use 'update palette' instead of 
 ##'fade screen in' for an instant change 
 wait (5)
 reset palette
 fight formation (4)
 stop song
 wait (5)
 show text box (176)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (177)
 wait (7)
 wait for key (use key)
 advance text box
 walk hero (me,up,4)
 play song (song:Crystal)
 wait for hero (me)
 show text box (178)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (179)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (180)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (181)
 wait (7)
 wait for key (use key)
 advance text box
 resume player
 resume box advance
end

script,quikboss1,begin
 Variable (var1) 
 Variable (var2) 
 For (var1,0,2,1) 
 Do(for(var2,0,255,1) 
 Do(Write color (var2,var1,63--read color (var2,var1)))) 
 Fade screen in 
 ##You can use 'update palette' instead of 
 ##'fade screen in' for an instant change 
 wait (5)
 reset palette
 fight formation (9)
end

script,meltdown,begin
 suspend player
 suspend box advance
 stop song
 wait (5)
 play song (song:EMERGENCY)
 tweak palette (30,-30,-30)
 fade screen in
 wait (5)
 reset palette
 fade screen in
 wait (5)
 tweak palette (30,-30,-30)
 fade screen in
 wait (5)
 reset palette
 fade screen in
 wait (5)
 tweak palette (30,-30,-30)
 fade screen in
 wait (5)
 show text box (203)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (204)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (205)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (206)
 wait (7)
 wait for key (use key)
 advance text box
 walk hero (me,up,7)
 wait for hero (me)
 show text box (207)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (208)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (209)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (210)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (211)
 wait (7)
 wait for key (use key)
 Variable (var1) 
 Variable (var2) 
 For (var1,0,2,1) 
 Do(for(var2,0,255,1) 
 Do(Write color (var2,var1,63--read color (var2,var1)))) 
 Fade screen in 
 ##You can use 'update palette' instead of 
 ##'fade screen in' for an instant change 
 wait (5)
 reset palette
 fight formation (8)
 show text box (212)
 wait (7)
 wait for key (use key)
 advance text box
 fade screen out
 wait (5)
 teleport to map (2,5,1)
 wait (5)
 fade screen in
 focus camera (5,5)
 wait for camera
 show text box (213)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (214)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (215)
 wait (7)
 wait for key (use key)
 advance text box
 walk NPC (3,left,1)
 set NPC direction (7,left)
 show text box (216)
 wait (7)
 wait for key (use key)
 advance text box
 set NPC direction (2,down)
 set NPC direction (5,left)
 show text box (217)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (218)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (219)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (220)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (221)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (222)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (223)
 wait (7)
 wait for key (use key)
 advance text box
 walk NPC (3,right,1)
 set NPC direction (6,left)
 set NPC direction (5,down)
 set NPC direction (3,right)
 walk NPC (4,down,1)
 set NPC direction (4,up)
 show text box (224)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (225)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (226)
 wait (7)
 wait for key (use key)
 advance text box
 walk NPC (4,down,2)
 walk NPC (5,down,2)
 wait for NPC (5)
 walk NPC (4,down,1)
 walk NPC (5,down,1)
 walk NPC (3,right,1)
 wait for NPC (3)
 walk NPC (5,down,1)
 walk NPC (4,down,1)
 walk NPC (3,down,1)
 walk NPC (6,left,1)
 wait for NPC (3)
 walk NPC (4,down,3)
 walk NPC (5,down,3)
 walk NPC (3,down,5)
 wait for NPC (3)
 wait (5)
 stop song
 wait (10)
 set NPC direction (6,down)
 wait (5)
 set NPC direction (6,right)
 wait (5)
 show text box (227)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (228)
 wait (7)
 wait for key (use key)
 advance text box
 wait (10)
 show text box (229)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (230)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (231)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (232)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (233)
 wait (7)
 wait for key (use key)
 advance text box
 wait (10)
 fade screen out
 wait (5)
 camera follows hero (me)
 use door (0)
 wait (3)
 fade screen in
 resume player
 resume box advance
end

script,hyne,begin
 suspend player
 suspend box advance
 set caterpillar mode (ON)
 show text box (254)
 wait (7)
 wait for key (use key)
 advance text box
 walk hero (me,up,8)
 wait for hero (me)
 wait (8)
 focus camera (60,16,4)
 wait for camera
 show text box (255)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (256)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (257)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (258)
 wait (7)
 wait for key (use key)
 advance text box
 suspend caterpillar
 walk hero (0,up,2)
 walk hero to X (1,59)
 walk hero to X (2,61)
 walk hero to Y (1,19)
 walk hero to Y (2,19) 
 walk hero to Y (3,19)
 wait for hero (me)
 show text box (259)
 wait (7)
 wait for key (use key)
 advance text box
 set NPC direction (12,down)
 show text box (260)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (261)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (262)
 wait (7)
 wait for key (use key)
 advance text box
 walk NPC (12,down,1)
 Variable (var1) 
 Variable (var2) 
 For (var1,0,2,1) 
 Do(for(var2,0,255,1) 
 Do(Write color (var2,var1,63--read color (var2,var1)))) 
 Fade screen in 
 ##You can use 'update palette' instead of 
 ##'fade screen in' for an instant change 
 wait (5)
 reset palette
 fight formation (13)
 set tag (tag:Hyne,on)
 walk hero (me,up,1)
 wait for hero (me)
 show text box (263)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (264)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (265)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (266)
 wait (7)
 wait for key (use key)
 advance text box
 walk NPC (11,down,1)
 show text box (267)
 wait (7)
 wait for key (use key)
 advance text box
 set NPC direction (11,left)
 wait (5)
 set NPC direction (11,up)
 show text box (268)
 wait (7)
 wait for key (use key)
 advance text box
 set NPC direction (11,left)
 wait (5)
 set NPC direction (11,down)
 show text box (269)
 wait (7)
 wait for key (use key)
 advance text box
 set tag (tag:Zande,on)
 wait (3)
 set tag (tag:Zande,off)
 wait (3)
 show text box (270)
 wait (7)
 wait for key (use key)
 set tag (tag:Zande,on)
 wait (3)
 set tag (tag:Zande,off)
 wait (3)
 set tag (tag:Zande,on)
 wait (3)
 advance text box
 stop song
 show text box (271)
 wait (7)
 wait for key (use key)
 advance text box
 walk NPC (10,up,1)
 walk NPC (9,up,1)
 wait for NPC (9)
 show text box (272)
 wait (7)
 wait for key (use key)
 advance text box
 set hero direction (me,left)
 set hero direction (1,left)
 set hero direction (2,left)
 set hero direction (3,left)
 wait (5)
 set hero direction (me,down)
 set hero direction (1,down)
 set hero direction (2,down)
 set hero direction (3,down)
 wait (5)
 show text box (273)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (274)
 wait (7)
 wait for key (use key)
 advance text box
 fade screen out 
 wait (5)
 resume caterpillar
 wait (2)
 set caterpillar mode (OFF)
 wait (2)
 use door (0)
 resume player
 resume box advance
end

script,quikboss2,begin
 Variable (var1) 
 Variable (var2) 
 For (var1,0,2,1) 
 Do(for(var2,0,255,1) 
 Do(Write color (var2,var1,63--read color (var2,var1)))) 
 Fade screen in 
 ##You can use 'update palette' instead of 
 ##'fade screen in' for an instant change 
 wait (5)
 reset palette
 fight formation (14)
end

script,quikboss3,begin
 show text box (298)
 wait (7)
 wait for key (use key)
 advance text box
 show text box (299)
 wait (7)
 wait for key (use key)
 advance text box
 Variable (var1) 
 Variable (var2) 
 For (var1,0,2,1) 
 Do(for(var2,0,255,1) 
 Do(Write color (var2,var1,63--read color (var2,var1)))) 
 Fade screen in 
 ##You can use 'update palette' instead of 
 ##'fade screen in' for an instant change 
 wait (5)
 reset palette
 fight formation (21)
end

