What's new

Knight [PACC] [130]Svargrond North Sea Serpents

Status
Not open for further replies.

Xinum

Never Give Up!
Joined
Dec 23, 2009
Messages
578
Reaction score
66
[EK][130]Svargrond North Sea Serpents

Code:
<Settings>
  <Alerts>
    <Player>
      <OnScreen>
        <PlaySound>yes</PlaySound>
        <FlashClient>yes</FlashClient>
        <PauseBot>no</PauseBot>
        <Disconnect>no</Disconnect>
        <SafeList>null</SafeList>
      </OnScreen>
      <Attacking>
        <PlaySound>yes</PlaySound>
        <FlashClient>yes</FlashClient>
        <PauseBot>no</PauseBot>
        <Disconnect>no</Disconnect>
        <SafeList>null</SafeList>
      </Attacking>
    </Player>
    <Creature />
    <Item />
    <Message>
      <PrivateMessage>
        <PlaySound>no</PlaySound>
        <FlashClient>no</FlashClient>
        <PauseBot>no</PauseBot>
        <Disconnect>no</Disconnect>
        <SafeList>null</SafeList>
      </PrivateMessage>
      <Advanced>
        <PlaySound>no</PlaySound>
        <FlashClient>no</FlashClient>
        <PauseBot>no</PauseBot>
        <Disconnect>no</Disconnect>
        <Screenshot>no</Screenshot>
      </Advanced>
      <Raid>
        <PlaySound>no</PlaySound>
        <FlashClient>no</FlashClient>
        <PauseBot>no</PauseBot>
        <Disconnect>no</Disconnect>
        <Warnings>All</Warnings>
      </Raid>
    </Message>
    <Capacity>
      <Value>100</Value>
      <PlaySound>no</PlaySound>
      <FlashClient>no</FlashClient>
      <PauseBot>no</PauseBot>
      <Disconnect>no</Disconnect>
    </Capacity>
    <StandTime>
      <Value>30000</Value>
      <PlaySound>no</PlaySound>
      <FlashClient>no</FlashClient>
      <PauseBot>no</PauseBot>
      <Disconnect>no</Disconnect>
    </StandTime>
    <Disconnect>
      <PlaySound>no</PlaySound>
      <FlashClient>no</FlashClient>
      <PauseBot>no</PauseBot>
    </Disconnect>
    <Enabled>no</Enabled>
  </Alerts>
  <Healer>
    <Rules>
      <Utura>
        <HealRange>40 to 87 %</HealRange>
        <ManaRange>165 to all</ManaRange>
        <HealMethod>Intense Recovery</HealMethod>
        <ExtraCondition>If not strengthened</ExtraCondition>
        <CooldownControl>yes</CooldownControl>
        <CheckItem>no</CheckItem>
        <SpamRate>200 to 400</SpamRate>
        <Enabled>yes</Enabled>
      </Utura>
      <Great-Health-Potion>
        <HealRange>30 to 41 %</HealRange>
        <ManaRange>0 to all</ManaRange>
        <HealMethod>Great Health Potion</HealMethod>
        <ExtraCondition>No condition</ExtraCondition>
        <CooldownControl>yes</CooldownControl>
        <CheckItem>no</CheckItem>
        <SpamRate>200 to 400</SpamRate>
        <Enabled>yes</Enabled>
      </Great-Health-Potion>
      <Strong-Health-Potion>
        <HealRange>42 to 62 %</HealRange>
        <ManaRange>0 to all</ManaRange>
        <HealMethod>Strong Health Potion</HealMethod>
        <ExtraCondition>No condition</ExtraCondition>
        <CooldownControl>yes</CooldownControl>
        <CheckItem>no</CheckItem>
        <SpamRate>200 to 400</SpamRate>
        <Enabled>yes</Enabled>
      </Strong-Health-Potion>
      <Mana-Potion>
        <HealRange>41 to 100 %</HealRange>
        <ManaRange>0 to 60 %</ManaRange>
        <HealMethod>Mana Potion</HealMethod>
        <ExtraCondition>No condition</ExtraCondition>
        <CooldownControl>yes</CooldownControl>
        <CheckItem>no</CheckItem>
        <SpamRate>200 to 400</SpamRate>
        <Enabled>yes</Enabled>
      </Mana-Potion>
      <Exura-Ico>
        <HealRange>42 to 86 %</HealRange>
        <ManaRange>40 to all</ManaRange>
        <HealMethod>Wound Cleansing</HealMethod>
        <ExtraCondition>No condition</ExtraCondition>
        <CooldownControl>yes</CooldownControl>
        <CheckItem>no</CheckItem>
        <SpamRate>200 to 400</SpamRate>
        <Enabled>yes</Enabled>
      </Exura-Ico>
      <Paralyz>
        <HealRange>0 to all</HealRange>
        <ManaRange>40 to all</ManaRange>
        <HealMethod>Wound Cleansing</HealMethod>
        <ExtraCondition>If paralyzed</ExtraCondition>
        <CooldownControl>yes</CooldownControl>
        <CheckItem>no</CheckItem>
        <SpamRate>200 to 400</SpamRate>
        <Enabled>yes</Enabled>
      </Paralyz>
      <Ultimate-Health-Potion>
        <HealRange>0 to 29 %</HealRange>
        <ManaRange>0 to all</ManaRange>
        <HealMethod>Ultimate Health Potion</HealMethod>
        <ExtraCondition>No condition</ExtraCondition>
        <CooldownControl>yes</CooldownControl>
        <CheckItem>no</CheckItem>
        <SpamRate>200 to 400</SpamRate>
        <Enabled>yes</Enabled>
      </Ultimate-Health-Potion>
    </Rules>
    <PingCompensation>10</PingCompensation>
    <Enabled>yes</Enabled>
  </Healer>
  <FriendHealer>
    <Rules />
    <Enabled>no</Enabled>
  </FriendHealer>
  <Refiller>
    <Rules />
    <Enabled>no</Enabled>
  </Refiller>
  <HotKeys>
    <List>
      <ShowBot>
        <Script>showbot()</Script>
        <MainKey>66</MainKey>
        <ComboKey>Alt</ComboKey>
        <Enabled>yes</Enabled>
      </ShowBot>
      <PauseBot>
        <Script>local cavebot = getsettings("Settings/CaveBot/Enabled")
local targeting = getsettings("Settings/Targeting/Enabled")

if cavebot == 'no' or targeting == 'no' then
   setcavebot('on')
   settargeting('on')
   setlooting('on')
else
   setcavebot('off')
   settargeting('off')
   setlooting('off')
end
wait(500)</Script>
        <MainKey>19</MainKey>
        <ComboKey>None</ComboKey>
        <Enabled>yes</Enabled>
      </PauseBot>
      <ShowClient>
        <Script>focusclient()</Script>
        <MainKey>84</MainKey>
        <ComboKey>Alt</ComboKey>
        <Enabled>yes</Enabled>
      </ShowClient>
      <ShowSettings>
        <Script>showsettings()</Script>
        <MainKey>83</MainKey>
        <ComboKey>Alt</ComboKey>
        <Enabled>yes</Enabled>
      </ShowSettings>
    </List>
    <Condition>Client focus required</Condition>
    <Enabled>yes</Enabled>
  </HotKeys>
  <Actions>
    <List>
      <reopen-bps>
        <Script>if maround(7, false) == 0 then
if windowcount(MainBP) ~= 1 or windowcount(AmmoBP) ~= 1 or windowcount(LootBP) ~= 1 or windowcount(GoldBP) ~= 1 or windowcount() < 4 then
setcavebot('no')
pausewalking(12000)
closewindows()
wait(400, 600)

openitem(MainBP, 'back')
wait(400, 600)
resizewindow(MainBP, 0)
wait(400, 600)

openitem(AmmoBP, MainBP, true)
wait(400, 600)
resizewindow(AmmoBP, 0)
wait(400, 600)

openitem(LootBP, MainBP, true)
wait(400, 600)
resizewindow(LootBP, 0)
wait(400, 600)

openitem(GoldBP, MainBP, true)
wait(400, 600)
resizewindow(GoldBP, 0)
wait(400, 600)
pausewalking(0)
setcavebot('yes')
end
end</Script>
        <SpamRate>800 to 1000</SpamRate>
        <Enabled>no</Enabled>
      </reopen-bps>
      <Soft-Changer>
        <Script>local softequip = 85 
local softunequip = 92
local softid = 6529
local softuseid = 3549
local wornsoftid = 6530
local BootsId = itemid(BootsName)


if mppc <= softequip and not pzone and boots ~= softuseid and itemcount(softid) > 0 then
	moveitems(softid, 'all', 'boots', 1)
	wait(500, 600)
elseif ((mppc >= softunequip) or (mppc < softunequip and boots == wornsoftid and itemcount(softid) == 0) or pzone) and boots ~= BootsId then
	moveitems(BootsId, 'all', 'boots', 1)
	wait(500, 600)
end</Script>
        <SpamRate>800 to 1000</SpamRate>
        <Enabled>yes</Enabled>
      </Soft-Changer>
      <Smart-Exori>
        <Script>-- [[ INIT START ]] --
    local CONFIG = {
        CREATURES = {"Sea Serpent", "Young Sea Serpent"},
        
        PLAYERS = {
            ENABLED = true,
            DISTANCE = 14,
            FLOOR_DIFFERENCE = 1,
            SAFE_LIST = {"Bubble", "Eternal Oblivion"},
        },
        
        SPELLS = {
            --{NAME = "fierce berserk", AMOUNT = 4},           
            {NAME = "berserk", AMOUNT = 3},
            {NAME = "front sweep", AMOUNT = 2},
            --{NAME = "brutal strike", HP_PC = 10},            
            {NAME = "whirlwind throw", HP_PC = 10},
        },
    }

    -- [[ DO NOT CHANGE ANYTHING BELOW THIS LINE. ]] --

    SPELLS_CONFIG = SPELLS_CONFIG or {}
    LAST_FLOOR = LAST_FLOOR or Self.PositionZ()
    ATTACK_EXHAUST = ATTACK_EXHAUST or 0
    
    table.lower(CONFIG.CREATURES)
    
    local RESET_SPELLS_CONFIG = #CONFIG.SPELLS ~= #SPELLS_CONFIG
    
    if (not RESET_SPELLS_CONFIG) then
        for INDEX, SPELL_ENTRY in ipairs(CONFIG.SPELLS) do
            if (SPELL_ENTRY.NAME ~= SPELLS_CONFIG[INDEX].NAME or ((SPELL_ENTRY.AMOUNT and SPELL_ENTRY.AMOUNT ~= SPELLS_CONFIG[INDEX].AMOUNT) or (SPELL_ENTRY.HP_PC and SPELL_ENTRY.HP_PC ~= SPELLS_CONFIG[INDEX].HP_PC))) then
                RESET_SPELLS_CONFIG = true
                break
            end
        end
    end
    
    if (RESET_SPELLS_CONFIG) then
        SPELLS_CONFIG = {}
        
        local CURRENT_INDEX = 1
        
        while (#CONFIG.SPELLS >= CURRENT_INDEX) do
            CONFIG.SPELLS[CURRENT_INDEX].INFO = Spell.GetByWordsOrName(CONFIG.SPELLS[CURRENT_INDEX].NAME)
            
            if (not CONFIG.SPELLS[CURRENT_INDEX].INFO:isValid()) then
                table.remove(CONFIG.SPELLS, CURRENT_INDEX)
            else
                if (#CONFIG.SPELLS[CURRENT_INDEX].INFO:Condition() > 0 and table.find({"BIG_BEAM", "BIG_WAVE", "FRONT", "SMALL_BEAM", "SMALL_WAVE", "STRIKE"}, CONFIG.SPELLS[CURRENT_INDEX].INFO:Condition())) then
                    CONFIG.SPELLS[CURRENT_INDEX].NEED_DIRECTION = true
                else
                    CONFIG.SPELLS[CURRENT_INDEX].NEED_DIRECTION = false
                end
                
                CURRENT_INDEX = CURRENT_INDEX + 1
            end
        end
    end
-- [[ INIT END ]] --

if (Self.PositionZ() ~= LAST_FLOOR) then
    LAST_FLOOR, ATTACK_EXHAUST = Self.PositionZ(), System.TimeMilliseconds() + 2000
    return
end

if (System.TimeMilliseconds() > ATTACK_EXHAUST) then
    for _, SPELL_ENTRY in ipairs(CONFIG.SPELLS) do
        if (SPELL_ENTRY.INFO:isAbleToCast(nil, false)) then
            local ATTACKED = Creature.GetAttacked()
            
            if (SPELL_ENTRY.AMOUNT and (not CONFIG.PLAYERS.ENABLED or Self.PlayersAroundFloor(CONFIG.PLAYERS.DISTANCE, CONFIG.PLAYERS.FLOOR_DIFFERENCE, unpack(CONFIG.PLAYERS.SAFE_LIST)) == 0)) then
                local HIGHEST_AMOUNT, BEST_DIRECTION = 0, Self.LookDirection()
                            
                if (SPELL_ENTRY.NEED_DIRECTION) then
                    for DIRECTION, CREATURES_AMOUNT in pairs({[DIRECTION_NORTH] = 0, [DIRECTION_EAST] = 0, [DIRECTION_SOUTH] = 0, [DIRECTION_WEST] = 0}) do
                        CREATURES_AMOUNT = Self.MonstersAroundSpell(SPELL_ENTRY.INFO:Condition(), DIRECTION, unpack(CONFIG.CREATURES))
                        
                        if (CREATURES_AMOUNT > HIGHEST_AMOUNT or (CREATURES_AMOUNT >= HIGHEST_AMOUNT and DIRECTION == Self.LookDirection())) then
                            HIGHEST_AMOUNT, BEST_DIRECTION = CREATURES_AMOUNT, DIRECTION
                        end
                    end
                else
                    HIGHEST_AMOUNT, BEST_DIRECTION = Self.MonstersAroundSpell(SPELL_ENTRY.INFO:Condition(), Self.LookDirection(), unpack(CONFIG.CREATURES)), Self.LookDirection()
                end
                
                if (HIGHEST_AMOUNT >= SPELL_ENTRY.AMOUNT) then
                    while (Self.LookDirection() ~= BEST_DIRECTION) do
                        Self.Turn(BEST_DIRECTION)
                        System.Wait(25, 75)
                    end
                    
                    if (SPELL_ENTRY.INFO:CastSpell()) then
                        System.Wait(Self.CoolDown(SPELL_GROUP_ATTACK))
                    end
                end
            elseif (SPELL_ENTRY.HP_PC and SPELL_ENTRY.INFO:isAbleToCast(ATTACKED, false) and table.find(CONFIG.CREATURES, ATTACKED:Name():lower()) and SPELL_ENTRY.HP_PC >= ATTACKED:HealthPercent()) then
                if (SPELL_ENTRY.INFO:CastSpell(ATTACKED)) then
                    System.Wait(Self.CoolDown(SPELL_GROUP_ATTACK))
                end
            end
        end
    end
end</Script>
        <SpamRate>800 to 1000</SpamRate>
        <Enabled>yes</Enabled>
      </Smart-Exori>
      <Haste>
        <Script>if not hasted and not pzone and maround(7) == 0 then
     cast("utani hur")
     wait(1000)
end</Script>
        <SpamRate>800 to 1000</SpamRate>
        <Enabled>yes</Enabled>
      </Haste>
      <Minimize-BP>
        <Script>if windowcount(MainBP) < 1
then higherwindows("equip")
else
minimizewindows("equip")
end</Script>
        <SpamRate>8000 to 10000</SpamRate>
        <Enabled>yes</Enabled>
      </Minimize-BP>
      <Drop-Flask>
        <Script>if (itemcount(285) + itemcount(284) + itemcount(283) > 5 and maround(5) == 0 and cap < 250 and not lootbodies) then
            local FLASKS_THROWN = false
           
            for FLASK_ID = 285, 283, -1 do
                    if (itemcount(FLASK_ID) > 0) then
                            pausewalking(10000) moveitems(FLASK_ID, [[all]], [[ground]], 100) wait(1000, 1500)
                            FLASKS_THROWN = true
                    end
            end
           
            if (FLASKS_THROWN) then
                    pausewalking(0)
            end
    end</Script>
        <SpamRate>800 to 1000</SpamRate>
        <Enabled>yes</Enabled>
      </Drop-Flask>
      <Mas-Rest-Alert>
        <Script>local msgs = getnewmessages("Local Chat") 
local qtd = msgs.count-1 

for i=0,qtd 
do 
    if msgs[qtd].text:find("exura gran mas res") 
    then 
    playsound("alert.wav")    
    end 
end</Script>
        <SpamRate>800 to 1000</SpamRate>
        <Enabled>yes</Enabled>
      </Mas-Rest-Alert>
      <Safe-Bank>
        <Script>local msgs = getnewmessages("NPCs") 
local qtd = msgs.count-1 
for i=0,qtd do 
   if msgs[qtd].text:find('There is not enough gold on your account.') then 
      setcavebot('off') 
      wait(5000,10000) 
      closetibia() 
   end 
end</Script>
        <SpamRate>800 to 1000</SpamRate>
        <Enabled>yes</Enabled>
      </Safe-Bank>
      <Mount>
        <Script>if UseMount then
	setsettings("Settings\\CaveBot\\Settings\\AutoMount", "yes")
else
	setsettings("Settings\\CaveBot\\Settings\\AutoMount", "no")
end</Script>
        <SpamRate>800 to 1000</SpamRate>
        <Enabled>yes</Enabled>
      </Mount>
      <Some-fix>
        <Script>if UseMount then
	setsettings("Settings\\Actions\\List\\Haste\\Enabled", "yes")
else
	setsettings("Settings\\Actions\\List\\Haste\\Enabled", "no")
end</Script>
        <SpamRate>800 to 1000</SpamRate>
        <Enabled>yes</Enabled>
      </Some-fix>
    </List>
    <Setup>-- Setup-- Script by Hiyagi

UseMount = true
UseHaste = true


--------------Backpack Setup----------------
MainBP = "Moon Backpack"
AmmoBP = "Heart Backpack"
LootBP = "Demon Backpack"
GoldBP = "Dragon Backpack"

--------------Depo Setup--------------------
MainDPBP = "Purple Backpack"
StackableDPBP = "Red Backpack"
LootDPBP = "Fur Backpack"

--------------Mana Setup--------------------
ManaName = "mana potion"
ManaPrice = 50
BuyMana = 600

--------------Health Setup------------------
HealthName = "great health potion"
HealthPrice = 310
BuyHealth = 60

--------------Soft Boots Setup--------------
RefillSofts = true
BootsName = "boots of haste"

--------------Checker Setup-----------------
ManaCheck = 70
HealthCheck = 10
CapCheck = 150</Setup>
    <Enabled>yes</Enabled>
  </Actions>
  <CaveBot>
    <Waypoints>
      <Bp_At_Bank>Action 32300 31134 7 setsettings("Settings\\Alerts\\Player\\OnScreen\\FlashClient", "no");setsettings("Settings\\Alerts\\Player\\OnScreen\\PlaySound", "no");setsettings("Settings\\Actions\\List\\reopen bps\\Enabled", 'no');;-------opening backpacks-------;while  windowcount(MainBP) ~= 1 or windowcount(AmmoBP) ~= 1 or windowcount() ~= 2 do;;closewindows();wait(400, 600);;openitem(MainBP, 'back');wait(400, 600);resizewindow(MainBP, 0);wait(400, 600);;openitem(AmmoBP, MainBP, true);wait(400, 600);resizewindow(AmmoBP, 0);wait(400, 600);;end</Bp_At_Bank>
      <w000>Stand 32300 31134 7</w000>
      <Go_Bank>Action 32300 31134 7 if not islocation() then;gotolabel('Go_Bank');else;;local ManaCash = positive(BuyMana - itemcount(ManaName)) * ManaPrice;local HealthCash = positive(BuyHealth - itemcount(HealthName)) * HealthPrice;local SoftCash = 0;;if RefillSofts then;    SoftCash = (itemcount("worn soft boots") * 10000);end;;local TotalCash = ManaCash + HealthCash + SoftCash + 1000;;say('hi') ;wait(1600, 2000);;npcsay('deposit all');wait(100, 200);npcsay('yes');wait(100, 200);npcsay('withdraw '..TotalCash);wait(100, 200);npcsay('yes');wait(100, 200);npcsay('balance');wait(100, 200);;end</Go_Bank>
      <What_To_Do>Action 32300 31134 7 if (itemcount(ManaName) < BuyMana) or (itemcount(HealthName) < BuyHealth) then;     gotolabel('Go_Mana_Shop');elseif RefillSofts == true and itemcount("worn soft boots") > 0 then;     gotolabel('Go_Repair_Soft_Boots');else;     gotolabel('Go_Hunt');end</What_To_Do>
      <Go_Mana_Shop>Stand 32307 31132 7</Go_Mana_Shop>
      <Buying_Manas>Action 32307 31132 7 if not islocation() then;gotolabel('Go_Mana_Shop');else;;while windowcount(MainBP) ~= 1 or windowcount(AmmoBP) ~= 1 or windowcount() ~= 2 do;  closewindows();  wait(400, 600);;  openitem(MainBP, 'back');  wait(400, 600);  resizewindow(MainBP, 0);  wait(400, 600);;  openitem(AmmoBP, MainBP, true);  wait(400, 600);  resizewindow(AmmoBP, 0);  wait(400, 600);end;;say('hi') ;wait(2000, 2200) ;;local flaskcount = (itemcount(285)+itemcount(284)+itemcount(283));;if flaskcount > 0 then;    npcsay('vial');    wait(100, 200);;    while flaskcount > 0 do;        npcsay('yes');        wait(100, 200);        flaskcount = flaskcount - 200;    end;    npcsay('yes');    wait(100, 200);end;;npcsay('trade');wait(900, 1100);;buyitemsupto(HealthName, BuyHealth);wait(400, 600);;local stacks_to_buy = (BuyMana - itemcount(ManaName))/100;for i=1, stacks_to_buy do;    buyitems(ManaName, 100);    wait(200, 400);    moveitems(ManaName, MainBP, AmmoBP, 100);    wait(200, 400);    stacks_to_buy = stacks_to_buy - 100;end;;buyitemsupto(ManaName, BuyMana);wait(200, 400);moveitems(ManaName, MainBP, AmmoBP, 100);wait(100, 200);;while itemcount(ManaName, MainBP) > 0 and ((getcontainer(AmmoBP).maxslots - getcontainer(AmmoBP).usedslots) > 0) do;moveitems(ManaName, MainBP, AmmoBP, 100);wait(200, 400);end;;end</Buying_Manas>
      <Leave_Mana_Shop>Stand 32300 31134 7</Leave_Mana_Shop>
      <What_To_Do2>Action 32300 31134 7 if not islocation(5) then;gotolablel("Leave_Mana_Shop");else;  if (itemcount(ManaName) >= BuyMana) and (itemcount(HealthName) >= BuyHealth) then;    gotolabel('What_To_Do');  else;    gotolabel('Go_Bank');  end;end</What_To_Do2>
      <Go_Repair_Soft_Boots>Stand 32339 31116 7</Go_Repair_Soft_Boots>
      <w001>Ladder 32341 31112 7</w001>
      <w030>Stand 32344 31109 6</w030>
      <Travel_To_Venore>Action 32345 31108 6 if not islocation(3) then;gotolabel('Go_Repair_Soft_Boots');else;;reachcreature("Captain Breezelda");wait(500, 800);;say('hi') ;wait(1000, 1200) ;npcsay('venore');wait(100, 200);npcsay('yes');wait(800, 1000);;end</Travel_To_Venore>
      <Check_Venore>Action 32954 32023 6 if not islocation(10) then;gotolabel('Travel_To_Venore');end</Check_Venore>
      <w002>Node 32954 32052 6</w002>
      <w003>Node 32953 32089 6</w003>
      <Entrance_Aldo_Shop>Node 32948 32099 6</Entrance_Aldo_Shop>
      <w005>Stand 32953 32108 6</w005>
      <At_Aldo>Action 32953 32108 6 if not islocation() then;gotolabel("Entrace_Aldo_Shop");end;;if itemcount(6530) > 0 and islocation() and gold() > 10500 then;   say("hi");   wait(1500,1900);;   while itemcount(6530) > 0 and islocation() and gold() > 10500 do;      npcsay("repair");      wait(200,400);      npcsay("yes");      wait(200, 400);   end;end</At_Aldo>
      <Check_Soft_Repair>Action 32953 32108 6 if itemcount(6530) > 0 and gold() > 10500 then;gotolabel('At_Aldo');end</Check_Soft_Repair>
      <Go_Back_Svargrond>Node 32949 32096 6</Go_Back_Svargrond>
      <w006>Node 32954 32069 6</w006>
      <At_Venore_Boat>Stand 32955 32022 6</At_Venore_Boat>
      <Back_To_Svargrond>Action 32955 32022 6 if not islocation(3) then ;gotolabel("At_Venore_Boat");end;;reachcreature("Captain Fearless");wait(500, 600);;say("hi") ;wait(1000, 1200) ;npcsay("svargrond");wait(100, 200);npcsay("yes");wait(800, 1000)</Back_To_Svargrond>
      <Check_Svargrond_Boat>Action 32341 31108 6 if not islocation(10) then;gotolabel('Back_To_Svargrond');end</Check_Svargrond_Boat>
      <Going_Svargrond_Bank>Stand 32341 31112 6</Going_Svargrond_Bank>
      <w004>Node 32340 31116 7</w004>
      <At_Bank_Again>Stand 32300 31134 7</At_Bank_Again>
      <What_To_Do3>Action 32300 31134 7 if (itemcount(ManaName) < BuyMana) or (itemcount(HealthName) < BuyHealth) then;     gotolabel('Go_Mana_Shop');elseif RefillSofts == true and itemcount("worn soft boots") > 0 then;     gotolabel('Go_Repair_Soft_Boots');else;     gotolabel('Go_Hunt');end</What_To_Do3>
      <Going_Deposit>Stand 32303 31127 7</Going_Deposit>
      <Depositer>Stand 32262 31141 7</Depositer>
      <Depositer_Backpacks>Action 32262 31141 7 setsettings("Settings\\Cavebot\\Settings\\OpenNextBp","no");;-------opening backpacks-------;while  windowcount(MainBP) ~= 1 or windowcount(LootBP) ~= 1 or windowcount() ~= 2 do;;closewindows();wait(400, 600);;openitem(MainBP, 'back');wait(400, 600);resizewindow(MainBP, 0);wait(400, 600);;openitem(LootBP, MainBP, true);wait(400, 600);resizewindow(LootBP, 0);wait(400, 600);;end</Depositer_Backpacks>
      <Deposit>Action 32262 31141 7 reachgrounditem("depot");wait(1000,2000);openitem("depot");wait(700,900);openitem(3502, "locker");wait(700,900);openitem(MainDPBP, "depot chest");wait(700,900);;depotdeposit(StackableDPBP,"Great Mana Potion", "Strong Mana Potion", "White Pearl", "Bloody Pincers", "Sea Serpent Scale", "Small Sapphire", "Life Crystal");wait(700,900);depotdeposit(LootDPBP, "Glacier Kilt", "Crystalline Armor", "Focus Cape", "Northwind Rod", "Leviathans Amulet", "Serpent Sword", "Glacier Amulet", "Stealth ring", "Spirit Cloak", "Ring Of Healing");wait(700,900);openitem(LootBP, LootBP, false);wait(700,900);depotdeposit(StackableDPBP,"Great Mana Potion", "Strong Mana Potion", "White Pearl", "Bloody Pincers", "Sea Serpent Scale", "Small Sapphire", "Life Crystal");wait(700,900);depotdeposit(LootDPBP, "Glacier Kilt", "Crystalline Armor", "Focus Cape", "Northwind Rod", "Leviathans Amulet", "Serpent Sword", "Glacier Amulet", "Stealth ring", "Spirit Cloak", "Ring Of Healing");wait(700,900);openitem(LootBP, LootBP, false);wait(700,900);;setsettings("Settings\\Cavebot\\Settings\\OpenNextBp","yes")</Deposit>
      <Back_Start>Action 32262 31141 7 gotolabel('Bp_At_Bank')</Back_Start>
      <Go_Hunt>Stand 32311 31126 7</Go_Hunt>
      <w007>Stand 32337 31117 7</w007>
      <w008>Ladder 32342 31119 7</w008>
      <At_CaptainHaba>Stand 32353 31124 6</At_CaptainHaba>
      <Go_Sea>Action 32353 31124 6 if not islocation(3) then;gotolabel('Go_Hunt');else;;reachcreature("Captain Haba");wait(500, 800);;say('hi') ;wait(1000, 1200) ;npcsay('passage');wait(100, 200);npcsay('yes');wait(800, 1000);;end</Go_Sea>
      <Check_SeaPos>Action 31942 31047 6 if not islocation(10) then;gotolabel('Go_Sea');end</Check_SeaPos>
      <Settings_Fix>Action 31942 31047 6 setsettings("Settings\\Alerts\\Player\\OnScreen\\FlashClient", "yes");setsettings("Settings\\Alerts\\Player\\OnScreen\\PlaySound", "yes");setsettings("Settings\\Actions\\List\\reopen bps\\Enabled", 'yes')</Settings_Fix>
      <Open_Bp_At_Sea>Action 31942 31047 6 if maround(7, false) == 0 then;if windowcount(MainBP) ~= 1 or windowcount(AmmoBP) ~= 1 or windowcount(LootBP) ~= 1 or windowcount(GoldBP) ~= 1 or windowcount() < 4 then;setcavebot('no');pausewalking(12000);closewindows();wait(400, 600);;openitem(MainBP, 'back');wait(400, 600);resizewindow(MainBP, 0);wait(400, 600);;openitem(AmmoBP, MainBP, true);wait(400, 600);resizewindow(AmmoBP, 0);wait(400, 600);;openitem(LootBP, MainBP, true);wait(400, 600);resizewindow(LootBP, 0);wait(400, 600);;openitem(GoldBP, MainBP, true);wait(400, 600);resizewindow(GoldBP, 0);wait(400, 600);pausewalking(0);setcavebot('yes');end;end</Open_Bp_At_Sea>
      <Go_North_Respawn>Stand 31938 31044 6</Go_North_Respawn>
      <Use_Ramp_North>Stand 31938 31041 6</Use_Ramp_North>
      <Checker_North_Respawn>Action 31938 31041 8 if not islocation(30) then;gotolabel('Go_North_Respawn');end</Checker_North_Respawn>
      <First_Down>Stand 31928 31031 8</First_Down>
      <Down_First>Action 31928 31031 8 levitate('s','down')</Down_First>
      <Check_Down_First>Action 31928 31032 9 if not islocation(15) then;gotolabel('First_Down');end</Check_Down_First>
      <w009>Node 31930 31030 9</w009>
      <w010>Node 31936 31024 9</w010>
      <First_Up>Stand 31925 31031 9</First_Up>
      <Up_First>Action 31925 31031 9 levitate('n','up')</Up_First>
      <Up_Check_First>Action 31925 31030 8 if not islocation(30) then;gotolabel('First_Up');end</Up_Check_First>
      <w011>Node 31920 31024 8</w011>
      <w012>Node 31911 31016 8</w012>
      <Second_Down>Stand 31908 31010 8</Second_Down>
      <Down_Second>Action 31908 31010 8 levitate('e','down')</Down_Second>
      <w013>Stand 31909 31010 9</w013>
      <Down_Again_Second>Action 31909 31010 9 levitate('e','down')</Down_Again_Second>
      <Check_Down_Second>Action 31910 31010 10 if not islocation(20) then;gotolabel('Second_Down');end</Check_Down_Second>
      <w014>Node 31917 31011 10</w014>
      <w015>Node 31922 31016 10</w015>
      <Second_Up>Stand 31910 31010 10</Second_Up>
      <Up_Second>Action 31910 31010 10 levitate('w','up')</Up_Second>
      <w016>Stand 31909 31010 9</w016>
      <Up_Again_Second>Action 31909 31010 9 levitate('w','up')</Up_Again_Second>
      <Up_Check_Second>Action 31908 31010 8 if not islocation(30) then;gotolabel('Second_Up');end</Up_Check_Second>
      <Third_Down>Stand 31906 31010 8</Third_Down>
      <Down_Third>Action 31906 31010 8 levitate('w','down')</Down_Third>
      <Down_Check_Third>Action 31905 31010 9 if not islocation(15) then;gotolabel('Third_Down');end</Down_Check_Third>
      <w017>Node 31901 30997 9</w017>
      <Third_Up>Stand 31905 31010 9</Third_Up>
      <Up_Third>Action 31905 31010 9 levitate('e','up')</Up_Third>
      <Up_Check_Third>Action 31906 31010 8 if not islocation(30) then;gotolabel('Third_Up');end</Up_Check_Third>
      <Fourth_Down>Stand 31909 31019 8</Fourth_Down>
      <Down_Fourth>Action 31909 31019 8 levitate('s','down')</Down_Fourth>
      <w018>Stand 31909 31021 9</w018>
      <Down_Again_Fourth>Action 31909 31021 9 levitate('s','down')</Down_Again_Fourth>
      <Down_Check_Fourth>Action 31909 31022 10 if not islocation(30) then;gotolabel('Fourth_Down');end</Down_Check_Fourth>
      <w019>Node 31897 31021 10</w019>
      <Fourth_Up>Stand 31909 31022 10</Fourth_Up>
      <Up_Fourth>Action 31909 31022 10 levitate('n','up')</Up_Fourth>
      <w020>Stand 31909 31020 9</w020>
      <Up_Again_Fourth>Action 31909 31020 9</Up_Again_Fourth>
      <Up_Check_Fourth>Action 31909 31019 8 if not islocation(30) then;gotolabel('Fourth_Up');end</Up_Check_Fourth>
      <Checker_Supplies>Action 31913 31026 8 local softs = 0;;if boots == 3549 then;    softs = itemcount(6529) + 1;else;    softs = itemcount(6529);end;;if (itemcount(ManaName) <= ManaCheck) or (itemcount(HealthName) <= HealthCheck) or (cap <= CapCheck) or (RefillSofts == true and softs == 0) and posz == 8 then;    setsettings("Settings\\Alerts\\Player\\OnScreen\\FlashClient", "no");    setsettings("Settings\\Alerts\\Player\\OnScreen\\PlaySound", "no");    setsettings("Settings\\Actions\\List\\reopen bps\\Enabled", 'no');    gotolabel('Go_Refill');else;    gotolabel('Fifth_Down');end</Checker_Supplies>
      <Fifth_Down>Stand 31906 31034 8</Fifth_Down>
      <Down_Fifth>Action 31906 31034 8 levitate('s','down')</Down_Fifth>
      <w021>Stand 31906 31035 9</w021>
      <Down_Again_Fifth>Action 31906 31035 9 levitate('s','down')</Down_Again_Fifth>
      <Down_Check_Fifth>Action 31906 31036 10 if not islocation(10) then;gotolabel('Fifth_Down');end</Down_Check_Fifth>
      <w023>Node 31904 31041 10</w023>
      <Fifth_Up>Stand 31906 31036 10</Fifth_Up>
      <Up_Fifth>Action 31906 31036 10 levitate('n','up')</Up_Fifth>
      <w022>Stand 31906 31035 9</w022>
      <Up_Again_Fifth>Action 31906 31035 9 levitate('n','up')</Up_Again_Fifth>
      <Up_Check_Fifth>Action 31906 31034 8 if not islocation(30) then;gotolabel('Fifth_Up');end</Up_Check_Fifth>
      <Six_Down>Stand 31902 31035 8</Six_Down>
      <Down_Six>Action 31902 31036 9 levitate('s','down')</Down_Six>
      <Down_Check_Six>Action 31902 31035 9 if not islocation(5) then;gotolabel('Six_Down');end</Down_Check_Six>
      <w024>Stand 31899 31037 9</w024>
      <w025>Node 31890 31044 9</w025>
      <Six_Up>Stand 31902 31036 9</Six_Up>
      <Up_Six>Action 31902 31036 9 levitate('n','up')</Up_Six>
      <Up_Check_Six>Action 31902 31035 8 if not islocation(30) then;gotolabel('Six_Up');end</Up_Check_Six>
      <Seven_Down>Stand 31917 31038 8</Seven_Down>
      <Down_Seven>Action 31917 31038 8 levitate('e','down')</Down_Seven>
      <w026>Stand 31918 31038 9</w026>
      <Down_Again_Seven>Action 31918 31038 9 levitate('e','down')</Down_Again_Seven>
      <Down_Check_Seven>Action 31919 31038 10 if not islocation(15) then;gotolabel('Seven_Down');end</Down_Check_Seven>
      <w027>Node 31924 31044 10</w027>
      <Seven_Up>Stand 31919 31040 10</Seven_Up>
      <Up_Seven>Action 31919 31040 10 levitate('w','up')</Up_Seven>
      <w028>Stand 31918 31040 9</w028>
      <Up_Again_Seven>Action 31918 31040 9 levitate('w','up')</Up_Again_Seven>
      <Up_Check_Seven>Action 31917 31040 8 if not islocation(30) then;gotolabel('Seven_Up');end</Up_Check_Seven>
      <Checker_Supplies2>Action 31916 31040 8 local softs = 0;;if boots == 3549 then;    softs = itemcount(6529) + 1;else;    softs = itemcount(6529);end;;if (itemcount(ManaName) <= ManaCheck) or (itemcount(HealthName) <= HealthCheck) or (cap <= CapCheck) or (RefillSofts == true and softs == 0) and posz == 8 then;    setsettings("Settings\\Alerts\\Player\\OnScreen\\FlashClient", "no");    setsettings("Settings\\Alerts\\Player\\OnScreen\\PlaySound", "no");    setsettings("Settings\\Actions\\List\\reopen bps\\Enabled", 'no');    gotolabel('Go_Refill');else;    gotolabel('Eight_Down');end</Checker_Supplies2>
      <Eight_Down>Stand 31920 31053 8</Eight_Down>
      <Down_Eight>Action 31920 31053 8 levitate('e','down')</Down_Eight>
      <w029>Stand 31932 31052 9</w029>
      <Eight_Up>Stand 31926 31052 9</Eight_Up>
      <Up_Eight>Action 31926 31052 9 levitate('e','up')</Up_Eight>
      <Up_Check_Eight>Action 31927 31052 8 if not islocation(30) then;gotolabel('Eight_Up');end</Up_Check_Eight>
      <Check_Leaver>Action 31936 31042 8 local softs = 0;;if boots == 3549 then;    softs = itemcount(6529) + 1;else;    softs = itemcount(6529);end;;if (itemcount(ManaName) <= ManaCheck) or (itemcount(HealthName) <= HealthCheck) or (cap <= CapCheck) or (RefillSofts == true and softs == 0) and posz == 8 then;    setsettings("Settings\\Alerts\\Player\\OnScreen\\FlashClient", "no");    setsettings("Settings\\Alerts\\Player\\OnScreen\\PlaySound", "no");    setsettings("Settings\\Actions\\List\\reopen bps\\Enabled", 'no');    gotolabel('Go_Refill');else;    gotolabel('First_Down');end</Check_Leaver>
      <Go_Refill>Stand 31938 31042 8</Go_Refill>
      <Leaver_Check>Action 31933 31046 6 if not islocation(10) then;gotolabel('Go_Refill');end</Leaver_Check>
      <At_Haba_To_Svar>Stand 31948 31046 6</At_Haba_To_Svar>
      <Going_To_Svar_City>Action 31948 31046 6 if not islocation(3) then;gotolabel('At_Haba_To_Svar');else;;reachcreature("Captain Haba");wait(500, 800);;say('hi') ;wait(1000, 1200) ;npcsay('passage');wait(100, 200);npcsay('yes');wait(800, 1000);;end</Going_To_Svar_City>
      <Checking_Is_On_Svargrond>Action 32339 31117 7 if not islocation(10) then;gotolabel('At_Haba_To_Svar');else;gotolabel('Going_Deposit');end</Checking_Is_On_Svargrond>
    </Waypoints>
    <Pathfinding>
      <SpecialAreas />
      <WalkThroughPlayers>no</WalkThroughPlayers>
      <WalkingMethod>Map Clicks</WalkingMethod>
      <MapWalkDistance>20 to 50</MapWalkDistance>
      <WalkableIds>140;404;831;832;833;834;883;2118;2119;2120;2121;2122;2123;2124;2125;2126;2127;2131;2132;2133;2134;2135;2314;2315;2316;2319;2346;2347;2348;2349;2350;2351;2352;2353;2354;2355;2356;2357;2358;2359;2360;2361;2362;2363;2364;2365;2366;2367;2368;2369;2370;2371;2372;2373;2374;2375;2376;2377;2378;2379;2380;2381;2382;2383;2384;2385;2418;2419;2420;2421;2422;2423;2424;2425;2426;2431;2432;2433;2434;2441;2442;2443;2444;2469;2471;2472;2473;2478;2480;2481;2482;2483;2484;2485;2486;2519;2523;2775;2776;2777;2778;2779;2780;2781;2782;2783;2784;2785;2786;2787;2788;2789;2790;2791;2792;2793;2794;2795;2796;2797;2798;2799;2800;2801;2802;2803;2804;2805;2806;2807;2808;2809;2810;2811;2812;2981;2983;2982;2984;2985;2987;2988;3503;3504;3514;3807;5086;5087;5088;6114;6115;6355;6356;6357;6358;6359;6360;6361;6362;6371;6372;7864;8455;8763;9061;9062;10207;10209;10216;10286;10287;10288;11009;11800;11801;11802;11803;11804;11805;11806;11807;11808;11809;11810</WalkableIds>
    </Pathfinding>
    <Settings>
      <Rope>3003</Rope>
      <Shovel>3457</Shovel>
      <Pick>3456</Pick>
      <Machete>3308</Machete>
      <NodeRange>4</NodeRange>
      <Priority>Target</Priority>
      <OpenNextBp>yes</OpenNextBp>
      <AutoMount>yes</AutoMount>
      <Anti-idle>no</Anti-idle>
      <EatFood>yes</EatFood>
      <FoodToEat>3725;3587;3600;3595;3589;3598;8014;3583;3606;3578;3592;3582;3577;3593;3586;3585;3581;3723</FoodToEat>
      <PauseOnDeath>yes</PauseOnDeath>
    </Settings>
    <Enabled>yes</Enabled>
  </CaveBot>
  <Looting>
    <List>
      <crystalline-armor>
        <Id>8050</Id>
        <Destination>02</Destination>
        <AlarmOn>No Alarm</AlarmOn>
      </crystalline-armor>
      <glacier-kilt>
        <Id>823</Id>
        <Destination>02</Destination>
        <AlarmOn>No Alarm</AlarmOn>
      </glacier-kilt>
      <focus-cape>
        <Id>8043</Id>
        <Destination>02</Destination>
        <AlarmOn>No Alarm</AlarmOn>
      </focus-cape>
      <leviathans-amulet>
        <Id>9303</Id>
        <Destination>02</Destination>
        <AlarmOn>No Alarm</AlarmOn>
      </leviathans-amulet>
      <northwind-rod>
        <Id>8083</Id>
        <Destination>02</Destination>
        <AlarmOn>No Alarm</AlarmOn>
      </northwind-rod>
      <glacier-amulet>
        <Id>815</Id>
        <Destination>02</Destination>
        <AlarmOn>No Alarm</AlarmOn>
      </glacier-amulet>
      <serpent-sword>
        <Id>3297</Id>
        <Destination>02</Destination>
        <AlarmOn>No Alarm</AlarmOn>
      </serpent-sword>
      <sea-serpent-scale>
        <Id>9666</Id>
        <Destination>02</Destination>
        <AlarmOn>No Alarm</AlarmOn>
      </sea-serpent-scale>
      <spirit-cloak>
        <Id>8042</Id>
        <Destination>02</Destination>
        <AlarmOn>No Alarm</AlarmOn>
      </spirit-cloak>
      <small-sapphire>
        <Id>3029</Id>
        <Destination>02</Destination>
        <AlarmOn>No Alarm</AlarmOn>
      </small-sapphire>
      <stealth-ring>
        <Id>3049</Id>
        <Destination>02</Destination>
        <AlarmOn>No Alarm</AlarmOn>
      </stealth-ring>
      <bloody-pincers>
        <Id>9633</Id>
        <Destination>02</Destination>
        <AlarmOn>No Alarm</AlarmOn>
      </bloody-pincers>
      <white-pearl>
        <Id>3026</Id>
        <Destination>02</Destination>
        <AlarmOn>No Alarm</AlarmOn>
      </white-pearl>
      <gold-coin>
        <Id>3031</Id>
        <Destination>03</Destination>
        <AlarmOn>No Alarm</AlarmOn>
      </gold-coin>
      <great-mana-potion>
        <Id>238</Id>
        <Destination>02</Destination>
        <AlarmOn>No Alarm</AlarmOn>
      </great-mana-potion>
      <strong-health-potion>
        <Id>236</Id>
        <Destination>01</Destination>
        <AlarmOn>No Alarm</AlarmOn>
      </strong-health-potion>
      <strong-mana-potion>
        <Id>237</Id>
        <Destination>02</Destination>
        <AlarmOn>No Alarm</AlarmOn>
      </strong-mana-potion>
      <platinum-coin>
        <Id>3035</Id>
        <Destination>02</Destination>
        <AlarmOn>No Alarm</AlarmOn>
      </platinum-coin>
      <ring-of-healing>
        <Id>3098</Id>
        <Destination>02</Destination>
        <AlarmOn>No Alarm</AlarmOn>
      </ring-of-healing>
    </List>
    <Condition>Corpses with listed items</Condition>
    <Style>After melee kill</Style>
    <OpenBodyTime>300</OpenBodyTime>
    <Range>10</Range>
    <EatFood>yes</EatFood>
    <Enabled>yes</Enabled>
  </Looting>
  <Targeting>
    <Monsters>
      <Blood-Crab>
        <Categories>-</Categories>
        <Danger>0</Danger>
        <ListSettings>
          <Setting0>
            <Count>Any</Count>
            <HpRange>0 to 100 %</HpRange>
            <Stance>No movement</Stance>
            <Avoid>None</Avoid>
            <Distance>0</Distance>
            <Attack>Attack</Attack>
            <ListSpell />
            <SpellRate>500 to 1000</SpellRate>
            <AttackMode>Chase/Offensive</AttackMode>
          </Setting0>
        </ListSettings>
        <Looting>yes</Looting>
        <MustAttackMe>yes</MustAttackMe>
        <OnlyIfTrapped>no</OnlyIfTrapped>
      </Blood-Crab>
      <Sea-Serpent>
        <Categories>-</Categories>
        <Danger>0</Danger>
        <ListSettings>
          <Setting0>
            <Count>Any</Count>
            <HpRange>0 to 100 %</HpRange>
            <Stance>Approach</Stance>
            <Avoid>Beam</Avoid>
            <Distance>0</Distance>
            <Attack>Attack</Attack>
            <ListSpell>
              <Spell0>Brutal Strike</Spell0>
            </ListSpell>
            <SpellRate>500 to 1000</SpellRate>
            <AttackMode>Stand/Offensive</AttackMode>
          </Setting0>
        </ListSettings>
        <Looting>yes</Looting>
        <MustAttackMe>no</MustAttackMe>
        <OnlyIfTrapped>no</OnlyIfTrapped>
      </Sea-Serpent>
      <Young-Sea-Serpent>
        <Categories>-</Categories>
        <Danger>0</Danger>
        <ListSettings>
          <Setting0>
            <Count>Any</Count>
            <HpRange>0 to 100 %</HpRange>
            <Stance>No movement</Stance>
            <Avoid>None</Avoid>
            <Distance>0</Distance>
            <Attack>Attack</Attack>
            <ListSpell />
            <SpellRate>500 to 1000</SpellRate>
            <AttackMode>Chase/Offensive</AttackMode>
          </Setting0>
        </ListSettings>
        <Looting>yes</Looting>
        <MustAttackMe>no</MustAttackMe>
        <OnlyIfTrapped>no</OnlyIfTrapped>
      </Young-Sea-Serpent>
    </Monsters>
    <Settings>
      <ListOrder>7</ListOrder>
      <Health>9</Health>
      <Proximity>3</Proximity>
      <Danger>5</Danger>
      <PlayerOnScreenSecurity>If cavebotting</PlayerOnScreenSecurity>
      <CooldownControl>yes</CooldownControl>
      <CheckItem>no</CheckItem>
      <MustBeReachable>yes</MustBeReachable>
      <MustBeShootable>no</MustBeShootable>
    </Settings>
    <Enabled>yes</Enabled>
  </Targeting>
  <Hud>
    <List>
      <GeneralInfo>
        <Script>setsize(100,100)
setfontcolor("white")

addtext(name,10,30)
addtext("LvL :", 150,30)
addtext(level, 180,30)
addtext("Next LvL :", 150,45)
addtext(exptolevel(), 210,45)

addtext("Pos X : ", 10,45)
addtext(posx, 54,45)
addtext("Pos Y : ", 10,60)
addtext(posy, 54,60)
addtext("Pos Z : ", 10,75)
addtext(posz, 54,75)</Script>
        <RefreshRate>1000</RefreshRate>
        <Enabled>no</Enabled>
      </GeneralInfo>
      <MMH>
        <Script>-- [[ INIT START ]] --
	--
	--                       88                                                                
	--                       ""                                                ,d              
	--                                                                         88              
	--            ,adPPYba,  88  8b,dPPYba,  88,dPYba,,adPYba,   ,adPPYYba,  MM88MMM  ,adPPYba,
	--            I8[    ""  88  88P'   "Y8  88P'   "88"    "8a  ""     `Y8    88    a8P_____88
	--             `"Y8ba,   88  88          88      88      88  ,adPPPPP88    88    8PP"""""""
	--            aa    ]8I  88  88          88      88      88  88,    ,88    88,   "8b,   ,aa
	--   Author:  `"YbbdP"'  88  88          88      88      88  `"8bbdP"Y8    "Y888  `"Ybbd8"'
	--   
	--   Monitor My Hunting!
	--
	--   Version: 1.0
	--   Created: 7.09.2012
	--   Last update: 18.09.2012
	--
	
	MONITOR_MY_HUNTING = MONITOR_MY_HUNTING or {
		SCRIPT_NAME = "Monitor My Hunting",
		SCRIPT_VERSION = "1.0",
		
		CLEARED_STATS = false,
		INITIALIZED = false,
	}

	MONITOR_MY_HUNTING.SHOW_ALL_ITEMS = false
	MONITOR_MY_HUNTING.ITEMS_LIST = {
		{NAME = "gold coin", VALUE = 1},
		{NAME = "platinum coin", VALUE = 100},
		{NAME = "Small Sapphire", VALUE = 250},
		{NAME = "Sea Serpent Scale", VALUE = 520},
		{NAME = "Serpent Sword", VALUE = 900},
		{NAME = "Strong Mana Potion", VALUE = 60},
		{NAME = "Strong Health Potion", VALUE = 50},
		{NAME = "Stealth Ring", VALUE = 300},
		{NAME = "Northwind Rod", VALUE = 1500},
		{NAME = "Focus Cape", VALUE = 6000},
		{NAME = "Leviathan's Amulet", VALUE = 3000},
		{NAME = "Glacier Amulet", VALUE = 1500},
		{NAME = "Crystalline Armor", VALUE = 16000},
		{NAME = "Glacier Kilt", VALUE = 11000},
		{NAME = "Ring of Healing", VALUE = 1000},
		{NAME = "great mana potion", VALUE = 120},
		{NAME = "Diamond Sceptre", VALUE = 3000},
		{NAME = "Crystal of Focus", VALUE = 2000},
		}
 
	MONITOR_MY_HUNTING.SHOW_ALL_SUPPLIES = false
	MONITOR_MY_HUNTING.SUPPLIES_LIST = {
		{NAME = "mana potion", PRICE = 50},
		{NAME = "great health potion", PRICE = 190},
		{NAME = "ultimate health potion", PRICE = 310},
	}
	
	-- [[ DO NOT CHANGE ANYTHING BELOW THIS LINE. ]] --
	
	MONITOR_MY_HUNTING.TEMP_ITEMS_LIST = MONITOR_MY_HUNTING.TEMP_ITEMS_LIST or {}
	MONITOR_MY_HUNTING.TEMP_SUPPLIES_LIST = MONITOR_MY_HUNTING.TEMP_SUPPLIES_LIST or {}
	MONITOR_MY_HUNTING.COLORS = MONITOR_MY_HUNTING.COLORS or {
		BLACK = rgbcolor(1, 1, 1),
		ORANGE = rgbcolor(255, 165, 0),
		BLUE = rgbcolor(30, 144, 255),
		CORNSILK = rgbcolor(205, 200, 177),
		WHITE = rgbcolor(255, 255, 255),
		GREEN = rgbcolor(107, 142, 35),
		RED = rgbcolor(178, 34, 34),
	}
	
	local function CreateMessageObject(MESSAGE_DATA)
		if (type(MESSAGE_DATA) ~= "userdata") then
			return setmetatable({__data = {TYPE = -1, TIME_STAMP = -1, SENDER_NAME = "", SENDER_LEVEL = -1, CONTENT = ""}}, MessageMetaTable)
		else
			return setmetatable({__data = {TYPE = MESSAGE_DATA.type, TIME_STAMP = Misc.ConvertToSeconds(string.sub(MESSAGE_DATA.text, 1, 5)), SENDER_NAME = MESSAGE_DATA.sender, SENDER_LEVEL = tonumber((tostring(string.match(MESSAGE_DATA.text, ".+ (%b[]): .+")):gsub("[^%d]", ""))) or 0, CONTENT = string.sub(MESSAGE_DATA.text, 7)}}, MessageMetaTable)
		end
	end
	
	local function addtextshadow(DISPLAY_TEXT, X_OFFSET, Y_OFFSET, FONT_COLOR)
		setfontcolor(MONITOR_MY_HUNTING.COLORS.BLACK)
		addtext(DISPLAY_TEXT, X_OFFSET + 1, Y_OFFSET + 1)
		setfontcolor(FONT_COLOR)
		addtext(DISPLAY_TEXT, X_OFFSET, Y_OFFSET)
	end
-- [[ INIT END ]] --

if (not Stats.Update()) then
	local SERVER_LOG_MESSAGES = getnewmessages("Server Log")
	local SERVER_LOG_MESSAGES_COUNT = SERVER_LOG_MESSAGES.count - 1
	
	for INDEX = 0, SERVER_LOG_MESSAGES_COUNT do
		local MESSAGE_OBJECT = CreateMessageObject(SERVER_LOG_MESSAGES[SERVER_LOG_MESSAGES_COUNT - INDEX])
		
		if (MESSAGE_OBJECT:Type() == 19 and MESSAGE_OBJECT:Content():lower():match("^loot of")) then
			local LOOT_INFO = Message.ParseLootMessage(MESSAGE_OBJECT, true)

			if (#LOOT_INFO.NAME > 0) then
				Stats.__data.MONSTERS_KILLED[LOOT_INFO.NAME] = (Stats.__data.MONSTERS_KILLED[LOOT_INFO.NAME] or 0) + 1
				
				for _, LOOT_ITEM in ipairs(LOOT_INFO.ITEMS) do
					if (Stats.__data.ITEMS_LOOTED[LOOT_ITEM.ID]) then
						Stats.__data.ITEMS_LOOTED[LOOT_ITEM.ID].QUANTITY = Stats.__data.ITEMS_LOOTED[LOOT_ITEM.ID].QUANTITY + LOOT_ITEM.QUANTITY
					else
						Stats.__data.ITEMS_LOOTED[LOOT_ITEM.ID] = {ID = LOOT_ITEM.ID, NAME = LOOT_ITEM.NAME, QUANTITY = LOOT_ITEM.QUANTITY, VALUE = Item.GetValue(LOOT_ITEM.ID)}
					end
				end
			end
		end
	end
end

local RESET_ITEMS_AND_SUPPLIES = #MONITOR_MY_HUNTING.ITEMS_LIST ~= MONITOR_MY_HUNTING.TEMP_ITEMS_LIST or #MONITOR_MY_HUNTING.SUPPLIES_LIST ~= MONITOR_MY_HUNTING.TEMP_SUPPLIES_LIST

if (not RESET_ITEMS_AND_SUPPLIES) then
	for INDEX, LOOT_ITEM in ipairs(MONITOR_MY_HUNTING.ITEMS_LIST) do
		if (LOOT_ITEM.NAME ~= MONITOR_MY_HUNTING.TEMP_ITEMS_LIST[INDEX].NAME or LOOT_ITEM.VALUE ~= MONITOR_MY_HUNTING.TEMP_ITEMS_LIST[INDEX].VALUE) then
			RESET_ITEMS_AND_SUPPLIES = true
			break
		end
	end
end

if (not RESET_ITEMS_AND_SUPPLIES) then
	for INDEX, SUPPLY_ITEM in ipairs(MONITOR_MY_HUNTING.SUPPLIES_LIST) do
		if (SUPPLY_ITEM.NAME ~= MONITOR_MY_HUNTING.TEMP_SUPPLIES_LIST[INDEX].NAME or SUPPLY_ITEM.PRICE ~= MONITOR_MY_HUNTING.TEMP_SUPPLIES_LIST[INDEX].PRICE) then
			RESET_ITEMS_AND_SUPPLIES = true
			break
		end
	end
end

if (not MONITOR_MY_HUNTING.INITIALIZED or RESET_ITEMS_AND_SUPPLIES) then
	if (not MONITOR_MY_HUNTING.CLEARED_STATS) then
		Stats.Clear(CLEAR_STATS_ALL)
		Stats.Update()
		
		MONITOR_MY_HUNTING.CLEARED_STATS = true
	end
	
	MONITOR_MY_HUNTING.TEMP_ITEMS_LIST, MONITOR_MY_HUNTING.TEMP_SUPPLIES_LIST = {}, {}
		
	for _, LOOT_ITEM in ipairs(MONITOR_MY_HUNTING.ITEMS_LIST) do
		local LOOT_ITEM_ID = Item.GetID(type(LOOT_ITEM.NAME) ~= "table" and LOOT_ITEM.NAME or unpack(LOOT_ITEM.NAME))
		
		Stats.AddItemsLooted(LOOT_ITEM_ID, 0, LOOT_ITEM.VALUE)
		table.insert(MONITOR_MY_HUNTING.TEMP_ITEMS_LIST, {ID = LOOT_ITEM_ID, NAME = LOOT_ITEM.NAME, VALUE = LOOT_ITEM.VALUE})
	end
	 
	for _, SUPPLY_ITEM in ipairs(MONITOR_MY_HUNTING.SUPPLIES_LIST) do
		local SUPPLY_ITEM_ID = Item.GetID(type(SUPPLY_ITEM.NAME) ~= "table" and SUPPLY_ITEM.NAME or unpack(SUPPLY_ITEM.NAME))
		
		Stats.AddSuppliesUsed(SUPPLY_ITEM_ID, 0, SUPPLY_ITEM.PRICE)
		table.insert(MONITOR_MY_HUNTING.TEMP_SUPPLIES_LIST, {ID = SUPPLY_ITEM_ID, NAME = SUPPLY_ITEM.NAME, PRICE = SUPPLY_ITEM.PRICE})
	end
	
	MONITOR_MY_HUNTING.INITIALIZED = true
end

setposition(Client.ClientWindow().right - 434, Client.WorldWindow().top + 5)

local Y_POSITION, INDEX, ITEMS_LOOTED_WORTH, SUPPLIES_USED_WORTH = 30, 0, 0, 0

addtextshadow(sprintf("%s v%s", MONITOR_MY_HUNTING.SCRIPT_NAME:upper(), MONITOR_MY_HUNTING.SCRIPT_VERSION), 10, Y_POSITION + (INDEX * 16), MONITOR_MY_HUNTING.COLORS.ORANGE)

Y_POSITION = Y_POSITION + 20

addtextshadow("ITEMS LOOTED", 10, Y_POSITION + (INDEX * 16), MONITOR_MY_HUNTING.COLORS.BLUE)

Y_POSITION = Y_POSITION + 20

for _, LOOT_ITEM in pairs(Stats.GetItemsLooted()) do
    if ((MONITOR_MY_HUNTING.SHOW_ALL_ITEMS or table.find(MONITOR_MY_HUNTING.TEMP_ITEMS_LIST, LOOT_ITEM.ID, "ID")) and LOOT_ITEM.QUANTITY > 0) then
	addtextshadow(((#LOOT_ITEM.NAME > 17 and sprintf("%s...", string.match(string.sub(LOOT_ITEM.NAME, 1, 17), "(.-)%s?$"))) or LOOT_ITEM.NAME):ucwords(), 10, Y_POSITION + (INDEX * 16), MONITOR_MY_HUNTING.COLORS.CORNSILK)
	addtextshadow(sprintf("%s (%sK)", Misc.FormatNumber(LOOT_ITEM.QUANTITY), tostring(math.floor(LOOT_ITEM.VALUE * LOOT_ITEM.QUANTITY / 100) / 10)), 140, Y_POSITION + (INDEX * 16), MONITOR_MY_HUNTING.COLORS.WHITE)

	INDEX, ITEMS_LOOTED_WORTH = INDEX + 1, ITEMS_LOOTED_WORTH + (LOOT_ITEM.VALUE * LOOT_ITEM.QUANTITY)
    end
end

addtextshadow("Total:", 10, Y_POSITION + (INDEX * 16), MONITOR_MY_HUNTING.COLORS.WHITE)
addtextshadow(sprintf("%s GPs", Misc.FormatNumber(ITEMS_LOOTED_WORTH)), 10 + 35, Y_POSITION + (INDEX * 16), MONITOR_MY_HUNTING.COLORS.ORANGE)

Y_POSITION = Y_POSITION + 20

addtextshadow("SUPPLIES USED", 10, Y_POSITION + (INDEX * 16), MONITOR_MY_HUNTING.COLORS.BLUE)

Y_POSITION = Y_POSITION + 20

for _, SUPPLY_ITEM in pairs(Stats.GetSuppliesUsed()) do
    if ((MONITOR_MY_HUNTING.SHOW_ALL_SUPPLIES or table.find(MONITOR_MY_HUNTING.TEMP_SUPPLIES_LIST, SUPPLY_ITEM.ID, "ID")) and SUPPLY_ITEM.QUANTITY > 0) then
        addtextshadow(((#SUPPLY_ITEM.NAME > 17 and sprintf("%s...", string.match(string.sub(SUPPLY_ITEM.NAME, 1, 17), "(.-)%s?$"))) or SUPPLY_ITEM.NAME):ucwords(), 10, Y_POSITION + (INDEX * 16), MONITOR_MY_HUNTING.COLORS.CORNSILK)
        addtextshadow(sprintf("%s (%sK)", Misc.FormatNumber(SUPPLY_ITEM.QUANTITY), tostring(math.floor(SUPPLY_ITEM.PRICE * SUPPLY_ITEM.QUANTITY / 100) / 10)), 140, Y_POSITION + (INDEX * 16), MONITOR_MY_HUNTING.COLORS.WHITE)

        INDEX, SUPPLIES_USED_WORTH = INDEX + 1, SUPPLIES_USED_WORTH + (SUPPLY_ITEM.PRICE * SUPPLY_ITEM.QUANTITY)
    end
end

addtextshadow("Total:", 10, Y_POSITION + (INDEX * 16), MONITOR_MY_HUNTING.COLORS.WHITE)
addtextshadow(sprintf("%s GPs", Misc.FormatNumber(SUPPLIES_USED_WORTH)), 10 + 35, Y_POSITION + (INDEX * 16), MONITOR_MY_HUNTING.COLORS.ORANGE)

Y_POSITION = Y_POSITION + 20

addtextshadow(sprintf("%s: %s GPs (%s K/H)", ((ITEMS_LOOTED_WORTH >= SUPPLIES_USED_WORTH and ("PROFIT")) or ("WASTE")), Misc.FormatNumber(ITEMS_LOOTED_WORTH - SUPPLIES_USED_WORTH), tostring(math.floor(((ITEMS_LOOTED_WORTH - SUPPLIES_USED_WORTH) * 3600) / (System.HuntingTime() / 1000) / 100) / 10)), 10, Y_POSITION + (INDEX * 16), ITEMS_LOOTED_WORTH >= SUPPLIES_USED_WORTH and MONITOR_MY_HUNTING.COLORS.GREEN or MONITOR_MY_HUNTING.COLORS.RED)</Script>
        <RefreshRate>1000</RefreshRate>
        <Enabled>yes</Enabled>
      </MMH>
    </List>
    <Show>If focused</Show>
    <Enabled>yes</Enabled>
  </Hud>
  <Input>
    <Keyboard>
      <Mode>Simulate</Mode>
      <StuckCtrlShift>If cavebot on, release after 1 sec</StuckCtrlShift>
      <TypingStyle>Keyboard keys</TypingStyle>
      <PressWaitTime>45 to 65</PressWaitTime>
    </Keyboard>
    <Mouse>
      <Mode>Simulate</Mode>
      <Scroll>Use mouse wheel</Scroll>
      <MoveSpeed>Instantaneous</MoveSpeed>
      <ClickWaitTime>30 to 50</ClickWaitTime>
    </Mouse>
    <OpenMenuPolicy>Confirm if cavebotting</OpenMenuPolicy>
    <Enabled>yes</Enabled>
  </Input>
</Settings>
 
Status
Not open for further replies.
Top