Guest User

Chocobo Forest Script NBE

a guest
Mar 18th, 2020
283
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #HW filetype FIELDSCRIPT
  2.  
  3. #HW fileid 2950 // Chocobosco
  4. #HW language it
  5. #HW newentry 0
  6. #HW locals
  7. allocate 19
  8. #HW endlocals
  9.  
  10. #HW newfunction 0
  11. Function Main_Init
  12. set VAR_GlobBool_159 = 0
  13. set VAR_GlobUInt8_17 = 255
  14. set VAR_GenBool_191 = 0
  15. if ( General_LoadedGame == 1 ) {
  16. set General_FieldEntrance = 10000
  17. }
  18. set General_LoadedGame = 0
  19. set VAR_GenInt16_9 = 65535
  20. if ( VAR_GenUInt8_13 == 9 ) {
  21. } else {
  22. if ( ( VAR_GenUInt8_13 == 2 ) && ( VAR_GenInt16_9 < 0 ) ) {
  23. set VAR_GenUInt8_13 = 9
  24. } else {
  25. if ( VAR_GenInt16_9 < 0 ) {
  26. set VAR_GenUInt8_13 = 0
  27. } else {
  28. set VAR_GenUInt8_13 = 1
  29. }
  30. }
  31. }
  32. set VAR_GenInt16_11 = 65535
  33. if ( VAR_GenUInt8_14 == 9 ) {
  34. } else {
  35. if ( ( VAR_GenUInt8_14 == 2 ) && ( VAR_GenInt16_11 < 0 ) ) {
  36. set VAR_GenUInt8_14 = 9
  37. } else {
  38. if ( VAR_GenInt16_11 < 0 ) {
  39. set VAR_GenUInt8_14 = 0
  40. } else {
  41. set VAR_GenUInt8_14 = 1
  42. }
  43. }
  44. }
  45. SetControlDirection( 0, 0 )
  46. InitCode( 1, 0 ) // Entry1
  47. InitCode( 2, 0 ) // Entry2
  48. InitCode( 3, 0 ) // Entry3
  49. set VAR_GlobInt8_36 = 1
  50. set Chocobo_CurrentField = 1
  51. set VAR_GlobInt8_76 = 1
  52. InitCode( 14, 0 ) // Entry14
  53. if ( VARL_GenBool_1423 == 0 ) {
  54. set Chocobo_BeakLevel = 1
  55. set Chocobo_BeakExp = 0
  56. set Chocobo_BeakLevel64 = ( Chocobo_BeakNextLevel = ( ( 646 * Chocobo_BeakLevel ) / 1000 ) )
  57. set Chocobo_BeakNextLevel = ( Sin(( 64 - Chocobo_BeakNextLevel )) - Sin(( 64 - ( Chocobo_BeakNextLevel + 1 ) )) )
  58. set Chocobo_BeakNextLevel = ( ( ( Chocobo_BeakNextLevel + ( Chocobo_BeakNextLevel / ( 64 - Chocobo_BeakLevel64 ) ) ) + 2 ) * 2 )
  59. } else {
  60. if ( General_FieldEntrance != 2 ) {
  61. InitRegion( 19, 0 ) // Entry19
  62. }
  63. }
  64. if ( ( ( VARL_GenBool_1423 == 0 ) || ( VARL_GenBool_810 == 0 ) ) || ( ( World_CurrentTransport >= 1 ) && ( World_CurrentTransport <= 6 ) ) ) {
  65. InitObject( 4, 0 ) // Entry4
  66. switch 4 ( Chocobo_ChocoColor ) from 2 {
  67. case +0:
  68. InitObject( 15, 0 ) // Entry15
  69. break
  70. case +1:
  71. InitObject( 16, 0 ) // Entry16
  72. break
  73. case +2:
  74. InitObject( 17, 0 ) // Entry17
  75. break
  76. case +3:
  77. InitObject( 18, 0 ) // Entry18
  78. break
  79. default:
  80. set Chocobo_ChocoColor = 1
  81. InitObject( 4, 0 ) // Entry4
  82. break
  83. }
  84. }
  85. InitObject( 25, 0 ) // Entry25
  86. InitObject( 9, 0 ) // Entry9
  87. InitObject( 11, 0 ) // Entry11
  88. if ( General_FieldEntrance != 2 ) {
  89. InitRegion( 20, 0 ) // Entry20
  90. } else {
  91. ShowHereIcon( 0 )
  92. InitObject( 8, 128 ) // Entry8
  93. InitObject( 8, 129 ) // Entry8
  94. InitObject( 8, 130 ) // Entry8
  95. InitObject( 8, 131 ) // Entry8
  96. InitObject( 8, 132 ) // Entry8
  97. InitObject( 8, 133 ) // Entry8
  98. InitObject( 8, 134 ) // Entry8
  99. InitObject( 8, 135 ) // Entry8
  100. InitCode( 13, 0 ) // Entry13
  101. if ( Chocobo_ChocoColor >= 3 ) {
  102. InitObject( 8, 136 ) // Entry8
  103. InitRegion( 21, 0 ) // Entry21
  104. InitRegion( 23, 0 ) // Entry23
  105. InitRegion( 22, 0 ) // Entry22
  106. InitRegion( 24, 0 ) // Entry24
  107. }
  108. }
  109. set VAR_LocInt8_17 = 0
  110. if ( GetItemCount(317) ) { // Choco/grafia
  111. set VAR_LocInt8_17++
  112. }
  113. if ( GetItemCount(318) ) { // Choco/grafia
  114. set VAR_LocInt8_17++
  115. }
  116. if ( GetItemCount(319) ) { // Choco/grafia
  117. set VAR_LocInt8_17++
  118. }
  119. if ( GetItemCount(320) ) { // Choco/grafia
  120. set VAR_LocInt8_17++
  121. }
  122. if ( GetItemCount(321) ) { // Choco/grafia
  123. set VAR_LocInt8_17++
  124. }
  125. if ( GetItemCount(322) ) { // Choco/grafia
  126. set VAR_LocInt8_17++
  127. }
  128. set Chocobo_ChocoPieceAmount = VAR_LocInt8_17
  129. if ( ( ( VARL_GenBool_1041 == 0 ) && ( General_ScenarioCounter >= 10400 ) ) && ( Chocobo_ChocoColor == 2 ) ) {
  130. set Chocobo_LagoonTempExhaustChocograph = 0
  131. set Chocobo_NoFindChocograph = 0
  132. set Chocobo_NoMoreChocograph = 0
  133. set VARL_GenBool_1041 = 1
  134. }
  135. if ( ( ( VARL_GenBool_1040 == 0 ) && ( General_ScenarioCounter >= 10600 ) ) && ( Chocobo_ChocoColor == 4 ) ) {
  136. set Chocobo_LagoonExhaustChocograph = 0
  137. set Chocobo_NoFindChocograph = 0
  138. set Chocobo_NoMoreChocograph = 0
  139. set VARL_GenBool_1040 = 1
  140. }
  141. if ( General_FieldEntrance == 9999 ) {
  142. set VARL_GenBool_1067 = 0
  143. }
  144. if ( Chocobo_BeakLevel == 0 ) {
  145. set Chocobo_BeakLevel = 1
  146. set Chocobo_BeakExp = 0
  147. set Chocobo_BeakLevel64 = ( Chocobo_BeakNextLevel = ( ( 646 * Chocobo_BeakLevel ) / 1000 ) )
  148. set Chocobo_BeakNextLevel = ( Sin(( 64 - Chocobo_BeakNextLevel )) - Sin(( 64 - ( Chocobo_BeakNextLevel + 1 ) )) )
  149. set Chocobo_BeakNextLevel = ( ( ( Chocobo_BeakNextLevel + ( Chocobo_BeakNextLevel / ( 64 - Chocobo_BeakLevel64 ) ) ) + 2 ) * 2 )
  150. }
  151. set VAR_LocUInt8_2 = Chocobo_BeakLevel
  152. if ( VARL_GenBool_1423 == 0 ) {
  153. RunSoundCode( 0, 136 ) // Play Music ; [Unknown Audio]
  154. while ( SyncSounds != 0 ) {
  155. Wait( 1 )
  156. }
  157. set Field_MusicVolume = 125
  158. RunSoundCode1( 16897, 136, Field_MusicVolume ) // Music Volume ; [Unknown Audio]
  159. set VAR_GlobBool_167 = 0
  160. } else {
  161. if ( General_FieldEntrance == 2 ) {
  162. RunSoundCode( 0, 78 ) // Play Music ; [Unknown Audio]
  163. while ( SyncSounds != 0 ) {
  164. Wait( 1 )
  165. }
  166. set Field_MusicVolume = 125
  167. RunSoundCode1( 16897, 78, Field_MusicVolume ) // Music Volume ; [Unknown Audio]
  168. set VAR_GlobBool_167 = 0
  169. } else {
  170. RunSoundCode( 0, 24 ) // Play Music ; Aloha De Chocobo
  171. while ( SyncSounds != 0 ) {
  172. Wait( 1 )
  173. }
  174. set Field_MusicVolume = 125
  175. RunSoundCode1( 16897, 24, Field_MusicVolume ) // Music Volume ; Aloha De Chocobo
  176. set VAR_GlobBool_167 = 0
  177. }
  178. }
  179. if ( VAR_GlobBool_158 == 0 ) {
  180. SetTriangleFlagMask( 127 )
  181. } else {
  182. SetTriangleFlagMask( 255 )
  183. }
  184. Wait( 2 )
  185. SetTilePositionEx( 2, 0, 0, -96 )
  186. Wait( 2 )
  187. if ( VAR_GenUInt8_13 == 9 ) {
  188. SetTextVariable( 2, 0 ) // Martello
  189. WindowAsync( 6, 0, 3 ) // "debug"
  190. RaiseWindows( )
  191. WaitWindow( 6 )
  192. set VAR_GenUInt8_13 = 0
  193. }
  194. if ( VAR_GenUInt8_14 == 9 ) {
  195. SetTextVariable( 2, 1 ) // Daga
  196. WindowAsync( 6, 0, 3 ) // "debug"
  197. RaiseWindows( )
  198. WaitWindow( 6 )
  199. set VAR_GenUInt8_14 = 0
  200. }
  201. set VAR_GlobBool_159 = 1
  202. if ( VAR_GlobBool_158 == 1 ) {
  203. set VAR_GlobBool_158 = 1
  204. if ( VAR_GlobBool_159 == 1 ) {
  205. if ( VAR_GlobBool_156 == 0 ) {
  206. EnableMove( )
  207. SetTriangleFlagMask( 255 )
  208. if ( VAR_GlobBool_144 == 0 ) {
  209. EnableMenu( )
  210. }
  211. }
  212. }
  213. }
  214. RunSoundCode3( 53248, 2721, 0, -128, 125 ) // Play Sound ; [Unknown Audio]
  215. switch 3 ( Chocobo_CurrentField ) from 1 {
  216. case +0:
  217. if ( Chocobo_ChocoColor >= 3 ) {
  218. set VAR_LocUInt16_8 = 16
  219. } else {
  220. set VAR_LocUInt16_8 = 5
  221. }
  222. break
  223. case +1:
  224. set VAR_LocUInt16_8 = 8
  225. break
  226. case +2:
  227. set VAR_LocUInt16_8 = 50
  228. break
  229. }
  230. set VAR_LocInt8_18 = 1
  231. return
  232.  
  233.  
  234. #HW newfunction 1
  235. Function Main_Loop
  236. if ( ( ( VARL_GenBool_1423 == 0 ) || ( VARL_GenBool_810 == 0 ) ) || ( ( World_CurrentTransport >= 1 ) && ( World_CurrentTransport <= 6 ) ) ) {
  237. switch 4 ( Chocobo_ChocoColor ) from 2 {
  238. case +0:
  239. RunScriptSync( 0, 15, 12 ) // Entry15
  240. break
  241. case +1:
  242. RunScriptSync( 0, 16, 12 ) // Entry16
  243. break
  244. case +2:
  245. RunScriptSync( 0, 17, 12 ) // Entry17
  246. break
  247. case +3:
  248. RunScriptSync( 0, 18, 12 ) // Entry18
  249. break
  250. }
  251. }
  252. if ( ( ( ( World_CurrentTransport >= 1 ) && ( World_CurrentTransport <= 6 ) ) && ( General_FieldEntrance != 2 ) ) && ( General_FieldEntrance != 3 ) ) {
  253. RunScript( 6, 4, 13 ) // Entry4
  254. if ( VAR_GlobUInt8_17 == 255 ) {
  255. set Op66(( GetData_12 - 160 ), ( GetData_13 - 112 ))
  256. }
  257. 0xA9( 250 ) // Player Character
  258. FadeFilter( 7, 16, VAR_GlobUInt8_17, 0, 0, 0 )
  259. } else {
  260. if ( General_FieldEntrance == 2 ) {
  261. set VAR_GlobInt8_76 = 0
  262. RunScriptSync( 4, 9, 14 ) // Entry9
  263. } else {
  264. if ( VAR_GlobUInt8_17 == 255 ) {
  265. set Op66(( GetData_12 - 160 ), ( GetData_13 - 112 ))
  266. }
  267. 0xA9( 250 ) // Player Character
  268. FadeFilter( 7, 16, VAR_GlobUInt8_17, 0, 0, 0 )
  269. }
  270. }
  271. if ( VARL_GenBool_1423 == 1 ) {
  272. if ( ( ( World_CurrentTransport >= 1 ) && ( World_CurrentTransport <= 6 ) ) && ( General_FieldEntrance != 3 ) ) {
  273. if ( ( ( ( General_ScenarioCounter >= 8800 ) && ( VARL_GenBool_1047 == 0 ) ) && ( Chocobo_ForestChocographCount > 0 ) ) && ( Chocobo_ChocoColor >= 2 ) ) {
  274. set VARL_GenBool_773 = 1
  275. set VARL_GlobBool_600 = 1
  276. RunScriptSync( 6, 9, 15 ) // Entry9
  277. Wait( 20 )
  278. WindowSyncEx( 25, 2, 128, 359 ) // Entry25 ; "Zidane ─Dove sarà Mene?!"
  279. Wait( 30 )
  280. RunScriptSync( 6, 9, 16 ) // Entry9
  281. RunScriptSync( 6, 9, 17 ) // Entry9
  282. if ( ( VARL_GenBool_1046 == 0 ) && ( Chocobo_ChocoColor == 2 ) ) {
  283. WindowSyncEx( 9, 6, 128, 361 ) // Entry9 ; "Mene ─Ero uscito un secondo..."
  284. WindowSyncEx( 9, 6, 128, 345 ) // Entry9 ; "Mene ─Chi è questo chocobo? Dov’è il mio Choco, kupò?"
  285. WindowSyncEx( 25, 2, 128, 346 ) // Entry25 ; "Zidane ─Non so che gli è preso, però è lui, è proprio Choco!"
  286. SetSoundObjectPosition( 4, 125 ) // Entry4
  287. RunSoundCode3( 53248, 2726, 0, GetSoundDistance, GetSoundVolume ) // Play Sound ; [Unknown Audio]
  288. WindowSyncEx( 9, 6, 128, 347 ) // Entry9 ; "Mene ─Ma... Ma... Ma allora...?!"
  289. RunScript( 6, 9, 17 ) // Entry9
  290. WindowSyncEx( 9, 6, 128, 348 ) // Entry9 ; "Mene ─Ma allora è vera la leggenda! Sto cercando il paradiso terrestre..."
  291. WindowSyncEx( 9, 6, 128, 349 ) // Entry9 ; "Mene ─Ma la leggenda dice che solo un chocobo prescelto e il suo fantino possono andare in questo paradiso."
  292. WindowSyncEx( 9, 6, 128, 350 ) // Entry9 ; "Mene ─Devi allevare Choco, farlo diventare potentissimo e poi devi farti portare in paradiso!"
  293. RunScriptSync( 6, 9, 18 ) // Entry9
  294. RunScriptSync( 6, 9, 17 ) // Entry9
  295. WindowSyncEx( 25, 2, 128, 363 ) // Entry25 ; "Zidane ─Dov’eri?"
  296. WindowSyncEx( 9, 6, 128, 364 ) // Entry9 ; "Mene ─Sono contento che me lo chiedi!"
  297. } else {
  298. WindowSyncEx( 9, 6, 128, 360 ) // Entry9 ; "Mene ─Eccomi, kupò! Ero uscito un secondo..."
  299. }
  300. WindowSyncEx( 9, 6, 128, 365 ) // Entry9 ; "Mene ─Mi hai trovato finalmente! Attraversando il mare verso sud ovest, c’è l’arcipelago Salpege."
  301. WindowSyncEx( 9, 6, 128, 366 ) // Entry9 ; "Mene ─Lì c’è un’isola chiamata Bamunele che ha un piccolo golfo in cui puoi entrare da una secca. Controlla bene sulla mappa, kupò!"
  302. WindowSyncEx( 9, 6, 128, 367 ) // Entry9 ; "Mene ─Ho sentito dire che il golfo è illuminato da una luce diafana, proprio come questo bosco. Sono certo che c’è una chocografia!!"
  303. if ( ( VARL_GenBool_1046 == 0 ) && ( Chocobo_ChocoColor == 2 ) ) {
  304. set VARL_GenBool_1046 = 1
  305. } else {
  306. RunScriptSync( 6, 9, 18 ) // Entry9
  307. RunScriptSync( 6, 9, 17 ) // Entry9
  308. }
  309. set VARL_GenBool_1047 = 1
  310. set VARL_GlobBool_600 = 0
  311. } else {
  312. if ( ( Chocobo_ChocoColor == 2 ) && ( VARL_GenBool_1046 == 0 ) ) {
  313. set VARL_GlobBool_600 = 1
  314. RunScriptSync( 6, 9, 17 ) // Entry9
  315. WindowSyncEx( 9, 6, 128, 345 ) // Entry9 ; "Mene ─Chi è questo chocobo? Dov’è il mio Choco, kupò?"
  316. WindowSyncEx( 25, 2, 128, 346 ) // Entry25 ; "Zidane ─Non so che gli è preso, però è lui, è proprio Choco!"
  317. SetSoundObjectPosition( 4, 125 ) // Entry4
  318. RunSoundCode3( 53248, 2726, 0, GetSoundDistance, GetSoundVolume ) // Play Sound ; [Unknown Audio]
  319. RunScriptSync( 6, 9, 19 ) // Entry9
  320. WindowSyncEx( 9, 6, 128, 347 ) // Entry9 ; "Mene ─Ma... Ma... Ma allora...?!"
  321. RunScript( 6, 9, 17 ) // Entry9
  322. WindowSyncEx( 9, 6, 128, 348 ) // Entry9 ; "Mene ─Ma allora è vera la leggenda! Sto cercando il paradiso terrestre..."
  323. WindowSyncEx( 9, 6, 128, 349 ) // Entry9 ; "Mene ─Ma la leggenda dice che solo un chocobo prescelto e il suo fantino possono andare in questo paradiso."
  324. WindowSyncEx( 9, 6, 128, 350 ) // Entry9 ; "Mene ─Devi allevare Choco, farlo diventare potentissimo e poi devi farti portare in paradiso!"
  325. RunScriptSync( 6, 9, 18 ) // Entry9
  326. RunScriptSync( 6, 9, 17 ) // Entry9
  327. set VARL_GenBool_1046 = 1
  328. set VARL_GlobBool_600 = 0
  329. } else {
  330. if ( ( Chocobo_ChocoColor == 3 ) && ( VARL_GenBool_1159 == 0 ) ) {
  331. set VARL_GlobBool_600 = 1
  332. Wait( 24 )
  333. RunScriptSync( 6, 9, 17 ) // Entry9
  334. WindowSyncEx( 9, 6, 128, 351 ) // Entry9 ; "Mene ─Uhao! Stavolta sei diventato rosso fiammante! Cavolo, ti sarai fatto un mucchio di chocobeccate!"
  335. set VARL_GenBool_1159 = 1
  336. set VARL_GlobBool_600 = 0
  337. } else {
  338. if ( ( Chocobo_ChocoColor == 4 ) && ( VARL_GenBool_1158 == 0 ) ) {
  339. set VARL_GlobBool_600 = 1
  340. Wait( 24 )
  341. RunScriptSync( 6, 9, 17 ) // Entry9
  342. Wait( 15 )
  343. WindowSyncEx( 9, 6, 128, 352 ) // Entry9 ; "Mene ─Ora sei diventato scuro, kupò! Ma che sei a lutto?"
  344. Wait( 30 )
  345. WindowSyncEx( 4, 2, 128, 353 ) // Entry4 ; "Choco ─Kuéé..."
  346. WindowSyncEx( 9, 6, 128, 354 ) // Entry9 ; "Mene ─Dai, Choco! Non prendertela a male!"
  347. WindowSyncEx( 9, 6, 128, 355 ) // Entry9 ; "Mene ─Qualsiasi sia il tuo colore, rimarrai sempre il mio amichetto, kupò!"
  348. set VARL_GenBool_1158 = 1
  349. set VARL_GlobBool_600 = 0
  350. } else {
  351. if ( ( Chocobo_ChocoColor == 5 ) && ( VARL_GenBool_1156 == 0 ) ) {
  352. set VARL_GlobBool_600 = 1
  353. Wait( 24 )
  354. RunScriptSync( 6, 9, 17 ) // Entry9
  355. WindowSyncEx( 9, 6, 128, 356 ) // Entry9 ; "Mene ─Ehi Choco! Hai cambiato di nuovo colore! Congratulazioni!"
  356. set VARL_GenBool_1156 = 1
  357. if ( ( ( VARL_GenBool_1045 == 0 ) && ( Chocobo_PepperKnown == 1 ) ) && ( VARL_GenBool_1086 == 0 ) ) {
  358. WindowSyncEx( 9, 6, 128, 376 ) // Entry9 ; "Mene ─Credo d’aver capito a che serve il Pepe mortale, kupò!"
  359. RunScriptSync( 6, 9, 19 ) // Entry9
  360. WindowSyncEx( 9, 6, 128, 377 ) // Entry9 ; "Mene ─Te ne sarai già accorto, ma se Choco mangia il Pepe mortale, per un istante, è potentissimo!"
  361. WindowSyncEx( 9, 6, 128, 378 ) // Entry9 ; "Mene ─Con quella forza, dovresti farcela ad andare al paradiso che io cerco da tanto tempo..."
  362. WindowSyncEx( 9, 6, 128, 379 ) // Entry9 ; "Mene ─È un luogo misterioso che non c’è sulla mappa, ma sono sicuro che lo troverai, kupò!"
  363. RunScriptSync( 6, 9, 18 ) // Entry9
  364. set VARL_GenBool_1045 = 1
  365. }
  366. set VARL_GlobBool_600 = 0
  367. } else {
  368. if ( ( ( ( ( Chocobo_ChocoColor == 5 ) && ( VARL_GenBool_1045 == 0 ) ) && ( Chocobo_PepperKnown == 1 ) ) && ( General_FieldEntrance != 3 ) ) && ( VARL_GenBool_1086 == 0 ) ) {
  369. set VARL_GlobBool_600 = 1
  370. Wait( 24 )
  371. RunScriptSync( 6, 9, 17 ) // Entry9
  372. WindowSyncEx( 9, 6, 128, 376 ) // Entry9 ; "Mene ─Credo d’aver capito a che serve il Pepe mortale, kupò!"
  373. RunScriptSync( 6, 9, 19 ) // Entry9
  374. WindowSyncEx( 9, 6, 128, 377 ) // Entry9 ; "Mene ─Te ne sarai già accorto, ma se Choco mangia il Pepe mortale, per un istante, è potentissimo!"
  375. WindowSyncEx( 9, 6, 128, 378 ) // Entry9 ; "Mene ─Con quella forza, dovresti farcela ad andare al paradiso che io cerco da tanto tempo..."
  376. WindowSyncEx( 9, 6, 128, 379 ) // Entry9 ; "Mene ─È un luogo misterioso che non c’è sulla mappa, ma sono sicuro che lo troverai, kupò!"
  377. RunScriptSync( 6, 9, 18 ) // Entry9
  378. set VARL_GenBool_1045 = 1
  379. set VARL_GlobBool_600 = 0
  380. }
  381. }
  382. }
  383. }
  384. }
  385. }
  386. } else {
  387. if ( ( Chocobo_ChocographKnown == 0 ) && ( Chocobo_ChocographFound != 0 ) ) {
  388. set VAR_GlobInt16_30 = 42
  389. } else {
  390. if ( ( Chocobo_ChocoPieceKnown == 0 ) && GetItemCount(317) ) { // Choco/grafia
  391. Wait( 24 )
  392. WindowSyncEx( 25, 2, 128, 340 ) // Entry25 ; "Zidane ─Cos’è una Choco/grafia?"
  393. WindowSyncEx( 9, 6, 128, 341 ) // Entry9 ; "Mene ─Fammi vedere, kupò."
  394. WindowSyncEx( 9, 6, 128, 342 ) // Entry9 ; "Mene ─Hmm... Dunque... Dovrebbe essere un pezzo di chocografia! La lastra è stata frantumata..."
  395. WindowSyncEx( 9, 6, 128, 343 ) // Entry9 ; "Mene ─C’è scritto qualcosa dietro, ma non riesco a leggere... Senti, la metto fra le Rarità. Quando hai voglia, dagli un’occhiata, k-kupò!"
  396. WindowSyncEx( 9, 6, 128, 344 ) // Entry9 ; "Mene ─Credo che se metti insieme le choco/grafie, potrai creare una chocografia completa, kupò!"
  397. set Chocobo_ChocoPieceKnown = 1
  398. set VAR_LocInt8_18 = 0
  399. } else {
  400. if ( GetItemCount(322) && ( ( ( Chocobo_ChocographFound >> 19 ) & 1 ) == 0 ) ) { // Choco/grafia
  401. Wait( 24 )
  402. WindowSyncEx( 9, 6, 128, 373 ) // Entry9 ; "Mene ─Non dirmi che hai raccolto tutte le Choco/grafie, kupò?"
  403. WindowSyncEx( 9, 6, 128, 374 ) // Entry9 ; "Mene ─Allora puoi ricostruire la chocografia intera, kupò!"
  404. WindowSyncEx( 9, 6, 128, 375 ) // Entry9 ; "Mene ─Capisco che vuoi vedere cosa c’è inciso dietro, ma forse ora è meglio andare a cercare i tesori, kupò kupò!"
  405. set Chocobo_ChocographFound |= 524288L
  406. set VAR_LocInt8_18 = 0
  407. } else {
  408. if ( ( Chocobo_PepperFound == 1 ) && ( Chocobo_PepperKnown == 0 ) ) {
  409. Wait( 24 )
  410. SetTextVariable( 1, 252 ) // Pepe mortale
  411. WindowSyncEx( 25, 2, 128, 368 ) // Entry25 ; "Zidane ─Cos’è questo Pepe mortale?"
  412. WindowSyncEx( 9, 6, 128, 369 ) // Entry9 ; "Mene ─Fammi vedere, kupò..."
  413. WindowSyncEx( 9, 6, 128, 370 ) // Entry9 ; "Mene ─Hmm... Ecco... È una spezie piccante da morire che veniva usata molto nell’antichità, kupò."
  414. WindowSyncEx( 9, 6, 128, 371 ) // Entry9 ; "Mene ─Eppure avevo sentito che a causa della “nebbia” non ne cresceva più, kupò."
  415. WindowSyncEx( 9, 6, 128, 372 ) // Entry9 ; "Mene ─Portatelo. Non si sa mai, magari ti è utile a qualcosa."
  416. set Chocobo_PepperKnown = 1
  417. set VAR_LocInt8_18 = 0
  418. } else {
  419. set VAR_LocInt8_18 = 0
  420. }
  421. }
  422. }
  423. }
  424. }
  425. switch 3 ( Chocobo_CurrentField ) from 1 {
  426. case +0:
  427. switch 5 ( Chocobo_ChocoColor ) from 1 {
  428. case +0:
  429. if ( ( Chocobo_ForestChocographCount == 9 ) && ( Chocobo_ChocoPieceAmount == 1 ) ) {
  430. set Chocobo_NoFindChocograph = 1
  431. set Chocobo_NoMoreChocograph = 0
  432. } else {
  433. set Chocobo_NoMoreChocograph = 0
  434. set Chocobo_NoFindChocograph = 0
  435. }
  436. break
  437. case +1:
  438. if ( ( Chocobo_ForestChocographCount == 9 ) && ( Chocobo_ChocoPieceAmount == 2 ) ) {
  439. set Chocobo_NoFindChocograph = 1
  440. set Chocobo_NoMoreChocograph = 0
  441. } else {
  442. set Chocobo_NoMoreChocograph = 0
  443. set Chocobo_NoFindChocograph = 0
  444. }
  445. break
  446. case +2:
  447. if ( General_ScenarioCounter <= 10400 ) {
  448. if ( ( Chocobo_ForestChocographCount == 12 ) && ( Chocobo_ChocoPieceAmount == 4 ) ) {
  449. set Chocobo_NoFindChocograph = 1
  450. set Chocobo_NoMoreChocograph = 0
  451. } else {
  452. set Chocobo_NoMoreChocograph = 0
  453. set Chocobo_NoFindChocograph = 0
  454. }
  455. } else {
  456. if ( ( Chocobo_ForestChocographCount == 13 ) && ( Chocobo_ChocoPieceAmount == 4 ) ) {
  457. set Chocobo_NoFindChocograph = 1
  458. set Chocobo_NoMoreChocograph = 0
  459. } else {
  460. set Chocobo_NoMoreChocograph = 0
  461. set Chocobo_NoFindChocograph = 0
  462. }
  463. }
  464. break
  465. case +3 ; +4:
  466. if ( General_ScenarioCounter >= 10400 ) {
  467. if ( ( Chocobo_ForestChocographCount == 13 ) && ( Chocobo_ChocoPieceAmount == 6 ) ) {
  468. set Chocobo_NoMoreChocograph = 1
  469. set Chocobo_NoFindChocograph = 1
  470. } else {
  471. set Chocobo_NoMoreChocograph = 0
  472. set Chocobo_NoFindChocograph = 0
  473. }
  474. } else {
  475. if ( ( Chocobo_ForestChocographCount == 13 ) && ( Chocobo_ChocoPieceAmount == 4 ) ) {
  476. set Chocobo_NoFindChocograph = 1
  477. set Chocobo_NoMoreChocograph = 0
  478. } else {
  479. set Chocobo_NoMoreChocograph = 0
  480. set Chocobo_NoFindChocograph = 0
  481. }
  482. }
  483. break
  484. }
  485. break
  486. case +1:
  487. switch 4 ( Chocobo_ChocoColor ) from 2 {
  488. case +0:
  489. if ( ( Chocobo_LagoonChocographCount == 4 ) && ( Chocobo_ChocoPieceAmount == 2 ) ) {
  490. set Chocobo_NoFindChocograph = 1
  491. set Chocobo_NoMoreChocograph = 0
  492. } else {
  493. set Chocobo_NoMoreChocograph = 0
  494. set Chocobo_NoFindChocograph = 0
  495. }
  496. break
  497. case +1:
  498. if ( ( Chocobo_LagoonChocographCount == 4 ) && ( Chocobo_ChocoPieceAmount == 4 ) ) {
  499. set Chocobo_NoFindChocograph = 1
  500. set Chocobo_NoMoreChocograph = 0
  501. } else {
  502. set Chocobo_NoMoreChocograph = 0
  503. set Chocobo_NoFindChocograph = 0
  504. }
  505. break
  506. case +2 ; +3:
  507. if ( General_ScenarioCounter >= 10600 ) {
  508. if ( ( Chocobo_LagoonChocographCount == 7 ) && ( Chocobo_ChocoPieceAmount == 6 ) ) {
  509. set Chocobo_NoFindChocograph = 1
  510. set Chocobo_NoMoreChocograph = 1
  511. } else {
  512. set Chocobo_NoFindChocograph = 0
  513. set Chocobo_NoMoreChocograph = 0
  514. }
  515. } else {
  516. if ( General_ScenarioCounter >= 10400 ) {
  517. if ( ( Chocobo_LagoonChocographCount == 7 ) && ( Chocobo_ChocoPieceAmount == 5 ) ) {
  518. set Chocobo_NoFindChocograph = 1
  519. set Chocobo_NoMoreChocograph = 0
  520. } else {
  521. set Chocobo_NoMoreChocograph = 0
  522. set Chocobo_NoFindChocograph = 0
  523. }
  524. } else {
  525. if ( ( Chocobo_LagoonChocographCount == 7 ) && ( Chocobo_ChocoPieceAmount == 4 ) ) {
  526. set Chocobo_NoFindChocograph = 1
  527. set Chocobo_NoMoreChocograph = 0
  528. } else {
  529. set Chocobo_NoMoreChocograph = 0
  530. set Chocobo_NoFindChocograph = 0
  531. }
  532. }
  533. }
  534. break
  535. }
  536. break
  537. case +2:
  538. if ( Chocobo_GardenChocographCount == 3 ) {
  539. set Chocobo_NoFindChocograph = 1
  540. set Chocobo_NoMoreChocograph = 1
  541. } else {
  542. set Chocobo_NoFindChocograph = 0
  543. set Chocobo_NoMoreChocograph = 0
  544. }
  545. break
  546. }
  547. if ( ( General_FieldEntrance == 3 ) && ( VAR_GenUInt8_132 < 40 ) ) {
  548. Wait( 20 )
  549. switch 5 ( Chocobo_ChocoColor ) from 1 {
  550. case +0:
  551. if ( ( Chocobo_ForestTempExhaustChocograph == 0 ) && ( Chocobo_NoFindChocograph == 1 ) ) {
  552. Wait( 20 )
  553. WindowSyncEx( 9, 6, 128, 232 ) // Entry9 ; "Mene ─Choco dice che per ora non può trovare altre chocografie!"
  554. if ( VARL_GenBool_1047 == 1 ) {
  555. WindowSyncEx( 9, 6, 128, 234 ) // Entry9 ; "Mene ─Perché non provi ad andare al golfo, oppure a cercare dei tesori con le chocografie, kupò?"
  556. }
  557. set Chocobo_ForestTempExhaustChocograph = 1
  558. }
  559. break
  560. case +1:
  561. if ( ( Chocobo_ForestTempExhaustChocograph == 0 ) && ( Chocobo_NoFindChocograph == 1 ) ) {
  562. Wait( 20 )
  563. WindowSyncEx( 9, 6, 128, 232 ) // Entry9 ; "Mene ─Choco dice che per ora non può trovare altre chocografie!"
  564. if ( General_ScenarioCounter >= 9400 ) {
  565. WindowSyncEx( 9, 6, 128, 234 ) // Entry9 ; "Mene ─Perché non provi ad andare al golfo, oppure a cercare dei tesori con le chocografie, kupò?"
  566. }
  567. set Chocobo_ForestTempExhaustChocograph = 1
  568. }
  569. break
  570. case +2:
  571. if ( ( Chocobo_ForestExhaustChocograph == 0 ) && ( Chocobo_NoFindChocograph == 1 ) ) {
  572. Wait( 20 )
  573. WindowSyncEx( 9, 6, 128, 232 ) // Entry9 ; "Mene ─Choco dice che per ora non può trovare altre chocografie!"
  574. WindowSyncEx( 9, 6, 128, 234 ) // Entry9 ; "Mene ─Perché non provi ad andare al golfo, oppure a cercare dei tesori con le chocografie, kupò?"
  575. set Chocobo_ForestExhaustChocograph = 1
  576. }
  577. break
  578. case +3:
  579. if ( ( Chocobo_ForestExhaustChocograph == 0 ) && ( Chocobo_NoMoreChocograph == 1 ) ) {
  580. Wait( 20 )
  581. WindowSyncEx( 9, 6, 128, 233 ) // Entry9 ; "Mene ─Choco dice che ha già scovato tutte le chocografie che c’erano qui, kupò kupò!"
  582. WindowSyncEx( 9, 6, 128, 236 ) // Entry9 ; "Mene ─Magari ci sono altri posti in cui puoi andare usando il Pepe mortale, kupò..."
  583. set Chocobo_ForestExhaustChocograph = 1
  584. }
  585. break
  586. case +4:
  587. if ( ( Chocobo_ForestExhaustChocograph == 0 ) && ( Chocobo_NoMoreChocograph == 1 ) ) {
  588. Wait( 20 )
  589. WindowSyncEx( 9, 6, 128, 233 ) // Entry9 ; "Mene ─Choco dice che ha già scovato tutte le chocografie che c’erano qui, kupò kupò!"
  590. if ( VARL_GenBool_1086 == 0 ) {
  591. WindowSyncEx( 9, 6, 128, 237 ) // Entry9 ; "Mene ─Credo che ora puoi andare al paradiso della fantasia che non compare sulla mappa, kupò!"
  592. WindowSyncEx( 9, 6, 128, 238 ) // Entry9 ; "Mene ─Anche Choco muore dalla voglia di andare! La chiave per arrivarci è di certo il Pepe mortale, kupò!"
  593. WindowSyncEx( 9, 6, 128, 239 ) // Entry9 ; "Mene ─... o almeno credo!"
  594. } else {
  595. WindowSyncEx( 9, 6, 128, 236 ) // Entry9 ; "Mene ─Magari ci sono altri posti in cui puoi andare usando il Pepe mortale, kupò..."
  596. }
  597. set Chocobo_ForestExhaustChocograph = 1
  598. }
  599. break
  600. }
  601. }
  602. if ( VAR_LocInt8_18 == 0 ) {
  603. set VAR_GlobBool_158 = 1
  604. if ( VAR_GlobBool_159 == 1 ) {
  605. if ( VAR_GlobBool_156 == 0 ) {
  606. EnableMove( )
  607. SetTriangleFlagMask( 255 )
  608. if ( VAR_GlobBool_144 == 0 ) {
  609. EnableMenu( )
  610. }
  611. }
  612. }
  613. }
  614. }
  615. return
  616.  
  617.  
  618. #HW newfunction 20
  619. Function Main_20
  620. if ( General_ScenarioCounter < 3700 ) {
  621. set VAR_GlobUInt8_40 = ( VAR_GlobInt16_30 = 1 )
  622. } else {
  623. if ( General_ScenarioCounter < 4990 ) {
  624. set VARL_GenUInt8_264 = 1
  625. set VAR_GlobUInt8_40 = ( VAR_GlobInt16_30 = 3 )
  626. } else {
  627. if ( General_ScenarioCounter < 5900 ) {
  628. set VAR_GlobUInt8_40 = ( VAR_GlobInt16_30 = 26 )
  629. } else {
  630. if ( General_ScenarioCounter < 11090 ) {
  631. set VAR_GlobUInt8_40 = ( VAR_GlobInt16_30 = 36 )
  632. } else {
  633. set VAR_GlobUInt8_40 = ( VAR_GlobInt16_30 = 37 )
  634. }
  635. }
  636. }
  637. }
  638. return
  639.  
  640.  
  641. #HW newfunction 21
  642. Function Main_21
  643. return
  644.  
  645.  
  646. #HW newfunction 22
  647. Function Main_22
  648. ChangeTimerTime( ( 60 / VAR_GlobInt8_36 ) + 1 )
  649. ShowTimer( 1 )
  650. RunTimer( 1 )
  651. return
  652.  
  653.  
  654. #HW newfunction 23
  655. Function Main_23
  656. while ( 1 ) {
  657. while ( GetTimerTime != 0 ) {
  658. Wait( 1 )
  659. }
  660. while ( VAR_GlobUInt8_52 != 0 ) {
  661. Wait( 1 )
  662. }
  663. if ( GetTimerTime == 0 ) {
  664. set VAR_GlobBool_156 = 1
  665. break
  666. }
  667. }
  668. set VAR_GlobUInt16_45 = 30000
  669. set VAR_GlobBool_158 = 0
  670. if ( VAR_GlobBool_159 == 1 ) {
  671. DisableMove( )
  672. DisableMenu( )
  673. }
  674. SetTriangleFlagMask( 127 )
  675. set Field_MusicVolume = 75
  676. RunSoundCode2( 34305, 0, 60, Field_MusicVolume ) // All Musics Volume Intpl ; Battle
  677. set VAR_GlobBool_167 = 0
  678. if ( 0 ) {
  679. set VAR_GlobBool_167 = 1
  680. }
  681. WaitWindow( 1 )
  682. set VAR_GlobBool_158 = 0
  683. if ( VAR_GlobBool_159 == 1 ) {
  684. DisableMove( )
  685. DisableMenu( )
  686. }
  687. SetTriangleFlagMask( 127 )
  688. WindowAsync( 1, 0, 278 ) // " Fine "
  689. RaiseWindows( )
  690. set VAR_GlobBool_158 = 0
  691. if ( VAR_GlobBool_159 == 1 ) {
  692. DisableMove( )
  693. DisableMenu( )
  694. }
  695. SetTriangleFlagMask( 127 )
  696. FadeFilter( 2, 15, 0, 32, 32, 32 )
  697. Wait( 15 )
  698. WaitWindow( 1 )
  699. RunScriptSync( 2, 0, 24 ) // Main
  700. Wait( 15 )
  701. CloseWindow( 0 )
  702. CloseWindow( 1 )
  703. CloseWindow( 2 )
  704. CloseWindow( 3 )
  705. CloseWindow( 4 )
  706. CloseWindow( 5 )
  707. CloseWindow( 6 )
  708. CloseWindow( 7 )
  709. ShowTimer( 0 )
  710. ChangeTimerTime( 0 )
  711. if ( VAR_GlobUInt8_17 == 255 ) {
  712. set Op66(( GetData_12 - 160 ), ( GetData_13 - 112 ))
  713. }
  714. 0xA9( 250 ) // Player Character
  715. FadeFilter( 6, 15, VAR_GlobUInt8_17, 255, 255, 255 )
  716. set Field_MusicVolume = 0
  717. RunSoundCode2( 34305, 0, 30, Field_MusicVolume ) // All Musics Volume Intpl ; Battle
  718. set VAR_GlobBool_167 = 0
  719. if ( 1 ) {
  720. set VAR_GlobBool_167 = 1
  721. }
  722. Wait( 15 )
  723. switch 3 ( Chocobo_CurrentField ) from 1 {
  724. case +0:
  725. if ( VAR_GlobBool_167 == 1 ) {
  726. RunSoundCode( 265, 65535 ) // Stop Current Music ; [Unknown Audio]
  727. set VAR_GlobBool_167 = 0
  728. }
  729. if ( VAR_GlobBool_162 == 0 ) {
  730. }
  731. if ( VAR_GlobBool_163 == 0 ) {
  732. }
  733. set General_FieldEntrance = 3
  734. Field( 2950 ) // Chocobosco
  735. break
  736. case +1:
  737. if ( VAR_GlobBool_167 == 1 ) {
  738. RunSoundCode( 265, 65535 ) // Stop Current Music ; [Unknown Audio]
  739. set VAR_GlobBool_167 = 0
  740. }
  741. if ( VAR_GlobBool_162 == 0 ) {
  742. }
  743. if ( VAR_GlobBool_163 == 0 ) {
  744. }
  745. set General_FieldEntrance = 3
  746. Field( 2951 ) // Chocogolfo
  747. break
  748. case +2:
  749. if ( VAR_GlobBool_167 == 1 ) {
  750. RunSoundCode( 265, 65535 ) // Stop Current Music ; [Unknown Audio]
  751. set VAR_GlobBool_167 = 0
  752. }
  753. if ( VAR_GlobBool_162 == 0 ) {
  754. }
  755. if ( VAR_GlobBool_163 == 0 ) {
  756. }
  757. set General_FieldEntrance = 3
  758. Field( 2952 ) // Chocoaeroparco
  759. break
  760. }
  761. return
  762.  
  763.  
  764. #HW newfunction 24
  765. Function Main_24
  766. CloseWindow( 0 )
  767. CloseWindow( 2 )
  768. set VAR_LocUInt8_0 = 1
  769. while ( VAR_LocUInt8_0 <= VAR_GlobUInt8_51 ) {
  770. switch 8 ( VAR_LocUInt8_0 ) from 1 {
  771. case +0:
  772. set VAR_LocUInt16_4 = VAR_GlobUInt16_56
  773. set VAR_LocUInt8_1 = VAR_GenUInt8_158
  774. break
  775. case +1:
  776. set VAR_LocUInt16_4 = VAR_GlobUInt16_58
  777. set VAR_LocUInt8_1 = VAR_GenUInt8_159
  778. break
  779. case +2:
  780. set VAR_LocUInt16_4 = VAR_GlobUInt16_60
  781. set VAR_LocUInt8_1 = VAR_GenUInt8_160
  782. break
  783. case +3:
  784. set VAR_LocUInt16_4 = VAR_GlobUInt16_62
  785. set VAR_LocUInt8_1 = VAR_GenUInt8_161
  786. break
  787. case +4:
  788. set VAR_LocUInt16_4 = VAR_GlobUInt16_64
  789. set VAR_LocUInt8_1 = VAR_GenUInt8_162
  790. break
  791. case +5:
  792. set VAR_LocUInt16_4 = VAR_GlobUInt16_66
  793. set VAR_LocUInt8_1 = VAR_GenUInt8_163
  794. break
  795. case +6:
  796. set VAR_LocUInt16_4 = VAR_GlobUInt16_68
  797. set VAR_LocUInt8_1 = VAR_GenUInt8_164
  798. break
  799. case +7:
  800. set VAR_LocUInt16_4 = VAR_GlobUInt16_70
  801. set VAR_LocUInt8_1 = VAR_GenUInt8_165
  802. break
  803. }
  804. if ( ( VAR_LocUInt16_4 == 30000 ) || ( VAR_LocUInt16_4 == 30001 ) ) {
  805. set VAR_LocUInt8_1 += 5
  806. }
  807. set VAR_LocUInt16_6 += VAR_LocUInt8_1
  808. SetTextVariable( 7, VAR_LocUInt8_0 )
  809. if ( VAR_LocUInt16_4 < 29999 ) {
  810. if ( VAR_LocUInt16_4 >= 1000 ) {
  811. set Treasure_Gil = ( VAR_LocUInt16_4 - 1000 )
  812. if ( ( Treasure_Gil + GetGil ) > 9999999L ) {
  813. set Treasure_Gil = ( 9999999L - GetGil )
  814. }
  815. SetTextVariable( 0, Treasure_Gil )
  816. SetTextVariable( 4, VAR_LocUInt8_1 )
  817. WindowAsync( 1, 0, 316 ) // " 0° tesoro trovato 0 guil Punti ottenuti: 0 "
  818. } else {
  819. if ( ( ( GetItemCount(VAR_LocUInt16_4) < 99 ) && ( VAR_LocUInt16_4 < 512 ) ) || ( ( VAR_LocUInt16_4 >= 512 ) && ( GetCardAmount < 100 ) ) ) {
  820. AddItem( VAR_LocUInt16_4, 1 )
  821. SetTextVariable( 0, VAR_LocUInt16_4 )
  822. SetTextVariable( 4, VAR_LocUInt8_1 )
  823. WindowAsync( 1, 0, 317 ) // " 0° tesoro trovato: Item Punti ottenuti: 0 "
  824. } else {
  825. SetTextVariable( 0, VAR_LocUInt16_4 )
  826. SetTextVariable( 4, VAR_LocUInt8_1 )
  827. if ( VAR_LocUInt16_4 < 512 ) {
  828. WindowAsync( 1, 0, 321 ) // " 0° tesoro trovato: Item! Ma non puoi possederne altri! Punti ottenuti: 0 "
  829. } else {
  830. WindowAsync( 1, 0, 322 ) // " 0° tesoro trovato: Carta! Ma non puoi possederne altre! Punti ottenuti: 0 "
  831. }
  832. }
  833. }
  834. } else {
  835. if ( VAR_LocUInt16_4 == 30000 ) {
  836. SetTextVariable( 4, VAR_LocUInt8_1 )
  837. if ( Chocobo_ChocographKnown == 0 ) {
  838. WindowAsync( 1, 0, 318 ) // " 0° tesoro trovato: Lastra incisa Punti ottenuti: 0 "
  839. } else {
  840. WindowAsync( 1, 0, 319 ) // " 0° tesoro trovato: Chocografia Punti ottenuti: 0 "
  841. }
  842. } else {
  843. SetTextVariable( 4, VAR_LocUInt8_1 )
  844. WindowAsync( 1, 0, 320 ) // " 0° tesoro trovato: Choco/grafia Punti ottenuti: 0 "
  845. }
  846. }
  847. RaiseWindows( )
  848. WaitWindow( 1 )
  849. set VAR_LocUInt8_0++
  850. }
  851. set VAR_LocUInt8_3 = ( VAR_LocUInt8_0 - 1 )
  852. if ( VAR_GlobUInt8_44 ) {
  853. set VAR_LocInt16_15 = ( ( VAR_GlobUInt8_44 + ( 7 - Chocobo_ChocoColor ) ) * VAR_LocUInt16_8 )
  854. set VAR_LocUInt16_6 += VAR_LocInt16_15
  855. SetTextVariable( 4, VAR_LocInt16_15 )
  856. WindowAsync( 1, 0, 323 ) // "BONUS: 0 punti "
  857. RaiseWindows( )
  858. WaitWindow( 1 )
  859. if ( Chocobo_BeakLevel < 99 ) {
  860. set Chocobo_BeakExp += VAR_LocInt16_15
  861. set VAR_LocInt8_12 = ( VAR_LocUInt16_13 = 0 )
  862. set Chocobo_BeakNextLevel -= VAR_LocInt16_15
  863. if ( Chocobo_BeakNextLevel == 0 ) {
  864. set VAR_LocInt8_12++
  865. set Chocobo_BeakLevel++
  866. set Chocobo_BeakLevel64 = ( Chocobo_BeakNextLevel = ( ( 646 * Chocobo_BeakLevel ) / 1000 ) )
  867. set Chocobo_BeakNextLevel = ( Sin(( 64 - Chocobo_BeakNextLevel )) - Sin(( 64 - ( Chocobo_BeakNextLevel + 1 ) )) )
  868. set Chocobo_BeakNextLevel = ( ( ( Chocobo_BeakNextLevel + ( Chocobo_BeakNextLevel / ( 64 - Chocobo_BeakLevel64 ) ) ) + 2 ) * 2 )
  869. } else {
  870. if ( Chocobo_BeakNextLevel < 0 ) {
  871. while ( Chocobo_BeakNextLevel < 0 ) {
  872. set VAR_LocInt8_12++
  873. set Chocobo_BeakLevel++
  874. if ( Chocobo_BeakLevel >= 99 ) {
  875. break
  876. }
  877. set VAR_LocUInt16_13 = Chocobo_BeakNextLevel
  878. set Chocobo_BeakLevel64 = ( Chocobo_BeakNextLevel = ( ( 646 * Chocobo_BeakLevel ) / 1000 ) )
  879. set Chocobo_BeakNextLevel = ( Sin(( 64 - Chocobo_BeakNextLevel )) - Sin(( 64 - ( Chocobo_BeakNextLevel + 1 ) )) )
  880. set Chocobo_BeakNextLevel = ( ( ( Chocobo_BeakNextLevel + ( Chocobo_BeakNextLevel / ( 64 - Chocobo_BeakLevel64 ) ) ) + 2 ) * 2 )
  881. set Chocobo_BeakNextLevel += VAR_LocUInt16_13
  882. }
  883. }
  884. }
  885. }
  886. if ( Chocobo_BeakLevel <= 99 ) {
  887. set Chocobo_BeakLevel -= VAR_LocInt8_12
  888. set VAR_LocUInt8_0 = 0
  889. while ( VAR_LocUInt8_0 < VAR_LocInt8_12 ) {
  890. RunSoundCode3( 53248, 683, 0, -128, 125 ) // Play Sound ; [Unknown Audio]
  891. set Chocobo_BeakLevel++
  892. SetTextVariable( 4, Chocobo_BeakLevel )
  893. WindowAsync( 1, 0, 326 ) // " Il becco si è indurito! Livello becco: 0 "
  894. RaiseWindows( )
  895. WaitWindow( 1 )
  896. set VAR_LocUInt8_0++
  897. }
  898. }
  899. }
  900. SetTextVariable( 7, VAR_LocUInt8_3 )
  901. SetTextVariable( 2, VAR_LocUInt16_6 )
  902. if ( Chocobo_BeakLevel != VAR_LocUInt8_2 ) {
  903. SetTextVariable( 4, Chocobo_BeakLevel - VAR_LocUInt8_2 )
  904. WindowAsync( 1, 0, 325 ) // " Totale tesori trovati: 0 Totale punti ottenuti: 0 Livello becco + 0 "
  905. } else {
  906. WindowAsync( 1, 0, 324 ) // " Totale tesori trovati: 0 Totale punti ottenuti: 0 "
  907. }
  908. RaiseWindows( )
  909. WaitWindow( 1 )
  910. switch 3 ( Chocobo_CurrentField ) from 1 {
  911. case +0:
  912. if ( Chocobo_ForestHighScore < VAR_LocUInt16_6 ) {
  913. set Chocobo_ForestHighScore = VAR_LocUInt16_6
  914. }
  915. if ( ( Chocobo_ForestGamePlayed + 1 ) < 9999 ) {
  916. set Chocobo_ForestGamePlayed++
  917. }
  918. break
  919. case +1:
  920. if ( Chocobo_LagoonHighScore < VAR_LocUInt16_6 ) {
  921. set Chocobo_LagoonHighScore = VAR_LocUInt16_6
  922. }
  923. if ( ( Chocobo_LagoonGamePlayed + 1 ) < 9999 ) {
  924. set Chocobo_LagoonGamePlayed++
  925. }
  926. break
  927. case +2:
  928. if ( Chocobo_GardenHighScore < VAR_LocUInt16_6 ) {
  929. set Chocobo_GardenHighScore = VAR_LocUInt16_6
  930. }
  931. if ( ( Chocobo_GardenGamePlayed + 1 ) < 9999 ) {
  932. set Chocobo_GardenGamePlayed++
  933. }
  934. break
  935. }
  936. if ( ( Chocobo_HotColdPoints + VAR_LocUInt16_6 ) > 99999L ) {
  937. set VAR_LocUInt16_6 = ( 99999L - Chocobo_HotColdPoints )
  938. set Chocobo_Lv99 = 1
  939. }
  940. set Chocobo_HotColdPoints += VAR_LocUInt16_6
  941. return
  942.  
  943.  
  944. #HW newentry 1
  945. #HW locals
  946. allocate 2
  947. #HW endlocals
  948.  
  949. #HW newfunction 0
  950. Function Code1_Init
  951. return
  952.  
  953.  
  954. #HW newfunction 1
  955. Function Code1_Loop
  956. set VAR_LocUInt8_1 = ( ( ( Sin(VAR_LocUInt8_0) >> 8 ) + ( Sin(( VAR_LocUInt8_0 >> 1 )) >> 9 ) ) + 71 )
  957. SetTileColor( 0, VAR_LocUInt8_1, VAR_LocUInt8_1, VAR_LocUInt8_1 )
  958. set VAR_LocUInt8_0 += 2
  959. Wait( 1 )
  960. loop
  961.  
  962.  
  963. #HW newentry 2
  964. #HW locals
  965. allocate 4
  966. #HW endlocals
  967.  
  968. #HW newfunction 0
  969. Function Code2_Init
  970. return
  971.  
  972.  
  973. #HW newfunction 11
  974. Function Code2_11
  975. Wait( VAR_GlobUInt8_25 )
  976. RunSPSCode( 0, 130, 1433, 0, 0 ) // Load Sps
  977. RunSPSCode( 1, 130, 1431, 0, 0 ) // Load Sps
  978. RunSPSCode( 2, 130, 1437, 0, 0 ) // Load Sps
  979. RunSPSCode( 3, 130, 1435, 0, 0 ) // Load Sps
  980. RunSPSCode( 0, 140, 0, 0, 0 ) // Set Rotation
  981. RunSPSCode( 0, 145, 5000, 0, 0 ) // Set Scale
  982. RunSPSCode( 0, 155, 128, 0, 0 ) // Set Fade
  983. RunSPSCode( 0, 160, 16, 0, 0 ) // Set Frame Rate
  984. RunSPSCode( 0, 170, 0, 0, 0 ) // Set Depth Offset
  985. RunSPSCode( 0, 156, 2, 0, 0 ) // Set Animation Rate
  986. RunSPSCode( 1, 140, 0, 0, 0 ) // Set Rotation
  987. RunSPSCode( 1, 145, 5000, 0, 0 ) // Set Scale
  988. RunSPSCode( 1, 155, 228, 0, 0 ) // Set Fade
  989. RunSPSCode( 1, 160, 16, 0, 0 ) // Set Frame Rate
  990. RunSPSCode( 1, 170, 0, 0, 0 ) // Set Depth Offset
  991. RunSPSCode( 1, 156, 1, 0, 0 ) // Set Animation Rate
  992. RunSPSCode( 2, 140, 0, 0, -200 ) // Set Rotation
  993. RunSPSCode( 2, 145, 2000, 0, 0 ) // Set Scale
  994. RunSPSCode( 2, 155, 255, 0, 0 ) // Set Fade
  995. RunSPSCode( 2, 160, 10, 0, 0 ) // Set Frame Rate
  996. RunSPSCode( 2, 170, 0, 0, 0 ) // Set Depth Offset
  997. RunSPSCode( 2, 156, 15, 0, 0 ) // Set Animation Rate
  998. RunSPSCode( 3, 140, 0, 2048, -300 ) // Set Rotation
  999. RunSPSCode( 3, 145, 2000, 0, 0 ) // Set Scale
  1000. RunSPSCode( 3, 155, 255, 0, 0 ) // Set Fade
  1001. RunSPSCode( 3, 160, 10, 0, 0 ) // Set Frame Rate
  1002. RunSPSCode( 3, 170, 0, 0, 0 ) // Set Depth Offset
  1003. RunSPSCode( 3, 156, 15, 0, 0 ) // Set Animation Rate
  1004. set VAR_LocInt16_0 = ( GetEntryPosX(250) - ( ( Sin(GetEntryAngle(250)) * 240 ) >> 12 ) )
  1005. set VAR_LocInt16_2 = ( GetEntryPosY(250) - ( ( Cos(GetEntryAngle(250)) * 240 ) >> 12 ) )
  1006. RunSPSCode( 0, 135, VAR_LocInt16_0, GetEntryPosZ(250), VAR_LocInt16_2 ) // Set Position
  1007. RunSPSCode( 1, 135, VAR_LocInt16_0, GetEntryPosZ(250), VAR_LocInt16_2 ) // Set Position
  1008. RunSPSCode( 2, 135, VAR_LocInt16_0, GetEntryPosZ(250), VAR_LocInt16_2 ) // Set Position
  1009. RunSPSCode( 3, 135, VAR_LocInt16_0, GetEntryPosZ(250), VAR_LocInt16_2 ) // Set Position
  1010. Wait( 23 )
  1011. RunSPSCode( 0, 130, -1, 0, 0 ) // Load Sps
  1012. RunSPSCode( 1, 130, -1, 0, 0 ) // Load Sps
  1013. Wait( 1 )
  1014. RunSPSCode( 2, 130, -1, 0, 0 ) // Load Sps
  1015. Wait( 16 )
  1016. RunSPSCode( 3, 130, -1, 0, 0 ) // Load Sps
  1017. return
  1018.  
  1019.  
  1020. #HW newentry 3
  1021. #HW locals
  1022. allocate 4
  1023. #HW endlocals
  1024.  
  1025. #HW newfunction 0
  1026. Function Code3_Init
  1027. return
  1028.  
  1029.  
  1030. #HW newfunction 11
  1031. Function Code3_11
  1032. Wait( VAR_GlobUInt8_25 )
  1033. RunSPSCode( 12, 130, 1433, 0, 0 ) // Load Sps
  1034. RunSPSCode( 13, 130, 1431, 0, 0 ) // Load Sps
  1035. RunSPSCode( 14, 130, 1437, 0, 0 ) // Load Sps
  1036. RunSPSCode( 15, 130, 1435, 0, 0 ) // Load Sps
  1037. RunSPSCode( 12, 140, 0, 0, 0 ) // Set Rotation
  1038. RunSPSCode( 12, 145, 5000, 0, 0 ) // Set Scale
  1039. RunSPSCode( 12, 155, 128, 0, 0 ) // Set Fade
  1040. RunSPSCode( 12, 160, 16, 0, 0 ) // Set Frame Rate
  1041. RunSPSCode( 12, 170, 0, 0, 0 ) // Set Depth Offset
  1042. RunSPSCode( 12, 156, 2, 0, 0 ) // Set Animation Rate
  1043. RunSPSCode( 13, 140, 0, 0, 0 ) // Set Rotation
  1044. RunSPSCode( 13, 145, 5000, 0, 0 ) // Set Scale
  1045. RunSPSCode( 13, 155, 228, 0, 0 ) // Set Fade
  1046. RunSPSCode( 13, 160, 16, 0, 0 ) // Set Frame Rate
  1047. RunSPSCode( 13, 170, 0, 0, 0 ) // Set Depth Offset
  1048. RunSPSCode( 13, 156, 1, 0, 0 ) // Set Animation Rate
  1049. RunSPSCode( 14, 140, 0, 0, -200 ) // Set Rotation
  1050. RunSPSCode( 14, 145, 2000, 0, 0 ) // Set Scale
  1051. RunSPSCode( 14, 155, 255, 0, 0 ) // Set Fade
  1052. RunSPSCode( 14, 160, 10, 0, 0 ) // Set Frame Rate
  1053. RunSPSCode( 14, 170, 0, 0, 0 ) // Set Depth Offset
  1054. RunSPSCode( 14, 156, 15, 0, 0 ) // Set Animation Rate
  1055. RunSPSCode( 15, 140, 0, 2048, -300 ) // Set Rotation
  1056. RunSPSCode( 15, 145, 2000, 0, 0 ) // Set Scale
  1057. RunSPSCode( 15, 155, 255, 0, 0 ) // Set Fade
  1058. RunSPSCode( 15, 160, 10, 0, 0 ) // Set Frame Rate
  1059. RunSPSCode( 15, 170, 0, 0, 0 ) // Set Depth Offset
  1060. RunSPSCode( 15, 156, 15, 0, 0 ) // Set Animation Rate
  1061. set VAR_LocInt16_0 = ( GetEntryPosX(250) - ( ( Sin(GetEntryAngle(250)) * 240 ) >> 12 ) )
  1062. set VAR_LocInt16_2 = ( GetEntryPosY(250) - ( ( Cos(GetEntryAngle(250)) * 240 ) >> 12 ) )
  1063. RunSPSCode( 12, 135, VAR_LocInt16_0, GetEntryPosZ(250), VAR_LocInt16_2 ) // Set Position
  1064. RunSPSCode( 13, 135, VAR_LocInt16_0, GetEntryPosZ(250), VAR_LocInt16_2 ) // Set Position
  1065. RunSPSCode( 14, 135, VAR_LocInt16_0, GetEntryPosZ(250), VAR_LocInt16_2 ) // Set Position
  1066. RunSPSCode( 15, 135, VAR_LocInt16_0, GetEntryPosZ(250), VAR_LocInt16_2 ) // Set Position
  1067. Wait( 23 )
  1068. RunSPSCode( 12, 130, -1, 0, 0 ) // Load Sps
  1069. RunSPSCode( 13, 130, -1, 0, 0 ) // Load Sps
  1070. Wait( 1 )
  1071. RunSPSCode( 14, 130, -1, 0, 0 ) // Load Sps
  1072. Wait( 16 )
  1073. RunSPSCode( 15, 130, -1, 0, 0 ) // Load Sps
  1074. return
  1075.  
  1076.  
  1077. #HW newentry 4
  1078. #HW locals
  1079. allocate 55
  1080. #HW endlocals
  1081.  
  1082. #HW newfunction 0
  1083. Function Chocobo_Init
  1084. if ( VARL_GenBool_1423 == 0 ) {
  1085. set VAR_GlobInt16_0 = 64192
  1086. set VAR_GlobInt16_4 = 65305
  1087. set VAR_GlobInt16_6 = 194
  1088. set VAR_GlobInt16_2 = 65478
  1089. } else {
  1090. if ( ( ( World_CurrentTransport >= 1 ) && ( World_CurrentTransport <= 6 ) ) && ( General_FieldEntrance != 3 ) ) {
  1091. set VAR_GlobInt16_0 = 65345
  1092. set VAR_GlobInt16_4 = 59764
  1093. set VAR_GlobInt16_6 = 128
  1094. set VAR_GlobInt16_2 = 268
  1095. } else {
  1096. if ( General_FieldEntrance == 3 ) {
  1097. set VAR_GlobInt16_0 = 65345
  1098. set VAR_GlobInt16_4 = 60634
  1099. set VAR_GlobInt16_6 = 128
  1100. set VAR_GlobInt16_2 = 268
  1101. set VAR_GlobInt8_32 = 1
  1102. } else {
  1103. set VAR_GlobInt16_0 = 65322
  1104. set VAR_GlobInt16_4 = 62404
  1105. set VAR_GlobInt16_6 = 255
  1106. set VAR_GlobInt16_2 = 23
  1107. set VAR_GlobInt8_32 = 1
  1108. }
  1109. }
  1110. }
  1111. SetModel( 259, 125 ) // Chocobo
  1112. CreateObject( VAR_GlobInt16_0, VAR_GlobInt16_4 )
  1113. TurnInstant( VAR_GlobInt16_6 )
  1114. SetStandAnimation( 2953 ) // Idle
  1115. SetWalkAnimation( 2962 ) // Walk
  1116. SetRunAnimation( 2960 ) // Run
  1117. SetLeftAnimation( 2958 ) // Turn_L
  1118. SetRightAnimation( 2956 ) // Turn_R
  1119. SetObjectLogicalSize( 32, 32, 45 )
  1120. SetAnimationStandSpeed( 14, 16, 18, 20 )
  1121. SetHeadAngle( 4, 1 )
  1122. if ( VARL_GenBool_1423 == 0 ) {
  1123. SetObjectFlags( 7 )
  1124. }
  1125. if ( ( ( World_CurrentTransport >= 1 ) && ( World_CurrentTransport <= 6 ) ) && ( General_FieldEntrance != 3 ) ) {
  1126. DefinePlayerCharacter( )
  1127. }
  1128. EnableHeadFocus( 0 )
  1129. set VAR_LocInt16_28 = 144
  1130. set VAR_LocInt16_30 = 512
  1131. set VAR_LocInt16_32 = 960
  1132. switch 5 ( Chocobo_ChocoColor ) from 1 {
  1133. case +0:
  1134. set Chocobo_ColorPeckBonus = 2
  1135. break
  1136. case +1:
  1137. set Chocobo_ColorPeckBonus = 3
  1138. break
  1139. case +2:
  1140. set Chocobo_ColorPeckBonus = 4
  1141. break
  1142. case +3:
  1143. set Chocobo_ColorPeckBonus = 5
  1144. break
  1145. case +4:
  1146. set Chocobo_ColorPeckBonus = 6
  1147. break
  1148. }
  1149. SetJumpAnimation( 2960, 1, 18 ) // Run
  1150. if ( Chocobo_ChocoColor != 1 ) {
  1151. if ( General_FieldEntrance == 3 ) {
  1152. SetObjectFlags( 4 )
  1153. } else {
  1154. SetObjectFlags( 14 )
  1155. }
  1156. }
  1157. RunSoundCode( 4616, 922 ) // Sound Null ; [Unknown Audio]
  1158. RunSoundCode( 4616, 914 ) // Sound Null ; [Unknown Audio]
  1159. RunModelCode( 16, 2962, 3, 922 ) // Add Sound
  1160. RunModelCode( 17, 2962, 3, 914 ) // Add Secondary Sound
  1161. RunModelCode( 18, 2962, 3, 1 ) // Sound Random Pitch
  1162. RunSoundCode( 4616, 922 ) // Sound Null ; [Unknown Audio]
  1163. RunSoundCode( 4616, 914 ) // Sound Null ; [Unknown Audio]
  1164. RunModelCode( 16, 2962, 14, 922 ) // Add Sound
  1165. RunModelCode( 17, 2962, 14, 914 ) // Add Secondary Sound
  1166. RunModelCode( 18, 2962, 14, 1 ) // Sound Random Pitch
  1167. RunSoundCode( 4616, 922 ) // Sound Null ; [Unknown Audio]
  1168. RunSoundCode( 4616, 914 ) // Sound Null ; [Unknown Audio]
  1169. RunModelCode( 16, 2960, 0, 922 ) // Add Sound
  1170. RunModelCode( 17, 2960, 0, 914 ) // Add Secondary Sound
  1171. RunModelCode( 18, 2960, 0, 1 ) // Sound Random Pitch
  1172. RunSoundCode( 4616, 922 ) // Sound Null ; [Unknown Audio]
  1173. RunSoundCode( 4616, 914 ) // Sound Null ; [Unknown Audio]
  1174. RunModelCode( 16, 2960, 9, 922 ) // Add Sound
  1175. RunModelCode( 17, 2960, 9, 914 ) // Add Secondary Sound
  1176. RunModelCode( 18, 2960, 9, 1 ) // Sound Random Pitch
  1177. return
  1178.  
  1179.  
  1180. #HW newfunction 1
  1181. Function Chocobo_Loop
  1182. switchex 2 ( VAR_GlobInt16_30 ) {
  1183. case 5:
  1184. RunJumpAnimation( )
  1185. WaitAnimation( )
  1186. SetupJump( -214, 58, -2476, 6 )
  1187. Jump( )
  1188. RunLandAnimation( )
  1189. WaitAnimation( )
  1190. SetSoundObjectPosition( 4, 125 ) // Chocobo
  1191. RunSoundCode3( 53248, 2726, 0, GetSoundDistance, GetSoundVolume ) // Play Sound ; [Unknown Audio]
  1192. WindowSync( 7, 128, 185 ) // "Choco ─Kué!!"
  1193. set VAR_GlobInt16_30 = 8
  1194. break
  1195. case 21:
  1196. WindowSync( 7, 128, 213 ) // "Choco ─Kuéé!!"
  1197. SetWalkSpeed( 120 )
  1198. InitWalk( )
  1199. Walk( -214, -4260 )
  1200. InitWalk( )
  1201. Walk( -694, -4833 )
  1202. InitWalk( )
  1203. Walk( -694, -6033 )
  1204. RunScriptAsync( 6, 25, 25 ) // Entry25
  1205. set VAR_GlobInt16_30 = 22
  1206. break
  1207. default:
  1208. if ( VAR_GlobInt8_32 == 1 ) {
  1209. if ( ( VAR_LocInt16_4 != GetEntryPosY(250) ) && ( World_CurrentTransport == 0 ) ) {
  1210. SetObjectFlags( 14 )
  1211. } else {
  1212. }
  1213. } else {
  1214. if ( VAR_GlobInt8_34 == 1 ) {
  1215. set VAR_GlobInt8_35 = 0
  1216. set VAR_LocInt8_35 = 1
  1217. while ( VAR_GlobUInt16_45 != 30000 ) {
  1218. while ( ( ( ( ( ( ( ( ( VAR_GlobInt8_35 == 0 ) && ( VAR_GlobUInt16_45 != 30000 ) ) && ( VARL_GlobBool_607 == 0 ) ) && ( VARL_GlobBool_606 == 0 ) ) && ( VARL_GlobBool_605 == 0 ) ) && ( VARL_GlobBool_604 == 0 ) ) && ( VARL_GlobBool_603 == 0 ) ) && ( VARL_GlobBool_602 == 0 ) ) && ( VARL_GlobBool_601 == 0 ) ) {
  1219. if ( IsButton(524288L) ) { // Moogle
  1220. set VAR_GlobInt8_35 = 99
  1221. set VAR_LocInt8_35 = 1
  1222. }
  1223. Wait( 1 )
  1224. }
  1225. switch 3 ( VAR_GlobInt8_35 ) from 97 {
  1226. case +0:
  1227. if ( ( VAR_GlobUInt16_47 >> 1 ) & 1 ) {
  1228. RunScriptAsync( 2, 128, 39 ) // [Invalid Entry ID]
  1229. }
  1230. if ( ( VAR_GlobUInt16_47 >> 2 ) & 1 ) {
  1231. RunScriptAsync( 2, 129, 39 ) // [Invalid Entry ID]
  1232. }
  1233. if ( ( VAR_GlobUInt16_47 >> 3 ) & 1 ) {
  1234. RunScriptAsync( 2, 130, 39 ) // [Invalid Entry ID]
  1235. }
  1236. if ( ( VAR_GlobUInt16_47 >> 4 ) & 1 ) {
  1237. RunScriptAsync( 2, 131, 39 ) // [Invalid Entry ID]
  1238. }
  1239. if ( ( VAR_GlobUInt16_47 >> 5 ) & 1 ) {
  1240. RunScriptAsync( 2, 132, 39 ) // [Invalid Entry ID]
  1241. }
  1242. if ( ( VAR_GlobUInt16_47 >> 6 ) & 1 ) {
  1243. RunScriptAsync( 2, 133, 39 ) // [Invalid Entry ID]
  1244. }
  1245. if ( ( VAR_GlobUInt16_47 >> 7 ) & 1 ) {
  1246. RunScriptAsync( 2, 134, 39 ) // [Invalid Entry ID]
  1247. }
  1248. if ( ( VAR_GlobUInt16_47 >> 8 ) & 1 ) {
  1249. RunScriptAsync( 2, 135, 39 ) // [Invalid Entry ID]
  1250. }
  1251. if ( ( VAR_GlobUInt16_47 >> 9 ) & 1 ) {
  1252. RunScriptAsync( 2, 136, 39 ) // [Invalid Entry ID]
  1253. }
  1254. break
  1255. case +1:
  1256. if ( ( VAR_GlobUInt16_47 >> 1 ) & 1 ) {
  1257. RunScriptAsync( 2, 128, 40 ) // [Invalid Entry ID]
  1258. }
  1259. if ( ( VAR_GlobUInt16_47 >> 2 ) & 1 ) {
  1260. RunScriptAsync( 2, 129, 40 ) // [Invalid Entry ID]
  1261. }
  1262. if ( ( VAR_GlobUInt16_47 >> 3 ) & 1 ) {
  1263. RunScriptAsync( 2, 130, 40 ) // [Invalid Entry ID]
  1264. }
  1265. if ( ( VAR_GlobUInt16_47 >> 4 ) & 1 ) {
  1266. RunScriptAsync( 2, 131, 40 ) // [Invalid Entry ID]
  1267. }
  1268. if ( ( VAR_GlobUInt16_47 >> 5 ) & 1 ) {
  1269. RunScriptAsync( 2, 132, 40 ) // [Invalid Entry ID]
  1270. }
  1271. if ( ( VAR_GlobUInt16_47 >> 6 ) & 1 ) {
  1272. RunScriptAsync( 2, 133, 40 ) // [Invalid Entry ID]
  1273. }
  1274. if ( ( VAR_GlobUInt16_47 >> 7 ) & 1 ) {
  1275. RunScriptAsync( 2, 134, 40 ) // [Invalid Entry ID]
  1276. }
  1277. if ( ( VAR_GlobUInt16_47 >> 8 ) & 1 ) {
  1278. RunScriptAsync( 2, 135, 40 ) // [Invalid Entry ID]
  1279. }
  1280. if ( ( VAR_GlobUInt16_47 >> 9 ) & 1 ) {
  1281. RunScriptAsync( 2, 136, 40 ) // [Invalid Entry ID]
  1282. }
  1283. break
  1284. case +2:
  1285. set VAR_GlobBool_158 = 0
  1286. if ( VAR_GlobBool_159 == 1 ) {
  1287. DisableMove( )
  1288. DisableMenu( )
  1289. }
  1290. SetTriangleFlagMask( 127 )
  1291. if ( VAR_GlobUInt16_47 != 0 ) {
  1292. if ( ( VAR_GlobUInt16_47 >> 1 ) & 1 ) {
  1293. set VAR_LocInt16_8 = Op61(ObjectUID_128)
  1294. set VAR_LocInt8_37 = 0
  1295. }
  1296. if ( ( VAR_GlobUInt16_47 >> 2 ) & 1 ) {
  1297. set VAR_LocInt16_10 = Op61(ObjectUID_129)
  1298. set VAR_LocInt8_37 = 0
  1299. }
  1300. if ( ( VAR_GlobUInt16_47 >> 3 ) & 1 ) {
  1301. set VAR_LocInt16_12 = Op61(ObjectUID_130)
  1302. set VAR_LocInt8_37 = 0
  1303. }
  1304. if ( ( VAR_GlobUInt16_47 >> 4 ) & 1 ) {
  1305. set VAR_LocInt16_14 = Op61(ObjectUID_131)
  1306. set VAR_LocInt8_37 = 0
  1307. }
  1308. if ( ( VAR_GlobUInt16_47 >> 5 ) & 1 ) {
  1309. set VAR_LocInt16_16 = Op61(ObjectUID_132)
  1310. set VAR_LocInt8_37 = 0
  1311. }
  1312. if ( ( VAR_GlobUInt16_47 >> 6 ) & 1 ) {
  1313. set VAR_LocInt16_18 = Op61(ObjectUID_133)
  1314. set VAR_LocInt8_37 = 0
  1315. }
  1316. if ( ( VAR_GlobUInt16_47 >> 7 ) & 1 ) {
  1317. set VAR_LocInt16_20 = Op61(ObjectUID_134)
  1318. set VAR_LocInt8_37 = 0
  1319. }
  1320. if ( ( VAR_GlobUInt16_47 >> 8 ) & 1 ) {
  1321. set VAR_LocInt16_22 = Op61(ObjectUID_135)
  1322. set VAR_LocInt8_37 = 0
  1323. }
  1324. if ( ( VAR_GlobUInt16_47 >> 9 ) & 1 ) {
  1325. set VAR_LocInt16_24 = Op61(ObjectUID_136)
  1326. set VAR_LocInt8_37 = 1
  1327. }
  1328. if ( VAR_LocUInt8_39 == 0 ) {
  1329. set VAR_LocInt16_6 = 30000
  1330. set VAR_LocInt16_26 = 0
  1331. switch 3 ( Chocobo_CurrentField ) from 1 {
  1332. case +0:
  1333. switch 5 ( Chocobo_ChocoColor ) from 1 {
  1334. case +0:
  1335. set VAR_LocUInt8_41 = 8
  1336. break
  1337. case +1:
  1338. set VAR_LocUInt8_41 = 8
  1339. break
  1340. case +2:
  1341. set VAR_LocUInt8_41 = 9
  1342. break
  1343. case +3:
  1344. set VAR_LocUInt8_41 = 9
  1345. break
  1346. case +4:
  1347. set VAR_LocUInt8_41 = 9
  1348. break
  1349. }
  1350. break
  1351. case +1:
  1352. switch 4 ( Chocobo_ChocoColor ) from 2 {
  1353. case +0:
  1354. set VAR_LocUInt8_41 = 5
  1355. break
  1356. case +1:
  1357. set VAR_LocUInt8_41 = 5
  1358. break
  1359. case +2:
  1360. set VAR_LocUInt8_41 = 9
  1361. break
  1362. case +3:
  1363. set VAR_LocUInt8_41 = 9
  1364. break
  1365. }
  1366. break
  1367. case +2:
  1368. set VAR_LocUInt8_41 = 9
  1369. break
  1370. }
  1371. while ( VAR_GlobUInt16_47 != VAR_LocInt16_26 ) {
  1372. set VAR_LocUInt8_38 = ( ( GetRandom % VAR_LocUInt8_41 ) + 1 )
  1373. if ( ( VAR_GlobUInt16_47 >> VAR_LocUInt8_38 ) & 1 ) {
  1374. set VAR_LocInt16_26 |= ( 1 << VAR_LocUInt8_38 )
  1375. switch 9 ( VAR_LocUInt8_38 ) from 1 {
  1376. case +0:
  1377. if ( ( VAR_GlobUInt16_47 >> 1 ) & 1 ) {
  1378. set VAR_LocInt16_6 = VAR_LocInt16_8
  1379. set VAR_GlobInt8_37 = 1
  1380. }
  1381. break
  1382. case +1:
  1383. if ( ( VAR_GlobUInt16_47 >> 2 ) & 1 ) {
  1384. set VAR_LocInt16_6 = VAR_LocInt16_10
  1385. set VAR_GlobInt8_37 = 2
  1386. }
  1387. break
  1388. case +2:
  1389. if ( ( VAR_GlobUInt16_47 >> 3 ) & 1 ) {
  1390. set VAR_LocInt16_6 = VAR_LocInt16_12
  1391. set VAR_GlobInt8_37 = 3
  1392. }
  1393. break
  1394. case +3:
  1395. if ( ( VAR_GlobUInt16_47 >> 4 ) & 1 ) {
  1396. set VAR_LocInt16_6 = VAR_LocInt16_14
  1397. set VAR_GlobInt8_37 = 4
  1398. }
  1399. break
  1400. case +4:
  1401. if ( ( VAR_GlobUInt16_47 >> 5 ) & 1 ) {
  1402. set VAR_LocInt16_6 = VAR_LocInt16_16
  1403. set VAR_GlobInt8_37 = 5
  1404. }
  1405. break
  1406. case +5:
  1407. if ( ( VAR_GlobUInt16_47 >> 6 ) & 1 ) {
  1408. set VAR_LocInt16_6 = VAR_LocInt16_18
  1409. set VAR_GlobInt8_37 = 6
  1410. }
  1411. break
  1412. case +6:
  1413. if ( ( VAR_GlobUInt16_47 >> 7 ) & 1 ) {
  1414. set VAR_LocInt16_6 = VAR_LocInt16_20
  1415. set VAR_GlobInt8_37 = 7
  1416. }
  1417. break
  1418. case +7:
  1419. if ( ( VAR_GlobUInt16_47 >> 8 ) & 1 ) {
  1420. set VAR_LocInt16_6 = VAR_LocInt16_22
  1421. set VAR_GlobInt8_37 = 8
  1422. }
  1423. break
  1424. case +8:
  1425. if ( ( VAR_GlobUInt16_47 >> 9 ) & 1 ) {
  1426. set VAR_LocInt16_6 = VAR_LocInt16_24
  1427. set VAR_GlobInt8_37 = 9
  1428. }
  1429. break
  1430. }
  1431. }
  1432. }
  1433. set VAR_LocUInt8_39 = 1
  1434. } else {
  1435. switch 9 ( VAR_GlobInt8_37 ) from 1 {
  1436. case +0:
  1437. if ( ( VAR_GlobUInt16_47 >> 1 ) & 1 ) {
  1438. set VAR_LocInt16_6 = VAR_LocInt16_8
  1439. set VAR_GlobInt8_37 = 1
  1440. set VAR_LocInt8_37 = 0
  1441. }
  1442. break
  1443. case +1:
  1444. if ( ( VAR_GlobUInt16_47 >> 2 ) & 1 ) {
  1445. set VAR_LocInt16_6 = VAR_LocInt16_10
  1446. set VAR_GlobInt8_37 = 2
  1447. set VAR_LocInt8_37 = 0
  1448. }
  1449. break
  1450. case +2:
  1451. if ( ( VAR_GlobUInt16_47 >> 3 ) & 1 ) {
  1452. set VAR_LocInt16_6 = VAR_LocInt16_12
  1453. set VAR_GlobInt8_37 = 3
  1454. set VAR_LocInt8_37 = 0
  1455. }
  1456. break
  1457. case +3:
  1458. if ( ( VAR_GlobUInt16_47 >> 4 ) & 1 ) {
  1459. set VAR_LocInt16_6 = VAR_LocInt16_14
  1460. set VAR_GlobInt8_37 = 4
  1461. set VAR_LocInt8_37 = 0
  1462. }
  1463. break
  1464. case +4:
  1465. if ( ( VAR_GlobUInt16_47 >> 5 ) & 1 ) {
  1466. set VAR_LocInt16_6 = VAR_LocInt16_16
  1467. set VAR_GlobInt8_37 = 5
  1468. set VAR_LocInt8_37 = 0
  1469. }
  1470. break
  1471. case +5:
  1472. if ( ( VAR_GlobUInt16_47 >> 6 ) & 1 ) {
  1473. set VAR_LocInt16_6 = VAR_LocInt16_18
  1474. set VAR_GlobInt8_37 = 6
  1475. set VAR_LocInt8_37 = 0
  1476. }
  1477. break
  1478. case +6:
  1479. if ( ( VAR_GlobUInt16_47 >> 7 ) & 1 ) {
  1480. set VAR_LocInt16_6 = VAR_LocInt16_20
  1481. set VAR_GlobInt8_37 = 7
  1482. set VAR_LocInt8_37 = 0
  1483. }
  1484. break
  1485. case +7:
  1486. if ( ( VAR_GlobUInt16_47 >> 8 ) & 1 ) {
  1487. set VAR_LocInt16_6 = VAR_LocInt16_22
  1488. set VAR_GlobInt8_37 = 8
  1489. set VAR_LocInt8_37 = 0
  1490. }
  1491. break
  1492. case +8:
  1493. if ( ( VAR_GlobUInt16_47 >> 9 ) & 1 ) {
  1494. set VAR_LocInt16_6 = VAR_LocInt16_24
  1495. set VAR_GlobInt8_37 = 9
  1496. set VAR_LocInt8_37 = 1
  1497. }
  1498. break
  1499. }
  1500. }
  1501. if ( ( VAR_LocInt16_6 < VAR_LocInt16_28 ) && ( ( ( VAR_LocInt8_37 == 0 ) && ( GetWalkpath(ObjectUID_250) != 1 ) ) || ( ( VAR_LocInt8_37 == 1 ) && ( GetWalkpath(ObjectUID_250) == 1 ) ) ) ) {
  1502. set VAR_GlobUInt8_52 = 1
  1503. WindowAsync( 6, 128, 283 ) // " K-Kuééh!! "
  1504. SetSoundObjectPosition( 4, 125 ) // Chocobo
  1505. RunSoundCode3( 53248, 2726, 0, GetSoundDistance, GetSoundVolume ) // Play Sound ; [Unknown Audio]
  1506. switch 9 ( VAR_GlobInt8_37 ) from 1 {
  1507. case +0:
  1508. set VAR_LocUInt8_39 = 0
  1509. RunScriptSync( 2, 128, 41 ) // [Invalid Entry ID]
  1510. Wait( 1 )
  1511. TerminateEntry( 128 ) // [Invalid Entry ID]
  1512. set VAR_LocInt8_36++
  1513. break
  1514. case +1:
  1515. set VAR_LocUInt8_39 = 0
  1516. RunScriptSync( 2, 129, 41 ) // [Invalid Entry ID]
  1517. Wait( 1 )
  1518. TerminateEntry( 129 ) // [Invalid Entry ID]
  1519. set VAR_LocInt8_36++
  1520. break
  1521. case +2:
  1522. set VAR_LocUInt8_39 = 0
  1523. RunScriptSync( 2, 130, 41 ) // [Invalid Entry ID]
  1524. Wait( 1 )
  1525. TerminateEntry( 130 ) // [Invalid Entry ID]
  1526. set VAR_LocInt8_36++
  1527. break
  1528. case +3:
  1529. set VAR_LocUInt8_39 = 0
  1530. RunScriptSync( 2, 131, 41 ) // [Invalid Entry ID]
  1531. Wait( 1 )
  1532. TerminateEntry( 131 ) // [Invalid Entry ID]
  1533. set VAR_LocInt8_36++
  1534. break
  1535. case +4:
  1536. set VAR_LocUInt8_39 = 0
  1537. RunScriptSync( 2, 132, 41 ) // [Invalid Entry ID]
  1538. Wait( 1 )
  1539. TerminateEntry( 132 ) // [Invalid Entry ID]
  1540. set VAR_LocInt8_36++
  1541. break
  1542. case +5:
  1543. set VAR_LocUInt8_39 = 0
  1544. RunScriptSync( 2, 133, 41 ) // [Invalid Entry ID]
  1545. Wait( 1 )
  1546. TerminateEntry( 133 ) // [Invalid Entry ID]
  1547. set VAR_LocInt8_36++
  1548. break
  1549. case +6:
  1550. set VAR_LocUInt8_39 = 0
  1551. RunScriptSync( 2, 134, 41 ) // [Invalid Entry ID]
  1552. Wait( 1 )
  1553. TerminateEntry( 134 ) // [Invalid Entry ID]
  1554. set VAR_LocInt8_36++
  1555. break
  1556. case +7:
  1557. set VAR_LocUInt8_39 = 0
  1558. RunScriptSync( 2, 135, 41 ) // [Invalid Entry ID]
  1559. Wait( 1 )
  1560. TerminateEntry( 135 ) // [Invalid Entry ID]
  1561. set VAR_LocInt8_36++
  1562. break
  1563. case +8:
  1564. set VAR_LocUInt8_39 = 0
  1565. RunScriptSync( 2, 136, 41 ) // [Invalid Entry ID]
  1566. Wait( 1 )
  1567. TerminateEntry( 136 ) // [Invalid Entry ID]
  1568. set VAR_LocInt8_36++
  1569. break
  1570. }
  1571. if ( ( ( VAR_GlobUInt8_51 == 4 ) && ( VAR_GlobUInt8_53 != 99 ) ) && ( !( ( Chocobo_CurrentField == 2 ) && ( ( Chocobo_ChocoColor == 2 ) || ( Chocobo_ChocoColor == 3 ) ) ) ) ) {
  1572. RunTimer( 0 )
  1573. if ( VARL_GenBool_1067 == 0 ) {
  1574. RunScriptSync( 4, 9, 42 ) // Entry9
  1575. set VARL_GenBool_1067 = 1
  1576. set VAR_GlobUInt8_42 = 1
  1577. RunScript( 0, 9, 43 ) // Entry9
  1578. } else {
  1579. SetTextVariable( 3, 4 ) // Gladius
  1580. SetTextVariable( 2, 10 ) // Zanna runica
  1581. WindowSync( 0, 0, 315 ) // "Bonus a 0 tesori trovati! Doppio dei punti! Limite di tempo + 0 secondi!"
  1582. ChangeTimerTime( GetTimerTime + 10 )
  1583. set Chocobo_LastTreasureTime += 10
  1584. set VAR_GlobUInt8_42 = 1
  1585. }
  1586. RunTimer( 1 )
  1587. }
  1588. set VAR_GlobUInt8_52 = 0
  1589. } else {
  1590. if ( ( VAR_LocInt16_6 < VAR_LocInt16_30 ) && ( ( ( VAR_LocInt8_37 == 0 ) && ( GetWalkpath(ObjectUID_250) != 1 ) ) || ( ( VAR_LocInt8_37 == 1 ) && ( GetWalkpath(ObjectUID_250) == 1 ) ) ) ) {
  1591. switch 5 ( Chocobo_ChocoColor ) from 1 {
  1592. case +0:
  1593. WindowAsync( 6, 128, 282 ) // " Kuééh??! "
  1594. break
  1595. case +1:
  1596. WindowAsync( 6, 128, 287 ) // " Kuééh??! "
  1597. break
  1598. case +2:
  1599. WindowAsync( 6, 128, 291 ) // " Kuééh??! "
  1600. break
  1601. case +3:
  1602. WindowAsync( 6, 128, 295 ) // " Kuééh??! "
  1603. break
  1604. case +4:
  1605. WindowAsync( 6, 128, 299 ) // " Kuééh??! "
  1606. break
  1607. }
  1608. set VARL_GenUInt8_292 = 1
  1609. switch 5 ( Chocobo_ColorPeckBonus ) from 2 {
  1610. case +0:
  1611. RunScriptAsync( 6, 25, 31 ) // Entry25
  1612. RunAnimation( 12299 ) // Seek_1
  1613. set VAR_GlobUInt8_25 = 5
  1614. switch 2 ( VAR_GlobUInt8_24 ) from 0 {
  1615. case +0:
  1616. RunScriptAsync( 4, 2, 11 ) // Code2
  1617. set VAR_GlobUInt8_24 = 1
  1618. break
  1619. case +1:
  1620. RunScriptAsync( 4, 3, 11 ) // Code3
  1621. set VAR_GlobUInt8_24 = 0
  1622. break
  1623. }
  1624. Wait( 5 )
  1625. SetSoundObjectPosition( 4, 125 ) // Chocobo
  1626. RunSoundCode3( 53248, 2727, 0, GetSoundDistance, GetSoundVolume ) // Play Sound ; [Unknown Audio]
  1627. WaitAnimation( )
  1628. break
  1629. case +1:
  1630. RunScriptAsync( 6, 25, 32 ) // Entry25
  1631. RunScriptSync( 6, 15, 32 ) // Entry15
  1632. break
  1633. case +2:
  1634. RunScriptAsync( 6, 25, 33 ) // Entry25
  1635. RunScriptSync( 6, 16, 33 ) // Entry16
  1636. break
  1637. case +3:
  1638. RunScriptAsync( 6, 25, 34 ) // Entry25
  1639. RunScriptSync( 6, 17, 34 ) // Entry17
  1640. break
  1641. case +4:
  1642. RunScriptAsync( 6, 25, 35 ) // Entry25
  1643. RunScriptSync( 6, 18, 35 ) // Entry18
  1644. break
  1645. }
  1646. set VARL_GenUInt8_292 = 0
  1647. } else {
  1648. if ( ( VAR_LocInt16_6 < VAR_LocInt16_32 ) && ( ( ( VAR_LocInt8_37 == 0 ) && ( GetWalkpath(ObjectUID_250) != 1 ) ) || ( ( VAR_LocInt8_37 == 1 ) && ( GetWalkpath(ObjectUID_250) == 1 ) ) ) ) {
  1649. switch 5 ( Chocobo_ChocoColor ) from 1 {
  1650. case +0:
  1651. WindowAsync( 6, 128, 281 ) // " Kuéh! "
  1652. break
  1653. case +1:
  1654. WindowAsync( 6, 128, 286 ) // " Kuéh! "
  1655. break
  1656. case +2:
  1657. WindowAsync( 6, 128, 290 ) // " Kuéh! "
  1658. break
  1659. case +3:
  1660. WindowAsync( 6, 128, 294 ) // " Kuéh! "
  1661. break
  1662. case +4:
  1663. WindowAsync( 6, 128, 298 ) // " Kuéh! "
  1664. break
  1665. }
  1666. set VARL_GenUInt8_292 = 1
  1667. switch 5 ( Chocobo_ColorPeckBonus ) from 2 {
  1668. case +0:
  1669. RunScriptAsync( 6, 25, 31 ) // Entry25
  1670. RunAnimation( 12299 ) // Seek_1
  1671. set VAR_GlobUInt8_25 = 5
  1672. switch 2 ( VAR_GlobUInt8_24 ) from 0 {
  1673. case +0:
  1674. RunScriptAsync( 4, 2, 11 ) // Code2
  1675. set VAR_GlobUInt8_24 = 1
  1676. break
  1677. case +1:
  1678. RunScriptAsync( 4, 3, 11 ) // Code3
  1679. set VAR_GlobUInt8_24 = 0
  1680. break
  1681. }
  1682. Wait( 5 )
  1683. SetSoundObjectPosition( 4, 125 ) // Chocobo
  1684. RunSoundCode3( 53248, 2727, 0, GetSoundDistance, GetSoundVolume ) // Play Sound ; [Unknown Audio]
  1685. WaitAnimation( )
  1686. break
  1687. case +1:
  1688. RunScriptAsync( 6, 25, 32 ) // Entry25
  1689. RunScriptSync( 6, 15, 32 ) // Entry15
  1690. break
  1691. case +2:
  1692. RunScriptAsync( 6, 25, 33 ) // Entry25
  1693. RunScriptSync( 6, 16, 33 ) // Entry16
  1694. break
  1695. case +3:
  1696. RunScriptAsync( 6, 25, 34 ) // Entry25
  1697. RunScriptSync( 6, 17, 34 ) // Entry17
  1698. break
  1699. case +4:
  1700. RunScriptAsync( 6, 25, 35 ) // Entry25
  1701. RunScriptSync( 6, 18, 35 ) // Entry18
  1702. break
  1703. }
  1704. set VARL_GenUInt8_292 = 0
  1705. } else {
  1706. switch 5 ( Chocobo_ChocoColor ) from 1 {
  1707. case +0:
  1708. WindowAsync( 6, 128, 280 ) // " Kué! "
  1709. break
  1710. case +1:
  1711. WindowAsync( 6, 128, 285 ) // " Kué! "
  1712. break
  1713. case +2:
  1714. WindowAsync( 6, 128, 289 ) // " Kué! "
  1715. break
  1716. case +3:
  1717. WindowAsync( 6, 128, 293 ) // " Kué! "
  1718. break
  1719. case +4:
  1720. WindowAsync( 6, 128, 297 ) // " Kué! "
  1721. break
  1722. }
  1723. set VARL_GenUInt8_292 = 1
  1724. switch 5 ( Chocobo_ColorPeckBonus ) from 2 {
  1725. case +0:
  1726. RunScriptAsync( 6, 25, 31 ) // Entry25
  1727. RunAnimation( 12299 ) // Seek_1
  1728. set VAR_GlobUInt8_25 = 5
  1729. switch 2 ( VAR_GlobUInt8_24 ) from 0 {
  1730. case +0:
  1731. RunScriptAsync( 4, 2, 11 ) // Code2
  1732. set VAR_GlobUInt8_24 = 1
  1733. break
  1734. case +1:
  1735. RunScriptAsync( 4, 3, 11 ) // Code3
  1736. set VAR_GlobUInt8_24 = 0
  1737. break
  1738. }
  1739. Wait( 5 )
  1740. SetSoundObjectPosition( 4, 125 ) // Chocobo
  1741. RunSoundCode3( 53248, 2727, 0, GetSoundDistance, GetSoundVolume ) // Play Sound ; [Unknown Audio]
  1742. WaitAnimation( )
  1743. break
  1744. case +1:
  1745. RunScriptAsync( 6, 25, 32 ) // Entry25
  1746. RunScriptSync( 6, 15, 32 ) // Entry15
  1747. break
  1748. case +2:
  1749. RunScriptAsync( 6, 25, 33 ) // Entry25
  1750. RunScriptSync( 6, 16, 33 ) // Entry16
  1751. break
  1752. case +3:
  1753. RunScriptAsync( 6, 25, 34 ) // Entry25
  1754. RunScriptSync( 6, 17, 34 ) // Entry17
  1755. break
  1756. case +4:
  1757. RunScriptAsync( 6, 25, 35 ) // Entry25
  1758. RunScriptSync( 6, 18, 35 ) // Entry18
  1759. break
  1760. }
  1761. set VARL_GenUInt8_292 = 0
  1762. }
  1763. }
  1764. }
  1765. }
  1766. set VAR_GlobBool_158 = 1
  1767. if ( VAR_GlobBool_159 == 1 ) {
  1768. if ( VAR_GlobBool_156 == 0 ) {
  1769. EnableMove( )
  1770. SetTriangleFlagMask( 255 )
  1771. DisableMenu( )
  1772. }
  1773. }
  1774. break
  1775. }
  1776. Wait( VAR_LocInt8_35 )
  1777. set VAR_GlobInt8_35 = 0
  1778. }
  1779. }
  1780. }
  1781. break
  1782. }
  1783. Wait( 1 )
  1784. loop
  1785.  
  1786.  
  1787. #HW newfunction 3
  1788. Function Chocobo_SpeakBTN
  1789. ifnot ( IsMovementEnabled ) {
  1790. return
  1791. }
  1792. if ( ( World_CurrentTransport >= 1 ) && ( World_CurrentTransport <= 6 ) ) {
  1793. set VAR_GlobBool_158 = 0
  1794. if ( VAR_GlobBool_159 == 1 ) {
  1795. DisableMove( )
  1796. if ( VAR_GlobBool_144 == 0 ) {
  1797. DisableMenu( )
  1798. } else {
  1799. Wait( 1 )
  1800. }
  1801. }
  1802. SetTriangleFlagMask( 127 )
  1803. if ( VARL_GenBool_1087 == 1 ) {
  1804. SetTextVariable( 4, Chocobo_BeakLevel )
  1805. switch 2 ( Chocobo_ChocographKnown ) from 0 {
  1806. case +0:
  1807. EnableDialogChoices( 6, 0 )
  1808. break
  1809. case +1:
  1810. EnableDialogChoices( 7, 0 )
  1811. break
  1812. }
  1813. switch 1 ( Chocobo_BeakLevel ) from 99 {
  1814. case +0:
  1815. WindowSync( 7, 128, 391 ) // "Choco ─Kuééé!! Livello becco: 0 ★ Visualizza chocografie Istruzioni movimenti Annulla"
  1816. break
  1817. default:
  1818. WindowSync( 7, 128, 390 ) // "Choco ─Kuééé!! Livello becco: 0 Visualizza chocografie Istruzioni movimenti Annulla"
  1819. break
  1820. }
  1821. switch 2 ( GetDialogChoice ) from 0 {
  1822. case +0:
  1823. Menu( 5, 0 )
  1824. break
  1825. case +1:
  1826. WindowSync( 0, 0, 32 ) // "─ MOVIMENTI del CHOCOBO ─ [BTN][IMG]:entra nel Chocobosco e in certe situazioni... [BTN][IMG]:apri Menu [BTN][IMG]:cerca tesori [BTN][IMG]:scendi [BTN][IMG]:mappa ON/OFF [BTN][BTN][IMG]:rotazione scenario [BTN][IMG]:obiettivo fisso [BTN][IMG]:cambia prospettiva "
  1827. break
  1828. }
  1829. } else {
  1830. WindowSync( 6, 128, 392 ) // "Choco ─Kuééé!! Istruzioni movimenti Annulla"
  1831. switch 1 ( GetDialogChoice ) from 0 {
  1832. case +0:
  1833. WindowSync( 0, 0, 32 ) // "─ MOVIMENTI del CHOCOBO ─ [BTN][IMG]:entra nel Chocobosco e in certe situazioni... [BTN][IMG]:apri Menu [BTN][IMG]:cerca tesori [BTN][IMG]:scendi [BTN][IMG]:mappa ON/OFF [BTN][BTN][IMG]:rotazione scenario [BTN][IMG]:obiettivo fisso [BTN][IMG]:cambia prospettiva "
  1834. }
  1835. }
  1836. WaitWindow( 6 )
  1837. set VAR_GlobBool_158 = 1
  1838. if ( VAR_GlobBool_159 == 1 ) {
  1839. if ( VAR_GlobBool_156 == 0 ) {
  1840. EnableMove( )
  1841. SetTriangleFlagMask( 255 )
  1842. if ( VAR_GlobBool_144 == 0 ) {
  1843. EnableMenu( )
  1844. }
  1845. }
  1846. }
  1847. }
  1848. return
  1849.  
  1850.  
  1851. #HW newfunction 44
  1852. Function Chocobo_44
  1853. SetWalkTurnSpeed( 12 )
  1854. SetWalkSpeed( 68 )
  1855. InitWalk( )
  1856. Walk( 644, -962 )
  1857. InitWalk( )
  1858. Walk( -664, -2150 )
  1859. InitWalk( )
  1860. Walk( -242, -3645 )
  1861. InitWalk( )
  1862. Walk( -214, -4155 )
  1863. RunSoundCode3( 53248, 3103, 0, -128, 125 ) // Play Sound ; [Unknown Audio]
  1864. set VAR_GlobInt16_0 = GetEntryPosX(255)
  1865. set VAR_GlobInt16_4 = GetEntryPosY(255)
  1866. set VAR_GlobInt16_8 = 0
  1867. while ( VAR_GlobInt16_8 <= 20 ) {
  1868. while ( VAR_GlobBool_160 == 1 ) {
  1869. Wait( 1 )
  1870. }
  1871. CreateObject( VAR_GlobInt16_0 + ( ( VAR_GlobInt16_8 * ( 65322 - VAR_GlobInt16_0 ) ) / 20 ), VAR_GlobInt16_4 + ( ( VAR_GlobInt16_8 * ( 61141 - VAR_GlobInt16_4 ) ) / 20 ) )
  1872. Wait( 1 )
  1873. set VAR_GlobInt16_8++
  1874. }
  1875. RunJumpAnimation( )
  1876. WaitAnimation( )
  1877. SetupJump( -214, 58, -3916, 10 )
  1878. Jump( )
  1879. RunLandAnimation( )
  1880. WaitAnimation( )
  1881. return
  1882.  
  1883.  
  1884. #HW newfunction 45
  1885. Function Chocobo_45
  1886. RunJumpAnimation( )
  1887. WaitAnimation( )
  1888. SetupJump( -214, 58, -3166, 10 )
  1889. Jump( )
  1890. RunLandAnimation( )
  1891. WaitAnimation( )
  1892. RunJumpAnimation( )
  1893. WaitAnimation( )
  1894. SetupJump( -214, 58, -2476, 10 )
  1895. Jump( )
  1896. RunLandAnimation( )
  1897. WaitAnimation( )
  1898. return
  1899.  
  1900.  
  1901. #HW newfunction 46
  1902. Function Chocobo_46
  1903. set VAR_LocInt16_4 = ( GetEntryPosY(255) + 400 )
  1904. RunJumpAnimation( )
  1905. WaitAnimation( )
  1906. SetupJump( GetEntryPosX(255), GetEntryPosZ(255), VAR_LocInt16_4, 10 )
  1907. Jump( )
  1908. RunLandAnimation( )
  1909. WaitAnimation( )
  1910. SetPathing( 1 )
  1911. return
  1912.  
  1913.  
  1914. #HW newfunction 13
  1915. Function Chocobo_13
  1916. SetPathing( 0 )
  1917. InitWalk( )
  1918. Walk( -191, -4902 )
  1919. set VAR_GlobUInt8_73 = 200
  1920. set VAR_GlobUInt8_72 = 8
  1921. RunSharedScript( 6 ) // Entry6
  1922. RunScriptSync( 4, 9, 47 ) // Entry9
  1923. WaitSharedScript( )
  1924. if ( VARL_GenBool_1419 == 0 ) {
  1925. RunScriptSync( 4, 25, 28 ) // Entry25
  1926. } else {
  1927. RunScriptSync( 4, 25, 13 ) // Entry25
  1928. }
  1929. set VAR_GlobInt8_32 = 1
  1930. if ( Chocobo_ChocoColor != 1 ) {
  1931. SetObjectFlags( 4 )
  1932. }
  1933. while ( VARL_GlobBool_600 == 1 ) {
  1934. Wait( 1 )
  1935. }
  1936. RunScriptSync( 4, 25, 27 ) // Entry25
  1937. return
  1938.  
  1939.  
  1940. #HW newfunction 29
  1941. Function Chocobo_29
  1942. set VAR_GlobInt8_32 = 0
  1943. SetWalkSpeed( 60 )
  1944. InitWalk( )
  1945. WalkTowardObject( 25 ) // Entry25
  1946. RunScriptSync( 4, 25, 29 ) // Entry25
  1947. set VAR_LocInt16_0 = GetEntryPosX(255)
  1948. set VAR_LocInt16_4 = ( GetEntryPosY(255) - 400 )
  1949. SetPathing( 0 )
  1950. DefinePlayerCharacter( )
  1951. InitWalk( )
  1952. WalkXZY( VAR_LocInt16_0, GetEntryPosZ(255), VAR_LocInt16_4 )
  1953. return
  1954.  
  1955.  
  1956. #HW newfunction 48
  1957. Function Chocobo_48
  1958. TurnTowardObject( 9, 16 ) // Entry9
  1959. WaitTurn( )
  1960. WindowSync( 7, 128, 186 ) // "Choco ─Kuééé!!!"
  1961. WaitTurn( )
  1962. return
  1963.  
  1964.  
  1965. #HW newfunction 49
  1966. Function Chocobo_49
  1967. set VARL_GenUInt8_292 = 1
  1968. switch 5 ( Chocobo_ColorPeckBonus ) from 2 {
  1969. case +0:
  1970. RunScriptAsync( 6, 25, 31 ) // Entry25
  1971. RunAnimation( 12299 ) // Seek_1
  1972. set VAR_GlobUInt8_25 = 5
  1973. switch 2 ( VAR_GlobUInt8_24 ) from 0 {
  1974. case +0:
  1975. RunScriptAsync( 4, 2, 11 ) // Code2
  1976. set VAR_GlobUInt8_24 = 1
  1977. break
  1978. case +1:
  1979. RunScriptAsync( 4, 3, 11 ) // Code3
  1980. set VAR_GlobUInt8_24 = 0
  1981. break
  1982. }
  1983. Wait( 5 )
  1984. SetSoundObjectPosition( 4, 125 ) // Chocobo
  1985. RunSoundCode3( 53248, 2727, 0, GetSoundDistance, GetSoundVolume ) // Play Sound ; [Unknown Audio]
  1986. WaitAnimation( )
  1987. break
  1988. case +1:
  1989. RunScriptAsync( 6, 25, 32 ) // Entry25
  1990. RunScriptSync( 6, 15, 32 ) // Entry15
  1991. break
  1992. case +2:
  1993. RunScriptAsync( 6, 25, 33 ) // Entry25
  1994. RunScriptSync( 6, 16, 33 ) // Entry16
  1995. break
  1996. case +3:
  1997. RunScriptAsync( 6, 25, 34 ) // Entry25
  1998. RunScriptSync( 6, 17, 34 ) // Entry17
  1999. break
  2000. case +4:
  2001. RunScriptAsync( 6, 25, 35 ) // Entry25
  2002. RunScriptSync( 6, 18, 35 ) // Entry18
  2003. break
  2004. }
  2005. set VARL_GenUInt8_292 = 0
  2006. return
  2007.  
  2008.  
  2009. #HW newfunction 50
  2010. Function Chocobo_50
  2011. TurnTowardObject( 9, 16 ) // Entry9
  2012. WaitTurn( )
  2013. SetSoundObjectPosition( 4, 125 ) // Chocobo
  2014. RunSoundCode3( 53248, 2726, 0, GetSoundDistance, GetSoundVolume ) // Play Sound ; [Unknown Audio]
  2015. WaitTurn( )
  2016. Wait( 15 )
  2017. return
  2018.  
  2019.  
  2020. #HW newfunction 26
  2021. Function Chocobo_26
  2022. set VAR_GlobUInt8_73 = Op60(ObjectUID_9)
  2023. set VAR_GlobUInt8_72 = 8
  2024. RunSharedScript( 6 ) // Entry6
  2025. return
  2026.  
  2027.  
  2028. #HW newfunction 36
  2029. Function Chocobo_36
  2030. RunSharedScript( 7 ) // Entry7
  2031. return
  2032.  
  2033.  
  2034. #HW newfunction 51
  2035. Function Chocobo_51
  2036. set VAR_GlobInt8_32 = 0
  2037. DefinePlayerCharacter( )
  2038. MoveInstantXZY( -306, -60, -4399 )
  2039. TurnInstant( 255 )
  2040. SetPathing( 1 )
  2041. return
  2042.  
  2043.  
  2044. #HW newfunction 52
  2045. Function Chocobo_52
  2046. SetTurnSpeed( 32 )
  2047. TurnTowardPosition( 1934, -408 )
  2048. WaitTurn( )
  2049. DisableShadow( )
  2050. RunJumpAnimation( )
  2051. WaitAnimation( )
  2052. SetupJump( 1215, -750, -1495, 5 )
  2053. Jump( )
  2054. DisableShadow( )
  2055. RunLandAnimation( )
  2056. DisableShadow( )
  2057. WaitAnimation( )
  2058. DisableShadow( )
  2059. RunJumpAnimation( )
  2060. WaitAnimation( )
  2061. SetupJump( 1455, -1390, -1495, 5 )
  2062. Jump( )
  2063. DisableShadow( )
  2064. RunLandAnimation( )
  2065. DisableShadow( )
  2066. WaitAnimation( )
  2067. DisableShadow( )
  2068. RunJumpAnimation( )
  2069. WaitAnimation( )
  2070. SetupJump( 1934, -1359, -408, 5 )
  2071. Jump( )
  2072. DisableShadow( )
  2073. RunLandAnimation( )
  2074. DisableShadow( )
  2075. WaitAnimation( )
  2076. DisableShadow( )
  2077. EnableShadow( )
  2078. SetPathing( 1 )
  2079. return
  2080.  
  2081.  
  2082. #HW newfunction 53
  2083. Function Chocobo_53
  2084. SetTurnSpeed( 32 )
  2085. TurnTowardPosition( 872, -1344 )
  2086. WaitTurn( )
  2087. DisableShadow( )
  2088. RunJumpAnimation( )
  2089. WaitAnimation( )
  2090. SetupJump( 1455, -1390, -1495, 5 )
  2091. Jump( )
  2092. DisableShadow( )
  2093. RunLandAnimation( )
  2094. DisableShadow( )
  2095. WaitAnimation( )
  2096. DisableShadow( )
  2097. RunJumpAnimation( )
  2098. WaitAnimation( )
  2099. SetupJump( 1215, -750, -1495, 5 )
  2100. Jump( )
  2101. DisableShadow( )
  2102. RunLandAnimation( )
  2103. DisableShadow( )
  2104. WaitAnimation( )
  2105. DisableShadow( )
  2106. RunJumpAnimation( )
  2107. WaitAnimation( )
  2108. SetupJump( 872, 8, -1344, 5 )
  2109. Jump( )
  2110. DisableShadow( )
  2111. RunLandAnimation( )
  2112. DisableShadow( )
  2113. WaitAnimation( )
  2114. DisableShadow( )
  2115. EnableShadow( )
  2116. SetPathing( 1 )
  2117. return
  2118.  
  2119.  
  2120. #HW newfunction 54
  2121. Function Chocobo_54
  2122. SetTilePositionEx( 2, 0, 0, 128 )
  2123. SetTurnSpeed( 32 )
  2124. TurnTowardPosition( -1277, -887 )
  2125. WaitTurn( )
  2126. DisableShadow( )
  2127. RunJumpAnimation( )
  2128. WaitAnimation( )
  2129. SetupJump( -1323, -671, -1848, 5 )
  2130. Jump( )
  2131. DisableShadow( )
  2132. RunLandAnimation( )
  2133. DisableShadow( )
  2134. WaitAnimation( )
  2135. DisableShadow( )
  2136. RunJumpAnimation( )
  2137. WaitAnimation( )
  2138. SetupJump( -1257, -1251, -2040, 5 )
  2139. Jump( )
  2140. DisableShadow( )
  2141. RunLandAnimation( )
  2142. DisableShadow( )
  2143. WaitAnimation( )
  2144. DisableShadow( )
  2145. RunJumpAnimation( )
  2146. WaitAnimation( )
  2147. SetupJump( -1269, -1069, -909, 5 )
  2148. Jump( )
  2149. DisableShadow( )
  2150. RunLandAnimation( )
  2151. DisableShadow( )
  2152. WaitAnimation( )
  2153. DisableShadow( )
  2154. EnableShadow( )
  2155. SetPathing( 1 )
  2156. return
  2157.  
  2158.  
  2159. #HW newfunction 55
  2160. Function Chocobo_55
  2161. SetTurnSpeed( 32 )
  2162. TurnTowardPosition( -1030, -2000 )
  2163. WaitTurn( )
  2164. DisableShadow( )
  2165. RunJumpAnimation( )
  2166. WaitAnimation( )
  2167. SetupJump( -1257, -1251, -2040, 5 )
  2168. Jump( )
  2169. DisableShadow( )
  2170. RunLandAnimation( )
  2171. DisableShadow( )
  2172. WaitAnimation( )
  2173. DisableShadow( )
  2174. RunJumpAnimation( )
  2175. WaitAnimation( )
  2176. SetupJump( -1323, -671, -1848, 5 )
  2177. Jump( )
  2178. DisableShadow( )
  2179. RunLandAnimation( )
  2180. DisableShadow( )
  2181. WaitAnimation( )
  2182. DisableShadow( )
  2183. RunJumpAnimation( )
  2184. WaitAnimation( )
  2185. SetupJump( -1030, 27, -2000, 5 )
  2186. Jump( )
  2187. DisableShadow( )
  2188. RunLandAnimation( )
  2189. DisableShadow( )
  2190. WaitAnimation( )
  2191. DisableShadow( )
  2192. EnableShadow( )
  2193. SetPathing( 1 )
  2194. SetTilePositionEx( 2, 0, 0, -128 )
  2195. return
  2196.  
  2197.  
  2198. #HW newentry 5
  2199. #HW newfunction 0
  2200. Function Entry5_Init
  2201. Wait( 1 )
  2202. TurnInstant( VAR_GlobUInt8_38 )
  2203. TerminateEntry( 255 ) // This
  2204. return
  2205.  
  2206.  
  2207. #HW newentry 6
  2208. #HW newfunction 0
  2209. Function Entry6_Init
  2210. set VAR_GlobUInt8_38 = GetEntryAngle(255)
  2211. set VAR_GlobInt8_74 = ( VAR_GlobUInt8_38 - VAR_GlobUInt8_73 )
  2212. if ( VAR_GlobInt8_74 < 0 ) {
  2213. while ( VAR_GlobInt8_74 < 0 ) {
  2214. TurnInstant( VAR_GlobUInt8_38 += VAR_GlobUInt8_72 )
  2215. Wait( 1 )
  2216. set VAR_GlobInt8_74 += VAR_GlobUInt8_72
  2217. }
  2218. } else {
  2219. while ( VAR_GlobInt8_74 > 0 ) {
  2220. TurnInstant( VAR_GlobUInt8_38 -= VAR_GlobUInt8_72 )
  2221. Wait( 1 )
  2222. set VAR_GlobInt8_74 -= VAR_GlobUInt8_72
  2223. }
  2224. }
  2225. TerminateEntry( 255 ) // This
  2226. return
  2227.  
  2228.  
  2229. #HW newentry 7
  2230. #HW newfunction 0
  2231. Function Entry7_Init
  2232. while ( 1 ) {
  2233. MoveInstantXZY( GetEntryPosX(4), GetEntryPosZ(4), GetEntryPosY(4) )
  2234. TurnInstant( GetEntryAngle(4) )
  2235. Wait( 1 )
  2236. }
  2237. TerminateEntry( 255 ) // This
  2238. return
  2239.  
  2240.  
  2241. #HW newentry 8
  2242. #HW locals
  2243. allocate 24
  2244. #HW endlocals
  2245.  
  2246. #HW newfunction 0
  2247. Function Barrel_Init
  2248. switch 9 ( ++VAR_GlobUInt8_49 ) from 1 {
  2249. case +0:
  2250. set VAR_LocUInt8_2 = ( ( GetRandom % 12 ) + 1 )
  2251. while ( ( 8 <= VAR_LocUInt8_2 ) && ( VAR_LocUInt8_2 <= 11 ) ) {
  2252. set VAR_LocUInt8_2 = ( ( GetRandom % 12 ) + 1 )
  2253. }
  2254. set VAR_GlobInt16_0 = ( ( ( 232 * VAR_LocUInt8_2 ) + 63723 ) - 116 )
  2255. set VAR_GlobInt16_4 = ( ( ( 65527 * VAR_LocUInt8_2 ) + 698 ) - 65532 )
  2256. set VAR_GlobInt16_2 = 65436
  2257. break
  2258. case +1:
  2259. set VAR_LocUInt8_2 = ( ( GetRandom % 12 ) + 1 )
  2260. set VAR_GlobInt16_0 = ( ( ( 179 * VAR_LocUInt8_2 ) + 64173 ) - 89 )
  2261. set VAR_GlobInt16_4 = ( ( ( 65524 * VAR_LocUInt8_2 ) + 65286 ) - 65530 )
  2262. set VAR_GlobInt16_2 = 65436
  2263. break
  2264. case +2:
  2265. set VAR_LocUInt8_2 = ( ( GetRandom % 12 ) + 1 )
  2266. if ( Chocobo_ChocoColor >= 3 ) {
  2267. while ( ( VAR_LocUInt8_2 < 4 ) || ( 8 < VAR_LocUInt8_2 ) ) {
  2268. set VAR_LocUInt8_2 = ( ( GetRandom % 12 ) + 1 )
  2269. }
  2270. }
  2271. set VAR_GlobInt16_0 = ( ( ( 168 * VAR_LocUInt8_2 ) + 64241 ) - 84 )
  2272. set VAR_GlobInt16_4 = ( ( ( 0 * VAR_LocUInt8_2 ) + 64538 ) - 0 )
  2273. set VAR_GlobInt16_2 = 65436
  2274. break
  2275. case +3:
  2276. set VAR_LocUInt8_2 = ( ( GetRandom % 12 ) + 1 )
  2277. if ( Chocobo_ChocoColor >= 3 ) {
  2278. while ( ( VAR_LocUInt8_2 < 5 ) || ( 8 < VAR_LocUInt8_2 ) ) {
  2279. set VAR_LocUInt8_2 = ( ( GetRandom % 12 ) + 1 )
  2280. }
  2281. }
  2282. set VAR_GlobInt16_0 = ( ( ( 154 * VAR_LocUInt8_2 ) + 64463 ) - 77 )
  2283. set VAR_GlobInt16_4 = ( ( ( 0 * VAR_LocUInt8_2 ) + 63920 ) - 0 )
  2284. set VAR_GlobInt16_2 = 65436
  2285. break
  2286. case +4:
  2287. set VAR_LocUInt8_2 = ( ( GetRandom % 12 ) + 1 )
  2288. if ( Chocobo_ChocoColor >= 3 ) {
  2289. while ( ( VAR_LocUInt8_2 < 5 ) || ( 8 < VAR_LocUInt8_2 ) ) {
  2290. set VAR_LocUInt8_2 = ( ( GetRandom % 12 ) + 1 )
  2291. }
  2292. }
  2293. set VAR_GlobInt16_0 = ( ( ( 155 * VAR_LocUInt8_2 ) + 64570 ) - 77 )
  2294. set VAR_GlobInt16_4 = ( ( ( 65533 * VAR_LocUInt8_2 ) + 63304 ) - 65535 )
  2295. set VAR_GlobInt16_2 = 65436
  2296. break
  2297. case +5:
  2298. set VAR_LocUInt8_2 = ( ( GetRandom % 12 ) + 1 )
  2299. while ( ( 9 <= VAR_LocUInt8_2 ) && ( VAR_LocUInt8_2 <= 11 ) ) {
  2300. set VAR_LocUInt8_2 = ( ( GetRandom % 12 ) + 1 )
  2301. }
  2302. set VAR_GlobInt16_0 = ( ( ( 167 * VAR_LocUInt8_2 ) + 64416 ) - 83 )
  2303. set VAR_GlobInt16_4 = ( ( ( 7 * VAR_LocUInt8_2 ) + 62641 ) - 3 )
  2304. set VAR_GlobInt16_2 = 65436
  2305. break
  2306. case +6:
  2307. set VAR_LocUInt8_2 = ( ( GetRandom % 12 ) + 1 )
  2308. while ( ( 9 <= VAR_LocUInt8_2 ) && ( VAR_LocUInt8_2 <= 12 ) ) {
  2309. set VAR_LocUInt8_2 = ( ( GetRandom % 12 ) + 1 )
  2310. }
  2311. set VAR_GlobInt16_0 = ( ( ( 173 * VAR_LocUInt8_2 ) + 64360 ) - 86 )
  2312. set VAR_GlobInt16_4 = ( ( ( 65530 * VAR_LocUInt8_2 ) + 62190 ) - 65533 )
  2313. set VAR_GlobInt16_2 = 65436
  2314. break
  2315. case +7:
  2316. set VAR_LocUInt8_2 = ( ( GetRandom % 12 ) + 1 )
  2317. while ( ( 8 <= VAR_LocUInt8_2 ) && ( VAR_LocUInt8_2 <= 11 ) ) {
  2318. set VAR_LocUInt8_2 = ( ( GetRandom % 12 ) + 1 )
  2319. }
  2320. set VAR_GlobInt16_0 = ( ( ( 134 * VAR_LocUInt8_2 ) + 64564 ) - 67 )
  2321. set VAR_GlobInt16_4 = ( ( ( 17 * VAR_LocUInt8_2 ) + 61354 ) - 8 )
  2322. set VAR_GlobInt16_2 = 65436
  2323. break
  2324. case +8:
  2325. if ( GetRandom % 2 ) {
  2326. set VAR_LocUInt8_2 = ( ( GetRandom % 6 ) + 1 )
  2327. set VAR_GlobInt16_0 = ( ( ( 67 * VAR_LocUInt8_2 ) + 63412 ) - 33 )
  2328. set VAR_GlobInt16_4 = ( ( ( 68 * VAR_LocUInt8_2 ) + 64224 ) - 34 )
  2329. set VAR_GlobInt16_2 = 64436
  2330. } else {
  2331. set VAR_LocUInt8_2 = ( ( GetRandom % 6 ) + 1 )
  2332. set VAR_GlobInt16_0 = ( ( ( 56 * VAR_LocUInt8_2 ) + 1999 ) - 28 )
  2333. set VAR_GlobInt16_4 = ( ( ( 65488 * VAR_LocUInt8_2 ) + 113 ) - 65512 )
  2334. set VAR_GlobInt16_2 = 64136
  2335. }
  2336. break
  2337. }
  2338. set VAR_LocUInt8_1 = VAR_GlobUInt8_49
  2339. switch 3 ( Chocobo_CurrentField ) from 1 {
  2340. case +0:
  2341. switch 5 ( Chocobo_ChocoColor ) from 1 {
  2342. case +0:
  2343. set VAR_LocUInt8_15 = 8
  2344. break
  2345. case +1:
  2346. set VAR_LocUInt8_15 = 8
  2347. break
  2348. case +2:
  2349. set VAR_LocUInt8_15 = 9
  2350. break
  2351. case +3:
  2352. set VAR_LocUInt8_15 = 9
  2353. break
  2354. case +4:
  2355. set VAR_LocUInt8_15 = 9
  2356. break
  2357. }
  2358. break
  2359. case +1:
  2360. switch 4 ( Chocobo_ChocoColor ) from 2 {
  2361. case +0:
  2362. set VAR_LocUInt8_15 = 5
  2363. break
  2364. case +1:
  2365. set VAR_LocUInt8_15 = 5
  2366. break
  2367. case +2:
  2368. set VAR_LocUInt8_15 = 9
  2369. break
  2370. case +3:
  2371. set VAR_LocUInt8_15 = 9
  2372. break
  2373. }
  2374. break
  2375. case +2:
  2376. set VAR_LocUInt8_15 = 9
  2377. break
  2378. }
  2379. switch 3 ( Chocobo_CurrentField ) from 1 {
  2380. case +0:
  2381. set VAR_LocUInt8_4 = 1
  2382. break
  2383. case +1:
  2384. set VAR_LocUInt8_4 = 2
  2385. break
  2386. case +2:
  2387. set VAR_LocUInt8_4 = 3
  2388. break
  2389. }
  2390. if ( VAR_LocUInt8_15 >= VAR_LocUInt8_1 ) {
  2391. set VAR_GlobUInt16_47 |= ( 1 << VAR_LocUInt8_1 )
  2392. }
  2393. SetModel( 241, 93 ) // Barrel
  2394. CreateObject( VAR_GlobInt16_0, VAR_GlobInt16_4 )
  2395. TurnInstant( VAR_GlobInt16_6 )
  2396. SetStandAnimation( 1904 ) // Dummy B
  2397. MoveInstantXZY( VAR_GlobInt16_0, VAR_GlobInt16_2, VAR_GlobInt16_4 )
  2398. SetObjectLogicalSize( 20, 20, 30 )
  2399. SetObjectSize( 255, 64, 2, 64 ) // This
  2400. SetObjectFlags( 14 )
  2401. set Chocobo_LastTreasureTime = 9999
  2402. return
  2403.  
  2404.  
  2405. #HW newfunction 1
  2406. Function Barrel_Loop
  2407. Wait( 1 )
  2408. loop
  2409.  
  2410.  
  2411. #HW newfunction 41
  2412. Function Barrel_41
  2413. set VAR_GlobUInt16_47 ^= ( 1 << VAR_LocUInt8_1 )
  2414. set VAR_LocUInt8_12 = 0
  2415. set VAR_LocUInt8_14 = 0
  2416. if ( Chocobo_ChocographKnown == 0 ) {
  2417. set VAR_LocUInt8_16 = 48
  2418. }
  2419. if ( ( ( GetRandom < ( ( ( 15 + ( ( ( ( VAR_GlobUInt8_51 >= 3 ) * ( VAR_GlobUInt8_51 - 2 ) ) * VAR_GlobUInt8_51 ) * ( VAR_GlobUInt8_51 / 2 ) ) ) + VAR_LocUInt8_16 ) + 1 ) ) == 1 ) && ( VAR_GlobUInt8_50 == 0 ) ) {
  2420. set VAR_GlobUInt8_53 = 3
  2421. set VAR_LocUInt16_20 = 30000
  2422. set Chocobo_GoodTreasureBonus = 0
  2423. set VAR_GlobUInt8_50 = 1
  2424. set VAR_LocUInt8_12 = 1
  2425. set Chocobo_AvailableChocograph = 0
  2426. if ( Chocobo_ChocographKnown == 0 ) {
  2427. set VAR_LocUInt8_11 = 1
  2428. set Chocobo_ChocographFound |= 1
  2429. set VAR_LocUInt8_13 = 10
  2430. } else {
  2431. switch 5 ( Chocobo_ChocoColor ) from 1 {
  2432. case +0:
  2433. set Chocobo_AvailableChocograph = 1719
  2434. set VAR_LocUInt8_6 = 8
  2435. set VAR_LocUInt8_7 = 0
  2436. set VAR_LocUInt8_9 = ( 9 - Chocobo_ForestChocographCount )
  2437. break
  2438. case +1:
  2439. switch 2 ( Chocobo_CurrentField ) from 1 {
  2440. case +0:
  2441. set Chocobo_AvailableChocograph = 1719
  2442. set VAR_LocUInt8_6 = 8
  2443. set VAR_LocUInt8_7 = 0
  2444. set VAR_LocUInt8_9 = ( 9 - Chocobo_ForestChocographCount )
  2445. break
  2446. case +1:
  2447. set Chocobo_AvailableChocograph = 16704
  2448. set VAR_LocUInt8_6 = 16
  2449. set VAR_LocUInt8_7 = 13
  2450. set VAR_LocUInt8_9 = ( 4 - Chocobo_LagoonChocographCount )
  2451. break
  2452. }
  2453. break
  2454. case +2:
  2455. switch 2 ( Chocobo_CurrentField ) from 1 {
  2456. case +0:
  2457. set Chocobo_AvailableChocograph = 300727L
  2458. set VAR_LocUInt8_6 = 12
  2459. set VAR_LocUInt8_7 = 0
  2460. set VAR_LocUInt8_9 = ( 13 - Chocobo_ForestChocographCount )
  2461. break
  2462. case +1:
  2463. set Chocobo_AvailableChocograph = 16704
  2464. set VAR_LocUInt8_6 = 16
  2465. set VAR_LocUInt8_7 = 13
  2466. set VAR_LocUInt8_9 = ( 4 - Chocobo_LagoonChocographCount )
  2467. break
  2468. }
  2469. break
  2470. case +3:
  2471. switch 2 ( Chocobo_CurrentField ) from 1 {
  2472. case +0:
  2473. set Chocobo_AvailableChocograph = 300727L
  2474. set VAR_LocUInt8_6 = 12
  2475. set VAR_LocUInt8_7 = 0
  2476. set VAR_LocUInt8_9 = ( 13 - Chocobo_ForestChocographCount )
  2477. break
  2478. case +1:
  2479. set Chocobo_AvailableChocograph = 2310464L
  2480. set VAR_LocUInt8_6 = 20
  2481. set VAR_LocUInt8_7 = 13
  2482. set VAR_LocUInt8_9 = ( 8 - Chocobo_LagoonChocographCount )
  2483. break
  2484. }
  2485. break
  2486. case +4:
  2487. switch 3 ( Chocobo_CurrentField ) from 1 {
  2488. case +0:
  2489. set Chocobo_AvailableChocograph = 300727L
  2490. set VAR_LocUInt8_6 = 12
  2491. set VAR_LocUInt8_7 = 0
  2492. set VAR_LocUInt8_9 = ( 13 - Chocobo_ForestChocographCount )
  2493. break
  2494. case +1:
  2495. set Chocobo_AvailableChocograph = 2310464L
  2496. set VAR_LocUInt8_6 = 20
  2497. set VAR_LocUInt8_7 = 13
  2498. set VAR_LocUInt8_9 = ( 8 - Chocobo_LagoonChocographCount )
  2499. break
  2500. case +2:
  2501. set Chocobo_AvailableChocograph = 13631488L
  2502. set VAR_LocUInt8_6 = 24
  2503. set VAR_LocUInt8_7 = 21
  2504. set VAR_LocUInt8_9 = ( 3 - Chocobo_GardenChocographCount )
  2505. break
  2506. }
  2507. break
  2508. }
  2509. switch 3 ( Chocobo_ChocoColor ) from 1 {
  2510. case +0:
  2511. if ( Chocobo_CurrentField == 1 ) {
  2512. set Chocobo_AvailableChocograph |= 8
  2513. set VAR_LocUInt8_8 = 1
  2514. }
  2515. break
  2516. case +1:
  2517. if ( ( Chocobo_CurrentField == 2 ) && ( General_ScenarioCounter >= 9400 ) ) {
  2518. set Chocobo_AvailableChocograph |= 2048
  2519. set VAR_LocUInt8_8 = 1
  2520. }
  2521. break
  2522. case +2:
  2523. if ( ( Chocobo_CurrentField == 1 ) && ( General_ScenarioCounter >= 10400 ) ) {
  2524. set Chocobo_AvailableChocograph |= 8192
  2525. set VAR_LocUInt8_8 = 1
  2526. }
  2527. break
  2528. default:
  2529. set VAR_LocUInt8_8 = 0
  2530. break
  2531. }
  2532. set VAR_LocUInt8_11 = 0
  2533. set Chocobo_AvailableChocograph = ( ( Chocobo_ChocographFound ^ 16777215L ) & Chocobo_AvailableChocograph )
  2534. if ( Chocobo_AvailableChocograph != 0 ) {
  2535. while ( VAR_LocUInt8_11 != 1 ) {
  2536. set VAR_LocUInt8_10 = ( ( VAR_LocUInt8_6 - VAR_LocUInt8_7 ) + VAR_LocUInt8_8 )
  2537. set VAR_LocUInt8_2 = ( ( GetRandom % VAR_LocUInt8_10 ) + VAR_LocUInt8_7 )
  2538. switch 24 ( VAR_LocUInt8_2 ) from 0 {
  2539. case +0:
  2540. if ( Chocobo_AvailableChocograph & 1 ) {
  2541. set VAR_GlobUInt8_54 = 0
  2542. set Chocobo_ChocographFound |= ( 1 << VAR_GlobUInt8_54 )
  2543. set VAR_LocUInt8_11 = 1
  2544. }
  2545. break
  2546. case +1:
  2547. if ( Chocobo_AvailableChocograph & 2 ) {
  2548. set VAR_GlobUInt8_54 = 1
  2549. set Chocobo_ChocographFound |= ( 1 << VAR_GlobUInt8_54 )
  2550. set VAR_LocUInt8_11 = 1
  2551. }
  2552. break
  2553. case +2:
  2554. if ( Chocobo_AvailableChocograph & 16 ) {
  2555. set VAR_GlobUInt8_54 = 4
  2556. set Chocobo_ChocographFound |= ( 1 << VAR_GlobUInt8_54 )
  2557. set VAR_LocUInt8_11 = 1
  2558. }
  2559. break
  2560. case +3:
  2561. if ( Chocobo_AvailableChocograph & 32 ) {
  2562. set VAR_GlobUInt8_54 = 5
  2563. set Chocobo_ChocographFound |= ( 1 << VAR_GlobUInt8_54 )
  2564. set VAR_LocUInt8_11 = 1
  2565. }
  2566. break
  2567. case +4:
  2568. if ( Chocobo_AvailableChocograph & 512 ) {
  2569. set VAR_GlobUInt8_54 = 9
  2570. set Chocobo_ChocographFound |= ( 1 << VAR_GlobUInt8_54 )
  2571. set VAR_LocUInt8_11 = 1
  2572. }
  2573. break
  2574. case +5:
  2575. if ( Chocobo_AvailableChocograph & 1024 ) {
  2576. set VAR_GlobUInt8_54 = 10
  2577. set Chocobo_ChocographFound |= ( 1 << VAR_GlobUInt8_54 )
  2578. set VAR_LocUInt8_11 = 1
  2579. }
  2580. break
  2581. case +6:
  2582. if ( Chocobo_AvailableChocograph & 4 ) {
  2583. set VAR_GlobUInt8_54 = 2
  2584. set Chocobo_ChocographFound |= ( 1 << VAR_GlobUInt8_54 )
  2585. set VAR_LocUInt8_11 = 1
  2586. }
  2587. break
  2588. case +7:
  2589. if ( Chocobo_AvailableChocograph & 128 ) {
  2590. set VAR_GlobUInt8_54 = 7
  2591. set Chocobo_ChocographFound |= ( 1 << VAR_GlobUInt8_54 )
  2592. set VAR_LocUInt8_11 = 1
  2593. }
  2594. break
  2595. case +8:
  2596. if ( Chocobo_AvailableChocograph & 8 ) {
  2597. set VAR_GlobUInt8_54 = 3
  2598. set Chocobo_ChocographFound |= ( 1 << VAR_GlobUInt8_54 )
  2599. set VAR_LocUInt8_11 = 1
  2600. }
  2601. break
  2602. case +9:
  2603. if ( Chocobo_AvailableChocograph & 4096 ) {
  2604. set VAR_GlobUInt8_54 = 12
  2605. set Chocobo_ChocographFound |= ( 1 << VAR_GlobUInt8_54 )
  2606. set VAR_LocUInt8_11 = 1
  2607. }
  2608. break
  2609. case +10:
  2610. if ( Chocobo_AvailableChocograph & 32768L ) {
  2611. set VAR_GlobUInt8_54 = 15
  2612. set Chocobo_ChocographFound |= ( 1 << VAR_GlobUInt8_54 )
  2613. set VAR_LocUInt8_11 = 1
  2614. }
  2615. break
  2616. case +11:
  2617. if ( Chocobo_AvailableChocograph & 262144L ) {
  2618. set VAR_GlobUInt8_54 = 18
  2619. set Chocobo_ChocographFound |= ( 1 << VAR_GlobUInt8_54 )
  2620. set VAR_LocUInt8_11 = 1
  2621. }
  2622. break
  2623. case +12:
  2624. if ( Chocobo_AvailableChocograph & 8192 ) {
  2625. set VAR_GlobUInt8_54 = 13
  2626. set Chocobo_ChocographFound |= ( 1 << VAR_GlobUInt8_54 )
  2627. set VAR_LocUInt8_11 = 1
  2628. }
  2629. break
  2630. case +13:
  2631. if ( Chocobo_AvailableChocograph & 64 ) {
  2632. set VAR_GlobUInt8_54 = 6
  2633. set Chocobo_ChocographFound |= ( 1 << VAR_GlobUInt8_54 )
  2634. set VAR_LocUInt8_11 = 1
  2635. }
  2636. break
  2637. case +14:
  2638. if ( Chocobo_AvailableChocograph & 256 ) {
  2639. set VAR_GlobUInt8_54 = 8
  2640. set Chocobo_ChocographFound |= ( 1 << VAR_GlobUInt8_54 )
  2641. set VAR_LocUInt8_11 = 1
  2642. }
  2643. break
  2644. case +15:
  2645. if ( Chocobo_AvailableChocograph & 16384 ) {
  2646. set VAR_GlobUInt8_54 = 14
  2647. set Chocobo_ChocographFound |= ( 1 << VAR_GlobUInt8_54 )
  2648. set VAR_LocUInt8_11 = 1
  2649. }
  2650. break
  2651. case +16:
  2652. if ( Chocobo_AvailableChocograph & 2048 ) {
  2653. set VAR_GlobUInt8_54 = 11
  2654. set Chocobo_ChocographFound |= ( 1 << VAR_GlobUInt8_54 )
  2655. set VAR_LocUInt8_11 = 1
  2656. }
  2657. break
  2658. case +17:
  2659. if ( Chocobo_AvailableChocograph & 65536L ) {
  2660. set VAR_GlobUInt8_54 = 16
  2661. set Chocobo_ChocographFound |= ( 1 << VAR_GlobUInt8_54 )
  2662. set VAR_LocUInt8_11 = 1
  2663. }
  2664. break
  2665. case +18:
  2666. if ( Chocobo_AvailableChocograph & 131072L ) {
  2667. set VAR_GlobUInt8_54 = 17
  2668. set Chocobo_ChocographFound |= ( 1 << VAR_GlobUInt8_54 )
  2669. set VAR_LocUInt8_11 = 1
  2670. }
  2671. break
  2672. case +19:
  2673. if ( Chocobo_AvailableChocograph & 2097152L ) {
  2674. set VAR_GlobUInt8_54 = 21
  2675. set Chocobo_ChocographFound |= ( 1 << VAR_GlobUInt8_54 )
  2676. set VAR_LocUInt8_11 = 1
  2677. }
  2678. break
  2679. case +21:
  2680. if ( Chocobo_AvailableChocograph & 1048576L ) {
  2681. set VAR_GlobUInt8_54 = 20
  2682. set Chocobo_ChocographFound |= ( 1 << VAR_GlobUInt8_54 )
  2683. set VAR_LocUInt8_11 = 1
  2684. }
  2685. break
  2686. case +22:
  2687. if ( Chocobo_AvailableChocograph & 4194304L ) {
  2688. set VAR_GlobUInt8_54 = 22
  2689. set Chocobo_ChocographFound |= ( 1 << VAR_GlobUInt8_54 )
  2690. set VAR_LocUInt8_11 = 1
  2691. }
  2692. break
  2693. case +23:
  2694. if ( Chocobo_AvailableChocograph & 8388608L ) {
  2695. set VAR_GlobUInt8_54 = 23
  2696. set Chocobo_ChocographFound |= ( 1 << VAR_GlobUInt8_54 )
  2697. set VAR_LocUInt8_11 = 1
  2698. }
  2699. break
  2700. }
  2701. }
  2702. set VAR_LocUInt8_13 = 10
  2703. } else {
  2704. if ( Chocobo_ChocographFound == 16777215L ) {
  2705. set Chocobo_GoodTreasureBonus = 2
  2706. } else {
  2707. set Chocobo_GoodTreasureBonus = 1
  2708. }
  2709. set VAR_GlobUInt8_50 == 1
  2710. set VAR_LocUInt8_12 = 0
  2711. }
  2712. }
  2713. }
  2714. if ( VAR_LocUInt8_12 == 0 ) {
  2715. if ( ( ( !GetRandom ) && ( GetRandom < ( 64 + ( 10 * Chocobo_GoodTreasureBonus ) ) ) ) == 1 ) {
  2716. set VAR_GlobUInt8_53 = 5
  2717. set VAR_LocUInt8_13 = 16
  2718. switch 8 ( GetRandom % 9 ) from 0 {
  2719. case +0:
  2720. set VAR_LocUInt16_20 = 218
  2721. break
  2722. case +1:
  2723. set VAR_LocUInt16_20 = 219
  2724. break
  2725. case +2:
  2726. set VAR_LocUInt16_20 = 220
  2727. break
  2728. case +3:
  2729. set VAR_LocUInt16_20 = 86
  2730. break
  2731. case +4:
  2732. set VAR_LocUInt16_20 = 199
  2733. break
  2734. case +5:
  2735. set VAR_LocUInt16_20 = 87
  2736. break
  2737. case +6:
  2738. set VAR_LocUInt16_20 = 11000
  2739. break
  2740. case +7:
  2741. set VAR_LocUInt16_20 = 1001
  2742. break
  2743. default:
  2744. set VAR_LocUInt16_20 = 85
  2745. break
  2746. }
  2747. } else {
  2748. if ( ( GetRandom < ( 1 - ( ( Chocobo_GoodTreasureBonus << 0 ) / 10 ) ) ) == 1 ) {
  2749. set VAR_GlobUInt8_53 = 4
  2750. set VAR_LocUInt8_13 = 8
  2751. switch 3 ( GetRandom % 4 ) from 0 {
  2752. case +0:
  2753. set VAR_LocUInt16_20 = 238
  2754. break
  2755. case +1:
  2756. set VAR_LocUInt16_20 = 6000
  2757. break
  2758. case +2:
  2759. set VAR_LocUInt16_20 = 1100
  2760. break
  2761. default:
  2762. set VAR_LocUInt16_20 = 239
  2763. break
  2764. }
  2765. } else {
  2766. if ( ( GetRandom < ( 8 + ( ( Chocobo_GoodTreasureBonus << 3 ) / 10 ) ) ) == 1 ) {
  2767. set VAR_GlobUInt8_53 = 3
  2768. set VAR_LocUInt8_13 = 4
  2769. switch 3 ( GetRandom % 4 ) from 0 {
  2770. case +0:
  2771. set VAR_LocUInt16_20 = 247
  2772. break
  2773. case +1:
  2774. set VAR_LocUInt16_20 = 237
  2775. break
  2776. case +2:
  2777. set VAR_LocUInt16_20 = 1500
  2778. break
  2779. default:
  2780. set VAR_LocUInt16_20 = 253
  2781. break
  2782. }
  2783. } else {
  2784. if ( ( GetRandom < ( 32 + ( ( Chocobo_GoodTreasureBonus << 5 ) / 10 ) ) ) == 1 ) {
  2785. set VAR_GlobUInt8_53 = 2
  2786. set VAR_LocUInt8_13 = 2
  2787. switch 2 ( GetRandom % 3 ) from 0 {
  2788. case +0:
  2789. set VAR_LocUInt16_20 = 254
  2790. break
  2791. case +1:
  2792. set VAR_LocUInt16_20 = 1200
  2793. break
  2794. default:
  2795. set VAR_LocUInt16_20 = 0
  2796. if ( ( ( Chocobo_ChocographKnown == 1 ) && ( Chocobo_ChocoPieceComplete == 0 ) ) && ( VAR_GlobUInt8_55 == 0 ) ) {
  2797. switch 4 ( Chocobo_ChocoColor ) from 1 {
  2798. case +0:
  2799. if ( Chocobo_ChocoPieceAmount == 0 ) {
  2800. set VAR_LocUInt16_20 = 30001
  2801. }
  2802. break
  2803. case +1:
  2804. if ( Chocobo_ChocoPieceAmount <= 1 ) {
  2805. set VAR_LocUInt16_20 = 30001
  2806. }
  2807. break
  2808. case +2:
  2809. if ( Chocobo_ChocoPieceAmount <= 3 ) {
  2810. set VAR_LocUInt16_20 = 30001
  2811. }
  2812. break
  2813. case +3:
  2814. if ( General_ScenarioCounter >= 10600 ) {
  2815. if ( Chocobo_ChocoPieceAmount <= 5 ) {
  2816. set VAR_LocUInt16_20 = 30001
  2817. }
  2818. }
  2819. break
  2820. }
  2821. set VAR_LocUInt8_13 = 15
  2822. }
  2823. if ( VAR_LocUInt16_20 == 0 ) {
  2824. set VAR_LocUInt16_20 = 249
  2825. set VAR_LocUInt8_13 = 2
  2826. }
  2827. break
  2828. }
  2829. } else {
  2830. set VAR_GlobUInt8_53 = 1
  2831. set VAR_LocUInt8_13 = 1
  2832. switch 8 ( GetRandom % 10 ) from 0 {
  2833. case +0:
  2834. set VAR_LocUInt16_20 = 241
  2835. break
  2836. case +1:
  2837. set VAR_LocUInt16_20 = 243
  2838. break
  2839. case +2:
  2840. set VAR_LocUInt16_20 = 244
  2841. break
  2842. case +3:
  2843. set VAR_LocUInt16_20 = 242
  2844. break
  2845. case +4:
  2846. set VAR_LocUInt16_20 = 248
  2847. break
  2848. case +5:
  2849. set VAR_LocUInt16_20 = 1050
  2850. break
  2851. case +6:
  2852. set VAR_LocUInt16_20 = 251
  2853. break
  2854. case +7:
  2855. set VAR_LocUInt16_20 = 236
  2856. break
  2857. default:
  2858. if ( ( Chocobo_ChocoColor >= 3 ) && ( Chocobo_ChocoPieceKnown == 1 ) ) {
  2859. set VAR_LocUInt16_20 = 252
  2860. } else {
  2861. set VAR_LocUInt16_20 = 251
  2862. }
  2863. break
  2864. }
  2865. }
  2866. }
  2867. }
  2868. }
  2869. }
  2870. set VAR_GlobInt16_26 = 99
  2871. RunScriptSync( 4, 11, 56 ) // Entry11
  2872. set VAR_GlobInt16_26 = 0
  2873. if ( VAR_GlobUInt8_53 != 99 ) {
  2874. RunTimer( 0 )
  2875. set VAR_LocUInt8_0 = 0
  2876. if ( VAR_LocUInt16_20 < 29999 ) {
  2877. if ( VAR_LocUInt16_20 >= 1000 ) {
  2878. set Treasure_Gil = ( VAR_LocUInt16_20 - 1000 )
  2879. if ( ( Treasure_Gil + GetGil ) > 9999999L ) {
  2880. set Treasure_Gil = ( 9999999L - GetGil )
  2881. }
  2882. SetTextVariable( 0, Treasure_Gil )
  2883. WindowAsync( 1, 0, 301 ) // " Trovato: 0 guil! "
  2884. RunSoundCode3( 53248, 108, 0, -128, 125 ) // Play Sound ; South Gate
  2885. AddGil( Treasure_Gil )
  2886. } else {
  2887. if ( ( ( GetItemCount(VAR_LocUInt16_20) < 99 ) && ( VAR_LocUInt16_20 < 512 ) ) || ( ( VAR_LocUInt16_20 >= 512 ) && ( GetCardAmount < 100 ) ) ) {
  2888. SetTextVariable( 0, VAR_LocUInt16_20 )
  2889. WindowAsync( 1, 0, 300 ) // " Trovato: Item! "
  2890. RunSoundCode3( 53248, 108, 0, -128, 125 ) // Play Sound ; South Gate
  2891. } else {
  2892. SetTextVariable( 0, VAR_LocUInt16_20 )
  2893. if ( VAR_LocUInt16_20 < 512 ) {
  2894. WindowAsync( 1, 0, 305 ) // " Trovato: Item, ma ne hai già troppi! "
  2895. } else {
  2896. WindowAsync( 1, 0, 306 ) // " Trovato: Carta, ma ne hai già troppe! "
  2897. }
  2898. }
  2899. }
  2900. if ( VAR_LocUInt16_20 >= 1000 ) {
  2901. set VAR_LocUInt16_20 = ( 1000 + Treasure_Gil )
  2902. }
  2903. switch 1 ( VAR_LocUInt16_20 ) from 252 {
  2904. case +0:
  2905. if ( Chocobo_PepperFound == 0 ) {
  2906. set Chocobo_PepperFound = 1
  2907. }
  2908. break
  2909. }
  2910. } else {
  2911. RunSoundCode3( 53248, 108, 0, -128, 125 ) // Play Sound ; South Gate
  2912. if ( VAR_LocUInt16_20 == 30000 ) {
  2913. if ( Chocobo_ChocographKnown == 0 ) {
  2914. WindowAsync( 1, 0, 302 ) // " Trovato: Lastra incisa! "
  2915. } else {
  2916. WindowAsync( 1, 0, 303 ) // " Trovato: Chocografia! "
  2917. }
  2918. } else {
  2919. WindowAsync( 1, 0, 304 ) // " Trovato: Choco/grafia! "
  2920. }
  2921. }
  2922. if ( VAR_LocUInt16_20 == 30000 ) {
  2923. switch 3 ( Chocobo_CurrentField ) from 1 {
  2924. case +0:
  2925. set Chocobo_ForestChocographCount++
  2926. break
  2927. case +1:
  2928. set Chocobo_LagoonChocographCount++
  2929. break
  2930. case +2:
  2931. set Chocobo_GardenChocographCount++
  2932. break
  2933. }
  2934. }
  2935. set VAR_GlobUInt8_51 += 1
  2936. switch 8 ( VAR_GlobUInt8_51 ) from 1 {
  2937. case +0:
  2938. set VAR_GlobUInt16_56 = VAR_LocUInt16_20
  2939. break
  2940. case +1:
  2941. set VAR_GlobUInt16_58 = VAR_LocUInt16_20
  2942. break
  2943. case +2:
  2944. set VAR_GlobUInt16_60 = VAR_LocUInt16_20
  2945. break
  2946. case +3:
  2947. set VAR_GlobUInt16_62 = VAR_LocUInt16_20
  2948. break
  2949. case +4:
  2950. set VAR_GlobUInt16_64 = VAR_LocUInt16_20
  2951. break
  2952. case +5:
  2953. set VAR_GlobUInt16_66 = VAR_LocUInt16_20
  2954. break
  2955. case +6:
  2956. set VAR_GlobUInt16_68 = VAR_LocUInt16_20
  2957. break
  2958. case +7:
  2959. set VAR_GlobUInt16_70 = VAR_LocUInt16_20
  2960. break
  2961. }
  2962. set VAR_LocUInt8_0 = 0
  2963. Wait( 8 )
  2964. while ( VAR_LocUInt8_0 == 0 ) {
  2965. if ( IsButton(131072L) ) { // Confirm
  2966. set VAR_LocUInt8_0 = 2
  2967. }
  2968. if ( IsButton(524288L) ) { // Moogle
  2969. set VAR_LocUInt8_0 = 2
  2970. }
  2971. Wait( 1 )
  2972. }
  2973. CloseWindow( 1 )
  2974. set VAR_LocUInt8_5 = 0
  2975. if ( VAR_LocUInt16_20 < 29999 ) {
  2976. SetTextVariable( 4, VAR_LocUInt8_13 * VAR_LocUInt8_4 )
  2977. WindowAsync( 1, 0, 307 ) // " Ottenuto: 0 punto/i, kupò! "
  2978. set VAR_LocUInt8_14 += ( VAR_LocUInt8_13 * VAR_LocUInt8_4 )
  2979. } else {
  2980. switch 1 ( VAR_LocUInt16_20 ) from 30000 {
  2981. case +0:
  2982. switch 1 ( Chocobo_ChocographKnown ) from 0 {
  2983. case +0:
  2984. set VAR_LocUInt8_5 = 20
  2985. break
  2986. default:
  2987. set VAR_LocUInt8_5 = ( 10 * VAR_LocUInt8_4 )
  2988. break
  2989. }
  2990. set VAR_LocUInt8_14 += VAR_LocUInt8_5
  2991. SetTextVariable( 4, VAR_LocUInt8_5 )
  2992. WindowAsync( 1, 0, 307 ) // " Ottenuto: 0 punto/i, kupò! "
  2993. set VAR_LocUInt8_0 = 0
  2994. Wait( 8 )
  2995. while ( VAR_LocUInt8_0 == 0 ) {
  2996. if ( IsButton(131072L) ) { // Confirm
  2997. set VAR_LocUInt8_0 = 2
  2998. }
  2999. if ( IsButton(524288L) ) { // Moogle
  3000. set VAR_LocUInt8_0 = 2
  3001. }
  3002. Wait( 1 )
  3003. }
  3004. CloseWindow( 1 )
  3005. SetTextVariable( 4, 5 ) // Zorlin Shape
  3006. WindowAsync( 1, 0, 309 ) // " Col bonus, ottieni 0 punti in più! "
  3007. break
  3008. default:
  3009. set VAR_LocUInt8_14 += ( 15 * VAR_LocUInt8_4 )
  3010. SetTextVariable( 4, 15 * VAR_LocUInt8_4 )
  3011. WindowAsync( 1, 0, 307 ) // " Ottenuto: 0 punto/i, kupò! "
  3012. set VAR_LocUInt8_0 = 0
  3013. Wait( 8 )
  3014. while ( VAR_LocUInt8_0 == 0 ) {
  3015. if ( IsButton(131072L) ) { // Confirm
  3016. set VAR_LocUInt8_0 = 2
  3017. }
  3018. if ( IsButton(524288L) ) { // Moogle
  3019. set VAR_LocUInt8_0 = 2
  3020. }
  3021. Wait( 1 )
  3022. }
  3023. CloseWindow( 1 )
  3024. SetTextVariable( 4, 5 ) // Zorlin Shape
  3025. WindowAsync( 1, 0, 309 ) // " Col bonus, ottieni 0 punti in più! "
  3026. set Chocobo_ChocoPieceAmount++
  3027. switch 6 ( Chocobo_ChocoPieceAmount ) from 1 {
  3028. case +0:
  3029. AddItem( 317, 1 ) // Choco/grafia
  3030. break
  3031. case +1:
  3032. AddItem( 318, 1 ) // Choco/grafia
  3033. break
  3034. case +2:
  3035. AddItem( 319, 1 ) // Choco/grafia
  3036. break
  3037. case +3:
  3038. AddItem( 320, 1 ) // Choco/grafia
  3039. break
  3040. case +4:
  3041. AddItem( 321, 1 ) // Choco/grafia
  3042. break
  3043. case +5:
  3044. AddItem( 322, 1 ) // Choco/grafia
  3045. set Chocobo_ChocoPieceComplete = 1
  3046. break
  3047. }
  3048. set VAR_GlobUInt8_55 = 1
  3049. break
  3050. }
  3051. }
  3052. set VAR_LocUInt8_0 = 0
  3053. Wait( 8 )
  3054. while ( VAR_LocUInt8_0 == 0 ) {
  3055. if ( IsButton(131072L) ) { // Confirm
  3056. set VAR_LocUInt8_0 = 2
  3057. }
  3058. if ( IsButton(524288L) ) { // Moogle
  3059. set VAR_LocUInt8_0 = 2
  3060. }
  3061. Wait( 1 )
  3062. }
  3063. CloseWindow( 1 )
  3064. if ( ( GetTimerTime + 5 ) >= Chocobo_LastTreasureTime ) {
  3065. SetTextVariable( 5, 5 ) // Zorlin Shape
  3066. SetTextVariable( 4, 5 * VAR_LocUInt8_4 )
  3067. WindowAsync( 1, 0, 308 ) // " Trovalo in 0 secondi! Ricevi 0 punti in più! "
  3068. set VAR_LocUInt8_14 += ( 5 * VAR_LocUInt8_4 )
  3069. set VAR_LocUInt8_0 = 0
  3070. Wait( 8 )
  3071. while ( VAR_LocUInt8_0 == 0 ) {
  3072. if ( IsButton(131072L) ) { // Confirm
  3073. set VAR_LocUInt8_0 = 2
  3074. }
  3075. if ( IsButton(524288L) ) { // Moogle
  3076. set VAR_LocUInt8_0 = 2
  3077. }
  3078. Wait( 1 )
  3079. }
  3080. CloseWindow( 1 )
  3081. }
  3082. set Chocobo_LastTreasureTime = GetTimerTime
  3083. switch 1 ( VAR_GlobUInt8_42 ) from 1 {
  3084. case +0:
  3085. SetTextVariable( 3, 4 ) // Gladius
  3086. SetTextVariable( 4, VAR_LocUInt8_14 )
  3087. WindowAsync( 1, 0, 310 ) // " Bonus a partire da 0 tesori! Ottieni 0 punti in più! "
  3088. set VAR_LocUInt8_14 += VAR_LocUInt8_14
  3089. set VAR_LocUInt8_0 = 0
  3090. Wait( 8 )
  3091. while ( VAR_LocUInt8_0 == 0 ) {
  3092. if ( IsButton(131072L) ) { // Confirm
  3093. set VAR_LocUInt8_0 = 2
  3094. }
  3095. if ( IsButton(524288L) ) { // Moogle
  3096. set VAR_LocUInt8_0 = 2
  3097. }
  3098. Wait( 1 )
  3099. }
  3100. CloseWindow( 1 )
  3101. break
  3102. }
  3103. switch 8 ( VAR_GlobUInt8_51 ) from 1 {
  3104. case +0:
  3105. set VAR_GenUInt8_158 = VAR_LocUInt8_14
  3106. break
  3107. case +1:
  3108. set VAR_GenUInt8_159 = VAR_LocUInt8_14
  3109. break
  3110. case +2:
  3111. set VAR_GenUInt8_160 = VAR_LocUInt8_14
  3112. break
  3113. case +3:
  3114. set VAR_GenUInt8_161 = VAR_LocUInt8_14
  3115. break
  3116. case +4:
  3117. set VAR_GenUInt8_162 = VAR_LocUInt8_14
  3118. break
  3119. case +5:
  3120. set VAR_GenUInt8_163 = VAR_LocUInt8_14
  3121. break
  3122. case +6:
  3123. set VAR_GenUInt8_164 = VAR_LocUInt8_14
  3124. break
  3125. case +7:
  3126. set VAR_GenUInt8_165 = VAR_LocUInt8_14
  3127. break
  3128. }
  3129. SetTextVariable( 7, VAR_GlobUInt8_51 )
  3130. WindowAsync( 2, 4, 275 ) // "Unità trovate: 0"
  3131. if ( Chocobo_BeakLevel < 99 ) {
  3132. set Chocobo_BeakExp += VAR_LocUInt8_14
  3133. set VAR_LocInt8_19 = ( VAR_LocUInt16_22 = 0 )
  3134. set Chocobo_BeakNextLevel -= VAR_LocUInt8_14
  3135. if ( Chocobo_BeakNextLevel == 0 ) {
  3136. set VAR_LocInt8_19++
  3137. set Chocobo_BeakLevel++
  3138. set Chocobo_BeakLevel64 = ( Chocobo_BeakNextLevel = ( ( 646 * Chocobo_BeakLevel ) / 1000 ) )
  3139. set Chocobo_BeakNextLevel = ( Sin(( 64 - Chocobo_BeakNextLevel )) - Sin(( 64 - ( Chocobo_BeakNextLevel + 1 ) )) )
  3140. set Chocobo_BeakNextLevel = ( ( ( Chocobo_BeakNextLevel + ( Chocobo_BeakNextLevel / ( 64 - Chocobo_BeakLevel64 ) ) ) + 2 ) * 2 )
  3141. } else {
  3142. if ( Chocobo_BeakNextLevel < 0 ) {
  3143. while ( Chocobo_BeakNextLevel < 0 ) {
  3144. set VAR_LocInt8_19++
  3145. set Chocobo_BeakLevel++
  3146. if ( Chocobo_BeakLevel >= 99 ) {
  3147. break
  3148. }
  3149. set VAR_LocUInt16_22 = Chocobo_BeakNextLevel
  3150. set Chocobo_BeakLevel64 = ( Chocobo_BeakNextLevel = ( ( 646 * Chocobo_BeakLevel ) / 1000 ) )
  3151. set Chocobo_BeakNextLevel = ( Sin(( 64 - Chocobo_BeakNextLevel )) - Sin(( 64 - ( Chocobo_BeakNextLevel + 1 ) )) )
  3152. set Chocobo_BeakNextLevel = ( ( ( Chocobo_BeakNextLevel + ( Chocobo_BeakNextLevel / ( 64 - Chocobo_BeakLevel64 ) ) ) + 2 ) * 2 )
  3153. set Chocobo_BeakNextLevel += VAR_LocUInt16_22
  3154. }
  3155. }
  3156. }
  3157. }
  3158. if ( Chocobo_BeakLevel <= 99 ) {
  3159. set Chocobo_BeakLevel -= VAR_LocInt8_19
  3160. set VAR_LocUInt8_3 = 0
  3161. while ( VAR_LocUInt8_3 < VAR_LocInt8_19 ) {
  3162. RunSoundCode3( 53248, 683, 0, -128, 125 ) // Play Sound ; [Unknown Audio]
  3163. set Chocobo_BeakLevel++
  3164. SetTextVariable( 4, Chocobo_BeakLevel )
  3165. WindowSync( 1, 0, 326 ) // " Il becco si è indurito! Livello becco: 0 "
  3166. set VAR_LocUInt8_3++
  3167. }
  3168. }
  3169. if ( VAR_GlobUInt8_51 == ( 8 / VAR_GlobInt8_36 ) ) {
  3170. RunScriptSync( 6, 9, 57 ) // Entry9
  3171. } else {
  3172. RunTimer( 1 )
  3173. }
  3174. } else {
  3175. if ( VAR_LocUInt8_11 == 1 ) {
  3176. set Chocobo_ChocographFound ^= ( 1 << VAR_GlobUInt8_54 )
  3177. }
  3178. }
  3179. return
  3180.  
  3181.  
  3182. #HW newfunction 39
  3183. Function Barrel_39
  3184. SetObjectFlags( 7 )
  3185. return
  3186.  
  3187.  
  3188. #HW newfunction 40
  3189. Function Barrel_40
  3190. SetObjectFlags( 14 )
  3191. return
  3192.  
  3193.  
  3194. #HW newentry 9
  3195. #HW locals
  3196. allocate 32
  3197. #HW endlocals
  3198.  
  3199. #HW newfunction 0
  3200. Function Moogle_Male_Init
  3201. if ( VARL_GenBool_1423 == 0 ) {
  3202. set VAR_GlobInt16_0 = 64192
  3203. set VAR_GlobInt16_4 = 65305
  3204. set VAR_GlobInt16_6 = 194
  3205. set VAR_GlobInt16_2 = 65478
  3206. } else {
  3207. set VAR_GlobInt16_0 = 1058
  3208. set VAR_GlobInt16_4 = 60188
  3209. set VAR_GlobInt16_6 = 65
  3210. set VAR_GlobInt16_2 = 64395
  3211. }
  3212. SetModel( 220, 50 ) // Moogle Male
  3213. CreateObject( VAR_GlobInt16_0, VAR_GlobInt16_4 )
  3214. TurnInstant( VAR_GlobInt16_6 )
  3215. SetStandAnimation( 2904 ) // Idle
  3216. SetWalkAnimation( 2927 ) // Walk
  3217. SetRunAnimation( 2907 ) // Run
  3218. SetLeftAnimation( 2923 ) // Turn_L
  3219. SetRightAnimation( 2911 ) // Turn_R
  3220. SetObjectLogicalSize( 14, 14, 22 )
  3221. SetAnimationStandSpeed( 14, 16, 18, 20 )
  3222. SetHeadAngle( 4, 1 )
  3223. if ( VARL_GenBool_1423 == 0 ) {
  3224. DefinePlayerCharacter( )
  3225. SetObjectFlags( 7 )
  3226. } else {
  3227. 0x91( 1 )
  3228. }
  3229. SetObjectSize( 9, 72, 72, 72 ) // Moogle_Male
  3230. return
  3231.  
  3232.  
  3233. #HW newfunction 1
  3234. Function Moogle_Male_Loop
  3235. switchex 11 ( VAR_GlobInt16_30 ) {
  3236. case 4:
  3237. WaitAnimation( )
  3238. TimedTurn( Angle(65512, 60776), 32 )
  3239. WaitTurn( )
  3240. InitWalk( )
  3241. Walk( -24, -4760 )
  3242. RunScriptAsync( 6, 4, 45 ) // Chocobo
  3243. RunSoundCode3( 53248, 682, 0, -128, 127 ) // Play Sound ; [Unknown Audio]
  3244. WindowSync( 6, 128, 183 ) // "KUPÒ!!"
  3245. WindowSync( 6, 128, 184 ) // "Mene ─Ciao! Sono Mene, il signore del bosco e lui è il mio braccio destro chocobo Choco, kupò!"
  3246. set VAR_GlobInt16_30 = 5
  3247. Wait( 4 )
  3248. TurnTowardObject( 4, 16 ) // Chocobo
  3249. WaitTurn( )
  3250. RunScriptAsync( 6, 25, 25 ) // Entry25
  3251. break
  3252. case 8:
  3253. WaitTurn( )
  3254. Wait( 8 )
  3255. TurnTowardObject( 25, 16 ) // Entry25
  3256. WaitTurn( )
  3257. WindowSync( 6, 128, 187 ) // "Mene ─E questo è il..."
  3258. RunScriptSync( 4, 14, 58 ) // Code14
  3259. switchex 5 ( VAR_GlobUInt8_40 ) {
  3260. case 1 ; 36 ; 37:
  3261. WindowSync( 6, 128, 188 ) // "Mene ─Come mai da queste parti?"
  3262. set VAR_GlobInt16_30 = 2
  3263. break
  3264. case 3:
  3265. set VAR_GlobInt16_30 = 9
  3266. break
  3267. case 26:
  3268. set VAR_GlobInt16_30 = 32
  3269. break
  3270. }
  3271. break
  3272. case 10:
  3273. WindowSync( 6, 128, 192 ) // "Mene ─Hmm. No, ma ho visto passarne una brutta..."
  3274. set VAR_GlobInt16_30 = 11
  3275. break
  3276. case 14:
  3277. WindowAsync( 6, 128, 197 ) // "Mene ─Vai di fretta, kupò?"
  3278. Wait( 15 )
  3279. RunScriptAsync( 6, 25, 26 ) // Entry25
  3280. WaitWindow( 6 )
  3281. set VAR_GlobInt16_30 = 15
  3282. break
  3283. case 16:
  3284. WindowSync( 6, 128, 203 ) // "Mene ─Allora va con Choco, no? È pratico, velocissimo e con lui non incontri mostri, kupò!"
  3285. switchex 5 ( VAR_GlobUInt8_40 ) {
  3286. case 1 ; 3 ; 26 ; 36 ; 37:
  3287. set VAR_GlobInt16_30 = 18
  3288. break
  3289. }
  3290. break
  3291. case 18:
  3292. TurnTowardObject( 4, 16 ) // Chocobo
  3293. WaitTurn( )
  3294. WindowAsync( 6, 128, 204 ) // "Mene ─Choco, vieni qui!"
  3295. RunScriptAsync( 6, 4, 46 ) // Chocobo
  3296. WaitTurn( )
  3297. TurnTowardObject( 25, 32 ) // Entry25
  3298. WaitTurn( )
  3299. WaitWindow( 6 )
  3300. set VAR_GlobInt16_30 = 19
  3301. WaitTurn( )
  3302. break
  3303. case 20:
  3304. TurnTowardObject( 25, 32 ) // Entry25
  3305. WaitTurn( )
  3306. WindowSync( 6, 128, 211 ) // "Mene ─Oh no, no! Choco è uno che quando non gli sconfinfera una persona, prende e scappa, kupò!"
  3307. WaitTurn( )
  3308. TurnTowardObject( 4, 32 ) // Chocobo
  3309. WaitTurn( )
  3310. WindowSync( 6, 128, 212 ) // "Mene ─Choco, vieni subito qui!!"
  3311. RunScriptAsync( 6, 4, 46 ) // Chocobo
  3312. set VAR_GlobInt16_30 = 21
  3313. WaitTurn( )
  3314. break
  3315. case 22:
  3316. set VAR_GlobInt16_30 = 46
  3317. TurnTowardObject( 4, 32 ) // Chocobo
  3318. WaitTurn( )
  3319. WindowSync( 6, 128, 214 ) // "Mene ─Bisogna ricorrere ad altri metodi!"
  3320. WaitTurn( )
  3321. TurnTowardObject( 25, 16 ) // Entry25
  3322. WaitTurn( )
  3323. SetTextVariable( 0, 251 ) // Erba ghisal
  3324. WindowAsync( 6, 128, 215 ) // "Mene ─Tieni, è Item. Con questa puoi chiamare Choco quando ti trovi fuori dal bosco."
  3325. Wait( 15 )
  3326. RunScriptAsync( 6, 25, 26 ) // Entry25
  3327. WaitWindow( 6 )
  3328. SetTextVariable( 0, 251 ) // Erba ghisal
  3329. WindowSync( 6, 128, 216 ) // "Mene ─Vicino a questo bosco ci sono delle impronte di chocobo. Se ti ci metti sopra e usi l’Item, vedrai arrivare Choco in un batter d’ali!"
  3330. WindowSync( 6, 128, 217 ) // "Mene ─Sono certo che gli sei simpatico. Ti seguirà ovunque. Farai ottimi affari con lui!"
  3331. WindowSync( 6, 128, 218 ) // "Mene ─A proposito, quando chiami Choco, ripassa di qui che parliamo d’affari, kupò."
  3332. RunSoundCode3( 53248, 108, 0, -128, 125 ) // Play Sound ; South Gate
  3333. AddItem( 251, 1 ) // Erba ghisal
  3334. SetTextVariable( 0, 251 ) // Erba ghisal
  3335. if ( 1 ) {
  3336. WindowSync( 7, 0, 4 ) // " Ottenuto: Item! "
  3337. } else {
  3338. WindowSync( 7, 0, 5 ) // " Ottenuto: carta Item! "
  3339. }
  3340. set VAR_GlobInt8_32 = 1
  3341. set Chocobo_ChocoColor = 1
  3342. SetObjectFlags( 5 )
  3343. set VAR_GlobBool_158 = 1
  3344. if ( VAR_GlobBool_159 == 1 ) {
  3345. if ( VAR_GlobBool_156 == 0 ) {
  3346. EnableMove( )
  3347. SetTriangleFlagMask( 255 )
  3348. if ( VAR_GlobBool_144 == 0 ) {
  3349. EnableMenu( )
  3350. }
  3351. }
  3352. }
  3353. break
  3354. case 33:
  3355. WindowSync( 6, 128, 200 ) // "Mene ─Sei fuori strada, kupò! Ora sei nel bosco a est di Lindblum!"
  3356. set VAR_GlobInt16_30 = 16
  3357. break
  3358. case 43:
  3359. TurnTowardObject( 25, 16 ) // Entry25
  3360. WaitTurn( )
  3361. WindowSync( 6, 128, 329 ) // "Mene ─Fammi vedere. Hmmm... Dunque..."
  3362. WindowSync( 6, 128, 330 ) // "Mene ─È una lastra di pietra con un luogo inciso, kupò."
  3363. WindowSync( 6, 128, 331 ) // "Mene ─Ho l’impressione che ci sia un tesoro nascosto, kupò."
  3364. WindowSync( 6, 128, 332 ) // "Mene ─Perché non provi a cercare questo posto con Choco, kupò? Il servizio stavolta è gratuito!"
  3365. WindowSync( 6, 128, 333 ) // "Mene ─Quando sei fuori con Choco, con [BTN][IMG] scegli una lastra incisa e il luogo dove vuoi cercare i tesori. Poi prova a chocobeccare con [BTN][IMG]!"
  3366. Wait( 15 )
  3367. WindowSync( 6, 128, 334 ) // "Mene ─Senti, che dici se chiamiamo la lastra incisa Chocografia?"
  3368. set VAR_GlobInt16_30 = 44
  3369. break
  3370. case 45:
  3371. set VAR_GlobInt16_30 = 46
  3372. WindowSync( 6, 128, 336 ) // "Mene ─Ora che ci penso bene, tanto tempo fa Choco era alla ricerca di qualcosa..."
  3373. WindowSync( 6, 128, 337 ) // "Mene ─Sono certo che ci sono tanti tesori da scoprire, kupò!"
  3374. WindowSync( 6, 128, 174 ) // "Mene ─Potresti trovare anche delle carte! Sono cose preziosissime, cerca di non averne troppe, se no, dovrai buttarle!"
  3375. Wait( 8 )
  3376. set Chocobo_ChocographKnown = 1
  3377. set VAR_GlobBool_158 = 1
  3378. if ( VAR_GlobBool_159 == 1 ) {
  3379. if ( VAR_GlobBool_156 == 0 ) {
  3380. EnableMove( )
  3381. SetTriangleFlagMask( 255 )
  3382. if ( VAR_GlobBool_144 == 0 ) {
  3383. EnableMenu( )
  3384. }
  3385. }
  3386. }
  3387. break
  3388. default:
  3389. if ( VAR_GlobInt8_34 == 1 ) {
  3390. TurnTowardObject( 4, 32 ) // Chocobo
  3391. WaitTurn( )
  3392. WaitTurn( )
  3393. Wait( 1 )
  3394. }
  3395. break
  3396. }
  3397. Wait( 1 )
  3398. loop
  3399.  
  3400.  
  3401. #HW newfunction 44
  3402. Function Moogle_Male_44
  3403. SetPathing( 0 )
  3404. EnableHeadFocus( 2 )
  3405. SetWalkTurnSpeed( 10 )
  3406. SetAnimationFlags( 2, 0 )
  3407. RunAnimation( 2913 ) // Fly
  3408. SetWalkSpeed( 68 )
  3409. Wait( 10 )
  3410. InitWalk( )
  3411. Walk( 237, -899 )
  3412. InitWalk( )
  3413. Walk( -316, -1909 )
  3414. InitWalk( )
  3415. Walk( -185, -3291 )
  3416. InitWalk( )
  3417. Walk( 137, -4452 )
  3418. Wait( 15 )
  3419. SetAnimationFlags( 0, 0 )
  3420. SetPathing( 1 )
  3421. RunAnimation( 4985 ) // From_Fly
  3422. RunScriptSync( 4, 0, 20 ) // Main
  3423. return
  3424.  
  3425.  
  3426. #HW newfunction 3
  3427. Function Moogle_Male_SpeakBTN
  3428. ifnot ( IsMovementEnabled ) {
  3429. return
  3430. }
  3431. if ( ( General_FieldEntrance != 2 ) && ( VAR_GlobInt8_32 == 1 ) ) {
  3432. set VAR_GlobBool_158 = 0
  3433. if ( VAR_GlobBool_159 == 1 ) {
  3434. DisableMove( )
  3435. if ( VAR_GlobBool_144 == 0 ) {
  3436. DisableMenu( )
  3437. } else {
  3438. Wait( 1 )
  3439. }
  3440. }
  3441. SetTriangleFlagMask( 127 )
  3442. WaitTurn( )
  3443. set VAR_GlobUInt8_16 = GetEntryAngle(255)
  3444. TurnTowardObject( 250, 32 ) // Player Character
  3445. WaitTurn( )
  3446. switch 4 ( VAR_LocUInt8_3 ) from 0 {
  3447. case +0:
  3448. WindowSync( 6, 128, 219 ) // "Mene ─Usa l’Item sopra le impronte di chocobo fuori del bosco. Le trovi subito se le guardi dall’alto, kupò!"
  3449. set VAR_LocUInt8_3 = 1
  3450. break
  3451. case +1:
  3452. WindowSync( 6, 128, 205 ) // "Mene ─Quando un chocobo si sceglie un fantino, lo segue ovunque, kupò!"
  3453. set VAR_LocUInt8_3 = 2
  3454. set VARL_GenBool_1080 = 1
  3455. break
  3456. case +2:
  3457. WindowSync( 6, 128, 206 ) // "Mene ─Ma a Choco non piacque il suo primo fantino e scappò via, kupò!"
  3458. set VAR_LocUInt8_3 = 3
  3459. set VARL_GenBool_1071 = 1
  3460. break
  3461. case +3:
  3462. WindowSync( 6, 128, 208 ) // "Mene ─Io l’aiutai a fuggire e poi venimmo a nasconderci quatti, quatti in questo bosco, kupò!"
  3463. set VAR_LocUInt8_3 = 4
  3464. set VARL_GenBool_1070 = 1
  3465. break
  3466. default:
  3467. if ( VAR_LocInt8_31 == 0 ) {
  3468. WindowSync( 6, 128, 217 ) // "Mene ─Sono certo che gli sei simpatico. Ti seguirà ovunque. Farai ottimi affari con lui!"
  3469. set VAR_LocInt8_31 = 1
  3470. } else {
  3471. WindowSync( 6, 128, 219 ) // "Mene ─Usa l’Item sopra le impronte di chocobo fuori del bosco. Le trovi subito se le guardi dall’alto, kupò!"
  3472. set VAR_LocInt8_31 = 0
  3473. }
  3474. set VAR_LocUInt8_3 = 5
  3475. break
  3476. }
  3477. set VAR_GlobBool_158 = 1
  3478. if ( VAR_GlobBool_159 == 1 ) {
  3479. if ( VAR_GlobBool_156 == 0 ) {
  3480. EnableMove( )
  3481. SetTriangleFlagMask( 255 )
  3482. if ( VAR_GlobBool_144 == 0 ) {
  3483. EnableMenu( )
  3484. }
  3485. }
  3486. }
  3487. }
  3488. return
  3489.  
  3490.  
  3491. #HW newfunction 47
  3492. Function Moogle_Male_47
  3493. if ( VARL_GenBool_1419 == 0 ) {
  3494. if ( ( World_CurrentTransport >= 1 ) && ( World_CurrentTransport <= 6 ) ) {
  3495. TurnTowardObject( 4, 16 ) // Chocobo
  3496. WaitTurn( )
  3497. WindowSync( 6, 128, 223 ) // "Mene ─Choco! Tutto bene?"
  3498. RunScriptSync( 4, 4, 48 ) // Chocobo
  3499. } else {
  3500. WindowSync( 6, 128, 222 ) // "Mene ─Così mi piaci, giovanotto! Sapevo che ti sarebbe piaciuto andare in giro con Choco, kupò!"
  3501. }
  3502. set VARL_GenBool_1419 = 1
  3503. }
  3504. return
  3505.  
  3506.  
  3507. #HW newfunction 59
  3508. Function Moogle_Male_59
  3509. RunScriptAsync( 6, 250, 26 ) // Player Character
  3510. TurnTowardObject( 250, 16 ) // Player Character
  3511. WaitTurn( )
  3512. SetTextVariable( 0, 251 ) // Erba ghisal
  3513. SetTextVariable( 1, 60 ) // Ramo salvifico
  3514. if ( VARL_GenBool_810 == 0 ) {
  3515. WindowSync( 6, 128, 219 ) // "Mene ─Usa l’Item sopra le impronte di chocobo fuori del bosco. Le trovi subito se le guardi dall’alto, kupò!"
  3516. if ( GetItemCount(251) == 0 ) { // Erba ghisal
  3517. WindowSync( 6, 128, 220 ) // "Mene ─Come? Non ce l’hai, kupò? Va bene, te ne regalo una io!"
  3518. RunSoundCode3( 53248, 108, 0, -128, 125 ) // Play Sound ; South Gate
  3519. AddItem( 251, 1 ) // Erba ghisal
  3520. SetTextVariable( 0, 251 ) // Erba ghisal
  3521. if ( 1 ) {
  3522. WindowSync( 7, 0, 4 ) // " Ottenuto: Item! "
  3523. } else {
  3524. WindowSync( 7, 0, 5 ) // " Ottenuto: carta Item! "
  3525. }
  3526. }
  3527. } else {
  3528. if ( VARL_GenBool_809 == 0 ) {
  3529. WindowSync( 6, 128, 221 ) // "Mene ─Quando lo chiami, parlagli, se no, non si muove di lì, kupò!"
  3530. } else {
  3531. RunScriptAsync( 6, 25, 30 ) // Entry25
  3532. set VAR_LocUInt8_1 = 0
  3533. while ( VAR_LocUInt8_1 != 99 ) {
  3534. SetTextVariable( 0, 251 ) // Erba ghisal
  3535. EnableDialogChoices( 255, VAR_LocUInt8_1 )
  3536. if ( Chocobo_ForestHighScore > 0 ) {
  3537. SetTextVariable( 2, Chocobo_HotColdPoints )
  3538. WindowSync( 6, 128, 226 ) // "Mene ─Che vuoi, kupò? Fare una chocobeccata Voglio l’Item Verificare i punti (0) Niente"
  3539. } else {
  3540. if ( VARL_GenBool_1087 == 1 ) {
  3541. WindowSync( 6, 128, 225 ) // "Mene ─Cosa vuoi, kupò? Fare una chocobeccata Voglio l’Item Niente"
  3542. } else {
  3543. WindowSync( 6, 128, 224 ) // "Mene ─Cosa vuoi, kupò? Parlami dell’affare Voglio l’Item Niente"
  3544. }
  3545. }
  3546. switch 3 ( GetDialogChoice ) from 0 {
  3547. case +0:
  3548. set VAR_LocUInt8_1 = 0
  3549. if ( ( World_CurrentTransport >= 1 ) && ( World_CurrentTransport <= 6 ) ) {
  3550. if ( VARL_GenBool_1087 == 0 ) {
  3551. RunScriptSync( 4, 9, 60 ) // Moogle_Male
  3552. } else {
  3553. SetTextVariable( 1, 60 ) // Ramo salvifico
  3554. SetTextVariable( 7, GetGil )
  3555. if ( VAR_GenUInt8_132 >= 40 ) {
  3556. WindowSync( 6, 128, 231 ) // "Mene ─Divertiti, kupò! Fai una chocobeccata per 0 guil? (Guil attuali: 0) Sì No"
  3557. } else {
  3558. if ( Chocobo_NoMoreChocograph == 1 ) {
  3559. WindowSync( 6, 128, 230 ) // "Mene ─Choco dice che ha già trovato tutte le chocografie che c’erano qui. Fai comunque una chocobeccata per 0 guil? (Guil attuali: 0) Sì No"
  3560. } else {
  3561. if ( Chocobo_NoFindChocograph == 1 ) {
  3562. WindowSync( 6, 128, 229 ) // "Mene ─Choco dice che per ora non può trovare più chocografie. Vuoi fare comunque una chocobeccata per 0 guil? (Guil attuali: 0) Sì No"
  3563. } else {
  3564. WindowSync( 6, 128, 228 ) // "Mene ─Sono 0 guil a volta, kupò! (Guil attuali: 0) Accetto Non accetto"
  3565. }
  3566. }
  3567. }
  3568. if ( GetDialogChoice == 0 ) {
  3569. if ( GetGil >= 60 ) {
  3570. RunSoundCode3( 53248, 1045, 0, -128, 125 ) // Play Sound ; [Unknown Audio]
  3571. set Field_MusicVolume = 0
  3572. RunSoundCode2( 34305, 0, 30, Field_MusicVolume ) // All Musics Volume Intpl ; Battle
  3573. set VAR_GlobBool_167 = 0
  3574. if ( 1 ) {
  3575. set VAR_GlobBool_167 = 1
  3576. }
  3577. RemoveGil( 60 )
  3578. switch 3 ( Chocobo_CurrentField ) from 1 {
  3579. case +0:
  3580. set VAR_GlobBool_158 = 0
  3581. if ( VAR_GlobBool_159 == 1 ) {
  3582. DisableMove( )
  3583. if ( VAR_GlobBool_144 == 0 ) {
  3584. DisableMenu( )
  3585. } else {
  3586. Wait( 1 )
  3587. }
  3588. }
  3589. SetTriangleFlagMask( 127 )
  3590. PreloadField( 5, 2950 ) // Chocobosco
  3591. set VAR_GlobInt16_21 = 2950
  3592. if ( VAR_GlobUInt8_17 == 255 ) {
  3593. set Op66(( GetData_12 - 160 ), ( GetData_13 - 112 ))
  3594. }
  3595. 0xA9( 250 ) // Player Character
  3596. FadeFilter( 6, 24, VAR_GlobUInt8_17, 255, 255, 255 )
  3597. Wait( 25 )
  3598. if ( VAR_GlobBool_167 == 1 ) {
  3599. RunSoundCode( 265, 65535 ) // Stop Current Music ; [Unknown Audio]
  3600. set VAR_GlobBool_167 = 0
  3601. }
  3602. if ( VAR_GlobBool_162 == 0 ) {
  3603. }
  3604. if ( VAR_GlobBool_163 == 0 ) {
  3605. }
  3606. set General_FieldEntrance = 2
  3607. Field( 2950 ) // Chocobosco
  3608. break
  3609. case +1:
  3610. set VAR_GlobBool_158 = 0
  3611. if ( VAR_GlobBool_159 == 1 ) {
  3612. DisableMove( )
  3613. if ( VAR_GlobBool_144 == 0 ) {
  3614. DisableMenu( )
  3615. } else {
  3616. Wait( 1 )
  3617. }
  3618. }
  3619. SetTriangleFlagMask( 127 )
  3620. PreloadField( 5, 2951 ) // Chocogolfo
  3621. set VAR_GlobInt16_21 = 2951
  3622. if ( VAR_GlobUInt8_17 == 255 ) {
  3623. set Op66(( GetData_12 - 160 ), ( GetData_13 - 112 ))
  3624. }
  3625. 0xA9( 250 ) // Player Character
  3626. FadeFilter( 6, 24, VAR_GlobUInt8_17, 255, 255, 255 )
  3627. Wait( 25 )
  3628. if ( VAR_GlobBool_167 == 1 ) {
  3629. RunSoundCode( 265, 65535 ) // Stop Current Music ; [Unknown Audio]
  3630. set VAR_GlobBool_167 = 0
  3631. }
  3632. if ( VAR_GlobBool_162 == 0 ) {
  3633. }
  3634. if ( VAR_GlobBool_163 == 0 ) {
  3635. }
  3636. set General_FieldEntrance = 2
  3637. Field( 2951 ) // Chocogolfo
  3638. break
  3639. case +2:
  3640. set VAR_GlobBool_158 = 0
  3641. if ( VAR_GlobBool_159 == 1 ) {
  3642. DisableMove( )
  3643. if ( VAR_GlobBool_144 == 0 ) {
  3644. DisableMenu( )
  3645. } else {
  3646. Wait( 1 )
  3647. }
  3648. }
  3649. SetTriangleFlagMask( 127 )
  3650. PreloadField( 5, 2952 ) // Chocoaeroparco
  3651. set VAR_GlobInt16_21 = 2952
  3652. if ( VAR_GlobUInt8_17 == 255 ) {
  3653. set Op66(( GetData_12 - 160 ), ( GetData_13 - 112 ))
  3654. }
  3655. 0xA9( 250 ) // Player Character
  3656. FadeFilter( 6, 24, VAR_GlobUInt8_17, 255, 255, 255 )
  3657. Wait( 25 )
  3658. if ( VAR_GlobBool_167 == 1 ) {
  3659. RunSoundCode( 265, 65535 ) // Stop Current Music ; [Unknown Audio]
  3660. set VAR_GlobBool_167 = 0
  3661. }
  3662. if ( VAR_GlobBool_162 == 0 ) {
  3663. }
  3664. if ( VAR_GlobBool_163 == 0 ) {
  3665. }
  3666. set General_FieldEntrance = 2
  3667. Field( 2952 ) // Chocoaeroparco
  3668. break
  3669. }
  3670. } else {
  3671. RunScriptSync( 4, 25, 38 ) // Entry25
  3672. }
  3673. }
  3674. }
  3675. } else {
  3676. WindowSync( 6, 128, 257 ) // "Mene ─Non funziona se non c’è Choco! Per chiamarlo, usa l’Item sulle impronte di chocobo fuori del bosco!"
  3677. }
  3678. break
  3679. case +1:
  3680. set VAR_LocUInt8_1 = 1
  3681. if ( GetItemCount(251) == 99 ) { // Erba ghisal
  3682. RunScriptSync( 4, 9, 61 ) // Moogle_Male
  3683. } else {
  3684. if ( GetGil < 80 ) {
  3685. RunScriptSync( 4, 9, 38 ) // Moogle_Male
  3686. RunScriptSync( 4, 25, 38 ) // Entry25
  3687. if ( GetItemCount(251) == 0 ) { // Erba ghisal
  3688. RunScriptSync( 4, 9, 62 ) // Moogle_Male
  3689. }
  3690. } else {
  3691. RunScriptSync( 4, 9, 37 ) // Moogle_Male
  3692. }
  3693. }
  3694. break
  3695. case +2:
  3696. set VAR_LocUInt8_1 = 2
  3697. if ( ( VARL_GenBool_1087 == 0 ) || ( Chocobo_ForestHighScore == 0 ) ) {
  3698. set VAR_LocUInt8_1 = 99
  3699. } else {
  3700. if ( Chocobo_ForestHighScore > 0 ) {
  3701. if ( VARL_GenBool_1416 == 0 ) {
  3702. RunScriptSync( 4, 9, 63 ) // Moogle_Male
  3703. }
  3704. set VAR_LocUInt8_1 = 2
  3705. RunScriptSync( 4, 9, 64 ) // Moogle_Male
  3706. }
  3707. }
  3708. break
  3709. default:
  3710. set VAR_LocUInt8_1 = 99
  3711. break
  3712. }
  3713. }
  3714. }
  3715. }
  3716. return
  3717.  
  3718.  
  3719. #HW newfunction 60
  3720. Function Moogle_Male_60
  3721. if ( ( VAR_LocInt8_31 == 0 ) && ( General_FieldEntrance != 3 ) ) {
  3722. WindowSync( 6, 128, 222 ) // "Mene ─Così mi piaci, giovanotto! Sapevo che ti sarebbe piaciuto andare in giro con Choco, kupò!"
  3723. if ( ( World_CurrentTransport >= 1 ) && ( World_CurrentTransport <= 6 ) ) {
  3724. RunScriptSync( 6, 4, 50 ) // Chocobo
  3725. }
  3726. set VAR_LocInt8_31 = 1
  3727. }
  3728. if ( VARL_GenBool_1069 == 0 ) {
  3729. if ( VARL_GenBool_1080 == 0 ) {
  3730. WindowSync( 6, 128, 205 ) // "Mene ─Quando un chocobo si sceglie un fantino, lo segue ovunque, kupò!"
  3731. WindowSync( 6, 128, 206 ) // "Mene ─Ma a Choco non piacque il suo primo fantino e scappò via, kupò!"
  3732. WindowSync( 6, 128, 208 ) // "Mene ─Io l’aiutai a fuggire e poi venimmo a nasconderci quatti, quatti in questo bosco, kupò!"
  3733. } else {
  3734. if ( VARL_GenBool_1071 == 0 ) {
  3735. WindowSync( 6, 128, 207 ) // "Mene ─Quando un chocobo sceglie un fantino, lo segue proprio ovunque! Eppure a Choco non piacque il suo primo fantino e scappò via, kupò!"
  3736. WindowSync( 6, 128, 208 ) // "Mene ─Io l’aiutai a fuggire e poi venimmo a nasconderci quatti, quatti in questo bosco, kupò!"
  3737. } else {
  3738. if ( VARL_GenBool_1070 == 0 ) {
  3739. WindowSync( 6, 128, 209 ) // "Mene ─Aiutai Choco a fuggire dal suo primo fantino e venimmo qui nel bosco a nasconderci, kupò!"
  3740. }
  3741. }
  3742. }
  3743. WindowSync( 6, 128, 261 ) // "Ma venendo al nocciolo..."
  3744. WindowSync( 6, 128, 262 ) // "Mene ─Choco ha una capacità paranormale di scovare i tesori nascosti sotto terra."
  3745. WindowSync( 6, 128, 263 ) // "Mene ─Siccome io non posso salire su Choco, ci salirai tu per me, kupò!"
  3746. set VARL_GenBool_1069 = 1
  3747. }
  3748. if ( VARL_GenBool_1068 == 0 ) {
  3749. SetTextVariable( 1, 60 ) // Ramo salvifico
  3750. WindowSync( 6, 128, 264 ) // "Mene ─Dunque, mi dai 0 guil a chocobeccata e i tesori che trovi son tutti tuoi!"
  3751. SetTextVariable( 1, 60 ) // Ramo salvifico
  3752. WindowSync( 6, 128, 265 ) // "Mene ─Paghi 0 guil, kupò? Sì No"
  3753. if ( GetDialogChoice == 0 ) {
  3754. if ( GetGil >= 60 ) {
  3755. RemoveGil( 60 )
  3756. set VARL_GenBool_1068 = 1
  3757. Wait( 4 )
  3758. RunSoundCode3( 53248, 1045, 0, -128, 125 ) // Play Sound ; [Unknown Audio]
  3759. Wait( 4 )
  3760. WindowSync( 6, 128, 266 ) // "Mene ─Saggia decisione, kupò!"
  3761. } else {
  3762. SetTextVariable( 1, 60 ) // Ramo salvifico
  3763. WindowSync( 6, 128, 267 ) // "Mene ─Non hai neppure 0 guil?! Ma non importa, ormai sei un mio socio, perciò..."
  3764. if ( ( World_CurrentTransport >= 1 ) && ( World_CurrentTransport <= 6 ) ) {
  3765. RunScriptSync( 6, 4, 50 ) // Chocobo
  3766. }
  3767. WindowSync( 6, 128, 268 ) // "Mene ─... te lo regalo, kupò!"
  3768. }
  3769. SetTextVariable( 0, 251 ) // Erba ghisal
  3770. if ( ( World_CurrentTransport >= 1 ) && ( World_CurrentTransport <= 6 ) ) {
  3771. WindowSync( 6, 128, 270 ) // "Mene ─Ti metto a disposizione Choco per 1 minuto a 0 guil! Accetto Magari dopo"
  3772. } else {
  3773. WindowSync( 6, 128, 271 ) // "Mene ─Se lo porti qui, ti faccio provare i fenomenali poteri di Choco. Vai a chiamarlo dalle impronte con l’Item!"
  3774. return
  3775. }
  3776. } else {
  3777. WindowSync( 6, 128, 269 ) // "Mene ─Va bene. Non ti forzo, kupò. Comunque, io lo dicevo per te."
  3778. return
  3779. }
  3780. } else {
  3781. if ( ( World_CurrentTransport >= 1 ) && ( World_CurrentTransport <= 6 ) ) {
  3782. WindowSync( 6, 128, 270 ) // "Mene ─Ti metto a disposizione Choco per 1 minuto a 0 guil! Accetto Magari dopo"
  3783. } else {
  3784. WindowSync( 6, 128, 271 ) // "Mene ─Se lo porti qui, ti faccio provare i fenomenali poteri di Choco. Vai a chiamarlo dalle impronte con l’Item!"
  3785. return
  3786. }
  3787. }
  3788. if ( GetDialogChoice == 0 ) {
  3789. WindowSync( 6, 128, 272 ) // "Mene ─Bene! Al lavoro, kupò!"
  3790. set Field_MusicVolume = 0
  3791. RunSoundCode2( 34305, 0, 30, Field_MusicVolume ) // All Musics Volume Intpl ; Battle
  3792. set VAR_GlobBool_167 = 0
  3793. if ( 1 ) {
  3794. set VAR_GlobBool_167 = 1
  3795. }
  3796. set VAR_GlobBool_158 = 0
  3797. if ( VAR_GlobBool_159 == 1 ) {
  3798. DisableMove( )
  3799. if ( VAR_GlobBool_144 == 0 ) {
  3800. DisableMenu( )
  3801. } else {
  3802. Wait( 1 )
  3803. }
  3804. }
  3805. SetTriangleFlagMask( 127 )
  3806. PreloadField( 5, 2950 ) // Chocobosco
  3807. set VAR_GlobInt16_21 = 2950
  3808. if ( VAR_GlobUInt8_17 == 255 ) {
  3809. set Op66(( GetData_12 - 160 ), ( GetData_13 - 112 ))
  3810. }
  3811. 0xA9( 250 ) // Player Character
  3812. FadeFilter( 6, 24, VAR_GlobUInt8_17, 255, 255, 255 )
  3813. Wait( 25 )
  3814. if ( VAR_GlobBool_167 == 1 ) {
  3815. RunSoundCode( 265, 65535 ) // Stop Current Music ; [Unknown Audio]
  3816. set VAR_GlobBool_167 = 0
  3817. }
  3818. if ( VAR_GlobBool_162 == 0 ) {
  3819. }
  3820. if ( VAR_GlobBool_163 == 0 ) {
  3821. }
  3822. set General_FieldEntrance = 2
  3823. Field( 2950 ) // Chocobosco
  3824. } else {
  3825. WindowSync( 6, 128, 269 ) // "Mene ─Va bene. Non ti forzo, kupò. Comunque, io lo dicevo per te."
  3826. }
  3827. return
  3828.  
  3829.  
  3830. #HW newfunction 37
  3831. Function Moogle_Male_37
  3832. set VAR_GlobInt16_4 = ( VAR_LocUInt16_5 = 0 )
  3833. set VAR_GlobInt16_0 = ( VAR_LocUInt16_7 = ( VAR_GlobInt16_4 * 80 ) )
  3834. set VAR_GlobInt16_6 = 1
  3835. if ( GetGil > 8000 ) {
  3836. set VAR_LocInt16_25 = 100
  3837. } else {
  3838. set VAR_LocInt16_25 = ( GetGil / 80 )
  3839. }
  3840. if ( VAR_LocInt16_25 > ( 99 - GetItemCount(251) ) ) { // Erba ghisal
  3841. set VAR_LocInt16_25 = ( 99 - GetItemCount(251) ) // Erba ghisal
  3842. }
  3843. SetTextVariable( 0, 80 ) // Agoforchetta
  3844. SetTextVariable( 5, GetItemCount(251) ) // Erba ghisal
  3845. RunScript( 4, 25, 37 ) // Entry25
  3846. set VAR_GlobInt16_4 = 0
  3847. set VAR_LocInt8_27 = 0
  3848. set VAR_LocInt8_28 = 0
  3849. SetTextVariable( 7, VAR_GlobInt16_4 % 10 )
  3850. SetTextVariable( 6, ( VAR_GlobInt16_4 / 10 ) % 10 )
  3851. WindowAsync( 7, 0, 251 ) // "1 unità costa 0 guil! (Unità possedute: 0) Unità: 00 [BTN][IMG][BTN][IMG]: aumenta/diminuisci [BTN][IMG][BTN][IMG]: decine/unità [BTN][IMG]: conferma [BTN][IMG]: annulla"
  3852. WindowAsync( 5, 16, 253 ) // "0"
  3853. Wait( 3 )
  3854. while ( !IsButton(720896L) ) { // Cancel|Confirm|Moogle
  3855. if ( IsButtonDown(32) && ( VAR_LocInt8_27 == 1 ) ) { // Right
  3856. CloseWindow( 6 )
  3857. WindowAsync( 5, 16, 253 ) // "0"
  3858. set VAR_LocInt8_27 = 0
  3859. } else {
  3860. if ( IsButtonDown(128) && ( VAR_LocInt8_27 == 0 ) ) { // Left
  3861. CloseWindow( 5 )
  3862. WindowAsync( 6, 16, 252 ) // "0"
  3863. set VAR_LocInt8_27 = 1
  3864. }
  3865. }
  3866. if ( IsButtonDown(16) ) { // Up
  3867. set VAR_LocInt8_28++
  3868. } else {
  3869. if ( IsButtonDown(64) ) { // Down
  3870. set VAR_LocInt8_28--
  3871. } else {
  3872. set VAR_LocInt8_28 = 0
  3873. }
  3874. }
  3875. if ( IsButton(64) || ( VAR_LocInt8_28 == 65528 ) ) { // Down
  3876. if ( VAR_LocInt8_27 == 0 ) {
  3877. if ( VAR_GlobInt16_4 > 0 ) {
  3878. set VAR_GlobInt16_4--
  3879. }
  3880. } else {
  3881. if ( VAR_GlobInt16_4 > 9 ) {
  3882. set VAR_GlobInt16_4 -= 10
  3883. }
  3884. }
  3885. set VAR_LocInt8_28 += 2
  3886. } else {
  3887. if ( IsButton(16) || ( VAR_LocInt8_28 == 8 ) ) { // Up
  3888. if ( VAR_LocInt8_27 == 0 ) {
  3889. if ( VAR_GlobInt16_4 < VAR_LocInt16_25 ) {
  3890. set VAR_GlobInt16_4++
  3891. }
  3892. } else {
  3893. if ( VAR_GlobInt16_4 < ( VAR_LocInt16_25 - 9 ) ) {
  3894. set VAR_GlobInt16_4 += 10
  3895. }
  3896. }
  3897. set VAR_LocInt8_28 -= 2
  3898. }
  3899. }
  3900. SetTextVariable( 7, VAR_GlobInt16_4 % 10 )
  3901. SetTextVariable( 6, ( VAR_GlobInt16_4 / 10 ) % 10 )
  3902. Wait( 1 )
  3903. }
  3904. CloseWindow( 5 )
  3905. CloseWindow( 6 )
  3906. CloseWindow( 7 )
  3907. if ( IsButton(65536L) ) { // Cancel
  3908. set VAR_GlobInt16_4 = 0
  3909. }
  3910. set VAR_GlobInt16_6 = 0
  3911. if ( VAR_GlobInt16_4 != 0 ) {
  3912. Wait( 8 )
  3913. RunSoundCode3( 53248, 1045, 0, -128, 125 ) // Play Sound ; [Unknown Audio]
  3914. RemoveGil( VAR_GlobInt16_4 * 80 )
  3915. AddItem( 251, VAR_GlobInt16_4 ) // Erba ghisal
  3916. }
  3917. return
  3918.  
  3919.  
  3920. #HW newfunction 38
  3921. Function Moogle_Male_38
  3922. SetTextVariable( 0, 80 ) // Agoforchetta
  3923. WindowSync( 6, 128, 247 ) // "Mene ─Devi pagarmi in guil! Sono 0 guil a pezzo!"
  3924. return
  3925.  
  3926.  
  3927. #HW newfunction 62
  3928. Function Moogle_Male_62
  3929. WindowSync( 6, 128, 249 ) // "Mene ─Ok, te ne regalo 1, kupò!"
  3930. AddItem( 251, 1 ) // Erba ghisal
  3931. return
  3932.  
  3933.  
  3934. #HW newfunction 61
  3935. Function Moogle_Male_61
  3936. WindowSync( 6, 128, 250 ) // "Mene ─Ne hai già abbastanza, kupò!"
  3937. return
  3938.  
  3939.  
  3940. #HW newfunction 42
  3941. Function Moogle_Male_42
  3942. set VAR_GlobInt8_34 = 0
  3943. SetObjectFlags( 7 )
  3944. RunSoundCode3( 53248, 682, 0, -128, 125 ) // Play Sound ; [Unknown Audio]
  3945. WindowSync( 7, 128, 311 ) // "Mene ─Eccezionale!"
  3946. SetWalkSpeed( 68 )
  3947. RunScript( 4, 4, 26 ) // Chocobo
  3948. DisableShadow( )
  3949. if ( GetEntryPosY(250) > GetEntryPosY(255) ) {
  3950. InitWalk( )
  3951. WalkXZY( GetEntryPosX(4), GetEntryPosZ(4), GetEntryPosY(4) - 320 )
  3952. } else {
  3953. InitWalk( )
  3954. WalkXZY( GetEntryPosX(4), GetEntryPosZ(4), GetEntryPosY(4) + 320 )
  3955. }
  3956. TurnTowardObject( 4, 32 ) // Chocobo
  3957. WaitTurn( )
  3958. SetTextVariable( 7, 4 ) // Gladius
  3959. WindowSync( 7, 128, 312 ) // "Mene ─Trovati 0 tesori, avrai un bonus, kupò!"
  3960. WindowSync( 7, 128, 313 ) // "Mene ─Dal prossimo tesoro, ti do il doppio dei punti per ogni oggetto che troverai, kupò!"
  3961. SetTextVariable( 2, 10 ) // Zanna runica
  3962. WindowSync( 7, 128, 314 ) // "Mene ─Hai 0 secondi extra, kupò!"
  3963. ChangeTimerTime( GetTimerTime + 10 )
  3964. set Chocobo_LastTreasureTime += 10
  3965. SetObjectFlags( 7 )
  3966. return
  3967.  
  3968.  
  3969. #HW newfunction 43
  3970. Function Moogle_Male_43
  3971. set VAR_GlobUInt8_73 = Angle(65174, 60756)
  3972. set VAR_GlobUInt8_72 = 8
  3973. RunSharedScript( 6 ) // Entry6
  3974. WaitSharedScript( )
  3975. InitWalk( )
  3976. WalkXZY( -362, 174, -4780 )
  3977. EnableShadow( )
  3978. set VAR_GlobInt8_34 = 1
  3979. return
  3980.  
  3981.  
  3982. #HW newfunction 14
  3983. Function Moogle_Male_14
  3984. set VAR_GlobInt8_33 = 1
  3985. set VAR_GlobInt8_32 = 0
  3986. SetCameraBounds( 0, 0, 320, 0, 400 )
  3987. Wait( 1 )
  3988. SetObjectFlags( 14 )
  3989. set VAR_GlobInt16_0 = 65174
  3990. set VAR_GlobInt16_4 = 60756
  3991. set VAR_GlobInt16_6 = 128
  3992. set VAR_GlobInt16_2 = 182
  3993. MoveInstantXZY( VAR_GlobInt16_0, VAR_GlobInt16_2, VAR_GlobInt16_4 )
  3994. TurnInstant( VAR_GlobInt16_6 )
  3995. RunScript( 4, 4, 51 ) // Chocobo
  3996. switch 4 ( Chocobo_ChocoColor ) from 2 {
  3997. case +0:
  3998. RunScriptSync( 0, 15, 12 ) // Entry15
  3999. break
  4000. case +1:
  4001. RunScriptSync( 0, 16, 12 ) // Entry16
  4002. break
  4003. case +2:
  4004. RunScriptSync( 0, 17, 12 ) // Entry17
  4005. break
  4006. case +3:
  4007. RunScriptSync( 0, 18, 12 ) // Entry18
  4008. break
  4009. }
  4010. RunScriptSync( 2, 25, 29 ) // Entry25
  4011. SetObjectFlags( 5 )
  4012. EnablePathTriangle( 76, 0 )
  4013. EnablePathTriangle( 163, 0 )
  4014. EnablePathTriangle( 164, 0 )
  4015. EnablePathTriangle( 118, 0 )
  4016. EnablePathTriangle( 119, 0 )
  4017. EnablePathTriangle( 165, 0 )
  4018. RunScript( 6, 0, 21 ) // Main
  4019. SetStandAnimation( 2913 ) // Fly
  4020. SetWalkAnimation( 2913 ) // Fly
  4021. SetRunAnimation( 2913 ) // Fly
  4022. SetRightAnimation( 2913 ) // Fly
  4023. SetLeftAnimation( 2913 ) // Fly
  4024. set VAR_GlobInt8_35 = 0
  4025. while ( VAR_GlobInt8_35 != 99 ) {
  4026. if ( VAR_GlobInt8_35 <= 1 ) {
  4027. WindowAsync( 1, 0, 34 ) // "─BECCA QUI, CHOCOBO!─ [BTN][IMG]: cammina [BTN][IMG]: becca Premendo [BTN][IMG], Choco becca per terra e quando avverte la presenza di un tesoro nascosto, kuisce per avvertirci. Capisce addirittura a quale profondità si trova! Poi comincia a beccare... beccare... ---------------------------------- [BTN][IMG]: comincia [BTN][IMG]: pag. seguente "
  4028. set VAR_GlobInt8_35 = 1
  4029. } else {
  4030. WindowAsync( 1, 0, 35 ) // "─CHOCO KUISCE!─ ≪KUÉ!≫ è acqua... ≪KUÉH!≫ è fuochino... ≪KUÉÉH??!≫ è fuocherello... ≪K-KUÉÉH!!≫ è fuoco, kupò! Le cose preziose sono sempre in fondo! Quando le trovi, becca con [BTN][IMG] fin quando la profondità diventa 0, kupò! ---------------------------------- [BTN][IMG]: comincia [BTN][IMG]: pag. precedente "
  4031. set VAR_GlobInt8_35 = 0
  4032. }
  4033. RaiseWindows( )
  4034. Wait( 4 )
  4035. while ( VAR_GlobInt8_35 <= 1 ) {
  4036. if ( IsButton(524288L) ) { // Moogle
  4037. set VAR_GlobInt8_35 = 99
  4038. }
  4039. if ( IsButton(131072L) ) { // Confirm
  4040. if ( VAR_GlobInt8_35 == 0 ) {
  4041. set VAR_GlobInt8_35 = 1
  4042. break
  4043. } else {
  4044. set VAR_GlobInt8_35 = 2
  4045. break
  4046. }
  4047. }
  4048. if ( IsButton(1) ) { // Select
  4049. set VAR_GlobInt8_35 = 99
  4050. }
  4051. Wait( 1 )
  4052. }
  4053. }
  4054. CloseWindow( 1 )
  4055. set VARL_GenBool_1087 = 1
  4056. if ( VAR_GlobUInt8_17 == 255 ) {
  4057. set Op66(( GetData_12 - 160 ), ( GetData_13 - 112 ))
  4058. }
  4059. 0xA9( 250 ) // Player Character
  4060. FadeFilter( 7, 12, VAR_GlobUInt8_17, 0, 0, 0 )
  4061. Wait( 16 )
  4062. set VAR_GlobInt8_34 = 1
  4063. RunScriptSync( 6, 0, 22 ) // Main
  4064. RunScript( 6, 0, 23 ) // Main
  4065. RunScript( 6, 25, 36 ) // Entry25
  4066. set VAR_GlobBool_158 = 1
  4067. if ( VAR_GlobBool_159 == 1 ) {
  4068. if ( VAR_GlobBool_156 == 0 ) {
  4069. EnableMove( )
  4070. SetTriangleFlagMask( 255 )
  4071. DisableMenu( )
  4072. }
  4073. }
  4074. ShowHereIcon( 2 )
  4075. return
  4076.  
  4077.  
  4078. #HW newfunction 64
  4079. Function Moogle_Male_64
  4080. switch 3 ( Chocobo_CurrentField ) from 1 {
  4081. case +0:
  4082. SetTextVariable( 2, Chocobo_ForestHighScore )
  4083. SetTextVariable( 3, Chocobo_ForestGamePlayed )
  4084. break
  4085. case +1:
  4086. SetTextVariable( 2, Chocobo_LagoonHighScore )
  4087. SetTextVariable( 3, Chocobo_LagoonGamePlayed )
  4088. break
  4089. case +2:
  4090. SetTextVariable( 2, Chocobo_GardenHighScore )
  4091. SetTextVariable( 3, Chocobo_GardenGamePlayed )
  4092. }
  4093. SetTextVariable( 5, ( Chocobo_ForestGamePlayed + Chocobo_LagoonGamePlayed ) + Chocobo_GardenGamePlayed )
  4094. SetTextVariable( 4, Chocobo_HotColdPoints )
  4095. if ( Chocobo_Lv99 == 0 ) {
  4096. WindowSync( 7, 128, 240 ) // "Mene ─Record (bosco) 0 Partite bosco/totale 0/0 Punti attuali 0 Permuto i punti Lascio stare"
  4097. } else {
  4098. WindowSync( 7, 128, 243 ) // "Mene ─Record (bosco) 0 Partite bosco/totale 0/0 Punti attuali ★ 0 Permuto i punti Lascio stare"
  4099. }
  4100. if ( GetDialogChoice == 0 ) {
  4101. set VAR_LocUInt16_9 = 0
  4102. set VAR_LocUInt8_2 = 8
  4103. EnableDialogChoices( 511, VAR_LocUInt8_2 )
  4104. WindowAsync( 6, 4, 246 ) // "Mene ─Quale scegli, kupò? Punti attuali: 0 Toga lord10000 Vera Ryoma 8500 Wing Edge 3500 Carta Wildgans 1800 Etere 450 Gemma grezza 250 Piuma di fenice 150 Erba ghisal 10 Annulla"
  4105. while ( VAR_LocUInt16_9 < 1 ) {
  4106. set VAR_LocInt8_29 = 1
  4107. EnableDialogChoices( 511, VAR_LocUInt8_2 )
  4108. SetTextVariable( 4, Chocobo_HotColdPoints )
  4109. set VAR_LocInt8_30 = 0
  4110. while ( VAR_LocInt8_30 < 1 ) {
  4111. if ( IsButton(655360L) ) { // Confirm|Moogle
  4112. set VAR_LocInt8_30 = 1
  4113. }
  4114. Wait( 1 )
  4115. }
  4116. switch 9 ( GetDialogChoice ) from 0 {
  4117. case +0:
  4118. if ( ( Chocobo_HotColdPoints >= 10000 ) && ( GetItemCount(175) < 99 ) ) { // Toga lord
  4119. set Chocobo_HotColdPoints -= 10000
  4120. AddItem( 175, 1 ) // Toga lord
  4121. set VAR_LocInt8_29 = 0
  4122. }
  4123. set VAR_LocUInt8_2 = 0
  4124. break
  4125. case +1:
  4126. if ( ( Chocobo_HotColdPoints >= 8500 ) && ( GetItemCount(209) < 99 ) ) { // Vera Ryoma
  4127. set Chocobo_HotColdPoints -= 8500
  4128. AddItem( 209, 1 ) // Vera Ryoma
  4129. set VAR_LocInt8_29 = 0
  4130. }
  4131. set VAR_LocUInt8_2 = 1
  4132. break
  4133. case +2:
  4134. if ( ( Chocobo_HotColdPoints >= 3500 ) && ( GetItemCount(87) < 99 ) ) { // Wing Edge
  4135. set Chocobo_HotColdPoints -= 3500
  4136. AddItem( 87, 1 ) // Wing Edge
  4137. set VAR_LocInt8_29 = 0
  4138. }
  4139. set VAR_LocUInt8_2 = 2
  4140. break
  4141. case +3:
  4142. if ( ( Chocobo_HotColdPoints >= 1800 ) && ( GetCardAmount < 100 ) ) {
  4143. set Chocobo_HotColdPoints -= 1800
  4144. AddItem( 599, 1 )
  4145. set VAR_LocInt8_29 = 0
  4146. }
  4147. set VAR_LocUInt8_2 = 3
  4148. break
  4149. case +4:
  4150. if ( ( Chocobo_HotColdPoints >= 450 ) && ( GetItemCount(238) < 99 ) ) { // Etere
  4151. set Chocobo_HotColdPoints -= 450
  4152. AddItem( 238, 1 ) // Etere
  4153. set VAR_LocInt8_29 = 0
  4154. }
  4155. set VAR_LocUInt8_2 = 4
  4156. break
  4157. case +5:
  4158. if ( ( Chocobo_HotColdPoints >= 250 ) && ( GetItemCount(254) < 99 ) ) { // Gemma grezza
  4159. set Chocobo_HotColdPoints -= 250
  4160. AddItem( 254, 1 ) // Gemma grezza
  4161. set VAR_LocInt8_29 = 0
  4162. }
  4163. set VAR_LocUInt8_2 = 5
  4164. break
  4165. case +6:
  4166. if ( ( Chocobo_HotColdPoints >= 150 ) && ( GetItemCount(249) < 99 ) ) { // Piuma di fenice
  4167. set Chocobo_HotColdPoints -= 150
  4168. AddItem( 249, 1 ) // Piuma di fenice
  4169. set VAR_LocInt8_29 = 0
  4170. }
  4171. set VAR_LocUInt8_2 = 6
  4172. break
  4173. case +7:
  4174. if ( ( Chocobo_HotColdPoints >= 10 ) && ( GetItemCount(251) < 99 ) ) { // Erba ghisal
  4175. set Chocobo_HotColdPoints -= 10
  4176. AddItem( 251, 1 ) // Erba ghisal
  4177. set VAR_LocInt8_29 = 0
  4178. }
  4179. set VAR_LocUInt8_2 = 7
  4180. break
  4181. default:
  4182. set VAR_LocUInt16_9 = 99
  4183. set VAR_LocInt8_29 = 99
  4184. CloseWindow( 7 )
  4185. break
  4186. }
  4187. switch 2 ( VAR_LocInt8_29 ) from 0 {
  4188. case +0:
  4189. Wait( 4 )
  4190. RunSoundCode3( 53248, 108, 0, -128, 125 ) // Play Sound ; South Gate
  4191. Wait( 4 )
  4192. break
  4193. case +1:
  4194. Wait( 4 )
  4195. RunSoundCode3( 53248, 102, 0, -128, 125 ) // Play Sound ; [Unknown Audio]
  4196. Wait( 4 )
  4197. break
  4198. }
  4199. }
  4200. RunSoundCode3( 53248, 103, 0, -128, 125 ) // Play Sound ; Ipsen's Castle
  4201. }
  4202. return
  4203.  
  4204.  
  4205. #HW newfunction 65
  4206. Function Moogle_Male_65
  4207. WindowSync( 6, 128, 338 ) // "Mene ─Non puoi farlo senza Choco, kupò!"
  4208. SetTextVariable( 0, 251 ) // Erba ghisal
  4209. WindowSync( 6, 128, 339 ) // "Mene ─Se non lo trovi nei paraggi, chiamalo con l’Item, kupò!"
  4210. return
  4211.  
  4212.  
  4213. #HW newfunction 63
  4214. Function Moogle_Male_63
  4215. WindowSync( 6, 128, 273 ) // "Mene ─Kupòòòòò!! Ho un servizio speciale per te!"
  4216. WindowSync( 6, 128, 274 ) // "Mene ─Ogni volta che trovi un tesoro, ti regalerò dei punti. Accumulane tanti che poi, potrai permutarli!!"
  4217. set VARL_GenBool_1416 = 1
  4218. return
  4219.  
  4220.  
  4221. #HW newfunction 17
  4222. Function Moogle_Male_17
  4223. set VAR_GlobUInt8_73 = Op60(ObjectUID_25)
  4224. set VAR_GlobUInt8_72 = 8
  4225. RunSharedScript( 6 ) // Entry6
  4226. return
  4227.  
  4228.  
  4229. #HW newfunction 19
  4230. Function Moogle_Male_19
  4231. SetObjectFlags( 7 )
  4232. RunAnimation( 4983 ) // To_Fly
  4233. WaitAnimation( )
  4234. SetStandAnimation( 2913 ) // Fly
  4235. SetWalkAnimation( 2913 ) // Fly
  4236. SetRunAnimation( 2913 ) // Fly
  4237. SetRightAnimation( 2913 ) // Fly
  4238. SetLeftAnimation( 2913 ) // Fly
  4239. SetWalkSpeed( 45 )
  4240. SetPathing( 0 )
  4241. switch 2 ( Chocobo_CurrentField ) from 1 {
  4242. case +0:
  4243. set VAR_GlobUInt8_73 = Angle(262, 60084)
  4244. set VAR_GlobUInt8_72 = 8
  4245. RunSharedScript( 6 ) // Entry6
  4246. WaitSharedScript( )
  4247. InitWalk( )
  4248. MakeAnimationLoop( 60 )
  4249. Walk( 262, -5452 )
  4250. break
  4251. case +1:
  4252. set VAR_GlobUInt8_73 = Angle(2538, 64677)
  4253. set VAR_GlobUInt8_72 = 8
  4254. RunSharedScript( 6 ) // Entry6
  4255. WaitSharedScript( )
  4256. InitWalk( )
  4257. MakeAnimationLoop( 60 )
  4258. Walk( 2538, -859 )
  4259. break
  4260. }
  4261. return
  4262.  
  4263.  
  4264. #HW newfunction 15
  4265. Function Moogle_Male_15
  4266. MoveInstantXZY( 188, -1145, -6278 )
  4267. return
  4268.  
  4269.  
  4270. #HW newfunction 16
  4271. Function Moogle_Male_16
  4272. SetStandAnimation( 2913 ) // Fly
  4273. SetWalkAnimation( 2913 ) // Fly
  4274. SetRunAnimation( 2913 ) // Fly
  4275. SetRightAnimation( 2913 ) // Fly
  4276. SetLeftAnimation( 2913 ) // Fly
  4277. InitWalk( )
  4278. Walk( 188, -5558 )
  4279. return
  4280.  
  4281.  
  4282. #HW newfunction 18
  4283. Function Moogle_Male_18
  4284. switch 2 ( Chocobo_CurrentField ) from 1 {
  4285. case +0:
  4286. set VAR_GlobUInt8_73 = Angle(1058, 60188)
  4287. set VAR_GlobUInt8_72 = 8
  4288. RunSharedScript( 6 ) // Entry6
  4289. WaitSharedScript( )
  4290. InitWalk( )
  4291. MakeAnimationLoop( 60 )
  4292. Walk( 1058, -5348 )
  4293. break
  4294. case +1:
  4295. set VAR_GlobUInt8_73 = Angle(2512, 65222)
  4296. set VAR_GlobUInt8_72 = 8
  4297. RunSharedScript( 6 ) // Entry6
  4298. WaitSharedScript( )
  4299. InitWalk( )
  4300. MakeAnimationLoop( 60 )
  4301. Walk( 2512, -314 )
  4302. break
  4303. }
  4304. RunAnimation( 4985 ) // From_Fly
  4305. WaitAnimation( )
  4306. SetStandAnimation( 2904 ) // Idle
  4307. SetWalkAnimation( 2927 ) // Walk
  4308. SetRunAnimation( 2907 ) // Run
  4309. SetRightAnimation( 2923 ) // Turn_L
  4310. SetLeftAnimation( 2911 ) // Turn_R
  4311. SetObjectFlags( 5 )
  4312. return
  4313.  
  4314.  
  4315. #HW newfunction 57
  4316. Function Moogle_Male_57
  4317. RunSoundCode3( 53248, 682, 0, -128, 125 ) // Play Sound ; [Unknown Audio]
  4318. WindowSync( 6, 128, 258 ) // "Mene ─Ne hai trovati tantissimi! Accidenti! Sei un fenomeno!"
  4319. SetWalkSpeed( 68 )
  4320. SetObjectFlags( 7 )
  4321. DisableShadow( )
  4322. if ( GetEntryPosY(250) > GetEntryPosY(255) ) {
  4323. InitWalk( )
  4324. WalkXZY( GetEntryPosX(4), GetEntryPosZ(4), GetEntryPosY(4) - 320 )
  4325. } else {
  4326. InitWalk( )
  4327. WalkXZY( GetEntryPosX(4), GetEntryPosZ(4), GetEntryPosY(4) + 320 )
  4328. }
  4329. RunScript( 4, 4, 26 ) // Chocobo
  4330. TurnTowardObject( 4, 32 ) // Chocobo
  4331. WaitTurn( )
  4332. WindowSync( 6, 128, 259 ) // "Mene ─Però se li trovi tutti tu, la mia attività va a rotoli! Io ho una famiglia da mantenere!"
  4333. WindowSync( 6, 128, 260 ) // "Mene ─Ti do un bonus speciale e poi basta per oggi, kupò!"
  4334. set VAR_GlobUInt8_44 = GetTimerTime
  4335. set VAR_GlobUInt8_44++
  4336. Wait( 2 )
  4337. ChangeTimerTime( 0 )
  4338. return
  4339.  
  4340.  
  4341. #HW newentry 10
  4342. #HW newfunction 0
  4343. Function Entry10_Init
  4344. InitWalk( )
  4345. Walk( -362, -4780 )
  4346. TerminateEntry( 255 ) // This
  4347. return
  4348.  
  4349.  
  4350. #HW newentry 11
  4351. #HW locals
  4352. allocate 15
  4353. #HW endlocals
  4354.  
  4355. #HW newfunction 0
  4356. Function Barrel_Init
  4357. set VAR_GlobInt16_0 = 1102
  4358. set VAR_GlobInt16_4 = 59749
  4359. set VAR_GlobInt16_6 = 29
  4360. set VAR_GlobInt16_2 = 64403
  4361. SetModel( 241, 93 ) // Barrel
  4362. CreateObject( VAR_GlobInt16_0, VAR_GlobInt16_4 )
  4363. TurnInstant( VAR_GlobInt16_6 )
  4364. SetStandAnimation( 1904 ) // Dummy B
  4365. MoveInstantXZY( VAR_GlobInt16_0, VAR_GlobInt16_2, VAR_GlobInt16_4 )
  4366. switch 1 ( General_FieldEntrance ) from 2 {
  4367. case +0:
  4368. SetObjectFlags( 14 )
  4369. SetJumpAnimation( 1903, 0, 0 ) // Dummy B
  4370. break
  4371. }
  4372. switch 3 ( Chocobo_CurrentField ) from 1 {
  4373. case +0:
  4374. set VAR_LocUInt8_11 = 0
  4375. break
  4376. case +1:
  4377. set VAR_LocUInt8_11 = 5
  4378. break
  4379. case +2:
  4380. set VAR_LocUInt8_11 = 10
  4381. break
  4382. }
  4383. return
  4384.  
  4385.  
  4386. #HW newfunction 1
  4387. Function Barrel_Loop
  4388. return
  4389.  
  4390.  
  4391. #HW newfunction 56
  4392. Function Barrel_56
  4393. MoveInstantXZY( GetEntryPosX(4), GetEntryPosZ(4) - 200, GetEntryPosY(4) )
  4394. switch 9 ( VAR_GlobInt8_37 ) from 1 {
  4395. case +0:
  4396. set VAR_LocInt16_6 = 0
  4397. break
  4398. case +1:
  4399. set VAR_LocInt16_6 = 0
  4400. break
  4401. case +2:
  4402. set VAR_LocInt16_6 = 0
  4403. break
  4404. case +3:
  4405. set VAR_LocInt16_6 = 0
  4406. break
  4407. case +4:
  4408. set VAR_LocInt16_6 = 0
  4409. break
  4410. case +5:
  4411. set VAR_LocInt16_6 = 0
  4412. break
  4413. case +6:
  4414. set VAR_LocInt16_6 = 0
  4415. break
  4416. case +7:
  4417. set VAR_LocInt16_6 = 0
  4418. break
  4419. case +8:
  4420. set VAR_LocInt16_6 = 0
  4421. break
  4422. }
  4423. switch 15 ( VAR_GlobUInt8_53 + VAR_LocUInt8_11 ) from 1 {
  4424. case +0:
  4425. set VAR_LocInt16_0 = 10
  4426. set VAR_LocInt16_2 = 20
  4427. set VAR_LocUInt8_14 = 1
  4428. break
  4429. case +1:
  4430. set VAR_LocInt16_0 = 21
  4431. set VAR_LocInt16_2 = 40
  4432. set VAR_LocUInt8_14 = 1
  4433. break
  4434. case +2:
  4435. set VAR_LocInt16_0 = 41
  4436. set VAR_LocInt16_2 = 60
  4437. set VAR_LocUInt8_14 = 1
  4438. break
  4439. case +3:
  4440. set VAR_LocInt16_0 = 61
  4441. set VAR_LocInt16_2 = 80
  4442. set VAR_LocUInt8_14 = 1
  4443. break
  4444. case +4:
  4445. set VAR_LocInt16_0 = 81
  4446. set VAR_LocInt16_2 = 100
  4447. set VAR_LocUInt8_14 = 1
  4448. break
  4449. case +5:
  4450. set VAR_LocInt16_0 = 121
  4451. set VAR_LocInt16_2 = 131
  4452. set VAR_LocUInt8_14 = 2
  4453. break
  4454. case +6:
  4455. set VAR_LocInt16_0 = 132
  4456. set VAR_LocInt16_2 = 152
  4457. set VAR_LocUInt8_14 = 2
  4458. break
  4459. case +7:
  4460. set VAR_LocInt16_0 = 153
  4461. set VAR_LocInt16_2 = 173
  4462. set VAR_LocUInt8_14 = 2
  4463. break
  4464. case +8:
  4465. set VAR_LocInt16_0 = 174
  4466. set VAR_LocInt16_2 = 194
  4467. set VAR_LocUInt8_14 = 2
  4468. break
  4469. case +9:
  4470. set VAR_LocInt16_0 = 195
  4471. set VAR_LocInt16_2 = 215
  4472. set VAR_LocUInt8_14 = 2
  4473. break
  4474. case +10:
  4475. set VAR_LocInt16_0 = 201
  4476. set VAR_LocInt16_2 = 221
  4477. set VAR_LocUInt8_14 = 3
  4478. break
  4479. case +11:
  4480. set VAR_LocInt16_0 = 222
  4481. set VAR_LocInt16_2 = 242
  4482. set VAR_LocUInt8_14 = 3
  4483. break
  4484. case +12:
  4485. set VAR_LocInt16_0 = 243
  4486. set VAR_LocInt16_2 = 263
  4487. set VAR_LocUInt8_14 = 3
  4488. break
  4489. case +13:
  4490. set VAR_LocInt16_0 = 264
  4491. set VAR_LocInt16_2 = 284
  4492. set VAR_LocUInt8_14 = 3
  4493. break
  4494. case +14:
  4495. set VAR_LocInt16_0 = 285
  4496. set VAR_LocInt16_2 = 305
  4497. set VAR_LocUInt8_14 = 3
  4498. break
  4499. }
  4500. set VAR_GlobUInt8_43 = VAR_LocUInt8_14
  4501. set VAR_LocInt16_4 = ( ( ( GetRandom % ( VAR_LocInt16_2 - VAR_LocInt16_0 ) ) + VAR_LocInt16_0 ) + VAR_LocInt16_6 )
  4502. set VAR_GenInt16_175 = ( VAR_LocInt16_4 / VAR_LocUInt8_14 )
  4503. set VAR_LocUInt8_10 = ( ( Chocobo_BeakLevel + 3 ) + Chocobo_ColorPeckBonus )
  4504. set VAR_LocUInt8_13 = 0
  4505. WindowAsync( 5, 0, 276 ) // "Profondità: "
  4506. SetTextVariable( 6, VAR_GenInt16_175 )
  4507. WindowAsync( 3, 16, 277 ) // "0"
  4508. while ( ( ( VAR_LocInt16_4 > 0 ) && ( VAR_GenInt16_175 > 0 ) ) && ( GetTimerTime != 0 ) ) {
  4509. set VAR_LocUInt8_13++
  4510. set VAR_LocUInt8_12 = 0
  4511. while ( VARL_GenUInt8_292 == 1 ) {
  4512. Wait( 1 )
  4513. }
  4514. while ( ( VAR_LocUInt8_12 == 0 ) && ( GetTimerTime != 0 ) ) {
  4515. if ( IsButton(524288L) ) { // Moogle
  4516. set VAR_LocUInt8_12 = 2
  4517. }
  4518. Wait( 1 )
  4519. }
  4520. if ( VAR_LocUInt8_12 == 2 ) {
  4521. RunScript( 2, 4, 49 ) // Chocobo
  4522. set VAR_LocInt16_4 -= VAR_LocUInt8_10
  4523. set VAR_LocInt16_8 = ( VAR_LocUInt8_10 / VAR_LocUInt8_14 )
  4524. SetTextVariable( 5, VAR_LocInt16_8 )
  4525. RunSharedScript( 12 ) // Entry12
  4526. WindowAsync( 4, 144, 327 ) // "0"
  4527. RunScriptSync( 4, 13, 39 ) // Code13
  4528. }
  4529. }
  4530. if ( VAR_GenInt16_175 == 0 ) {
  4531. set VAR_LocInt16_4 = 0
  4532. }
  4533. if ( VAR_LocInt16_4 > 0 ) {
  4534. set VAR_GlobUInt8_53 = 99
  4535. }
  4536. CloseWindow( 5 )
  4537. CloseWindow( 3 )
  4538. StopSharedScript( )
  4539. return
  4540.  
  4541.  
  4542. #HW newentry 12
  4543. #HW newfunction 0
  4544. Function Entry12_Init
  4545. TurnTowardPosition( GetEntryPosX(11), GetEntryPosY(11) )
  4546. WaitTurn( )
  4547. RunJumpAnimation( )
  4548. WaitAnimation( )
  4549. SetupJump( GetEntryPosX(11), GetEntryPosZ(11), GetEntryPosY(11), 8 )
  4550. Jump( )
  4551. RunLandAnimation( )
  4552. WaitAnimation( )
  4553. TerminateEntry( 255 ) // This
  4554. return
  4555.  
  4556.  
  4557. #HW newentry 13
  4558. #HW locals
  4559. allocate 8
  4560. #HW endlocals
  4561.  
  4562. #HW newfunction 0
  4563. Function Code13_Init
  4564. switch 5 ( Chocobo_ChocoColor ) from 1 {
  4565. case +0:
  4566. set VAR_LocUInt8_5 = 20
  4567. break
  4568. case +1:
  4569. set VAR_LocUInt8_5 = 15
  4570. break
  4571. case +2:
  4572. set VAR_LocUInt8_5 = 11
  4573. break
  4574. case +3:
  4575. set VAR_LocUInt8_5 = 8
  4576. break
  4577. case +4:
  4578. set VAR_LocUInt8_5 = 6
  4579. break
  4580. }
  4581. return
  4582.  
  4583.  
  4584. #HW newfunction 1
  4585. Function Code13_Loop
  4586. if ( VAR_GlobInt16_26 == 0 ) {
  4587. CloseWindow( 3 )
  4588. }
  4589. Wait( 1 )
  4590. loop
  4591.  
  4592.  
  4593. #HW newfunction 39
  4594. Function Code13_39
  4595. set VAR_LocUInt8_1 = ( ( Chocobo_BeakLevel + 3 ) + Chocobo_ColorPeckBonus )
  4596. set VAR_LocUInt8_1 = ( VAR_LocUInt8_1 / VAR_GlobUInt8_43 )
  4597. set VAR_LocUInt8_2 = ( VAR_LocUInt8_1 / ( VAR_LocUInt8_5 / 2 ) )
  4598. set VAR_LocUInt8_3 = VAR_GenInt16_175
  4599. if ( VAR_LocUInt8_2 == 0 ) {
  4600. set VAR_LocUInt8_4 = VAR_LocUInt8_1
  4601. set VAR_LocUInt8_2 = 1
  4602. } else {
  4603. set VAR_LocUInt8_4 = ( VAR_LocUInt8_5 / 2 )
  4604. }
  4605. SetTextVariable( 6, VAR_GenInt16_175 )
  4606. WindowAsync( 3, 16, 277 ) // "0"
  4607. set VAR_LocUInt8_0 = 0
  4608. while ( VAR_LocUInt8_0 < VAR_LocUInt8_4 ) {
  4609. set VAR_GenInt16_175 -= VAR_LocUInt8_2
  4610. if ( VAR_GenInt16_175 <= 0 ) {
  4611. break
  4612. }
  4613. SetTextVariable( 6, VAR_GenInt16_175 )
  4614. Wait( 2 )
  4615. set VAR_LocUInt8_0++
  4616. }
  4617. SetTextVariable( 6, VAR_LocUInt8_3 - VAR_LocUInt8_1 )
  4618. set VAR_GenInt16_175 = ( VAR_LocUInt8_3 - VAR_LocUInt8_1 )
  4619. return
  4620.  
  4621.  
  4622. #HW newentry 14
  4623. #HW locals
  4624. allocate 5
  4625. #HW endlocals
  4626.  
  4627. #HW newfunction 0
  4628. Function Code14_Init
  4629. ShowTile( 3, 0 )
  4630. set VAR_LocInt16_0 = 96
  4631. return
  4632.  
  4633.  
  4634. #HW newfunction 1
  4635. Function Code14_Loop
  4636. if ( General_FieldEntrance != 11111 ) {
  4637. if ( VARL_GenBool_1423 == 0 ) {
  4638. MoveTile( 3, 1, 256, 256 )
  4639. SetTilePositionEx( 3, 256 + VAR_LocInt16_0, 0, 0 )
  4640. ShowTile( 3, 1 )
  4641. MoveCamera( 160, 320, 120, 8 )
  4642. RunScript( 4, 9, 44 ) // Moogle_Male
  4643. RunScript( 4, 4, 44 ) // Chocobo
  4644. set Field_MusicVolume = 125
  4645. RunSoundCode2( 34305, 0, 120, Field_MusicVolume ) // All Musics Volume Intpl ; Battle
  4646. set VAR_GlobBool_167 = 0
  4647. if ( 0 ) {
  4648. set VAR_GlobBool_167 = 1
  4649. }
  4650. }
  4651. }
  4652. return
  4653.  
  4654.  
  4655. #HW newfunction 58
  4656. Function Code14_58
  4657. RunSoundCode( 0, 24 ) // Play Music ; Aloha De Chocobo
  4658. while ( SyncSounds != 0 ) {
  4659. Wait( 1 )
  4660. }
  4661. set Field_MusicVolume = 0
  4662. RunSoundCode1( 16897, 24, Field_MusicVolume ) // Music Volume ; Aloha De Chocobo
  4663. set VAR_GlobBool_167 = 0
  4664. set Field_MusicVolume = 125
  4665. RunSoundCode2( 34305, 0, 180, Field_MusicVolume ) // All Musics Volume Intpl ; Battle
  4666. set VAR_GlobBool_167 = 0
  4667. if ( 0 ) {
  4668. set VAR_GlobBool_167 = 1
  4669. }
  4670. set VAR_LocInt16_2 = ( ( 256 + VAR_LocInt16_0 ) / 8 )
  4671. while ( VAR_LocInt16_2 > 0 ) {
  4672. SetTilePositionEx( 3, -8, 0, 0 )
  4673. Wait( 1 )
  4674. set VAR_LocInt16_2--
  4675. }
  4676. Wait( 90 )
  4677. set VAR_LocInt16_2 = ( ( 256 + VAR_LocInt16_0 ) / 8 )
  4678. while ( VAR_LocInt16_2 > 0 ) {
  4679. SetTilePositionEx( 3, -16, 0, 0 )
  4680. Wait( 1 )
  4681. set VAR_LocInt16_2--
  4682. }
  4683. return
  4684.  
  4685.  
  4686. #HW newentry 15
  4687. #HW newfunction 0
  4688. Function Chocobo_Blue_Init
  4689. if ( VARL_GenBool_1423 == 0 ) {
  4690. set VAR_GlobInt16_0 = 64192
  4691. set VAR_GlobInt16_4 = 65305
  4692. set VAR_GlobInt16_6 = 194
  4693. set VAR_GlobInt16_2 = 65478
  4694. } else {
  4695. if ( ( ( World_CurrentTransport >= 1 ) && ( World_CurrentTransport <= 6 ) ) && ( General_FieldEntrance != 3 ) ) {
  4696. set VAR_GlobInt16_0 = 65345
  4697. set VAR_GlobInt16_4 = 59764
  4698. set VAR_GlobInt16_6 = 128
  4699. set VAR_GlobInt16_2 = 268
  4700. } else {
  4701. if ( General_FieldEntrance == 3 ) {
  4702. set VAR_GlobInt16_0 = 65345
  4703. set VAR_GlobInt16_4 = 60634
  4704. set VAR_GlobInt16_6 = 128
  4705. set VAR_GlobInt16_2 = 268
  4706. set VAR_GlobInt8_32 = 1
  4707. } else {
  4708. set VAR_GlobInt16_0 = 65322
  4709. set VAR_GlobInt16_4 = 62404
  4710. set VAR_GlobInt16_6 = 255
  4711. set VAR_GlobInt16_2 = 23
  4712. set VAR_GlobInt8_32 = 1
  4713. }
  4714. }
  4715. }
  4716. SetModel( 100, 125 ) // Chocobo Blue
  4717. CreateObject( VAR_GlobInt16_0, VAR_GlobInt16_4 )
  4718. TurnInstant( VAR_GlobInt16_6 )
  4719. SetStandAnimation( 2953 ) // Idle
  4720. SetWalkAnimation( 2962 ) // Walk
  4721. SetRunAnimation( 2960 ) // Run
  4722. SetLeftAnimation( 2958 ) // Turn_L
  4723. SetRightAnimation( 2956 ) // Turn_R
  4724. SetObjectLogicalSize( 32, 32, 45 )
  4725. SetAnimationStandSpeed( 14, 16, 18, 20 )
  4726. SetHeadAngle( 4, 1 )
  4727. EnableHeadFocus( 0 )
  4728. SetObjectFlags( 7 )
  4729. return
  4730.  
  4731.  
  4732. #HW newfunction 1
  4733. Function Chocobo_Blue_Loop
  4734. Wait( 1 )
  4735. loop
  4736.  
  4737.  
  4738. #HW newfunction 66
  4739. Function Chocobo_Blue_66
  4740. 0xB5( 255 ) // This
  4741. return
  4742.  
  4743.  
  4744. #HW newfunction 67
  4745. Function Chocobo_Blue_67
  4746. 0xB5( 4 ) // Chocobo
  4747. return
  4748.  
  4749.  
  4750. #HW newfunction 32
  4751. Function Chocobo_Blue_32
  4752. 0xB5( 255 ) // This
  4753. RunAnimation( 12303 ) // Seek_2
  4754. set VAR_GlobUInt8_25 = 5
  4755. switch 2 ( VAR_GlobUInt8_24 ) from 0 {
  4756. case +0:
  4757. RunScriptAsync( 4, 2, 11 ) // Code2
  4758. set VAR_GlobUInt8_24 = 1
  4759. break
  4760. case +1:
  4761. RunScriptAsync( 4, 3, 11 ) // Code3
  4762. set VAR_GlobUInt8_24 = 0
  4763. break
  4764. }
  4765. Wait( 5 )
  4766. SetSoundObjectPosition( 4, 125 ) // Chocobo
  4767. RunSoundCode3( 53248, 2727, 0, GetSoundDistance, GetSoundVolume ) // Play Sound ; [Unknown Audio]
  4768. WaitAnimation( )
  4769. 0xB5( 4 ) // Chocobo
  4770. return
  4771.  
  4772.  
  4773. #HW newfunction 12
  4774. Function Chocobo_Blue_12
  4775. 0xB5( 4 ) // Chocobo
  4776. RunSharedScript( 7 ) // Entry7
  4777. return
  4778.  
  4779.  
  4780. #HW newfunction 51
  4781. Function Chocobo_Blue_51
  4782. set VAR_GlobInt8_32 = 0
  4783. DefinePlayerCharacter( )
  4784. MoveInstantXZY( -306, -60, -4399 )
  4785. TurnInstant( 255 )
  4786. SetPathing( 1 )
  4787. return
  4788.  
  4789.  
  4790. #HW newentry 16
  4791. #HW newfunction 0
  4792. Function Chocobo_Red_Init
  4793. if ( VARL_GenBool_1423 == 0 ) {
  4794. set VAR_GlobInt16_0 = 64192
  4795. set VAR_GlobInt16_4 = 65305
  4796. set VAR_GlobInt16_6 = 194
  4797. set VAR_GlobInt16_2 = 65478
  4798. } else {
  4799. if ( ( ( World_CurrentTransport >= 1 ) && ( World_CurrentTransport <= 6 ) ) && ( General_FieldEntrance != 3 ) ) {
  4800. set VAR_GlobInt16_0 = 65345
  4801. set VAR_GlobInt16_4 = 59764
  4802. set VAR_GlobInt16_6 = 128
  4803. set VAR_GlobInt16_2 = 268
  4804. } else {
  4805. if ( General_FieldEntrance == 3 ) {
  4806. set VAR_GlobInt16_0 = 65345
  4807. set VAR_GlobInt16_4 = 60634
  4808. set VAR_GlobInt16_6 = 128
  4809. set VAR_GlobInt16_2 = 268
  4810. set VAR_GlobInt8_32 = 1
  4811. } else {
  4812. set VAR_GlobInt16_0 = 65322
  4813. set VAR_GlobInt16_4 = 62404
  4814. set VAR_GlobInt16_6 = 255
  4815. set VAR_GlobInt16_2 = 23
  4816. set VAR_GlobInt8_32 = 1
  4817. }
  4818. }
  4819. }
  4820. SetModel( 613, 125 ) // Chocobo Red
  4821. CreateObject( VAR_GlobInt16_0, VAR_GlobInt16_4 )
  4822. TurnInstant( VAR_GlobInt16_6 )
  4823. SetStandAnimation( 2953 ) // Idle
  4824. SetWalkAnimation( 2962 ) // Walk
  4825. SetRunAnimation( 2960 ) // Run
  4826. SetLeftAnimation( 2958 ) // Turn_L
  4827. SetRightAnimation( 2956 ) // Turn_R
  4828. SetObjectLogicalSize( 32, 32, 45 )
  4829. SetAnimationStandSpeed( 14, 16, 18, 20 )
  4830. SetHeadAngle( 4, 1 )
  4831. EnableHeadFocus( 0 )
  4832. SetObjectFlags( 7 )
  4833. return
  4834.  
  4835.  
  4836. #HW newfunction 1
  4837. Function Chocobo_Red_Loop
  4838. Wait( 1 )
  4839. loop
  4840.  
  4841.  
  4842. #HW newfunction 66
  4843. Function Chocobo_Red_66
  4844. 0xB5( 255 ) // This
  4845. return
  4846.  
  4847.  
  4848. #HW newfunction 67
  4849. Function Chocobo_Red_67
  4850. 0xB5( 4 ) // Chocobo
  4851. return
  4852.  
  4853.  
  4854. #HW newfunction 33
  4855. Function Chocobo_Red_33
  4856. 0xB5( 255 ) // This
  4857. RunAnimation( 12307 ) // Seek_3
  4858. set VAR_GlobUInt8_25 = 4
  4859. switch 2 ( VAR_GlobUInt8_24 ) from 0 {
  4860. case +0:
  4861. RunScriptAsync( 4, 2, 11 ) // Code2
  4862. set VAR_GlobUInt8_24 = 1
  4863. break
  4864. case +1:
  4865. RunScriptAsync( 4, 3, 11 ) // Code3
  4866. set VAR_GlobUInt8_24 = 0
  4867. break
  4868. }
  4869. Wait( 4 )
  4870. SetSoundObjectPosition( 4, 125 ) // Chocobo
  4871. RunSoundCode3( 53248, 2727, 0, GetSoundDistance, GetSoundVolume ) // Play Sound ; [Unknown Audio]
  4872. WaitAnimation( )
  4873. 0xB5( 4 ) // Chocobo
  4874. return
  4875.  
  4876.  
  4877. #HW newfunction 12
  4878. Function Chocobo_Red_12
  4879. 0xB5( 4 ) // Chocobo
  4880. RunSharedScript( 7 ) // Entry7
  4881. return
  4882.  
  4883.  
  4884. #HW newfunction 51
  4885. Function Chocobo_Red_51
  4886. set VAR_GlobInt8_32 = 0
  4887. DefinePlayerCharacter( )
  4888. MoveInstantXZY( -306, -60, -4399 )
  4889. TurnInstant( 255 )
  4890. SetPathing( 1 )
  4891. return
  4892.  
  4893.  
  4894. #HW newentry 17
  4895. #HW newfunction 0
  4896. Function Chocobo_Navy_Init
  4897. if ( VARL_GenBool_1423 == 0 ) {
  4898. set VAR_GlobInt16_0 = 64192
  4899. set VAR_GlobInt16_4 = 65305
  4900. set VAR_GlobInt16_6 = 194
  4901. set VAR_GlobInt16_2 = 65478
  4902. } else {
  4903. if ( ( ( World_CurrentTransport >= 1 ) && ( World_CurrentTransport <= 6 ) ) && ( General_FieldEntrance != 3 ) ) {
  4904. set VAR_GlobInt16_0 = 65345
  4905. set VAR_GlobInt16_4 = 59764
  4906. set VAR_GlobInt16_6 = 128
  4907. set VAR_GlobInt16_2 = 268
  4908. } else {
  4909. if ( General_FieldEntrance == 3 ) {
  4910. set VAR_GlobInt16_0 = 65345
  4911. set VAR_GlobInt16_4 = 60634
  4912. set VAR_GlobInt16_6 = 128
  4913. set VAR_GlobInt16_2 = 268
  4914. set VAR_GlobInt8_32 = 1
  4915. } else {
  4916. set VAR_GlobInt16_0 = 65322
  4917. set VAR_GlobInt16_4 = 62404
  4918. set VAR_GlobInt16_6 = 255
  4919. set VAR_GlobInt16_2 = 23
  4920. set VAR_GlobInt8_32 = 1
  4921. }
  4922. }
  4923. }
  4924. SetModel( 614, 125 ) // Chocobo Navy
  4925. CreateObject( VAR_GlobInt16_0, VAR_GlobInt16_4 )
  4926. TurnInstant( VAR_GlobInt16_6 )
  4927. SetStandAnimation( 2953 ) // Idle
  4928. SetWalkAnimation( 2962 ) // Walk
  4929. SetRunAnimation( 2960 ) // Run
  4930. SetLeftAnimation( 2958 ) // Turn_L
  4931. SetRightAnimation( 2956 ) // Turn_R
  4932. SetObjectLogicalSize( 32, 32, 45 )
  4933. SetAnimationStandSpeed( 14, 16, 18, 20 )
  4934. SetHeadAngle( 4, 1 )
  4935. EnableHeadFocus( 0 )
  4936. SetObjectFlags( 7 )
  4937. return
  4938.  
  4939.  
  4940. #HW newfunction 1
  4941. Function Chocobo_Navy_Loop
  4942. Wait( 1 )
  4943. loop
  4944.  
  4945.  
  4946. #HW newfunction 66
  4947. Function Chocobo_Navy_66
  4948. 0xB5( 255 ) // This
  4949. return
  4950.  
  4951.  
  4952. #HW newfunction 67
  4953. Function Chocobo_Navy_67
  4954. 0xB5( 4 ) // Chocobo
  4955. return
  4956.  
  4957.  
  4958. #HW newfunction 34
  4959. Function Chocobo_Navy_34
  4960. 0xB5( 255 ) // This
  4961. RunAnimation( 12377 ) // Seek_4
  4962. set VAR_GlobUInt8_25 = 4
  4963. switch 2 ( VAR_GlobUInt8_24 ) from 0 {
  4964. case +0:
  4965. RunScriptAsync( 4, 2, 11 ) // Code2
  4966. set VAR_GlobUInt8_24 = 1
  4967. break
  4968. case +1:
  4969. RunScriptAsync( 4, 3, 11 ) // Code3
  4970. set VAR_GlobUInt8_24 = 0
  4971. break
  4972. }
  4973. Wait( 4 )
  4974. SetSoundObjectPosition( 4, 125 ) // Chocobo
  4975. RunSoundCode3( 53248, 2727, 0, GetSoundDistance, GetSoundVolume ) // Play Sound ; [Unknown Audio]
  4976. WaitAnimation( )
  4977. 0xB5( 4 ) // Chocobo
  4978. return
  4979.  
  4980.  
  4981. #HW newfunction 12
  4982. Function Chocobo_Navy_12
  4983. 0xB5( 4 ) // Chocobo
  4984. RunSharedScript( 7 ) // Entry7
  4985. return
  4986.  
  4987.  
  4988. #HW newfunction 51
  4989. Function Chocobo_Navy_51
  4990. set VAR_GlobInt8_32 = 0
  4991. DefinePlayerCharacter( )
  4992. MoveInstantXZY( -306, -60, -4399 )
  4993. TurnInstant( 255 )
  4994. SetPathing( 1 )
  4995. return
  4996.  
  4997.  
  4998. #HW newentry 18
  4999. #HW newfunction 0
  5000. Function Chocobo_Gold_Init
  5001. if ( VARL_GenBool_1423 == 0 ) {
  5002. set VAR_GlobInt16_0 = 64192
  5003. set VAR_GlobInt16_4 = 65305
  5004. set VAR_GlobInt16_6 = 194
  5005. set VAR_GlobInt16_2 = 65478
  5006. } else {
  5007. if ( ( ( World_CurrentTransport >= 1 ) && ( World_CurrentTransport <= 6 ) ) && ( General_FieldEntrance != 3 ) ) {
  5008. set VAR_GlobInt16_0 = 65345
  5009. set VAR_GlobInt16_4 = 59764
  5010. set VAR_GlobInt16_6 = 128
  5011. set VAR_GlobInt16_2 = 268
  5012. } else {
  5013. if ( General_FieldEntrance == 3 ) {
  5014. set VAR_GlobInt16_0 = 65345
  5015. set VAR_GlobInt16_4 = 60634
  5016. set VAR_GlobInt16_6 = 128
  5017. set VAR_GlobInt16_2 = 268
  5018. set VAR_GlobInt8_32 = 1
  5019. } else {
  5020. set VAR_GlobInt16_0 = 65322
  5021. set VAR_GlobInt16_4 = 62404
  5022. set VAR_GlobInt16_6 = 255
  5023. set VAR_GlobInt16_2 = 23
  5024. set VAR_GlobInt8_32 = 1
  5025. }
  5026. }
  5027. }
  5028. SetModel( 615, 125 ) // Chocobo Gold
  5029. CreateObject( VAR_GlobInt16_0, VAR_GlobInt16_4 )
  5030. TurnInstant( VAR_GlobInt16_6 )
  5031. SetStandAnimation( 2953 ) // Idle
  5032. SetWalkAnimation( 2962 ) // Walk
  5033. SetRunAnimation( 2960 ) // Run
  5034. SetLeftAnimation( 2958 ) // Turn_L
  5035. SetRightAnimation( 2956 ) // Turn_R
  5036. SetObjectLogicalSize( 32, 32, 45 )
  5037. SetAnimationStandSpeed( 14, 16, 18, 20 )
  5038. SetHeadAngle( 4, 1 )
  5039. EnableHeadFocus( 0 )
  5040. SetObjectFlags( 7 )
  5041. return
  5042.  
  5043.  
  5044. #HW newfunction 1
  5045. Function Chocobo_Gold_Loop
  5046. Wait( 1 )
  5047. loop
  5048.  
  5049.  
  5050. #HW newfunction 66
  5051. Function Chocobo_Gold_66
  5052. 0xB5( 255 ) // This
  5053. return
  5054.  
  5055.  
  5056. #HW newfunction 67
  5057. Function Chocobo_Gold_67
  5058. 0xB5( 4 ) // Chocobo
  5059. return
  5060.  
  5061.  
  5062. #HW newfunction 35
  5063. Function Chocobo_Gold_35
  5064. 0xB5( 255 ) // This
  5065. RunAnimation( 12381 ) // Seek_5
  5066. set VAR_GlobUInt8_25 = 3
  5067. switch 2 ( VAR_GlobUInt8_24 ) from 0 {
  5068. case +0:
  5069. RunScriptAsync( 4, 2, 11 ) // Code2
  5070. set VAR_GlobUInt8_24 = 1
  5071. break
  5072. case +1:
  5073. RunScriptAsync( 4, 3, 11 ) // Code3
  5074. set VAR_GlobUInt8_24 = 0
  5075. break
  5076. }
  5077. Wait( 3 )
  5078. SetSoundObjectPosition( 4, 125 ) // Chocobo
  5079. RunSoundCode3( 53248, 2727, 0, GetSoundDistance, GetSoundVolume ) // Play Sound ; [Unknown Audio]
  5080. WaitAnimation( )
  5081. 0xB5( 4 ) // Chocobo
  5082. return
  5083.  
  5084.  
  5085. #HW newfunction 12
  5086. Function Chocobo_Gold_12
  5087. 0xB5( 4 ) // Chocobo
  5088. RunSharedScript( 7 ) // Entry7
  5089. return
  5090.  
  5091.  
  5092. #HW newfunction 51
  5093. Function Chocobo_Gold_51
  5094. set VAR_GlobInt8_32 = 0
  5095. DefinePlayerCharacter( )
  5096. MoveInstantXZY( -306, -60, -4399 )
  5097. TurnInstant( 255 )
  5098. SetPathing( 1 )
  5099. return
  5100.  
  5101.  
  5102. #HW newentry 19
  5103. #HW newfunction 0
  5104. Function Region19_Init
  5105. SetRegion( ( 473, -4258 ), ( 1001, -4208 ), ( 1004, -4544 ), ( 542, -4676 ) )
  5106. return
  5107.  
  5108.  
  5109. #HW newfunction 2
  5110. Function Region19_Range
  5111. ifnot ( IsMovementEnabled ) {
  5112. return
  5113. }
  5114. if ( ( VARL_GenBool_810 == 0 ) || ( VARL_GenBool_809 == 0 ) ) {
  5115. Bubble( 1 )
  5116. } else {
  5117. Bubble( 0 )
  5118. }
  5119. return
  5120.  
  5121.  
  5122. #HW newfunction 3
  5123. Function Region19_SpeakBTN
  5124. ifnot ( IsMovementEnabled ) {
  5125. return
  5126. }
  5127. set VAR_GlobBool_158 = 0
  5128. if ( VAR_GlobBool_159 == 1 ) {
  5129. DisableMove( )
  5130. if ( VAR_GlobBool_144 == 0 ) {
  5131. DisableMenu( )
  5132. } else {
  5133. Wait( 1 )
  5134. }
  5135. }
  5136. SetTriangleFlagMask( 127 )
  5137. RunScriptSync( 6, 9, 59 ) // Moogle_Male
  5138. set VAR_GlobBool_158 = 1
  5139. if ( VAR_GlobBool_159 == 1 ) {
  5140. if ( VAR_GlobBool_156 == 0 ) {
  5141. EnableMove( )
  5142. SetTriangleFlagMask( 255 )
  5143. if ( VAR_GlobBool_144 == 0 ) {
  5144. EnableMenu( )
  5145. }
  5146. }
  5147. }
  5148. return
  5149.  
  5150.  
  5151. #HW newentry 20
  5152. #HW newfunction 0
  5153. Function Region20_Init
  5154. SetRegion( ( -1235, -6218 ), ( 378, -6288 ), ( 363, -5304 ), ( -985, -5281 ) )
  5155. return
  5156.  
  5157.  
  5158. #HW newfunction 2
  5159. Function Region20_Range
  5160. ifnot ( IsMovementEnabled ) {
  5161. return
  5162. }
  5163. if ( VARL_GenBool_1423 == 0 ) {
  5164. set VARL_GenBool_1423 = 1
  5165. set VAR_GlobInt8_32 = 0
  5166. } else {
  5167. if ( ( World_CurrentTransport >= 1 ) && ( World_CurrentTransport <= 6 ) ) {
  5168. set VAR_GlobBool_158 = 0
  5169. if ( VAR_GlobBool_159 == 1 ) {
  5170. DisableMove( )
  5171. if ( VAR_GlobBool_144 == 0 ) {
  5172. DisableMenu( )
  5173. } else {
  5174. Wait( 1 )
  5175. }
  5176. }
  5177. SetTriangleFlagMask( 127 )
  5178. RunScriptSync( 4, 4, 29 ) // Chocobo
  5179. }
  5180. }
  5181. RunSoundCode2( 38401, 65535, 100, 0 ) // All Sounds Adjust Volume ; [Unknown Audio]
  5182. CalculateExitPosition( )
  5183. ExitField( )
  5184. set VAR_GlobBool_158 = 0
  5185. if ( VAR_GlobBool_159 == 1 ) {
  5186. DisableMove( )
  5187. if ( VAR_GlobBool_144 == 0 ) {
  5188. DisableMenu( )
  5189. } else {
  5190. Wait( 1 )
  5191. }
  5192. }
  5193. SetTriangleFlagMask( 127 )
  5194. RunSoundCode1( 21761, 65535, 0 ) // All Sounds Volume ; [Unknown Audio]
  5195. RunSoundCode( 8448, 65535 ) // Stop Stream ; [Unknown Audio]
  5196. if ( VAR_GlobUInt8_17 == 255 ) {
  5197. set Op66(( GetData_12 - 160 ), ( GetData_13 - 112 ))
  5198. }
  5199. 0xA9( 250 ) // Player Character
  5200. FadeFilter( 6, 50, VAR_GlobUInt8_17, 255, 255, 255 )
  5201. Wait( 51 )
  5202. if ( !VARL_GenBool_810 ) {
  5203. set VAR_GenInt24_83 = 278226L
  5204. set VAR_GenInt16_86 = 61591
  5205. set VAR_GenInt24_88 = 4294723835L
  5206. set VAR_GenUInt8_91 = 4
  5207. }
  5208. if ( World_CurrentTransport == 0 ) {
  5209. set VAR_GenInt24_64 = 279293L
  5210. set VAR_GenInt16_67 = 63590
  5211. set VAR_GenInt24_69 = 4294720524L
  5212. set World_PlayerAngle = 244
  5213. } else {
  5214. set VAR_GenInt24_83 = 279293L
  5215. set VAR_GenInt16_86 = 63590
  5216. set VAR_GenInt24_88 = 4294720524L
  5217. set VAR_GenUInt8_91 = 244
  5218. set VAR_GenInt24_64 = VAR_GenInt24_83
  5219. set VAR_GenInt16_67 = VAR_GenInt16_86
  5220. set VAR_GenInt24_69 = VAR_GenInt24_88
  5221. set World_PlayerAngle = VAR_GenUInt8_91
  5222. }
  5223. set General_FieldEntrance = 34
  5224. set VARL_GenBool_755 = 1
  5225. set General_ScenarioCounter
  5226. set World_MusicVolume = 125
  5227. switchex 2 ( General_FieldEntrance ) {
  5228. case 65 ; 83:
  5229. set World_WhiteTransition = 1
  5230. break
  5231. default:
  5232. set World_WhiteTransition = 0
  5233. break
  5234. }
  5235. if ( General_ScenarioCounter < 5990 ) {
  5236. switch 67 ( General_FieldEntrance ) from 17 {
  5237. case +0 ; +6 ; +7 ; +9 ; +10 ; +11 ; +16 ; +17 ; +21 ; +24 ; +27 ; +29 ; +34 ; +46 ; +47 ; +49 ; +66:
  5238. WorldMap( 9000 ) // World Map: No Transport
  5239. break
  5240. case +18 ; +19 ; +25 ; +26 ; +28 ; +30 ; +31 ; +33:
  5241. WorldMap( 9011 ) // World Map: Around Dali
  5242. break
  5243. case +1 ; +12 ; +13 ; +20:
  5244. WorldMap( 9010 ) // World Map: Flying Airships
  5245. break
  5246. case +50 ; +51 ; +52 ; +53 ; +54 ; +55 ; +56 ; +57 ; +58 ; +59 ; +60 ; +61:
  5247. WorldMap( 9002 ) // World Map: Dagger
  5248. break
  5249. case +35:
  5250. WorldMap( 9001 ) // World Map/Event: Cargo Ship
  5251. break
  5252. case +45:
  5253. set General_FieldEntrance = 0
  5254. WorldMap( 9009 ) // World Map: ???
  5255. break
  5256. }
  5257. } else {
  5258. if ( General_ScenarioCounter < 10400 ) {
  5259. if ( ( General_ScenarioCounter >= 9615 ) && ( General_ScenarioCounter <= 9790 ) ) {
  5260. switchex 4 ( General_FieldEntrance ) {
  5261. case 7 ; 10 ; 2 ; 83:
  5262. WorldMap( 9005 ) // World Map: Hilda Garde 1
  5263. break
  5264. }
  5265. } else {
  5266. switch 84 ( General_FieldEntrance ) from 2 {
  5267. case +0 ; +2 ; +3 ; +4 ; +5 ; +7 ; +8 ; +11 ; +12 ; +13 ; +14 ; +15 ; +16 ; +17 ; +18 ; +19 ; +20 ; +21 ; +22 ; +23 ; +24 ; +25 ; +26 ; +27 ; +28 ; +29 ; +30 ; +31 ; +32 ; +33 ; +34 ; +35 ; +36 ; +37 ; +39 ; +40 ; +41 ; +42 ; +43 ; +44 ; +45 ; +46 ; +47 ; +48 ; +49 ; +54 ; +57 ; +61 ; +62 ; +77 ; +81:
  5268. WorldMap( 9003 ) // World Map: Blue Narciss
  5269. break
  5270. case +51:
  5271. WorldMap( 9004 ) // World Map/Event: Hilda Garde 1
  5272. break
  5273. case +52:
  5274. WorldMap( 9005 ) // World Map: Hilda Garde 1
  5275. break
  5276. case +53:
  5277. WorldMap( 9006 ) // World Map/Event: Track Kuja
  5278. break
  5279. case +83:
  5280. WorldMap( 9012 ) // World Map/Event: Chocobo Treasure
  5281. break
  5282. case +60:
  5283. set General_FieldEntrance = 0
  5284. WorldMap( 9009 ) // World Map: ???
  5285. break
  5286. }
  5287. }
  5288. } else {
  5289. if ( General_ScenarioCounter < 11090 ) {
  5290. switch 85 ( General_FieldEntrance ) from 1 {
  5291. case +0 ; +1 ; +2 ; +4 ; +5 ; +6 ; +7 ; +9 ; +10 ; +11 ; +12 ; +13 ; +14 ; +15 ; +16 ; +17 ; +19 ; +20 ; +21 ; +22 ; +23 ; +24 ; +25 ; +26 ; +27 ; +28 ; +29 ; +30 ; +31 ; +32 ; +33 ; +34 ; +35 ; +36 ; +37 ; +38 ; +39 ; +40 ; +41 ; +42 ; +43 ; +44 ; +45 ; +46 ; +47 ; +49 ; +50 ; +56 ; +59 ; +62 ; +63 ; +64 ; +79 ; +81 ; +82:
  5292. WorldMap( 9007 ) // World Map: Hilda Garde 3
  5293. break
  5294. case +84:
  5295. WorldMap( 9012 ) // World Map/Event: Chocobo Treasure
  5296. break
  5297. case +61:
  5298. set General_FieldEntrance = 0
  5299. WorldMap( 9009 ) // World Map: ???
  5300. break
  5301. }
  5302. } else {
  5303. switch 85 ( General_FieldEntrance ) from 1 {
  5304. case +0 ; +1 ; +4 ; +5 ; +6 ; +7 ; +9 ; +12 ; +13 ; +14 ; +15 ; +16 ; +17 ; +19 ; +20 ; +21 ; +22 ; +23 ; +24 ; +25 ; +26 ; +27 ; +28 ; +29 ; +30 ; +31 ; +32 ; +33 ; +34 ; +35 ; +36 ; +37 ; +38 ; +40 ; +41 ; +42 ; +43 ; +44 ; +45 ; +46 ; +47 ; +49 ; +50 ; +57 ; +60 ; +62 ; +63 ; +64 ; +80 ; +82:
  5305. WorldMap( 9008 ) // World Map: Invincible
  5306. break
  5307. case +84:
  5308. WorldMap( 9012 ) // World Map/Event: Chocobo Treasure
  5309. break
  5310. case +61:
  5311. set General_FieldEntrance = 0
  5312. WorldMap( 9009 ) // World Map: ???
  5313. break
  5314. }
  5315. }
  5316. }
  5317. }
  5318. return
  5319.  
  5320.  
  5321. #HW newentry 21
  5322. #HW newfunction 0
  5323. Function Region21_Init
  5324. SetRegion( ( 983, -818 ), ( 1154, -2065 ), ( 724, -1826 ), ( 738, -830 ) )
  5325. return
  5326.  
  5327.  
  5328. #HW newfunction 2
  5329. Function Region21_Range
  5330. ifnot ( IsMovementEnabled ) {
  5331. return
  5332. }
  5333. if ( GetEntryPosZ(250) >= 65024 ) {
  5334. set VARL_GlobBool_607 = 1
  5335. Bubble( 1 )
  5336. }
  5337. return
  5338.  
  5339.  
  5340. #HW newfunction 1
  5341. Function Region21_Loop
  5342. set VARL_GlobBool_607 = 0
  5343. Wait( 1 )
  5344. loop
  5345.  
  5346.  
  5347. #HW newfunction 3
  5348. Function Region21_SpeakBTN
  5349. ifnot ( IsMovementEnabled ) {
  5350. return
  5351. }
  5352. if ( GetEntryPosZ(250) >= 65024 ) {
  5353. set VAR_GlobBool_158 = 0
  5354. if ( VAR_GlobBool_159 == 1 ) {
  5355. DisableMove( )
  5356. DisableMenu( )
  5357. }
  5358. SetTriangleFlagMask( 127 )
  5359. RunScriptSync( 6, 4, 52 ) // Chocobo
  5360. set VARL_GlobBool_607 = 0
  5361. set VAR_GlobBool_158 = 1
  5362. if ( VAR_GlobBool_159 == 1 ) {
  5363. if ( VAR_GlobBool_156 == 0 ) {
  5364. EnableMove( )
  5365. SetTriangleFlagMask( 255 )
  5366. DisableMenu( )
  5367. }
  5368. }
  5369. }
  5370. return
  5371.  
  5372.  
  5373. #HW newentry 22
  5374. #HW newfunction 0
  5375. Function Region22_Init
  5376. SetRegion( ( 1708, -110 ), ( 1757, -426 ), ( 1945, -697 ), ( 2141, -806 ), ( 2051, -548 ), ( 1896, -300 ) )
  5377. return
  5378.  
  5379.  
  5380. #HW newfunction 2
  5381. Function Region22_Range
  5382. ifnot ( IsMovementEnabled ) {
  5383. return
  5384. }
  5385. if ( GetEntryPosZ(250) < 65024 ) {
  5386. set VARL_GlobBool_606 = 1
  5387. Bubble( 1 )
  5388. }
  5389. return
  5390.  
  5391.  
  5392. #HW newfunction 1
  5393. Function Region22_Loop
  5394. set VARL_GlobBool_606 = 0
  5395. Wait( 1 )
  5396. loop
  5397.  
  5398.  
  5399. #HW newfunction 3
  5400. Function Region22_SpeakBTN
  5401. ifnot ( IsMovementEnabled ) {
  5402. return
  5403. }
  5404. if ( GetEntryPosZ(250) < 65024 ) {
  5405. set VAR_GlobBool_158 = 0
  5406. if ( VAR_GlobBool_159 == 1 ) {
  5407. DisableMove( )
  5408. DisableMenu( )
  5409. }
  5410. SetTriangleFlagMask( 127 )
  5411. RunScriptSync( 6, 4, 53 ) // Chocobo
  5412. set VARL_GlobBool_606 = 0
  5413. set VAR_GlobBool_158 = 1
  5414. if ( VAR_GlobBool_159 == 1 ) {
  5415. if ( VAR_GlobBool_156 == 0 ) {
  5416. EnableMove( )
  5417. SetTriangleFlagMask( 255 )
  5418. DisableMenu( )
  5419. }
  5420. }
  5421. }
  5422. return
  5423.  
  5424.  
  5425. #HW newentry 23
  5426. #HW newfunction 0
  5427. Function Region23_Init
  5428. SetRegion( ( -1396, -1392 ), ( -1410, -1621 ), ( -1124, -2622 ), ( -874, -2184 ), ( -1072, -1606 ) )
  5429. return
  5430.  
  5431.  
  5432. #HW newfunction 2
  5433. Function Region23_Range
  5434. ifnot ( IsMovementEnabled ) {
  5435. return
  5436. }
  5437. if ( GetEntryPosZ(250) >= 65024 ) {
  5438. set VARL_GlobBool_603 = 1
  5439. Bubble( 1 )
  5440. }
  5441. return
  5442.  
  5443.  
  5444. #HW newfunction 1
  5445. Function Region23_Loop
  5446. set VARL_GlobBool_603 = 0
  5447. Wait( 1 )
  5448. loop
  5449.  
  5450.  
  5451. #HW newfunction 3
  5452. Function Region23_SpeakBTN
  5453. ifnot ( IsMovementEnabled ) {
  5454. return
  5455. }
  5456. if ( GetEntryPosZ(250) >= 65024 ) {
  5457. set VAR_GlobBool_158 = 0
  5458. if ( VAR_GlobBool_159 == 1 ) {
  5459. DisableMove( )
  5460. DisableMenu( )
  5461. }
  5462. SetTriangleFlagMask( 127 )
  5463. RunScriptSync( 6, 4, 54 ) // Chocobo
  5464. set VARL_GlobBool_603 = 0
  5465. set VAR_GlobBool_158 = 1
  5466. if ( VAR_GlobBool_159 == 1 ) {
  5467. if ( VAR_GlobBool_156 == 0 ) {
  5468. EnableMove( )
  5469. SetTriangleFlagMask( 255 )
  5470. DisableMenu( )
  5471. }
  5472. }
  5473. }
  5474. return
  5475.  
  5476.  
  5477. #HW newentry 24
  5478. #HW newfunction 0
  5479. Function Region24_Init
  5480. SetRegion( ( -1078, -576 ), ( -1200, -1058 ), ( -1400, -1300 ), ( -1199, -450 ) )
  5481. return
  5482.  
  5483.  
  5484. #HW newfunction 2
  5485. Function Region24_Range
  5486. ifnot ( IsMovementEnabled ) {
  5487. return
  5488. }
  5489. if ( GetEntryPosZ(250) < 65024 ) {
  5490. set VARL_GlobBool_602 = 1
  5491. Bubble( 1 )
  5492. }
  5493. return
  5494.  
  5495.  
  5496. #HW newfunction 1
  5497. Function Region24_Loop
  5498. set VARL_GlobBool_602 = 0
  5499. Wait( 1 )
  5500. loop
  5501.  
  5502.  
  5503. #HW newfunction 3
  5504. Function Region24_SpeakBTN
  5505. ifnot ( IsMovementEnabled ) {
  5506. return
  5507. }
  5508. if ( GetEntryPosZ(250) < 65024 ) {
  5509. set VAR_GlobBool_158 = 0
  5510. if ( VAR_GlobBool_159 == 1 ) {
  5511. DisableMove( )
  5512. DisableMenu( )
  5513. }
  5514. SetTriangleFlagMask( 127 )
  5515. RunScriptSync( 6, 4, 55 ) // Chocobo
  5516. set VARL_GlobBool_602 = 0
  5517. set VAR_GlobBool_158 = 1
  5518. if ( VAR_GlobBool_159 == 1 ) {
  5519. if ( VAR_GlobBool_156 == 0 ) {
  5520. EnableMove( )
  5521. SetTriangleFlagMask( 255 )
  5522. DisableMenu( )
  5523. }
  5524. }
  5525. }
  5526. return
  5527.  
  5528.  
  5529. #HW newentry 25
  5530. #HW locals
  5531. allocate 11
  5532. #HW endlocals
  5533.  
  5534. #HW newfunction 0
  5535. Function Zidane_Init
  5536. switch 2 ( General_FieldEntrance ) from 2 {
  5537. case +1:
  5538. set VAR_GlobInt16_0 = 737
  5539. set VAR_GlobInt16_4 = 61133
  5540. set VAR_GlobInt16_6 = 238
  5541. set VAR_GlobInt16_2 = 34
  5542. break
  5543. case +0:
  5544. set VAR_GlobInt16_0 = 65230
  5545. set VAR_GlobInt16_4 = 61137
  5546. set VAR_GlobInt16_6 = 255
  5547. set VAR_GlobInt16_2 = 135
  5548. break
  5549. default:
  5550. set VAR_GlobInt16_0 = 65345
  5551. set VAR_GlobInt16_4 = 60604
  5552. set VAR_GlobInt16_6 = 128
  5553. set VAR_GlobInt16_2 = 211
  5554. break
  5555. }
  5556. SetModel( 98, 93 ) // Zidane
  5557. CreateObject( VAR_GlobInt16_0, VAR_GlobInt16_4 )
  5558. TurnInstant( VAR_GlobInt16_6 )
  5559. SetStandAnimation( 200 ) // Idle
  5560. SetWalkAnimation( 25 ) // Walk
  5561. SetRunAnimation( 38 ) // Run
  5562. SetLeftAnimation( 40 ) // Turn_L
  5563. SetRightAnimation( 41 ) // Turn_R
  5564. SetInactiveAnimation( 55 ) // Break1_Flex
  5565. SetObjectLogicalSize( 20, 24, 40 )
  5566. SetAnimationStandSpeed( 14, 16, 18, 20 )
  5567. SetHeadAngle( 97, 61 )
  5568. RunSoundCode( 4616, 922 ) // Sound Null ; [Unknown Audio]
  5569. RunSoundCode( 4616, 914 ) // Sound Null ; [Unknown Audio]
  5570. RunModelCode( 16, 25, 4, 922 ) // Add Sound
  5571. RunModelCode( 17, 25, 4, 914 ) // Add Secondary Sound
  5572. RunModelCode( 18, 25, 4, 1 ) // Sound Random Pitch
  5573. RunSoundCode( 4616, 922 ) // Sound Null ; [Unknown Audio]
  5574. RunSoundCode( 4616, 914 ) // Sound Null ; [Unknown Audio]
  5575. RunModelCode( 16, 25, 13, 922 ) // Add Sound
  5576. RunModelCode( 17, 25, 13, 914 ) // Add Secondary Sound
  5577. RunModelCode( 18, 25, 13, 1 ) // Sound Random Pitch
  5578. RunSoundCode( 4616, 922 ) // Sound Null ; [Unknown Audio]
  5579. RunSoundCode( 4616, 914 ) // Sound Null ; [Unknown Audio]
  5580. RunModelCode( 16, 38, 0, 922 ) // Add Sound
  5581. RunModelCode( 17, 38, 0, 914 ) // Add Secondary Sound
  5582. RunModelCode( 18, 38, 0, 1 ) // Sound Random Pitch
  5583. RunSoundCode( 4616, 922 ) // Sound Null ; [Unknown Audio]
  5584. RunSoundCode( 4616, 914 ) // Sound Null ; [Unknown Audio]
  5585. RunModelCode( 16, 38, 8, 922 ) // Add Sound
  5586. RunModelCode( 17, 38, 8, 914 ) // Add Secondary Sound
  5587. RunModelCode( 18, 38, 8, 1 ) // Sound Random Pitch
  5588. MoveInstantXZY( VAR_GlobInt16_0, VAR_GlobInt16_2, VAR_GlobInt16_4 )
  5589. if ( General_FieldEntrance != 2 ) {
  5590. SetPathing( 1 )
  5591. }
  5592. if ( VARL_GenBool_1423 == 1 ) {
  5593. if ( ( ( World_CurrentTransport >= 1 ) && ( World_CurrentTransport <= 6 ) ) && ( General_FieldEntrance != 3 ) ) {
  5594. SetStandAnimation( 12750 ) // Cho_Ride_2
  5595. SetWalkAnimation( 12782 ) // Cho_Walk
  5596. SetRunAnimation( 12778 ) // Cho_Run
  5597. SetObjectFlags( 7 )
  5598. DisableInactiveAnimation( )
  5599. set VAR_GlobInt8_33 = 1
  5600. } else {
  5601. SetStandAnimation( 324 ) // Idle
  5602. SetWalkAnimation( 25 ) // Walk
  5603. SetRunAnimation( 38 ) // Run
  5604. 0xB5( 255 ) // This
  5605. DefinePlayerCharacter( )
  5606. }
  5607. }
  5608. return
  5609.  
  5610.  
  5611. #HW newfunction 1
  5612. Function Zidane_Loop
  5613. switchex 13 ( VAR_GlobInt16_30 ) {
  5614. case 1 ; 3 ; 26 ; 36 ; 37:
  5615. EnableHeadFocus( 2 )
  5616. TurnTowardObject( 9, 16 ) // Moogle_Male
  5617. WaitTurn( )
  5618. set VAR_GlobInt16_30 = 4
  5619. break
  5620. case 2:
  5621. TurnTowardObject( 9, 16 ) // Moogle_Male
  5622. WaitTurn( )
  5623. WindowSync( 2, 128, 189 ) // "Zidane ─Beh, passavo di qua."
  5624. switchex 3 ( VAR_GlobUInt8_40 ) {
  5625. case 1:
  5626. WindowSync( 2, 128, 190 ) // "Zidane ─Però ora devo tornare a Lindblum."
  5627. set VAR_GlobInt16_30 = 2
  5628. break
  5629. case 36:
  5630. WindowSync( 2, 128, 201 ) // "Zidane ─Ci sono tanti posti dove dovrei andare..."
  5631. set VAR_GlobInt16_30 = 2
  5632. break
  5633. case 37:
  5634. WindowSync( 2, 128, 202 ) // "Zidane ─Ci sono tante cose che dovrei fare..."
  5635. set VAR_GlobInt16_30 = 2
  5636. break
  5637. }
  5638. set VAR_GlobInt16_30 = 16
  5639. break
  5640. case 9:
  5641. TurnTowardObject( 9, 16 ) // Moogle_Male
  5642. WaitTurn( )
  5643. WindowSync( 2, 128, 191 ) // "Zidane ─Senti, non hai mica visto passare qui una bella ragazza con i capelli lunghi?"
  5644. set VAR_GlobInt16_30 = 10
  5645. break
  5646. case 11:
  5647. WindowSync( 2, 128, 193 ) // "Zidane ─Allora, non era lei. Dove diavolo sarà finita?"
  5648. RunAnimation( 9778 ) // Akireru
  5649. if ( General_ScenarioCounter < 3800 ) {
  5650. WindowSync( 2, 128, 194 ) // "Zidane ─Forse è andata a Burmesia! Accidenti, devo sbrigarmi!"
  5651. } else {
  5652. WindowSync( 2, 128, 195 ) // "Zidane ─Dove diavolo sarà andata?"
  5653. WindowSync( 2, 128, 196 ) // "Zidane ─Non è ora di gingillarsi!"
  5654. }
  5655. set VAR_GlobInt16_30 = 14
  5656. break
  5657. case 15:
  5658. WindowSync( 2, 128, 198 ) // "Sì."
  5659. set VAR_GlobInt16_30 = 16
  5660. break
  5661. case 19:
  5662. WindowSync( 2, 128, 210 ) // "Zidane ─Forse gli sono antipatico."
  5663. set VAR_GlobInt16_30 = 20
  5664. DefinePlayerCharacter( )
  5665. ReleaseCamera( 1, 8 )
  5666. break
  5667. case 32:
  5668. WindowSync( 2, 128, 199 ) // "Zidane ─Devo andare alla palude a forma di zucca che si trova a nord del regno di Lindblum."
  5669. set VAR_GlobInt16_30 = 33
  5670. break
  5671. case 42:
  5672. Wait( 24 )
  5673. WindowSync( 2, 128, 328 ) // "Zidane ─Cos’è questa Lastra incisa?"
  5674. set VAR_GlobInt16_30 = 43
  5675. break
  5676. case 44:
  5677. WindowSync( 2, 128, 335 ) // "Zidane ─Chocografia?!"
  5678. set VAR_GlobInt16_30 = 45
  5679. break
  5680. default:
  5681. if ( VAR_GlobInt8_33 == 1 ) {
  5682. switch 5 ( Chocobo_ChocoColor ) from 1 {
  5683. case +0:
  5684. MoveInstantXZY( GetEntryPosX(4), GetEntryPosZ(4), GetEntryPosY(4) )
  5685. TurnInstant( GetEntryAngle(4) )
  5686. break
  5687. case +1:
  5688. MoveInstantXZY( GetEntryPosX(15), GetEntryPosZ(15), GetEntryPosY(15) )
  5689. TurnInstant( GetEntryAngle(15) )
  5690. break
  5691. case +2:
  5692. MoveInstantXZY( GetEntryPosX(16), GetEntryPosZ(16), GetEntryPosY(16) )
  5693. TurnInstant( GetEntryAngle(16) )
  5694. break
  5695. case +3:
  5696. MoveInstantXZY( GetEntryPosX(17), GetEntryPosZ(17), GetEntryPosY(17) )
  5697. TurnInstant( GetEntryAngle(17) )
  5698. break
  5699. case +4:
  5700. MoveInstantXZY( GetEntryPosX(18), GetEntryPosZ(18), GetEntryPosY(18) )
  5701. TurnInstant( GetEntryAngle(18) )
  5702. }
  5703. }
  5704. break
  5705. }
  5706. Wait( 1 )
  5707. loop
  5708.  
  5709.  
  5710. #HW newfunction 25
  5711. Function Zidane_25
  5712. TurnTowardObject( 4, 16 ) // Chocobo
  5713. WaitTurn( )
  5714. return
  5715.  
  5716.  
  5717. #HW newfunction 26
  5718. Function Zidane_26
  5719. TurnTowardObject( 9, 16 ) // Moogle_Male
  5720. WaitTurn( )
  5721. return
  5722.  
  5723.  
  5724. #HW newfunction 27
  5725. Function Zidane_27
  5726. DefinePlayerCharacter( )
  5727. set VAR_GlobBool_158 = 1
  5728. if ( VAR_GlobBool_159 == 1 ) {
  5729. if ( VAR_GlobBool_156 == 0 ) {
  5730. EnableMove( )
  5731. SetTriangleFlagMask( 255 )
  5732. if ( VAR_GlobBool_144 == 0 ) {
  5733. EnableMenu( )
  5734. }
  5735. }
  5736. }
  5737. return
  5738.  
  5739.  
  5740. #HW newfunction 28
  5741. Function Zidane_28
  5742. 0xB5( 255 ) // This
  5743. SetJumpAnimation( 12756, 6, 16 ) // Cho_Ride_3
  5744. RunJumpAnimation( )
  5745. WaitAnimation( )
  5746. SetupJump( -163, 154, -4564, 12 )
  5747. Jump( )
  5748. RunSoundCode3( 53248, 2342, 0, -128, 125 ) // Play Sound ; [Unknown Audio]
  5749. RunLandAnimation( )
  5750. WaitAnimation( )
  5751. SetObjectFlags( 5 )
  5752. set VAR_GlobInt8_33 = 0
  5753. SetStandAnimation( 324 ) // Idle
  5754. SetWalkAnimation( 25 ) // Walk
  5755. SetRunAnimation( 38 ) // Run
  5756. SetPathing( 1 )
  5757. TurnTowardObject( 9, 16 ) // Moogle_Male
  5758. WaitTurn( )
  5759. return
  5760.  
  5761.  
  5762. #HW newfunction 13
  5763. Function Zidane_13
  5764. 0xB5( 255 ) // This
  5765. SetJumpAnimation( 12756, 6, 16 ) // Cho_Ride_3
  5766. RunJumpAnimation( )
  5767. WaitAnimation( )
  5768. SetupJump( -163, 154, -4564, 12 )
  5769. Jump( )
  5770. RunSoundCode3( 53248, 2342, 0, -128, 125 ) // Play Sound ; [Unknown Audio]
  5771. RunLandAnimation( )
  5772. WaitAnimation( )
  5773. SetObjectFlags( 5 )
  5774. set VAR_GlobInt8_33 = 0
  5775. SetStandAnimation( 324 ) // Idle
  5776. SetWalkAnimation( 25 ) // Walk
  5777. SetRunAnimation( 38 ) // Run
  5778. SetPathing( 1 )
  5779. return
  5780.  
  5781.  
  5782. #HW newfunction 29
  5783. Function Zidane_29
  5784. SetJumpAnimation( 12748, 7, 17 ) // Cho_Ride_1
  5785. switch 5 ( Chocobo_ChocoColor ) from 1 {
  5786. case +0:
  5787. set VAR_LocInt16_2 = GetEntryPosX(4)
  5788. set VAR_LocInt16_4 = GetEntryPosZ(4)
  5789. set VAR_LocInt16_6 = GetEntryPosY(4)
  5790. set VAR_LocUInt8_8 = GetEntryAngle(4)
  5791. break
  5792. case +1:
  5793. set VAR_LocInt16_2 = GetEntryPosX(15)
  5794. set VAR_LocInt16_4 = GetEntryPosZ(15)
  5795. set VAR_LocInt16_6 = GetEntryPosY(15)
  5796. set VAR_LocUInt8_8 = GetEntryAngle(15)
  5797. break
  5798. case +2:
  5799. set VAR_LocInt16_2 = GetEntryPosX(16)
  5800. set VAR_LocInt16_4 = GetEntryPosZ(16)
  5801. set VAR_LocInt16_6 = GetEntryPosY(16)
  5802. set VAR_LocUInt8_8 = GetEntryAngle(16)
  5803. break
  5804. case +3:
  5805. set VAR_LocInt16_2 = GetEntryPosX(17)
  5806. set VAR_LocInt16_4 = GetEntryPosZ(17)
  5807. set VAR_LocInt16_6 = GetEntryPosY(17)
  5808. set VAR_LocUInt8_8 = GetEntryAngle(17)
  5809. break
  5810. case +4:
  5811. set VAR_LocInt16_2 = GetEntryPosX(18)
  5812. set VAR_LocInt16_4 = GetEntryPosZ(18)
  5813. set VAR_LocInt16_6 = GetEntryPosY(18)
  5814. set VAR_LocUInt8_8 = GetEntryAngle(18)
  5815. break
  5816. }
  5817. TurnInstant( VAR_LocUInt8_8 )
  5818. if ( VAR_GlobInt8_76 == 1 ) {
  5819. RunJumpAnimation( )
  5820. WaitAnimation( )
  5821. RunSoundCode3( 53248, 1324, 0, -128, 125 ) // Play Sound ; [Unknown Audio]
  5822. SetupJump( VAR_LocInt16_2, VAR_LocInt16_4, VAR_LocInt16_6, 12 )
  5823. Jump( )
  5824. RunLandAnimation( )
  5825. WaitAnimation( )
  5826. }
  5827. set VAR_GlobInt8_33 = 1
  5828. SetStandAnimation( 12750 ) // Cho_Ride_2
  5829. SetWalkAnimation( 12782 ) // Cho_Walk
  5830. SetRunAnimation( 12778 ) // Cho_Run
  5831. switch 5 ( Chocobo_ChocoColor ) from 1 {
  5832. case +0:
  5833. 0xB5( 4 ) // Chocobo
  5834. break
  5835. case +1:
  5836. 0xB5( 15 ) // Chocobo_Blue
  5837. break
  5838. case +2:
  5839. 0xB5( 16 ) // Chocobo_Red
  5840. break
  5841. case +3:
  5842. 0xB5( 17 ) // Chocobo_Navy
  5843. break
  5844. case +4:
  5845. 0xB5( 18 ) // Chocobo_Gold
  5846. break
  5847. }
  5848. SetObjectFlags( 7 )
  5849. return
  5850.  
  5851.  
  5852. #HW newfunction 30
  5853. Function Zidane_30
  5854. TurnTowardObject( 9, 16 ) // Moogle_Male
  5855. WaitTurn( )
  5856. return
  5857.  
  5858.  
  5859. #HW newfunction 31
  5860. Function Zidane_31
  5861. RunAnimation( 12760 ) // Cho_Seek_1
  5862. return
  5863.  
  5864.  
  5865. #HW newfunction 32
  5866. Function Zidane_32
  5867. RunAnimation( 12764 ) // Cho_Seek_2
  5868. return
  5869.  
  5870.  
  5871. #HW newfunction 33
  5872. Function Zidane_33
  5873. RunAnimation( 12768 ) // Cho_Seek_3
  5874. return
  5875.  
  5876.  
  5877. #HW newfunction 34
  5878. Function Zidane_34
  5879. RunAnimation( 12772 ) // Cho_Seek_4
  5880. return
  5881.  
  5882.  
  5883. #HW newfunction 35
  5884. Function Zidane_35
  5885. RunAnimation( 12776 ) // Cho_Seek_5
  5886. return
  5887.  
  5888.  
  5889. #HW newfunction 36
  5890. Function Zidane_36
  5891. switch 5 ( Chocobo_ChocoColor ) from 1 {
  5892. case +0:
  5893. 0xB5( 4 ) // Chocobo
  5894. break
  5895. case +1:
  5896. 0xB5( 15 ) // Chocobo_Blue
  5897. break
  5898. case +2:
  5899. 0xB5( 16 ) // Chocobo_Red
  5900. break
  5901. case +3:
  5902. 0xB5( 17 ) // Chocobo_Navy
  5903. break
  5904. case +4:
  5905. 0xB5( 18 ) // Chocobo_Gold
  5906. break
  5907. }
  5908. return
  5909.  
  5910.  
  5911. #HW newfunction 37
  5912. Function Zidane_37
  5913. SetTextVariable( 3, VAR_GlobInt16_4 * 80 )
  5914. SetTextVariable( 4, GetGil )
  5915. WindowAsync( 0, 16, 254 ) // "(0 guil)"
  5916. WindowAsync( 1, 0, 255 ) // "Guil attuali: 0"
  5917. while ( VAR_GlobInt16_6 == 1 ) {
  5918. SetTextVariable( 3, VAR_GlobInt16_4 * 80 )
  5919. Wait( 1 )
  5920. }
  5921. CloseWindow( 0 )
  5922. CloseWindow( 1 )
  5923. return
  5924.  
  5925.  
  5926. #HW newfunction 38
  5927. Function Zidane_38
  5928. WindowSync( 2, 128, 248 ) // "Zidane ─Oh... Scusami, ma non ho abbastanza guil."
  5929. return
RAW Paste Data