Advertisement
Guest User

Untitled

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