Kjosen
New Member
- Joined
- Sep 1, 2008
- Messages
- 94
- Reaction score
- 0
This is my current Skill Scroll, it adds swordfighting from level 1 to level 90~
But I want it to add axe, club, shielding aswell, without having to make 4 different items with 4 different scripts?
local config = {maxlvl = 80, trys = 350000, skilltype = 2}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerSkill(cid,2) <= config.maxlvl then
doPlayerAddSkillTry(cid, config.skilltype, config.trys)
doRemoveItem(item.uid, 1)
doPlayerSendTextMessage(cid,TALKTYPE_BROADCAST, "CONGRATULATIONS! You've gained ".. config.trys .." skill tries from the skill up scroll!")
else
doPlayerSendCancel(cid, "Your skill level is too high.")
end
return TRUE
end
Please help me
Thanks in advance
But I want it to add axe, club, shielding aswell, without having to make 4 different items with 4 different scripts?
local config = {maxlvl = 80, trys = 350000, skilltype = 2}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerSkill(cid,2) <= config.maxlvl then
doPlayerAddSkillTry(cid, config.skilltype, config.trys)
doRemoveItem(item.uid, 1)
doPlayerSendTextMessage(cid,TALKTYPE_BROADCAST, "CONGRATULATIONS! You've gained ".. config.trys .." skill tries from the skill up scroll!")
else
doPlayerSendCancel(cid, "Your skill level is too high.")
end
return TRUE
end
Please help me
Thanks in advance