Page 5 of 9

Re: YAKSS - Yet Another KS Script

Posted: Thu Jul 12, 2012 2:00 pm
by krix
got error in this new version

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

Re: YAKSS - Yet Another KS Script

Posted: Thu Jul 12, 2012 2:38 pm
by BillDoorNZ
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.

Re: YAKSS - Yet Another KS Script

Posted: Thu Jul 12, 2012 3:12 pm
by krix
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...

Re: YAKSS - Yet Another KS Script

Posted: Thu Jul 12, 2012 3:28 pm
by BillDoorNZ
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.

Re: YAKSS - Yet Another KS Script

Posted: Thu Jul 12, 2012 9:01 pm
by rock5
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.

Re: YAKSS - Yet Another KS Script

Posted: Fri Jul 13, 2012 2:39 am
by Hidden
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.

Re: YAKSS - Yet Another KS Script

Posted: Fri Jul 13, 2012 7:54 am
by krix
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)

Re: YAKSS - Yet Another KS Script

Posted: Fri Jul 13, 2012 11:23 am
by rock5
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.

Re: YAKSS - Yet Another KS Script

Posted: Fri Jul 13, 2012 11:41 am
by Beni
no start, and whats mean
KS_LootFactor = 0;
KS_LootMin = 200;
KS_HonorPartyMod = 0;
i want honour party...

Re: YAKSS - Yet Another KS Script

Posted: Thu Jul 26, 2012 7:02 am
by Hidden
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.

Re: YAKSS - Yet Another KS Script

Posted: Thu Jul 26, 2012 7:05 am
by BillDoorNZ
odd...I didn't get any notifications that this thread had changed...my apologies for not replying

Re: YAKSS - Yet Another KS Script

Posted: Thu Jul 26, 2012 7:08 am
by BillDoorNZ
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

Re: YAKSS - Yet Another KS Script

Posted: Thu Jul 26, 2012 7:09 am
by BillDoorNZ
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?

Re: YAKSS - Yet Another KS Script

Posted: Thu Jul 26, 2012 7:13 am
by BillDoorNZ
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.

Re: YAKSS - Yet Another KS Script

Posted: Thu Jul 26, 2012 8:57 am
by Beni
last version v2.0

Re: YAKSS - Yet Another KS Script

Posted: Thu Jul 26, 2012 3:28 pm
by BillDoorNZ
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

Re: YAKSS - Yet Another KS Script

Posted: Fri Jul 27, 2012 5:31 am
by wilifox
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.

Re: YAKSS - Yet Another KS Script

Posted: Tue Jul 31, 2012 10:55 am
by Beni
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.

Re: YAKSS - Yet Another KS Script

Posted: Tue Jul 31, 2012 2:47 pm
by BillDoorNZ
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.

Re: YAKSS - Yet Another KS Script

Posted: Thu Aug 02, 2012 2:56 am
by Beni
ty, now works perfect.