Page 1 of 1

Optimising KS (looting) etc, etc - questions, and lots of it

Posted: Sun Sep 04, 2011 1:15 pm
by Nero
Hello ladies and gents,
Some nice forum you've got there, with surprisingly good community.

That said, let's get to business :

1) I've managed to do ALOT with basic KS scripts, and it runs pretty much flawlessly... with one major problem. Bot doesn't really loot some mobs, even though it should. It was looting not even 50% with looting in combat turned off, and when I turned it on, it works maybe 80% of the time. It usually skips mobs when it kills more than usual, the more mobs at once, the higher the possibility (at least I think so). It isn't problem with my setting per say, as I do not get any messages that it's too far away, or any errors.. it seems that those mobs are simply ignored, invisible to bot, which doesn't return any info and simply goes to nest waypoint.

Needless to say, I am not amused.

AFAIK (might be wrong - it's my second day with bot, so I'm making mistakes frequently), it's either
- killspeed is too fast, which is doubtful
- I'm using purgatory fire in one waypoint, then going with 'travel' to another predetermined point, where another round of purgatory fire is used - and since some mobs don't even hit me as their skills takes forever to cast, bot might simply miss them, even though I kill them. Just now I realized a way to check whether it's true or not, but, regardless - I need a solution.

To be sure we're on the same page, here's a bit of my WP inside KS - it goes luring mobs with travel, then attacks them, then back to travel etc :

Code: Select all

	<!-- #  1 --><waypoint x="4714" z="824" y="679" type="TRAVEL"></waypoint>
	<!-- #  2 --><waypoint x="4715" z="911" y="679" type="TRAVEL"></waypoint>
	<!-- #  3 --><waypoint x="4624" z="912" y="679">	</waypoint>
	<!-- #  4 --><waypoint x="4534" z="911" y="679">	</waypoint>
	<!-- #  5 --><waypoint x="4454" z="913" y="679" type="TRAVEL"></waypoint>
	<!-- #  6 --><waypoint x="4404" z="951" y="679" type="TRAVEL"></waypoint>
	<!-- #  7 --><waypoint x="4355" z="989" y="679">	</waypoint>
	<!-- #  8 --><waypoint x="4362" z="942" y="679" type="TRAVEL"></waypoint>
	<!-- #  9 --><waypoint x="4372" z="875" y="679" type="TRAVEL"></waypoint>
	<!-- # 10 --><waypoint x="4374" z="804" y="679">	</waypoint>
	<!-- # 11 --><waypoint x="4312" z="843" y="679" type="TRAVEL"></waypoint>
	<!-- # 12 --><waypoint x="4253" z="888" y="679" type="TRAVEL"></waypoint>
	<!-- # 13 --><waypoint x="4184" z="901" y="679">	</waypoint>
	<!-- # 14 --><waypoint x="4049" z="912" y="700" type="TRAVEL"></waypoint>

Is there any function that checks any dead body in X area around me, when I'm done with killing mobs? Would be preferable if I could just pin it into another waypoint - it would be a simple matter of duplicating one after the fight and running said 'scanner', but I was unable to find anything I could use there.



2) Is there any way to change an entire profile while bot is running? I've only seen ways to change one line at a time, which sucks to me (for example, I'm running with purgatory fire as my only attack skill, and it's fine when just killing mobs in instance - I would prefer to change an entire profile when fighting boss though, seeing as I'm slowly pumping my character to do it.I know that I can use DIYCE macro instead, but changing profile is preferable to me). I do not think that such option is possible, but asking won't hurt.



3) General question - on which conditions is instance being reset? I've got only one character botting for now, and want to increase it in close future. Sadly, my PC is slowly turning archaic, and since I need two clients to reset instance right now (one sits idly and stays in party from rebirth place to last waypoint when character breaks party, so KS will reset). Needless to say, it's not feasible. So, how does (on what conditions?) in-game instance, such as KS, resets?


Will probably spam you guys soon with another problems, but that's it ATM. Any responses are greatly appreciated.


Edit - just for the record, I'm also getting the 'pressing esc key' bug. Seems random, as happened near Pancer three times, and twice around the time when I fell from mountain, cast regen, and was supposed to advance to the next waypoint. Bot has been updated not even 24h ago. Didn't even read current thread which is about it, seeing as my brain feels too wasted at this moment, so don't bother yourself with it for now. G'night.

Re: Optimising KS (looting) etc, etc - questions, and lots o

Posted: Sun Sep 04, 2011 2:07 pm
by botje
For the loot bit, i believe its a simple call to LootAll() that would suffice.

Botje

Re: Optimising KS (looting) etc, etc - questions, and lots o

Posted: Sun Sep 04, 2011 7:41 pm
by lisa
1. profile option LOOT_ALL set to true will loot any dead bodies on ground.

Code: Select all

<option name="LOOT_ALL"	value="true" /> 
2. It is probably possible but I have never tried to do it, I generally do other things like change the skills autouse with a function in the WP.

Something like this in onload of WP file.

Code: Select all

function bossskills(_active)
	if player.Class1 == 4 then --mage
		if _active ~= false then -- boss skills
			changeProfileOption("COMBAT_DISTANCE" , 200)
			changeProfileSkill("MAGE_PURGATORY_FIRE" , "AutoUse", "false")
			changeProfileSkill("MAGE_FLAME" , "AutoUse", "true")			
			changeProfileSkill("MAGE_FIREBALL" , "AutoUse", "true")
		else -- trash skills
			changeProfileOption("COMBAT_DISTANCE" , 50) 
			changeProfileSkill("MAGE_PURGATORY_FIRE" , "AutoUse", "true")
			changeProfileSkill("MAGE_FLAME" , "AutoUse", "false")
			changeProfileSkill("MAGE_FIREBALL" , "AutoUse", "false")
		end
	end
end
then just call it before boss
bossskills(true)
and after boss
bossskills(false)

I just wrote that code on the fly, untested, will probably work though. 3rd Arg may need to be false instead of "false".

3. easiest way to reset instance is of course with a party. Without the party option you can use log to character screen then back in, this will kick you from instance and back to the resurection point. I believe the timer is 5 minutes to reset an instance when you are outside, so just sit around for 5 minutes. No other way to reset without using a party.

Re: Optimising KS (looting) etc, etc - questions, and lots o

Posted: Mon Sep 05, 2011 2:23 am
by Nero
Thank you guys very much for the answers. #3 is pretty much explained. However :

1) My profile looks like this

Code: Select all

		<!-- Loot settings -->
		<option name="LOOT"               	value="true" />
		<option name="LOOT_ALL"		  	value="true" />  		<!-- Loot all nearby dead mobs after combat -->
		<option name="LOOT_IN_COMBAT"     	value="true" />
		<option name="LOOT_DISTANCE"      	value="110" />
		<option name="LOOT_PAUSE_AFTER"   	value="0" />			<!-- probability in % for a short rest -->
and it still happens. With LOOT_IN_COMBAT off and LOOT_ALL on, it's looting about 50% of mobs.
Can I somehow use LOOT_ALL manually? As in, add it to waypoint or something similar?



2) Not quite sure whether I get it or not. It seems that the code is supposed to go into userfunctions, and would be called like that:

Code: Select all

<waypoints>   
		<onLoad>
            bossskills(true);
  		</onLoad>
	<waypoint x="xval" z="zval"></waypoint>
	.....
</waypoints>
and full waypoint should be split into few files so that the way up to the boss will be as it is now, then said code in a waypoint file specifically created for the boss, and turned off in the next waypoint file?
Or can I use onload at the beginning of, for example, WP #43 to turn bossskills on, and again at WP #46 to turn it off?




And a new one - how do I use getQuestStatus(); function?

I've tried various ways to accept and turn in quests, using to it Xaviera dailies, but still don't know how to check whether quest is already finished, or not.

Code: Select all

	<!-- #  4 --><waypoint x="6616" z="6454" y="90">
		getQuestStatus("Twisted Soul");
		</waypoint>
doesn't return me anything, or at least I cannot see it. Perhaps something like

Code: Select all

	<!-- #  4 --><waypoint x="6616" z="6454" y="90">
		getQuestStatus("Twisted Soul");  
  		 if ( getQuestStatus == complete ) then               <!--My coding experience in C consists of ~3h in my life, so.. yeah-->
     		 loadPaths("Gargoyles");
   		end
		</waypoint>
would work? It's supposed to check if Twisted Soul daily is completed, and if it is, it'll load WP file with the daily about gargoyles with another getQuestStatus etc. If it;s not, it should continue current waypoint file.
And a side-question - how do I go about checking quest ID? Read many times that using ID's is better, so might as well start doing it.

Re: Optimising KS (looting) etc, etc - questions, and lots o

Posted: Mon Sep 05, 2011 3:36 am
by lisa
2. nah in onload of the WP

this is the dod WP I am still fine tuning.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>

<onload>
function bossbuff()
	if player.Class1 == 2 and player.Class2 == 7 then
		inventory:useItem(204462)
		yrest(5000)
		inventory:useItem(204463)
		yrest(5000)
		player:cast("WARDEN_SAVAGE_POWER")
		player:cast("SCOUT_ARROW_OF_ESSENCE")
	end
	if player.Class1 == 4 and player.Class2 == 5 then -- mage/priest
		player:cast("MAGE_ENERGY_INFLUX")
		player:cast("MAGE_INTENSIFICATION")
		player:cast("MAGE_MAGIC_DRAIN")
		player:cast("MAGE_ELEMENTAL_CATALYST")
	end
end
</onload>
	<!-- #  1 --><waypoint x="1644" z="-4921" y="752">	</waypoint>
	<!-- #  2 --><waypoint x="1670" z="-5077" y="760">	</waypoint>
	<!-- #  3 --><waypoint x="1688" z="-5162" y="759">
	waitForLoadingScreen();
	</waypoint>
	<!-- #  5 --><waypoint x="1886" z="2881" y="433">	</waypoint>
	<!-- #  6 --><waypoint x="2044" z="2698" y="433">	</waypoint>
	<!-- #  7 --><waypoint x="2177" z="2540" y="407">	bossbuff()	</waypoint>
	<!-- #  9 --><waypoint x="2228" z="2466" y="401">	</waypoint>
	<!-- # 10 --><waypoint x="2188" z="2524" y="401">yrest(5000)</waypoint>
	<!-- # 11 --><waypoint x="2120" z="2607" y="432">	</waypoint>
	<!-- # 12 --><waypoint x="1894" z="2874" y="433">	</waypoint>
	<!-- # 13 --><waypoint x="1774" z="2883" y="433">	</waypoint>
	<!-- # 14 --><waypoint x="1696" z="2891" y="445">		
	waitForLoadingScreen();
	yrest(5000)
	SlashCommand("ILG destroy"); 
	yrest(2000)
	SlashCommand("ILG inv"); 
	yrest(1000)
	SlashCommand("ILG inv"); 
	</waypoint>
</waypoints>

#? quest, question

Code: Select all

local queststate = getQuestStatus("Twisted Soul") -- quest name
if queststate == "complete" then -- checks if quest is complete
loadPaths("Gargoyles");
end

Re: Optimising KS (looting) etc, etc - questions, and lots o

Posted: Mon Sep 05, 2011 7:34 am
by Nero
Yet again, your efforts are appreciated.

2) isn't quite what I was looking for, but based on your DoD script and a bit of tinkering, I've turned it into something satisfying. This point is as clear as it gets to me.

and 3) - Jesus Christ on a pogo stick, I want to hurt something. I've fought with it for about 90 minutes, and was beginning to think that I'm a moron for being unable to get 3 lines working..
Then I realized that I've been spelling quest name wrong -.-

Works like a charm! And right now, everything I've worked with works, except this unfortunate looting issues. Oh well, time to buff characters up to DoD level ;]

Re: Optimising KS (looting) etc, etc - questions, and lots o

Posted: Mon Sep 05, 2011 11:20 am
by rock5
2. I actually like the idea of using a completely different profile. It allows you to change numerous things more easily I think. Probably easier to do for the average user too.

Have you tried reloading the profile like you would do if changing character?

Code: Select all

settings.loadProfile("BossProfile")
That might work on it's own.

Re: Optimising KS (looting) etc, etc - questions, and lots o

Posted: Mon Sep 05, 2011 11:33 am
by lisa
I tried that a few revisions ago and it just errored out. Not sure if the changes in last few revisions fixed it though.

Re: Optimising KS (looting) etc, etc - questions, and lots o

Posted: Mon Sep 05, 2011 11:40 am
by rock5
To tell you the truth, I made a lot of those changes to the way the profile loads and I'm not even sure if it works still. I never use the feature.

How long ago did you try it? Was it before the changes I added to help with relogging?

Re: Optimising KS (looting) etc, etc - questions, and lots o

Posted: Mon Sep 05, 2011 11:49 am
by lisa
yup, after it failed thats is when I started using that code I posted changing distance and ranged and what not depending on class.

Haven't tried it since the changes you made.

Re: Optimising KS (looting) etc, etc - questions, and lots o

Posted: Tue Sep 06, 2011 3:21 pm
by kanta
Nero wrote: except this unfortunate looting issues.
Try adding the following to your <onLeaveCombat> profile section. It seems to have helped me a bit.

Code: Select all

player:lootAll()

Re: Optimising KS (looting) etc, etc - questions, and lots o

Posted: Fri Sep 23, 2011 9:41 am
by Nero
@Kanta - it has, in fact, worked. At least 90% mobs are looted, so I feel that's good enough. You're the man!

As for loading an entire new profile - didn't manage to get it to work. Shame, because changing things like fighting only certain mobs at certain waypoints is very inefficient. Oh well, can't have everything.

Oh - and if anyone doing KS with 55 lvl, that's not able to kill boss easily - flyhack is wonderful, and will allow you to skip it easily. On my 55 lvl character I'm filling up to 5 bags (only 12 spaces for useful items saved) of trash for going up to 3rd boss - so it's a nice amount of gold.

So, as I've finished about 50% of my new, large project, it's time to ash for help in things which I've been unable to solve myself.. again.

1) How do I go about playing certain sounds when required? It's best explained here http://www.solarstrike.net/phpBB3/viewt ... rce#p16903 , but even then, every single time I'm attempting to use it, I'm constantly getting an error in (I think, not entirely sure - unable to test it atm)

Code: Select all

soundSetVolume(soundresource, 1.0);
> every single time, in several different functions scrounged from various topics and even GMDetect userfunction, where first value returns 'nil'. Why would it be so?
And yeah, did install OpenAL

As I'm quite sure, I won't solve it anytime soon on my own, so if someone would post a short snippet that's working for you, and a short explanation where to put it, I'll be grateful.


2) How should I go about automating quest akin to Autopsy? There's another one similar in sub-human camp in the Coast of Opportunity, which I would like to put into WP. If I remember correctly, when NPC needs particular item, it's written on my screen, and not in chat window. In the thread about Dalanis WP there's talk about OnEvent which I think should be used here (when Okander yells something, and then he 'jumps'), and it should gather certain item when corresponding text is displayed - as in, npc 'tells' me "I need clear water!', and bot would choose to harvest that water.
So - how would I go about checking what item is needed to be harvested?


3) When I'm trading with merchant, I want some items with durability above certain threshold to be left in my bag. Assuming I've got this item's name or ID, how would I go checking it's ID when not used by my character? Say, I've got 5 items whose ID is 5000, and only one is with durability above 110 - how to make it so that all of them are sold except the one with 110+ dura?


4) How to forbid my bot to skipping waypoints? It's extremely annoying when it does, and I cannot really imagine any situation when it's useful - and when my character goes in the same way it goes out, and in the middle of the way kills one mob, and suddenly goes from WP50 to WP170.. well, it can be annoying.

Cheers, Nero.

Edit - deleted one thing as I've managed to do it myself.
Edit2 - concerning the pseudo-Autopsy quest - it's a bit different that I remembered. Took a screenshot when doing it manually, and it's like that :

http:// imageshack. us/f/10/screennfh.png/ ----------------/why am I unable to post URL?

Easiest way seems to be to check for a certain words in chat - say, if my chat would contain 'Please give me Clean Water!", my bot would gather clean water. I'm quite sure that I've seen some userfunction that's checking my buffs, and I could also make it a local function that would check whether I have, for example, 'Clear Water' buff, and if I do - it would gather Clear Water. Any hints/thoughts would be appreciated.

Re: Optimising KS (looting) etc, etc - questions, and lots o

Posted: Fri Sep 23, 2011 7:14 pm
by parra
Man, you make all so complicate...
I dont use the profile for skills but a moddified version of ubberflex that can work manually . I make a macro that goes like /acs /wait 1 /acs /wait 1 that goes placed to number 3 , obiously in the profile i put one single spell cast to make the micromacro try to push number 3 when combat starts. Then ubberflex makes all the rest buffing ,atack , healing and looting faster.
My bots doesnt target the enemies , just goes along the instance agroing the mobs . To do that add a line in the profile like <option name="TARGET_LEVELDIF_BELOW" value="1" /> then he wont attack those mobs, the opposite would make it stuck to the walls all the time.

Well to get agro you cant go with a very high level .I keep mines to 55-56 using death penalty + xp charms. That also can bring you a couple millions for that so it's a win win .Also with lvl 55 you can equip ds/zs gear and get nice drop rate, about 60 pieces of gear with drop buff 75% before first boss.
Is not much gold there only worth to leave your pc on if you can put there a couple bots if not better to farm eggs.
And if its about money ,botting the dailies from elfs can bring even more money from less effort , selling clean t4 with hundreds of phirius.But then you need like 50+ accounts and the key to make the bot change of account which is the saint grial of this bot but that secret is not shared, sadly.
About the sounds , use an addon that makes a sound when wispered or say something to you called chat monitor .To avoid the ingame sounds just go to the folder of the game where the sounds and music is there and delete the file and make yourself a txt file with the same name and extension.
With the gm detection i wouldn't be totally sure if the gm is not satisfy with your responses they will ban you , they have easy trigger.

They somehow connect with your char and check if you are casting skills and then they wisp you or say something, they dont teleport to your area with a char. It's done with terminal .Also will ban all the accounts related with that ip previous 24h. Accounts with one lvl 31+ will get a temp ban , the others will be perma ban.
My tip is bot when you are playing with your main and be sure chat monitor is activated then you can respond properly to all questions the gm can check.
This is like all if you abuse you end badly. And if you still want to abuse , please at least install a program to shut down your pc before 8, remember that they make the bans in the morning mostly...

Have fun.