Guest User

Untitled

a guest
Oct 20th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.52 KB | None | 0 0
  1. ;**************************************************************************
  2. ;**************************************************************************
  3. ;***** Script: Tailoring magical sets script *******************
  4. ;***** Author: Rhino *******************
  5. ;***** Last update: 2 jan 2010 *******************
  6. ;***** Version: 2.2 *******************
  7. ;***** Shard: Neverlands Reborn *******************
  8. ;**************************************************************************
  9. ;**************************************************************************
  10. ;************************ Startup menu **********************************
  11. ;**************************************************************************
  12.  
  13. menu Window Title Rhino's tailorscript ©
  14. menu Window Size 275 275
  15. menu show 100 100
  16. menu Font Name MS Sans Serif
  17. menu Font Size 8
  18. menu font style b
  19. set #SYSMSGCOL 88
  20. menu Text ClothText 10 10 Select what cloth you want to tailor:
  21. menu font style
  22. menu check ShirtChk 10 30 70 15 #true Shirts
  23. menu check KiltChk 10 45 70 15 #true Kilts
  24. menu check SashChk 75 30 70 15 #true Sashes
  25. menu check CloakChk 75 45 70 15 #true Cloaks
  26. menu check ApronChk 140 30 70 15 #true Aprons
  27. menu font style b
  28. menu Text JewelText 10 65 Select what jewels you use:
  29. menu font style
  30. menu check TailorChk 10 85 120 15 #true Tailor Jewel
  31. menu Button TailorBtn 125 85 35 15 Set!
  32. menu Font Name MS Sans Serif
  33. menu Font Size 8
  34. menu check MageryChk 10 102 120 15 #true Magery Jewel
  35. menu Button MageryBtn 125 102 35 15 Set!
  36. menu font style b
  37. menu Text MageryText 165 102 *MageryJewel
  38. menu Text TailorText 165 85 *TailorJewel
  39. menu Text JewelText 10 127 Personal settings:
  40. menu font style
  41. menu Text BlueText 10 147 Bluerune ID:
  42. menu Text BrownText 10 162 Brownrune ID:
  43. menu Text ChestText 10 177 Tailorchest ID:
  44. menu Text VendorText 10 192 Vendor ID:
  45. menu font style b
  46. menu Text BlueText2 90 147 *bluerune
  47. menu Text BrownText2 90 162 *sellrune
  48. menu Text ChestText2 90 177 *bag
  49. menu Text VendorText2 90 192 *vendor
  50. menu font style
  51. menu Button BlueBtn 165 147 35 15 Set!
  52. menu Button BrownBtn 165 162 35 15 Set!
  53. menu Button BagBtn 165 177 35 15 Set!
  54. menu Button VendorBtn 165 192 35 15 Set!
  55. menu font style b
  56. menu Font Size 12
  57. menu Button StartBtn 100 225 80 30 Start!
  58. menu Font Size 8
  59.  
  60. set %start #false
  61. repeat
  62. {
  63. if #MENUBUTTON = TailorBtn
  64. {
  65. set #TARGCURS 1
  66. event sysMessage Please target your Tailoring jewel.
  67. repeat
  68. until #TARGCURS = 0
  69. set *TailorJewel #LTARGETID
  70. menu delete TailorText
  71. menu Text TailorText 165 85 *TailorJewel
  72. set #MENUBUTTON N/A
  73. }
  74. if #MENUBUTTON = MageryBtn
  75. {
  76. set #TARGCURS 1
  77. event sysMessage Please target your Magery jewel.
  78. repeat
  79. until #TARGCURS = 0
  80. set *MageryJewel #LTARGETID
  81. menu delete MageryText
  82. menu Text MageryText 165 102 *MageryJewel
  83. set #MENUBUTTON N/A
  84. }
  85. if #MENUBUTTON = BlueBtn
  86. {
  87. set #TARGCURS 1
  88. event sysMessage Please target your blue rune to your tailoring corner.
  89. repeat
  90. until #TARGCURS = 0
  91. set *bluerune #LTARGETID
  92. menu delete BlueText2
  93. menu Text BlueText2 90 147 *bluerune
  94. set #MENUBUTTON N/A
  95. }
  96. if #MENUBUTTON = BrownBtn
  97. {
  98. set #TARGCURS 1
  99. event sysMessage Please target the brown rune to a weaver vendor.
  100. repeat
  101. until #TARGCURS = 0
  102. set *sellrune #LTARGETID
  103. menu delete BrownText2
  104. menu Text BrownText2 90 162 *sellrune
  105. set #MENUBUTTON N/A
  106. }
  107. if #MENUBUTTON = BagBtn
  108. {
  109. set #TARGCURS 1
  110. event sysMessage Please target the chest to drop magical items into.
  111. repeat
  112. until #TARGCURS = 0
  113. set *bag #LTARGETID
  114. menu delete ChestText2
  115. menu Text ChestText2 90 177 *bag
  116. set #MENUBUTTON N/A
  117. }
  118. if #MENUBUTTON = VendorBtn
  119. {
  120. set #TARGCURS 1
  121. event sysMessage Please target the weaver vendor where your rune recalls to.
  122. repeat
  123. until #TARGCURS = 0
  124. set *vendor #LTARGETID
  125. menu delete VendorText2
  126. menu Text VendorText2 90 192 *vendor
  127. set #MENUBUTTON N/A
  128. }
  129. if #MENUBUTTON = StartBtn
  130. {
  131. menu get ShirtChk
  132. set %ShirtCheck #menures
  133. menu get KiltChk
  134. set %KiltCheck #menures
  135. menu get SashChk
  136. set %SashCheck #menures
  137. menu get CloakChk
  138. set %CloakCheck #menures
  139. menu get ApronChk
  140. set %ApronCheck #menures
  141. menu get TailorChk
  142. set %UseTailorJewel #menures
  143. menu get MageryChk
  144. set %UseMageryJewel #menures
  145. menu hide
  146. set #MENUBUTTON N/A
  147. set %start #true
  148. }
  149. }
  150. until %start = #true
  151.  
  152. ;**************************************************************************
  153. ;*************************** Global Variables ***************************
  154. ;**************************************************************************
  155.  
  156. set %cloth CUI
  157. set %sash FZH
  158. set %apron XDI
  159. set %cloak DCI
  160. set %kilt LDI
  161. set %shirt TQL
  162. set %allclothing FZH_DCI_LDI_TQL_XDI
  163. set %magiccolor 2
  164. set %sewingkit HAG
  165. set %magical 0
  166. set %total 0
  167. set %food EDF_QQD_FWI_UWI_TWI_KPE_MQE_UQE_CWE_KPE_ZPE_AXI_YWI_WLI_ACG_QRD_NRD_FUD_WBG_JQE
  168.  
  169. ;**************************************************************************
  170. ;************************ Script Using Subs *******************************
  171. ;**************************************************************************
  172.  
  173. Start:
  174.  
  175. if %ShirtCheck
  176. {
  177. GoSub Hunger
  178. GoSub EquipJewel
  179. GoSub TailorShirt
  180. wait 40
  181. GoSub UnQuipJewel
  182. wait 40
  183. GoSub Selling
  184. }
  185.  
  186. if %KiltCheck
  187. {
  188. GoSub Hunger
  189. GoSub EquipJewel
  190. GoSub TailorKilt
  191. wait 40
  192. GoSub UnQuipJewel
  193. wait 40
  194. GoSub Selling
  195. }
  196.  
  197. if %SashCheck
  198. {
  199. GoSub Hunger
  200. GoSub EquipJewel
  201. GoSub TailorSash
  202. wait 40
  203. GoSub UnQuipJewel
  204. wait 40
  205. GoSub Selling
  206. }
  207.  
  208. if %CloakCheck
  209. {
  210. GoSub Hunger
  211. GoSub EquipJewel
  212. GoSub TailorCloak
  213. wait 40
  214. GoSub UnQuipJewel
  215. wait 40
  216. GoSub Selling
  217. }
  218.  
  219. if %ApronCheck
  220. {
  221. GoSub Hunger
  222. GoSub EquipJewel
  223. GoSub TailorApron
  224. wait 40
  225. GoSub UnQuipJewel
  226. wait 40
  227. GoSub Selling
  228. }
  229.  
  230. GoTo Start
  231.  
  232.  
  233. ;**************************************************************************
  234. ;************************** Subs Defined **********************************
  235. ;**************************************************************************
  236.  
  237. Sub TailorShirt
  238. FindItem %sewingkit C_ , #BACKPACKID
  239. Set #LOBJECTID #FINDID
  240. event macro 17 0 ;Last Object
  241.  
  242. target 5s
  243.  
  244. finditem %cloth G_2
  245. if #findkind = -1
  246. {
  247. event sysMessage There is no more cloth around you, script is halting.
  248. halt
  249. }
  250. set #LTARGETID #FINDID
  251. event macro 22 0
  252.  
  253. Repeat
  254. Until #CONTNAME = generic_gump
  255.  
  256. wait 20
  257. click 121 130 dmc
  258. wait 20
  259. click 219 208 dmc
  260.  
  261. set %quantity 0
  262. repeat
  263. {
  264. finditem %shirt C_ , #BACKPACKID
  265. wait 10
  266. if #FINDKIND <> -1
  267. {
  268. if #findCol <> 0
  269. {
  270. Exevent Drag #findid #findstack
  271. wait 10
  272. Exevent Dropc *bag
  273. wait 10
  274. set %magical %magical + 1
  275. }
  276. set %quantity %quantity + 1
  277. set %total %total + 1
  278. ignoreItem #FINDID 1
  279. if %quantity = 33 || %quantity = 66
  280. {
  281. Event sysmessage You tailored %total pieces of clothing, from which %magical were magical.
  282. event macro 19 0
  283. }
  284. }
  285. }
  286. until %quantity = 100
  287. ignoreitem reset
  288. return
  289.  
  290. ;**************************************************************************
  291.  
  292. Sub TailorKilt
  293. FindItem %sewingkit C_ , #BACKPACKID
  294. Set #LOBJECTID #FINDID
  295. event macro 17 0 ;Last Object
  296.  
  297. target 5s
  298.  
  299. finditem %cloth G_2
  300. if #findkind = -1
  301. {
  302. event sysMessage There is no more cloth around you, script is halting.
  303. halt
  304. }
  305. set #LTARGETID #FINDID
  306. event macro 22 0
  307.  
  308. Repeat
  309. Until #CONTNAME = generic_gump
  310.  
  311. wait 20
  312. click 266 130 dmc
  313. wait 20
  314. click 159 304 dmc
  315.  
  316. set %quantity 0
  317. repeat
  318. {
  319. finditem %kilt C_ , #BACKPACKID
  320. wait 10
  321. if #FINDKIND <> -1
  322. {
  323. if #findCol <> 0
  324. {
  325. Exevent Drag #findid #findstack
  326. wait 10
  327. Exevent Dropc *bag
  328. wait 10
  329. set %magical %magical + 1
  330. }
  331. set %quantity %quantity + 1
  332. set %total %total + 1
  333. ignoreItem #FINDID 1
  334. if %quantity = 33 || %quantity = 66
  335. {
  336. Event sysmessage You tailored %total pieces of clothing, from which %magical were magical.
  337. event macro 19 0
  338. }
  339. }
  340. }
  341. until %quantity = 100
  342. ignoreitem reset
  343. return
  344.  
  345. ;**************************************************************************
  346.  
  347. Sub TailorSash
  348. FindItem %sewingkit C_ , #BACKPACKID
  349. Set #LOBJECTID #FINDID
  350. event macro 17 0 ;Last Object
  351.  
  352. target 5s
  353.  
  354. finditem %cloth G_2
  355. if #findkind = -1
  356. {
  357. event sysMessage There is no more cloth around you, script is halting.
  358. halt
  359. }
  360. set #LTARGETID #FINDID
  361. event macro 22 0
  362.  
  363. Repeat
  364. Until #CONTNAME = generic_gump
  365.  
  366. wait 20
  367. click 198 361 dmc
  368. wait 20
  369. click 158 207 dmc
  370.  
  371. set %quantity 0
  372. repeat
  373. {
  374. finditem %sash C_ , #BACKPACKID
  375. wait 10
  376. if #FINDKIND <> -1
  377. {
  378. if #findCol <> 0
  379. {
  380. Exevent Drag #findid #findstack
  381. wait 10
  382. Exevent Dropc *bag
  383. wait 10
  384. set %magical %magical + 1
  385. }
  386. set %quantity %quantity + 1
  387. set %total %total + 1
  388. ignoreItem #FINDID 1
  389. if %quantity = 33 || %quantity = 66
  390. {
  391. Event sysmessage You tailored %total pieces of clothing, from which %magical were magical.
  392. event macro 19 0
  393. }
  394. }
  395. }
  396. until %quantity = 100
  397. ignoreitem reset
  398. return
  399.  
  400. ;**************************************************************************
  401.  
  402. Sub TailorCloak
  403. FindItem %sewingkit C_ , #BACKPACKID
  404. Set #LOBJECTID #FINDID
  405. event macro 17 0 ;Last Object
  406.  
  407. target 5s
  408.  
  409. finditem %cloth G_2
  410. if #findkind = -1
  411. {
  412. event sysMessage There is no more cloth around you, script is halting.
  413. halt
  414. }
  415. set #LTARGETID #FINDID
  416. event macro 22 0
  417.  
  418. Repeat
  419. Until #CONTNAME = generic_gump
  420.  
  421. wait 20
  422. click 119 132 dmc
  423. wait 20
  424. click 119 303 dmc
  425.  
  426. set %quantity 0
  427. repeat
  428. {
  429. finditem %cloak C_ , #BACKPACKID
  430. wait 10
  431. if #FINDKIND <> -1
  432. {
  433. if #findCol <> 0
  434. {
  435. Exevent Drag #findid #findstack
  436. wait 10
  437. Exevent Dropc *bag
  438. wait 10
  439. set %magical %magical + 1
  440. }
  441. set %quantity %quantity + 1
  442. set %total %total + 1
  443. ignoreItem #FINDID 1
  444. if %quantity = 33 || %quantity = 66
  445. {
  446. Event sysmessage You tailored %total pieces of clothing, from which %magical were magical.
  447. event macro 19 0
  448. }
  449. }
  450. }
  451. until %quantity = 100
  452. ignoreitem reset
  453. return
  454.  
  455. ;**************************************************************************
  456.  
  457. Sub TailorApron
  458. FindItem %sewingkit C_ , #BACKPACKID
  459. Set #LOBJECTID #FINDID
  460. event macro 17 0 ;Last Object
  461.  
  462. target 5s
  463.  
  464. finditem %cloth G_2
  465. if #findkind = -1
  466. {
  467. event sysMessage There is no more cloth around you, script is halting.
  468. halt
  469. }
  470. set #LTARGETID #FINDID
  471. event macro 22 0
  472.  
  473. Repeat
  474. Until #CONTNAME = generic_gump
  475.  
  476. wait 20
  477. click 199 361 dmc
  478. wait 20
  479. click 159 304 dmc
  480.  
  481. set %quantity 0
  482. repeat
  483. {
  484. finditem %apron C_ , #BACKPACKID
  485. wait 10
  486. if #FINDKIND <> -1
  487. {
  488. if #findCol <> 0
  489. {
  490. Exevent Drag #findid #findstack
  491. wait 10
  492. Exevent Dropc *bag
  493. wait 10
  494. set %magical %magical + 1
  495. }
  496. set %quantity %quantity + 1
  497. set %total %total + 1
  498. ignoreItem #FINDID 1
  499. if %quantity = 33 || %quantity = 66
  500. {
  501. Event sysmessage You tailored %total pieces of clothing, from which %magical were magical.
  502. event macro 19 0
  503. }
  504. }
  505. }
  506. until %quantity = 100
  507. ignoreitem reset
  508. return
  509.  
  510. ;**************************************************************************
  511.  
  512. Sub Selling
  513. repeat
  514. {
  515. event macro 15 30 ;Cast Recall
  516. wait 6s
  517. }
  518. until #TARGCURS = 1
  519. set #LTARGETID *sellrune
  520. event macro 22 0 ;Last Target
  521. wait 30
  522.  
  523. ;=====================================================================================
  524. Brings up the sell all target cursor from the vendor
  525. ;=====================================================================================
  526. repeat
  527. {
  528. finditem *vendor G_20
  529. If #FINDID <> -1
  530. {
  531. event PathFind #FINDX #FINDY #CHARPOSZ
  532. wait 60
  533. }
  534. wait 20
  535. set #LOBJECTID *vendor
  536. event Macro 17 0 ;Last Object
  537. wait 20
  538. }
  539. Until #CONTNAME = generic_gump && #CONTSIZE = 230_318
  540.  
  541. click 63 201 DMC ;Sell All Location
  542. target
  543. finditem %allclothing C_ , #BACKPACKID
  544. Set #LTARGETID #FINDID
  545. event macro 22 0 ;Last Target
  546.  
  547. wait 50
  548.  
  549. FindItem %sewingkit C_ , #BACKPACKID
  550. if #FINDCNT < 3
  551. {
  552. GoSub BuyKit
  553. }
  554.  
  555. repeat
  556. {
  557. event macro 15 30 ;Cast Recall
  558. wait 6s
  559. }
  560. until #TARGCURS = 1
  561. set #LTARGETID *bluerune
  562. event macro 22 0 ;Last Target
  563. wait 30
  564. set %x #CHARPOSX
  565. set %y #CHARPOSY
  566. set %x1 #CHARPOSX - 2
  567. set %y1 #CHARPOSY - 2
  568. set %x2 #CHARPOSX + 2
  569. set %y2 #CHARPOSY + 2
  570. event PathFind %x1 %y1 #CHARPOSZ
  571. wait 20
  572. event PathFind %x2 %y2 #CHARPOSZ
  573. wait 20
  574. event PathFind %x %y #CHARPOSZ
  575. wait 20
  576. FindItem POF
  577. If #FINDID <> -1
  578. {
  579. Exevent Drag #findid #findstack
  580. wait 10
  581. Exevent Dropc *bag
  582. wait 10
  583. }
  584. return
  585.  
  586. ;**************************************************************************
  587.  
  588. Sub EquipJewel
  589.  
  590. if %UseTailorJewel
  591. {
  592. set #LOBJECTID *bag
  593. event macro 17 0 ;Use last object
  594. wait 20
  595. Exevent Drag *TailorJewel
  596. wait 10
  597. Exevent Droppd
  598. wait 10
  599. }
  600.  
  601. if %UseMageryJewel
  602. {
  603. set #LOBJECTID *bag
  604. event macro 17 0 ;Use last object
  605. wait 20
  606. Exevent Drag *MageryJewel
  607. wait 10
  608. Exevent Droppd
  609. wait 10
  610. }
  611. return
  612.  
  613. ;**************************************************************************
  614.  
  615. Sub UnQuipJewel
  616. if %UseTailorJewel
  617. {
  618. Exevent Drag *TailorJewel
  619. wait 10
  620. Exevent Dropc *bag
  621. wait 10
  622. }
  623.  
  624. if %UseMageryJewel
  625. {
  626. Exevent Drag *MageryJewel
  627. wait 10
  628. Exevent Dropc *bag
  629. wait 10
  630. }
  631.  
  632. return
  633.  
  634. ;**************************************************************************
  635.  
  636. Sub BuyKit
  637. ;========================================================================
  638. ;Opens the buy menu of the vendor
  639. ;========================================================================
  640. repeat
  641. {
  642. finditem *vendor G_20
  643. wait 20
  644. set #LOBJECTID *vendor
  645. event Macro 17 0 ;Last Object
  646. wait 20
  647. }
  648. Until #CONTNAME = generic_gump && #CONTSIZE = 230_318
  649. Click 87 137
  650. Wait 1s
  651. ;========================================================================
  652. ;Finding sewingkit and buying them
  653. ;========================================================================
  654. wait 30
  655. getShopInfo
  656. for %r 1 #shopCnt
  657. {
  658. getShopInfo
  659. if #shopItemType = HAG
  660. {
  661. click 272 96 d
  662. setShopItem #shopItemID #shopItemMax
  663. }
  664. click 392 205
  665. }
  666. click 364 426
  667. wait 2s
  668. return
  669.  
  670. ;**************************************************************************
  671.  
  672. sub hunger
  673. set %eat N/A
  674. set %jstart #jIndex
  675. msg .hunger$
  676. wait 20
  677. set %jend #jIndex
  678. for %ji %jstart %jend
  679. {
  680. scanjournal %ji
  681. if watch_your_weight in #journal
  682. return
  683. if three_square_meals in #journal
  684. return
  685. if Your_diet_is_consistent in #journal
  686. set %eat 1
  687. if Even_thought_you_are_not_starving,_some_food_would_be_welcome. in #journal
  688. set %eat 3
  689. if stomach_is_growling in #journal
  690. set %eat 6
  691. if Are_you_Anorexic in #journal
  692. set %eat 8
  693. }
  694. if %eat = N/A
  695. return
  696. finditem %food c_
  697. set #LOBJECTID #FINDID
  698. for %i 1 %eat
  699. {
  700. event macro 17
  701. wait 20
  702. }
  703. }
  704. else
  705. return
  706. return
  707.  
  708. ;**************************************************************************
  709. ;************************* End of Script **********************************
  710. ;**************************************************************************
Add Comment
Please, Sign In to add comment