PenUltima Online

It is currently Tue Oct 07, 2008 7:05 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Skill lock
PostPosted: Tue Aug 28, 2007 4:59 am 
Offline
User avatar

Joined: Mon Jan 22, 2007 6:06 am
Posts: 25
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..


Last edited by Pumpkins on Mon Feb 11, 2008 1:17 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 29, 2007 4:08 am 
Offline
User avatar

Joined: Mon Jan 22, 2007 6:06 am
Posts: 25
i love the pol support.. :mad:


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 29, 2007 10:33 am 
Offline

Joined: Thu Feb 02, 2006 1:41 pm
Posts: 1154
Location: Southern Central USA
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

_________________
Sincerely,
Yukiko

I know you think you understand what you thought I said but what you heard is not exactly what I meant.

Titus 2:13


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 29, 2007 4:26 pm 
Offline

Joined: Sat Feb 04, 2006 5:49 pm
Posts: 772
Location: Chicago, IL USA
Thats for packet hooks though. Packet hooks aren't supported on 095.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 29, 2007 10:38 pm 
Offline

Joined: Thu Feb 02, 2006 1:41 pm
Posts: 1154
Location: Southern Central USA
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?

Code:
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


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.

_________________
Sincerely,
Yukiko

I know you think you understand what you thought I said but what you heard is not exactly what I meant.

Titus 2:13


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl