Page 11 of 22

Re: Allmost foolproof KS run

Posted: Thu Sep 01, 2011 9:52 pm
by Mostikos
Hi, i tried this script today but i have a problem im mage/druid 21.3k base life,5.2k int, 22k matt and i almost die in the beginning of the instance because when i fall in the way to the instance portal i lose a lot of life like 16k wich keeps me with 6k then i recover like 3k in the way to the instance and in the rest time of the bot when he enters. And he starts with like 10k but then he starts to attacks the mobs and i almost die what im asking for is a code for he stop and use recover because while the bot rests he doesnt use it then when he starts to run he tries to use but no effect because while he runs cant cast magic and i died because of that.Anyone can help me?

Im using Ntbuff for heals and buffs

Re: Allmost foolproof KS run

Posted: Thu Sep 01, 2011 10:19 pm
by lisa
at the waypoint at the bottom of the cliff use this

Code: Select all

if player.Class2 == 5 or player.Class1 == 5 then - priest
while (80> player.HP / player.MaxHP * 100) do
player:cast("PRIEST_URGENT_HEAL");
yrest(2300);
end
end
if player.Class2 == 8 or player.Class1 == 8 then - druid
while (80> player.HP / player.MaxHP * 100) do
player:cast("DRUID_RECOVER");
yrest(2300);
end
end

It will heal you back up before continuing

Re: Allmost foolproof KS run

Posted: Thu Sep 01, 2011 10:33 pm
by Mostikos
i think im doing something wrong its supost be like this? i put it when he enters in the portal and starts the instance

Code: Select all

print("		1. Iron Rune Warrior")
	
print("		2. Locatha")
	print("		3. Harp")
	print("		4. Full run")
	print("		5. Quit")
	print("\n StopAtBoss>")
	StopAtBoss = io.stdin:read()
	StopAtBoss = tonumber(StopAtBoss)
	until StopAtBoss and StopAtBoss > 0
	if StopAtBoss == 5 then error("Closing.",0) end	
	</onLoad>

	

 if player.Class2 == 5 or player.Class1 == 5 then - priest
while (80> player.HP / player.MaxHP * 100) do
player:cast("PRIEST_URGENT_HEAL");
yrest(2300);
end
end
if player.Class2 == 8 or player.Class1 == 8 then - druid
while (80> player.HP / player.MaxHP * 100) do
player:cast("DRUID_RECOVER");
yrest(2300);
end
end
<!-- #  1 --><waypoint x="4755" z="900" type="TRAVEL">	
	
   </waypoint>
	<!-- #  2 --><waypoint x="4626" z="913">changeProfileOption("MAX_TARGET_DIST", 90);
	       
	</waypoint>
	<!-- #  3 --><waypoint x="4456" z="912">	

Re: Allmost foolproof KS run

Posted: Thu Sep 01, 2011 11:31 pm
by lisa
more like this

Code: Select all

<!-- #  1 --><waypoint x="4755" z="900" type="TRAVEL">   
if player.Class2 == 5 or player.Class1 == 5 then - priest
while (80> player.HP / player.MaxHP * 100) do
player:cast("PRIEST_URGENT_HEAL");
yrest(2300);
end
end
if player.Class2 == 8 or player.Class1 == 8 then - druid
while (80> player.HP / player.MaxHP * 100) do
player:cast("DRUID_RECOVER");
yrest(2300);
end
end
</waypoint>
Assuming waypoint 1 is the first waypoint inside the instance then when you get inside it will heal u up.

Re: Allmost foolproof KS run

Posted: Fri Sep 02, 2011 5:11 am
by zarossa
@Lisa

Thanks. I'm going to check it today, but is this going to sell items in all bags?
<!-- Auto selling options when used with player:merchant -->
<option name="INV_AUTOSELL_ENABLE" value="true" /> <!-- true | false -->
<option name="INV_AUTOSELL_FROMSLOT" value="1" /> <!-- 1 = bag 1 slot 1 -->
<option name="INV_AUTOSELL_TOSLOT" value="30" /> <!-- 30 = last slot bag 1 -->
<option name="INV_AUTOSELL_QUALITY" value="white,green" /> <!-- white,green,blue,purple -->


Because <!-- 30 = last slot bag 1 --> so it's not going to sell more than is in first bag? If yes than how to change it? Because I have around 3-4 bps after every round.

Re: Allmost foolproof KS run

Posted: Fri Sep 02, 2011 5:30 am
by lisa
bag 1 is slot 1-30
bag 2 is slot 31-60
bag 3 is slot 61-90
bag 4 is slot 91-120

if you want it to sell all 4 bags then do
FROMSLOT 1
TOSLOT 120

if you want to sell just bag 4 then
FROMSLOT 91
TOSLOT 120

Re: Allmost foolproof KS run

Posted: Fri Sep 02, 2011 9:48 am
by Mostikos
Now it gives a error failed to compile and run Lua code for waypoint #2

Code: Select all

<!-- #  1 --><waypoint x="4755" z="900" type="TRAVEL">   
if player.Class2 == 5 or player.Class1 == 5 then - priest
while (80> player.HP / player.MaxHP * 100) do
player:cast("PRIEST_URGENT_HEAL");
yrest(2300);
end
end
if player.Class2 == 8 or player.Class1 == 8 then - druid
while (80> player.HP / player.MaxHP * 100) do
player:cast("DRUID_RECOVER");
yrest(2300);
end
end
</waypoint>

	<!-- #  2 --><waypoint x="4626" z="913">changeProfileOption("MAX_TARGET_DIST", 90);
	       
	</waypoint>

Re: Allmost foolproof KS run

Posted: Fri Sep 02, 2011 10:04 am
by rock5
A little slip from Lisa. LoL

This is a comment

Code: Select all

-- priest
This is not a comment

Code: Select all

- priest
This is a comment

Code: Select all

-- druid
This is not a comment

Code: Select all

- druid

Re: Allmost foolproof KS run

Posted: Fri Sep 02, 2011 11:33 am
by Mostikos
Now i have more 2 errors unknow profile skill Druid_Recover.Check ur manual castings(e.g events or waypoints files).Be sure the skill is in the skill section on ur profile.

the other is rom/macro/micromacro/scripts/rom/classes/player.lua:596: attempt to concatenate field ´Name´ <a nil value>

And thanks for the help of u 2

whats the problem now?

Re: Allmost foolproof KS run

Posted: Fri Sep 02, 2011 6:51 pm
by Mostikos
Can anyone help me what im supsot to do?

Re: Allmost foolproof KS run

Posted: Fri Sep 02, 2011 8:56 pm
by lisa
Mostikos wrote:Be sure the skill is in the skill section on ur profile.
The error says it all really.
Since it says
Mostikos wrote:Druid_Recover
I would say you typed it that way in the code, it needs to be all capitals.
DRUID_RECOVER
You also need to make sure it is in your profile, since mage is your primary class it needs to be in the mage skills section.

Code: Select all

		<skill name="DRUID_RECOVER"          	hotkey="MACRO" priority="90" hpper="30" />
Since you don't use the bot for your healing though you could probably use a macro to heal instead of getting bot to use the skills.

Use this

Code: Select all

sendMacro('CastSpellByName("Recover")')
instead of the
player:cast("DRUID_RECOVER")

Re: Allmost foolproof KS run

Posted: Fri Sep 02, 2011 9:05 pm
by lisa
rock5 wrote:A little slip from Lisa. LoL
LoL it happens to the best of us ;)

Re: Allmost foolproof KS run

Posted: Fri Sep 02, 2011 10:56 pm
by Mostikos
Ty very much i think everything is work just fine is there anyone of select the mount i want the bot ride because i have a thunder wartiger and thunder hippogriff and wartiger doesnt walk on water so i want him to ride hippogriff. is there any code?

Re: Allmost foolproof KS run

Posted: Fri Sep 02, 2011 11:03 pm
by lisa
did you try

Code: Select all

inventory:useItem(itemNameOrId)
obviously replace itemNameOrId with the name or id of the item. If you use name then use " " if using id then don't use " "

Re: Allmost foolproof KS run

Posted: Fri Sep 02, 2011 11:59 pm
by zarossa
I have 2 problems:

1. It's still not selling more than 2 bps and look at my options:

<!-- Auto selling options when used with player:Pancer -->
<option name="INV_AUTOSELL_ENABLE" value="true" /> <!-- true | false -->
<option name="INV_AUTOSELL_FROMSLOT" value="1" /> <!-- 1 = bag 1 slot 1 -->
<option name="INV_AUTOSELL_TOSLOT" value="129" /> <!-- 30 = last slot bag 1 -->
<option name="INV_AUTOSELL_QUALITY" value="white,green,blue,purple" /> <!-- white,green,blue,purple -->



2. It's not useing mana potions if they are in 3,4,5,6 bp and If I have them in 2 bp than he is using it but in next round he will sell them to NPC. What should I do?

Re: Allmost foolproof KS run

Posted: Sat Sep 03, 2011 1:01 am
by lisa
k
1.
try start bot with the debug option.
rom/bot path:whatever debug

2.
These are all of the autosell options, you can add which you think will get what you want done, lik enot selling pots.

Code: Select all

			INV_AUTOSELL_ENABLE = false,	-- autosell items at merchant true|false
			INV_AUTOSELL_FROMSLOT = 0,		-- autosell from slot #
			INV_AUTOSELL_TOSLOT = 0,		-- autosell to slot #
			INV_AUTOSELL_QUALITY = "white",	-- itemcolors to sell
			INV_AUTOSELL_IGNORE = nil,		-- itemnames never so sell
			INV_AUTOSELL_NOSELL_DURA = 0,	-- durability > x will not sell, 0=sell all
			INV_AUTOSELL_STATS_NOSELL = nil,	-- stats (text search at right tooltip side) that will not be selled
			INV_AUTOSELL_STATS_SELL = nil,		-- stats (text search at right tooltip side) that will be selled, even if in nosell

As for not using pots in bags 3-6, have you got the current version of bot with no yellow or red icons on files? I say this because it sounds like your rent bag address is wrong.

Re: Allmost foolproof KS run

Posted: Sat Sep 03, 2011 4:27 am
by zarossa
I used svn to update it and something are udpated, but now I have red addresses.lua. It uses mp from others bp but something is wrong with camera. I mean it's going back than again forward. Should I reinstall bot? ; x

Re: Allmost foolproof KS run

Posted: Sat Sep 03, 2011 4:41 am
by lisa
right click file that has red icon and then toutoisesvn then click revert. It will make the file to the version you have. So if you have current version it will make the file the current version of the file.

Re: Allmost foolproof KS run

Posted: Sat Sep 03, 2011 4:47 am
by zarossa
Thanks a lot for everything. ;)

Re: Allmost foolproof KS run

Posted: Mon Oct 17, 2011 9:21 am
by OneofMany
Hi, im back from a nice and long vacation!

I see lots of questions have been put here regarding the script, and lots have been solved too.

Just want to let you readers know i stopped working on this script. I wont be making any updates anymore, specially because it works fine for 48 hours in 1 piece here.

Im working on a different project know and then. Hope i can realize my goal in that project and share it again :)

Regards,

OneofMany