Advertisement
Guest User

Untitled

a guest
May 4th, 2018
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. findevent macro 31 0
  3. set %ver V1.7
  4. set %house_extra 1
  5. set %allofit no
  6. display variable '%' . sa is set to %sa if you get a lot of target issues try setting this to 20 or less. runuo
  7.  
  8. set %sa 100
  9. ;Make sure to have shovels made and visible in secure to pull from
  10. ;This script is made for a reg suit, however regs work but will not be resupplied automatically
  11. ;This script may be set to auto mine in caves or set your own positions outside (see below)
  12. ;This script will mine 2 seperate areas in the same spot {{{NEW}}} 1.9
  13. ;If the settings are set to 0 the second mining spot will be ingnored preset is :0:
  14. ;This script Now uses CEO's healthwatch {{{New v1.15}}}
  15. ;This script will med and hide at secure if options are set
  16. ;This script will hide at each rune location if set {{{New V1.11}}}
  17. ;The smelting part now works if you wish to set it, saves a ton of secure space
  18. ;Put in a safety for thoes that have the occasional overweight problem, it will drop
  19. ;1 regular ore at a time until you are no longer overweight{{{NewV1.10}}}
  20. ;Auto walk to secure is dependant on the spot you stand when you start the script, you can manually change if you want a perm spot {{{NewV1.10}}}
  21. ;Reworked the entire script and pulled out about 40 lines of usless code{{{NewV1.10}}}
  22. ;If you mine rock put a pack in the upper right corner of the chest, you may have to reposition
  23. ;secure and it will be dropped into the bag, if not it will drop into the secure.
  24. ;Will mine from bank or house if set
  25. ;If you have read this far good for you, put #false in the line below to remove begining menu
  26. set %script #true
  27. Tile init
  28. ;«§»«§»«§»«§»«§»SETTING TO MODIFY AS NEEDED«§»«§»«§»«§»
  29. set %tinkershovels off           ;set to ON to use tinkering
  30. set %magery #true                ;set this to #true for Magery #false for Chiv
  31. set %hidefield #false            ;set this to #true if you wish to hide at each rune location #false if not
  32. set %color #true                  ;This will seperate colored rock in its own spot in chest if set to #true
  33. set %manaset #FALSE        ; set if you want to med up at secure
  34. set %hideme #false            ;set if you wish to hide at the secure(GOOD PRACTICE)
  35. set %smelt #true            ;set #TRUE FOR SMELTING
  36. set %s 3                     ;set this to the amount of shovels you want to pull from your secure
  37. set %banks 14    ;set this to 15 if using at the bank
  38. set %DigWait 20
  39. set %noproperty #false
  40. set %ingotcount #true
  41. ;°°°°°°°°°°°°°House Variable Set-up°°°°°°°°°°°°°°°°
  42.  
  43. sub noproperty
  44. ;*******Program only if non AOS **********
  45. ;for non property the first setting is for your port home
  46. ;book. all others are for ore books. you can add as
  47. ;many as you like giving the rune book id and how
  48. ;many runes in each book.
  49. if %noproperty = #true
  50. {
  51. set %_runebook0 xxxxxxx ;home book id
  52. set %houserune 10
  53. set %_runebook1 xxxxxxx
  54. set %first1 x
  55. set %_runebook2 xxxxxxx
  56. set %first2 x
  57. set %_runebook3 xxxxxxx
  58. set %first3 x
  59. set %usetwobooks x <---change the x to the amount of rune books you have not including the port home book.
  60. set %z %usetwobooks
  61. }
  62. return
  63.  
  64.  
  65. gosub ids
  66. gosub setup
  67.  
  68.  
  69.  
  70. sub setup
  71. set %asd 30
  72. set %asa 10
  73. set %stop 0
  74. Menu Clear
  75.    Menu hide
  76.    Menu Window size 320 40
  77.    Menu Window Color $D9D0C8
  78.    Menu Font bgcolor $D9D0C8
  79.    Menu Font Color Black
  80.    menu window transparent 80
  81. Menu Font Style b
  82. Menu font size 10
  83.    Menu Font Name tahoma
  84.    Menu Window Title Jebbits Miner Rail
  85. Menu Clear
  86.    Menu hide
  87.    Menu Window size 350 330
  88.    Menu Window Color $D9D0C8
  89.    Menu Font bgcolor $D9D0C8
  90.    Menu Font Color Black
  91.    Menu Font Name tahoma
  92.    Menu Window Title Jebbits OTF Rail Miner
  93.    Menu Text txt 10 10 Initializing
  94. Menu Font Color red
  95.  Menu Text txt1 5 30 Ver %ver OSI/FS 4/06
  96. Menu Font Color black
  97.   menu show 0 0
  98. menu show 0 0
  99.    menu hideeuo
  100. wait 60
  101. menu delete txt1
  102. Menu Text txt 10 %asa Initializing.
  103. Menu Text txt1 10 %asd Opening Paperdoll
  104. exEvent popup #charid 1
  105. wait 20
  106. contpos 650 0
  107. Menu Font Color green
  108. Menu Text txt2 150 %asd Passed
  109. set %aassdd %asd + 50
  110. Menu Font Color black
  111. Menu Text txt2 200 %asd Charid
  112. Menu Font Color red
  113. Menu Text txt2 298 %asd #charid
  114. Menu Font Color black
  115. set %asd %asd + 17
  116. Menu Text txt 10 10 Initializing..
  117. Menu Text txt1 10 %asd Opening Status
  118. event macro 8 2
  119.       wait 20
  120.       contpos 200 200
  121.       wait 20
  122.      CLICK 596 358
  123. Menu Font Color green
  124. Menu Text txt2 150 %asd Passed
  125. Menu Font Color black
  126. Menu Text txt2 200 %asd Max Weight
  127. Menu Font Color red
  128. Menu Text txt2 290 %asd #MAXWEIGHT
  129. menu delete txt
  130. Menu Font Color black
  131. set %asd %asd + 17
  132. Menu Text txt 10 10 Initializing...
  133. Menu Text txt1 10 %asd Opening Backpack
  134. event macro 8 7
  135.      wait 20
  136.       contpos 615 330
  137.       wait 10
  138. Menu Font Color green
  139. Menu Text txt2 150 %asd Passed
  140. Menu Font Color black
  141. Menu Text txt2 200 %asd Backpack Id
  142. Menu Font Color red
  143. Menu Text txt2 290 %asd #backpackid
  144. Menu Font Color black
  145. menu delete txt
  146. set %asd %asd + 17
  147. Menu Text txt 10 10 Initializing....
  148. Menu Text txt1 10 %asd Finding Shovel
  149.          finditem %shovelid c_ , #BACKPACKID
  150. wait 30
  151.         if #findid = x 3
  152. set %stop 2
  153. Menu Font Color red
  154. Menu Text txt2 150 %asd Failed
  155. if #findid <> x 2
  156. Menu Font Color green
  157. Menu Text txt2 150 %asd Passed
  158. Menu Font Color black
  159. menu delete txt
  160. set %asd %asd + 17
  161. Menu Text txt 10 10 Initializing.......
  162. Menu Text txt1 10 %asd Locating Secure
  163. wait 30
  164. Menu Font Color Green
  165. if %bank = #true || %banks = 15
  166. {
  167. Menu Text txt2 150 %asd Bank
  168. msg bank $
  169. wait 20
  170. set %secureid #contid
  171. }
  172.          else
  173. {
  174. Menu Text txt2 150 %asd House
  175. finditem jif_kif_iif_HIF_bud G_2
  176.         wait 10
  177.  set #LOBJECTID #findid
  178.     event macro 17 0
  179. set %secureid #findid
  180. wait 5
  181. }
  182. if #findid = x && %bank <> 15
  183. {
  184. display Unable to find Secure, please target Secure now to set
  185. set #targcurs 1
  186. forge_wa:
  187. if #targcurs = 1
  188. goto forge_wa
  189. wait 15
  190. set %secureid #Ltargetid
  191. set #LOBJECTID %secureid
  192.     event macro 17 0
  193.     wait 10
  194. Menu Font Color red
  195. Menu Text txt2 150 %asd Script May Fail
  196. Menu Text txt2 290 %asd %secureid
  197. }
  198. Menu Font Color black
  199. if #findid <> x
  200. {
  201. Menu Font Color green
  202. Menu Text txt2 150 %asd House
  203. Menu Font Color black
  204. Menu Text txt2 200 %asd Secure Id
  205. Menu Font Color red
  206. Menu Text txt2 290 %asd %secureid
  207. }
  208. Menu Font Color black
  209. if #findid = x && %bank = #true
  210. {
  211. Menu Font Color red
  212. Menu Text txt2 150 %asd Bank
  213. }
  214. Menu Font Color black
  215.       wait 20
  216.       menu delete txt
  217. set %asd %asd + 17
  218. Menu Text txt 10 10 Initializing........
  219. Menu Text txt1 10 %asd Locating Storage Box
  220. WAIT 10
  221. if %bank = #true || %banks = 15
  222.         finditem cud_hkf_hif c_
  223. else
  224. finditem cud_hkf c_ , %secureid
  225.         wait 25
  226. if #findid = x
  227. {
  228. display Unable to find Storage box, please target Storage box now to set
  229. set #targcurs 1
  230. forge_wai:
  231. if #targcurs = 1
  232. goto forge_wai
  233. wait 15
  234. set %orebagid #Ltargetid
  235. Menu Font Color red
  236. Menu Text txt2 150 %asd Script May Fail
  237. Menu Text txt2 290 %asd %orebagid
  238. }
  239. if #findid <> x
  240. {
  241. Menu Font Color green
  242. Menu Text txt2 150 %asd Passed
  243. }
  244. Menu Font Color black
  245.       wait 20
  246.       set #LOBJECTID #findid
  247.       set %orebagid #findid
  248.       wait 10
  249.       Menu Font Color black
  250.       if #findid <> x
  251. Menu Text txt2 200 %asd Ore Bag
  252. Menu Font Color red
  253. Menu Text txt2 290 %asd %orebagid
  254. set %asd %asd + 17
  255. if%tinkershovels = on
  256. {
  257. Menu Font Color black
  258. Menu Text txt1 10 %asd Locating ingot bag
  259.   finditem CKF_LKF C_ , %secureid
  260.   wait 15
  261.   set #lobjectid #findid
  262.   set %regstorebagid #findid
  263.   if #findid = x
  264.   {
  265.   Menu Font Color red
  266.   Menu Text txt2 150 %asd Failed
  267.   Menu Font Color black
  268. Menu Text txt2 200 %asd Ingot Bag
  269. }
  270. if #findid <> x
  271. {
  272.  Menu Font Color green
  273.   Menu Text txt2 150 %asd Passed
  274.   Menu Font Color black
  275.   Menu Text txt2 200 %asd Ingot Bag
  276.   Menu Font Color red
  277. Menu Text txt2 290 %asd %regstorebagid
  278. }
  279.  
  280.    }
  281.    set %asd %asd + 17
  282. Menu Font Color black
  283.    menu delete txt
  284. Menu Text txt 10 10 Initializing.........
  285. Menu Text txt1 10 %asd Locating forge
  286. findItem JBG_KUJ_OUJ_SOJ_HVJ_CVJ_WUJ_ G_3
  287. wait 25
  288. if #findid = x && %smelt = #true
  289. {
  290. display Unable to find forge, please target forge now to set
  291. set #targcurs 1
  292. forge_wait:
  293. if #targcurs = 1
  294. goto forge_wait
  295. wait 15
  296. set %forge %forge , _ , #Ltargetid
  297. Menu Font Color red
  298. Menu Text txt2 150 %asd Script May Fail
  299. }
  300. if #findid <> x 2 && %smelt = #true 2
  301. Menu Font Color green
  302. Menu Text txt2 150 %asd Passed
  303. if #findid <> x && %smelt = #false 2
  304. Menu Font Color blue
  305. Menu Text txt2 150 %asd Disabled
  306. wait 50
  307. Menu Font Color black
  308. set %asd %asd + 17
  309. Menu Text txt 10 10 Initializing........
  310. Menu Text txt1 10 %asd Book Gump
  311. WAIT 10
  312. finditem ZBN c_ , #backpackid
  313. wait 20
  314. if #findid = x
  315. {
  316. Display msg Not finding any rune books. Make sure you name them in game with the Name Ore and the number of runes. Example: Ore 16
  317. halt
  318. }
  319. else
  320. {
  321. set %scnt #scnt + 5
  322. set #lobjectid #findid
  323. set %drag #contkind
  324. event macro 17 0
  325. }
  326.  
  327. hang:
  328. wait 35
  329. if %drag = #contkind && %scnt > #scnt
  330. {
  331. goto hang
  332. }
  333. else
  334. {
  335. if #contkind = %drag
  336. set %smoke yes
  337. set %drag #contkind
  338. Menu Font Color black
  339. Menu Text txt2 200 %asd Gump Id
  340. Menu Font Color red
  341. Menu Text txt2 290 %asd %drag
  342. }
  343. click 345 281 r
  344.  
  345. if %smoke = yes
  346. {
  347. set %stop 2
  348. Menu Font Color red
  349. Menu Text txt2 150 %asd Failed
  350. }
  351. if %smoke <> yes
  352. {
  353. Menu Font Color green
  354. Menu Text txt2 150 %asd Passed
  355. }
  356. Menu Font Color black
  357. set %asd %asd + 17
  358. Menu Text txt 10 10 Initializing........
  359. Menu Text txt1 10 %asd Setting Books
  360. WAIT 10
  361. if %noproperty = #true
  362. gosub noproperty
  363. else
  364. gosub booksetup
  365. if %_runebook0 = 0 || %_runebook1 = 0
  366. {
  367. set %stop 2
  368. Menu Font Color red
  369. Menu Text txt2 150 %asd Failed
  370. }
  371. else
  372. {
  373. Menu Font Color green
  374. Menu Text txt2 150 %asd Passed
  375. Menu Font Color black
  376. Menu Text txt2 200 %asd Ore Books
  377. Menu Font Color red
  378. Menu Text txt2 290 %asd %z
  379. }
  380.  
  381. menu delete txt
  382. set %asd %asd + 17
  383. Menu Font Color green
  384. Menu Text txt 10 10 Initializing.........
  385. if %stop <> 2 2
  386. Menu Text txt1 10 %asd Done And Ready For Action
  387. wait 60
  388. if %stop = 2 3
  389. Menu Font Color red
  390. Menu Text txt1 5 %asd Please Fix Failed Tests And Restart
  391. halt
  392. set %asd %asd + 17
  393. Menu Font Color black
  394. Menu Text txt1 10 %asd Free Shard
  395. Menu Font Color Green
  396. if %sa = 20
  397. {
  398. Menu Text txt2 150 %asd Yes
  399. Menu Font Color Blue
  400. Menu Text txt3 200 %asd Z Depth Limited To %sa
  401. }
  402. else
  403. {
  404. Menu Font Color Green
  405. Menu Text txt2 150 %asd No
  406. Menu Font Color Blue
  407. Menu Text txt3 200 %asd Z Depth Maxed To %sa
  408. }
  409. wait 15
  410. set %asd %asd + 17
  411. Menu Font Color black
  412. Menu Text txt1 10 %asd Using Magery
  413. Menu Font Color green
  414. if %magery = #true
  415. {
  416. Menu Text txt2 150 %asd Enabled
  417. }
  418. else
  419. {
  420. Menu Font Color Red
  421. Menu Text txt2 150 %asd Disabled
  422. }
  423. wait 15
  424. set %asd %asd + 17
  425. Menu Font Color black
  426. Menu Text txt1 10 %asd Field Hiding
  427. Menu Font Color green
  428. if %hidefield = #true
  429. {
  430. Menu Text txt2 150 %asd Enabled
  431. }
  432. else
  433. {
  434. Menu Font Color Red
  435. Menu Text txt2 150 %asd Disabled
  436. }
  437. wait 15
  438. set %asd %asd + 17
  439. Menu Font Color black
  440. Menu Text txt1 10 %asd Smelting
  441. Menu Font Color green
  442. if %smelt = #true
  443. {
  444. Menu Text txt2 150 %asd Enabled
  445. }
  446. else
  447. {
  448. Menu Font Color Red
  449. Menu Text txt2 150 %asd Disabled
  450. }
  451. wait 15
  452. set %asd %asd + 17
  453. Menu Font Color black
  454. Menu Text txt1 10 %asd Bank
  455. Menu Font Color green
  456. if %banks = 15
  457. {
  458. Menu Text txt2 150 %asd Enabled
  459. }
  460. else
  461. {
  462. Menu Font Color Red
  463. Menu Text txt2 150 %asd Disabled
  464. }
  465. wait 15
  466. set %asd %asd + 17
  467. Menu Font Color black
  468. Menu Text txt1 10 %asd Ingot Counter
  469. if %ingotcount = #true
  470. {
  471. Menu Font Color green
  472. Menu Text txt2 150 %asd Enabled
  473. }
  474. else
  475. {
  476. Menu Font Color Red
  477. Menu Text txt2 150 %asd Disabled
  478. }
  479. wait 50
  480. menu hide
  481. CLICK 128 192 R
  482. hide easyuo
  483. msg $
  484.  
  485. SET %cx #charposx
  486. SET %cy #charposy
  487. set %cz #charposz
  488. return
  489.  
  490. sub ids
  491. ;********DONT CHANGE ANYTHING PAST HERE*****************
  492. set %fullpars #true
  493. set %more 0
  494. set %www 50
  495. set %hold 1
  496. set %end 5
  497. set %ddd 390
  498. set %delay 1
  499. set %Totalmana #mana - 5
  500. set %shovels 5
  501. set %dropspot 0
  502. set %tinkerid JTL_ktl
  503. set %dragingots 100
  504. set %forge JBG_KUJ_OUJ_SOJ_HVJ_CVJ_WUJ
  505. set %shovelid WWF_qpf_twf_qpf
  506. set %alloreid DWJ_GWJ_EWJ_TVJ_enk_gxs_axs_tws_uws_vws_zws_ewh
  507. set %ingotid ENK
  508. set %graniteid BVI
  509. set %delay 30
  510. set %digspotx 290
  511. set %digspoty 285
  512. set %runebook 1
  513. set %runenum 1
  514. set %logweight 12
  515. set %weight #weight
  516. set %weighttotal 0
  517. set %targetfirst 0
  518. set %alreadymade1 0
  519. set %doublecheck 0
  520. set %counterstarted 0
  521. set %_runebook0 0
  522. set %_runebook1 0
  523. set %_runebook3 0
  524. set %_runebook2 0
  525. set %usetwobooks 0
  526. set %resul 0
  527. set %mark 0
  528. set %k 1
  529. set %z 0
  530. set %maz 1
  531. set %maxweight #maxweight - 25
  532. set %set 0
  533. set %log_all #true
  534. set %scnt 0
  535. set *511 pause
  536. if %magery = #true
  537. set %spot 345
  538. else
  539. set %spot 381
  540. return
  541.  
  542. sub booksetup
  543. if %noproperty = #true
  544. goto godown
  545.      runebook1:
  546. finditem ZBN c_ , #backpackid
  547. if #findid = x && %z = 0
  548. set %stop 2
  549. if #findid = x
  550. goto over
  551. event property #findid
  552. IF ore in #property
  553. {
  554. set %z %z + 1
  555. set #lobjectid #findid
  556. set %_runebook , %z #lobjectid
  557. gosub rune
  558. set %first , %z %qqq
  559. }
  560. ignoreitem #findid
  561. goto runebook1
  562. over:
  563. ignoreitem reset
  564.  
  565. homebook:
  566. finditem ZBN c_ , #backpackid
  567.        event property #findid
  568.         wait 10
  569. if #findid = x
  570. {
  571.     set %stop 2
  572.     goto godown
  573. }
  574. if home in #property
  575. {
  576.        set #lobjectid #findid
  577.        set %_runebook0 #lobjectid
  578.        gosub rune
  579.        set %houserune %rrr
  580. ignoreitem reset
  581. goto godown
  582. }
  583.        ignoreitem #findid
  584. goto homebook
  585.  godown:
  586. return
  587.  
  588. sub rune
  589.    set %qqq 16
  590. up:
  591.    if %qqq notin #property 2
  592.       set %qqq %qqq - 1
  593.        goto up
  594.         set %rrr %qqq
  595.      return
  596.  
  597.  
  598. set %usetwobooks %z
  599. set %number %first1
  600.  
  601. ;****************MAIN MENU**********************
  602.  
  603. ;******PRE-SHOVEL CHECK***********
  604. loop1:
  605. menu hide
  606. finditem %shovelid c_ , #backpackid
  607. if #findkind <> 0
  608. gosub shovell
  609.  
  610. ;***********MAIN LOOP****************
  611.  
  612. loop:
  613. gosub recall
  614. set %jindex #jindex
  615. gosub digger
  616. goto loop
  617.  
  618. ;******FIND SHOVEL SUBROUTINE***********
  619. sub findshovel
  620. finding:
  621. finditem %shovelid c_ , #backpackid
  622. wait 5
  623. return #findkind = -1
  624. ;**********DIGGING SUBROUTINE***********
  625. sub digger
  626. goSUB SEARCHGROUND
  627. gosub 8x8_scanner 2 1 #CharPosX #CharPosY
  628. if %resul = 0
  629. move %FOUND_LOCATION_X_ . %k %FOUND_LOCATION_Y_ . %k 0 3s
  630. set %resul 1
  631. if #results = 0
  632. goto moveo
  633. set #ltargetkind 2
  634. for %ii 1 25
  635. {
  636. if %health = #true && #hits < #maxhits - 10
  637. gosub health
  638. if %hidefield = #true && H notin #charstatus
  639. gosub hide
  640. gosub findshovel
  641. if #result = -1
  642. {
  643. gosub port_home
  644. }
  645. if %resul = 0
  646. {
  647. if %initial <> cave_floor
  648. move %FOUND_LOCATION_X_ . %k %FOUND_LOCATION_Y_ . %k 0 3s
  649. }
  650. set %resul 1
  651. if #weight > %begin + 12
  652. set %maxweight #maxweight - 48
  653. else
  654. set %maxweight #maxweight - 24
  655. set %begin #weight
  656. IGNOREITEM RESET
  657. set #lobjectid #findid
  658. event macro 17 0
  659. target
  660. IGNOREITEM #FINDID
  661. if %initial = cave_floor
  662. {
  663. wait 10
  664. set #ltargety #CHARPOSY
  665. set #ltargetx #CHARPOSX
  666. set #ltargetz #CHARPOSZ
  667. set #LTARGETTILE #tiletype
  668. set #ltargetkind 3
  669. WAIT %DigWait
  670.   event macro 22 0
  671. goto moveo
  672. }
  673. set #ltargety %FOUND_LOCATION_Y_ . %k
  674. set #ltargetx %FOUND_LOCATION_X_ . %k
  675. set #ltargetz %FOUND_LOCATION_Z_ . %k
  676. set #LTARGETTILE #tiletype
  677.               set #ltargetkind 2
  678. event macro 22 0
  679. WAIT %DigWait
  680. moveo:
  681. gosub check
  682. }
  683. return
  684.  
  685. ;-----------------FIELD HIDING-------------------------
  686.  
  687. sub hide
  688. if  H notin #charstatus
  689.    {
  690.     if %sss = n/a
  691.      set %sss 0
  692.       if #scnt < %sss + 10
  693.       goto notnow
  694.       event macro 13 21
  695.       set %sss #scnt
  696.     }
  697. }
  698. notnow:
  699. return
  700.  
  701. ;**************CHECK SUBROUTINE****************
  702. sub check
  703. set %jindex1 %jindex
  704. while %jindex < #jindex
  705. {
  706. set %jindex %jindex + 1
  707. SCANJOURNAL %Jindex
  708. if you_loosen in #journal
  709.       goto nxtr
  710. if cannot_hold in #journal
  711. set %maxweight #weight - 25
  712. if no_metal in #journal && %mark <> 1
  713. gosub loc2
  714. If no_metal in #journal && %mark = 1
  715. GOTO NEXTRUNE2
  716. }
  717.  
  718. while %jindex1 < #jindex
  719. {
  720. set %jindex1 %jindex1 + 1
  721.    set %counter %counter + 1
  722.    scanjournal %jindex1
  723. if #weight > %maxweight || Your_backpack_is_full in #journal
  724. {
  725. if #weight > #maxweight
  726. gosub dragit
  727.       gosub port_home
  728.       gosub searchground
  729.       set %jindex1 #jindex
  730.       }
  731. IF can't_mine in #journal || cannot_see in #journal || far_away in #journal || can't_reach in #journal || target_cannot in #journal || %ltx = 0
  732. {
  733. DELETEJOURNAL
  734. if %FOUND_LOCATIONS > %k
  735. {
  736. set %resul 0
  737. set %k %k + 1
  738. goto nxtr
  739. }
  740. if  %MARK = 0
  741.          gosub loc2
  742.       nextrune2:
  743. set %k 1
  744. set %mark 0
  745.       set %runenum %runenum + 1
  746.       set %targetfirst 0
  747.       set %prospector 0
  748.       set %counterstarted 0
  749.          if %runenum >= %first . %maz + 1
  750.             {
  751. set %maz %maz + 1
  752. if ( %maz > %z && %z <> 1 ) || ( %z = 1 )
  753. set %maz 1
  754. set %number %first . %maz
  755. set %runenum 1
  756. }
  757.       gosub recall
  758. gosub 8x8_scanner 2 1 #CharPosX #CharPosY
  759.       }
  760. }
  761. set %jindex #jindex
  762. nxtr:
  763. set %jindex #jindex
  764.    return
  765.  
  766.    sub port_home
  767. set %ii 1
  768. set %move 1
  769. set %noshov 0
  770. DELETEJOURNAL
  771.       set %runenum2 %runenum
  772.       set %runebook2 %maz
  773.       set %runenum %houserune
  774. set %maz 0
  775. set %house 1
  776.       gosub house
  777.       set %house 0
  778.       set %maz %runebook2
  779.       set %runenum %runenum2
  780.       set %counterstarted 0
  781.       gosub recall
  782.    return
  783.  
  784. ;***********HOUSE SUBROUTINE************
  785. sub house
  786. gosub recall
  787. wait 20
  788. ;***********WALKING TO SECURE*************
  789. set %scnt #scnt
  790. movingtime:
  791. if #scnt - %scnt > 4
  792.      {
  793.       set %scnt #scnt
  794.       event pathfind %cx %cy %cz
  795.       wait 2s
  796.      }
  797.       move %cx %cy 0 1s
  798. if #charposx <> %cx ||  #charposy <> %cy
  799.       goto movingtime
  800.       set %x + 1
  801.       set %counter 0
  802. ;***************************HIDING********************
  803. if %hideme
  804.       event macro 13 21
  805.       wait 5
  806. ;****************FIND AND OPEN CHEST*************
  807. opensecure:
  808. ;Find chest
  809. if %banks = 15 2
  810. msg Bank $
  811. goto skip
  812. FINDITEM %SECUREID
  813. IF #FINDKIND = -1
  814. {
  815. GOTO OPENSECURE:
  816. }
  817. skip:
  818.       ;Open chest
  819.       set #LOBJECTID %secureid
  820.       set #findmod 0_0
  821.       set #NEXTCPOSX 27
  822.       set #NEXTCPOSY 49
  823.       event macro 17 0
  824. WaitSecureToOpen:
  825.     finditem %orebagid
  826. if #findid <> %orebagid
  827.    goto WaitSecureToOpen
  828. INGOREITEM RESET
  829. ;---------------------------------------------Ore routine-------------------------------------------------
  830. IF %SMELT
  831. gosub smelt
  832. ignoreitem reset
  833. if %ingotcount = #true
  834. gosub finditall
  835. ore:
  836. finditem %alloreid c_ , #backpackid
  837.      if #findkind = 1
  838.        {
  839.           IGNOREITEM #findid
  840.            goto ore
  841.              }
  842.  
  843.             if #findkind = 0
  844.           {
  845.      goSUB moveItem #findid #backpackid %orebagid
  846.                     goto ore
  847.                }
  848.  
  849. rock:
  850. set %w #weight
  851. finditem BVI_dwj_ c_ , #backpackid
  852. if #findkind <> 0
  853. goto mana
  854. if #findkind = 0 && %color = #true
  855. {
  856.    event drag #findid
  857. if #findCol = 0   ;regular
  858.  
  859.  
  860. click 168 167 p
  861. if #findCol = 2419   ;Dull Copper
  862. click 145 167 p
  863. if #findCol = 2406  ;Shadow
  864. click 122 167 p
  865. if #findCol = 2413  ;Copper
  866. click 102 167 p
  867. if #findCol = 2418   ;Bronze
  868. click 79 167 p
  869. if #findCol = 2213  ;Golden
  870. click 61 216 p
  871. if #findCol = 2425  ;Agapite
  872. click 81 216 p
  873. if #findCol = 2207  ;Verite
  874. click 105 216  p
  875. if #findCol = 2219   ;Valorite
  876. clcik 120 216 p
  877. goto rock
  878.    }
  879. if #findkind = 0
  880. {
  881.     event drag #findid
  882.      wait 20
  883.       click 151 167 p
  884.    }
  885. ;if %w = #weight
  886. ;{
  887. ;event drag #findid
  888. ;wait 20
  889.    ; click 197 115 p
  890. ;}
  891. goto rock
  892. mana:
  893. gosub shovell
  894. IF %manaset = #false
  895. {
  896.  
  897.           return
  898. }
  899. if #mana < %Totalmana
  900. {
  901.             event macro 13 46
  902.             wait 10s
  903.             goto mana
  904. }
  905. return
  906. ;--------------------------------------GET SHOVEL---------------------------------------------------------
  907. sub shovell
  908. event macro 8 7
  909.      wait 20
  910.       contpos 615 330
  911. finditem %shovelid c_ , #backpackid
  912. ignoreitem #findid
  913. finditem %shovelid c_ , #backpackid
  914. wait 10
  915. if #findid <> x
  916. {
  917. ignoreitem reset
  918. goto bakk
  919. }
  920. ignoreitem reset
  921. set %amount 0
  922. getmore:
  923. finditem %shovelid c_ , %secureid
  924. wait 1s
  925. if #findkind = -1 && %tinkershovels = off
  926. {
  927.           IGNOREITEM #findid
  928.           pause
  929. }
  930. if %tinkershovels = on
  931. gosub tinkshovel
  932. if #findkind = 0
  933. {
  934.       more:
  935.          goSUB moveItem #findid %secureid #backpackid
  936.      finditem %shovelid c_ , %secureid
  937. set %amount %amount + 1
  938. wait 5
  939. }
  940. if #findkind = -1
  941.    {
  942.     return
  943.      }
  944.       If %amount < %shovels
  945.      {
  946.    goto more
  947. }
  948. bakk:
  949. return
  950.  
  951. ;**********************RUNEBOOK SUBROUTINE**********************************
  952. sub Recall
  953. set %x 0
  954. set %sss = 0
  955. recallagain:
  956.     set %_runebooknum %_runebook . %maz
  957.     recallhouse:
  958.     set %_runenumber %runenum
  959.     set %_style 0
  960.     set %_time 10
  961.  
  962.     set %_oldx #charposx
  963.     set %_oldy #charposy
  964.  
  965.     set %_page 0
  966.     set %_side 0
  967.     set %_num %_runenumber / 2
  968.     set %_page %_runenumber + 1
  969.     set %_page %_page / 2
  970.     set %_num %_num * 2
  971. recallselectbook:
  972. recallopenagain:
  973. wait 5
  974.     set #LOBJECTID %_runebooknum
  975.     event macro 17 0
  976.     set #SCNT 0
  977. recallwaitforbook:
  978.     if #SCNT > 10
  979.         goto recallopenagain
  980. ;Next line changes with patch
  981. ;-----------------------------------------------------------------------------------------------------------------------------------------
  982.     if #CONTKIND <> %Drag
  983.         goto recallwaitforbook
  984.     deletejournal
  985. set %spot2 #contposy + 195
  986. if %magery = #true
  987. set %spot #contposy + 145
  988. else
  989. set %spot #contposy + 178
  990.  
  991.     if %_num = %_runenumber
  992.         set %_side 1
  993.     set %_runex #contposx + 139
  994.    if %_side = 1
  995.       set %_runex #contposx + 299
  996.     set %_pagexmod %_page * 34
  997.     set %_pagex #contposx + 104
  998.     set %_pagex %_pagex + %_pagexmod
  999.     if %_page > 4
  1000.         set %_pagex %_pagex + 31
  1001.         set %back_space #jindex
  1002. WAIT 5
  1003.     click %_pagex %spot2
  1004.     click %_pagex %spot2
  1005. WAIT 15
  1006.     click %_runex %spot
  1007.     set #SCNT 0
  1008.     scanjournal 1
  1009. if too_encumbered in #journal
  1010. gosub dragit
  1011. recallwaitforrecall:
  1012. while %back_space < #jindex
  1013. {
  1014. set %back_space %back_space + 1
  1015. scanjournal %back_space
  1016.     if something_is_blocking in #journal || that_location in #journal || no_charges in #journal
  1017.     {
  1018.     set %runenum %runenum + 1
  1019. if ( %_runebook0 = %_runebook . %maz && %runenum >= %HOUSERUNE + %house_extra )
  1020. {
  1021. set %runenum %houserune
  1022. goto recallhouse
  1023. wait 25
  1024. }
  1025. if %_runebook0 <> %_runebook . %maz
  1026.   goto done
  1027. }
  1028. }
  1029. done:
  1030. set %back_space #jindex
  1031.      if ( %runenum >= %first . %maz + 1 ) && ( %_runebook0 <> %_runebook . %maz )
  1032.             {
  1033. set %maz %maz + 1
  1034. if %maz > %z
  1035. set %maz 1
  1036. set %number %first . %maz
  1037. set %runenum 1
  1038. }
  1039.     if #SCNT > 10
  1040.         goto recallagain
  1041.     if for_this_spell in #journal 2
  1042.         event macro 13 46
  1043.         wait 30
  1044.     if %_oldx = #charposx
  1045.     {
  1046.         if %_oldy = #charposy
  1047.         {
  1048.             goto recallwaitforrecall
  1049.         }
  1050.     }
  1051. wait 30
  1052. set %nomove 0
  1053. set %resul 0
  1054.     return
  1055.  
  1056. ;----------------------------------------SMELT-------------------------------------------
  1057. sub smelt
  1058. set %cycle 0
  1059. ignoreitem reset
  1060. findItem %forge g_3
  1061. wait 10
  1062. if #findid = x
  1063. pause
  1064.     set #lTargetID #findid
  1065.     set #lTargetKind 1
  1066. _smelt:
  1067. if %cycle = 10
  1068. goto boom
  1069. set %cycle %cycle + 1
  1070. scanjournal #jindex
  1071. if no_idea in #journal
  1072. ignoreitem #findid
  1073.     findItem DWJ_EWJ_GWJ_tvj C_
  1074.     wait
  1075.     if #findKind = 0
  1076.     {
  1077. if #findtype = TVJ && #findstack = 1
  1078.   {
  1079.     ignoreitem #findid
  1080.     goto _smelt
  1081. }
  1082.         set #lObjectID #findID
  1083.         event Macro 17 0
  1084.         wait 15
  1085.         event Macro 22 0
  1086. wait 23
  1087. }
  1088.         goto _smelt
  1089.     }
  1090. ignoreitem reset
  1091. boom:
  1092. return
  1093.  
  1094. ;----------------------------------------HEAL----------------------------------------
  1095. sub health
  1096. if #hits >= #maxhits - 10
  1097. return
  1098. set *511 resume
  1099. loopit:
  1100. wait 10
  1101. if #hits < #maxhits - 10
  1102. goto loopit
  1103. set *511 pause
  1104. return
  1105.  
  1106. ;------------------------OVERWEIGHT ORE DRAG-----------------------------
  1107. sub dragit
  1108. FINDdwj:
  1109. if #weight <= #maxweight
  1110. goto dragout
  1111. finditem dwj c_  , #backpackid
  1112. If #findcol <> 0 && #FINDID <> X
  1113.   {
  1114.     ignoreitem #findid
  1115.      goto FINDdwj
  1116.       }
  1117.       if #findid = x && #weight > #maxweight
  1118.       {
  1119.       ignoreitem reset
  1120.       finditem dwj c_  , #backpackid
  1121.       }
  1122. if #findkind = 0
  1123.       {
  1124.       gosub amount
  1125.           wait 5
  1126.           if #findstack < %logamount
  1127.           Exevent drag #Findid #findstack
  1128.           else
  1129.             Exevent drag #Findid %logamount
  1130.           wait 20
  1131.           if #contsize = 168_74
  1132.           {
  1133.           set %contx #contposx + 20
  1134.           set %conty #contposy + 20
  1135.           click %contx %conty r
  1136.           }
  1137.  
  1138. cli:
  1139. if #CLIXRES = 640
  1140.        gosub drop 307 251
  1141. else
  1142. gosub drop 390 300
  1143.      }
  1144. if #findkind = -1 || #weight <= #maxweight
  1145. goto dhe
  1146.    GOTO FINDdwj
  1147. dhe:
  1148. return
  1149.  
  1150. sub drop
  1151.  
  1152. if %sq = #weight && #lliftedkind = 0 && #weight > #maxweight
  1153. {
  1154.           wait 20
  1155.           Exevent Dropg #charposx #charposy #charposz
  1156.  
  1157. if %add > 22 || #weight < #maxweight
  1158.   goto over
  1159. goto reclick
  1160. over:
  1161. return
  1162.  
  1163.  
  1164. sub amount
  1165. set %logamount #weight - #maxweight
  1166. set %divide ( ( %logamount / 2 ) * 2 )
  1167. if %divide = %logamount
  1168. set %logamount ( ( %logamount / %logweight ) + 1 )
  1169. else
  1170. set %logamount ( ( ( %logamount + 1 ) / %logweight ) + 1 )
  1171. amountend:
  1172. return
  1173. ;-------------------------------Program loc below here-------------------------------
  1174. ;Directions:
  1175. ;Set the %digspotx equal to the x-cursor-coordinate of the digging spot.
  1176. ;Set the %digspoty equal to the y-cursor-coordinate of the digging spot.
  1177. ;The first set of 16 locations is for your main ore runebook.
  1178. ;The second set of 16 locations is for the optional ore runebook.
  1179. sub loc
  1180. SET %MARK 0
  1181. set %x + 1
  1182.  
  1183. ;==================================
  1184. ; Script Name: 8x8-scanner (former Quantizer)
  1185. ; Author: Orngrimm
  1186. ; Version: 1.4
  1187. ; Client Tested with: 4.0.6a
  1188. ; EUO version tested with: 1.42.009D
  1189. ; Shard OSI / FS: OSI
  1190. ; Revision Date: 29.11.2004
  1191. ; Public Release: 27.6.2004
  1192. ; Global Variables Used: none
  1193. ; Thanks goes to: CyberPope for additional tileIDs, Deepgreen for the tile-plugin
  1194. ; Purpose: Searches for certain spots in range.
  1195. ; Only one in every 8x8-Grid is accepted and returned.
  1196. ;==================================
  1197. sub 8x8_scanner
  1198. ; save vars, create namespace... & make hurry!
  1199. nameSpace Push
  1200. nameSpace Local #sysTime , #random
  1201. set !old_lpc #LPC
  1202. Linespercycle 500
  1203.  
  1204. tile init
  1205. set !layer %2
  1206. set !range %1
  1207. set !debug #FALSE
  1208. set !mine_mountains 220_221_222_223_224_225_226_227_228_229_230_231_236_237_238_239_240_241_242_243_
  1209.     +244_245_246_247_252_253_254_255_256_257_258_259_260_261_262_263_268_269_270_271_
  1210.     +272_273_274_275_276_277_278_279_286_287_288_289_290_291_292_293_294_296_296_297_
  1211.     +321_322_323_324_467_468_469_470_471_472_473_474_476_477_478_479_480_481_482_483_
  1212.     +484_485_486_487_492_493_494_495_543_544_545_546_547_548_549_550_551_552_553_554_
  1213.     +555_556_557_558_559_560_561_562_563_564_565_566_567_568_569_570_571_572_573_574_
  1214.     +575_576_577_578_579_581_582_583_584_585_586_587_588_589_590_591_592_593_594_595_
  1215.     +596_597_598_599_600_601_610_611_612_613_1010_1741_1742_1743_1744_1745_1746_1747_
  1216.     +1748_1749_1750_1751_1752_1753_1754_1755_1756_1757_1771_1772_1773_1774_1775_1776_
  1217.     +1777_1778_1779_1780_1781_1782_1783_1784_1785_1786_1787_1788_1789_1790_1801_1802_
  1218.     +1803_1804_1805_1806_1807_1808_1809_1811_1812_1813_1814_1815_1816_1817_1818_1819_
  1219.     +1820_1821_1822_1823_1824_1831_1832_1833_1834_1835_1836_1837_1838_1839_1840_1841_
  1220.     +1842_1843_1844_1845_1846_1847_1848_1849_1850_1851_1852_1853_1854_1861_1862_1863_
  1221.     +1864_1865_1866_1867_1868_1869_1870_1871_1872_1873_1874_1875_1876_1877_1878_1879_
  1222.     +1880_1881_1882_1883_1884_1981_1982_1983_1984_1985_1986_1987_1988_1989_1990_1991_
  1223.     +1992_1993_1994_1995_1996_1997_1998_1999_2000_2001_2002_2003_2004_2028_2029_2030_
  1224.     +2031_2032_2033_2100_2101_2102_2103_2104_2105_1339_1340_1341_1342_1343_1344_1345_
  1225.     +1346_1347_1348_1349_1350_1351_1352_1353_1354_1355_1356_1357_1358_1359_
  1226.    
  1227. set !mine_floor _2_430_556_557_558_559_2028_
  1228. set !mine_Forrest_hills _240_241_242_243_
  1229. set !chop_trees _3230_3274_3275_3276_3277_3280_3283_3286_3288_3290_3293
  1230. +_3296_3299_3302_3281_3291_3294_3278_3300_3289_3284_3297_3287_
  1231.  
  1232.  
  1233. ; --------------- SETUP ---------------------
  1234. ; What type of tiley do you want to search?
  1235. set !search_for !mine_mountains
  1236. ; ------------ ENF SETUP --------------------
  1237.  
  1238. set !centerX %3
  1239. set !centerY %4
  1240.  
  1241. ; declare the return-value-name
  1242. if %0 < 5
  1243.     set %return found_location
  1244. Else
  1245.     set %return %5
  1246.  
  1247. ; Clear the positions and vars:
  1248. set !Q_count 0
  1249. set !merged $
  1250. set !output_count 0
  1251. set !search_for_in
  1252.  
  1253. ; calculate the quare
  1254. set !direction2 !range
  1255. set !direction1 !direction2 * -1
  1256. Tile init
  1257. tile get #charposx #charposy 2
  1258. set %initial #tilename
  1259. if Cave in %initial
  1260. {
  1261. set %found_locations 3
  1262. goto scan_end
  1263. }
  1264. ; Scan the square (able to reach)
  1265. for !cnt_x !direction1 !direction2
  1266.     {
  1267.     for  !cnt_y !direction1 !direction2
  1268.         {
  1269.         set !X_tile_to_get !centerX + !cnt_x
  1270.         set !Y_tile_to_get !centerY + !cnt_y
  1271.         tile get !X_tile_to_get !Y_tile_to_get !layer
  1272.         set !check_type _ , #TileType , _
  1273.         if !check_type in !search_for
  1274.             {
  1275.             if %log_all = #FALSE
  1276.                 {
  1277.                 gosub quanticer !centerX !centerY
  1278.                 if ( #Result <> 0 ) && ( #Result notin !search_for_in )
  1279.                     {
  1280.                     set !search_for_in !search_for_in , #Result , _
  1281.                     set !merged !merged , !X_tile_to_get , _ , !Y_tile_to_get , $
  1282.                     set !output_count !output_count + 1
  1283.                     set % . %return , _X_ . !output_count !X_tile_to_get
  1284.                     set % . %return , _Y_ . !output_count !Y_tile_to_get
  1285.                                                                                 set % . %return , _Z_ . !output_count #tilez
  1286.                     set % . %return , _title_ . !output_count #TILETYPE
  1287.                     }
  1288.                 }
  1289.             if %log_all = #TRUE && #Result <> 0 && !check_type in !search_for && #tilez < %sa
  1290.                 {
  1291.                 set !merged !merged , !X_tile_to_get , _ , !Y_tile_to_get , $
  1292.                 set !output_count !output_count + 1
  1293.                 set % . %return , _X_ . !output_count !X_tile_to_get
  1294.                 set % . %return , _Y_ . !output_count !Y_tile_to_get
  1295.                                                                 set % . %return , _Z_ . !output_count #tilez
  1296.                 set % . %return , _title_ . !output_count #TILETYPE
  1297.                 }
  1298.             }
  1299.         }
  1300.     }
  1301.  
  1302. if !debug
  1303. {
  1304. display yes found tiles in reach in grids: !search_for_in $$ Remember the grids:$
  1305. +(Tilted by 45 degrees to represent the UO-world)$
  1306. +________1$
  1307. +$
  1308. +____4______2$
  1309. +$
  1310. +7______5_______3$
  1311. +$
  1312. +___8_______6$
  1313. +$
  1314. +_______9$$
  1315. +Coordinates of the spots: !merged
  1316. }
  1317. set %found_locations !output_count
  1318. ; restore old LPC and namespace
  1319. set #LPC !old_lpc
  1320. nameSpace Clear
  1321. nameSpace Pop
  1322. scan_end:
  1323. return %found_locations
  1324. ; ------------------------------------
  1325.  
  1326. ; ------------------------------------
  1327. sub quanticer
  1328. ;* @param   %1  startX    req  centerposition X to start scan (normally #CharPosX)
  1329. ;* @param   %2  startY    req  centerposition Y to start scan (normally #CharPosY)
  1330.  
  1331. ; Get the borders of actual 8x8-grid
  1332.  
  1333. set !actual_grid_Y_0 %2 - ( %2 % 8 )
  1334. set !actual_grid_Y_8 %2 - ( %2 % 8 ) + 7
  1335. set !actual_grid_X_0 %1 - ( %1 % 8 )
  1336. set !actual_grid_X_8 %1 - ( %1 % 8 ) + 7
  1337.  
  1338. if  ( !X_tile_to_get >= !actual_grid_X_0 ) && ( !X_tile_to_get <= !actual_grid_X_8 )
  1339.     {
  1340.     ; actual 8x8
  1341.     if  ( !Y_tile_to_get >= !actual_grid_Y_0 ) && ( !Y_tile_to_get <= !actual_grid_Y_8 )
  1342.         return 5
  1343.     ; N 8x8
  1344.     if  ( !Y_tile_to_get >= !actual_grid_Y_0 - 8 ) && ( !Y_tile_to_get <= !actual_grid_Y_8 - 8 )
  1345.         return 2
  1346.     ; S 8x8
  1347.     if  ( !Y_tile_to_get >= !actual_grid_Y_0 + 8 ) && ( !Y_tile_to_get <= !actual_grid_Y_8 + 8 )
  1348.         return 8
  1349.     }
  1350.  
  1351. if ( !Y_tile_to_get >= !actual_grid_Y_0 ) && ( !Y_tile_to_get <= !actual_grid_Y_8 )
  1352.     {
  1353.     ; W 8x8
  1354.     if  ( !X_tile_to_get >= !actual_grid_X_0 - 8 ) && ( !X_tile_to_get <= !actual_grid_X_8 - 8 )
  1355.         return 4
  1356.     ; E 8x8
  1357.     if  ( !X_tile_to_get >= !actual_grid_X_0 + 8 ) && ( !X_tile_to_get <= !actual_grid_X_8 + 8 )
  1358.         return 6
  1359.     }
  1360.  
  1361. if  ( !X_tile_to_get >= !actual_grid_X_0 - 8 ) && ( !X_tile_to_get <= !actual_grid_X_8 - 8 )
  1362.     {
  1363.     ; NW 8x8
  1364.     if  ( !Y_tile_to_get >= !actual_grid_Y_0 - 8 ) && ( !Y_tile_to_get <= !actual_grid_Y_8 - 8 )
  1365.         return 1
  1366.     ; SW 8x8
  1367.     if  ( !Y_tile_to_get >= !actual_grid_Y_0 + 8 + 8 ) && ( !Y_tile_to_get <= !actual_grid_Y_8 + 8 + 8 )
  1368.         return 7
  1369.     }
  1370.  
  1371. if  ( !X_tile_to_get >= !actual_grid_X_0 + 8 ) && ( !X_tile_to_get <= !actual_grid_X_8 + 8 )
  1372.     {
  1373.     ; NE 8x8
  1374.     if  ( !Y_tile_to_get >= !actual_grid_Y_0 - 8 ) && ( !Y_tile_to_get <= !actual_grid_Y_8 - 8 )
  1375.         return 3
  1376.     ; SE 8x8
  1377.     if  ( !Y_tile_to_get >= !actual_grid_Y_0 + 8 ) && ( !Y_tile_to_get <= !actual_grid_Y_8 + 8 )
  1378.         return 9
  1379.     }
  1380. return 0
  1381. ;-------------------------second dig-----------------------
  1382. ;This area is for setting up a second dig spot for each rune
  1383. ;If you leave zeros it will skip that dig spot
  1384. sub loc2
  1385. if ( %FOUND_LOCATIONS <= %k ) || ( %allofit = no )
  1386. set %mark 1
  1387. return
  1388.  
  1389. SUB SEARCHGROUND
  1390. FINDMORE:
  1391. FINDITEM %alloreid g_2
  1392. IF #FINDID = X
  1393. goto fly
  1394. IF #LLIFTEDKIND <> 1
  1395. exEVENT DRAG #FINDID 5
  1396. wait 15
  1397. Exevent Dropc #backpackid
  1398. wait 8
  1399. scanjournal #jindex
  1400. if #weight < %maxweight && cannot notin #journal
  1401. GOTO FINDMORE
  1402. fly:
  1403. RETURN
  1404.  
  1405. ;==================================
  1406. ; Script Name: sub moveItem *ExEvent*
  1407. ; Author: Tecmo, Bad_Maniac
  1408. ; Version: 1.12
  1409. ; Client Tested with: 5.0.1a patch 21
  1410. ; EUO version tested with: 1.50 build 60
  1411. ; Shard OSI / FS: OSI and FS
  1412. ; Revision Date: 2005-Oct-07
  1413. ; Public Release: 2005-Aug-04
  1414. ; Copyright: Tecmo, Bad_Maniac
  1415. ; *********************************
  1416. ;      %1 req Item to move
  1417. ;      %2 req Move from location
  1418. ;      %3 req Move to location
  1419. ;      %4 opt Quantity
  1420. ;* @return      Returns the value True or False
  1421. ;* @Calling Example
  1422. ;           Inside script = gosub moveItem [Item to Move] [From location] [To location] [Quantity] (nothing in qty uses #findstack)
  1423. ;         Outside calling = call subMoveItem.txt [Item to Move] [From location] [To location] [Quantity] (nothing in qty uses #findstack)
  1424. ;==================================
  1425. SUB moveItem
  1426. {
  1427.     IF %0 < 3 || %0 > 4
  1428.         RETURN #FALSE
  1429.     SET %_itemId %1
  1430.     IF G_ NOTIN %2 && %2 <> C
  1431.         SET %_itemLocation C_ , %2
  1432.     ELSE
  1433.         SET %_itemLocation %2
  1434.     SET %_newItemLocation %3
  1435.     IF %0 = 4
  1436.         SET %_qty %4
  1437.     ELSE
  1438.         SET %_qty 0
  1439.     IF %euover <> passed
  1440.     {
  1441.         GOSUB BmEuoVer
  1442.         SET %euover passed
  1443.     }
  1444.     IF %_fShard <> #TRUE && %_fShard <> #FALSE
  1445.         GOSUB CheckFreeShard _fShard
  1446.     IF %_fShard
  1447.     {
  1448.         SET %actionwait 4
  1449.         SET %dragdropwait 25 ; Increase this number if you recieve 'You must wait' messages
  1450.     }
  1451.     ELSE
  1452.     {
  1453.         SET %actionwait 9
  1454.         SET %dragdropwait 1
  1455.     }
  1456.     REPEAT
  1457.     {
  1458.         SET %_XdropOffset ( #RANDOM % 2 ) - 1
  1459.         SET %_YdropOffset ( #RANDOM % 2 ) - 1
  1460.     }
  1461.     UNTIL %_XdropOffset <> 0 || %_YdropOffset <> 0
  1462.     SET %_XdropOffset #CHARPOSX + %_XdropOffset
  1463.     SET %_YdropOffset #CHARPOSY + %_YdropOffset
  1464.     moveLoop:
  1465.     FINDITEM %_itemId %_itemLocation
  1466.     IF #FINDKIND <> -1
  1467.     {
  1468.        SET %_litemID #FINDID
  1469.        SET %qty %_qty
  1470.        IF %qty = 0
  1471.           SET %qty #FINDSTACK
  1472.        GOSUB BMWaitAction %actionwait
  1473.        EXEVENT drag #FINDID %qty
  1474.        wait %dragdropwait
  1475.        wait 5
  1476.        SET %droptimeout #SYSTIME + 1000
  1477.        dropwait:
  1478.        IF %_newItemLocation = G
  1479.             EXEVENT DROPG %_XdropOffset %_YdropOffset
  1480.        IF %_newItemLocation <> G
  1481.             EXEVENT dropc %_newItemLocation
  1482.             set #lobjectid #backpackid
  1483.             event macro 17 0
  1484.             wait 15
  1485.        FINDITEM %_litemID %_itemLocation
  1486.        IF #FINDKIND <> -1 && #SYSTIME < %droptimeout
  1487.           GOTO dropwait
  1488.        GOSUB BMWaitAction
  1489.        GOTO moveLoop
  1490.     }
  1491.     RETURN
  1492. }
  1493. ;===============================
  1494. ; BMWaitAction
  1495. ; %1 time to wait in 10th of a second
  1496. ; If no arguments are passed, it sets
  1497. ; the timer to the current time
  1498. ;===============================
  1499. SUB BMWaitAction
  1500.     IF %0 < 1 || %1 = N/A || %bmwatimer = N/A
  1501.     {
  1502.         SET %bmwatimer #SCNT2
  1503.         RETURN
  1504.     }
  1505. bmwa_wait:
  1506.     IF ( %bmwatimer + %1 ) > #SCNT2
  1507.         GOTO bmwa_wait
  1508. RETURN
  1509. ;===============================
  1510. ;* @name sub BmEuoVer
  1511. ;* @author Bad_Maniac
  1512. ;* @ver 1.0 2005-Jul-29
  1513. ;* @purpose Verifies use of Euo 1.50 or higher
  1514. SUB BmEuoVer
  1515.     SET %euover #EUOVER
  1516.     FOR %i 1 2
  1517.     {
  1518.         STR POS %euover _
  1519.         IF #STRRES > 0
  1520.         {
  1521.             STR DEL %euover #STRRES 1
  1522.             SET %euover #STRRES
  1523.             SET %i 1
  1524.         }
  1525.     }
  1526.  IF %euover < 15000
  1527.  {
  1528.      DISPLAY ok You must use EUO version 1.50 or$
  1529.      +greater to use sub moveItem$
  1530.      +The script has been halted!
  1531.       halt
  1532.  }
  1533. RETURN
  1534. ;===========
  1535. ;**
  1536. ;* @name CheckFreeShard
  1537. ;* @ver 1.0 2Feb05
  1538. ;* @author  Roadkill
  1539. ;* @purpose  checks if you're on a known OSI shard or not
  1540. ;* @params %1 optional, variablename to return #true/#false in, #true if on a freeshard
  1541. ;* @returns #result and @%1 #true if on a freeshard, #false if on a known OSI shard.
  1542. ;* @example call rksubs.txt CheckFreeShard <@%1 varname, opt><@#result #true if #shard notin osi list
  1543. ;* @status
  1544. sub CheckFreeShard
  1545.   set !OSIshards pacific_sonoma_baja_legends_atlantic_chesapeake_catskills_lake , #spc , austin
  1546.   +_napa , #spc , valley_lake , #spc , superior_great , #spc , lakes_siege , #spc , perilous_europa
  1547.   +_drachenfels_oceania_wakoku_formosa_arirang_balhae_asuka_yamato_mugen_hokuto_misuho_izumo_sakura_
  1548. return
  1549.  
  1550.    ;==================================
  1551. ; Script Name: Ingot Counter ( Another Jebbit Miner Helpper Script )
  1552. ; Author: Jebbit
  1553. ; Version: 1.5
  1554. ; Client Tested with: 4.0.1b
  1555. ; EUO version tested with: V1.42.00 [Build AA]
  1556. ; Shard OSI / FS: OSI
  1557. ; Revision Date:7/12/05
  1558. ; Public Release: 12/16/2003
  1559. ; Purpose: Opens all surrounding chests within reach and totals up all available ingots. Adds special ingots to the list on the fly for free shards.
  1560. ;==================================
  1561. sub finditall
  1562.     mor:
  1563.    if %men <> 1
  1564. {
  1565. menu clear
  1566.      menu delete stat1
  1567. menu delete stat3
  1568. menu delete stat15
  1569.       menu window size 130 %www
  1570.       menu window color BLACK
  1571.       menu font bgcolor BLACK
  1572. menu window title Ingots
  1573. menu show 3 390
  1574. set %men 1
  1575. }
  1576. FINDITEM ENK C_
  1577. IF #FINDID = X 2
  1578. MENU HIDE
  1579.      gOTO menu
  1580. set %sss %sss + 1
  1581. menu delete stat15
  1582.  menu font color yellow
  1583.  menu font style b
  1584. menu text stat15 40 0 %SSS
  1585.       set #lobjectid #findid
  1586.        IGNOREITEM #LOBJECTID
  1587.         EVENT PROPERTY #findid
  1588. gosub pars
  1589. WAIT 5
  1590. if ingots in %d0
  1591.   set %d2 %d1
  1592.     if n/a in %d2
  1593.       set %d2 Iron
  1594. if %d2 notin %hold && %d2 <> n/a
  1595. {
  1596.     set %hold %hold , _ , %d2
  1597.     set %www %www + 25
  1598.     set %ddd %ddd - 25
  1599.     set %as %as + 1
  1600.     set %mor . %as %mor . %as + #findstack
  1601.     set %more . %as %d2
  1602.     set %d2 n/a
  1603.     goto mor
  1604. }
  1605. set %ds 0
  1606. chang:
  1607. if %ds >= %as
  1608.   goto mor
  1609.     set %ds %ds + 1
  1610.       set %results %more . %ds
  1611. if %d2 in %results
  1612. {
  1613.     set %sas %as
  1614.     set %as %ds
  1615.     set %mor , %as %mor . %as + #findstack
  1616.     set %as %sas
  1617.     set %d2 n/a
  1618.     goto mor
  1619. }
  1620. goto chang
  1621. set %d2 n/a
  1622. GOTO MOR
  1623. return
  1624.  
  1625. sub menus
  1626. if %men <> 1
  1627. menu clear
  1628. menu:
  1629. menu delete stat1
  1630. menu delete stat3
  1631. menu delete stat15
  1632.       menu window size 130 %www
  1633.       menu window color BLACK
  1634.       menu font bgcolor BLACK
  1635. menu window title Ingots
  1636. menu font align center
  1637.       menu font style
  1638.   menu font color red
  1639.   menu font size 11
  1640. menu text stat15 20 0 Ingot Count
  1641.     set %aa 0
  1642. cnt:
  1643. if %as <> n/a
  1644. {
  1645. set %aa %aa + 1
  1646. if %aa > %as
  1647. goto outt
  1648. set %end %end + 25
  1649. menu font size 11
  1650.   menu font style b
  1651.   menu font color red
  1652. set %results %mor . %aa
  1653. menu text stat3 70 %end %results
  1654. menu font style
  1655.   menu font color green
  1656.   menu font size 11
  1657. gosub chunck
  1658. menu text stat 5 %end %gg , #STRRES
  1659. goto cnt
  1660. outt:
  1661. set %end 5
  1662. }
  1663.      set #menubutton N/A
  1664.   menu show 5 %ddd
  1665. ignoreitem reset
  1666. return
  1667. ;==================================
  1668. ; Script Name: Jebbits Pars Script
  1669. ; Author: Jebbit
  1670. ; Version: 1.1
  1671. ; Client Tested with: 4.0.1b
  1672. ; EUO version tested with: V1.42.00 [Build AA]
  1673. ; Shard OSI / FS: OSI
  1674. ; Revision Date:7/12/05
  1675. ; Public Release: 12/16/2003
  1676. ; Purpose: Break down and pars any item
  1677. ;==================================
  1678.  
  1679. sub pars
  1680. set %l 0
  1681. set #lpc 500
  1682. set %c 0
  1683. set %d part
  1684. set %path Assigned , $ ,
  1685. set %string Augments , #spc , By , #spc , Number , - , $ ,
  1686. SET %a #PROPERTY
  1687. topp:
  1688. STR POS %a $
  1689. set %h #strres
  1690. if %fullpars = #true
  1691.     {
  1692.       STR POS %a #spc
  1693.        set %j #strres
  1694.         if %h < %j || %j = 0 || ( %l = 0 && #strres = 1 )
  1695.          STR POS %a $
  1696. if %l = 0
  1697. set %l 1
  1698. }
  1699. if #strres = 0
  1700.     {
  1701. set #lpc 100
  1702.              return
  1703.               }
  1704. if #strres <> 1
  1705. {
  1706. SET %b #STRRES - 1
  1707.    STR LEFT %a %b
  1708.       SET %b %b + 1
  1709.         set %d . %c #strres
  1710.              set %c %c + 1
  1711.         set %string %string , #spc , ( , %c , ) , #spc , #strres ,
  1712.                 set %path %path , #spc , % , %d , %c , - , #spc , #strres , #spc ,
  1713.            SET %STRING %STRING , $ ,
  1714.        SET %PATH %PATH , $ ,
  1715. }
  1716.     STR DEL %a 1 %b
  1717.   set %a #strres
  1718. goto topp
  1719. return
  1720.  
  1721. sub chunck
  1722. set #strres %more . %aa
  1723. str Left %more . %aa 1
  1724. set %gg #strres
  1725. str Del %more . %aa 1 1
  1726. str lower #strres
  1727. return
  1728.  
  1729. sub tinkshovel
  1730. SET %COUNTER 0
  1731.   nextcpos 30 70
  1732.   set #lobjectid %secureid
  1733.   event macro 17 0
  1734.   wait 20
  1735.   nextcpos 30 310
  1736.   set #lobjectid %regstorebagid
  1737.   event macro 17 0
  1738.   wait 20
  1739.   set %orex #contposx + 80
  1740.   set %orey #contposy + 80
  1741.   ignoreitem reset
  1742.   finditem ENK c_ , %regstorebagid
  1743.   wait 20
  1744.   if #findkind = -1
  1745.     {
  1746.     display ok NO INGOTS IN INGOT BOX
  1747.     halt
  1748.     }
  1749.   set %ingotstodrag %dragingots
  1750.   if #findstack < %ingotstodrag
  1751.     set %ingotstodrag #findstack
  1752.   event drag #findid
  1753.   wait 20
  1754.   msg %ingotstodrag
  1755.   wait 20
  1756.   msg $
  1757.   wait 20
  1758.   set #findmod 20_10
  1759.   click 730 367
  1760.   wait 20
  1761. reopen:
  1762. counttink:
  1763.   finditem %tinkerid c_ , #backpackid
  1764.   wait 30
  1765.   set %numtinktools #findcnt
  1766.   set %tinkinpack #findkind
  1767.   finditem %tinkerid c_ , %regstorebagid
  1768.   wait 30
  1769.   set %numtinktools %numtinktools + #findcnt
  1770.   if %numtinktools = 0
  1771.     {
  1772.     display ok No tinkers Tools Lefts
  1773.     halt
  1774.     }
  1775.   if %tinkinpack = -1
  1776.     {
  1777.     event drag #findid
  1778.     wait 15
  1779.     msg $
  1780.     wait 15
  1781.     set #findmod 20_10
  1782.     click 745 367
  1783.     }
  1784.   finditem %shovelid c_ , #backpackid
  1785.   wait 20
  1786.   set %findcount #findcnt
  1787. findshov:
  1788.   finditem %shovelid c_ , #backpackid
  1789.   wait 20
  1790.   if #findcnt < %shovels
  1791.     {
  1792.     finditem %tinkerid c_ , #backpackid
  1793.     if #findkind = -1
  1794.       goto reopen
  1795.     wait 20
  1796.     set #lobjectid #findid
  1797.     event macro 17 0
  1798.     wait 20
  1799.     set %llk #contposx + 29
  1800.     set %lkk #contposy + 111
  1801.     click %llk %lkk
  1802.     wait 20
  1803.     set %llk #contposx + 385
  1804.     set %lkk #contposy + 273
  1805.     click %llk %lkk
  1806.     wait 20
  1807.     set %llk #contposx + 235
  1808.     set %lkk #contposy + 71
  1809.     click %llk %lkk
  1810.     wait 20
  1811.     }
  1812.     set
  1813.     DOING:
  1814. finditem %shovelid c_ , #backpackid
  1815. if #findcnt = %findcount
  1816. goto findshov
  1817.   wait 20
  1818.   if #findcnt < %shovels
  1819.   {
  1820.   set %llk #contposx + 286
  1821.     set %lkk #contposy + 414
  1822.     click %llk %lkk
  1823.     WAIT 20
  1824.     GOTO DOING
  1825.     }
  1826.     WAIT 20
  1827.    set %llk #contposx + 29
  1828.     set %lkk #contposy + 413
  1829.     click %llk %lkk
  1830.     WAIT 15
  1831.     IF #CONTSIZE = 530_437
  1832.     click %llk %lkk
  1833.   finditem %ingotid c_ , #backpackid
  1834.   wait 20
  1835.   if #findkind = 0
  1836.     {
  1837.     event drag #findid
  1838.     wait 20
  1839.     msg $
  1840.     wait 20
  1841.     finditem %regstorebagid
  1842.     set #findmod 20_10
  1843.     click #findx #findy p
  1844.     wait 20
  1845.     }
  1846. puttinkerback:
  1847.   finditem %tinkerid c_ , #backpackid
  1848.   wait 20
  1849.   if #findkind = 0
  1850.     {
  1851.     event drag #findid
  1852.     wait 20
  1853.     msg $
  1854.     wait 20
  1855.     finditem %regstorebagid
  1856.     set #findmod 20_10
  1857.     click #findx #findy
  1858.     wait 20
  1859.     goto puttinkerback
  1860.     }
  1861. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement