Hello,
i have a question.. how i get working the skill lock?
i use the .skills from zulu hotel distro and it dont work, the classic skills menu from the papeldoll dont work too..
there is a way to get it working in pol095? thanks.
i know the 095 is no longer supported.. but 095 still in use in SOME shards.. this old problem should be fixed..
Skill lock
Moderator: POL Developer
Skill lock
Last edited by Pumpkins on Mon Feb 11, 2008 1:17 am, edited 1 time in total.
-
- Distro Developer
- Posts: 2825
- Joined: Thu Feb 02, 2006 1:41 pm
- Location: San Antonio, Texas
- Contact:
Pumpkins here's a link to skill locks for POL 0.96. Maybe this will help you with doing it in POL 0.95.
http://forums.polserver.com/viewtopic.p ... light=lock
http://forums.polserver.com/viewtopic.p ... light=lock
-
- Distro Developer
- Posts: 2825
- Joined: Thu Feb 02, 2006 1:41 pm
- Location: San Antonio, Texas
- Contact:
Yep. You're right CWO. Sorry Pumpkins. Maybe this will make up for my mistake. Did you replace the CheckSkillCap function in AttributeCore.src with the following one?
If not then open AttributeCore.src found in \pkg\foundations\hooks and replace the CheckSkillCap function in there with the one above. I believe it is what you need to make the skill locks work. Be sure to make a backup of the AttributeCore.src file just in case this causes undesireable results. I can't help with support for this. It is provided as is. I dug it out of my "script mines" but I think it is what you need.
Code: Select all
function CheckSkillCap(who, ev)
var attributeid := ev.skid;
var priorValue;
var theId;
var lowerholder;
var lockArray := GetObjProperty(who, "SkLockArray");
priorValue := GetAttributeBaseValue(who, attributeid);
if(priorValue < 1000)
if (ev.base > priorValue) // Adding Skill, check for lock set to up
if ((!lockArray) ||
(lockArray[GetSkillIdByAttributeId(attributeid) + 1] == 0))
SetAttributeBaseValue(who, attributeid, Cint(ev.base));
endif
elseif (ev.base < priorValue) // Lowering Skill, check for lock set to down
if ((lockArray != error) &&
(lockArray[GetSkillIdByAttributeId(attributeid) + 1] == 1))
SetAttributeBaseValue(who, attributeid, Cint(ev.base));
endif
endif
endif
if(GetAttributeBaseValue(who, attributeid) > 1000)
priorValue := 1000;
SetAttributeBaseValue(who, attributeid, 1000);
endif
var skillarray := GetObjProperty(who,"SkillArray");
var skilltotal := 0;
var skillval := 0;
var check := 0;
var loops := 0;
var holder, newval, final;
var base, mods, true;
while(check == 0)
if(loops >= 6)
if (priorValue < GetAttributeBaseValue(who, attributeid))
SetAttributeBaseValue(who, attributeid, priorValue);
endif
break;
endif
skilltotal := 0;
lowerholder := -1;
for (theId := 0; theID < SKILLID__HIGHEST; theID := theID + 1)
true := GetBaseSkillBaseValue(who, theID);
base := Cint(true - GetAttributeIntrinsicMod(who, GetAttributeIdBySkillId(theId)));
skilltotal := skilltotal + base;
if ( (base > 0) &&
(lockarray != error) &&
(lockarray[theId + 1] == 1) )
lowerholder := theId;
elseif (base > 0)
holder := theId;
endif
if ((lowerholder >= 0) && (skilltotal > CONST_SKILLCAP))
break;
endif
endfor
if (lowerholder >=0)
holder := lowerholder;
endif
if(skilltotal > CONST_SKILLCAP)
newval := GetBaseSkillBaseValue(who, holder);
final := (newval - 1);
SetBaseSkillBaseValue(who, holder, final);
else
check := 1;
endif
loops := loops + 1;
endwhile
return 1;
endfunction