Page 16 of 21

Re: Malatina's survival

Posted: Mon Jan 14, 2013 2:43 pm
by rock5
Buster99 wrote:I have read this forums through and believe the problem may be:
Dwarf AOE skills not recognized and returning aoefound=false even though I have attempted to add them to the aoeskilllist.
It looks like you added them correctly so they should work. The only reason I can think of that they wouldn't work is if you didn't add them to your profile. I just tested it with Weakening Weave Curse and it worked. It didn't attack the closest 3 but it did attack 3 then used one-on-one skills during the AOE cooldown.
Buster99 wrote:1. Should the warlock aoe skills return "true" if the skills are added to the aoeskill list?
Do you mean, should it find the skill if added to the aoe list? Yes it should if it's in your profile.
Buster99 wrote:2. Even if aoeskills returns "false" the script should try to use the firstskillpriority of char, I believe.
If it doesn't find an aoe skill it will use the skills as they are in your profile, with the exception that it will ignore skills that have a longer casting time than "AllowSkillCastTime" which is typically 2s.
Buster99 wrote: Does this mean the first skill in skills table (2,1)? Does this mean the first skill listed in skills list in profile or the skill with top priority given to it in profile?
The skills are cast in order of priority but are skipped if they are not available, eg. on cooldown.
Buster99 wrote:Can I somehow make one of my AOE skills the firstskillpriority to fix this?
That's what the script does. After it finds an aoe skill it makes it the first priority so that it gets used first.

Re: Malatina's survival

Posted: Wed Jan 16, 2013 2:32 am
by Buster99
Thank you again for the quick and precise answers.

I have it working now. I deleted the three survival files and reinstalled and I created a new profile making sure I was using your RC3 profile default.

Re: Malatina's survival

Posted: Sun Jan 20, 2013 7:47 am
by Jandrana
I'm usually dropping phirius shells into my bank. The max shells check in the Malatina scripts, AT, and gobsAslan do only check the local inventory. So it happened now several times for me, that I did not get the shells, because I was over the limit.

The fix for this, is to add the shells on your bank to the local amount:

Code: Select all

numshells = inventory:getItemCount(240181);
numshells = numshells + RoMScript("GetCountInBankByName(TEXT('Sys240181_name'))");
Maybe some future release for these scripts will include this fix.

Re: Malatina's survival

Posted: Sun Jan 20, 2013 8:10 am
by rock5
Sure. I wish I had an itemTotalCount for bank. Assuming they are in one stack, we could use findItem.

Code: Select all

numshells = inventory:getItemCount(240181);
bankshells = bank:findItem(240181)
if bankshells then
    numshells = numshells + bankshells.ItemCount
end
I just don't like to use RoMScripts where I can avoid it.

Re: Malatina's survival

Posted: Thu Jan 31, 2013 10:32 am
by botje
any fix for this? think its related to the beta MM i use O.o

Code: Select all

Did not find any crashed game clients.
4:30pm - ...ox/micromacro/scripts/rom/waypoints/survivalR5onload.lua:409: attemp
t to call field 'mod' (a nil value)

Re: Malatina's survival

Posted: Thu Jan 31, 2013 12:14 pm
by rock5
I'll have to post a fix for this sometime. For now just change 'math.mod' to 'math.fmod'.

Re: Malatina's survival

Posted: Thu Feb 07, 2013 10:53 am
by Alleexx
Haven't played rom for a while but I've decided to come back so i updated this waypoint as I saw there was a new version. The problem is that it doesn't attack the trash in the beginning with my r/s accounts but my mages do just fine. Did I miss to change anything?

Re: Malatina's survival

Posted: Thu Feb 07, 2013 12:30 pm
by rock5
All the issues that could cause that, have been fixed. It should be working. Maybe you are using range pull but you are out of arrows? Although I think I put in a check for arrows. Are you getting any messages on screen or in MM that might help us figure it out?

Re: Malatina's survival

Posted: Fri Feb 08, 2013 10:40 am
by Alleexx
Got one of my chars to attack but it only melee the mob that are in front of him. He doesn't teleport to the next ones until he's killed the two next to the first one with vampire shot.
The other one doesn't attack at all.
No info in micromacro window

Re: Malatina's survival

Posted: Fri Feb 08, 2013 11:28 am
by rock5
I think if there are no messages saying it's trying to use skills then it thinks it doesn't have any. Maybe give us a look at your profile. Maybe try the default.xml profile.

Re: Malatina's survival

Posted: Fri Feb 08, 2013 12:36 pm
by Alleexx
Will try it tomorrow

Re: Malatina's survival

Posted: Sat Feb 09, 2013 4:54 am
by Alleexx
With default profile it teleports to every single mob like it used to and it attacks the guardian rock spirits but not the Bizarre Mechanism. I have changed ranged pull and set <option name="TARGET_LEVELDIF_BELOW" value="70" /> but it doesn't help

Re: Malatina's survival

Posted: Sat Feb 09, 2013 6:10 am
by rock5
That sounds better. It's probably just not attacking the Bizarre Mechanism because of the elite factor. Try changing the AUTO_ELITE_FACTOR to a higher value. Maybe I'll add a change to the script to change it.

Now it's just a matter of elimination to figure out what is wrong with you original profile.

Re: Malatina's survival

Posted: Sat Feb 09, 2013 7:03 am
by lisa
just do this in onload

Code: Select all

changeProfileOption("TARGET_LEVELDIF_BELOW", player.Level - 2)
Example
if you are lvl 50 it will be set to 48, so you will attack mobs lvl 2 or higher and ignoring lvl 1 mobs. Something like that anyway.

Re: Malatina's survival

Posted: Sat Feb 09, 2013 8:25 am
by Jandrana
rock5 wrote:Sure. I wish I had an itemTotalCount for bank. Assuming they are in one stack, we could use findItem.

Code: Select all

numshells = inventory:getItemCount(240181);
bankshells = bank:findItem(240181)
if bankshells then
    numshells = numshells + bankshells.ItemCount
end
I just don't like to use RoMScripts where I can avoid it.
I added your proposal to my scripts, but this is not suitable for my needs. Your example only works if you have the bank open, so you must be next to house maid or similar. I'd like to check this before entering the minigames - GetCountInBankByName can be used anytime, anywhere. I don't think there is a bot function that does something similar. Correct me, if I'm wrong.

Re: Malatina's survival

Posted: Sat Feb 09, 2013 8:33 am
by rock5
Ok, I'll correct you because you are wrong. :mrgreen:

bank:itemTotalCount and even bank:findItem do not need to have the bank open to use them. You only need the bank open to move or use an item.

Re: Malatina's survival

Posted: Sat Feb 09, 2013 9:06 am
by Jandrana
Ok, I'll correct you because you are wrong.
Ok, then something is wrong with these functions ;-). Yesterday my bot ran through the minigames being at the 1000 phirius shells limit. If the test had worked, then it should have stopped before the minigame. Do you need special yrest() before using it?

edit: just tried this with commandline, after logging in a char:

Code: Select all

Command> printf(tostring(bank:findItem(240181)))
nil
Command>
doing a "bank:update(); yrest(1000) " before the findItem did not give a different result.

while this printed the correct result:

Code: Select all

nilCommand> printf(tostring(RoMScript("GetCountInBankByName(TEXT('Sys240181_name'))")))
180
Command>

Re: Malatina's survival

Posted: Sat Feb 09, 2013 11:48 am
by rock5
Hold on a second while I wipe that egg off my face. :oops: ....

That's better.

I was so sure it worked that I didn't even check it. I know the information is there and it is, if you type "table.print(bank.BagSlot)" it's all there, but findItem is designed to ignore items that are not available and of course if the bank is closed then it's not available. I wonder if I should change this. It would definitely help to be able to search the bank while out and about and I don't think it would cause any problems.

Re: Malatina's survival

Posted: Sat Feb 09, 2013 2:23 pm
by Jandrana
Hehe, owned yourself ;-)
I was so sure it worked that I didn't even check it.
Time for another test script.

Re: Malatina's survival

Posted: Sat Feb 09, 2013 11:37 pm
by rock5
I've been thinking about it. I can't just have findItem ignore the Available flag. If a user finds an item with the intention of using or moving it then it should not be returning unusable items. Maybe we need some sort of override, eg. bank:findItem(idname, range, ignoreAvailable). So if ignoreAvailable is true it ignores the availability of the items and finds it.

It's a bit messy especially because it only applies to the banks findItem but I can't think of a better way. I can't do the same thing with the guildbank findItem because the guildbank info isn't available in memory until you open the vault.

Hm... I guess itemTotalCount would have the same problem. bank:itemTotalCount(itemNameOrId, range, ignoreAvailable)

On second thought I think I'll just ignore if the bank is open for bank:findItem and bank:itemTotalCount and add a check to 'moveTo' and 'use' to make sure the bank is open. That should work.