 |
 |
 |
 |
| Author |
Message |
Basara
Joined: 13 Oct 2006 Posts: 14 Location: UK
|
Posted: Sun Oct 22, 2006 8:59 am Post subject: 094-095 upgrade prob - POL wont load - bad version number 2 |
|
|
Hi all, I'm in the process of converting a working POL094 setup to 095, to then go to 096 and I've come across this:
Loading package in pkg/std/wands/
Loading package in pkg/std/wwwdebug/
Error loading script pkg/std/attributes/regen.ecl: bad version number 2
Unable to read script 'pkg/std/attributes/regen.ecl'
Error reading script pkg/std/attributes/regen.ecl
Error reading configuration file pkg/std/attributes//vitals.cfg:
Export Script pkg/std/attributes/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
All scripts have been recompiled and compiled ok.
Checked our regen.src and vitals.cfg against the distro and can't see anything glaring missing.
I can't find any reference to "bad version number 2" so I've got no idea what's causing it.
No service packs have been applied yet.
Can anyone shine any light on this?
regen.src:
| Code: |
use basic;
use basicio;
use uo;
use os;
use cfgfile;
include "include/damage";
include "include/attributes";
var cfgGetRegen := readconfigfile(":*:npcdesc");
exported function GetLifeRegenRate(mob)
// 1 point per 5 seconds
// ... is 12 points per minute
// ... is 1200 hundredths per minute
// Streamlined by Siggy, 10/18/01
var ret := 1200;
if (mob.npctemplate)
ret := getregen(mob, "hpregen");
elseif (getobjproperty(mob, "#hpregen"))
ret := getobjproperty(mob, "#hpregen");
endif
ret := getregens(mob, "hpregen", ret);
return ret;
endfunction
exported function GetLifeMaximumValue(mob)
if (mob.npctemplate)
//this is what we're gonna test with
return GetAttribute( mob, "Strength" ) * 100;
else
var hisclass := getclass(mob);
if (hisclass == "warrior")
return GetAttribute( mob, "Strength" ) * 103;
endif
return GetAttribute( mob, "Strength" ) * 100;
endif
endfunction
exported function GetHungerMaximumValue(mob)
return 1000;
endfunction
exported function GetStaminaRegenRate(mob)
// Streamlined by Siggy
var ret := 1200;
if (mob.npctemplate)
ret := getregen(mob, "stamregen");
elseif (getobjproperty(mob, "#stamregen"))
ret := getobjproperty(mob, "#stamregen");
endif
var hisrace := gettrace(mob);
if (hisrace in {"drow", "elf"})
ret := 1330;
endif
ret := getregens(mob, "stamregen", ret);
return ret;
endfunction
exported function GetHungerRegenRate(mob)
return -1;
endfunction
exported function GetStaminaMaximumValue(mob)
return GetAttribute( mob, "Dexterity" ) * 100;
endfunction
exported function GetManaRegenRate(mob)
var ret := 1200;
if (mob.npctemplate)
ret := getregen(mob, "manaregen");
elseif (getobjproperty(mob, "#manaregen"))
ret := getobjproperty(mob, "#manaregen");
endif
var hisclass := getclass(mob);
if (hisclass == "rogue")
ret := 1500;
endif
ret := getregens(mob, "stamregen", ret);
return ret;
endfunction
exported function GetManaMaximumValue(mob)
return GetAttribute( mob, "Intelligence" ) * 100;
endfunction
program regen()
print("Installing regen scripts!");
return 1;
endprogram
function getclass(who)
if (who.npctemplate)
return;
endif
return lower(getobjproperty(who, "Class"));
endfunction
function gettrace(who)
return lower(getobjproperty(who, "Race"));
endfunction
function getregen(who, type)
// Steamlined by Siggy, 10/18/01
var e := cfgGetRegen[who.npctemplate];
var m := getconfigreal(e, type);
if ( (!m) or (m<1) )
return 1200;
endif
if (m > 10)
return 12000;
else
return 1200 * m;
endif
endfunction
function getregens(who, type, current)
var cfg := readconfigfile(":*:itemdesc");
var mod;
var item;
foreach item in listequippeditems(who)
var val := getconfigreal(cfg[item.objtype], type);
if (val)
mod := 1;
current := current * val;
endif
val := getobjproperty(item, type);
if (val)
val := cdbl(val);
if (val)
current := current * mod;
mod := 1;
endif
endif
endforeach
current := cint(current);
return current;
endfunction
|
vitals.cfg:
| Code: |
Vital Life
{
RegenWhileDead 0
Alias Hits
Alias Health
RegenRateFunction regen:GetLifeRegenRate
MaximumFunction regen:GetLifeMaximumValue
}
Vital Stamina
{
RegenWhileDead 0
Alias Stam
RegenRateFunction regen:GetStaminaRegenRate
MaximumFunction regen:GetStaminaMaximumValue
}
Vital Mana
{
RegenWhileDead 0
RegenRateFunction regen:GetManaRegenRate
MaximumFunction regen:GetManaMaximumValue
}
Vital Hunger
{
RegenWhileDead 0
RegenRateFunction regen:GetHungerRegenRate
MaximumFunction regen:GetHungerMaximumValue
} |
|
|
 |
|
|
 |
 |
|