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
bruenor9
Posts: 59
Joined: Sun Feb 05, 2012 11:42 pm

Re: YAKSS - Yet Another KS Script

#61 Post by bruenor9 » Thu May 24, 2012 8:41 pm

seems to be running ok.

Ill let you know how it does boss.

bruenor9
Posts: 59
Joined: Sun Feb 05, 2012 11:42 pm

Re: YAKSS - Yet Another KS Script

#62 Post by bruenor9 » Thu May 24, 2012 9:02 pm

after one run I got this error

http://gyazo.com/f7a734d2b536e150492d5fcbb46cf166

so yeh

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

Re: YAKSS - Yet Another KS Script

#63 Post by BillDoorNZ » Thu May 24, 2012 9:14 pm

do you have Lisa's changeOptionFriendMob userfunction installed?

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

bruenor9
Posts: 59
Joined: Sun Feb 05, 2012 11:42 pm

Re: YAKSS - Yet Another KS Script

#64 Post by bruenor9 » Thu May 24, 2012 9:16 pm

yes I do.

Script ran fine first time then second time just messed up

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

Re: YAKSS - Yet Another KS Script

#65 Post by BillDoorNZ » Thu May 24, 2012 9:26 pm

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

bruenor9
Posts: 59
Joined: Sun Feb 05, 2012 11:42 pm

Re: YAKSS - Yet Another KS Script

#66 Post by bruenor9 » Thu May 24, 2012 9:29 pm

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

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

Re: YAKSS - Yet Another KS Script

#67 Post by BillDoorNZ » Thu May 24, 2012 9:33 pm

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).

bruenor9
Posts: 59
Joined: Sun Feb 05, 2012 11:42 pm

Re: YAKSS - Yet Another KS Script

#68 Post by bruenor9 » Thu May 24, 2012 9:36 pm

damn Alright :S

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

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

Re: YAKSS - Yet Another KS Script

#69 Post by BillDoorNZ » Thu May 24, 2012 9:49 pm

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

bruenor9
Posts: 59
Joined: Sun Feb 05, 2012 11:42 pm

Re: YAKSS - Yet Another KS Script

#70 Post by bruenor9 » Thu May 24, 2012 9:59 pm

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

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

Re: YAKSS - Yet Another KS Script

#71 Post by BillDoorNZ » Thu May 24, 2012 10:05 pm

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)

bruenor9
Posts: 59
Joined: Sun Feb 05, 2012 11:42 pm

Re: YAKSS - Yet Another KS Script

#72 Post by bruenor9 » Thu May 24, 2012 10:22 pm

I add that in profile or the script?

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

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

Re: YAKSS - Yet Another KS Script

#73 Post by BillDoorNZ » Thu May 24, 2012 10:26 pm

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

bruenor9
Posts: 59
Joined: Sun Feb 05, 2012 11:42 pm

Re: YAKSS - Yet Another KS Script

#74 Post by bruenor9 » Thu May 24, 2012 10:31 pm

ok and do these go on profile or the script?

Louis
Posts: 22
Joined: Sat Dec 17, 2011 4:52 pm

Re: YAKSS - Yet Another KS Script

#75 Post by Louis » Sat May 26, 2012 12:07 am

Thanks, now if it works.

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

Re: YAKSS - Yet Another KS Script

#76 Post by krix » Sat May 26, 2012 7:33 am

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?

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

Re: YAKSS - Yet Another KS Script

#77 Post by BillDoorNZ » Sun May 27, 2012 7:42 pm

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.

Azbi
Posts: 8
Joined: Sat Mar 24, 2012 9:22 pm

Re: YAKSS - Yet Another KS Script

#78 Post by Azbi » Thu Jun 07, 2012 10:52 am

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? ;)

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

Re: YAKSS - Yet Another KS Script

#79 Post by BillDoorNZ » Thu Jun 07, 2012 3:26 pm

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.

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

Re: YAKSS - Yet Another KS Script

#80 Post by BillDoorNZ » Thu Jun 07, 2012 9:02 pm

k, have updated with v1.8 in first post

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests