Page 1 of 1
Looting "Chest of Mirrors"
Posted: Tue Apr 19, 2011 6:13 am
by Mushroomstamp
Does anyone use scripting that effectively loots the Chest of Mirrors at the end of NOM? It targets and opens the chest but has trouble looting, being that you have to jump to loot it. I have it run away, then come back to try again but it seems to have less than a 50% success rate. I added the extra target_NPC's to see if that would help, though it doesn't seem like it did. As always, any help would be appreciated.
Code: Select all
<!-- # 36 --><waypoint x="3270" z="5106" y="-596">
player:target_NPC("Chest of Mirrors");
player:rest(5);
player:target_NPC("Chest of Mirrors");
keyboardPress(settings.hotkeys.JUMP.key);
keyboardPress(settings.hotkeys.JUMP.key);
player:rest(1);
player:target_NPC("Chest of Mirrors");
keyboardPress(settings.hotkeys.JUMP.key);
</waypoint>
<!-- # 37 --><waypoint x="3484" z="5054" y="-585">
player:target_NPC("Chest of Mirrors");
keyboardPress(settings.hotkeys.JUMP.key);
</waypoint>
<!-- # 38 --><waypoint x="3270" z="5106" y="-596">
player:target_NPC("Chest of Mirrors");
player:rest(5);
player:target_NPC("Chest of Mirrors");
keyboardPress(settings.hotkeys.JUMP.key);
keyboardPress(settings.hotkeys.JUMP.key);
player:rest(1);
player:target_NPC("Chest of Mirrors");
keyboardPress(settings.hotkeys.JUMP.key);
</waypoint>
Re: Looting "Chest of Mirrors"
Posted: Tue Apr 19, 2011 7:34 am
by lisa
I find when i play nom manually i can stand right under the box to loot it without jumping, if i am even 10 yards away it wont loot it.
i havent been to nom for a while so I don't have anything more useful then maybe positioning right under it.
Re: Looting "Chest of Mirrors"
Posted: Tue Apr 19, 2011 6:40 pm
by Mushroomstamp
I added a waypoint directly under the chest but even though my waypoint deviation is set to 0, he doesn't end up in that exact spot. Is there a command that I can insert to force it to loot anything nearby at a given waypoint?
Re: Looting "Chest of Mirrors"
Posted: Tue Apr 19, 2011 9:39 pm
by rock5
I don't know how accurate you need it to be but the bot isn't 100% accurate in it's movements and I don't think there's anyway to make it so.
Mushroomstamp wrote:I added a waypoint directly under the chest but even though my waypoint deviation is set to 0, he doesn't end up in that exact spot. Is there a command that I can insert to force it to loot anything nearby at a given waypoint?
I'm not farmiliar with the area but to loot all dead monsters you can use the new function
If you meant you wanted to target an object you use
Edit: I just read the thread a bit better. Maybe the 1 second pause before trying to target the chest is the wrong time. If you are suposed to target it while in the air I would have thought you would need to be a bit quicker than that. Have you tried fine tuning the pause?
Re: Looting "Chest of Mirrors"
Posted: Tue Apr 19, 2011 11:59 pm
by Mushroomstamp
I'll try the lootall() command... does it not need a semicolon after it?
I hadn't thought about messing with the pause time but I will now. Although, I have a new problem. What's wrong with this code?
Code: Select all
player:findTarget("Androlier's Shadow");
local target = player:getTarget();
if(target.Name == "Androlier's Shadow") then
player:cast("WARRIOR_SURPRISE_ATTACK");
end
I found this in another thread but I get a "failure to compile lua code for waypoint" error. I'm trying to target Shadow & attack it. I also tried...
Code: Select all
player:target_NPC("Androlier's Shadow");
player:cast("WARRIOR_SURPRISE_ATTACK");
...which sorta worked, but it doesn't cast Surprise Attack... it calls it in the MM window, but it doesn't actually happen. Ranged pull and autouse for Surprise Attack at false wouldn't cause this right? I think that might work with some more testing, but I figured there would be a more appropriate command to target an enemy.
Re: Looting "Chest of Mirrors"
Posted: Wed Apr 20, 2011 1:43 am
by rock5
Mushroomstamp wrote:I'll try the lootall() command... does it not need a semicolon after it?
As far as I know the semicolon does nothing in LUA. I think people use it because they were used to using it in other languages and maybe because they think it reads better. I mostly never use it.
Mushroomstamp wrote:I hadn't thought about messing with the pause time but I will now.
I always thought 'rest' accepted seconds but it looks like it accepts ms. So 'rest(1)' only pauses for 1/1000th of a second. I think it needs to be bigger than that.
Mushroomstamp wrote:Although, I have a new problem. What's wrong with this code?
Code: Select all
player:findTarget("Androlier's Shadow");
local target = player:getTarget();
if(target.Name == "Androlier's Shadow") then
player:cast("WARRIOR_SURPRISE_ATTACK");
end
I found this in another thread but I get a "failure to compile lua code for waypoint" error. I'm trying to target Shadow & attack it. I also tried...
Code: Select all
player:target_NPC("Androlier's Shadow");
player:cast("WARRIOR_SURPRISE_ATTACK");
...which sorta worked, but it doesn't cast Surprise Attack... it calls it in the MM window, but it doesn't actually happen.
Maybe it doesn't like the appostrophe. Try "Androlier\'s Shadow" instead, for both issues.
Mushroomstamp wrote:Ranged pull and autouse for Surprise Attack at false wouldn't cause this right?
I don't think so.
Mushroomstamp wrote:I think that might work with some more testing, but I figured there would be a more appropriate command to target an enemy.
There is no specially designed function to target an enemy by name. target_NPC will target the mob but will also move in close and then effectively double click it and attack it. target_Object might not double click but it still moves in close. I think you need to first find it then target it.
Code: Select all
as = player:findNearestNameOrId("Androlier\'s Shadow")
if as then
player:target(as)
player:update() -- Needed to update player.TargetPtr
player:cast("WARRIOR_SURPRISE_ATTACK");
end
See if that works.
Re: Looting "Chest of Mirrors"
Posted: Thu Apr 21, 2011 11:21 pm
by Mushroomstamp
Awesome... findNearestNameOrId is working perfectly - thank you so much!
I still have to get it to loot the chest and once I do, I'll post again.
Re: Looting "Chest of Mirrors"
Posted: Sat Apr 30, 2011 10:44 am
by Mushroomstamp
Now I need to use findNearestNameOrId for one of multiple possible targets. Specifically, either Krodamon or Krodamar at the end of NOM. Would something like this work, or do I need to throw an "or" in there somehow?
Code: Select all
k = player:findNearestNameOrId("Krodamon,Krodamar")
if k then
player:target(k)
player:update()
I'm still not 100% on looting the chest, but it's much better since I've done some tweaking.
Re: Looting "Chest of Mirrors"
Posted: Sat Apr 30, 2011 7:20 pm
by rock5
You can use more than 1 value to search for in findNearestNameOrid but it has to be in a table. eg.
Code: Select all
k = player:findNearestNameOrId({"Krodamon","Krodamar"})