Today, after a very long session of converting my scripts for the POL97 standard I finally danced in joy, when ecompile said that all the scripts were updated and recompiled.
My happiness didn't last long though, I discovered soon enough that there was something wrong with my regen files, and I don't quite understand what might be wrong
the error I'm getting is
Code: Select all
WARNING: pkg/foundations/hooks/regen.ecl: Unable to find module npc
Error reading configuration file pkg/foundations/hooks/vitals.cfg:
Export Script pkg/foundations/hooks/regen.ecl not found
Element: Vital Life, found on line 1
Server Shutdown: load_vitals_cfg: load_packed_cfgs
Execution aborted due to: Configuration file error
Code: Select all
use attributes;
use basic;
use uo;
use cfgfile;
include "include/tempmods";
include ":wearwolf:wearwolf";
const MAX_VITAL_VALUE := 200;
var npcdesccfg := ReadConfigFile(":*:npcdesc");
program regen()
return 1;
endprogram
exported function GetLifeRegenRateExported(mob)
if(IsWearWolfMorphed(mob))
return 6000;
endif
if(IsWearWolf(mob))
return 2500;
endif
var rate := GetObjProperty(mob, CPROP_NAME_PREFIX_REGEN_RATE+VITALID_LIFE);
if(rate != error)
return CInt(rate);
endif
return 1200;
endfunction
exported function GetLifeMaximumValueExported(mob)
var maxlife := 0;
if(mob.isa(POLCLASS_NPC))
var lifestat := CInt(npcdesccfg[mob.npctemplate].HITS);
if(CInt(GetObjProperty(mob,VITALID_LIFE)))
lifestat := CInt(GetObjProperty(mob,VITALID_LIFE));
endif
if(!lifestat)
maxlife := GetAttribute(mob, ATTRIBUTEID_STRENGTH) * 100;
else
maxlife := lifestat * 100;
endif
maxlife := maxlife + (GetStrengthMod(mob) * 100);
else
maxlife := GetAttribute(mob, ATTRIBUTEID_STRENGTH) * 100;
maxlife := maxlife + (CInt(GetEffectiveSkill(mob,SKILLID_ANATOMY) / 20) * 100);
maxlife := maxlife + (GetTempModAmount(mob,MOD_LIFE) * 100);
if(maxlife > MAX_VITAL_VALUE * 100 and !mob.cmdlevel)
maxlife := MAX_VITAL_VALUE * 100;
endif
endif
if(maxlife)
return maxlife;
endif
endfunction
exported function GetStaminaRegenRateExported(mob)
if(IsWearWolfMorphed(mob))
return 1200 + (GetEffectiveSkill(mob, SKILLID_WEARWOLF) * 50);
endif
var rate := GetObjProperty(mob, CPROP_NAME_PREFIX_REGEN_RATE+VITALID_STAMINA);
if( rate == error )
rate := 1200;
else
rate := CInt(rate);
endif
if(GetEquipmentByLayer(mob, 25))
rate := rate * 2;
endif
return rate;
endfunction
exported function GetStaminaMaximumValueExported(mob)
var maxstam;
if(mob.isa(POLCLASS_NPC))
var stamstat := CInt(npcdesccfg[mob.npctemplate].STAM);
if(CInt(GetObjProperty(mob,VITALID_STAMINA)))
stamstat := CInt(GetObjProperty(mob,VITALID_STAMINA));
endif
if(!stamstat)
maxstam := GetAttribute(mob, ATTRIBUTEID_DEXTERITY) * 100;
else
maxstam := stamstat * 100;
endif
maxstam := maxstam + (GetDexterityMod(mob) * 100);
else
maxstam := GetAttribute(mob, ATTRIBUTEID_DEXTERITY) * 100;
maxstam := maxstam + (GetTempModAmount(mob,MOD_STAMINA) * 100);
if(maxstam > MAX_VITAL_VALUE * 100 and !mob.cmdlevel)
maxstam := MAX_VITAL_VALUE * 100;
endif
endif
if(maxstam)
return maxstam;
endif
endfunction
exported function GetManaRegenRateExported(mob)
var rate := GetObjProperty(mob, CPROP_NAME_PREFIX_REGEN_RATE+VITALID_MANA);
if( rate != error )
return CInt(rate);
endif
return 1200 + (GetEffectiveSkill(mob, SKILLID_MEDITATION) * 25);
endfunction
exported function GetManaMaximumValueExported(mob)
var maxmana := 0;
if(mob.isa(POLCLASS_NPC))
var manastat := CInt(npcdesccfg[mob.npctemplate].MANA);
if(CInt(GetObjProperty(mob,VITALID_MANA)))
manastat := CInt(GetObjProperty(mob,VITALID_MANA));
endif
if(!manastat)
maxmana := GetAttribute(mob, ATTRIBUTEID_INTELLIGENCE) * 100;
else
maxmana := manastat * 100;
endif
maxmana := maxmana + (GetIntelligenceMod(mob) * 100);
else
maxmana := GetAttribute(mob, ATTRIBUTEID_INTELLIGENCE) * 100;
maxmana := maxmana + (CInt(GetEffectiveSkill(mob, SKILLID_EVALINT) / 20) * 100);
maxmana := maxmana + (GetTempModAmount(mob, MOD_MANA) * 100);
if(maxmana > MAX_VITAL_VALUE * 100 and !mob.cmdlevel)
maxmana := MAX_VITAL_VALUE * 100;
endif
endif
if(maxmana)
return maxmana;
endif
endfunction
Now, I am more than willing to update my POL to 97, first of all, because of the fact how ****tty POL 96.7 runs on FreeBSD (I think I don't have to mention the fact that multithreading is broken, when not multithreaded it takes up 100% CPU unless I set inactivitytimeout to 10 which gives an insane lag ingame), so my only hopes lie in POL97
If I had missed something trivial in my research to update my POL, please, do not kill me. I have been a member of the POL family for many, many years..