prontera,147,170,5 script Display 837,{
if(!.init) donpcevent strnpcinfo(3)+"::OnInit";
OnStart:
if(getequipname(EQI_HAND_R) != ""){
dispbottom "["+$@Weapon$+"] Level: "+WeaponLv+" | Expereince: "+WeaponExp+"/"+.@WepXP[WeaponLv]+"";
}else {
dispbottom "[Weapon] I'm sorry but you don't seem to have a Weapon on.";}
end;
OnInit:
//Configuration
setarray .@WepXP[1],0,100,1000, 3700, 10100, 22600, 44200, 78500, 129700, 202600, 302600; //Weapon Level Experience
setarray .@exp[0],1,2,3,4,5; //Experience per kill
set .@XPperKill,.exp[rand(getarraysize(.@exp))];
set .@MaxWLV,getarraysize(.@WepXP);
set .init,1;
set $@Weapon$,getequipname(EQI_HAND_R);
end;
OnNPCKillEvent:
set $@Weapon$, getequipname(EQI_HAND_R);
if(getequipname(EQI_HAND_R) != "")
if(WeaponLv == .@MaxWLV){
end;} else{
dispbottom "["+$@Weapon$+"] +"+.@XPperKill+" Experience";
set WeaponExp, WeaponExp+.@XPperKill;}
if(.@WepXP[WeaponLv] <= WeaponExp && WeaponLv < .@MaxWLV){
set WeaponLv, WeaponLv+1;
dispbottom "["+$@Weapon$+"] Weapon Level: "+WeaponLv+"!";
}
else
dispbottom "[Weapon] Please equip a weapon to gain experience for it.";
end;
}