function DLApplyDpsPots() if (useGoodie) then useGoodie("casting"); -- Clear Thought useGoodie("luck"); --Turn of Luck Powder Dust useGoodie("defense"); --Scarlet Love --useGoodie("hero"); --Hero Potion useGoodie("pdam75"); --Level 75 Pdam --useGoodie("mempdam"); --Roast Wolf Leg (pdam) useGoodie("grass"); --Grassland Mix useGoodie("TP60M50P"); --TP Potion 60min 50% --useGoodie("PETPERF1D"); --Magic Perfume 1 Day end end function DLApplyHealerPots() if (useGoodie) then useGoodie("casting"); -- Clear Thought useGoodie("luck"); --Turn of Luck Powder Dust useGoodie("defense"); --Scarlet Love end end function DLKillMobs() keyboardPress(settings.hotkeys.JUMP.key); yrest(10) player:update() if player:findEnemy(nil,nil,evalTargetDefault) then enemy = player:findEnemy(nil,nil,evalTargetDefault) if (enemy.Name == "Hlethfir Deliriumscribe" or enemy.Name == "Kaleks Nightmareclaw" or enemy.Name == "Herugrim Dreamlava" or enemy.Name == "Mayvel Nightmaremuse" or enemy.Name == "Nightmare Beast Atollop" or enemy.Name == "Infected Dreamland Guardian") then useGoodie("critp"); if player.Class1 == 3 and player.Class2 == 4 then -- rogue/mage RogueBoss(true); end print("Boss settings updated") end repeat player:target(enemy) player:fight() enemy = player:findEnemy(nil,nil,evalTargetDefault) until not player:findEnemy(nil,nil,evalTargetDefault) if player.Class1 == 3 and player.Class2 == 4 then -- rogue/mage RogueBoss(); end end printf("Checking for missed Loot... "); repeat yrest(500); until checkloot(1,500) print("completed.") clearSlots() prevcoords = {X=player.X, Z=player.Z, Y=player.Y} print("Waiting for next area to appear") repeat yrest(3000); player:update(); until distance(player,prevcoords) >= 50 and isInGame() yrest(1000); cprintf(cli.yellow,"\nArea changed\n") player:update() DLApplyDpsPots() __WPL:setWaypointIndex(__WPL:getNearestWaypoint(player.X,player.Z,player.Y)) end function RogueBoss(_arg); if _arg then for i, skill in pairs(settings.profile.skills) do if skill.Name == "ROGUE_ENLIVENED_BLADE" then settings.profile.skills[i].AutoUse = false end if skill.Name == "ROGUE_COMBO_THROW" then settings.profile.skills[i].AutoUse = false end end player:cast("ROGUE_ILLUSION_BLADE_DANCE"); else for i, skill in pairs(settings.profile.skills) do if skill.Name == "ROGUE_ENLIVENED_BLADE" then settings.profile.skills[i].AutoUse = true end if skill.Name == "ROGUE_COMBO_THROW" then settings.profile.skills[i].AutoUse = true end end end end function checkPartyNames() ZZPartyTable = {} ZZNumberParty = 0 ZZReady = 0 for i = 1, 6 do --ZZPartyTable[i] = GetPartyMemberName(i) if GetPartyMemberName(i) ~= nil then table.insert(ZZPartyTable, GetPartyMemberName(i)) ZZNumberParty = ZZNumberParty + 1 end end end function partyIsReady(playerReady) StartDreamland = true for k,v in pairs(ZZPartyTable) do if playerReady == v then ZZReady = ZZReady + 1 print(""..playerReady.." is ready!") end --end end if ZZReady ~= ZZNumberParty then StartDreamland = false else cprintf(cli.red,"\nStarting!\n") end -- for k,v in pairs(ZZPartyTable) do -- --for i = 1, ZZNumberParty do -- if v ~= "ready" or v ~= nil then -- StartDreamland = false -- print("Will not start until all have announced they are ready."); -- else -- print(""..playerReady.." is ready."); -- end -- end end function tradeDreamland() if inventory:itemTotalCount(208679) >= 5 then repeat player:target_NPC(115696) -- Pioneer Mogen ChoiceOption(5); inventory:update() until 5 > inventory:itemTotalCount(208679) end if inventory:itemTotalCount(208682) >= 40 then repeat player:target_NPC(115696) -- Pioneer Mogen ChoiceOption(3); inventory:update() until 40 > inventory:itemTotalCount(208682) end sendpartychat('code"error("Farming Completed")"') error("Trading finished"); end -- function tradeDreamlandDust() -- if inventory:findItem(208682) and 20 > inventory:itemTotalCount(208682) then -- local item = inventory:findItem(208682) -- local slotitem = inventory.BagSlot[item] -- local emptyslot = inventory:findItem(0,"bags") -- if not emptyslot then -- error("Can't split stack for Dreamland Dust Trade. Inventory is full.") -- end -- local topickup = slotitem.ItemCount - 20 -- RoMScript("SplitBagItem("..slotitem.BagId.." ,"..topickup..")") -- repeat yrest(500) until RoMScript("CursorHasItem()") -- RoMScript("PickupBagItem("..emptyslot.BagId..")") -- yrest(1500) -- slotitem:update() -- tradeTo(name,208682) -- else -- error("Not enough Dreamland Dust to repeat - Exiting") -- end -- end function resetDreamLandHeal(); local stage1failed keyboardPress(settings.hotkeys.STRAFF_RIGHT.key) keyboardPress(settings.hotkeys.STRAFF_LEFT.key) changeProfileOption("LOOT", false) player:moveTo(CWaypoint(4781,1004,9),true) player:target_NPC(115689) -- Pioneer Dawn if (RoMScript("GetNumSpeakOption()") > 1)then DLApplyHealerPots() sendpartychat("ready") changeProfileOption("PARTY", true) changeProfileOption("PARTY_INSTANCE", true) PartyHeals(); else stage1failed = true end if stage1failed == true then player:moveTo(CWaypoint(4732,1059,8),true) if 20 > inventory:itemTotalCount(208682) then sendpartychat("Out of Dreamland Dust") error("Out of dust to reset") -- local pfollow = GetPartyMemberAddress(1) -- if pfollow then whotrade = CPawn(pfollow.Address) end -- if distance(whotrade.X,whotrade.Z,player.X,player.Z) > 50 then -- repeat -- player:moveTo(CWaypoint(whotrade.X,whotrade.Z),true,nil,50) -- yrest(1000); -- inventory:update() -- until inventory:itemTotalCount(208682) >= 20 -- end end player:moveTo(CWaypoint(4675,1061,8),true) player:target_NPC(115697) -- Pioneer Frank ChoiceOptionByName(getTEXT("ADS_STRING04_1")) -- 'Is there any way to remove the Dreamland energy fluctuations from my body?' yrest(1000); ChoiceOptionByName("Exchange 20 units of Dreamland Crystal Dust for one Dreamland Energy Fluctuation Masking service") yrest(1000); DLApplyHealerPots() sendpartychat("ready") changeProfileOption("PARTY", true) changeProfileOption("PARTY_INSTANCE", true) PartyHeals(); end end function clearSlots() local lines = {} local filename = getExecutionPath() .. "/logs/"..player.Name..".txt" local file, err = io.open(filename, "r"); if( not file ) then print("File not found"); else -- read the lines in table 'lines' for line in io.lines(filename) do table.insert(lines, tonumber(line)) end file:close() inventory:update(); for k,v in pairs(lines) do item = inventory.BagSlot[v] if not (item.Id == 208679 or item.Id == 208682 or item.Id == 0) and (item:isType("Armor") or item:isType("Potions") or item:isType("Runes") or item:isType("Production Runes") or item:isType("Weapons")) and item.Quality < 3 then print("Deleting: "..item.Name.."") item:delete() end end print("Inventory cleaned out") end end function logEmptySlots() inventory:update(); logInfo("Empty: "..player.Name.."", "\tSlot\t",false, nil, "new") for slot = 61, 240 do local item = inventory.BagSlot[slot] if item.Empty then logInfo(player.Name, "\t"..slot,false) end end print("All blank slot No. added to log"); end function checkloot(_count,_dist) _dist = _dist or 200 _count = _count or 5 local loottable = {} local count = 0 local objectList = CObjectList(); objectList:update(); local objSize = objectList:size() for i = 0,objSize do obj = objectList:getObject(i) obj:update() if obj.Type == 2 then local pawn = CPawn(obj.Address) if pawn.Lootable and _dist >= distance(player,pawn) then table.insert(loottable,pawn) count = count + 1 end end end --print("Count: "..count) -- for testing, works fine if count >= _count and inventory:itemTotalCount(0) ~= 0 then local loot = 3 if _count ~= 5 then loot = _count end for i = 1,loot do loottable[i]:updateLootable() if loottable[i].Lootable then --player:moveTo(CWaypoint(loottable[i].X,loottable[i].Z),true,nil,50) teleport(loottable[i].X,loottable[i].Z) player:target(loottable[i]) printf(" . "); --print("Looting "..loottable[i].Name..""); yrest(200) Attack() yrest(500) end end -- local tmp = CWaypoint(__WPL.Waypoints[__WPL.CurrentWaypoint]) -- teleport(tmp.X,tmp.Z) return false else return true end end function repairGear() keyboardPress(settings.hotkeys.STRAFF_RIGHT.key) keyboardPress(settings.hotkeys.STRAFF_LEFT.key) changeProfileOption("INV_AUTOSELL_ENABLE", false) player:moveTo(CWaypoint(4854,972,8),true) player:moveTo(CWaypoint(4921,977,8),true) player:merchant(119546) -- Pioneer Mirago player:moveTo(CWaypoint(4854,972,8),true) end