Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- ______ _____ _________
- | | | | | |
- | --- | | | |___ ___|
- | _| | | __ | |
- | | | | | \ \_| |
- |__| |__|__| \____|
- Library v1.0 By Faj
- --]]
- -- FUNCTION dpdeposit()
- -- Open depot, open bp and deposit your items.
- -- Usage:
- -- dpdeposit(MainDPBP, LootDPBP, LOOTS)
- -- Ex:
- -- dpdeposit("brown backpack", "beach backpack", "wyrm scale", "strong health potion")
- function dpdeposit(DPBP, LOOTBP, ...)
- return {
- setsettings("Settings\\Cavebot\\Settings\\OpenNextBp","no"),
- wait(1000,1500),
- reachgrounditem("depot"),
- openitem("depot"),
- wait(1000,1500),
- openitem(3502, "locker"),
- wait(1000,1500),
- openitem(DPBP, "depot chest"),
- wait(1000,1500),
- depotdeposit(LOOTBP, ...),
- wait(1000,1500),
- closewindow(DPBP),
- wait(1000,1500),
- setsettings("Settings\\Cavebot\\Settings\\OpenNextBp","yes")
- }
- end
- -- FUNCTION bankwithdraw()
- -- Withdraw from bank what you need to buy the item.
- -- Usage:
- -- bankwithdraw("ItemName", amount)
- -- Ex:
- -- bankwithdraw("mana potion", 500)
- function bankwithdraw(ITEMCOST, NUMBER)
- local value = itemcost(ITEMCOST)*NUMBER-itemcost(ITEMCOST)*itemcount(ITEMCOST)
- if value > 0 then
- return {
- say('hi'),
- wait(1000,1300),
- npcsay("withdraw "..value),
- wait(1200,1300),
- npcsay("yes"),
- wait(1200,1300)
- }
- end
- end
- -- FUNCTION buypots()
- -- Buy your potions.
- -- Usage:
- -- buypots("ItemName", amount)
- -- Ex:
- -- buypots("mana potion", 500)
- -- NOTE: it'll buy what is missing.
- -- (if you have 1 pot in example it'll buy 499)
- function buypots(NAME, NUMBER)
- return {
- sellflasks(),
- wait(500,900),
- opentrade(),
- wait(500, 900),
- buyitemsupto(NAME, NUMBER)
- }
- end
- function movetobp(ITEMNAME,WHEREHAVE,TOPLACE)
- while itemcount(ITEMNAME, WHEREHAVE) > 0 do
- return moveitems(ITEMNAME, WHEREHAVE, TOPLACE)
- end
- end
- -- FUNCTION exorigranif()
- -- Use "exori gran" if monsters around you.
- -- Usage:
- -- exorigranif(NUMBER, NAME OF MONSTERS[optional])
- -- Ex:
- -- exorigranif(4, "wyrm", "energy elemental")
- function exorigranif(NUMBER, ...)
- local monsters = {...}
- if maround(1,unpack(monsters)) >= NUMBER and cancast('exori gran') then
- return cast('exori gran')
- end
- end
- -- FUNCTION exoriif()
- -- Use "exori" if monsters around you.
- -- Usage:
- -- exoriif(NUMBER, NAME OF MONSTERS[optional])
- -- Ex:
- -- exoriif(3, "wyrm", "energy elemental")
- function exoriif(NUMBER, ...)
- local monsters = {...}
- if maround(1,unpack(monsters)) >= NUMBER and cancast('exori') then
- return cast('exori')
- end
- end
- -- FUNCTION exorihuricoif()
- -- Use "exori hur" and "exori ico" if monsters around you.
- -- Usage:
- -- exorihuricoif(NUMBER, NAME OF MONSTERS[optional])
- -- Ex:
- -- exorihuricoif(2, "wyrm", "energy elemental")
- function exorihuricoif(NUMBER, ...)
- local monsters = {...}
- if maround(1,unpack(monsters)) >= NUMBER and cancast('exori hur') then
- return cast('exori hur')
- end
- if maround(1,unpack(monsters)) >= NUMBER and cancast('exori ico') then
- return cast('exori ico')
- end
- end
- -- FUNCTION ksmode()
- -- Use "exori hur" and "exori ico" in every monsters.
- -- Usage:
- -- ksmode("yes" or "no", NAME OF MONSTERS[optional])
- -- Ex:
- -- ksmode("yes")
- function ksmode(STRING, ...)
- local monsters = {...}
- if (STRING == "yes") then
- if maround(1,unpack(monsters)) >= 1 and cancast('exori hur') then
- return cast('exori hur')
- end
- if maround(1,unpack(monsters)) >= 1 and cancast('exori ico') then
- return cast('exori ico')
- end
- end
- end
- -- FUNCTION replaceboots()
- -- Replace Worn Soft for Specified Boots.
- -- Usage:
- -- replaceboots(NAME OF BOOTS TO CHANGE)
- -- Ex:
- -- replaceboots("boots of haste")
- function replaceboots(BOOTNAME)
- if (boots == itemid("worn soft boots")) then
- moveitems(BOOTNAME, "all", "boots", 1)
- end
- end
- -- FUNCTION dropvials()
- -- Drop empty vials.
- -- Usage:
- -- dropvials()
- function dropvials()
- if itemcount(285) > 10 then
- dropitems(285)
- end
- if itemcount(283) > 10 then
- dropitems(283)
- end
- if itemcount(284) > 10 then
- dropitems(284)
- end
- end
- -- FUNCTION openbps()
- function openbps(MAINBP,LOOTBP,GOLDBP)
- MAINBP,LOOTBP,GOLDBP = MainBP,LootBP,GoldBP
- return {
- closewindows(),
- wait(500, 1000),
- openitem(MAINBP, 'back'),
- wait(500, 1000),
- openitem(LOOTBP, MAINBP, true),
- wait(500, 1000),
- openitem(GOLDBP, MAINBP, true),
- wait(500, 1000),
- resizewindows(),
- wait(500, 1000)
- }
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement