Welcome
Welcome to the Castle Age AutoPlayer forums

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today!

Auto-join and Monster Finder Configs

Area to post your tutorials and guides to using CAAP

Moderators: didact69, stallion

Auto-join and Monster Finder Configs

Postby Artifice » 16 Dec 2014, 03:12

All,

Auto-join functionality has been added. Monsters can be auto-joined according to your own defined conditions. Here is the original list of preset variables that can be used for conditions:
Code: Select all
life = cM.life,
t2k = cM.t2k,
fortify = cM.fortify,
strength = cM.strength,
same = monster.records.filter( function(obj) {
   return obj.monster == cM.monster && obj.status == 'Attack';
}).length,
sameundermax = monster.records.filter( function(obj) {
   return obj.monster == cM.monster && obj.status == 'Attack' && obj.over != 'max';
}).length,
undermax = monster.records.filter( function(obj) {
   return obj.status == 'Attack' && obj.over != 'max';
}).length,
targetpart = cM.targetPart,
parts = cM.partsHealth,
time = cM.time[0] + cM.time[1]/60,
name = cM.name,
monstername = cM.monster,
damagemod = fortify > 0 ? 58 * fortify / 100 * (strength > 0 ? strength : 100) / 100 + 42 : 0,
rogue = 'Rogue',
warlock = 'Warlock',
warrior = 'Warrior',
mage = 'Mage',
cleric = 'Cleric',
ranger = 'Ranger',
levelup = caap.inLevelUpMode(),
energy = caap.stats.energy.num,
atmaxenergy = caap.stats.energy.num >= caap.maxStatCheck('energy'),
atmaxstamina = caap.stats.stamina.num >= caap.maxStatCheck('stamina'),
stamina = caap.stats.stamina.num,
exp = caap.stats.exp.dif,
killed = monster.getInfo(cM.monster, 'achTitle', false),
achnum = monster.getInfo(cM.monster, 'achNum'),
achleft = 0,
conq = cM.lpage == "ajax:player_monster_list.php?monster_filter=2",
achrecords = caap.stats.achievements.monster;

Conditions are set like:
Astaroth:j[life > 25 && t2k > 24 && energy > 100 && stamina > 100 && undermax == 0]:s[t2k]

This string would join Astaroths with life over 25%, more than 24 hours left before expected to kill, when both your energy and stamina is over 100, and you have no other monsters under maximum damage. If there are multiple Astaroths that meet those conditions, a score would be assigned according to how much longer it will take to kill ('t2k'), and the longer expected one would be joined. The score for monsters can be seen on the Feed dashboard, and if any monsters meet the conditions to be joined, they will be highlighted in green on that dashboard.


If the score result is zero or less, CAAP will forget that monster. To stop CAAP from recording and reviewing monsters you don't care about, this can happen before it even reviews the monster the first time. For instance, if you used :s[fortify > 50], that would score zero on the monster list since the fortify starts at -1 until the first look at the monster page, and CAAP would never do that first look. :s[fortify > 0 ? fortify > 50 : 1] is one way to work around this.

The conditions are being interpreted directly by the javascript engine, similar to the advanced controls for increasing stats. They are extremely flexible, and in order to use their full power, you will need to know some javascript logic. Here's a summary of javascript expressions and operators. For instance, && is used for 'and,'. || is used for 'or.' All normal javascript language can be used, including referencing internal CAAP variables, such as ach.Poseidon, which is the number of Poseidons you have killed for achievement level. Not all achievement monsters have been added to the program yet, but the ones that are can be found at the bottom of your User Stats dashboard.

For monsters with class, the default is to select class according to your lowest level class. If all classes are at max, then it will pick Warlock if able, or else Cleric. If you want to specify a class, you can use the same javascript language, such as :c condition, like :c[strength < 75 ? ranger : warlock]. This would select Ranger if the fortification is below 75%, otherwise Warlock. The "? :" notation is used for "if then else" in javascript.

Comments, questions?
Artifice
Site Admin
Site Admin
 
Posts: 267
Joined: 23 Nov 2013, 07:47
Has thanked: 40 time
Have thanks: 191 time

 

Re: Auto-join and Monster Finder Configs

Postby Vitae » 16 Dec 2014, 16:48

Can we get an explanation for the conditions?
Kinda know what :c is from the above, but :j and :s and if there's others?
User avatar
Vitae
High Commander
High Commander
 
Posts: 592
Joined: 23 Aug 2011, 01:05
Has thanked: 41 time
Have thanks: 56 time

Re: Auto-join and Monster Finder Configs

Postby Dasaan » 16 Dec 2014, 23:05

I'd guess that :j is join, and I think :s is 'score'

a score would be assigned according to how much longer it will take to kill ('t2k'), and the longer expected one would be joined. The score for monsters can be seen on the Feed dashboard, and if any monsters meet the conditions to be joined, they will be highlighted in green on that dashboard.
Dasaan
Knight
Knight
 
Posts: 119
Joined: 24 Feb 2012, 18:51
Has thanked: 17 time
Have thanks: 10 time

Re: Auto-join and Monster Finder Configs

Postby Vitae » 17 Dec 2014, 02:24

Sounds good enuf to me! :)
Now, what I'll need is a way to tell it to hit just once with a 10 stamina and heal just once with 10 energy and I can go Serpent/FP hunting :)
User avatar
Vitae
High Commander
High Commander
 
Posts: 592
Joined: 23 Aug 2011, 01:05
Has thanked: 41 time
Have thanks: 56 time

Re: Auto-join and Monster Finder Configs

Postby Artifice » 17 Dec 2014, 11:18

Dasaan, correct. :j is join, and :s is score. If you don't care about picking the best one, just use :s[1]. :c[] is for class, and is optional.

Vitae,

This, combined with the cover my damage setting will do just what you described. Here's your Finder code: serpent:j[stamina>5]:s[1]

The first joining hit is "free" from the perspective of covering your damage, so you'll want to hit it again. Set max damage so you use another power hit on it, and then cover my damage setting will have you heal for 10.

Artifice has been thanked by:
Artifice
Site Admin
Site Admin
 
Posts: 267
Joined: 23 Nov 2013, 07:47
Has thanked: 40 time
Have thanks: 191 time

Re: Auto-join and Monster Finder Configs

Postby Vitae » 18 Dec 2014, 00:28

Maybe I'm doing something wrong, or it might just be some more weirdness with monsters.

I have serpent:j[stamina>5]:s[1] in the "Filter and join monsters according to"
I have Attack when set to Stamina Available
Attack Monsters in this order has
Serpent:sa:max1

And it found a serpent and proceeded to do nothing but stare at it, so I attacked it manually after 5 minutes of it looking at it.

Next, it found another one, and it happened to be dead. This is in my console now
(3)141.0.0d253 |7:22:37 PM| ERROR in feed.scoring: TypeError: undefined is not a function
at Object.feed.scoring (chrome-extension://jmimcbpnlgigobbdaomplcfbmpbkalog/js/feed.js:818:23)
at Object.feed.addConditions (chrome-extension://jmimcbpnlgigobbdaomplcfbmpbkalog/js/feed.js:694:13)
at Object.monster.select (chrome-extension://jmimcbpnlgigobbdaomplcfbmpbkalog/js/monster.js:1016:27)
at Object.caap.checkResults_onMonster (chrome-extension://jmimcbpnlgigobbdaomplcfbmpbkalog/js/caap_monster.js:1469:21)
at Object.caap.checkResults (chrome-extension://jmimcbpnlgigobbdaomplcfbmpbkalog/js/caap_base.js:5264:67)
at chrome-extension://jmimcbpnlgigobbdaomplcfbmpbkalog/js/caap_base.js:4868:34chrome-extension://jmimcbpnlgigobbdaomplcfbmpbkalog/extern/utility.js:2006 LogHelper.log_common

It's been staring at the dead one for the past 5 minutes as well.

Waiting to see if I find another live one to see if I get the same msg in the console. I've scrolled back and it looks like I might have, but want to clear the console and make sure 1st.

EDIT:
Ok, the above error seems to just randomly appear. Nothing to do with a dead one or live one. Had it happen while it was idling on the Home tab (after I put it there from idling on another dead serpent)
User avatar
Vitae
High Commander
High Commander
 
Posts: 592
Joined: 23 Aug 2011, 01:05
Has thanked: 41 time
Have thanks: 56 time

Re: Auto-join and Monster Finder Configs

Postby Dasaan » 18 Dec 2014, 20:42

I'm using:
Cronus:j[stamina > 100 && allundermax == 0]:s[t2k]

Which I believe should cause CAAP to join Cronuses if I have greater than 100 stamina and no other monsters under max damage with scoring based on the estimated time to kill. However Cronuses are not being joined despite me having 700+ stamina and not currently battling any monsters.

I'm also seeing CAAP adding monsters without 'Cronus' in the name to the monster feed namely ones from LoM that my guild have opted to not fight.

Finally changing CAAP to not register monster names past the comma makes it impossible to differentiate between 'Cronus, The World Hydra' and 'Cronus Astaroth' unless I use a player's name and that then defeats the object of using the monster finder to locate and join monsters.

Still, good to see these new bits getting added, just need to get them fine tuned :)
Dasaan
Knight
Knight
 
Posts: 119
Joined: 24 Feb 2012, 18:51
Has thanked: 17 time
Have thanks: 10 time

Re: Auto-join and Monster Finder Configs

Postby Akira181 » 18 Dec 2014, 22:29

Dasaan wrote:
Finally changing CAAP to not register monster names past the comma makes it impossible to differentiate between 'Cronus, The World Hydra' and 'Cronus Astaroth' unless I use a player's name and that then defeats the object of using the monster finder to locate and join monsters.)



dasaan instead of using cronus, use hydra, there's no other monster with that word in the name.

I also don't join any monster even if the feed list display the monster in green


I use : Dragon:j[health > 20]:s[0] i can see the dragon, it's green and nothing happens ...
Akira181
Elite Soldier
Elite Soldier
 
Posts: 61
Joined: 10 Jul 2012, 11:06
Has thanked: 37 time
Have thanks: 17 time

Re: Auto-join and Monster Finder Configs

Postby Dasaan » 19 Dec 2014, 22:33

Nope, a recent change truncates names beyond the first comma, hence my comment. I use to use hydra in the past but the latest changes stop this from working.

Edit:
Dasaan, I shortened the monster names to remove the stuff after the comma, so "Cronus, the World Hydra" is now just "Cronus" and will not match against "hydra." Cronus will work. There are some conflicts in the monster names, such as Astaroth and Cronus Astaroth. I usually solve that by putting the unique match, in this case "Astaroth" first in my list. Another way to distinguish them is to use the player name if necessary.
Dasaan
Knight
Knight
 
Posts: 119
Joined: 24 Feb 2012, 18:51
Has thanked: 17 time
Have thanks: 10 time

Re: Auto-join and Monster Finder Configs

Postby Vitae » 21 Dec 2014, 21:28

If you are hunting hydra Cronus, you can avoid encountering Astaroth Cronus by unchecking Enable Tier 3 since hydra Cronus is on Tier 1
User avatar
Vitae
High Commander
High Commander
 
Posts: 592
Joined: 23 Aug 2011, 01:05
Has thanked: 41 time
Have thanks: 56 time

Next

Return to Tutorials and Guides

Who is online

Users browsing this forum: No registered users and 1 guest

cron
suspicion-preferred