Page 4 of 9

Re: YAKSS - Yet Another KS Script

Posted: Thu May 24, 2012 8:41 pm
by bruenor9
seems to be running ok.

Ill let you know how it does boss.

Re: YAKSS - Yet Another KS Script

Posted: Thu May 24, 2012 9:02 pm
by bruenor9
after one run I got this error

http://gyazo.com/f7a734d2b536e150492d5fcbb46cf166

so yeh

Re: YAKSS - Yet Another KS Script

Posted: Thu May 24, 2012 9:14 pm
by BillDoorNZ
do you have Lisa's changeOptionFriendMob userfunction installed?

http://www.solarstrike.net/phpBB3/viewt ... mob#p37146

Re: YAKSS - Yet Another KS Script

Posted: Thu May 24, 2012 9:16 pm
by bruenor9
yes I do.

Script ran fine first time then second time just messed up

Re: YAKSS - Yet Another KS Script

Posted: Thu May 24, 2012 9:26 pm
by BillDoorNZ
bruenor9 wrote:yes I do.

Script ran fine first time then second time just messed up
just to be clear. did you:

a) Start the bot and run the waypoint file and then stop the bot, start it again with the waypoint file.

OR

b) Start the bot and run the waypoint file, it ran through and reset the instance and crashed just after resettings???

Re: YAKSS - Yet Another KS Script

Posted: Thu May 24, 2012 9:29 pm
by bruenor9
well It was done and I just forgot I did not invite someone. it went to leave group but couldnt so I stopped it there closed the bot and got out my self

I try starting again and..

Re: YAKSS - Yet Another KS Script

Posted: Thu May 24, 2012 9:33 pm
by BillDoorNZ
gah, thats a tough one - either I'm missing something completely obvious (very likely) or theres something wierd going on :)

I'll keep looking at it and trying to figure out whats going on, but may not get back to you until I can get my system up and running again (no idea how long that will be).

Re: YAKSS - Yet Another KS Script

Posted: Thu May 24, 2012 9:36 pm
by bruenor9
damn Alright :S

I would uses lisa script but I cant find out how to make the magic perfume work

Re: YAKSS - Yet Another KS Script

Posted: Thu May 24, 2012 9:49 pm
by BillDoorNZ
Magic perfume works automatically. If you use it, it lasts 6 hours and if you bring out your pet, it will loot the corpses for you.

Lisa's script is set up to diable player looting by default, so the pet will do all the looting for you :)

Now that I've read her script through, I might have to steal her CleanBagKS function to sell the runes etc as well or something to that effect at least :)

Re: YAKSS - Yet Another KS Script

Posted: Thu May 24, 2012 9:59 pm
by bruenor9
yeh but I leave my bot overnight which goes for around 12 hours. thats the problem

and to make it summon my pet automaticly incase I die

Re: YAKSS - Yet Another KS Script

Posted: Thu May 24, 2012 10:05 pm
by BillDoorNZ
bruenor9 wrote:yeh but I leave my bot overnight which goes for around 12 hours. thats the problem

and to make it summon my pet automaticly incase I die
use the EGGPET settings:

EGGPET_ENABLE_ASSIT = true
EGGPET_ASSIST_SLOT??? <- think thats the name, set it to the slot your pet is in (1 is leftmost)

Re: YAKSS - Yet Another KS Script

Posted: Thu May 24, 2012 10:22 pm
by bruenor9
I add that in profile or the script?

and how to make it check each time if the magic perfume is active?

Re: YAKSS - Yet Another KS Script

Posted: Thu May 24, 2012 10:26 pm
by BillDoorNZ
to detect if you have it active:

Code: Select all

if (not player:hasBuff("Magic Perfume")) then
  --character does not have it active - find and use it - not sure on id's etc tho, you will need to sort that
end;
Not sure about its ID etc so you will need to find that from someone else - I'm heading home for the night/weekend :)

Re: YAKSS - Yet Another KS Script

Posted: Thu May 24, 2012 10:31 pm
by bruenor9
ok and do these go on profile or the script?

Re: YAKSS - Yet Another KS Script

Posted: Sat May 26, 2012 12:07 am
by Louis
Thanks, now if it works.

Re: YAKSS - Yet Another KS Script

Posted: Sat May 26, 2012 7:33 am
by krix
BillDoorNZ wrote: What did you set KS_check_bag, KS_loot_discard_value and KS_loot_discard_quality to?

Are you using Magic Perfume?

The waypoint only bothers checking how full the characters inventory is when it is in the instance too.

Code: Select all

KS_check_bag = true; 			
KS_loot_slot_start = 78; 		
KS_loot_slot_end = 210;			
KS_loot_discard_value=500;		
KS_loot_discard_quality=2;		
KS_allow_loot = true;		
And i'm not using magic perfume.

And sometimes i get this error: http://imageshack.us/photo/my-images/195/errorxf.jpg it results on teleporting to logar and running back :/ how to get rid of it?

Re: YAKSS - Yet Another KS Script

Posted: Sun May 27, 2012 7:42 pm
by BillDoorNZ
The error you are getting is probably due to the 'KS_ReturnFromTransportWaypoint' variable not being set to anything. The idea of that part of the script is to load a new waypoint file which will run your character back to the res point in DDC and then restart the KS script. If you don't want to do this, then you need to change the KSResetInstance function.

The issue with this, is that that code is there to handle scenarios where the bot is stuck outside of the KS instance, and can't get back on track. My solution was to recall to logar and run back. You can always change this to do what you want it to do (e.g. use a transport rune to go somewhere else).

I should really look at cleaning up that whole function to allow users to specify an action from a list of alternatives.

Re: YAKSS - Yet Another KS Script

Posted: Thu Jun 07, 2012 10:52 am
by Azbi
Ehh, when i turn on my bot, he kill 1st frog and then there is this error :x
screen shot :
skroc.pl/short
Is someone can help? ;)

Re: YAKSS - Yet Another KS Script

Posted: Thu Jun 07, 2012 3:26 pm
by BillDoorNZ
The code causing the problem is shown below:

Code: Select all

--helper function to could items in a slot range, rather than whole bag
function CInventory:itemTotalCountForSlots(itemNameOrId, first, last)
	if first == nil then
		-- Default values - 1-240 for items, 61-240 for empties.
		if itemNameOrId == 0 then
			first = 61
		else
			first = 1
		end
		last = 240 -- default, search only bags
	end

	self:update();

	local item;
	local totalCount = 0;
	for slot = first, last do
		item = inventory.BagSlot[slot];
 	    if item.Available and (item.Id == itemNameOrId or item.Name == itemNameOrId) then
			if itemNameOrId == 0 then -- so you can count empty slots
				totalCount = totalCount + 1
			else
				totalCount = totalCount + item.ItemCount;
			end
		end;
	end;

	return totalCount;
end;
Rock has since merged this code into the inventory class so that can be removed (I'll update the first post with version 1.8 for this).

However, the code is fine. There is obviously an issue with inventory.BagSlot[????] for you. This works fine on my setup, so I suspect it is to do with the bag slot range you are sending in. In the waypoint file there are 2 settings that are shown below:

Code: Select all

KS_loot_slot_start = 61; 		-- first slot to start checking from 61=bag1 slot 1
KS_loot_slot_end = 180;			-- last slot to check to 180 = last slot in bag 3
They need to be set to bag slots that make sense for your character. I've been looking at this further and will change this to just use the AutoSell bagslot range so it is easy to customise per character. Actually, I will change this now so version 1.8 will include that change. I.E I will remove KS_loot_slot_start and end and replace them with the values from settings.profile.options.INV_AUTOSELL_FROMSLOT and INV_AUTOSELL_TOSLOT. These are in your characters profile:

Code: Select all

    <option name="INV_AUTOSELL_FROMSLOT" value="1" />    <!-- 1 = bag 1 slot 1 -->
    <option name="INV_AUTOSELL_TOSLOT" value="120" />    <!-- 30 = last slot bag 1 -->
I've made the changes now, but will test it a bit first before updating the original post.

Re: YAKSS - Yet Another KS Script

Posted: Thu Jun 07, 2012 9:02 pm
by BillDoorNZ
k, have updated with v1.8 in first post