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.
Post Reply
Message
Author
krix
Posts: 30
Joined: Sun May 13, 2012 7:26 pm

Re: YAKSS - Yet Another KS Script

#81 Post by krix » Thu Jul 12, 2012 2:00 pm

got error in this new version

"8:57pm - [string "..."]:176: attempt to call method 'itemTotalCountForSlots' (a
nil value)"

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

Re: YAKSS - Yet Another KS Script

#82 Post by BillDoorNZ » Thu Jul 12, 2012 2:38 pm

hmmm...in version 1.8 I removed a helper function which extended the inventory class because I thought Rock had added it into the inventory class:

Code: Select all

function CInventory:itemTotalCountForSlots(itemNameOrId, first, last)
	if first == nil then
		-- Default values - 1-240 for items, 61-240 for empties.
		if itemNameOrId == "<EMPTY>" or itemNameOrId == 0 then
			first = 61
		else
			first = 1
		end
		last = 240 -- default, search only bags
	end

	local item
	local totalCount = 0;
	for slot = first, last do
		item = inventory.BagSlot[slot]
		item:update()

 	    if item.Available and (item.Id == itemNameOrId or item.Name == itemNameOrId) then
			if itemNameOrId == "<EMPTY>" or itemNameOrId == 0 then -- so you can count empty slots
				totalCount = totalCount + 1
			else
				totalCount = totalCount + item.ItemCount;
			end
		end;
	end;

	return totalCount;
end;
I was mistaken :) Was looking at my own version!

Have updated the waypoint file to version 1.9 and updated in first post.

krix
Posts: 30
Joined: Sun May 13, 2012 7:26 pm

Re: YAKSS - Yet Another KS Script

#83 Post by krix » Thu Jul 12, 2012 3:12 pm

I more thing... do u have this with option of flying from panzer to KS?
I think running there is waste of time and gold. :)

I have no problem with flying in public places... it doesnt look so suspicious from another client...

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

Re: YAKSS - Yet Another KS Script

#84 Post by BillDoorNZ » Thu Jul 12, 2012 3:28 pm

sorry dude...thats what it USED to do, but in the public interest I changed it :(

Easy enough to add tho. Just remove all the waypoints from panzer until the 'Entering instance' tagged waypoint (make sure you get a count of how many you are deleting tho) and then record a new path and copy the waypoints and paste them into where you deleted the first lot from.

Next, work out if you end up with more waypoints as a result of this, or less (ie you need to know if you there are now more waypoints before you enter the instance as this affects timings). Then modify the timing checks on line 312:

Code: Select all

--A list of waypoints, and maximum time before we reset. e.g. [6]=60 -> waypoint index 6 should be reached within 60 seconds.
KS_TimingChecks = {[8]=60, [20]=300, [23]=400, [42]=480, [57]=860, [66]=980, [72]=1220, [86]=1420, [95]=1600, [103]=1860, [117]=2060, [140]= 2500, [168]=2700};
So, if you added more, then you may want to increase some of the timings - the comment on the first line shows you how this works

[waypointIndexNumber]=<time we should be there by>

so, if the bot runs and doesn't get to waypoint index 57 before 860 seconds has elapsed, then it resets the instance (or, if its not in the instance it ignores this - though you may want to change that).

I'm about to update the original post again with version 2.0 as I noticed a bug in the checktiming script where it should be resetting the instance.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: YAKSS - Yet Another KS Script

#85 Post by rock5 » Thu Jul 12, 2012 9:01 pm

But wouldn't changing the number of original waypoints change the meaning of the waypoint numbers? Eg. [57] would no longer be the waypoint it thinks it is, and neither would [66]. So the distance between them would change, so maybe so would the timing.

I guess if you have 3 less waypoints (for example) you could minus 3 from all the waypoint numbers, then if it takes 10s less (for example) you can take 10s off all the times after that.
  • 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

Hidden
Posts: 101
Joined: Tue May 08, 2012 6:10 pm

Re: YAKSS - Yet Another KS Script

#86 Post by Hidden » Fri Jul 13, 2012 2:39 am

krix wrote:I have no problem with flying in public places... it doesnt look so suspicious from another client...
Flying when viewed from another client is easy to spot and report. The character looks as tho its is scrolling along the path. There are many players on the au server that will fraps and report you if they see you doing it.

krix
Posts: 30
Joined: Sun May 13, 2012 7:26 pm

Re: YAKSS - Yet Another KS Script

#87 Post by krix » Fri Jul 13, 2012 7:54 am

True, I'll do it myself.

I have 2 problems for now... I updated all usefunctrions and it didn't helped.

Character dont drink potions after entering instance.

And few days ago my client started to lag while doing this script. It often freezes for few minutes then screen goes black. O_o
I tried to give it higher priority, tried to shut all other programs - nothing helps.

Other scripts are working without problem...

Even using R5 ultimate model didnt affect this issue. (reduced significantly temperature on my graphic card but no other results)

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: YAKSS - Yet Another KS Script

#88 Post by rock5 » Fri Jul 13, 2012 11:23 am

Hidden wrote:scrolling along the path
What does that mean? I'm pretty sure that if you fly along the ground it will look like you are running as only your possition is reported to other players. If you are flying and moving through the air it will look like you are dropping to the ground then suddenly up in the air again and dropping to the ground etc. If you stop in the air you will look like you drop one last time and then are standing on the ground. As soon as you move you will look like you are suddenly in the air again and dropping, etc.
  • 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

Beni
Posts: 54
Joined: Fri Jun 17, 2011 4:13 am

Re: YAKSS - Yet Another KS Script

#89 Post by Beni » Fri Jul 13, 2012 11:41 am

no start, and whats mean
KS_LootFactor = 0;
KS_LootMin = 200;
KS_HonorPartyMod = 0;
i want honour party...
Attachments
Untitled.jpg

Hidden
Posts: 101
Joined: Tue May 08, 2012 6:10 pm

Re: YAKSS - Yet Another KS Script

#90 Post by Hidden » Thu Jul 26, 2012 7:02 am

rock5 wrote:
Hidden wrote:scrolling along the path
What does that mean? I'm pretty sure that if you fly along the ground it will look like you are running as only your possition is reported to other players. If you are flying and moving through the air it will look like you are dropping to the ground then suddenly up in the air again and dropping to the ground etc. If you stop in the air you will look like you drop one last time and then are standing on the ground. As soon as you move you will look like you are suddenly in the air again and dropping, etc.
Yeah thats what i meant like the V-hold on your old tv's. Players and gm's will see your character fly up and down along the path your traveling.

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

Re: YAKSS - Yet Another KS Script

#91 Post by BillDoorNZ » Thu Jul 26, 2012 7:05 am

odd...I didn't get any notifications that this thread had changed...my apologies for not replying

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

Re: YAKSS - Yet Another KS Script

#92 Post by BillDoorNZ » Thu Jul 26, 2012 7:08 am

krix wrote:True, I'll do it myself.

I have 2 problems for now... I updated all usefunctrions and it didn't helped.

Character dont drink potions after entering instance.

And few days ago my client started to lag while doing this script. It often freezes for few minutes then screen goes black. O_o
I tried to give it higher priority, tried to shut all other programs - nothing helps.

Other scripts are working without problem...

Even using R5 ultimate model didnt affect this issue. (reduced significantly temperature on my graphic card but no other results)
the issue is probably a result of the timed events interfering with the normal bot operations. Not sure best way to solve that stuff. The main issue I have the checks in a timer is that they are then guaranteed (or a lot more likely) to fire, whereas if they are at waypoints, what happens when the bot gets stuck??? it never runs the code at the waypoint and never resets etc...painful

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

Re: YAKSS - Yet Another KS Script

#93 Post by BillDoorNZ » Thu Jul 26, 2012 7:09 am

Beni wrote:no start, and whats mean
KS_LootFactor = 0;
KS_LootMin = 200;
KS_HonorPartyMod = 0;
i want honour party...
what version are you running there Beni?

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

Re: YAKSS - Yet Another KS Script

#94 Post by BillDoorNZ » Thu Jul 26, 2012 7:13 am

rock5 wrote:But wouldn't changing the number of original waypoints change the meaning of the waypoint numbers? Eg. [57] would no longer be the waypoint it thinks it is, and neither would [66]. So the distance between them would change, so maybe so would the timing.

I guess if you have 3 less waypoints (for example) you could minus 3 from all the waypoint numbers, then if it takes 10s less (for example) you can take 10s off all the times after that.
yep :) so you have to manually adjust...I suppose I could change it a bit so it was more like:

Code: Select all

from: KS_TimingChecks = {[8]=60, [20]=300, [23]=400, [42]=480, [57]=860, [66]=980, [72]=1220, [86]=1420, [95]=1600, [103]=1860, [117]=2060, [140]= 2500, [168]=2700};
to: KS_TimingChecks = {[8]=60, [20]=240, [23]=100, [42]=80, [57]=380, [66]=120...};
where the second line is the additional time from the LAST specified node. so 8=[60] is 0+60 seconds. [20]=140 is the 60 seconds from [8] + 140 seconds = 300 seconds..that way if you add more points in, you just adjust the nodes they affect and everything else should just work automagically.

Beni
Posts: 54
Joined: Fri Jun 17, 2011 4:13 am

Re: YAKSS - Yet Another KS Script

#95 Post by Beni » Thu Jul 26, 2012 8:57 am

last version v2.0

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

Re: YAKSS - Yet Another KS Script

#96 Post by BillDoorNZ » Thu Jul 26, 2012 3:28 pm

Beni wrote:last version v2.0

Code: Select all

--the values below are used in combination with your characters luck to determine the KS_loot_discard_value
--formula: KS_loot_discard_value = (math.floor(luck/50)*KS_LootFactor + KS_LootMin + (if in honor party then add KS_HonorPartyMod))
KS_LootFactor = 0;
KS_LootMin = 200;
KS_HonorPartyMod = 0;
as the comment says, those values are used to determine what the bot thinks are 'worthless' items. It will throw items out that are worth less than the KS_loot_discard_value.

If your character has Magic Perfume, then it should use it - tho I only tested it with 1-day Magic Perfume

wilifox
Posts: 86
Joined: Tue Jul 26, 2011 6:00 pm

Re: YAKSS - Yet Another KS Script

#97 Post by wilifox » Fri Jul 27, 2012 5:31 am

Thx very much Bill, i have the Beni problem..

My Vs. 2.0, no start bot, say me: "error waypointlist, compile and run lua...." why? you know the problem.?

thx very much.

Beni
Posts: 54
Joined: Fri Jun 17, 2011 4:13 am

Re: YAKSS - Yet Another KS Script

#98 Post by Beni » Tue Jul 31, 2012 10:55 am

please fix it...no start...i like the wp because im low hp and fly no jump and die :) i try again and again and...same error like in the screnshoot.

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

Re: YAKSS - Yet Another KS Script

#99 Post by BillDoorNZ » Tue Jul 31, 2012 2:47 pm

try the new one in the first post - there was a bracket missing in the version print line!! typical :)

Hard to track those ones down sometimes.

Beni
Posts: 54
Joined: Fri Jun 17, 2011 4:13 am

Re: YAKSS - Yet Another KS Script

#100 Post by Beni » Thu Aug 02, 2012 2:56 am

ty, now works perfect.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 5 guests