Advertisement
Guest User

Untitled

a guest
Mar 24th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.28 KB | None | 0 0
  1. ------ REFILL SETTINGS ------
  2. local LeaveMana = 60 --- How many mana potions until you leave the hunt?
  3. local BuyMana = 200 --- How many mana potions you begin the hunt with?
  4. local MaxMana = 200
  5.  
  6. local LeaveBolt = 200 --- How many Prismatic Bolt until you leave the hunt?
  7. local BuyBolt = 2200 --- How many Prismatic Bolt you begin the hunt with?
  8. local MaxBolt = 2200
  9.  
  10. local LeaveCap = 0 --- Leaves spawn when character reaches this cap
  11. local MinSoft = 0
  12. local MaxSoft = 0
  13. local MinMoney = 0
  14.  
  15. local BuyFood = 300
  16. local MinFood = 100 --- How many Brown Mushroms until you leave the hunt
  17. local MaxFood = 300 --- How many Brown Mushroms you begin the hunt witch
  18.  
  19. -- Item ID's, if you don't want to use SHP and SMP, change these:
  20. local FoodName = "Brown Mushroom"
  21. local FoodCost = 10
  22. local SoftName = "Pair Soft Boots"
  23. local MoneyName = "Gold Coin"
  24. local ManaName = "Ultimate Mana Potion"
  25. local ManaCost = 350
  26. local BoltName = "Sudden Death Rune"
  27. local BoltCost = 100
  28.  
  29. -- Backpack Configuration:
  30.  
  31. local MainBP = "Buggy backpack"
  32. local StackBP = "purple Backpack"
  33. local LootBP = "Zaoan chess box"
  34. local Mana1BP = "Jewelled Backpack"
  35. local ManaBP = "Demon Backpack"
  36.  
  37. --------- HUNT SETTINGS ---------
  38.  
  39.  
  40. -- Here I'm gonna get the item ids, leave this as it is.
  41. local FoodID = Item.GetID(FoodName)
  42. local ManaID = Item.GetID(ManaName)
  43. local SoftID = Item.GetID(SoftName)
  44. local BoltID = Item.GetID(BoltName)
  45. local LootID = { 14079, 14078, 14081, 17812, 17859 } -- items you are selling to Rock in a Hard Place
  46. local MoneyID = Item.GetID(MoneyName)
  47.  
  48. -- local GoldBP = 3253 --- Item ID of your gold backpack.
  49.  
  50.  
  51.  
  52. registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
  53.  
  54. function onWalkerSelectLabel(labelName)
  55. if (labelName == "CheckManas") then
  56. -- Check Supplies, GoBackHunt or Leave
  57. Walker.ConditionalGoto((Self.ItemCount(ManaID) <= LeaveMana) or (Self.ItemCount(BoltID) < LeaveBolt) or (Self.Cap() < LeaveCap), "Leave", "GoBackHunt")
  58.  
  59.  
  60.  
  61.  
  62. elseif (labelName == "WithdrawMoney") then
  63. Walker.Stop()
  64. wait(2000)
  65. Self.SayToNpc({"hi", "Withdraw 1", "yes"}, 100)
  66. wait(2000)
  67. Walker.Start()
  68.  
  69. elseif (labelName == "WithdrawMoney2") then
  70. Walker.Stop()
  71. wait(2000)
  72. Self.SayToNpc({"hi", "Withdraw 30001", "yes"}, 100)
  73. wait(2000)
  74. Walker.Start()
  75.  
  76. elseif (labelName == "WithdrawMoney3") then
  77. Walker.Stop()
  78. wait(2000)
  79. Self.SayToNpc({"hi", "Withdraw 3001", "yes"}, 100)
  80. wait(2000)
  81. Walker.Start()
  82.  
  83.  
  84. elseif (labelName == "CheckSoft2") then
  85. -- Check Supplies, GoBackEdron or SoftRefiller
  86. Walker.ConditionalGoto((Self.ItemCount(6529) >= MaxSoft), "GoBackEdron", "SoftRefiler")
  87.  
  88. elseif (labelName == "LoadSoft") then
  89. Walker.Stop()
  90. wait(2000)
  91. Self.SayToNpc({"hi", "Soft Boots", "yes"}, 100)
  92. wait(2000)
  93. Walker.Start()
  94.  
  95. elseif (labelName == "CheckFood") then
  96. -- Check Supplies, Complet2 or GoRefilFood
  97. Walker.ConditionalGoto((Self.ItemCount(3725) <= MinFood), "GoRefilfood", "Complet2")
  98.  
  99. elseif (labelName == "CheckFood2") then
  100. -- Check Supplies, GoBackDepot or FoodShop
  101. Walker.ConditionalGoto((Self.ItemCount(3725) >= MaxFood), "GoBackDepot2", "FoodShop")
  102.  
  103. elseif (labelName == "CheckBolt") then
  104. -- Check Supplies, GoBuyManas or BackAmmoShop
  105. Walker.ConditionalGoto((Self.ItemCount(16141) >= MaxBolt), "GoBuyManas", "AmmoShop")
  106.  
  107. elseif (labelName == "CheckPots") then
  108. -- Check Supplies, GoHunt or BackManaShop
  109. Walker.ConditionalGoto((Self.ItemCount(237) >= MaxMana), "GoHunt", "ManaShop")
  110.  
  111. elseif (labelName == "End") then
  112. -- Check Supplies, StartScript or Start
  113. Walker.ConditionalGoto((Self.ItemCount(3031) >= MinMoney), "Start", "StartScript")
  114.  
  115. elseif (labelName == "BuyMana") then
  116. -- Buy Mana Potions
  117. Walker.Stop()
  118. if (Self.ItemCount(ManaID) < BuyMana) then
  119. print("Buying Mana Potion")
  120. Self.SayToNpc("hi", 100)
  121. wait(1000)
  122. Self.SayToNpc("trade", 100)
  123. while (Self.ItemCount(ManaID) < BuyMana) do
  124. Self.ShopBuyItemsUpTo(ManaID, BuyMana)
  125. wait(500,800)
  126. Self.SayToNpc("trade", 100)
  127. wait(1000)
  128. end
  129. wait(200, 500)
  130. end
  131. Walker.Start()
  132.  
  133. elseif (labelName == "BuySD") then
  134. -- Buy Prismatic Bolts
  135. Walker.Stop()
  136. print("Buying SD")
  137. Self.SayToNpc({"hi"}, 100)
  138. wait(1000)
  139. Self.SayToNpc({"trade"}, 100)
  140. -- Buy spears, make sure Self.ItemCount returns items in hands.
  141. while (Self.ItemCount(BoltID) < BuyBolt) do
  142. Self.ShopBuyItemsUpTo(BoltID, BuyBolt)
  143. wait(500,800)
  144. end
  145. Walker.Start()
  146.  
  147.  
  148. elseif (labelName == "SailCarlin") then
  149. Walker.Stop()
  150. wait(1000)
  151. Self.SayToNpc({"Please Bring Me To Carlin"}, 100)
  152. wait(1000)
  153. Walker.Start()
  154.  
  155.  
  156. elseif (labelName == "SailVenore") then
  157. Walker.Stop()
  158. wait(1000)
  159. Self.SayToNpc({"Please Bring Me To Venore"}, 100)
  160. wait(1000)
  161. Walker.Start()
  162.  
  163. elseif (labelName == "checksoft") then
  164. -- Check Soft, norefill or refill
  165. Walker.ConditionalGoto((Self.ItemCount(6530) >= 1), "refill", "norefill")
  166.  
  167. elseif (labelName == "LoadSoft") then
  168. Walker.Stop()
  169. wait(1000)
  170. Self.SayToNpc({"hi", "Soft Boots", "yes"}, 100)
  171. wait(1000)
  172. Walker.Start()
  173.  
  174.  
  175. elseif (labelName == "banksoft") then
  176. Walker.Stop()
  177. wait(1000,1500)
  178. Self.SayToNpc({"hi", "withdraw 50000", "yes"}, 65)
  179. wait(1000,1500)
  180. Walker.Start()
  181.  
  182. elseif (labelName == "SailFury") then
  183. Walker.Stop()
  184. Self.SayToNpc({"hi"}, 100)
  185. wait(1000)
  186. Self.SayToNpc({"collapsed mansion"}, 100)
  187. wait(1000)
  188. Self.SayToNpc({"yes"}, 100)
  189. Walker.Start()
  190.  
  191. elseif (labelName == "SailAsylum") then
  192. Walker.Stop()
  193. wait(1000)
  194. Self.SayToNpc({"Please Bring Me To Asylum"}, 100)
  195. wait(1000)
  196. Walker.Start()
  197.  
  198. elseif (labelName == "CheckPosDoorL") then
  199. delayWalker(2000)
  200. local pos = Self.Position()
  201. if (pos.x == 33080 and pos.y == 31215 and pos.z == 7) then
  202. Walker.Goto("GoDoorL")
  203. else
  204. Walker.Goto("PosDoorL")
  205. end
  206.  
  207. elseif (labelName == "CheckPosDoorW") then
  208. delayWalker(2000)
  209. local pos = Self.Position()
  210. if (pos.x == 33090 and pos.y == 31190 and pos.z == 7) then
  211. Walker.Goto("GoDoorW")
  212. else
  213. Walker.Goto("PosDoorW")
  214. end
  215.  
  216. elseif (labelName == "CheckPosDoorW2") then
  217. delayWalker(2000)
  218. local pos = Self.Position()
  219. if (pos.x == 33077 and pos.y == 31180 and pos.z == 8) then
  220. Walker.Goto("GoDoorW2")
  221. else
  222. Walker.Goto("PosDoorW2")
  223. end
  224. elseif (labelName == "CheckPosDoorW3") then
  225. delayWalker(2000)
  226. local pos = Self.Position()
  227. if (pos.x == 33080 and pos.y == 31164 and pos.z == 8) then
  228. Walker.Goto("GoDoorW3")
  229. else
  230. Walker.Goto("PosDoorW3")
  231. end
  232. elseif (labelName == "CheckPosDoorW4") then
  233. delayWalker(2000)
  234. local pos = Self.Position()
  235. if (pos.x == 33080 and pos.y == 31164 and pos.z == 8) then
  236. Walker.Goto("GoDoorW4")
  237. else
  238. Walker.Goto("PosDoorW4")
  239. end
  240.  
  241. elseif (labelName == "CheckPosDoorW5") then
  242. delayWalker(2000)
  243. local pos = Self.Position()
  244. if (pos.x == 33077 and pos.y == 31180 and pos.z == 8) then
  245. Walker.Goto("GoDoorW5")
  246. else
  247. Walker.Goto("PosDoorW5")
  248. end
  249.  
  250. elseif (labelName == "CheckPosDoorW6") then
  251. delayWalker(2000)
  252. local pos = Self.Position()
  253. if (pos.x == 33090 and pos.y == 31190 and pos.z == 7) then
  254. Walker.Goto("GoDoorW6")
  255. else
  256. Walker.Goto("PosDoorW6")
  257. end
  258.  
  259. elseif (labelName == "Door1") then
  260. Walker.Stop()
  261. if not Map.IsTileWalkable(33230, 32412, 7) then
  262. Self.UseItemFromGround(33230, 32412, 7)
  263. end
  264. Walker.Start()
  265.  
  266. elseif (labelName == "Door2") then
  267. Walker.Stop()
  268. if not Map.IsTileWalkable(33230, 32406, 7) then
  269. Self.UseItemFromGround(33230, 32406, 7)
  270. end
  271. Walker.Start()
  272.  
  273. elseif (labelName == "Door3") then
  274. Walker.Stop()
  275. if not Map.IsTileWalkable(33224, 32398, 7) then
  276. Self.UseItemFromGround(33224, 32398, 7)
  277. end
  278. Walker.Start()
  279.  
  280. elseif (labelName == "Door4") then
  281. Walker.Stop()
  282. if not Map.IsTileWalkable(33221, 32394, 7) then
  283. Self.UseItemFromGround(33221, 32394, 7)
  284. end
  285. Walker.Start()
  286.  
  287. elseif (labelName == "Door5") then
  288. Walker.Stop()
  289. if not Map.IsTileWalkable(33221, 32400, 7) then
  290. Self.UseItemFromGround(33221, 32400, 7)
  291. end
  292. Walker.Start()
  293.  
  294. elseif (labelName == "CheckPosLevW") then
  295. delayWalker(2000)
  296. local pos = Self.Position()
  297. if (pos.x == 33082 and pos.y == 31110 and pos.z == 2) then
  298. Walker.Goto("GoLevW")
  299. else
  300. Walker.Goto("PosLevW")
  301. end
  302.  
  303. elseif (labelName == "CheckPosLevW2") then
  304. delayWalker(2000)
  305. local pos = Self.Position()
  306. if (pos.x == 33078 and pos.y == 31080 and pos.z == 13) then
  307. Walker.Goto("GoLevW2")
  308. else
  309. Walker.Goto("PosLevW2")
  310. end
  311.  
  312. elseif (labelName == "Tp4") then
  313. Walker.Stop()
  314. wait(500)
  315. Self.Step(NORTH)
  316. wait(500)
  317. Walker.Start()
  318.  
  319. elseif (labelName == "DoorL2") then
  320. Walker.Stop()
  321. wait(500)
  322. Self.UseItemFromGround(33074, 31170, 7)
  323. wait(500)
  324. Walker.Start()
  325.  
  326. elseif (labelName == "SailOramond") then
  327. Walker.Stop()
  328. wait(1000)
  329. Self.SayToNpc({"Please Bring Me To Oramond"}, 100)
  330. wait(1000)
  331. Walker.Start()
  332.  
  333.  
  334. elseif (labelName == "DoorL") then
  335. Walker.Stop()
  336. wait(500)
  337. Self.UseItemFromGround(33080, 31215, 7)
  338. wait(500)
  339. Walker.Start()
  340.  
  341.  
  342. elseif (labelName == "Tp5") then
  343. Walker.Stop()
  344. wait(500)
  345. Self.Step(WEST)
  346. wait(500)
  347. Walker.Start()
  348.  
  349. elseif (labelName == "Tp6") then
  350. Walker.Stop()
  351. wait(500)
  352. Self.Step(NORTH)
  353. wait(500)
  354. Walker.Start()
  355.  
  356. elseif (labelName == "Tp7") then
  357. Walker.Stop()
  358. wait(500)
  359. Self.Step(NORTH)
  360. wait(500)
  361. Walker.Start()
  362.  
  363.  
  364. elseif (labelName == "TpSc") then
  365. Walker.Stop()
  366. wait(500)
  367. Self.Step(NORTH)
  368. wait(500)
  369. Walker.Start()
  370.  
  371.  
  372. elseif (labelName == "UP") then
  373. Walker.Stop()
  374. wait(500)
  375. Self.Say({"exani hur up"}, 1)
  376. wait(500)
  377. Walker.Start()
  378.  
  379. elseif (labelName == "DOWN") then
  380. Walker.Stop()
  381. wait(500)
  382. Self.Say({"exani hur down"}, 1)
  383. wait(500)
  384. Walker.Start()
  385.  
  386. elseif (labelName == "Lever") then
  387. Walker.Stop()
  388. wait(500)
  389. Self.UseItemFromGround(32994, 31547, 4)
  390. wait(500)
  391. Self.UseItemFromGround(32994, 31547, 4)
  392. wait(500)
  393. Walker.Start()
  394.  
  395. elseif (labelName == "Lever2") then
  396. Walker.Stop()
  397. wait(500)
  398. Self.UseItemFromGround(33062, 31527, 10)
  399. wait(500)
  400. Self.UseItemFromGround(33062, 31527, 10)
  401. wait(500)
  402. Walker.Start()
  403.  
  404. elseif (labelName == "Lever3") then
  405. Walker.Stop()
  406. wait(500)
  407. Self.UseItemFromGround(32992, 31539, 4)
  408. wait(500)
  409. Self.UseItemFromGround(32992, 31539, 4)
  410. wait(500)
  411. Walker.Start()
  412.  
  413. elseif (labelName == "LeverW") then
  414. Walker.Stop()
  415. wait(500)
  416. Self.UseItemFromGround(33078, 31079, 13)
  417. wait(500)
  418. Walker.Start()
  419.  
  420. elseif (labelName == "LeverW2") then
  421. Walker.Stop()
  422. wait(500)
  423. Self.UseItemFromGround(33082, 31109, 2)
  424. wait(500)
  425. Walker.Start()
  426.  
  427.  
  428. elseif (labelName == "DoorW") then
  429. Walker.Stop()
  430. wait(500)
  431. Self.UseItemFromGround(33090, 31190, 7)
  432. wait(500)
  433. Walker.Start()
  434.  
  435. elseif (labelName == "DoorW2") then
  436. Walker.Stop()
  437. wait(500)
  438. Self.UseItemFromGround(33077, 31180, 8)
  439. wait(500)
  440. Walker.Start()
  441.  
  442. elseif (labelName == "DoorW3") then
  443. Walker.Stop()
  444. wait(500)
  445. Self.UseItemFromGround(33080, 31164, 8)
  446. wait(500)
  447. Walker.Start()
  448.  
  449. elseif (labelName == "Door3") then
  450. Walker.Stop()
  451. wait(500)
  452. Self.UseItemFromGround(33083, 31216, 8)
  453. wait(500)
  454. Walker.Start()
  455.  
  456. elseif (labelName == "Door2") then
  457. Walker.Stop()
  458. wait(500)
  459. Self.UseItemFromGround(33074, 31170, 7)
  460. wait(500)
  461. Walker.Start()
  462.  
  463. elseif (labelName == "Door3") then
  464. Walker.Stop()
  465. wait(500)
  466. Self.UseItemFromGround(33074, 31170, 7)
  467. wait(500)
  468. Walker.Start()
  469.  
  470. elseif (labelName == "Door4") then
  471. Walker.Stop()
  472. wait(500)
  473. Self.UseItemFromGround(33080, 31215, 7)
  474. wait(500)
  475. Walker.Start()
  476.  
  477. elseif (labelName == "Door5") then
  478. Walker.Stop()
  479. wait(500)
  480. Self.UseItemFromGround(32990, 31547, 4)
  481. wait(500)
  482. Walker.Start()
  483.  
  484.  
  485. elseif (labelName == "DoorO1") then
  486. Walker.Stop()
  487. if not Map.IsTileWalkable(33060, 31529, 10) then
  488. Self.UseItemFromGround(33060, 31529, 10)
  489. end
  490. Walker.Start()
  491.  
  492. elseif (labelName == "DoorO2") then
  493. Walker.Stop()
  494. if not Map.IsTileWalkable(33032, 31530, 10) then
  495. Self.UseItemFromGround(33032, 31530, 10)
  496. end
  497. Walker.Start()
  498.  
  499. elseif (labelName == "DoorO3") then
  500. Walker.Stop()
  501. if not Map.IsTileWalkable(33032, 31530, 10) then
  502. Self.UseItemFromGround(33032, 31530, 10)
  503. end
  504. Walker.Start()
  505.  
  506. elseif (labelName == "DoorO4") then
  507. Walker.Stop()
  508. if not Map.IsTileWalkable(33060, 31529, 10) then
  509. Self.UseItemFromGround(33060, 31529, 10)
  510. end
  511. Walker.Start()
  512.  
  513. elseif (labelName == "DoorO5") then
  514. Walker.Stop()
  515. if not Map.IsTileWalkable(32990, 31547, 4) then
  516. Self.UseItemFromGround(32990, 31547, 4)
  517. end
  518. Walker.Start()
  519.  
  520. elseif (labelName == "DoorO6") then
  521. Walker.Stop()
  522. if not Map.IsTileWalkable(33214, 31789, 7) then
  523. Self.UseItemFromGround(33214, 31789, 7)
  524. end
  525. Walker.Start()
  526.  
  527.  
  528. elseif (labelName == "CheckPosBoat") then
  529. delayWalker(2000)
  530. local pos = Self.Position()
  531. if (pos.x == 32954 and pos.y == 32023 and pos.z == 6) then
  532. Walker.Goto("GoRefilSoft2")
  533. else
  534. Walker.Goto("PosBoat")
  535. end
  536.  
  537. elseif (labelName == "CheckPosBoat2") then
  538. delayWalker(2000)
  539. local pos = Self.Position()
  540. if (pos.x == 33175 and pos.y == 31764 and pos.z == 6) then
  541. Walker.Goto("GoDepot")
  542. else
  543. Walker.Goto("PosBoat2")
  544. end
  545.  
  546. elseif (labelName == "CheckPosC") then
  547. delayWalker(2000)
  548. local pos = Self.Position()
  549. if (pos.x == 32984 and pos.y == 31539 and pos.z == 1) then
  550. Walker.Goto("GoWalls")
  551. else
  552. Walker.Goto("PosC")
  553. end
  554.  
  555.  
  556. elseif (labelName == "CheckPosSc") then
  557. delayWalker(2000)
  558. local pos = Self.Position()
  559. if (pos.x == 33093 and pos.y == 31122 and pos.z == 12) then
  560. Walker.Goto("GoSc")
  561. else
  562. Walker.Goto("PosSc")
  563. end
  564.  
  565. elseif (labelName == "CheckPosDoor3") then
  566. delayWalker(2000)
  567. local pos = Self.Position()
  568. if (pos.x == 33074 and pos.y == 31170 and pos.z == 7) then
  569. Walker.Goto("GoDoor3")
  570. else
  571. Walker.Goto("PosDoor3")
  572. end
  573.  
  574. elseif (labelName == "CheckPosDoor4") then
  575. delayWalker(2000)
  576. local pos = Self.Position()
  577. if (pos.x == 33080 and pos.y == 31215 and pos.z == 7) then
  578. Walker.Goto("GoDoor4")
  579. else
  580. Walker.Goto("PosDoor4")
  581. end
  582.  
  583.  
  584. elseif (labelName == "CheckPosUp") then
  585. delayWalker(2000)
  586. local pos = Self.Position()
  587. if (pos.x == 33026 and pos.y == 31550 and pos.z == 5) then
  588. Walker.Goto("GoUp")
  589. else
  590. Walker.Goto("PosUp")
  591. end
  592.  
  593. elseif (labelName == "CheckPosDown") then
  594. delayWalker(2000)
  595. local pos = Self.Position()
  596. if (pos.x == 33008 and pos.y == 31555 and pos.z == 5) then
  597. Walker.Goto("GoDown")
  598. else
  599. Walker.Goto("PosDown")
  600. end
  601.  
  602. elseif (labelName == "CheckPosLever") then
  603. delayWalker(2000)
  604. local pos = Self.Position()
  605. if (pos.x == 33061 and pos.y == 31527 and pos.z == 10) then
  606. Walker.Goto("GoLever")
  607. else
  608. Walker.Goto("PosLever")
  609. end
  610.  
  611. elseif (labelName == "CheckDoorO1") then
  612. delayWalker(2000)
  613. local pos = Self.Position()
  614. if (pos.x == 33060 and pos.y == 31529 and pos.z == 10) then
  615. Walker.Goto("GoDoorO1")
  616. else
  617. Walker.Goto("PosDoorO1")
  618. end
  619.  
  620. elseif (labelName == "CheckDoorO2") then
  621. delayWalker(2000)
  622. local pos = Self.Position()
  623. if (pos.x == 33032 and pos.y == 31530 and pos.z == 10) then
  624. Walker.Goto("GoDoorO2")
  625. else
  626. Walker.Goto("PosDoorO2")
  627. end
  628.  
  629. elseif (labelName == "CheckPosDoorL3") then
  630. delayWalker(2000)
  631. local pos = Self.Position()
  632. if (pos.x == 33074 and pos.y == 31170 and pos.z == 7) then
  633. Walker.Goto("GoDoorL3")
  634. else
  635. Walker.Goto("PosDoorL3")
  636. end
  637.  
  638. elseif (labelName == "CheckPosDoorL4") then
  639. delayWalker(2000)
  640. local pos = Self.Position()
  641. if (pos.x == 33086 and pos.y == 31199 and pos.z == 7) then
  642. Walker.Goto("GoDoorL4")
  643. else
  644. Walker.Goto("PosDoorL4")
  645. end
  646.  
  647.  
  648.  
  649.  
  650. elseif (labelName == "CheckPosLever2") then
  651. delayWalker(2000)
  652. local pos = Self.Position()
  653. if (pos.x == 32993 and pos.y == 31547 and pos.z == 4) then
  654. Walker.Goto("GoLever2")
  655. else
  656. Walker.Goto("PosLever2")
  657. end
  658.  
  659. elseif (labelName == "CheckDoor05") then
  660. delayWalker(2000)
  661. local pos = Self.Position()
  662. if (pos.x == 32990 and pos.y == 31547 and pos.z == 4) then
  663. Walker.Goto("GoDoor05")
  664. else
  665. Walker.Goto("PosDoor05")
  666. end
  667.  
  668. elseif (labelName == "CheckPosLever3") then
  669. delayWalker(2000)
  670. local pos = Self.Position()
  671. if (pos.x == 32991 and pos.y == 31539 and pos.z == 1) then
  672. Walker.Goto("GoLever3")
  673. else
  674. Walker.Goto("PosLever3")
  675. end
  676.  
  677. elseif (labelName == "CheckPosC2") then
  678. delayWalker(2000)
  679. local pos = Self.Position()
  680. if (pos.x == 33193 and pos.y == 31784 and pos.z == 3) then
  681. Walker.Goto("GoC2")
  682. else
  683. Walker.Goto("PosC2")
  684. end
  685.  
  686. elseif (labelName == "CheckDoorO6") then
  687. delayWalker(2000)
  688. local pos = Self.Position()
  689. if (pos.x == 33214 and pos.y == 31789 and pos.z == 7) then
  690. Walker.Goto("GoDoorO6")
  691. else
  692. Walker.Goto("PosDoorO6")
  693. end
  694.  
  695. elseif (labelName == "StartScript") then
  696. -- Buy Mana Potions
  697. Walker.Stop()
  698. print("Wez Gosciu !!!! -- tego labela nie musisz robic dziewico jebana")
  699. Walker.Start() Walker.Start()
  700.  
  701. elseif (labelName == "Hunt") then
  702. -- Buy Mana Potions
  703. Walker.Stop()
  704. print("Refil Is Complet Go Hunt")
  705. Walker.Start() Walker.Start()
  706.  
  707.  
  708.  
  709. elseif (labelName == "DepositGold") then
  710. -- Deposit Gold, check balance.
  711. Walker.Stop()
  712. Self.SayToNpc({"hi", "deposit all", "yes"}, 100)
  713. local withdrawManas = math.max(BuyMana - Self.ItemCount(ManaID), 0)*ManaCost
  714. local withdrawBolt = math.max(BuyBolt - Self.ItemCount(BoltID), 0)*BoltCost
  715. local total = math.abs(withdrawManas + withdrawBolt)+5000
  716.  
  717. if total >= 1 then
  718. Self.SayToNpc({"withdraw " .. total, "yes", "balance"}, 100)
  719. end
  720. Walker.Start()
  721.  
  722. elseif (labelName == "DepositItems") then
  723. -- Deposit Items
  724. Walker.Stop()
  725. Self.ReachDepot()
  726. Self.DepositItems()
  727. wait(1000)
  728. Self.DepositItems({3366,0}, {3414,0}, {3364,0}, {3420,0}, {7382,0}, {7393,0}, {3063,0}, {5954,1}, {6499,1}, {238,1}, {7643,1}, {3032,2}, {3320,0}, {3033,2}, {3328,2}, {3029,2}, {3330,2}, {9057,2})
  729. Self.DepositItems({6499,1}, {10312,1}, {5944,1}, {10306,1}, {9660,1})
  730.  
  731. elseif (labelName == "OpenBps") then
  732. -- Reset Backpacks
  733. Walker.Stop()
  734. Self.CloseContainers()
  735. Self.OpenMainBackpack()
  736. Container.GetLast():Minimize()
  737. wait(500,600)
  738. Container.GetByName(MainBP):OpenChildren(StackBP)
  739. Container.GetLast():Minimize()
  740. wait(500,600)
  741. Container.GetByName(MainBP):OpenChildren(LootBP)
  742. Container.GetLast():Minimize()
  743. wait(500,600)
  744. Container.GetByName(MainBP):OpenChildren(ManaBP)
  745. Container.GetLast():Minimize()
  746. wait(500,600)
  747. Container.GetByName(MainBP):OpenChildren(Mana1BP)
  748. Container.GetLast():Minimize()
  749. wait(500,600)
  750. Container.GetByName(ManaBP):OpenChildren(ManaBP)
  751. Container.GetLast():Minimize()
  752. wait(500,600)
  753. Walker.Start()
  754.  
  755. end
  756. end
  757.  
  758. Self.ReachDepot = function (tries)
  759. local tries = tries or 3
  760. Walker.Stop()
  761. local DepotIDs = {3497, 3498, 3499, 3500}
  762. local DepotPos = {}
  763. for i = 1, #DepotIDs do
  764. local dps = Map.GetUseItems(DepotIDs[i])
  765. for j = 1, #dps do
  766. table.insert(DepotPos, dps[j])
  767. end
  768. end
  769. local function gotoDepot()
  770. local pos = Self.Position()
  771. print("Depots found: " .. tostring(#DepotPos))
  772. for i = 1, #DepotPos do
  773. location = DepotPos[i]
  774. Self.UseItemFromGround(location.x, location.y, location.z)
  775. wait(1000, 2000)
  776. if Self.DistanceFromPosition(pos.x, pos.y, pos.z) >= 1 then
  777. wait(5000, 6000)
  778. if Self.DistanceFromPosition(location.x, location.y, location.z) == 1 then
  779. Walker.Start()
  780. return true
  781. end
  782. else
  783. print("Something is blocking the path. Trying next depot.")
  784. end
  785. end
  786. return false
  787. end
  788.  
  789. repeat
  790. reachedDP = gotoDepot()
  791. if reachedDP then
  792. return true
  793. end
  794. tries = tries - 1
  795. sleep(100)
  796. print("Attempt to reach depot was unsuccessfull. " .. tries .. " tries left.")
  797. until tries <= 0
  798.  
  799. return false
  800. end
  801.  
  802.  
  803.  
  804. Map.GetUseItems = function (id)
  805. if type(id) == "string" then
  806. id = Item.GetID(id)
  807. end
  808. local pos = Self.Position()
  809. local store = {}
  810. for x = -7, 7 do
  811. for y = -5, 5 do
  812. if Map.GetTopUseItem(pos.x + x, pos.y + y, pos.z).id == id then
  813. itemPos = {x = pos.x + x, y = pos.y + y, z = pos.z}
  814. table.insert(store, itemPos)
  815. end
  816. end
  817. end
  818. return store
  819. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement