Page 7 of 9

Re: YAKSS - Yet Another KS Script

Posted: Tue Sep 11, 2012 1:17 pm
by xrozhija
Been using this script for a few days now, and loving it.
But, today, it has started to not work properly, the last 2 days it has run without any problems, and suddenly it starts to not regognize the loading screen every other run (sometimes once every 30 mins, other times once every 3 hours)

the error looks like this

Code: Select all

Use MACRO: Executing RoMScript "LeaveParty();".
Use MACRO: Executing RoMScript "GetSkillCooldown(1,9);".
The loading screen didn't appear...
Did not find any crashed game clients.
7:54pm - ...sers/barbar/Desktop/mm2/mm/scripts/rom/functions.lua:506: bad argume
nt #1 to 'lower' (string expected, got nil)

Re: YAKSS - Yet Another KS Script

Posted: Tue Sep 11, 2012 2:23 pm
by BillDoorNZ
the code below is the piece being executed:

Code: Select all

		sendMacro("LeaveParty();");
		local cooldown, remaining = sendMacro("GetSkillCooldown(1,9);"); --this is the index of Transport: Logar spell for me - wait for it to come off cooldown
		while (remaining > 1) do
			cooldown, remaining = sendMacro("GetSkillCooldown(1,9);")
			yrest(5000);
		end;
		RoMScript('CastSpellByName("Transport: Logar")');
		waitForLoadingScreen(30); 
		player:update();
the only reason I can think of for this happening is that the call to

Code: Select all

RoMScript('CastSpellByName("Transport: Logar")');
is failing or happening so fast that the loading screen has been and gone before the waitForLoadingScreen(30) method is called. Or the bot is moving etc and interrupting the recall spell (which is probably more likely if the ResetInstance is called while the bot is trying to do something else). It may be that I need to put a loop around it all to make it keep trying to recall until the zone is 1 (wailing mountains). This will cause problems if you are not recalling to Logar of course! :) In which case you will need to change the zone check on line 163 to check for the zone you are recalling to.

Code: Select all

		until (zone == 1);
The zoneId's I know about are:


Id Name
1 Wailing Mountains
2 Silverspring
3 Ravenfell
4 Aslan
5 Hyborea Highlands
6 Dustbloom Canyon
7 Weeping Coast
8 Savage Lands
9 Mount Al Turaj
10 Sascilia Steppes
11 Drangonfang Ridge
12 Elven Citadel
13 Coast of Opportunity
14 Xaviera
15 Thunderhoof Mesa
16 South Jenotar Forest
17 Norther Janost Forest
18 Lymor Desert
19 Sinister Lands
20 Red Hills
21 Tergothen Bay
80 Fireboot Underground Fortress


I will update the first post with the new version of this check too. This is however, untested as I cant test it for another 12 hours.

Re: YAKSS - Yet Another KS Script

Posted: Thu Sep 13, 2012 12:14 pm
by harbifm
tried to run it ver 2.1

all userfucntions are in (double checked)

got this error

Re: YAKSS - Yet Another KS Script

Posted: Sat Sep 15, 2012 6:27 am
by dx876234
Hi, I've been trying to make sence of the KSSetLootValue() and its variables, seems to me that with the KS_LootFactor=0 all calculations done there are void and the function always returns KS_LootMin.

Simularely the KS_HonorPartyMod variable is always 0, i.e. not modified when in a honor party.

So, is this under developement or a non-used feature? Any recommendations on sutable values for these?

-dx

Re: YAKSS - Yet Another KS Script

Posted: Thu Oct 11, 2012 3:55 pm
by dr-nuker
harbifm wrote:tried to run it ver 2.1

all userfucntions are in (double checked)

got this error

same for me :/

What did i adjust the wrong way? Any ideas?

Re: YAKSS - Yet Another KS Script

Posted: Thu Oct 11, 2012 5:13 pm
by BillDoorNZ
dx876234 wrote:Hi, I've been trying to make sence of the KSSetLootValue() and its variables, seems to me that with the KS_LootFactor=0 all calculations done there are void and the function always returns KS_LootMin.

Simularely the KS_HonorPartyMod variable is always 0, i.e. not modified when in a honor party.

So, is this under developement or a non-used feature? Any recommendations on sutable values for these?

-dx
you are indeed correct :) When KS_LootFactor is 0, it nullifies a whole section of that function.

The idea of this function was to change the minimum loot value based upon the characters luck and whether they were in an honor party etc. I found that there was not a lot of point to doing this in the end, as it came more down to the speed with which the character could get through the instance in the end.

I now just set KS_LootMin value to the minimum value of loot I want to sell, however, left the code in there in case that ever needed to be changed back.

Re: YAKSS - Yet Another KS Script

Posted: Thu Oct 11, 2012 5:38 pm
by BillDoorNZ
dr-nuker wrote:
harbifm wrote:tried to run it ver 2.1

all userfucntions are in (double checked)

got this error

same for me :/

What did i adjust the wrong way? Any ideas?
I'll take a look at this tonight

Re: YAKSS - Yet Another KS Script

Posted: Mon Oct 15, 2012 4:03 pm
by dr-nuker
BillDoorNZ wrote:
dr-nuker wrote:
harbifm wrote:tried to run it ver 2.1

all userfucntions are in (double checked)

got this error

same for me :/

What did i adjust the wrong way? Any ideas?
I'll take a look at this tonight
any clues what went wrong ? :|

Re: YAKSS - Yet Another KS Script

Posted: Mon Oct 15, 2012 4:09 pm
by BillDoorNZ
sorry, was not able to check that last night. I'll get on to this asap.

Really need to check this stuff into some source control so I can see what the changes were.

Re: YAKSS - Yet Another KS Script

Posted: Mon Oct 15, 2012 4:16 pm
by BillDoorNZ
ok...managed to do a basic syntax check and found an issue. Was missing a closing bracket.

Have updated to version 2.2 in the OP.

Re: YAKSS - Yet Another KS Script

Posted: Mon Oct 15, 2012 5:08 pm
by dr-nuker
BillDoorNZ wrote:ok...managed to do a basic syntax check and found an issue. Was missing a closing bracket.

Have updated to version 2.2 in the OP.
wow this was fast :)

Now it works! Thanks a lot!

Re: YAKSS - Yet Another KS Script

Posted: Mon Oct 15, 2012 5:19 pm
by BillDoorNZ
np....sorry it took so long to take a look - been a bit busy of late :)

Re: YAKSS - Yet Another KS Script

Posted: Mon Oct 22, 2012 6:40 am
by Jandrana
I'm using this script for a while now, and it's the only script (I know) that uses the kill zone feature. I had some problems with this script so far:

First I was running this script with a high level melee char, but with this char the bot does only target very few mobs => very little loot. I was asking myself if this script is really actively targeting mobs or is only killing mobs you get aggro from. I modified the script, that on certain waypoints I'm doing an aoe spell, to draw aggro from more mobs and get more kills.
I was thinking about a dedicated mage char being a better farm char for this and it took a while to get the char ready for KS. He is lvl 58 now. The mage's equip is still rather bad, but I can easily clear all mobs up to boss 3 when playing manually.

With a bot script things are a bit different, but with a few tweaks I succeeded that the mage can kill all mobs up to the first boss (and survive).

But I still have a major issue: the script does not target certain mobs. In the first room there are 4 groups of frogs, salamanders, but only 2 groups are being targeted. Sometimes a few mobs from the third group. In the second part of this room - after going up the small stairway, usually two Maids of the Muses are ignored. I tried to change the MAX_TARGET_DIST options, but this did not help. So I think, this has to do with the killzones, that prevent mobs from being targeted.
Did anybody take a closer look, how accurate these killzones are? Killzones are being built by extracting the coords from a regular XML file created by createpath.lua - is that correct?

The second issue is related to the first. As my char is a mage, he should fight from the distance. But most of the time, he does not target the mobs from the distance but fights them after running into the mobs, and gets hit and stunned a lot. That is bad, because this slows down killing speed and increases the risk being killed.

Anybody has some advice and/or experiences how to avoid the listed problems?

Re: YAKSS - Yet Another KS Script

Posted: Mon Oct 22, 2012 3:28 pm
by BillDoorNZ
Unfortunately, I haven't played in quite some time and don't have a character that is of the required level atm. The combat distance that is used for the different areas where the kill zone is in effect is the kill distance in your profile. You might want to make sure that distance is large enough for the different zones.

The script is made for a ranged dps (scout) combo. So the profile I was running had a large MAX_TARGET_DIST value and therefore had no issues with the size of the areas. The script was really written as a proof of concept before Rock added killzones into the bot. All of the kill zones are defined as rectangles in the code (see the onLoad section). I did notice that occasionally the coordinates were out slightly - no idea why and this could cause issues.

If you read the code a bit more, you will see that I got lazy later on and stopped making the bot run into a room, dps everything and then go collect loot. So after the first main room it stops doing that and goes back to looting as-is-where-is depending on whether you are running pet perfume etc.

Re: YAKSS - Yet Another KS Script

Posted: Sat Dec 15, 2012 12:00 pm
by tomato77
hey everyone,

i have some problems with this script:

- it doesn't sell any item
- it buys some useless items like this: 2x Assassin's Blade Bag and 2x Gunpowder Arrow Quiver
- it doesn't drop any item

i hope someone can help me to fix this problems. :(

Re: YAKSS - Yet Another KS Script

Posted: Sat Dec 15, 2012 3:11 pm
by Ego95
The second question is easy to answer: Just open your profile.xml and change the settings.

Re: YAKSS - Yet Another KS Script

Posted: Sun Dec 16, 2012 12:56 pm
by Budzer
AlterEgo95 wrote:The second question is easy to answer: Just open your profile.xml and change the settings.
Probably same problem with other two ;)

Re: YAKSS - Yet Another KS Script

Posted: Wed Dec 19, 2012 10:38 am
by xrozhija
Been using this waypoint for a while, and its been working fine (with odd game crashes and disconnects from the game)
But recently, it has started to not leave the instance properly after a few runs (and it ofcourse only happens when i am not monitoring the bot)
When it reaches the 3rd. boss, it posts in MM that it leaves party, waits for loading screen, and then loading screen did not appear, and then it tries to run to waypoint #1, which makes it run into a wall, and then just keeps running into that wall.
When running into the wall, it can stay there for hours, without end, it never reports getting stuck or logs out.

EDIT: got it reproduced during the night, and what MM posts looks like this:

Code: Select all

Stopping at 3rd boss
Resetting instance
Clearing target.
Use MACRO: Executing RoMScript "LeaveParty();".
The loading screen didn't appear...
We changed the option 'MAX_TARGET_DIST' from '225' to '225'.
executing checkTiming...
Moving to waypoint #2, (-15134, 11548)
Cleared bags: 31 spaces free
..elapsed seconds = 1      waypoint = 2
We're on time. Next goal is waypoint 8 by 60 seconds
Clearing target.
Unsticking player... at position 1754,3366. Trial 1 from maximum 10 trials
Moving to waypoint #2, (-15134, 11548)
Clearing target.
Unsticking player... at position 1754,3366. Trial 2 from maximum 10 trials
Moving to waypoint #2, (-15134, 11548)
executing checkTiming...
Cleared bags: 31 spaces free
..elapsed seconds = 31      waypoint = 2
We're on time. Next goal is waypoint 8 by 60 seconds
Clearing target.
Unsticking player... at position 1754,3366. Trial 3 from maximum 10 trials
Use MACRO: Executing RoMScript "LeaveParty();".

Re: YAKSS - Yet Another KS Script

Posted: Thu Dec 20, 2012 6:11 am
by tomato77
@AlterEgo95: Thanks for your reply, the first two problems have been solved.

Here the solution for the first problem (micromacro\scripts\rom\profiles\your charname):
<!-- Auto selling options when used with player:merchant -->
<option name="INV_AUTOSELL_ENABLE" value="true" /> <!-- true | false -->
Here the solution for the second problem (micromacro\scripts\rom\profiles\your charname):
<!-- Shopping options, how many of what do you want to keep in your inventory -->
<option name="HEALING_POTION" value="0" />
<option name="MANA_POTION" value="0" /> <!-- set to "0" if not required to buy -->
<option name="ARROW_QUIVER" value="0" /> <!-- set to "0" if not required to buy -->
<option name="THROWN_BAG" value="0" /> <!-- set to "0" if not required to buy -->
<option name="POISON" value="0" /> <!-- set to "0" if not required to buy -->

Re: YAKSS - Yet Another KS Script

Posted: Thu Dec 20, 2012 5:03 pm
by Goldinieee
got it after a few hours :) thx anyway