What's new

Knight [FACC] Abdendriel Trolls

Status
Not open for further replies.

Samman

Senior User
Joined
Aug 23, 2009
Messages
782
Reaction score
39
Code:
<Settings>
  <Alerts>
    <Player>
      <OnScreen>
        <PlaySound>no</PlaySound>
        <FlashClient>no</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>
      <GMOnScreen>
        <PlaySound>yes</PlaySound>
        <FlashClient>yes</FlashClient>
        <PauseBot>yes</PauseBot>
        <Disconnect>no</Disconnect>
      </GMOnScreen>
    </Player>
    <Creature />
    <Item />
    <Message>
      <PrivateMessage>
        <PlaySound>yes</PlaySound>
        <FlashClient>yes</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>
      <SafeBank>
        <PlaySound>yes</PlaySound>
        <FlashClient>yes</FlashClient>
        <PauseBot>yes</PauseBot>
        <CloseTibia>no</CloseTibia>
        <Disconnect>yes</Disconnect>
      </SafeBank>
      <HealCreature>
        <PlaySound>yes</PlaySound>
        <FlashClient>yes</FlashClient>
        <PauseBot>yes</PauseBot>
        <CloseTibia>no</CloseTibia>
        <Disconnect>yes</Disconnect>
        <Screenshot>no</Screenshot>
      </HealCreature>
      <YourAttack>
        <PlaySound>yes</PlaySound>
        <FlashClient>yes</FlashClient>
        <PauseBot>yes</PauseBot>
        <CloseTibia>no</CloseTibia>
        <Disconnect>yes</Disconnect>
        <Screenshot>no</Screenshot>
        <SafeList>null</SafeList>
      </YourAttack>
      <Unjust>
        <PlaySound>yes</PlaySound>
        <FlashClient>yes</FlashClient>
        <PauseBot>yes</PauseBot>
        <CloseTibia>no</CloseTibia>
        <Disconnect>yes</Disconnect>
      </Unjust>
    </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>
    <Stamina>
      <Value>841</Value>
      <PlaySound>yes</PlaySound>
      <FlashClient>yes</FlashClient>
      <PauseBot>yes</PauseBot>
      <CloseTibia>no</CloseTibia>
      <Disconnect>yes</Disconnect>
    </Stamina>
    <Disconnect>
      <PlaySound>no</PlaySound>
      <FlashClient>no</FlashClient>
      <PauseBot>no</PauseBot>
    </Disconnect>
    <Enabled>no</Enabled>
  </Alerts>
  <Healer>
    <Rules>
      <exura-ico>
        <HealRange>0 to 80 %</HealRange>
        <ManaRange>40 to all</ManaRange>
        <HealMethod>Wound Cleansing</HealMethod>
        <ExtraCondition>No condition</ExtraCondition>
        <CooldownControl>yes</CooldownControl>
        <CheckItem>yes</CheckItem>
        <SpamRate>100 to 300</SpamRate>
        <Enabled>yes</Enabled>
      </exura-ico>
      <HP>
        <HealRange>0 to 50 %</HealRange>
        <ManaRange>0 to 100 %</ManaRange>
        <HealMethod>Health Potion</HealMethod>
        <ExtraCondition>No condition</ExtraCondition>
        <CooldownControl>yes</CooldownControl>
        <CheckItem>no</CheckItem>
        <SpamRate>200 to 400</SpamRate>
        <Enabled>yes</Enabled>
      </HP>
    </Rules>
    <PingCompensation>10</PingCompensation>
    <Enabled>yes</Enabled>
  </Healer>
  <FriendHealer>
    <Rules />
    <Enabled>no</Enabled>
  </FriendHealer>
  <Refiller>
    <Rules />
    <Enabled>yes</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>
      <Action0>
        <Script>null</Script>
        <SpamRate>800 to 1000</SpamRate>
        <Enabled>no</Enabled>
      </Action0>
    </List>
    <Setup>-- Setup -- Script by Japaniec

-----------BPS-----------

mainBP = "grey backpack"
goldBP = "green backpack"

----------DEPOT----------

dpbp = "beach backpack" -- Will deposit loots (you need to put for example 1 grey backpack filled with 19 grey backpacks inside depot)

----------Checks----------

hpbuy = 20 -- Quantity of health potion to buy
hpleave = 5 -- Quantity of health potion to go deposit
capleave = 20 -- Cap to go deposit

------Start in DP -1------</Setup>
    <Enabled>yes</Enabled>
  </Actions>
  <CaveBot>
    <Waypoints>
      <start>Stand 32682 31686 8</start>
      <open_bp>Action 32682 31686 8 closewindows();wait(500,1000);openitem(mainBP, "back");wait(500,1000);resizewindows();wait(500,1000);openitem(goldBP, mainBP, true);wait(500,1000);resizewindows()</open_bp>
      <w040>Action 32682 31686 8 if windowcount() < 2 then;gotolabel("open_bp");end</w040>
      <w037>Stand 32684 31687 8</w037>
      <finarfin>Action 32684 31687 8 local hps = positive(hpbuy - itemcount("health potion")) * 45;local Total = hps;;wait(500,1000);say("hi");wait(1500,2000);npcsay("deposit all");wait(1000,1300);npcsay("yes");wait(1000,1300);npcsay("balance");wait(2000);npcsay("withdraw "..Total);wait(1000,1300);npcsay("yes");wait(1000,1300)</finarfin>
      <w003>Stand 32682 31685 8</w003>
      <w004>Ladder 32682 31685 8</w004>
      <w005>Stand 32682 31685 8</w005>
      <w006>Ladder 32682 31685 8</w006>
      <w007>Stand 32682 31687 7</w007>
      <w008>Ladder 32682 31687 7</w008>
      <w009>Stand 32682 31687 7</w009>
      <w010>Ladder 32682 31687 7</w010>
      <w011>Stand 32682 31688 6</w011>
      <w012>Walk 32681 31672 6</w012>
      <w013>Walk 32681 31663 6</w013>
      <w014>Walk 32670 31663 6</w014>
      <potion_shop>Stand 32670 31659 6</potion_shop>
      <shiriel>Action 32670 31659 6 wait(1000);say("hi");wait(1000,2000);npcsay("vial");wait(500,800);npcsay("yes");wait(100,300);npcsay("trade");wait(1000,1500);buyitemsupto("health potion",hpbuy, itemcount(236));wait(2000);npcsay("bye");wait(1000)</shiriel>
      <w017>Stand 32669 31664 6</w017>
      <open_bp2>Action 32669 31664 6 closewindows();wait(500,1000);openitem(mainBP, "back");wait(500,1000);resizewindows();wait(500,1000);openitem(goldBP, mainBP, true);wait(500,1000);resizewindows()</open_bp2>
      <w019>Stand 32669 31664 6</w019>
      <check_bp>Action 32669 31664 6 if windowcount() < 2 then;gotolabel("open_bp");end</check_bp>
      <w021>Walk 32656 31664 6</w021>
      <w022>Stand 32656 31673 6</w022>
      <w023>Walk 32656 31674 6</w023>
      <w024>Stand 32656 31673 6</w024>
      <w025>Walk 32656 31674 6</w025>
      <w026>Stand 32655 31674 7</w026>
      <w027>Walk 32654 31674 7</w027>
      <w028>Stand 32655 31674 7</w028>
      <w029>Walk 32654 31674 7</w029>
      <w030>Stand 32654 31675 8</w030>
      <w031>Stand 32655 31670 8</w031>
      <w032>Walk 32654 31670 8</w032>
      <w033>Stand 32655 31670 8</w033>
      <w034>Walk 32654 31670 8</w034>
      <w035>Stand 32654 31671 9</w035>
      <w036>Walk 32655 31663 9</w036>
      <door1>Stand 32655 31656 9</door1>
      <w000>Stand 32655 31654 9</w000>
      <if_open1>Action 32655 31654 9 if islocation(w000) then;gotolabel("door2");return;end</if_open1>
      <if_closed1>Use 32655 31655 9</if_closed1>
      <w001>Stand 32655 31654 9</w001>
      <posa>Action 32655 31654 9 if islocation(w001) then;gotolabel("door2");return;end</posa>
      <key1>Action 32655 31656 9 useitemon(2969, 32655, 31655, 9)</key1>
      <door2>Stand 32658 31646 9</door2>
      <w002>Stand 32658 31644 9</w002>
      <if_open2>Action 32658 31644 9 if islocation(w002) then;gotolabel("hunt");return;end</if_open2>
      <if_closed2>Use 32658 31645 9</if_closed2>
      <w015>Stand 32658 31644 9</w015>
      <posc>Action 32658 31644 9 if islocation(w015) then;gotolabel("hunt");return;end</posc>
      <key2>Action 32658 31645 9 useitemon(2969, 32658, 31645, 9)</key2>
      <hunt>Stand 32660 31638 9</hunt>
      <w038>Walk 32651 31634 9</w038>
      <w039>Walk 32640 31632 9</w039>
      <w041>Walk 32660 31635 9</w041>
      <w042>Walk 32655 31620 9</w042>
      <w043>Walk 32665 31626 9</w043>
      <w044>Stand 32668 31626 9</w044>
      <w045>Walk 32669 31612 9</w045>
      <w046>Stand 32674 31626 9</w046>
      <w048>Walk 32682 31623 9</w048>
      <w049>Stand 32678 31635 9</w049>
      <w050>Stand 32668 31626 9</w050>
      <checker1>Action 32668 31626 9 wait(500);if (itemcount("health potion") <= hpleave) or (cap < capleave) then;gotolabel('refill')else;dropflask();gotolabel('hunt1');end</checker1>
      <hunt1>Stand 32668 31625 9</hunt1>
      <w053>Walk 32668 31624 9</w053>
      <w054>Stand 32668 31624 10</w054>
      <w055>Walk 32668 31625 10</w055>
      <w057>Stand 32668 31625 11</w057>
      <w058>Walk 32644 31614 11</w058>
      <w067>Walk 32642 31627 11</w067>
      <w069>Walk 32651 31632 11</w069>
      <w070>Stand 32639 31637 11</w070>
      <w071>Stand 32668 31627 11</w071>
      <w072>Walk 32661 31635 11</w072>
      <w073>Walk 32653 31654 11</w073>
      <w074>Walk 32676 31653 11</w074>
      <w075>Walk 32668 31667 11</w075>
      <w076>Walk 32685 31659 11</w076>
      <w077>Walk 32689 31662 11</w077>
      <w078>Walk 32669 31625 11</w078>
      <w079>Walk 32703 31622 11</w079>
      <w080>Walk 32734 31618 11</w080>
      <w081>Walk 32704 31631 11</w081>
      <w082>Walk 32711 31643 11</w082>
      <w083>Walk 32717 31651 11</w083>
      <w084>Walk 32729 31633 11</w084>
      <w085>Walk 32694 31620 11</w085>
      <w086>Walk 32672 31625 11</w086>
      <w087>Stand 32668 31625 11</w087>
      <w088>Ladder 32668 31625 11</w088>
      <w089>Stand 32668 31626 10</w089>
      <w090>Stand 32668 31624 10</w090>
      <w091>Stand 32668 31624 10</w091>
      <w092>Ladder 32668 31624 10</w092>
      <w093>Stand 32666 31627 9</w093>
      <w047>Stand 32660 31638 9</w047>
      <checker>Action 32660 31638 9 wait(500);if (itemcount("health potion") <= hpleave) or (cap < capleave) then;gotolabel('refill')else;dropflask();gotolabel('hunt');end</checker>
      <refill>Stand 32660 31638 9</refill>
      <door3>Stand 32658 31644 9</door3>
      <w016>Stand 32658 31646 9</w016>
      <if_open3>Action 32658 31646 9 if islocation(w016) then;gotolabel("door4");return;end</if_open3>
      <if_closed3>Use 32658 31645 9</if_closed3>
      <w018>Stand 32658 31646 9</w018>
      <pose>Action 32658 31646 9 if islocation(w018) then;gotolabel("door4");return;end</pose>
      <key3>Action 32658 31644 9 useitemon(2969, 32658, 31645, 9)</key3>
      <door4>Stand 32655 31654 9</door4>
      <w020>Stand 32655 31656 9</w020>
      <if_open4>Action 32655 31656 9 if islocation(w020) then;gotolabel("gotodp");return;end</if_open4>
      <if_closed4>Use 32655 31655 9</if_closed4>
      <w056>Stand 32655 31656 9</w056>
      <posg>Action 32655 31656 9 if islocation(w056) then;gotolabel("gotodp");return;end</posg>
      <key4>Action 32655 31654 9 useitemon(2969, 32655, 31655, 9)</key4>
      <gotodp>Walk 32655 31664 9</gotodp>
      <w059>Stand 32655 31669 9</w059>
      <w060>Walk 32654 31670 9</w060>
      <w061>Stand 32655 31670 9</w061>
      <w062>Walk 32654 31670 9</w062>
      <w063>Stand 32654 31669 8</w063>
      <w064>Walk 32656 31681 8</w064>
      <w065>Walk 32670 31686 8</w065>
      <w066>Walk 32681 31682 8</w066>
      <dp>Stand 32682 31686 8</dp>
      <w068>Action 32682 31686 8 reachgrounditem("depot");wait(1000);openitem("depot");wait(1000);openitem(3502, "locker");wait(1500);openitem(dpbp, "depot chest");wait(1000);depotdeposit(dpbp, "Bunch of Troll Hair", "Trollroot");wait(200,300)</w068>
    </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>If cavebot enabled</OpenNextBp>
      <AutoMount>no</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>no</Enabled>
  </CaveBot>
  <Looting>
    <List>
      <gold>
        <Id>3031</Id>
        <Destination>1</Destination>
        <AlarmOn>No Alarm</AlarmOn>
      </gold>
      <bunch-of-troll-hair>
        <Id>9689</Id>
        <Destination>0</Destination>
        <AlarmOn>No Alarm</AlarmOn>
      </bunch-of-troll-hair>
      <trollroot>
        <Id>11515</Id>
        <Destination>0</Destination>
        <AlarmOn>No Alarm</AlarmOn>
      </trollroot>
    </List>
    <Condition>Targeting corpses</Condition>
    <Style>After melee kill</Style>
    <OpenBodyTime>500</OpenBodyTime>
    <Range>12</Range>
    <EatFood>yes</EatFood>
    <Enabled>yes</Enabled>
  </Looting>
  <Targeting>
    <Monsters>
      <Troll>
        <Categories>-</Categories>
        <Danger>1</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>
      </Troll>
      <Troll-Champion>
        <Categories>-</Categories>
        <Danger>5</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>
      </Troll-Champion>
    </Monsters>
    <Settings>
      <ListOrder>1</ListOrder>
      <Health>6</Health>
      <Proximity>5</Proximity>
      <Danger>9</Danger>
      <PlayerOnScreenSecurity>If cavebotting</PlayerOnScreenSecurity>
      <CooldownControl>yes</CooldownControl>
      <CheckItem>yes</CheckItem>
      <MustBeReachable>yes</MustBeReachable>
      <MustBeShootable>no</MustBeShootable>
    </Settings>
    <Enabled>yes</Enabled>
  </Targeting>
  <Hud>
    <List>
      <Items>
        <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 = "bunch of troll hair", VALUE = 20},
		{NAME = "trollroot", VALUE = 50},
	}
 
	MONITOR_MY_HUNTING.SHOW_ALL_SUPPLIES = false
	MONITOR_MY_HUNTING.SUPPLIES_LIST = {
		{NAME = "health potion", PRICE = 45},
	}
	
	-- [[ 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>
      </Items>
    </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