03-06-2012, 06:51 AM
Adamz Wrote:Maybe i found a way.
I need to test and adjust.
In NTC_PutSkill, i added this code
Code:if (skillid == 35){
var _weapon;
_weapon = [COLOR=#ff0000]me.GetItems()[/COLOR];
if(_weapon){
for(var i = 0 ; i < _weapon.length ; i++){
if((_weapon[i].itemflag&0x100) || [COLOR=#ff0000]((_weapon[i].itemtype == 44 || _weapon[i].itemtype == 87) && (_weapon[i].GetStat(70) < 10))[/COLOR]){ // weapon broke or less then 10 javel
if(_weapon[i].mode == 1 && _weapon[i].itemloc == 4 || _weapon[i].itemloc == 5){
Print(COLOR_8 + "My weapon broke, I use another skill.");
skillid = 24;
break;
}
}
}
}
}
i check all the "weapon" returned the function "me.GetItems", for the type.
amazonjavelin -> 87
javelin -> 44 (i non need this one, but so it is compkete).
then i use the stat 70 (i found it in the bow script, for the arrow ...)
if the weapon type is 87 (or 44), and the stat 70 is less then 10, it change the skill (from 35 to 24).
does that work for you and do you need a function for it to switch back to skill 35?
Please add to my Reputation if you find my post reasonable, beneficial, or helpful.
Bottom left corner of the post.

