The problem is that you're expecting us to write your code for you. Most people are busy writing their
own scriptbases, and don't have time to write yours for you.
But, just to push you in the right direction, what I would do is:
- Write a config file containing the skills that I want to be considered "CraftSkills" as entrys.
Code: Select all
CraftSkills SkillList
{
SkillID 0 // The Skill ID
AttributeID Alchemy // The Skill Name
// etc.
}
- Write an include file to externalize access to the file.
IsCrafter.incCode: Select all
...
function IsCraftSkill( skill )
var craft_skill_cfg := ReadConfigFile("CraftSkills");
craft_skill_cfg := craft_skill_cfg["SkillList"];
var craft_skill_list;
if( Type(skill) == Type("") )
craft_skill_list := GetConfigIntArray(craft_skill_cfg,"SkillID");
elseif( Type(skill) == Type(0) )
craft_skill_list := GetConfigStringArray(craft_skill_cfg,"AttributeID");
endif
if( skill in craft_skill_list )
return 1;
endif
return 0;
endfunction
function IsCrafter(byref who)
var craft_skill_cfg := ReadConfigFile("CraftSkills");
craft_skill_cfg := craft_skill_cfg["SkillList"];
var craft_skill_list := GetConfigIntArray(craft_skill_cfg,"AttributeID");
var num_skills;
foreach craft_skill in craft_skill_list
if( GetAttribute(craft_skill) > 12900 ) // 129 * 100
num_skills := num_skills + 1;
endif
endforeach
if( num_skills >= 3 )
return 1;
endif
return 0;
endfunction
- Use it.
Code: Select all
...
// var crafter := GetObjProperty (who,"IsCrafter");
var crafter := IsCrafter(who);
...
I know that I just contradicted myself and wrote it for you; but it's imperfect, and I'll leave the debugging and fixing to you.
In the future, please try harder to move away from being a Type1 POL User.