Vendor training question

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.
Post Reply
Yukiko
Distro Developer
Posts: 2826
Joined: Thu Feb 02, 2006 1:41 pm

Vendor training question

Post by Yukiko »

This question comes from the POL 0.95 Distro scripts.

In trainSkill.inc after the vendor has determined that you can be trained in a particular skill and has accepted your gold the script uses a strange construct (strange to me anyway) to set the skill. Can someone explain why the following code is used rather than SetAttributeBaseValue?

I could also use an explanation of what exactly is happening there too if you don't mind.

Code: Select all

      var pid := getprocess(GetObjProperty(who, "cap_pid"));
      var k := struct;
      k.+skid   := attributeid;
      k.+type   := EVID_SKILLCAP;
      k.+base   := new_level;
      pid.sendevent(k);
      DoRecalcVitals(who);

Pierce
Forum Regular
Posts: 420
Joined: Thu Feb 02, 2006 8:33 am

Post by Pierce »

I never used it, but it simply sends the value that was trained/bought to the attributecore.ecl to check if the overall SkillCap is reached or if the new skill value is higher than the maximum skill value defined (in case of the distro 100).
Post Reply