Page 1 of 21
Malatina's survival
Posted: Sun Nov 06, 2011 10:36 pm
by rock5
Malatina Survival Game
Thanks to all who contributed, especially Lisa who started this thread.
Description
- This script can complete Malatina's Survival mini game. I've found it to be extreamly reliable in completing with any class as long as they are mediumly geared. It uses AOE skills to clear the initial trash mobs if available but I've only ever used Purgatory Fire. With other classes I only use one on one attack skills. It has relog features similar to the "cot_tele" script that allows you to relog the next character or next in a list of characters or load a different waypoint file.
Requirements
- Swim hack userfunction
http://www.solarstrike.net/phpBB3/viewt ... 410#p24410
- Teleport userfunction
http://www.solarstrike.net/phpBB3/viewt ... 951#p23951
- If you use one of the relog options you'll need "fastlogin"
http://www.solarstrike.net/phpBB3/viewtopic.php?p=10350
- If you use the "charlist" option you'll need the "LoginNextChar" userfunction also found at the above link.
- If you want to use an AOE spell then it needs to be added to the character profile. It doesn't matter what priority you give it, it will be used first when clearing the initial trash mobs. You can even set 'autouse="false"' if you don't want it to interfere with your regular botting. This script will enable the AOE skill to clear the initial Trash mobs then disable it for attacking the other spawned mobs.
- If you use regular one on one skills to kill the initial trash then, as a rule of thumb, you need to kill each mob in 2 seconds and complete clearing all the trash mobs with at least 7:30 left on the clock. Then you should have no problem finishing on time.
Installation and Setup
- Put the 2 userfunctions into the "rom/userfunctions" folder.
- Put "SurvivalR5.xml" and "SurvivalR5Onload.lua" into the "rom/waypoints" folder.
- Check and set the settings at the top of the "SurvivalR5.xml" file. Descriptions are included in the file.
Bonus files
- SurvivalNext - If you want to chain files one after another, eg. survival then cot then relog, you will need a separate file to do the relogging. That's where "survivalnext" comes in. It simply loads your next character and then loads "survivalr5" (default). It has similar relog options as cot_tele and survivalr5. To use it, for example, you could have survivalr5 set to load cot_tele and then have cot_tele set to load survivalnext. I personally use a much longer sequence of files.
Latest Files
- Requires game patch 6.0.0 or newer and bot revision 758 or newer.
- survivalR5.xml
- Version 2.74 - A few tweaks that might improve reliability and stability.
- (7.48 KiB) Downloaded 710 times
Older files
Bonus files
Re: Malatina's survival
Posted: Mon Nov 07, 2011 2:50 am
by Jellenser
ok i tested both wp .. lisa and r5
lisa:
-i think its faster on start make the round and killing the mobs at beginnig then the version from r5
and some times when it goes to open all chests sometimes it miss one chest
r5:
the pause between it teleport from point topoint at start to kill the mobs is too long
+ i personaly think you make the better and faster solution to open the chest directly when it comes up..
i need about 2 mins to kill all mobs at start.. is it possible to make this shorter?
i tested it now with a Priest/scout but booth version dont press iceblade (witch is instand an main dmg skill).. it alwas make 1-2 seconds pause
thats all i find out atm.. and i hope u understand it .. my english is bad i know :/
Re: Malatina's survival
Posted: Mon Nov 07, 2011 4:01 am
by rock5
Lisa has been saying mine is faster doing the trash. The skill it uses is usually the first in your skill list. Either change the order of your skills or set AllowSkillCastTime to a shorter value like 1 so it doesn't use the skills with 2s cast time.
I just tested it with fireball and flame. I still managed to finish it with seconds to spare even though it mainly used flame which has a 3 second cast time.
With my version it's vital that you check your skills and make sure the skills you want to use are at the top of the list. Especially the first skill as that one will be used the most.
Re: Malatina's survival
Posted: Mon Nov 07, 2011 4:37 am
by lisa
Jellenser wrote:i tested it now with a Priest/scout but booth version dont press iceblade
Hmm ice blade works fine for me, make sure you have your profile setup to use it
Code: Select all
<skill name="PRIEST_ICE_BLADE" hotkey="MACRO" priority="80" />
And like rock said put it near the top of your priest skills.
my skills look like this
Code: Select all
<skill name="PRIEST_SOUL_SOURCE" hotkey="MACRO" priority="110" inbattle="true" hpper="30" />
<skill name="PRIEST_URGENT_HEAL" hotkey="MACRO" priority="100" hpper="85" />
<skill name="PRIEST_REGENERATE" hotkey="MACRO" priority="90" hpper="60" />
<skill name="PRIEST_ICE_BLADE" hotkey="MACRO" priority="80" />
<skill name="PRIEST_GRACE_OF_LIFE" hotkey="MACRO" priority="20" rebuffcut="60" inbattle="false" />
<skill name="PRIEST_WAVE_ARMOR" hotkey="MACRO" priority="40" inbattle="true" />
<skill name="PRIEST_AMPLIFIED_ATTACK" hotkey="MACRO" priority="20" rebuffcut="60" inbattle="false" />
<skill name="PRIEST_HOLY_AURA" hotkey="MACRO" priority="100" inbattle="true" hpper="24" />
<skill name="PRIEST_MAGIC_BARRIER" hotkey="MACRO" priority="20" rebuffcut="60" inbattle="false" />
<skill name="PRIEST_HEALING_SALVE" hotkey="MACRO" priority="95" />
<skill name="PRIEST_EMBRACE_OF_THE_WATER_SPIRIT" hotkey="MACRO" priority="95" inbattle="false" />
Re: Malatina's survival
Posted: Mon Nov 07, 2011 7:01 am
by rock5
I just had an idea. Maybe it's having problems with the corner trash because it's teleporting through the tile. I remember when I was testing the teleport function a while ago that it would fail to teleport if there was something between start and end point of the teleport. I'll try to make it go around the corner and see if that helps.
Re: Malatina's survival
Posted: Mon Nov 07, 2011 8:02 am
by cokebot
Language changes: German
Guardian Rock Spirit: Wachender Felsgeist
Brown Wooden Chest: Braune Holztruhe (not needed since v2.3)
Re: Malatina's survival
Posted: Mon Nov 07, 2011 8:15 am
by lisa
cokebot wrote:Guardian Rock Spirit: Wachender Felsgeist
Test using this
Code: Select all
guardianrockspirit = GetIdName(101269)
I always meant to test it, I even had it as next line just commented out, without the Id. I just never got round to testing it myself.
Re: Malatina's survival
Posted: Mon Nov 07, 2011 4:46 pm
by Tooney
Lvl 53 mage with fireball, lightning & flame. Worked great for me, first time I've ever completed it even with AOE. Thanks all for the contributions.
Re: Malatina's survival
Posted: Tue Nov 08, 2011 2:48 am
by rock5
I just saw something interresting in a youtube video just now. A guy was looting the bodies while digging up the tiles. Hm... still might not be worth the effort to program.
http://www.youtube.com/watch?v=s2g5837eSRU
Re: Malatina's survival
Posted: Tue Nov 08, 2011 3:18 am
by lisa
Yeah I never bother to loot the bodies even if I have 5 mins left on timer, I loot the frantic just in case by some weird miracle it has a monster card, I don't think there is a monster card for it though.
Re: Malatina's survival
Posted: Tue Nov 08, 2011 6:50 am
by rock5
I'm currently working on a aoe option that assumes that if you want to use an aoe to clear the trash then you would have it set as your first attack skill. So it checks the first attack skill again a list of aoe skills. Here is the list I'm using. Are there any others I should add?
Code: Select all
local aoeskills = {
"MAGE_PURGATORY_FIRE",
"MAGE_DISCHARGE",
"WARRIOR_BLASTING_CYCLONE",
"WARRIOR_MOON_CLEAVE",
"WARRIOR_WHIRLWIND",
"KNIGHT_WHIRLWIND_SHIELD",
}
Re: Malatina's survival
Posted: Tue Nov 08, 2011 6:59 am
by Nero
@rock5
Digging the tile seems to have the same rules that playing instruments - you can use potions in that time, loot mobs, or even cast instant spells (sometimes when doing manually and had little time, I've used discharge and purg to kill spawned mobs, while digging up next tile already).
Still, I don't think it's worth it - all that trash is just filling up your space in your bag, and you get, what, 20k gold from each run?
Re: Malatina's survival
Posted: Tue Nov 08, 2011 7:14 am
by rock5
The idea of attacking mobs while digging sounds good but if you can only use instant spells then it's too limiting.
Re: Malatina's survival
Posted: Tue Nov 08, 2011 8:08 am
by smokyru
With my priest, I can start digging, and start casting Rising Tide while digging. The spell will one-shot a mob, and few ms after the spell has hit, the tile "opens up". I use it all the time, it's very convenient, and I've been thinking how to improve the speed of 1st malatina bot with the priest (which fails sometimes with 2-3 remaining tiles.)
On a rogue, everything is working great.
Re: Malatina's survival
Posted: Tue Nov 08, 2011 8:15 am
by rock5
I've run out of characters to test with today but my current version is looking good.
I should be releasing it tomorrow after some more testing.
Re: Malatina's survival
Posted: Tue Nov 08, 2011 9:40 am
by rock5
I've been thinking about the relog option. Survival isn't like cot in which any profile will do. Survival needs the right skills you've set up in your profile. I was thinking maybe when it relogs, it looks for a profile with the same name as the newly loaded character and if it exists, then load it.
Re: Malatina's survival
Posted: Tue Nov 08, 2011 3:04 pm
by BillDoorNZ
I've been fiddling with the Survival script a bit to make it a bit more generic and handle multiple attacks and /or AOE attacks to speed up the initial trash/spawn clearing. It works for me in that all attacks (and AOE's) one-shot the mobs so the logic for clearing the 'faces' is the same as for clearing the guardians.
The system works by maintaining a list of attack options (e.g. Whirlwind Shield, Full Moon Cleave, Disarmament), keeping track of their cooldowns and their AOE. It uses the AOE value (which is specified in the tile radius - i.e. the number of tiles that will be hit (in 1 direction) when the skill is used). This set of skills has to be maintained by the bot user at the moment.
The bot will start at the closest corner as per the current bot and then:
- 1. Find the first usable attack
- 2. Using the AOE, work out which tile to move to so that the current tile will also be hit
- 3.Execute the attack and update its cooldown
- 4. Rinse and repeat until all 'faces' are dead and then begin again on the guardians
Basically, I've added/edited the following variables:
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()}
and added a couple of functions to track the attacks:
Code: Select all
--returns the details of the first available attack skill
function getAvailableAttack()
local skillCount = #attackSkills;
local count = 0;
repeat
count = count + 1;
until ((count > skillCount) or (os.time() > (lastUsedTime[count] + attackCooldown[count])));
if (count > skillCount) then return nil, nil; end;
return count, attackAOE[count];
end
function useAttack(idx)
player:cast(attackSkills[idx]);
lastUsedTime[idx] = os.time();
end
and finally extended the existing clearing functions to use these.
Code: Select all
--=== First mobs to kill ===--
function trashmelee()
local attackIndex, attackAOE = getAvailableAttack();
local i = attackAOE or 1;
repeat
local tile = tiles[orderlist[i]]
teleport(GetAttackPosition(tile.X,tile.Z))
yrest(500)
local trash = player:findNearestNameOrId(101489)
if trash then
local distance = distance(player.X, player.Z, trash.X, trash.Z)
if (attackdistance * 2) > distance then
player:target(trash)
if (attackIndex) then
useAttack(attackIndex);
else
player:fight();
end;
yrest(500)
player:clearTarget();
end
i = i + attackAOE-1;
attackIndex, attackAOE = getAvailableAttack();
attackAOE = attackAOE or 1;
i = i + attackAOE;
else
i = i + 1;
end
until (i >= listsize)
spawnsmelee()
end
--=== Kill spawns melee ===--
function spawnsmelee()
local attackIndex, attackAOE = getAvailableAttack();
local i = attackAOE or 1;
repeat
local tile = tiles[orderlist[i]]
teleport(GetAttackPosition(tile.X,tile.Z))
yrest(500);
local spawn = player:findNearestNameOrId(guardianrockspirit)
yrest(500)
if spawn then
local distance = distance(player.X, player.Z, spawn.X, spawn.Z)
player:target(spawn)
if (attackIndex) then
useAttack(attackIndex);
else
player:fight();
end;
i = i + attackAOE-1;
attackIndex, attackAOE = getAvailableAttack();
attackAOE = attackAOE or 1;
i = i + attackAOE;
else
printf("Something wrong, name incorrect.\n")
end
if player.Battling then
local _enemy = player:findEnemy(true,nil)
if _enemy then
player:target(_enemy.Address);
player:fight()
end
end
until (i >= listsize)
breaktiles()
end
I'm sure there is probably a better way to handle the cooldowns (i.e. RoMScript("GetSkillCooldown(1,4);"), but I couldn't figure out how to track the cooldown for item-set skills - namely FULL MOON CLEAVE. I should also be reading the cooldown value from the skill itself I suppose, but I was in a hurry when I wrote this
Re: Malatina's survival
Posted: Tue Nov 08, 2011 4:53 pm
by MinMax
The last two day the surv worked great, but today i am a littlebit confused.
Today i tried it 3 times (with a mage a scout and a rouge )and every time the bot had overseen a chest , went to waypoint nr. 1 and left the instance(The bot didnĀ“t stop).
The case of the forgotten chest is the attack of a tile-mob under looting the chest. After the attack the chest were not looted again.
PS i had the survivalR5
Re: Malatina's survival
Posted: Tue Nov 08, 2011 9:17 pm
by rock5
Yeh it's not perfect. The version I'll release later today should be a lot better (hopefully).
Re: Malatina's survival
Posted: Wed Nov 09, 2011 9:17 am
by rock5
Sorry, it's taking longer than I thought to release my next version. Maybe tomorrow.
I'm currently getting an error I don't know enough to understand.
Code: Select all
1:1am - scripts\mac/bot.lua:445: onLoad error: [string "..."]:19: Cannot open file 'C:/Program Files (x86)/micromacro/scripts/mac/waypoints/settings.xml' for reading.
This is what I have.
In the onload section I have
Code: Select all
include("waypoints/survivalR5onload.lua",true)
I have all the onload code there.
On line '19' there is
I suspect the problem is the first line of settings.load which is
Code: Select all
local filename = getExecutionPath() .. "/settings.xml";
"getExecutionPath()" is returning the wrong path but I don't know enough about it to know how to fix it .
Can anyone help?