YAKSS - Yet Another KS Script

Additional botting resources. Addons may be either for the game itself or for the RoM bot.
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Message
Author
xrozhija
Posts: 51
Joined: Sat Apr 25, 2009 2:08 am

Re: YAKSS - Yet Another KS Script

#121 Post by xrozhija » Tue Sep 11, 2012 1:17 pm

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)

BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: YAKSS - Yet Another KS Script

#122 Post by BillDoorNZ » Tue Sep 11, 2012 2:23 pm

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.

harbifm
Posts: 135
Joined: Wed May 25, 2011 11:43 pm

Re: YAKSS - Yet Another KS Script

#123 Post by harbifm » Thu Sep 13, 2012 12:14 pm

tried to run it ver 2.1

all userfucntions are in (double checked)

got this error
Attachments
killzone error1.PNG

dx876234
Posts: 188
Joined: Sat Jul 24, 2010 6:13 am

Re: YAKSS - Yet Another KS Script

#124 Post by dx876234 » Sat Sep 15, 2012 6:27 am

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

dr-nuker
Posts: 145
Joined: Sun Oct 09, 2011 7:33 am

Re: YAKSS - Yet Another KS Script

#125 Post by dr-nuker » Thu Oct 11, 2012 3:55 pm

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?

BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: YAKSS - Yet Another KS Script

#126 Post by BillDoorNZ » Thu Oct 11, 2012 5:13 pm

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.

BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: YAKSS - Yet Another KS Script

#127 Post by BillDoorNZ » Thu Oct 11, 2012 5:38 pm

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

dr-nuker
Posts: 145
Joined: Sun Oct 09, 2011 7:33 am

Re: YAKSS - Yet Another KS Script

#128 Post by dr-nuker » Mon Oct 15, 2012 4:03 pm

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 ? :|

BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: YAKSS - Yet Another KS Script

#129 Post by BillDoorNZ » Mon Oct 15, 2012 4:09 pm

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.

BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: YAKSS - Yet Another KS Script

#130 Post by BillDoorNZ » Mon Oct 15, 2012 4:16 pm

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.

dr-nuker
Posts: 145
Joined: Sun Oct 09, 2011 7:33 am

Re: YAKSS - Yet Another KS Script

#131 Post by dr-nuker » Mon Oct 15, 2012 5:08 pm

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!

BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: YAKSS - Yet Another KS Script

#132 Post by BillDoorNZ » Mon Oct 15, 2012 5:19 pm

np....sorry it took so long to take a look - been a bit busy of late :)

Jandrana
Posts: 187
Joined: Thu Jul 05, 2012 5:53 am

Re: YAKSS - Yet Another KS Script

#133 Post by Jandrana » Mon Oct 22, 2012 6:40 am

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?

BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: YAKSS - Yet Another KS Script

#134 Post by BillDoorNZ » Mon Oct 22, 2012 3:28 pm

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.

tomato77
Posts: 2
Joined: Fri Oct 12, 2012 9:31 am

Re: YAKSS - Yet Another KS Script

#135 Post by tomato77 » Sat Dec 15, 2012 12:00 pm

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. :(

User avatar
Ego95
Posts: 564
Joined: Tue Feb 28, 2012 12:38 pm
Contact:

Re: YAKSS - Yet Another KS Script

#136 Post by Ego95 » Sat Dec 15, 2012 3:11 pm

The second question is easy to answer: Just open your profile.xml and change the settings.

Budzer
Posts: 99
Joined: Fri Sep 23, 2011 12:44 am

Re: YAKSS - Yet Another KS Script

#137 Post by Budzer » Sun Dec 16, 2012 12:56 pm

AlterEgo95 wrote:The second question is easy to answer: Just open your profile.xml and change the settings.
Probably same problem with other two ;)

xrozhija
Posts: 51
Joined: Sat Apr 25, 2009 2:08 am

Re: YAKSS - Yet Another KS Script

#138 Post by xrozhija » Wed Dec 19, 2012 10:38 am

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();".
Last edited by xrozhija on Thu Dec 20, 2012 10:00 am, edited 1 time in total.

tomato77
Posts: 2
Joined: Fri Oct 12, 2012 9:31 am

Re: YAKSS - Yet Another KS Script

#139 Post by tomato77 » Thu Dec 20, 2012 6:11 am

@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 -->

Goldinieee
Posts: 2
Joined: Thu Dec 20, 2012 5:00 pm

Re: YAKSS - Yet Another KS Script

#140 Post by Goldinieee » Thu Dec 20, 2012 5:03 pm

got it after a few hours :) thx anyway

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests