Advertisement
Guest User

Sayild Library

a guest
Sep 14th, 2012
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 7.50 KB | None | 0 0
  1.         000001111111
  2.         000001111111
  3.         00000
  4.         00000
  5.         00000
  6. 111     00000
  7. 111111111
  8. 111111111
  9. 111111111
  10. --[[
  11. Name: Sayild's Library
  12. Author: Sayild
  13. Version: 1.0.0 (updated 14/09/2012)
  14. Last Changes: nothing at moment
  15. --]]
  16.  
  17. -- [ Potions cust session ] --
  18. Item = Item or {}
  19.  
  20. function Item.MpCust()
  21. local a = itemcost('mana potion')
  22.         return a
  23. end
  24.  
  25. function Item.HpCust()
  26. local b = itemcost('health potion')
  27.         return b
  28. end
  29.  
  30. function Item.ShpCust()
  31. local c = itemcost('strong health potion')
  32.         return c
  33. end
  34.  
  35. function Item.SmpCust()
  36. local d = itemcost('strong mana potion')
  37.         return d
  38. end
  39.  
  40. function Item.GhpCust()
  41. local e = itemcost('great health potion')
  42.         return e
  43. end
  44.  
  45. function Item.GmpCust()
  46. local f = itemcost('great mana potion')
  47.         return f
  48. end
  49.  
  50. function Item.GspCost()
  51. local g = itemcost('great spirit potion')
  52.         return g
  53. end
  54.  
  55. function Item.UhpCust()
  56. local m = itemcost('ultimate health potion')
  57.         return m
  58. end
  59.  
  60. -- [ End of Potions.Cust session ] --
  61.  
  62. -- ____________________________________ --
  63.  
  64. -- [ Bot Functions] --
  65.  
  66. Self = Self or {}
  67.  
  68. function Self.Travel(city, npc)
  69. local city = city or nill
  70. local npc = npc or nill
  71. reachcreature(npc)
  72. say('hi')
  73. wait(500,1000)
  74. npcsay(city)
  75. wait(500,1000)
  76. npcsay('yes')
  77. end
  78.  
  79. function Self.poxRemove()
  80. if poisoned and cancast('exana pox') then
  81.         wait(500)
  82.                 cast('exana pox')
  83.         end
  84. end
  85.  
  86. function Item.refillSoft()
  87. say('hi')
  88. wait(1000)
  89.         while itemcount(6530) > 0 do
  90.                 npcsay('repair')
  91.                         wait(1000)
  92.                 npcsay('yes')
  93.                 end
  94. end
  95.  
  96. function Self.ScreenAdvance()
  97. local index = 0
  98. local msgs = getmessages('Server Log')
  99. local qtd = msgs.count-1
  100. for i=0,qtd do
  101.    if msgs[qtd].text:find('You advanced') then
  102.                 screenshot(name.."advance to"..level)
  103.       break
  104.    end
  105. end
  106. end
  107.  
  108. function Self.Withdraw(qtd)
  109. local qttd = qtd or nill
  110.         npcsay('withdraw '..qttd)
  111.                 wait(1000, 1200)
  112.         npcsay('yes')
  113. end
  114.  
  115. function Self.MasVis()
  116. if mp > 610 and cancast('exevo gran mas vis') then
  117.         cast('exevo gran mas vis')
  118.                 wait(45000)
  119.         end
  120. end
  121.  
  122. function Self.MasFrigo()
  123. if mp > 1060 and cancast('exevo gran mas frigo') then
  124.         cast('exevo gran mas frigo')
  125.                 wait(45000)
  126.         end
  127. end
  128.  
  129. function Self.OpenDepot()
  130. reachgrounditem("depot")
  131.         wait(1000,2000)
  132.                 openitem("depot")
  133.         wait(700,900)
  134.                 openitem(3502, "locker")
  135. end
  136.  
  137. function Item.MoveSupplies(suptomove, bptomove, qtd)
  138. local suptomovee = suptomove
  139. local bptomovee = bptomove
  140. local qttd = qtd
  141.  
  142. while itemcount(suptomovee) > 0 do
  143.         moveitems(suptomovee, "all", bptomovee, qttd)
  144.                 wait(1000, 1500)
  145. end
  146.  
  147. function Self.Bank()
  148. local index = 0
  149. local msgs = getmessages("NPCs")
  150. local qtd = msgs.count-1
  151. for i=0,qtd do
  152.    if msgs[qtd].text:find('There is not enough gold on your account.') then
  153.       setcavebot('off')
  154.       wait(5000,10000)
  155.       closetibia()
  156.    end
  157. end
  158. end
  159.  
  160. function Self.OpenDoor(idofdoor, x,y,z) -- Credits to Nightcrawler.
  161. local x = x
  162. local y = y
  163. local z = z
  164. local id = id
  165.  
  166. if toptileitem(x, y, z) == id then
  167.   while toptileitem(x, y, z) == id do
  168.     useitem(id, x, y, z)
  169.     wait(1000)
  170.   end
  171. end
  172. end
  173.  
  174. function Item.FirewalkerRefill()
  175. if itemcount("worn firewalker boots") > 0 and itemcount("small enchanted ruby") > 0 then
  176.         useitemon("small enchanted ruby", "worn firewalker boots", MainBP)
  177.                 wait(200, 400)
  178.         end
  179. end    
  180.  
  181. function Self.BreakSilks(weaponuse,x,y,z) -- Credits to Nosekim
  182. local X = x
  183. local Y = y
  184. local Z = z
  185. local weaponTOuse = weaponuse
  186.  
  187. local Break = { 183, 2295, 2296, 7538, 7539 }
  188. while toptileitem(X,Y,Z) ~= 183 and toptileitem(X,Y,Z) ~= 189 do
  189. moveitems(toptileitem(X,Y,Z), ground(X,Y,Z), ground(posx,posy,posz), 100)
  190. wait(500)
  191. toptileitem(X,Y,Z)
  192. end
  193.  
  194. for i,j in pairs(Break) do
  195.    while toptileitem(X,Y,Z) == Break[i] do
  196.       useitemon(weaponTOuse,X,Y,Z)
  197.       wait(400,500)
  198.    end
  199. end  
  200. end
  201.  
  202. function Item.OpenBps(...)
  203.         local bps = {...}
  204.         for i,j in ipairs(bps) do
  205.                 openitem(j[1],j[2],j[3],j[4])
  206.                 wait(1000)
  207.                 resizewindows()
  208.         end
  209. end
  210.  
  211. function Self.RingEquip(ringtoequip)
  212. local ringtoequip = ringtoequip
  213. if itemcount(ringtoequip) > 0 then
  214.         wait(1000)
  215.                 moveitems(ringtoequip, "all", 'ring', 1)
  216.                         wait(1000)
  217.                                 end
  218. end
  219.  
  220. function Self.AmuletEquip(amuletforequip)
  221. local amuletforequip = amuletforequip
  222. if itemcount(amuletforequip) > 0 then
  223.         wait(1000)
  224.                 moveitems(amuetforequip, "all", 'amulet', 1)
  225.                         wait(1000)
  226.                                 end
  227. end
  228.  
  229. Sistem = Sistem or {}
  230.  
  231. function Sistem.CheckAllEngines()
  232. if cavebot == false or looting == false or targeting == false then
  233.         setcavebot('on')
  234.                 wait(1000)
  235.         setlooting('on')
  236.                 wait(1000)
  237.         settargeting('on')
  238.         end
  239. end
  240.  
  241. function Item.ItemCount(itemid)
  242. local itemid = itemid
  243. local counter = servercountitem(itemid)
  244.         return counter
  245. end
  246.  
  247. function Self.TradeSpeak(message)
  248. local messagee = message
  249. local index = 0
  250.         say(message, "Trade")
  251.                 wait(130000)
  252. end
  253.  
  254. function Self.PlayersAround()
  255. local check = paround(12, true)
  256.         return check
  257. end
  258.  
  259. function Self.Exori(world, ammount, monstertouse, hotkey)
  260. local world = world
  261. local ammount = ammount
  262. local monstertouse = monstertouse
  263. local hotkey = hotkey
  264.  
  265. if world == ('pvp') then
  266.         if paround(10, true) == 0 and maround(1, monstertouse) >= ammount then
  267.                 hotkey(hotkey)
  268.                 end
  269. end
  270. if world == ('opt-pvp') then
  271.         if maround(1, monstertouse) >= ammount then
  272.                 hotkey(hotkey)
  273.                 end
  274.         end
  275. end
  276.                
  277. function Self.FollowCreature(name)
  278. local name = name or nill
  279.         followcreature(name)
  280.         end
  281.        
  282. function Self.RenewAmulet(amuletname)
  283. local amuletname = amuletname or nill
  284. if itemcount(amuletname) >=1 then
  285.         if amulet ~= amuletname then
  286.                 moveitems(amuletname, "all", "amulet", 1)
  287.                 end
  288.         end
  289. end
  290.  
  291. function Self.RenewRing(ringname, backpack)
  292. local ringname = ringname or nill
  293. local bp = backpack
  294. if itemcount(ringname) >=1 and not pzone then
  295.         if ring ~= ringname then
  296.                 moveitems(ringname, "all", "ring", 1)
  297.         else
  298.                 moveitems(ringname, "ring", bp, 1)
  299.                 end
  300.         end
  301. end
  302.  
  303. function Self.RenewMagicShield()
  304. if not manashielded and mp > 55 and not pzone and cancast('utamo vita') then
  305.         cast('utamo vita')
  306.                 wait(200000)
  307.         end
  308. end
  309.  
  310. function Self.Haste()
  311. if not pzone and not hasted and mp >= 65 and cancast('utani hur') then
  312.         cast('utani hur')
  313.                 wait(35000)
  314.         end
  315. end
  316.  
  317. function Self.StrongHaste()
  318. if not pzone and not hasted and mp >= 105 and cancast('utani gran hur') then
  319.         cast('utani hur')
  320.                 wait(24000)
  321.         end
  322. end
  323.  
  324. function Self.StaminaLow()
  325. if pzone and not battlesigned and stamina < 860 then
  326.         wait(1000)
  327.                 setcavebot('off')
  328.                         wait(5000)
  329.                                 closetibia()
  330.         end
  331. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement