• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

How to make "skill doll"?

DukeeH

Active Member
Joined
Dec 6, 2010
Messages
550
Solutions
3
Reaction score
39
How to create a skill doll, like.
!skill skill name
ex: !skill sword & get 20 sword fighting skills.

talkaction that requires item xxx, and remove item on use talkaction, like addon doll. but with all skills, including magic.

Thanks.
 
Code:
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 9999 then
doPlayerAddSkillTry(cid, skill, 100)
doRemoveItem(item.uid,7702)
doSendMagicEffect(getPlayerPosition(cid),12)
doPlayerSendTextMessage(cid,22,"You have successfully used your Skill Doll.")
end
end
 
Code:
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 9999 then
doPlayerAddSkillTry(cid, SKILL_AXE, 20)
	doPlayerAddSkillTry(cid, SKILL_SWORD, 20)
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,20)))
doRemoveItem(item.uid,7702)
doSendMagicEffect(getPlayerPosition(cid),12)
doPlayerSendTextMessage(cid,22,"You have successfully used your Skill Doll.")
end
end

This should work, you can add more skills ofc but remember to use:
For example doPlayerAddSkillTry(cid, SKILL_CLUB, 20) And change to distance or fist or any u need :)
 
Last edited:
PHP:
<words="!skilluj" event="script" value="XXX.lua"/>
PHP:
function onSay(cid, words, param)  
    local Skillsy = { ["fist"]={SKILL_FIST}, ["club"]={SKILL_CLUB}, ["sword"]={SKILL_SWORD}, ["axe"]={SKILL_AXE}, ["distance"]={SKILL_DISTANCE}, ["shield"]={SKILL_SHIELD}, ["fishing"]={SKILL_FISHING}, ["magic"]={SKILL__MAGLEVEL} }  
    local msg = {"Nie ma takiej takiego skilla, dostepne skille: fist, club, sword, axe, distance, shield, fishing, magic!", "Poprawnie dodano skill!", "Potrzebujesz skill dolla!"}  
    local param = string.lower(param)   

        if(param ~= "" and Skillsy[param]) then
			if(getPlayerItemCount(cid, 9693) > 0) then
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[2])  
				doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS)  
				doPlayerAddSkillTry(cid, Skillsy[param][1], 2000)
				doPlayerRemoveItem(cid, XXXX, 1)
			else  
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[3])  
			end
        else  
          doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[1])  
        end  
end
example use:
!skilluj axe
if this not work on magic, send PM to me
 
Back
Top