This LUA includes a cleaned up version of my previously released HLP-Workaround, which delevels the pet to match the character's level, as well as a function that fully evolves the creature and gives it all skills.
Code:
function get_module_name()
return "Creature_Menu"
end
function Creature_Menu()
dlg_title( "Creature-Menu" )
dlg_text( "Fill me in with some useful info cause I couldn't be bothered to type something out. :-)" )
dlg_menu( "Super Evolution", 'Creature_Evo()' )
dlg_menu( "HLP Fix", 'Hlp_Fix()' )
dlg_menu( "@90010001", '' )
dlg_show()
end
--Super Evolution
function Creature_Evo()
dlg_title( "Super-Evolve" )
dlg_text( "This function will give your pet all learnable skills, evolve it to max evolution, and match it's level to yours. Please be sure to recall your creatures before using this function. Be cautious as this is ireversible. Select a pet from below:" )
local handle, summon_state, lv, lv_diff, cost, gold
for i = 0, 5 do
handle = 0
handle = get_creature_handle( i )
summon_state = get_creature_value( handle, "summon_state" )
lv = get_creature_value( handle, "level" )
lv_diff = 170 - lv
cost = lv_diff * 10000000
gold = gv( "gold" )
if handle ~= 0 and handle ~= nil then
if lv ~= 170 then
if summon_state == 0 then
text = sconv("@90010009", "#@creature_name@#",tostring(get_creature_value( handle, "name" )) ,"#@creature_level@#",tostring(lv))
broke = 'No_Gold()'
command = 'Creature_Evo_Confirm( ' .. handle .. ' )'
if gold >= cost then
dlg_menu( text, command )
else
dlg_menu( text, broke )
end
else
text = sconv("@90010009", "#@creature_name@#",tostring(get_creature_value( handle, "name" )) ,"#@creature_level@#",tostring(lv))
command = 'Creature_Summoned()'
dlg_menu( text, command )
end
end
end
end
dlg_menu( "Back", 'Creature_Menu()' )
dlg_menu( "@90010001", '' )
dlg_show()
end
function Creature_Evo_Confirm( handle )
local lv, lv_diff, cost, gold
lv = get_creature_value( handle, "level" )
lv_diff = 170 - lv
cost = lv_diff * 10000000
gold = gv( "gold" )
text = sconv("This will cost #@price@# rupees. Are you sure you want to continue?", "#@price@#",tostring(cost))
dlg_title("Confirm")
dlg_text( text )
dlg_menu("Confirm", 'Creature_Evo_Function( ' .. handle .. ' )')
dlg_menu( "Back", 'Creature_Evo()' )
dlg_menu( "@90010001", '' )
dlg_show()
end
function Creature_Evo_Function( handle )
local evolution_depth, id, lv, summon_state, player_lv, gold, lv_diff, cost, gold_post
evolution_depth = get_creature_value( handle, "evolution_depth" )
id = get_creature_value( handle, "job" )
lv = get_creature_value( handle, "level" )
summon_state = get_creature_value( handle, "summon_state" )
player_lv = gv( "lv" )
gold = gv( "gold" )
lv_diff = 170 - lv
cost = lv_diff * 10000000
gold_post = gold - cost
if evolution_depth == 1 then
learn_creature_all_skill()
set_creature_value( handle, "ev_1_ID", id )
set_creature_value( handle, "ev_1_level", 60 )
creature_evolution( handle )
learn_creature_all_skill()
set_creature_value( handle, "ev_2_ID", id )
set_creature_value( handle, "ev_2_level", 115 )
creature_evolution( handle )
learn_creature_all_skill()
elseif evolution_depth == 2 then
learn_creature_all_skill()
set_creature_value( handle, "ev_2_ID", id )
set_creature_value( handle, "ev_2_level", 115 )
creature_evolution( handle )
learn_creature_all_skill()
elseif evolution_depth == 3 then
learn_creature_all_skill()
end
sv( "gold", gold_post )
end
function Creature_Summoned()
dlg_title("Error")
dlg_text("The creature must be recalled before proceeding...")
dlg_menu( "Back", 'Creature_Menu()' )
dlg_menu( "@90010001", '' )
dlg_show()
end
--Hlp Fix
function Hlp_Fix()
dlg_title( "Hlp-Fix" )
dlg_text( "This function will lower your pet's level to match yours. Proceed with caution as this cannot be reversed." )
local handle, summon_state, lv, player_lv, lv_diff, cost, gold
for i = 0, 5 do
handle = 0
handle = get_creature_handle( i )
summon_state = get_creature_value( handle, "summon_state" )
lv = get_creature_value( handle, "level" )
player_lv = gv( "lv" )
lv_diff = lv - player_lv
cost = lv_diff * 10000000
gold = gv( "gold" )
if handle ~= 0 and handle ~= nil then
if lv > player_lv then
text = sconv("@90010009", "#@creature_name@#",tostring(get_creature_value( handle, "name" )) ,"#@creature_level@#",tostring(lv))
broke = 'No_Gold()'
command = 'Hlp_Fix_Confirm( ' .. handle .. ' )'
if gold >= cost then
dlg_menu( text, command )
else
dlg_menu( text, broke )
end
end
end
end
dlg_menu( "Back", 'Creature_Menu()' )
dlg_menu( "@90010001", '' )
dlg_show()
end
function Hlp_Fix_Confirm( handle )
local player_lv, lv, lv_diff, cost, gold
player_lv = gv( "lv" )
lv = get_creature_value( handle, "level" )
lv_diff = lv - player_lv
cost = lv_diff * 10000000
gold = gv( "gold" )
text = sconv("This will cost #@price@# rupees. Are you sure you want to continue?", "#@price@#",tostring(cost))
dlg_title("Confirm")
dlg_text( text )
dlg_menu("Confirm", 'Hlp_Fix_Function( ' .. handle .. ' )')
dlg_menu( "Back", 'Hlp_Fix()' )
dlg_menu( "@90010001", '' )
dlg_show()
end
function Hlp_Fix_Function( handle )
local player_lv, lv, lv_diff, cost, gold, gold_post
player_lv = gv( "lv" )
lv = get_creature_value( handle, "level" )
lv_diff = lv - player_lv
cost = lv_diff * 10000000
gold = gv( "gold" )
gold_post = gold - cost
set_creature_value( handle, "level", player_lv )
sv( "gold", gold_post )
end
--Shared
function No_Gold()
dlg_title( "Error" )
dlg_text( "Sorry, you do not have enough rupees." )
dlg_menu( "Back", 'Creature_Menu()' )
dlg_menu( "@90010001", '' )
dlg_show()
end
There are a few issues with this script. One i can say for sure is that it uses the learn_creature_all_skill() function, so it will level and learn all skill for all pets in the formation. otherwise seems to work as intended. If anyone knows a better way to approach this, brilliant. Sharing is caring.
Enjoy.






