Re: Malatina's survival
Posted: Thu Dec 05, 2013 7:09 pm
Haven't crashed in quite a while now. Seems those extra checks have worked, thanks R5.
Code: Select all
When_Finished = "cotmini"
-- "end" to end script, "relog" to log next character and "waypointfilename" to load that waypointfile.
Code: Select all
Moving to waypoint #1, (4081, 3340)
Moving to waypoint #2, (4081, 3499)
Moving to waypoint #3, (4081, 3600)
Swimhack ACTIVATED!
Player Teleported to X: 4081 Z: 3586 Y: 75
Player Teleported to X: 4013 Z: 3741 Y: 75
Player Teleported to X: 4014 Z: 3741 Y: 57
We found Treasure Key and will harvest it.
Player Teleported to X: 4014 Z: 3741 Y: 75
Player Teleported to X: 4013 Z: 3879 Y: 75
Player Teleported to X: 4014 Z: 3879 Y: 57
We found Treasure Key and will harvest it.
Player Teleported to X: 4014 Z: 3879 Y: 75
Player Teleported to X: 4013 Z: 3948 Y: 75
Player Teleported to X: 4014 Z: 3948 Y: 57
Player Teleported to X: 4014 Z: 3948 Y: 75
Player Teleported to X: 4213 Z: 3810 Y: 75
Player Teleported to X: 4214 Z: 3810 Y: 57
We found Treasure Key and will harvest it.
Player Teleported to X: 4214 Z: 3810 Y: 75
Player Teleported to X: 4080 Z: 3948 Y: 75
Player Teleported to X: 4080 Z: 3974 Y: 30
Distance checked and continuing.
Swimhack DEactivated.
Moving to waypoint #1, (4081, 3340)
The game client did not crash.
1:41pm - [string "..."]:65: attempt to call field 'mod' (a nil value)
AL lib: FreeContext: (01F3CAA8) Deleting 1 Source(s)
Please enter the script name to run.
Type in 'exit' (without quotes) to exit.
Script>
Code: Select all
"macrofix.lua local a,b,c,d=math.mod(int.256)."
"macrofix.lua math.mod(int.65536)/256)."
"macrofix.lua math.mod(int.16777216)/65536."
item.lua local quality,tier=math.modf(plusQuality/16)
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onLoad>
--=== Rock5's version ===--
--=== R5Version 2.74 ===--
--=== User Options ===--
When_Finished = "Lyliya"
-- "end" to end script, "relog" to log next character, "charlist" to log next in 'charlist' and "waypointfilename" to load that waypointfile.
Too_Many_Shells = "pause"
-- "pause" to wait for user to use some shells, "skip" to skip the game or "continue" to play the game anyway.
Bag_Space_Limit = 20
-- If bag space is less than this value then the 'Not_Enough_Bag_Space' action is triggered.
Not_Enough_Bag_Space = "pause"
-- "pause" to wait for user to clear some bag space, "skip" to skip the game or "continue" to play the game anyway.
CharList = {}
-- Character list to use when using the "charlist" option above. Requires my "userfunction_LoginNextChar" userfunction.
-- Find it here. http://www.solarstrike.net/phpBB3/viewtopic.php?p=10350
-- eg.
-- CharList = {
-- {account=4,chars={}},
-- {account=8,chars={1}},
-- {account=7,chars={1,2,5}},
-- }
AllowSkillCastTime = 2
-- Ignore skills with cast times longer than this value when attacking the 'trash' mobs at the beginning.
--====================--
aoeskills = {
"MAGE_PURGATORY_FIRE", -- Thunderstorm is better but this will be available first
"WARDEN_POWER_OF_THE_WOOD_SPIRIT", -- Best for warden since Frantic Briar changed
--"MAGE_DISCHARGE", -- Cooldown, not really viable.
--"WARRIOR_BLASTING_CYCLONE", -- Cooldown, not really viable.
--"WARRIOR_MOON_CLEAVE", -- Cooldown, not really viable.
--"WARRIOR_WHIRLWIND", -- Cooldown, not really viable.
--"KNIGHT_WHIRLWIND_SHIELD", -- Cooldown, not really viable.
"WARLOCK_WEAKENING_WEAVE_CURSE",
}
aoeskillsbig = {
--"WARDEN_FRANTIC_BRIAR", -- Cooldown, not really viable.
"MAGE_THUNDERSTORM", -- Best for mage.
"SCOUT_IGNITE", -- Best for scout/mage.
}
include("waypoints/"..getFilePath(__WPL.FileName).."/survivalR5onload.lua",true)
</onLoad>
<!-- In the survival game -->
<!-- # 1 --><waypoint x="2519" z="2593" y="9">
player:target_NPC(joker);
sendMacro("ChoiceOption(2);");
</waypoint>
<!-- # 2 --><waypoint x="2546" z="2681" y="9"> </waypoint>
<!-- # 3 --><waypoint x="2586" z="2789" y="9"> </waypoint>
<!-- # 4 --><waypoint x="2606" z="2843" y="9">
yrest(2000)
logentry = "Ran out of time" -- default
checkskills()
createTileTable() -- do it here as you can't see the pawns until you start the event.
local trash = player:findNearestNameOrId({bizarremechanism,guardianrockspirit},nil, function(addr) local pawn = CPawn(addr) return pawn.HP > 4 and (not pawn.Lootable) end) -- check for spawns
local tiles = player:findNearestNameOrId(treasuretile, nil, clicktile) -- check if any tiles need opening
if trash then -- add in options for aoe and ranged here
trashmelee() -- clears trash
elseif trash == nil and spawns == nil and tiles ~= nil then
breaktiles() -- start breaking tiles
elseif tiles == nil then
chests() -- open chests
end
if 1 > player.HP or not player.Alive then
RoMScript("UseSelfRevive();"); -- first try self revive
yrest(500);
RoMScript("BrithRevive();");
if waitForLoadingScreen(30) then
-- Give chance to run back from rez point.
yrest(5000)
__WPL:setWaypointIndex(__WPL:getNearestWaypoint(player.X, player.Z, player.Y))
return
end
else
waitForLoadingScreen(10)
end
loadPaths("Lyliya");
</waypoint>
<!-- Return from res point -->
<!-- # 1 --><waypoint x="2273" z="1801" y="53"> </waypoint>
<!-- # 2 --><waypoint x="2376" z="1697" y="33"> </waypoint>
<!-- # 3 --><waypoint x="2433" z="1618" y="19"> </waypoint>
<!-- # 4 --><waypoint x="2481" z="1524" y="0"> </waypoint>
<!-- # 5 --><waypoint x="2507" z="1432" y="-2"> </waypoint>
<!-- # 6 --><waypoint x="2535" z="1297" y="12"> </waypoint>
<!-- # 7 --><waypoint x="2582" z="1204" y="24"> </waypoint>
<!-- # 8 --><waypoint x="2674" z="1071" y="44"> </waypoint>
<!-- # 9 --><waypoint x="2762" z="970" y="53">
player:target_NPC("Lieve"); yrest(1000)
sendMacro("ChoiceOption(2);"); yrest(500)
sendMacro("ChoiceOption(2);");
waitForLoadingScreen(10)
</waypoint>
<!-- # 12 --><waypoint x="4765" z="-1955" y="115"> </waypoint>
<!-- # 13 --><waypoint x="4798" z="-1919" y="109"> </waypoint>
<!-- # 14 --><waypoint x="4857" z="-1914" y="109">
if logentry ~= nil then
player:sleep()
return
end
local Malatina = GetIdName(111813)
if 50 > player.Level and (player.Level2 >= 50 or player.Level3 >= 50) then
-- Wait for user to change class
cprintf(cli.yellow,"If you want to earn Phirius Shells, change to your 50+ class before continuing.\n")
player:sleep()
end
local shells, empty = getCurrency("shell")
if 30 > empty then
if Too_Many_Shells == "pause" then
-- Wait for user to use some shells.
cprintf(cli.yellow,"Reaching the maximum number of Phirius Shells ("..(shells+empty).."). Please spend some before continuing.\n")
player:sleep()
numshells = getCurrency("shell")
elseif Too_Many_Shells == "skip" then
print("Too many Phirius Shells.")
logentry = "Too many Phirius Shells."
player:sleep()
return
elseif Too_Many_Shells == "continue" then
-- Do nothing and continue.
else
error("Wrong value used for 'Too_Many_Shells' option.")
end
end
local empties = inventory:itemTotalCount(0)
local emptylimit = tonumber(Bag_Space_Limit) or 20
if emptylimit > empties then
if Not_Enough_Bag_Space == "pause" then
-- Wait for user to make some space in inventory.
cprintf(cli.yellow,"Not much space left in inventory. Are you sure you want to continue with only %d spaces left?\n",empties)
player:sleep()
elseif Not_Enough_Bag_Space == "skip" then
print("Not enough bag space.")
logentry = "Not enough bag space."
player:sleep()
return
elseif Not_Enough_Bag_Space == "continue" then
-- Do nothing and continue.
else
error("Wrong value used for 'Not_Enough_Bag_Space' option.")
end
end
if player.Class1 == CLASS_SCOUT and settings.profile.options.RELOAD_AMMUNITION == "arrow" then
local arrows = inventory:getAmmunitionCount()
local item
for slot = 1, 240 do
item = inventory.BagSlot[slot]
if item.Available and not item.Empty then
if item:isType("Arrows") then
arrows = arrows + item.ItemCount
elseif string.find(item.Name,"Quiver") then
arrows = arrows + 999
end
end;
end;
if 200 > arrows then
-- Wait for user to get more arrows
cprintf(cli.yellow,"Low on arrows. Only %d left?\n",arrows)
player:sleep()
end
end
if 30 > inventory:itemTotalCount(203038) then
print("Not enough Phirius Token Coins.")
logentry = "Not enough Phirius Token Coins."
player:sleep()
return
end
player:target_NPC(Malatina) yrest(1000)
if 2 > RoMScript("GetNumSpeakOption()") then -- try again
player:target_NPC(Malatina) yrest(1000)
end
sendMacro("ChoiceOption(1);");
yrest(2000)
if RoMScript("GetNumSpeakOption()") > 0 then -- enter game
sendMacro("ChoiceOption(1);");
if not waitForLoadingScreen(30) then
print("Failed to teleport into Survival")
logentry = "Failed to teleport into Survival."
player:sleep()
end
else
print("This character already did Survival.")
logentry = "Already did Survival."
player:sleep()
end
</waypoint>
</waypoints>
That's just a file you downloaded and is not part of MM or rombot. It wont run unless you run it specifically.kuripot wrote:found inside rom folder of MM
That explains nothing. You are getting "attempt to call field 'mod'" error. That can only happen if there is a math.mod somewhere being run but you did a search for it and didn't find it. I don't know what else to say. Unless you've added some code somewhere that loads the macrofix.lua. You could try doing a search in the scripts folder using FileSeek and search for macrofix and see if you have added a load for it somewhere.kuripot wrote:error begin in function checkrelog()
I'm not sure what's happening there. In the one-on-one fights Purg should be disabled. It should only use Flame.powerattack wrote:When I add flame to my profile it will use purgatory once and then finish the mob off with just staff attack.
Code: Select all
...
<skills_warrior>
<skill name="WARRIOR_BLASTING_CYCLONE" hotkey="MACRO" priority="70" />
<skill name="WARDEN_POWER_OF_THE_WOOD_SPIRIT" hotkey="MACRO" priority="100" />
</skills_warrior>
<skills_rogue>
<skill name="ROGUE_SHADOWSTAB" hotkey="MACRO" priority="100" />
<skill name="ROGUE_LOW_BLOW" hotkey="MACRO" priority="80" />
</skills_rogue>
<skills_knight>
<skill name="KNIGHT_WHIRLWIND_SHIELD" hotkey="MACRO" priority="100" />
<skill name="KNIGHT_HOLY_POWER_EXPLOSION" hotkey="MACRO" priority="100" />
<skill name="KNIGHT_FULL_MOON_CLEAVE" hotkey="MACRO" priority="100" />
<skill name="KNIGHT_PUNISHMENT" hotkey="MACRO" priority="100" />
</skills_knight>
<skills_warden>
<skill name="WARDEN_POWER_OF_THE_WOOD_SPIRIT" hotkey="MACRO" priority="100" />
<skill name="WARDEN_CHARGED_CHOP" hotkey="MACRO" priority="70" />
</skills_warden>
<skills_druid>
<skill name="DRUID_BLOSSOMING_LIFE" hotkey="MACRO" hpper="50"/>
<skill name="DRUID_SUMMON_SANDSTORM" hotkey="MACRO" priority="100" />
<skill name="DRUID_EARTH_PULSE" hotkey="MACRO" priority="100" />
<skill name="DRUID_ROCKSLIDE" hotkey="MACRO" priority="100" />
<skill name="DRUID_MOTHER_NATURES_WRATH" hotkey="MACRO" priority="100" />
<skill name="DRUID_CONCENTRATION_PRAYER" hotkey="MACRO" priority="100" />
</skills_druid>
<skills_mage>
<skill name="DRUID_RECOVER" hotkey="MACRO" hpper="60"/>
<skill name="DRUID_SAVAGE_BLESSING" hotkey="MACRO" priority="20" />
<skill name="DRUID_EARTH_PULSE" hotkey="MACRO" priority="100" />
<skill name="MAGE_FIREBALL" hotkey="MACRO" priority="120" />
<skill name="MAGE_FLAME" hotkey="MACRO" priority="110" />
<skill name="MAGE_ELEMENTAL_CATALYSIS" hotkey="MACRO" priority="20" />
<skill name="MAGE_THUNDERSTORM" hotkey="MACRO" priority="10" />
<skill name="MAGE_PURGATORY_FIRE" hotkey="MACRO" priority="10" />
</skills_mage>
...