Page 2 of 21

Re: Malatina's survival

Posted: Wed Nov 09, 2011 10:15 am
by Sithlord512589
Hello Folks,first of all my deepest thanks for all you´re work. *Bowing deeply*

I have a prob.

I use the german client, but the bot won´t attack the "Bizarre Maschine" and all further step leading to a fail because i got flashed all the time.

So any suggestion, what i´ve been doing wrong?

Of course i renamed the guardianrockspirit = "Wachender Felsgeist" but the guardians won´t even appear with the described fault.

Thanks in advance for any enlightment may follow

I used the V2.3 from lisa till now

So i tried with full success rock5 version with my Rouge LVL60 on a german client and got 3 min left after opening the last tile.

And again my deepest thanx for your perfect work :-)))

Re: Malatina's survival

Posted: Wed Nov 09, 2011 11:20 am
by rock5
rock5 wrote:"getExecutionPath()" is returning the wrong path but I don't know enough about it to know how to fix it .
I found a solution. Fixed it by adding this to the top of the onload file for those of you who are interested.

Code: Select all

setExecutionPath(getExecutionPath().."/..")
I'll release my next version in a few minutes.

Re: Malatina's survival

Posted: Wed Nov 09, 2011 11:47 am
by rock5
Ok. So I'm releasing another version. Gave me a lot of trouble today, especially the relogging options, but it ran smoothly with the last 4 characters. That's 2 mages with purg, a scout and a low level low geared rogue. All finished correctly and as expected. Even got my best time. 3:53 left on th clock with my primary mage. :) . I even managed to get my "charlist" option to work properly.

This definately needs a lot more testing but I thought I'd release it now so you guys can play with it until tomorrow when I can do some more testing.

How it runs:
  • It will go round and round until it has cleared all trash mobs. Melee characters will visits each tile and kill the nearest mob. Ranged and AOE will visit 2 tiles per side and kill the nearest 3 mobs. It will then visit each tile. It will kill spawned mobs and loot chests as they appear. At the end it does 1 last check for any unopened chests. If you die, run out of time or finish, it will end or relog as per your settings.
Things to know:
  • I've split the file into 2 parts. Both files go into the "waypoints" folder. This is just for convenience in debugging. The onload section was getting way too big. To run, you still run the waypoint file "survivalR5".
  • As well as the other 3 options for "When_Finished", you can also use "charlist". This will log in the next character in the list specified in the "CharList" table. This requires my userfunction "userfunction_LoginNextChar". For how to define the "CharList" option, check out the topic or the top of the userfunction.
  • If you want to use an AOE skill to clear the initial trash then it needs to be the first in you attack skills, the one with the highest priority. It will be disabled once youve cleared the initial trash. Note: if you have more than 1 aoe then it will only disable the first one.
  • Also AOEs need to be listed at the top of the 'survivalR5' file to be used as intended. If you want to use an AOE that is not listed, then add it to the list. Note: I don't think all AOE will be suitable in this script. If anyone wants me to add (or remove) an AOE skill from the list, let me know
  • There is a bug when creating the initial table of tiles. Sometimes it gets messed up and there is a duplicate in the table. I've fixed this by having it just keep trying until it works. So you might see some messages saying there are duplicates repeating many times. This usually only last about 3-5 seconds until it works. Then it will continue.
  • Because the list of skills used is so important for you to be successful with this script, this script also loads the correct profile for your character if you change character.
  • I don't think there are any language specific strings left so it should work in any language.

Re: Malatina's survival

Posted: Wed Nov 09, 2011 12:19 pm
by Administrator
rock5 wrote:
rock5 wrote:"getExecutionPath()" is returning the wrong path but I don't know enough about it to know how to fix it .
I found a solution. Fixed it by adding this to the top of the onload file for those of you who are interested.

Code: Select all

setExecutionPath(getExecutionPath().."/..")
I'll release my next version in a few minutes.
That would work, yeah, but it also invalidates the execution path. The execution path is supposed to give the path to the currently executing script (assuming it was included; dofile won't set the path), not the path of the first script executed. You could just do this:

Code: Select all

include("../waypoints/survivalR5onload.lua",true)

Re: Malatina's survival

Posted: Wed Nov 09, 2011 1:02 pm
by rock5
I saw reference to 'dofile' but didn't know how to use it.

I'm not sure about that example. If

Code: Select all

include("waypoints/survivalR5onload.lua",true)
finds the file and runs it, wouldn't your example go to the wrong folder?

The problem is when settings.load() runs. Maybe I should set the path back to the 'rom' folder before doing that?

Re: Malatina's survival

Posted: Wed Nov 09, 2011 2:12 pm
by BillDoorNZ
Nice work Rock (as always).

I posted a change to lisa's 2.3 version a few posts back as a work in progress. It has a number of issues that I need to resolve, however I like what you have done with your version. I'll re-read your code again to get a better understanding of it, but it seems to me that the stuff I am working on would compliment your strategy.

I was looking at primarily the initial clearing of the Bizarre Mechanisms but that requires the range/size of the AOE skills to be known. Basically all it was doing was cycling through a list of skills, looking at the AOE of the skill (1 for single target attack skills, 3 for something like Whirlwind shield - so the value is the number of tiles/mechanisms that are affected/hit). Using this info, it would teleport further along the orderlist, skipping mechanisms that would be caught in the AOE anyway, resulting in a much faster clearing of the mechanisms as it doesn't have to teleport to each mechanism.

I suspect that something similar would work for clearing the guardian spirits too, but because they move it makes it more error-prone and would need to have a final check to make sure they were all dead anyway.

From what I can see, there is an issue with what we are trying to do with the bot as the bot is designed to use a 'profile' to allow the user to specify their attack skills/sequences etc to generically bot areas, but waypoint files like survival etc are incompatible with that strategy and require more specific configuration (which skills to use, when to use them) which is different from normal botting operations. One solution is to do what you are doing and start checking for appropriate skills (AOE's etc) and selectively enabling/disabling them, but this ends up conflicting with priorities etc too (as you mention). The only other alternative I can see at the moment, is to get users to setup multiple profiles for their characters for the different scenarios (which is what I currently do) but is a lot more work for the less confident users. Just throwing this out there really as I don't see an easy fix for it atm.

Re: Malatina's survival

Posted: Wed Nov 09, 2011 5:01 pm
by Administrator
rock5 wrote:I saw reference to 'dofile' but didn't know how to use it.

I'm not sure about that example. If

Code: Select all

include("waypoints/survivalR5onload.lua",true)
finds the file and runs it, wouldn't your example go to the wrong folder?

The problem is when settings.load() runs. Maybe I should set the path back to the 'rom' folder before doing that?
Nevermind, then. I misunderstood the problem. I thought you were getting issues having it include the waypoint file.

Re: Malatina's survival

Posted: Wed Nov 09, 2011 10:31 pm
by rock5
@BillDoorNZ.

I'm not 100% sure I follow what you are trying to do but I'm quite happy with how mine uses purg to clear the trash. Visiting 2 tiles per side is plenty efficient for me. My high geared mage cleared all the trash mobs in about 40s.

If there are particular AOE skills that you are trying to use and they are not working well, let me know which they are and why they aren't working and maybe I can include something to help them work.

I have been thinking about something. Except for scripts like KS, most users wouldn't use AOE skills in regular botting. I was thinking maybe they could add the AOE skill, with high priority, but set AutoUse to false so it doesn't get used. The survival script could then change the autouse to true to use it and false to switch it of again. At the moment it just switches it off when doing the tiles.

Re: Malatina's survival

Posted: Wed Nov 09, 2011 11:34 pm
by lisa
rock5 wrote:I have been thinking about something. Except for scripts like KS, most users wouldn't use AOE skills in regular botting. I was thinking maybe they could add the AOE skill, with high priority, but set AutoUse to false so it doesn't get used. The survival script could then change the autouse to true to use it and false to switch it of again. At the moment it just switches it off when doing the tiles.
Yeah that's what I do with my mage and purg, have it in profile but set autouse to false =)

Re: Malatina's survival

Posted: Wed Nov 09, 2011 11:59 pm
by rock5
lisa wrote:Yeah that's what I do with my mage and purg, have it in profile but set autouse to false =)
Ok so I'll set it so when it finds the AOE it sets the autouse to true.

Another thing I've been thinking of, what if people don't want to make it first in list? Maybe I should search through all skills for AOE skill. If found then make sure to use it first when attacking the trash. What do you think?

Re: Malatina's survival

Posted: Thu Nov 10, 2011 3:56 am
by Jellenser
hello

i tryed to test the new version from r5 and get always this erro msg

Re: Malatina's survival

Posted: Thu Nov 10, 2011 5:08 am
by rock5
Sorry, I added that link on line 11 without testing it. I never expected it would interprete something on that line as part of a token. Just delete line 11 for now. I'll change it on my next release.

Re: Malatina's survival

Posted: Thu Nov 10, 2011 5:19 am
by rock5
rock5 wrote:Another thing I've been thinking of, what if people don't want to make it first in list? Maybe I should search through all skills for AOE skill. If found then make sure to use it first when attacking the trash.
Or is that too much of a presumption on my part?

Re: Malatina's survival

Posted: Thu Nov 10, 2011 2:10 pm
by BillDoorNZ
Personally I'd suggest a new section for it - perhaps similar to the way that the <skills_priest> sections work. So a <skills_COT> for instance.

That way we can customise which skills to use in different instances even ;)

The stuff I was referring to was in the files I posted a while back based of lisas 2.5 waypoint. It works ok, but takes me a while to test as I only have 1 50+ character. The idea is that you tell it how many tiles will be hit with each AOE skill you list (so, for instance, Whirlwind Shield has a value of 3, as it hits the bizarre mech by the character + 2 more on each side - so its more of a radius value of the AOE circle). Then it teleports you around the circle using the skills that are listed. For example:

Given the usual numbering system:

Code: Select all

--=== Table numbering system ===--
	1 7 13 19 25 31
	2 8 14 20 26 32
	3 9 15 21 27 33
	4 10 16 22 28 34
	5 11 17 23 29 35
	6 12 18 24 30 36
* -- entrance to room.
My code has a list of AOE skills and their radius + cooldowns (cant use normal skill cooldowns as I'm using an item-set FULL MOON CLEAVE):

Code: Select all

local orderlist = {6,12,18,24,30,36,35,34,33,32,31,25,19,13,7,1,2,3,4,5}
local attackSkills = {"KNIGHT_WHIRLWIND_SHIELD", "ALL_FULL_MOON_CLEAVE", "KNIGHT_DISARMAMENT"}
local attackAOE = {3, 3, 1}
local attackCooldown = {6,20,0}
local lastUsedTime = {os.time(), os.time(), os.time()}
local listsize = #orderlist
So the bot will:
1) run into the room, look at the orderlist and start at position 0 -> no tile as yet.
2) find the first available attackSkill --> KNIGHT_WHIRLWIND_SHIELD
3) read the radius of the attack : attackAOE --> 3 for index 1
4) add the attackAOE onto the current orderlist position (was 0, is now 0+3 = > 3 -> tile #18)
5) teleport to #18 and cast the attack skill
6) find the first available attackSkill --> ALL_FULL_MOON_CLEAVE as KNIGHT_WHIRLWIND_SHIELD is on cooldown
3) read the radius of the attack : attackAOE --> 3 for index 2
4) add the attackAOE onto the current orderlist position (was 3, is now 3+3 = > 6 -> tile #36)
5) teleport to #36 and cast the attack skill
and so on

This way it maximises efficiency and speed as it doesn't have to wait for cooldowns (notice that attackSkill[3] is a random basic melee attack that takes no time and will be used while other stuff is cooling down). Very useful for those of us who's characters don't have insta-cast spells with next to 0 cooldown :)

Re: Malatina's survival

Posted: Thu Nov 10, 2011 8:44 pm
by lisa
I like the theory, skipping tiles you know you won't need to go to is a good idea, using different skills in conjunction is againa good idea.

Issue I see is that it only works for that 1 character, so to work for all characters would need to combine rock's code with getting the skills and also need to include a radius to the skills.

If you can manage that I think it will work very nicely.

Re: Malatina's survival

Posted: Thu Nov 10, 2011 10:14 pm
by rock5
I think I understand now. I don't think it's practical because you would have to maintain a big database of skills and their range or users would have to set it up for all their characters. And frankly I think the extra speed would be minimal. I've set up my version so that when using aoe, the 2 on either side are within range. So if it teleports and it's aoe is on cooldown then it should use it's other skills. For instance, my low level mage has only discharge. It starts with discharge then finishes them of with other skills. Unfortunately it's not powerful enough to one hit them. :(

Re: Malatina's survival

Posted: Fri Nov 11, 2011 12:47 am
by Atlas123
Removed line 11 - Works a treat!!!!!! thank you so much again!

Re: Malatina's survival

Posted: Sat Nov 12, 2011 11:11 am
by rock5
Here's my next version. I've done alot to it.

Here is a list of whay I can remember:
  • Added dealing with death. Now it handles it and even makes it's way back from the res point if it revives there.
  • Added checks before entering. Now checks if your inventory is getting full, if you have enough Coins and if your about to reach the maximum number of Shells.
  • Can now handle if you get an award when speaking to Malatina after first time you succeed.
  • Now it doesn't matter where in your skill list your AOE is, the script will find it, give it the highest priority and set it's AutoUse to true. So you can set your AutoUse for your AOE to false if you don't want to use it with regular botting.
  • Should loot Frantic Cliff Demons. That's 1 bit of code I wasn't able to test.
  • Saves a log. Here is an example.

Code: Select all

Account: acc1	Name: char1       	Date: 11/13/11 00:10:34 	Shells gained/total: 30/970	Succeeded at Survival with 2:15 remaining.
Account: acc1	Name: char2     	Date: 11/13/11 00:57:20 	Shells gained/total: 0/0	Succeeded at Survival with 0:29 remaining.
Account: acc1	Name: char3      	Date: 11/13/11 01:08:29 	Shells gained/total: 0/0	Not enough Phirius Token Coins.
Account: acc1	Name: char4    	Date: 11/13/11 01:34:47 	Shells gained/total: 0/0	Player died.
Account: acc2	Name: char1     	Date: 11/13/11 02:21:50 	Shells gained/total: 0/0	Ran out of time.
Ok, that's about it. I can't see what else I can do to improve it besides fixing bugs that might arise.

I'll see about adding some of these improved ideas to cot_tele and releasing that. And maybe another file to automate doing both the cot and survival scripts together.

Re: Malatina's survival

Posted: Sun Nov 13, 2011 5:01 am
by Jellenser
ok after testing with some chars here my report:

all at all it works better now ..no chest left .. works fast.

only courius thing is .. when the char is digging and gets attacked by a mob it stop digging.. but its still possible to cast when its digging. no need to stop

now some question i have witch is for sure personal problem not from the script.

1. if i make survival with mage it only use the fireball skill (2 seks cd) .. why not use a AOE? or what i must do ?

Re: Malatina's survival

Posted: Sun Nov 13, 2011 5:49 am
by rock5
Jellenser wrote:only courius thing is .. when the char is digging and gets attacked by a mob it stop digging.. but its still possible to cast when its digging. no need to stop
While it's casting it does nothing. If it stops casting then attacks a mob, it could only attack the mob because you stopped casting. Maybe you stopped casting because you were interrupted by the mob? Anyway this is usually not an issue as there should be no live mobs when you dig a tile (usually).
Jellenser wrote:1. if i make survival with mage it only use the fireball skill (2 seks cd) .. why not use a AOE? or what i must do ?
I don't think I can serve your specific need and keep the file as general purpose as it is now. I have one of my lower level mages easily complete it with just fireball and plasma arrow. When fighting one on one do you only use Flame? Why not use any other instants you have like Lightning or Earth Surge. As a M/Wd you have lots of instant cast skills you could cycle through.

If you want to use AOE anyway, you would have to stop the script from disabling the AOE after clearing the initial trash. At the beginning of "breaktiles()" around line 290 of "survivalR5onload.lua" you will find

Code: Select all

	if aoefound then
		aoeskill.AutoUse = false
	end
Just comment it out or delete it.