Alright so I am fixing up smithing on my server and I want to make it almost exactly like rs.
so I have 2 problems.
1. How would I right this to make it so you get iron bar 50% of the time.. like this?
Code:
if(UsedOnObjectID == 3994 && ItemID == 440 && playerLevel[13] >= 15){
deleteItem(440, 1);
addItem(2351, 1) + misc.random(50);
sM("You smith the iron ore.");
setAnimation(899);
faceNPC(UsedOnObjectID);
addSkillXP(2500, 13);
} else {
sM("You need 15 smith to do this.")
}
2. How do I make it so for like smelting rune you have to have like 8 coal.. like this?
Code:
if(UsedOnObjectID == 3994 && ItemID == 451 && playerHasItem(453) && playerLevel[13] >= 85){
deleteItem(451, 1);
deleteItem(453, 8);
addItem(2363, 1);
sM("You smith the runite ore.");
setAnimation(899);
faceNPC(UsedOnObjectID);
addSkillXP(12000, 13);
} else {
sM("You need 85 smith to do this.")
}
Please Help.