Zerak456
Gorlex.net NEW!
- Joined
- Aug 13, 2008
- Messages
- 1,060
- Reaction score
- 6
hello, today i made a script u use a scroll u will be sorcerer
and its 4 scrolls for sorcerer,knight,druid,paladin
so u can change ur vocation
pic:
hope u like it
data/action/action.xml
and now create 4 files with name sorcerer,druid,paladin,knight
sorcerer:
druid:
knight:
paladin:
thanks hope u like it and give me rep++ xD
tested on tfs 0.3.4
and its 4 scrolls for sorcerer,knight,druid,paladin
so u can change ur vocation
pic:
hope u like it
data/action/action.xml
Code:
<!-- voc changers -->
<action itemid="7529" script="sorcerer.lua"/>
<action itemid="7530" script="paladin.lua"/>
<action itemid="7531" script="knight.lua"/>
<action itemid="7532" script="druid.lua"/>
and now create 4 files with name sorcerer,druid,paladin,knight
sorcerer:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerVocation(cid) == 1 then
doCreatureSay(cid, "You are already a sorcerer", TALKTYPE_ORANGE_1)
else if getPlayerLevel(cid) >= 40 then
doPlayerSetVocation(cid, 1)
doCreatureSay(cid, "You are now a Sorcerer!", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 1)
doSendMagicEffect(fromPosition, 44)
return TRUE
else
doCreatureSay(cid, "You must be level 40 to change ur vocation..", TALKTYPE_ORANGE_1)
end
end
return TRUE
end
druid:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerVocation(cid) == 2 then
doCreatureSay(cid, "You are already a Druid", TALKTYPE_ORANGE_1)
else if getPlayerLevel(cid) >= 40 then
doPlayerSetVocation(cid, 2)
doCreatureSay(cid, "You are now a Druid!", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 1)
doSendMagicEffect(fromPosition, 39)
return TRUE
else
doCreatureSay(cid, "You must be level 40 to change ur vocation..", TALKTYPE_ORANGE_1)
end
end
return TRUE
end
knight:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerVocation(cid) == 4 then
doCreatureSay(cid, "You are already a Knight", TALKTYPE_ORANGE_1)
else if getPlayerLevel(cid) >= 40 then
doPlayerSetVocation(cid, 4)
doCreatureSay(cid, "You are now a Knight!", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 1)
doSendMagicEffect(fromPosition, 39)
return TRUE
else
doCreatureSay(cid, "You must be level 40 to change ur vocation..", TALKTYPE_ORANGE_1)
end
end
return TRUE
end
paladin:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerVocation(cid) == 3 then
doCreatureSay(cid, "You are already a Paladin", TALKTYPE_ORANGE_1)
else if getPlayerLevel(cid) >= 40 then
doPlayerSetVocation(cid, 3)
doCreatureSay(cid, "You are now a Paladin!", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 1)
doSendMagicEffect(fromPosition, 39)
return TRUE
else
doCreatureSay(cid, "You must be level 40 to change ur vocation..", TALKTYPE_ORANGE_1)
end
end
return TRUE
end
thanks hope u like it and give me rep++ xD
tested on tfs 0.3.4
Last edited: