Advertisement
Guest User

frmEditor_Map

a guest
Feb 19th, 2013
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.32 KB | None | 0 0
  1. Option Explicit
  2.  
  3. Private Sub chkMapKey_Click()
  4. ' If debug mode, handle error then exit out
  5. If Options.Debug = 1 Then On Error GoTo errorhandler
  6.  
  7. KeyEditorTake = chkMapKey.value
  8.  
  9. ' Error handler
  10. Exit Sub
  11. errorhandler:
  12. HandleError "chkMapKey_Click", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  13. Err.Clear
  14. Exit Sub
  15. End Sub
  16.  
  17. Private Sub cmbHeal_Click()
  18. ' If debug mode, handle error then exit out
  19. If Options.Debug = 1 Then On Error GoTo errorhandler
  20.  
  21. MapEditorHealType = cmbHeal.ListIndex + 1
  22.  
  23. ' Error handler
  24. Exit Sub
  25. errorhandler:
  26. HandleError "cmbHeal_Click", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  27. Err.Clear
  28. Exit Sub
  29. End Sub
  30.  
  31. Private Sub cmbShop_Click()
  32. ' If debug mode, handle error then exit out
  33. If Options.Debug = 1 Then On Error GoTo errorhandler
  34.  
  35. EditorShop = cmbShop.ListIndex
  36.  
  37. ' Error handler
  38. Exit Sub
  39. errorhandler:
  40. HandleError "cmbShop_Click", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  41. Err.Clear
  42. Exit Sub
  43. End Sub
  44.  
  45. Private Sub cmbSlide_Click()
  46. ' If debug mode, handle error then exit out
  47. If Options.Debug = 1 Then On Error GoTo errorhandler
  48.  
  49. MapEditorSlideDir = cmbSlide.ListIndex
  50.  
  51. ' Error handler
  52. Exit Sub
  53. errorhandler:
  54. HandleError "cmbSlide_Click", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  55. Err.Clear
  56. Exit Sub
  57. End Sub
  58.  
  59. Private Sub cmdHeal_Click()
  60. ' If debug mode, handle error then exit out
  61. If Options.Debug = 1 Then On Error GoTo errorhandler
  62.  
  63. MapEditorHealType = cmbHeal.ListIndex + 1
  64. MapEditorHealAmount = scrlHeal.value
  65. picAttributes.Visible = False
  66. fraHeal.Visible = False
  67.  
  68. ' Error handler
  69. Exit Sub
  70. errorhandler:
  71. HandleError "cmdHeal_Click", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  72. Err.Clear
  73. Exit Sub
  74. End Sub
  75.  
  76. Private Sub cmdKeyOpen_Click()
  77. ' If debug mode, handle error then exit out
  78. If Options.Debug = 1 Then On Error GoTo errorhandler
  79.  
  80. KeyOpenEditorX = scrlKeyX.value
  81. KeyOpenEditorY = scrlKeyY.value
  82. picAttributes.Visible = False
  83. fraKeyOpen.Visible = False
  84.  
  85. ' Error handler
  86. Exit Sub
  87. errorhandler:
  88. HandleError "cmdKeyOpen_Click", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  89. Err.Clear
  90. Exit Sub
  91. End Sub
  92.  
  93. Private Sub cmdMapItem_Click()
  94. ' If debug mode, handle error then exit out
  95. If Options.Debug = 1 Then On Error GoTo errorhandler
  96.  
  97. ItemEditorNum = scrlMapItem.value
  98. ItemEditorValue = scrlMapItemValue.value
  99. picAttributes.Visible = False
  100. fraMapItem.Visible = False
  101.  
  102. ' Error handler
  103. Exit Sub
  104. errorhandler:
  105. HandleError "cmdMapItem_Click", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  106. Err.Clear
  107. Exit Sub
  108. End Sub
  109.  
  110. Private Sub cmdMapKey_Click()
  111. ' If debug mode, handle error then exit out
  112. If Options.Debug = 1 Then On Error GoTo errorhandler
  113.  
  114. KeyEditorNum = scrlMapKey.value
  115. KeyEditorTake = chkMapKey.value
  116. picAttributes.Visible = False
  117. fraMapKey.Visible = False
  118.  
  119. ' Error handler
  120. Exit Sub
  121. errorhandler:
  122. HandleError "cmdMapKey_Click", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  123. Err.Clear
  124. Exit Sub
  125. End Sub
  126.  
  127. Private Sub cmdMapWarp_Click()
  128. ' If debug mode, handle error then exit out
  129. If Options.Debug = 1 Then On Error GoTo errorhandler
  130.  
  131. EditorWarpMap = scrlMapWarp.value
  132. EditorWarpX = scrlMapWarpX.value
  133. EditorWarpY = scrlMapWarpY.value
  134. picAttributes.Visible = False
  135. fraMapWarp.Visible = False
  136.  
  137. ' Error handler
  138. Exit Sub
  139. errorhandler:
  140. HandleError "cmdMapWarp_Click", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  141. Err.Clear
  142. Exit Sub
  143. End Sub
  144.  
  145. Private Sub cmdNpcSpawn_Click()
  146. ' If debug mode, handle error then exit out
  147. If Options.Debug = 1 Then On Error GoTo errorhandler
  148.  
  149. SpawnNpcNum = lstNpc.ListIndex + 1
  150. SpawnNpcDir = scrlNpcDir.value
  151. picAttributes.Visible = False
  152. fraNpcSpawn.Visible = False
  153.  
  154. ' Error handler
  155. Exit Sub
  156. errorhandler:
  157. HandleError "cmdNpcSpawn_Click", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  158. Err.Clear
  159. Exit Sub
  160. End Sub
  161.  
  162. Private Sub cmdResourceOk_Click()
  163. ' If debug mode, handle error then exit out
  164. If Options.Debug = 1 Then On Error GoTo errorhandler
  165.  
  166. ResourceEditorNum = scrlResource.value
  167. picAttributes.Visible = False
  168. fraResource.Visible = False
  169.  
  170. ' Error handler
  171. Exit Sub
  172. errorhandler:
  173. HandleError "cmdResourceOk_Click", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  174. Err.Clear
  175. Exit Sub
  176. End Sub
  177.  
  178. Private Sub cmdShop_Click()
  179. ' If debug mode, handle error then exit out
  180. If Options.Debug = 1 Then On Error GoTo errorhandler
  181.  
  182. EditorShop = cmbShop.ListIndex
  183. picAttributes.Visible = False
  184. fraShop.Visible = False
  185.  
  186. ' Error handler
  187. Exit Sub
  188. errorhandler:
  189. HandleError "cmdShop_Click", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  190. Err.Clear
  191. Exit Sub
  192. End Sub
  193.  
  194. Private Sub cmdSlide_Click()
  195. ' If debug mode, handle error then exit out
  196. If Options.Debug = 1 Then On Error GoTo errorhandler
  197.  
  198. MapEditorSlideDir = cmbSlide.ListIndex
  199. picAttributes.Visible = False
  200. fraSlide.Visible = False
  201.  
  202. ' Error handler
  203. Exit Sub
  204. errorhandler:
  205. HandleError "cmdSlide_Click", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  206. Err.Clear
  207. Exit Sub
  208. End Sub
  209.  
  210. Private Sub cmdTrap_Click()
  211. ' If debug mode, handle error then exit out
  212. If Options.Debug = 1 Then On Error GoTo errorhandler
  213.  
  214. MapEditorHealAmount = scrlTrap.value
  215. picAttributes.Visible = False
  216. fraTrap.Visible = False
  217.  
  218. ' Error handler
  219. Exit Sub
  220. errorhandler:
  221. HandleError "cmdTrap_Click", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  222. Err.Clear
  223. Exit Sub
  224. End Sub
  225.  
  226. Private Sub Form_Load()
  227. ' If debug mode, handle error then exit out
  228. If Options.Debug = 1 Then On Error GoTo errorhandler
  229.  
  230. ' move the entire attributes box on screen
  231. picAttributes.Left = 8
  232. picAttributes.top = 8
  233.  
  234. ' Error handler
  235. Exit Sub
  236. errorhandler:
  237. HandleError "Form_Load", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  238. Err.Clear
  239. Exit Sub
  240. End Sub
  241.  
  242. Private Sub lstNpc_Click()
  243. ' If debug mode, handle error then exit out
  244. If Options.Debug = 1 Then On Error GoTo errorhandler
  245.  
  246. SpawnNpcNum = lstNpc.ListIndex + 1
  247.  
  248. ' Error handler
  249. Exit Sub
  250. errorhandler:
  251. HandleError "lstNpc_Click", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  252. Err.Clear
  253. Exit Sub
  254. End Sub
  255.  
  256. Private Sub optDoor_Click()
  257. ' If debug mode, handle error then exit out
  258. If Options.Debug = 1 Then On Error GoTo errorhandler
  259.  
  260. ClearAttributeDialogue
  261. picAttributes.Visible = True
  262. fraMapWarp.Visible = True
  263.  
  264. scrlMapWarp.max = MAX_MAPS
  265. scrlMapWarp.value = 1
  266. scrlMapWarpX.max = MAX_BYTE
  267. scrlMapWarpY.max = MAX_BYTE
  268. scrlMapWarpX.value = 0
  269. scrlMapWarpY.value = 0
  270.  
  271. ' Error handler
  272. Exit Sub
  273. errorhandler:
  274. HandleError "optDoor_Click", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  275. Err.Clear
  276. Exit Sub
  277. End Sub
  278.  
  279. Private Sub optHeal_Click()
  280. ' If debug mode, handle error then exit out
  281. If Options.Debug = 1 Then On Error GoTo errorhandler
  282.  
  283. ClearAttributeDialogue
  284. picAttributes.Visible = True
  285. fraHeal.Visible = True
  286.  
  287. ' Error handler
  288. Exit Sub
  289. errorhandler:
  290. HandleError "optHeal_Click", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  291. Err.Clear
  292. Exit Sub
  293. End Sub
  294.  
  295. Private Sub optLayers_Click()
  296. ' If debug mode, handle error then exit out
  297. If Options.Debug = 1 Then On Error GoTo errorhandler
  298.  
  299. If optLayers.value Then
  300. fraLayers.Visible = True
  301. fraAttribs.Visible = False
  302. End If
  303.  
  304. ' Error handler
  305. Exit Sub
  306. errorhandler:
  307. HandleError "optLayers_Click", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  308. Err.Clear
  309. Exit Sub
  310. End Sub
  311.  
  312. Private Sub optAttribs_Click()
  313. ' If debug mode, handle error then exit out
  314. If Options.Debug = 1 Then On Error GoTo errorhandler
  315.  
  316. If optAttribs.value Then
  317. fraLayers.Visible = False
  318. fraAttribs.Visible = True
  319. End If
  320.  
  321. ' Error handler
  322. Exit Sub
  323. errorhandler:
  324. HandleError "optAttribs_Click", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  325. Err.Clear
  326. Exit Sub
  327. End Sub
  328.  
  329. Private Sub optNpcSpawn_Click()
  330. Dim n As Long
  331.  
  332. ' If debug mode, handle error then exit out
  333. If Options.Debug = 1 Then On Error GoTo errorhandler
  334.  
  335. lstNpc.Clear
  336.  
  337. For n = 1 To MAX_MAP_NPCS
  338. If Map.Npc(n) > 0 Then
  339. lstNpc.AddItem n & ": " & Npc(Map.Npc(n)).name
  340. Else
  341. lstNpc.AddItem n & ": No Npc"
  342. End If
  343. Next n
  344.  
  345. scrlNpcDir.value = 0
  346. lstNpc.ListIndex = 0
  347.  
  348. ClearAttributeDialogue
  349. picAttributes.Visible = True
  350. fraNpcSpawn.Visible = True
  351.  
  352. ' Error handler
  353. Exit Sub
  354. errorhandler:
  355. HandleError "optNpcSpawn_Click", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  356. Err.Clear
  357. Exit Sub
  358. End Sub
  359.  
  360. Private Sub optResource_Click()
  361. ' If debug mode, handle error then exit out
  362. If Options.Debug = 1 Then On Error GoTo errorhandler
  363.  
  364. ClearAttributeDialogue
  365. picAttributes.Visible = True
  366. fraResource.Visible = True
  367.  
  368. ' Error handler
  369. Exit Sub
  370. errorhandler:
  371. HandleError "optResource_Click", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  372. Err.Clear
  373. Exit Sub
  374. End Sub
  375.  
  376. Private Sub optShop_Click()
  377. ' If debug mode, handle error then exit out
  378. If Options.Debug = 1 Then On Error GoTo errorhandler
  379.  
  380. ClearAttributeDialogue
  381. picAttributes.Visible = True
  382. fraShop.Visible = True
  383.  
  384. ' Error handler
  385. Exit Sub
  386. errorhandler:
  387. HandleError "optShop_Click", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  388. Err.Clear
  389. Exit Sub
  390. End Sub
  391.  
  392. Private Sub optSlide_Click()
  393. ' If debug mode, handle error then exit out
  394. If Options.Debug = 1 Then On Error GoTo errorhandler
  395.  
  396. ClearAttributeDialogue
  397. picAttributes.Visible = True
  398. fraSlide.Visible = True
  399.  
  400. ' Error handler
  401. Exit Sub
  402. errorhandler:
  403. HandleError "optSlide_Click", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  404. Err.Clear
  405. Exit Sub
  406. End Sub
  407.  
  408. Private Sub optTrap_Click()
  409. ' If debug mode, handle error then exit out
  410. If Options.Debug = 1 Then On Error GoTo errorhandler
  411.  
  412. ClearAttributeDialogue
  413. picAttributes.Visible = True
  414. fraTrap.Visible = True
  415.  
  416. ' Error handler
  417. Exit Sub
  418. errorhandler:
  419. HandleError "optTrap_Click", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  420. Err.Clear
  421. Exit Sub
  422. End Sub
  423.  
  424. Private Sub picBackSelect_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
  425. ' If debug mode, handle error then exit out
  426. If Options.Debug = 1 Then On Error GoTo errorhandler
  427.  
  428. Call MapEditorChooseTile(Button, x, y)
  429.  
  430. ' Error handler
  431. Exit Sub
  432. errorhandler:
  433. HandleError "picBackSelect_MouseDown", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  434. Err.Clear
  435. Exit Sub
  436. End Sub
  437.  
  438. Private Sub picBackSelect_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
  439. ' If debug mode, handle error then exit out
  440. If Options.Debug = 1 Then On Error GoTo errorhandler
  441.  
  442. shpLoc.top = (y \ PIC_Y) * PIC_Y
  443. shpLoc.Left = (x \ PIC_X) * PIC_X
  444. shpLoc.Visible = True
  445. Call MapEditorDrag(Button, x, y)
  446.  
  447. ' Error handler
  448. Exit Sub
  449. errorhandler:
  450. HandleError "picBackSelect_MouseMove", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  451. Err.Clear
  452. Exit Sub
  453. End Sub
  454.  
  455. Private Sub cmdSend_Click()
  456. ' If debug mode, handle error then exit out
  457. If Options.Debug = 1 Then On Error GoTo errorhandler
  458.  
  459. Call MapEditorSend
  460.  
  461. ' Error handler
  462. Exit Sub
  463. errorhandler:
  464. HandleError "cmdSend_Click", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  465. Err.Clear
  466. Exit Sub
  467. End Sub
  468.  
  469. Private Sub cmdCancel_Click()
  470. ' If debug mode, handle error then exit out
  471. If Options.Debug = 1 Then On Error GoTo errorhandler
  472.  
  473. Call MapEditorCancel
  474.  
  475. ' Error handler
  476. Exit Sub
  477. errorhandler:
  478. HandleError "cmdCancel_Click", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  479. Err.Clear
  480. Exit Sub
  481. End Sub
  482.  
  483. Private Sub cmdProperties_Click()
  484. ' If debug mode, handle error then exit out
  485. If Options.Debug = 1 Then On Error GoTo errorhandler
  486.  
  487. Load frmEditor_MapProperties
  488. MapEditorProperties
  489. frmEditor_MapProperties.Show vbModal
  490.  
  491. ' Error handler
  492. Exit Sub
  493. errorhandler:
  494. HandleError "cmdProperties_Click", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  495. Err.Clear
  496. Exit Sub
  497. End Sub
  498.  
  499. Private Sub optWarp_Click()
  500. ' If debug mode, handle error then exit out
  501. If Options.Debug = 1 Then On Error GoTo errorhandler
  502.  
  503. ClearAttributeDialogue
  504. picAttributes.Visible = True
  505. fraMapWarp.Visible = True
  506.  
  507. scrlMapWarp.max = MAX_MAPS
  508. scrlMapWarp.value = 1
  509. scrlMapWarpX.max = MAX_BYTE
  510. scrlMapWarpY.max = MAX_BYTE
  511. scrlMapWarpX.value = 0
  512. scrlMapWarpY.value = 0
  513.  
  514. ' Error handler
  515. Exit Sub
  516. errorhandler:
  517. HandleError "optWarp_Click", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  518. Err.Clear
  519. Exit Sub
  520. End Sub
  521.  
  522. Private Sub optItem_Click()
  523. ' If debug mode, handle error then exit out
  524. If Options.Debug = 1 Then On Error GoTo errorhandler
  525.  
  526. ClearAttributeDialogue
  527. picAttributes.Visible = True
  528. fraMapItem.Visible = True
  529.  
  530. scrlMapItem.max = MAX_ITEMS
  531. scrlMapItem.value = 1
  532. lblMapItem.Caption = Trim$(Item(scrlMapItem.value).name) & " x" & scrlMapItemValue.value
  533. EditorMap_BltMapItem
  534.  
  535. ' Error handler
  536. Exit Sub
  537. errorhandler:
  538. HandleError "optItem_Click", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  539. Err.Clear
  540. Exit Sub
  541. End Sub
  542.  
  543. Private Sub optKey_Click()
  544. ' If debug mode, handle error then exit out
  545. If Options.Debug = 1 Then On Error GoTo errorhandler
  546.  
  547. ClearAttributeDialogue
  548. picAttributes.Visible = True
  549. fraMapKey.Visible = True
  550.  
  551. scrlMapKey.max = MAX_ITEMS
  552. scrlMapKey.value = 1
  553. chkMapKey.value = 1
  554. EditorMap_BltKey
  555. lblMapKey.Caption = "Item: " & Trim$(Item(scrlMapKey.value).name)
  556.  
  557. ' Error handler
  558. Exit Sub
  559. errorhandler:
  560. HandleError "optKey_Click", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  561. Err.Clear
  562. Exit Sub
  563. End Sub
  564.  
  565. Private Sub optKeyOpen_Click()
  566. ' If debug mode, handle error then exit out
  567. If Options.Debug = 1 Then On Error GoTo errorhandler
  568.  
  569. ClearAttributeDialogue
  570. fraKeyOpen.Visible = True
  571. picAttributes.Visible = True
  572.  
  573. scrlKeyX.max = Map.MaxX
  574. scrlKeyY.max = Map.MaxY
  575. scrlKeyX.value = 0
  576. scrlKeyY.value = 0
  577.  
  578. ' Error handler
  579. Exit Sub
  580. errorhandler:
  581. HandleError "optKeyOpen_Click", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  582. Err.Clear
  583. Exit Sub
  584. End Sub
  585.  
  586. Private Sub cmdFill_Click()
  587. ' If debug mode, handle error then exit out
  588. If Options.Debug = 1 Then On Error GoTo errorhandler
  589.  
  590. MapEditorFillLayer
  591.  
  592. ' Error handler
  593. Exit Sub
  594. errorhandler:
  595. HandleError "cmdFill_Click", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  596. Err.Clear
  597. Exit Sub
  598. End Sub
  599.  
  600. Private Sub cmdClear_Click()
  601. ' If debug mode, handle error then exit out
  602. If Options.Debug = 1 Then On Error GoTo errorhandler
  603.  
  604. Call MapEditorClearLayer
  605.  
  606. ' Error handler
  607. Exit Sub
  608. errorhandler:
  609. HandleError "cmdClear_Click", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  610. Err.Clear
  611. Exit Sub
  612. End Sub
  613.  
  614. Private Sub cmdClear2_Click()
  615. ' If debug mode, handle error then exit out
  616. If Options.Debug = 1 Then On Error GoTo errorhandler
  617.  
  618. Call MapEditorClearAttribs
  619.  
  620. ' Error handler
  621. Exit Sub
  622. errorhandler:
  623. HandleError "cmdClear2_Click", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  624. Err.Clear
  625. Exit Sub
  626. End Sub
  627.  
  628. Private Sub scrlHeal_Change()
  629. ' If debug mode, handle error then exit out
  630. If Options.Debug = 1 Then On Error GoTo errorhandler
  631.  
  632. lblHeal.Caption = "Amount: " & scrlHeal.value
  633. MapEditorHealAmount = scrlHeal.value
  634.  
  635. ' Error handler
  636. Exit Sub
  637. errorhandler:
  638. HandleError "scrlHeal_Change", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  639. Err.Clear
  640. Exit Sub
  641. End Sub
  642.  
  643. Private Sub scrlKeyX_Change()
  644. ' If debug mode, handle error then exit out
  645. If Options.Debug = 1 Then On Error GoTo errorhandler
  646.  
  647. lblKeyX.Caption = "X: " & scrlKeyX.value
  648. KeyOpenEditorX = scrlKeyX.value
  649.  
  650. ' Error handler
  651. Exit Sub
  652. errorhandler:
  653. HandleError "scrlKeyX_Change", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  654. Err.Clear
  655. Exit Sub
  656. End Sub
  657.  
  658. Private Sub scrlKeyX_Scroll()
  659. ' If debug mode, handle error then exit out
  660. If Options.Debug = 1 Then On Error GoTo errorhandler
  661.  
  662. scrlKeyX_Change
  663.  
  664. ' Error handler
  665. Exit Sub
  666. errorhandler:
  667. HandleError "scrlKeyX_Scroll", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  668. Err.Clear
  669. Exit Sub
  670. End Sub
  671.  
  672. Private Sub scrlKeyY_Change()
  673. ' If debug mode, handle error then exit out
  674. If Options.Debug = 1 Then On Error GoTo errorhandler
  675.  
  676. lblKeyY.Caption = "Y: " & scrlKeyY.value
  677.  
  678. ' Error handler
  679. Exit Sub
  680. errorhandler:
  681. HandleError "scrlKeyY_Change", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  682. Err.Clear
  683. Exit Sub
  684. End Sub
  685.  
  686. Private Sub scrlKeyY_Scroll()
  687. ' If debug mode, handle error then exit out
  688. If Options.Debug = 1 Then On Error GoTo errorhandler
  689.  
  690. scrlKeyY_Change
  691.  
  692. ' Error handler
  693. Exit Sub
  694. errorhandler:
  695. HandleError "scrlKeyY_Scroll", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  696. Err.Clear
  697. Exit Sub
  698. End Sub
  699.  
  700. Private Sub scrlTrap_Change()
  701. ' If debug mode, handle error then exit out
  702. If Options.Debug = 1 Then On Error GoTo errorhandler
  703.  
  704. lblTrap.Caption = "Amount: " & scrlTrap.value
  705. MapEditorHealAmount = scrlTrap.value
  706.  
  707. ' Error handler
  708. Exit Sub
  709. errorhandler:
  710. HandleError "scrlTrap_Change", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  711. Err.Clear
  712. Exit Sub
  713. End Sub
  714.  
  715. Private Sub scrlMapItem_Change()
  716. ' If debug mode, handle error then exit out
  717. If Options.Debug = 1 Then On Error GoTo errorhandler
  718.  
  719. If Item(scrlMapItem.value).Type = ITEM_TYPE_CURRENCY Then
  720. scrlMapItemValue.Enabled = True
  721. Else
  722. scrlMapItemValue.value = 1
  723. scrlMapItemValue.Enabled = False
  724. End If
  725.  
  726. EditorMap_BltMapItem
  727. lblMapItem.Caption = Trim$(Item(scrlMapItem.value).name) & " x" & scrlMapItemValue.value
  728. ItemEditorNum = scrlMapItem.value
  729.  
  730. ' Error handler
  731. Exit Sub
  732. errorhandler:
  733. HandleError "scrlMapItem_Change", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  734. Err.Clear
  735. Exit Sub
  736. End Sub
  737.  
  738. Private Sub scrlMapItem_Scroll()
  739. ' If debug mode, handle error then exit out
  740. If Options.Debug = 1 Then On Error GoTo errorhandler
  741.  
  742. scrlMapItem_Change
  743.  
  744. ' Error handler
  745. Exit Sub
  746. errorhandler:
  747. HandleError "scrlMapItem_Scroll", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  748. Err.Clear
  749. Exit Sub
  750. End Sub
  751.  
  752. Private Sub scrlMapItemValue_Change()
  753. ' If debug mode, handle error then exit out
  754. If Options.Debug = 1 Then On Error GoTo errorhandler
  755.  
  756. lblMapItem.Caption = Trim$(Item(scrlMapItem.value).name) & " x" & scrlMapItemValue.value
  757. ItemEditorValue = scrlMapItemValue.value
  758.  
  759. ' Error handler
  760. Exit Sub
  761. errorhandler:
  762. HandleError "scrlMapItemValue_change", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  763. Err.Clear
  764. Exit Sub
  765. End Sub
  766.  
  767. Private Sub scrlMapItemValue_Scroll()
  768. ' If debug mode, handle error then exit out
  769. If Options.Debug = 1 Then On Error GoTo errorhandler
  770.  
  771. scrlMapItemValue_Change
  772.  
  773. ' Error handler
  774. Exit Sub
  775. errorhandler:
  776. HandleError "scrlMapItemValue_Scroll", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  777. Err.Clear
  778. Exit Sub
  779. End Sub
  780.  
  781. Private Sub scrlMapKey_Change()
  782. ' If debug mode, handle error then exit out
  783. If Options.Debug = 1 Then On Error GoTo errorhandler
  784.  
  785. lblMapKey.Caption = "Item: " & Trim$(Item(scrlMapKey.value).name)
  786. KeyEditorNum = scrlMapKey.value
  787.  
  788. ' Error handler
  789. Exit Sub
  790. errorhandler:
  791. HandleError "scrlMapKey_Change", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  792. Err.Clear
  793. Exit Sub
  794. End Sub
  795.  
  796. Private Sub scrlMapKey_Scroll()
  797. ' If debug mode, handle error then exit out
  798. If Options.Debug = 1 Then On Error GoTo errorhandler
  799.  
  800. scrlMapKey_Change
  801.  
  802. ' Error handler
  803. Exit Sub
  804. errorhandler:
  805. HandleError "scrlMapKey_Scroll", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  806. Err.Clear
  807. Exit Sub
  808. End Sub
  809.  
  810. Private Sub scrlMapWarp_Change()
  811. ' If debug mode, handle error then exit out
  812. If Options.Debug = 1 Then On Error GoTo errorhandler
  813.  
  814. lblMapWarp.Caption = "Map: " & scrlMapWarp.value
  815. EditorWarpMap = scrlMapWarp.value
  816.  
  817. ' Error handler
  818. Exit Sub
  819. errorhandler:
  820. HandleError "scrlMapWarp_Change", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  821. Err.Clear
  822. Exit Sub
  823. End Sub
  824.  
  825. Private Sub scrlMapWarp_Scroll()
  826. ' If debug mode, handle error then exit out
  827. If Options.Debug = 1 Then On Error GoTo errorhandler
  828.  
  829. scrlMapWarp_Change
  830.  
  831. ' Error handler
  832. Exit Sub
  833. errorhandler:
  834. HandleError "scrlMapWarp_Scroll", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  835. Err.Clear
  836. Exit Sub
  837. End Sub
  838.  
  839. Private Sub scrlMapWarpX_Change()
  840. ' If debug mode, handle error then exit out
  841. If Options.Debug = 1 Then On Error GoTo errorhandler
  842.  
  843. lblMapWarpX.Caption = "X: " & scrlMapWarpX.value
  844. EditorWarpX = scrlMapWarpX.value
  845.  
  846. ' Error handler
  847. Exit Sub
  848. errorhandler:
  849. HandleError "scrlMapWarpX_Change", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  850. Err.Clear
  851. Exit Sub
  852. End Sub
  853.  
  854. Private Sub scrlMapWarpX_Scroll()
  855. ' If debug mode, handle error then exit out
  856. If Options.Debug = 1 Then On Error GoTo errorhandler
  857.  
  858. scrlMapWarpX_Change
  859.  
  860. ' Error handler
  861. Exit Sub
  862. errorhandler:
  863. HandleError "scrlMapWarpX_Scroll", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  864. Err.Clear
  865. Exit Sub
  866. End Sub
  867.  
  868. Private Sub scrlMapWarpY_Change()
  869. ' If debug mode, handle error then exit out
  870. If Options.Debug = 1 Then On Error GoTo errorhandler
  871.  
  872. lblMapWarpY.Caption = "Y: " & scrlMapWarpY.value
  873. EditorWarpY = scrlMapWarpY.value
  874.  
  875. ' Error handler
  876. Exit Sub
  877. errorhandler:
  878. HandleError "scrlMapWarpY_Change", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  879. Err.Clear
  880. Exit Sub
  881. End Sub
  882.  
  883. Private Sub scrlMapWarpY_Scroll()
  884. ' If debug mode, handle error then exit out
  885. If Options.Debug = 1 Then On Error GoTo errorhandler
  886.  
  887. scrlMapWarpY_Change
  888.  
  889. ' Error handler
  890. Exit Sub
  891. errorhandler:
  892. HandleError "scrlMapWarpY_Scroll", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  893. Err.Clear
  894. Exit Sub
  895. End Sub
  896.  
  897. Private Sub scrlNpcDir_Change()
  898. ' If debug mode, handle error then exit out
  899. If Options.Debug = 1 Then On Error GoTo errorhandler
  900.  
  901. Select Case scrlNpcDir.value
  902. Case DIR_DOWN
  903. lblNpcDir = "Direction: Down"
  904. Case DIR_UP
  905. lblNpcDir = "Direction: Up"
  906. Case DIR_LEFT
  907. lblNpcDir = "Direction: Left"
  908. Case DIR_RIGHT
  909. lblNpcDir = "Direction: Right"
  910. End Select
  911. SpawnNpcDir = scrlNpcDir.value
  912.  
  913. ' Error handler
  914. Exit Sub
  915. errorhandler:
  916. HandleError "scrlNpcDir_Change", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  917. Err.Clear
  918. Exit Sub
  919. End Sub
  920.  
  921. Private Sub scrlNpcDir_Scroll()
  922. ' If debug mode, handle error then exit out
  923. If Options.Debug = 1 Then On Error GoTo errorhandler
  924.  
  925. scrlNpcDir_Change
  926.  
  927. ' Error handler
  928. Exit Sub
  929. errorhandler:
  930. HandleError "scrlNpcDir_Scroll", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  931. Err.Clear
  932. Exit Sub
  933. End Sub
  934.  
  935. Private Sub scrlResource_Change()
  936. ' If debug mode, handle error then exit out
  937. If Options.Debug = 1 Then On Error GoTo errorhandler
  938.  
  939. lblResource.Caption = "Resource: " & Resource(scrlResource.value).name
  940. ResourceEditorNum = scrlResource.value
  941.  
  942. ' Error handler
  943. Exit Sub
  944. errorhandler:
  945. HandleError "scrlResource_Change", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  946. Err.Clear
  947. Exit Sub
  948. End Sub
  949.  
  950. Private Sub scrlResource_Scroll()
  951. ' If debug mode, handle error then exit out
  952. If Options.Debug = 1 Then On Error GoTo errorhandler
  953.  
  954. scrlResource_Change
  955.  
  956. ' Error handler
  957. Exit Sub
  958. errorhandler:
  959. HandleError "scrlResource_Scroll", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  960. Err.Clear
  961. Exit Sub
  962. End Sub
  963.  
  964. Private Sub scrlPictureX_Change()
  965. ' If debug mode, handle error then exit out
  966. If Options.Debug = 1 Then On Error GoTo errorhandler
  967.  
  968. Call MapEditorTileScroll
  969.  
  970. ' Error handler
  971. Exit Sub
  972. errorhandler:
  973. HandleError "scrlPictureX_Change", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  974. Err.Clear
  975. Exit Sub
  976. End Sub
  977.  
  978. Private Sub scrlPictureY_Change()
  979. ' If debug mode, handle error then exit out
  980. If Options.Debug = 1 Then On Error GoTo errorhandler
  981.  
  982. Call MapEditorTileScroll
  983.  
  984. ' Error handler
  985. Exit Sub
  986. errorhandler:
  987. HandleError "scrlPictureY_Change", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  988. Err.Clear
  989. Exit Sub
  990. End Sub
  991.  
  992. Private Sub scrlPictureX_Scroll()
  993. ' If debug mode, handle error then exit out
  994. If Options.Debug = 1 Then On Error GoTo errorhandler
  995.  
  996. scrlPictureY_Change
  997.  
  998. ' Error handler
  999. Exit Sub
  1000. errorhandler:
  1001. HandleError "scrlPictureX_Scroll", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  1002. Err.Clear
  1003. Exit Sub
  1004. End Sub
  1005.  
  1006. Private Sub scrlPictureY_Scroll()
  1007. ' If debug mode, handle error then exit out
  1008. If Options.Debug = 1 Then On Error GoTo errorhandler
  1009.  
  1010. scrlPictureY_Change
  1011.  
  1012. ' Error handler
  1013. Exit Sub
  1014. errorhandler:
  1015. HandleError "scrlPictureY_Scroll", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  1016. Err.Clear
  1017. Exit Sub
  1018. End Sub
  1019.  
  1020. Private Sub scrlTileSet_Change()
  1021. ' If debug mode, handle error then exit out
  1022. If Options.Debug = 1 Then On Error GoTo errorhandler
  1023.  
  1024. fraTileSet.Caption = "Tileset: " & scrlTileSet.value
  1025.  
  1026. Call EditorMap_BltTileset
  1027.  
  1028. frmEditor_Map.scrlPictureY.max = (frmEditor_Map.picBackSelect.height \ PIC_Y) - (frmEditor_Map.picBack.height \ PIC_Y)
  1029. frmEditor_Map.scrlPictureX.max = (frmEditor_Map.picBackSelect.width \ PIC_X) - (frmEditor_Map.picBack.width \ PIC_X)
  1030.  
  1031. MapEditorTileScroll
  1032.  
  1033. frmEditor_Map.picBackSelect.Left = 0
  1034. frmEditor_Map.picBackSelect.top = 0
  1035.  
  1036. ' Error handler
  1037. Exit Sub
  1038. errorhandler:
  1039. HandleError "scrlTileSet_Change", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  1040. Err.Clear
  1041. Exit Sub
  1042. End Sub
  1043.  
  1044. Private Sub scrlTileSet_Scroll()
  1045. ' If debug mode, handle error then exit out
  1046. If Options.Debug = 1 Then On Error GoTo errorhandler
  1047.  
  1048. scrlTileSet_Change
  1049.  
  1050. ' Error handler
  1051. Exit Sub
  1052. errorhandler:
  1053. HandleError "scrlTileSet_Scroll", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
  1054. Err.Clear
  1055. Exit Sub
  1056. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement