• 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!

Windows Magic, skills, stamina

blazzinn

New Member
Joined
Dec 24, 2012
Messages
68
Reaction score
1
I Need a script so when u use a item it will give u these MAGIC or SKILLS or STAMINA

If I Could Get someone to Post one of MAGIC and stamina i think i could mess around and get the rest to work i just have problems when trying to add magic it crashes my server i believe it is tfs 0.3.6
 
Here you are.


Sword:
unction onUse(cid, item, frompos, item2, topos)
if item.itemid == 9019 then
doPlayerAddSkillTry(cid, SKILL_SWORD, 5)
doPlayerAddSkillTry(cid, SKILL_SWORD, 5)
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,5)))
doRemoveItem(item.uid,9019)
doSendMagicEffect(getPlayerPosition(cid),12)
doPlayerSendTextMessage(cid,22,"You have successfully used your Sworc Skill Doll, Addet 5 Sword Levels.")
end
end

Club:
unction onUse(cid, item, frompos, item2, topos)
if item.itemid == 9355 then
doPlayerAddSkillTry(cid, SKILL_CLUB, 5)
doPlayerAddSkillTry(cid, SKILL_CLUB, 5)
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,5)))
doRemoveItem(item.uid,9355)
doSendMagicEffect(getPlayerPosition(cid),12)
doPlayerSendTextMessage(cid,22,"You have successfully used your Club Skill Doll, Addet 5 Club Levels.")
end
end

Axe:
unction onUse(cid, item, frompos, item2, topos)
if item.itemid == 6579 then
doPlayerAddSkillTry(cid, SKILL_AXE, 5)
doPlayerAddSkillTry(cid, SKILL_AXE, 5)
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,5)))
doRemoveItem(item.uid,6579)
doSendMagicEffect(getPlayerPosition(cid),12)
doPlayerSendTextMessage(cid,22,"You have successfully used your Axe Skill Doll, Addet 5 Axe Levels.")
end
end

Magic:
unction onUse(cid, item, frompos, item2, topos)
if item.itemid == 9693 then
doPlayerAddSkillTry(cid, SKILL_Magic, 5)
doPlayerAddSkillTry(cid, SKILL_MAGIC, 5)
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,5)))
doRemoveItem(item.uid,9693)
doSendMagicEffect(getPlayerPosition(cid),12)
doPlayerSendTextMessage(cid,22,"You have successfully used your Magic Skill Doll, Addet 5 Magic Levels.")
end
end

Actions.xml:
<action itemid="2550" event="script" value="Skilldolls/Sword.lua"/>
<action itemid="2550" event="script" value="Skilldolls/Club.lua"/>
<action itemid="2550" event="script" value="Skilldolls/Axe.lua"/>
<action itemid="2550" event="script" value="Skilldolls/Magic.lua"/>

Tell me if it works
 
Bazi, totally messed up scripts. Sword doll gives maglvl etc,

Sword:
Lua:
function onUse(cid, item, frompos, item2, topos)
if item.itemid then
doPlayerAddSkillTry(cid, SKILL_SWORD, 5)
doPlayerAddSkillTry(cid, SKILL_SWORD, 5)
doRemoveItem(item.uid)
doSendMagicEffect(getPlayerPosition(cid),12)
doPlayerSendTextMessage(cid,22,"You have successfully used your Sword Skill Doll, Addet 5 Sword Levels.")
end
end
 
Back
Top