Auto repair, and loading paths
Posted: Sat Feb 06, 2010 8:23 am
I might be missing a slight detail, tried a few things but can't get this exactly right.
<onDeath>
-- Additional Lua code to execute on death
-- pauseOnDeath(); -- Stop the script
-- player:logout(); -- logout
local dura = inventory:getMainHandDurability();
printf("Durability:%s\n", dura);
if( dura < 0.9 ) then
player.free_flag1 = true;
loadPaths("test");
end
</onDeath>
This part works fine, once it loads test.xml as below
(waypoints etc etc etc
loadPaths("main");
For some reason my loadpaths not working, tried a few dif combinations, i think i dont have the load paths just right, as at the end of the test.xml, it just repeats the same warpoints and won't load the main again
Quick help
<onDeath>
-- Additional Lua code to execute on death
-- pauseOnDeath(); -- Stop the script
-- player:logout(); -- logout
local dura = inventory:getMainHandDurability();
printf("Durability:%s\n", dura);
if( dura < 0.9 ) then
player.free_flag1 = true;
loadPaths("test");
end
</onDeath>
This part works fine, once it loads test.xml as below
(waypoints etc etc etc
loadPaths("main");
For some reason my loadpaths not working, tried a few dif combinations, i think i dont have the load paths just right, as at the end of the test.xml, it just repeats the same warpoints and won't load the main again
Quick help