Page 2 of 22

Re: Allmost foolproof KS run

Posted: Thu May 12, 2011 11:07 am
by OneofMany
rock5 wrote:Why not have just the 1 file and an option to choose which boss you want to go to?

There is a way to get a 2nd question after you entered the number of the waypoint to use?

Is there a function table with explanation somewhere? so i can learn faster?

really appreciate the help allready :)

Re: Allmost foolproof KS run

Posted: Thu May 12, 2011 11:08 am
by OneofMany
lisa wrote:this works for me, clear thought, luck and speed. I forget which is which.

Code: Select all

if (not player:hasBuff("506687")) then
    inventory:useItem(207203);
    end  

if (not player:hasBuff("506686")) then
    inventory:useItem(207202);
    end 

if (not player:hasBuff("506684")) then
    inventory:useItem(207200);
    end 

Thnx! Put them in allready and updated the 2 scripts (not the full run)

Re: Allmost foolproof KS run

Posted: Thu May 12, 2011 12:13 pm
by rock5
OneofMany wrote:
rock5 wrote:Why not have just the 1 file and an option to choose which boss you want to go to?

There is a way to get a 2nd question after you entered the number of the waypoint to use?

Is there a function table with explanation somewhere? so i can learn faster?

really appreciate the help allready :)
I was thinking the user could add a variable in the onLoad section of their profile, maybe like

Code: Select all

StopAtBoss = "Iron Warrior"
or whatever his name is. Then at the waypoint just before that boss you do something like

Code: Select all

if StopAtBoss == "Iron Warrior" then
   sendMacro("LeaveParty();");
   etc....
end
But your idea is a good one to. You are saying the script could ask a question as to which boss to fight to. I think you would need a multiple option question and then check for a key press. Try

Code: Select all

BossNumber = 0
repeat
  print("Choose which boss you want to fight to:"
  print("    1. Boss One")
  print("    2. Boss Two")
  -- etc
  if keyPressedLocal ( kry.VK_1) then
    BossNumber = 1
  elseif keyPressedLocal ( kry.VK_2) then
    BossNumber = 2
  -- etc...
  end
until BossNumber > 0
Something like that and you'd put it in the <onLoad> section of the waypoint file.

Then you can check the value of BossNumber before engaging bosses.

Code: Select all

if StopAtBoss == 1 then
   sendMacro("LeaveParty();");
   etc....
end

Re: Allmost foolproof KS run

Posted: Thu May 12, 2011 9:27 pm
by lisa
Couldnt you use a

Code: Select all

io.stdin:read()
so people can see their input and fix if they hit the wrong key.

I like the idea, I just made a WP that left party just before first boss regardless of bag space, stating which boss to stop at is a much better idea though =)

Re: Allmost foolproof KS run

Posted: Fri May 13, 2011 12:08 am
by Merlin
You all 3 doing a great work, just to mentione it! :)

On the script where it runs to the Adept, there is a problem with the "Cask"s. When I'm standing on the point to reset I get the try to destroy them, but becouse that's not working the script is stucked. I have added the cask to the "don't attack" part in my profile and the script runs without problems.

I have another idea if you are on the part with the choosing options. You have discoused of the posibility to get home and back for the Lucky potions. There could be a posibility the script uses a HomeSweetHome stone to get home and back if you choose at the start to do it. Check out all your housemaids will be a much more intresting try becouse we haven't them on the same place and that makes imposible to use your waypoints, but anyway the option should be awailable for the ones who will manage to change them.

If we buy the stones as they are on sale they cost around 13k gold. With just one run the stone pays off. And if you have your maid at the normal 50 you will get 9 potions, that holds for 9x2=18h => more or less 25 runs. If you get 25% more items (bescouse some part of the lucky potion highers the gear drop not the number of items) you will get at last 1kk gold more. And the investment in the HomeSweetHome stones has payed off.

Re: Allmost foolproof KS run

Posted: Fri May 13, 2011 1:50 am
by rock5
lisa wrote:Couldnt you use a

Code: Select all

io.stdin:read()
so people can see their input and fix if they hit the wrong key.
I'm not used to getting user input. I thought there was a command like that but couldn't find it for some reason. That's definately a better option.

Re: Allmost foolproof KS run

Posted: Fri May 13, 2011 2:17 am
by OneofMany
This is gonna be pretty nice i think :)

I will do the full KS run and make a choice in it to wich boss (and a skip turtle one)

And make it foolproof, or even more foolproof as it is now. last night my kstocasknoturtle ran for 640 mins. so that one works pretty well

Re: Allmost foolproof KS run

Posted: Fri May 13, 2011 2:50 am
by lisa
rock5 wrote:
lisa wrote:Couldnt you use a

Code: Select all

io.stdin:read()
so people can see their input and fix if they hit the wrong key.
I'm not used to getting user input. I thought there was a command like that but couldn't find it for some reason. That's definately a better option.
Pretty much exactly what you posted before but use the io.stdin:read()
Just have a variable and make it = that code I posted
ie

Code: Select all

  print("Choose which boss you want to fight to:"
  print("    1. Boss One")
  print("    2. Boss Two")
  print("\n>")
StopAtBoss = io.stdin:read()
So StopAtBoss will be the user input

Code: Select all

if StopAtBoss == 1 then
   sendMacro("LeaveParty();");
   etc....
end

Re: Allmost foolproof KS run

Posted: Fri May 13, 2011 4:02 am
by Merlin
Another idea not realy related to this work but it seems I have all 3 major scriptwriters on one post...

If somehow Frogster is going to folow the way we walk they can see an exact patern. My question is if there is a way to randomize the waypoints by a few dots like +-5 in that case there is with this big waypointscript no chance to get the same waypoints paths twice in 1kkk runs.

The same techniqe would also be posible to use in the Gold Egg farming script.

Re: Allmost foolproof KS run

Posted: Fri May 13, 2011 4:16 am
by Giram
WAYPOINT_DEVIATION: A 'random' offset applied to each waypoint in your path giving it less of a bot-like appearance; suggested value of 50. Lower value means you stick closer to your normal path; 0 means no deviation.

Or do 2 or more paths to ks and change those every time. So after first one we change variable to 2 and it would select another waypoint. After last it will go back to one.

Re: Allmost foolproof KS run

Posted: Fri May 13, 2011 4:18 am
by OneofMany
heh, i feel flattered :) but you only have 2 pro's in here, and im not one of it :) just a starter that likes to code a bit.
But, i allready have such thing in my wishlist. if not possible to code then i will make 3 different ways to ks.

Re: Allmost foolproof KS run

Posted: Fri May 13, 2011 4:19 am
by OneofMany
Giram wrote:WAYPOINT_DEVIATION: A 'random' offset applied to each waypoint in your path giving it less of a bot-like appearance; suggested value of 50. Lower value means you stick closer to your normal path; 0 means no deviation.

Or do 2 or more paths to ks and change those every time. So after first one we change variable to 2 and it would select another waypoint. After last it will go back to one.
Exactly what i mean :)

Re: Allmost foolproof KS run

Posted: Fri May 13, 2011 7:43 am
by OneofMany
Okay, what i got is:

Code: Select all

	<onLoad>
	StopAtBoss = 0
	repeat
	cprintf(cli.lightgreen,"\n   Kalin Shrine script\n")
	print("Type number before witch boss you want to stop farm KS")
	print("		1. Iron Rune Warrior")
	print("		2. Yusalien")
	print("		3. Locatha")
	print("		4. Harp")
	print("		5. Full run")
	print("		6. Quit")
	print("\n StopAtBoss>")
	StopAtBoss = io.stdin:read()

	until StopAtBoss > 0
	</onLoad>
Now when i run the script i get the following error:
Error comes when i choose a number. Then it wants to open for example 1.lua??
MicroMacro error.jpg
i am forgetting something, but what?

Re: Allmost foolproof KS run

Posted: Fri May 13, 2011 8:56 am
by rock5
"attempt to compare number with string" that says it all. The number being returned from io.read is a string so "until StopAtBoss > 0" doesn't work. Try

Code: Select all

    StopAtBoss == tonumber(StopAtBoss)
until StopAtBoss and StopAtBoss > 0

Re: Allmost foolproof KS run

Posted: Fri May 13, 2011 9:23 am
by OneofMany
I got the point of the string. Was hoping i could make the io.stdin:read() another type, to let it accept numbers. ill try ur code. looks good.

Re: Allmost foolproof KS run

Posted: Sat May 14, 2011 12:31 am
by lisa
What I do for this is have the asking for userinput a function and after the user input have it check for the value you want, 1-6 and if not any of those numbers then do the function again. if user input is 1-6 then continue.
You won't get any errors that way.

Just to point out from the image, it errored out when you input 1 because of the calculations but the bit after is because you entered 1 again and it tried to run a script 1.lua

Re: Allmost foolproof KS run

Posted: Sat May 14, 2011 1:29 pm
by xrozhija
which addon can do the auto accept invite?

Re: Allmost foolproof KS run

Posted: Sat May 14, 2011 4:15 pm
by Merlin
The simplest way is if you have xBar to use the implemented command.... the main problem is I dont remember it... others may be more helpful if not search Google for it.

Edit:

I got it:
Giram wrote:Here is invitebyfriend addon if someone wants to try this. ComeOneIn works as well too for invites.

Usage for this addon is /ibf status | friend | guild | custom | all | debug
and maybe something else. It will print commands when you start client or use /ibf status and shows if auto accepts are deactivated or activated.

For friend it will accept if char is in friend list, guild will accept all guildies, for custom i don't know what it does and all accepts all.
The entire post ist there: http://www.solarstrike.net/phpBB3/viewt ... end#p20048

Re: Allmost foolproof KS run

Posted: Sat May 14, 2011 5:49 pm
by OneofMany
I use http://www.deathwing.us/tmp/acceptInvite.zip

It works great with the 3.0.3. fix addon installed too.

type /ai and its on.

Re: Allmost foolproof KS run

Posted: Sat May 14, 2011 7:51 pm
by rock5
I use invitedbyfriend but to use the Training Certificates I had to change line 64 of InvitedByFriend from

Code: Select all

	invitepopup = StaticPopup_Visible("PARTY_INVITE")
to

Code: Select all

	invitepopup = StaticPopup_Visible("PARTY_INVITE") or StaticPopup_Visible("HONOR_PARTY_INVITE")