HELP!
Posted: Sun Dec 06, 2015 9:19 am
Edited see last update at bottom
Code: Select all
player:findTarget("Okander \"Mad Man\" Mallen");
local target = player:getTarget();
if target then table.print(target) else print(" I have no target and this is the broken code....") end
player:update();
player:cast("WARDEN_CHARGED_CHOP");
Code: Select all
player:findTarget("Incomplete Bloody Beast");
local target = player:getTarget();
player:cast("WARDEN_CHARGED_CHOP");
player:cast("WARDEN_CHARGED_CHOP");
Code: Select all
player:findTarget("Okander \"Mad Man\" Mallen");
local target = player:getTarget();
player:cast("WARDEN_CHARGED_CHOP");
player:cast("WARDEN_CHARGED_CHOP");
player:cast("WARDEN_CHARGED_CHOP");
player:cast("WARDEN_CHARGED_CHOP");
Code: Select all
<waypoints type="NORMAL">
-- V 1.4 DoD Firts Boss --
-- Many thanks to Rock5, Lisa and Xmen ;) --
--Reymauro--
<onLoad><![CDATA[
function vortex()
keyboardHold(settings.hotkeys.MOVE_FORWARD.key)
yrest(1000);
keyboardRelease(settings.hotkeys.MOVE_FORWARD.key)
waitForLoadingScreen(5)
end
function trash_mob()
local target = player:getTarget()
local _tm = false
local spawn = player:findNearestNameOrId("Incomplete Bloody Beast")
if spawn then
player:target(spawn)
if target.HP > 0 then
player:fight()
_tm = false
else
_tm = true
end
else
_tm = true
end
return _tm
end
function trash_boss()
local target = player:getTarget()
local _tb = false
local spawnboss = player:findNearestNameOrId("Okander \"Mad Man\" Mallen")
if spawnboss then
player:target(spawnboss)
if target.HP > 0 then
player:update();
player:cast("WARDEN_CHARGED_CHOP");
player:cast("WARDEN_CHARGED_CHOP");
player:cast("WARDEN_CHARGED_CHOP");
player:cast("WARDEN_CHARGED_CHOP");
player:cast("WARDEN_CHARGED_CHOP");
player:cast("WARDEN_CHARGED_CHOP");
player:cast("WARDEN_CHARGED_CHOP");
player:cast("WARDEN_CHARGED_CHOP");
_tb = false
else
_tb = true
end
else
_tb = true
end
return _tb
end
function updateplayer()
player:update();
player:clearTarget();
end
changeProfileOption("AUTO_ELITE_FACTOR", 2500);
changeProfileSkill("WARDEN_CHARGED_CHOP", "AutoUse", true);
]]> </onLoad>
<!-- # 1 --><waypoint x="1645" z="-4908" y="752">
sendMacro("LeaveParty();");
yrest(200)
player:update();
while not RoMScript("UnitExists('party1')") do
sendMacro('InviteByName("...")');
end
changeProfileSkill("WARDEN_CHARGED_CHOP", "AutoUse", true);
changeProfileOption("MAX_FIGHT_TIME", 5);
</waypoint>
<!-- # 2 --><waypoint x="1686" z="-5152" y="757">
player:update();
vortex()
</waypoint>
<!-- # 3 --><waypoint x="1793" z="2880" y="433">
changeProfileOption("MAX_FIGHT_TIME", 5);
printf("Mementos: %s\n", inventory:getItemCount(206879) );
updateplayer()
player:lootAll();
</waypoint>
<!-- # 4 --><waypoint x="1854" z="2891" y="433"> </waypoint>
<!-- # 5 --><waypoint x="1933" z="2834" y="433">
repeat
until trash_mob() == true
updateplayer()
player:lootAll();
</waypoint>
<!-- # 6 --><waypoint x="1930" z="2863" y="433">
changeProfileSkill("WARDEN_CHARGED_CHOP", "AutoUse", true);
changeProfileOption("MAX_FIGHT_TIME", 1);
</waypoint>
<!-- # 7 --><waypoint x="2113" z="2615" y="432"> </waypoint>
<!-- # 8 --><waypoint x="2340" z="2406" y="401">
local cooldown, remaining = RoMScript("GetSkillCooldown(4,1)")
repeat
until trash_boss() == true
player:lootAll();
</waypoint>
<!-- # 9 --><waypoint x="2207" z="2498" y="401"> </waypoint>
<!-- # 10 --><waypoint x="2081" z="2661" y="434"> </waypoint>
<!-- # 11 --><waypoint x="1897" z="2873" y="433"> </waypoint>
<!-- # 12 --><waypoint x="1786" z="2890" y="433"> </waypoint>
<!-- # 13 --><waypoint x="1699" z="2888" y="433">
updateplayer()
vortex()
yrest(1000);
player:update();
if inventory:itemTotalCount(0) == 0 then
printf ("Bag Is Full Selling.")
loadPaths("DoD/DoDS")
else
printf ("Bag Not Full Continuing Farming.")
end
</waypoint>
</waypoints>
Code: Select all
<!-- # 8 --><waypoint x="2340" z="2406" y="401">
local cooldown, remaining = RoMScript("GetSkillCooldown(4,1)")
repeat
until trash_boss() == true
player:lootAll();
Code: Select all
<!-- # 5 --><waypoint x="1933" z="2834" y="433">
repeat
until trash_mob() == true
updateplayer()
player:lootAll();
Code: Select all
<!-- # 8 --><waypoint x="2340" z="2406" y="401">
repeat
until trash_boss() == true
updateplayer()
player:lootAll();
BlubBlab wrote:it is called player:update()
Code: Select all
function updateplayer()
player:update();
player:clearTarget();
end
How would I use prints to identify the looting issue?lisa wrote:If you want to know why it isn't working then add prints like I suggested in the very first reply to this topic.
So I found the issue....beanybabe wrote:Most the strange thing I run into are timing, Try adding a wait 1000 after the boss check is true before you try to loot. I use waits up to 4000 when checking for npc. Looking at your code you should not need any playerupdate(), I would try commenting them out. The playerupdate() can cause problems avoid using unless needed.
Code: Select all
<option name="LOOT_IN_COMBAT" value="false" />
Code: Select all
<option name="LOOT_IN_COMBAT" value="true" />