Extracting 'scores'
Re: Extracting 'scores'
As far as I know, profile options do get changed to their respective types. Numbers are converted to numbers, booleans get converted to boolean. Unless maybe you used capitals, eg. "False". That might not get converted.
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: Extracting 'scores'
for some reason my healer profiles all had it set to true, that's what I get for copy pasting 1 file to many for many healers lmao.
Set to "false" and it should be fine.
Set to "false" and it should be fine.
Remember no matter you do in life to always have a little fun while you are at it 
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Extracting 'scores'
Well after messing around with things for a while it finally works..... Not sure what I changed to make it stop failing when targeting the mobs lol. As for the distance check I had to add in a seconds check to make sure it was different, because for some reason it would 'pass' the first check but still be false.....
Now im just down to figuring out how to make PartyHeals() load my waypoint that resets Dreamland and it'll be sweet.
And also
Works perfectly for targeting and killing the adds as soon as they spawn 
Code: Select all
function KillMobs()
yrest(10)
player:update()
if player:findEnemy(nil,nil,evalTargetDefault) then
enemy = player:findEnemy(nil,nil,evalTargetDefault)
printf(""..enemy.Name.."");
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" then
useGoodie("critp");
RogueBoss(true);
printf("Boss settings updated");
end
while enemy do
player:target(enemy)
player:fight()
enemy = player:findEnemy(nil,nil,evalTargetDefault)
end
RogueBoss();
end
player:updateBattling()
if (not player.Battling) then
if player:findEnemy(nil, nil, evalTargetLootable) then
local Lootable = player:findEnemy(nil, nil, evalTargetLootable)
while Lootable do
player:target(Lootable)
if player.TargetPtr ~= 0 then
player:lootAll()
end
Lootable = player:findEnemy(nil, nil, evalTargetLootable)
end
end
else
KillMobs();
end
prevcoords = {X=player.X, Z=player.Z, Y=player.Y}
repeat
yrest(2000);
printf("Waiting for next area to appear")
player:update();
until distance(player,prevcoords) >= 100 or (not isInGame())
yrest(3000);
cprintf(cli.yellow,"\nArea changed\n")
player:update()
if isInGame() and distance(player,prevcoords) >= 200 then
DLApplyPots()
yrest(2000);
__WPL:setWaypointIndex(__WPL:getNearestWaypoint(player.X,player.Z,player.Y))
elseif not distance(player,prevcoords) >= 200 then
player:update();
yrest(1000);
DLApplyPots()
__WPL:setWaypointIndex(__WPL:getNearestWaypoint(player.X,player.Z,player.Y))
end
endAnd also
Code: Select all
function settings.profile.events.onSkillCast(arg1) -- add ID = 104924
local target = player:getTarget()
if target.Name == "Hlethfir Deliriumscribe" then
local ghostadd = player:findEnemy(nil, 104924, evalTargetDefault);
if ghostadd and target.Id ~= 104924 then
player:breakFight()
while ghostadd do
player:target(ghostadd)
player:fight()
ghostadd = player:findEnemy(nil, 104924, evalTargetDefault);
end
end
player:target(target)
end
endRe: Extracting 'scores'
After running it for a number of hours, I have found only 1 issue with the kill/loot function and that's to do with 'skipping' a lootable target. The code I have is
Every now and then it'll leave 1 or more Lootable targets around and sit there waiting for next area to appear. I'm not sure why it would skip a target, I set Loot-debug to true but no error messages come up.
Does the MM loot function 'tag' something so it doesnt keep looting it if it fails? Say you get a slight increase in ping and looting failed, would that put it on a loot ignore list?
Code: Select all
if (not player.Battling) then
if player:findEnemy(nil, nil, evalTargetLootable) then
local canLoot = player:findEnemy(nil, nil, evalTargetLootable)
repeat
player:target(canLoot)
player:loot(canLoot)
player:lootAll();
player:update();
local canLoot = player:findEnemy(nil, nil, evalTargetLootable)
until not player:findEnemy(nil, nil, evalTargetLootable)
end
endDoes the MM loot function 'tag' something so it doesnt keep looting it if it fails? Say you get a slight increase in ping and looting failed, would that put it on a loot ignore list?
Re: Extracting 'scores'
there is a distance check.
settings.profile.options.LOOT_DISTANCE
you might need to increase it.
and there is also an ignore list if it fails to loot.
there is also a
settings.profile.options.LOOT_IGNORE_LIST_SIZE
you could play around with both values and see if it helps.
settings.profile.options.LOOT_DISTANCE
you might need to increase it.
and there is also an ignore list if it fails to loot.
there is also a
settings.profile.options.LOOT_IGNORE_LIST_SIZE
you could play around with both values and see if it helps.
Remember no matter you do in life to always have a little fun while you are at it 
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Extracting 'scores'
Hmm, interesting. I already have changeProfileOption("LOOT_DISTANCE", 500) in the onLoad to make sure the entire area is looted, but didn't know about the settings.profile.options.LOOT_IGNORE_LIST_SIZE setting. I'll set it to 0 and will run it for a while to see if that solves it, thanks.
Re: Extracting 'scores'
After using ' changeProfileOption("LOOT_IGNORE_LIST_SIZE", 0) ' in the onLoad it still missed a lootable target. The mob is within 50 range of me, so it is definitely not the distance to target, this is what the MM window showed at the time.
~~ same issue again:
So some how it is still adding the mob to the ignore list?
Code: Select all
Main hand durability:97.150943396226
We didn't move to the loot!? Root buff? Missing 'click to move' option?
We didn't move to the loot!? Root buff? Missing 'click to move' option?
Clearing target.
Waiting for next area to appearCode: Select all
Main hand durability:96.207547169811
We didn't move to the loot!? Root buff? Missing 'click to move' option?
Clearing target.
Waiting for next area to appearRe: Extracting 'scores'
This means it tried to loot but failed. So it's not the ignore list.ZZZZZ wrote:We didn't move to the loot!? Root buff? Missing 'click to move' option?
The first thing to check is the suggested causes. Does the mob stun or root you? Do you have "click to move" enabled in the game interface settings? I suspect the second is true or else you wouldn't be looting at all.
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: Extracting 'scores'
There are some roots, but none of them are around when it does loot. Click to move is on, yes. I have seen it fail loot once myself, it seemed to try to loot after looting another but failed for some reason so just gave up. But then I had the issue again on 1 of the bosses, which is only a single target, so it couldn't be due to looting another at the same time or too close together.
As for not being the ignore list, why would it not keep trying to loot then? Its set to repeat until there are no Lootable targets, and I don't believe the address of the Lootable target would change all because it failed to loot. To me it just seems a lot like it's adding it to an ignore and skipping that specific target.
As for not being the ignore list, why would it not keep trying to loot then? Its set to repeat until there are no Lootable targets, and I don't believe the address of the Lootable target would change all because it failed to loot. To me it just seems a lot like it's adding it to an ignore and skipping that specific target.
Re: Extracting 'scores'
Everything looks ok. The main Attack() that starts the loot is clear of any new code I've added recently so should always execute. If it fails the second chance loot should work, as long as you haven't disabled it. Are you using any other profile loot options? That's any options that start with LOOT?
I'm not sure you understood what I mean. By root I mean the mob might have caste a debuff that roots you to the spot just before you kill it. Then you wont be able to loot until the debuff wares off.ZZZZZ wrote:There are some roots, but none of them are around when it does loot.
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: Extracting 'scores'
Yeh I know what you ment, and what I ment was while some mobs do cast skills that root you none of them are ever around when you finish killing off the adds/boss.
The loot settings in profile are:
And the onload of the waypoint:
*note - I only added in the LOOT_JUMPING/AGAIN/TIME settings recently. It still had this issue before I added them.
The loot settings in profile are:
Code: Select all
<!-- Loot settings -->
<option name="LOOT" value="false" />
<option name="LOOT_ALL" value="false" /> <!-- Loot all nearby dead mobs after combat -->
<option name="LOOT_IN_COMBAT" value="false" />
<option name="LOOT_DISTANCE" value="200" />
<option name="LOOT_PAUSE_AFTER" value="0" /> <!-- probability in % for a short rest -->
<option name="LOOT_SIGILS" value="false" /> <!-- Loot sigils or not. If ommitted, will depend on "LOOT" value -->
<option name="SIGILS_IGNORE_LIST" value="" /> <!-- List of any sigils you wish to ignore, in language of client -->
<option name="LOOT_JUMPING" value="false" /> <!-- Jumps while looting to avoid crouching -->
<option name="LOOT_AGAIN" value="2000" /> <!-- Second chance try if first loot failed. -->
<option name="LOOT_TIME" value="1500" /> <!-- Amount of time allowed for looting. -->Code: Select all
changeProfileOption("LOOT_ALL", true)
changeProfileOption("LOOT", true)
changeProfileOption("ANTI_KS", false)
changeProfileOption("PARTY", true)
changeProfileOption("PARTY_INSTANCE", true)
changeProfileOption("MAX_TARGET_DIST", 500)
changeProfileOption("USE_PHIRIUS_POTION", true)
changeProfileOption("LOOT_JUMPING", true)
changeProfileOption("LOOT_AGAIN", 0)
changeProfileOption("LOOT_TIME", 0)
changeProfileOption("LOOT_DISTANCE", 500)
changeProfileOption("INV_AUTOSELL_ENABLE", false)
changeProfileOption("LOOT_IGNORE_LIST_SIZE", 0)Re: Extracting 'scores'
With the LOOT_JUMPING/AGAIN/TIME settings you are using it's possible it might sometimes fail. Those settings are for speed not reliability. But you say you were getting the problem before using these settings. So that means it looks like it was using the default values for LOOT_TIME and LOOT_AGAIN.
I'm not sure what to suggest. If you want to make sure that you loot the boss you could add some code after fighting it to make sure it looted, eg.Um... something like that.
I'm not sure what to suggest. If you want to make sure that you loot the boss you could add some code after fighting it to make sure it looted, eg.
Code: Select all
local boss = player:findNearestNameOrId("Boss name",nil,evalTargetLootable)
if boss then
player:target(boss)
repeat
Attack()
yrest(1000)
player:updateBattling()
until player.Battling or not boss:exists() or not evalTargetLootable(boss.Address)
end- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: Extracting 'scores'
Ok just found out something. I was trying to use what you posted Rock and for some reason it wasnt simply attacking..so I added prints to different area's and its actually Looting strait after it leaves combat, ignoring what i have in the function until looting is finished.
It seems that player:findEnemy(nil, nil, evalTargetLootable) is returning false, even though there is a mob sitting there and not looted. Im not even sure if (nil, nil, evalTargetLootable) is the correct way to write that function ^.^
Code: Select all
Fight finished. Killed 4 Dream Energy Stinger. (fight #10 / runtime 1 minutes)
Main hand durability:99.047169811321
We didn't move to the loot!? Root buff? Missing 'click to move' option?
Not Battling
Inventory cleaned out
Waiting for next area to appearCode: Select all
if (not player.Battling) then
print("Not Battling");
if player:findEnemy(nil, nil, evalTargetLootable) then
print("Found Lootable")
local canLoot = player:findEnemy(nil, nil, evalTargetLootable)
while canLoot do
player:target(canLoot)
repeat
Attack()
print("Attacking to loot")
player:updateBattling()
until not canLoot:exists()
local canLoot = player:findEnemy(nil, nil, evalTargetLootable)
end
end
end
clearSlots() -- returns 'Inventory cleaned out' upon completion
prevcoords = {X=player.X, Z=player.Z, Y=player.Y}
print("Waiting for next area to appear")Re: Extracting 'scores'
findEnemy is not reliable for finding lootable bodies because the purchase of findEnemy is to find an enemy to attack. So there are check in there that might return false because the target is dead. Try using findNearestNameOrId.
Code: Select all
if player:findNearestNameOrId("", nil, evalTargetLootable) then- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: Extracting 'scores'
Even after changing it to player:findNearestNameOrId("", nil, evalTargetLootable) it still ignores it :/ This is annoying >.>
When reloading the waypoint and running that function again with the same mob there I got this instead:
anddd crashed as soon as trying to loot for some reason....has happened twice now..not sure what is with that either :/
Code: Select all
Main hand durability:96.216981132075
We didn't move to the loot!? Root buff? Missing 'click to move' option?
Clearing target.
Inventory cleaned out
Waiting for next area to appearCode: Select all
player:updateBattling()
if (not player.Battling) then
print("Checking for Loot")
if player:findNearestNameOrId("", nil, evalTargetLootable) then
print("Found Lootable")
local canLoot = player:findNearestNameOrId("", nil, evalTargetLootable)
while canLoot do
player:target(canLoot)
player:target(canLoot)
player:lootAll();
--Attack()
local canLoot = player:findNearestNameOrId("", nil, evalTargetLootable)
end
end
endWhen reloading the waypoint and running that function again with the same mob there I got this instead:
Code: Select all
Moving to waypoint #7, (2778, 950)
Checking for Loot
Found Lootable
We didn't move to the loot!? Root buff? Missing 'click to move' option?
The game client did not crash.Re: Extracting 'scores'
Where are you putting the function? It should be in onleavecombat.
If you want to target something you found manually and want to loot it use player:loot(). player:lootAll() finds it's own targets to loot.
If looting is important then make sure not to use the jumping feature and reset the LOOT_AGAIN and LOOT_TIME to default.
Try adding DEBUG_LOOT to your profile. It might give you some info.
In the end it might be something in evalTargetLootable failing so you could try bypassing that function and doing something like this
If you want to target something you found manually and want to loot it use player:loot(). player:lootAll() finds it's own targets to loot.
If looting is important then make sure not to use the jumping feature and reset the LOOT_AGAIN and LOOT_TIME to default.
Try adding DEBUG_LOOT to your profile. It might give you some info.
In the end it might be something in evalTargetLootable failing so you could try bypassing that function and doing something like this
Code: Select all
if (not player.Battling) then
local boss = player:findNearestNameOrId("BossName")
if boss then
boss = CPawn(boss.Address)
while boss:exists() and boss.Lootable do
player:target(boss)
player:loot()
yrest(500)
boss:update()
end
end
end- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: Extracting 'scores'
I tried doing it that way Rock, but I can't figure out how to check all targets in range that way. With
it seems to work, but it will only check the nearest (of course) and will not continue checking all in range.
Looking through the looten function, does this part
mean that it'll always be adding 1 mob to the ignore list no matter what LOOT_IGNORE_LIST_SIZE is set to?
Code: Select all
local canLoot = player:findNearestNameOrId("")
repeat
canLoot = CPawn(canLoot.Address)
if canLoot:exists() and canLoot.Lootable and canLoot.Type == PT_MONSTER then
print("Looting "..canLoot.Name.."");
while canLoot:exists() and canLoot.Lootable and canLoot.Type == PT_MONSTER do
player:target(canLoot)
player:loot(canLoot)
--Attack()
yrest(500)
canLoot:update()
end
local canLoot = player:findNearestNameOrId("")
end
until not canLoot:exists() or canLoot.LootableLooking through the looten function, does this part
Code: Select all
-- Add to ignore list
lootIgnoreListPos = lootIgnoreListPos + 1
if lootIgnoreListPos > settings.profile.options.LOOT_IGNORE_LIST_SIZE then lootIgnoreListPos = 1 end
lootIgnoreList[lootIgnoreListPos] = target.AddressRe: Extracting 'scores'
That's correct.ZZZZZ wrote:mean that it'll always be adding 1 mob to the ignore list no matter what LOOT_IGNORE_LIST_SIZE is set to?
You could try resetting the list before using your code. Example,
Code: Select all
lootIgnoreList[1] = 0- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: Extracting 'scores'
can't log in at the moment to see if it'll work, but 'lootIgnoreList' is a local table within the player.lua file. Is it possible to edit that outside of the file or would I have to change it to global?
Re: Extracting 'scores'
You're right. Hm... what else could you do? Nothing comes to mind. Try making it global.
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan