local amount = 100 -- amount of gold
local looktype = 123 -- number of looktype
local itemid = 1234 -- itemid to remove
local count = 10 -- amount of itemid(^)
function onUse(cid, item, frompos, item2, topos)
local k = getPlayerPromotionLevel(cid)
if k ~= 1 then
if getPlayerItemCount(cid, itemid) >= count and doPlayerRemoveMoney(cid, amount) then
doPlayerRemoveItem(cid, itemid, count)
doPlayerSetPromotionLevel(cid, 1)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "you have been promoted")
doCreatureChangeOutfit(cid,{lookType = looktype})
else
doPlayerSendCancel(cid,"you need ".. amount .." gold coin and ".. count .." of ".. getItemNameById(itemid) .." to be promoted")
end
else
doPlayerSendCancel(cid,"you already promoted")
end
return true
end
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local t = {}
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
local amount = 100 -- amount of gold
local looktype = 123 -- number of looktype
local itemid = 2160 -- itemid to remove
local count = 10 -- amount of itemid(^)
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
if(msgcontains(msg, 'promotion')) then
selfSay('Do you want me to promote you?', cid)
t[cid] = 1
elseif t[cid] == 1 and msgcontains(msg, 'yes') then
if getPlayerPromotionLevel(cid) < 1 then
if getPlayerItemCount(cid, itemid) >= count and doPlayerRemoveMoney(cid, amount) then
selfSay('you have been promoted',cid)
doPlayerSetPromotionLevel(cid, 1)
doCreatureChangeOutfit(cid,{lookType = looktype})
doPlayerRemoveItem(cid, itemid, count)
else
selfSay('you need '.. amount ..' gold coin and '.. count ..' of '.. getItemNameById(itemid) ..' to be promoted', cid)
t[cid] = nil
end
else
selfSay('you already promoted', cid)
t[cid] = nil
end
elseif t[cid] == 1 and msgcontains(msg, 'no') then
selfSay('Alright then, come back when you are ready.', cid)
t[cid] = nil
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
Lua:local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local t = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end local amount = 100 -- amount of gold local looktype = 123 -- number of looktype local itemid = 2160 -- itemid to remove local count = 10 -- amount of itemid(^) function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end if(msgcontains(msg, 'promotion')) then selfSay('Do you want me to promote you?', cid) t[cid] = 1 elseif t[cid] == 1 and msgcontains(msg, 'yes') then if getPlayerPromotionLevel(cid) < 1 then if getPlayerItemCount(cid, itemid) >= count and doPlayerRemoveMoney(cid, amount) then selfSay('you have been promoted',cid) doPlayerSetPromotionLevel(cid, 1) doCreatureChangeOutfit(cid,{lookType = looktype}) doPlayerRemoveItem(cid, itemid, count) else selfSay('you need '.. amount ..' gold coin and '.. count ..' of '.. getItemNameById(itemid) ..' to be promoted', cid) t[cid] = nil end else selfSay('you already promoted', cid) t[cid] = nil end elseif t[cid] == 1 and msgcontains(msg, 'no') then selfSay('Alright then, come back when you are ready.', cid) t[cid] = nil end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
<?xml version="1.0" encoding="UTF-8"?><vocations>
<vocation id="0" name="None" description="none" needpremium="0" gaincap="5" gainhp="5" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="1" manamultiplier="4.0" attackspeed="2100" soulmax="100" gainsoulticks="120" fromvoc="0" attackable="no">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="1" name="Mage" description="a mage" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="25" gainmanaticks="3" gainmanaamount="35" manamultiplier="1.1" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="1">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="2" name="Healer" description="a healer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="25" gainmanaticks="3" gainmanaamount="35" manamultiplier="1.1" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="2">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="3" name="Archer" description="a archer" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="30" gainmanaticks="4" gainmanaamount="25" manamultiplier="1.4" attackspeed="1900" soulmax="100" gainsoulticks="120" fromvoc="3">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="4" name="Swordman" description="a swordman" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="3" gainhpamount="45" gainmanaticks="6" gainmanaamount="15" manamultiplier="3.0" attackspeed="1800" soulmax="100" gainsoulticks="120" fromvoc="4">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="5" name="Thief" description="a thief" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="3" gainhpamount="45" gainmanaticks="6" gainmanaamount="15" manamultiplier="3.0" attackspeed="1800" soulmax="100" gainsoulticks="120" fromvoc="5">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="6" name="Scout" description="a scout" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="3" gainhpamount="45" gainmanaticks="6" gainmanaamount="15" manamultiplier="3.0" attackspeed="1800" soulmax="100" gainsoulticks="120" fromvoc="6">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="7" name="Spellcaster" description="a spellcaster" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="60" gainmanaticks="2" gainmanaamount="120" manamultiplier="1.1" attackspeed="1600" soulmax="200" gainsoulticks="15" fromvoc="1" lessloss="30">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="8" name="Medicaster" description="an medicaster" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="60" gainmanaticks="2" gainmanaamount="120" manamultiplier="1.1" attackspeed="1600" soulmax="200" gainsoulticks="15" fromvoc="2" lessloss="30">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="9" name="Spearman" description="a spearman" needpremium="1" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="75" gainmanaticks="3" gainmanaamount="65" manamultiplier="1.4" attackspeed="1400" soulmax="200" gainsoulticks="15" fromvoc="3" lessloss="30">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="10" name="Knight" description="a knight" needpremium="1" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="180" gainmanaticks="4" gainmanaamount="55" manamultiplier="3.0" attackspeed="1300" soulmax="200" gainsoulticks="15" fromvoc="4" lessloss="30">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="11" name="Assassin" description="a assassin" needpremium="1" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="180" gainmanaticks="4" gainmanaamount="55" manamultiplier="3.0" attackspeed="1300" soulmax="200" gainsoulticks="15" fromvoc="5" lessloss="30">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="12" name="Blocker" description="a blocker" needpremium="1" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="180" gainmanaticks="4" gainmanaamount="55" manamultiplier="3.0" attackspeed="1300" soulmax="200" gainsoulticks="15" fromvoc="6" lessloss="30">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="13" name="Wizard" description="a wizard" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="60" gainmanaticks="2" gainmanaamount="120" manamultiplier="1.1" attackspeed="1600" soulmax="200" gainsoulticks="15" fromvoc="7" lessloss="30">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="14" name="Witchdoctor" description="a witchdoctor" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="60" gainmanaticks="2" gainmanaamount="120" manamultiplier="1.1" attackspeed="1600" soulmax="200" gainsoulticks="15" fromvoc="8" lessloss="30">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="15" name="Hunter" description="a hunter" needpremium="1" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="75" gainmanaticks="3" gainmanaamount="65" manamultiplier="1.4" attackspeed="1400" soulmax="200" gainsoulticks="15" fromvoc="9" lessloss="30">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="16" name="Warrior" description="a warrior" needpremium="1" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="180" gainmanaticks="4" gainmanaamount="55" manamultiplier="3.0" attackspeed="1300" soulmax="200" gainsoulticks="15" fromvoc="10" lessloss="30">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="17" name="Killer" description="a killer" needpremium="1" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="180" gainmanaticks="4" gainmanaamount="55" manamultiplier="3.0" attackspeed="1300" soulmax="200" gainsoulticks="15" fromvoc="11" lessloss="30">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="18" name="Guardian" description="a guardian" needpremium="1" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="180" gainmanaticks="4" gainmanaamount="55" manamultiplier="3.0" attackspeed="1300" soulmax="200" gainsoulticks="15" fromvoc="12" lessloss="30">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
</vocations>
function isMage(cid) return isInArray({1, 7, 13}, getPlayerVocation(cid))
end
function isHealer(cid)
return isInArray({2, 8, 14}, getPlayerVocation(cid))
end
function isArcher(cid)
return isInArray({3, 9, 15}, getPlayerVocation(cid))
end
function isSwordman(cid)
return isInArray({4, 10, 16}, getPlayerVocation(cid))
end
function isThief(cid)
return isInArray({5, 11, 17}, getPlayerVocation(cid))
end
function isScout(cid)
return isInArray({6, 12, 18}, getPlayerVocation(cid))
end
function isRookie(cid)
return isInArray({0}, getPlayerVocation(cid))
end
<?xml version="1.0" encoding="UTF-8"?><vocations>
<vocation id="0" name="None" description="none" needpremium="0" gaincap="5" gainhp="5" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="1" manamultiplier="4.0" attackspeed="2100" soulmax="100" gainsoulticks="120" fromvoc="0" attackable="no">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="1" name="Mage" description="a mage" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="25" gainmanaticks="3" gainmanaamount="35" manamultiplier="1.1" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="1">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="2" name="Healer" description="a healer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="25" gainmanaticks="3" gainmanaamount="35" manamultiplier="1.1" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="2">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="3" name="Archer" description="a archer" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="30" gainmanaticks="4" gainmanaamount="25" manamultiplier="1.4" attackspeed="1900" soulmax="100" gainsoulticks="120" fromvoc="3">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="4" name="Swordman" description="a swordman" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="3" gainhpamount="45" gainmanaticks="6" gainmanaamount="15" manamultiplier="3.0" attackspeed="1800" soulmax="100" gainsoulticks="120" fromvoc="4">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="5" name="Spellcaster" description="a spellcaster" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="60" gainmanaticks="2" gainmanaamount="120" manamultiplier="1.1" attackspeed="1600" soulmax="200" gainsoulticks="15" fromvoc="1" lessloss="30">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="6" name="Medicaster" description="an medicaster" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="60" gainmanaticks="2" gainmanaamount="120" manamultiplier="1.1" attackspeed="1600" soulmax="200" gainsoulticks="15" fromvoc="2" lessloss="30">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="7" name="Spearman" description="a spearman" needpremium="1" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="75" gainmanaticks="3" gainmanaamount="65" manamultiplier="1.4" attackspeed="1400" soulmax="200" gainsoulticks="15" fromvoc="3" lessloss="30">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="8" name="Knight" description="a knight" needpremium="1" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="180" gainmanaticks="4" gainmanaamount="55" manamultiplier="3.0" attackspeed="1300" soulmax="200" gainsoulticks="15" fromvoc="4" lessloss="30">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="9" name="Assassin" description="a assassin" needpremium="1" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="180" gainmanaticks="4" gainmanaamount="55" manamultiplier="3.0" attackspeed="1300" soulmax="200" gainsoulticks="15" fromvoc="5" lessloss="30">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="10" name="Blocker" description="a blocker" needpremium="1" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="180" gainmanaticks="4" gainmanaamount="55" manamultiplier="3.0" attackspeed="1300" soulmax="200" gainsoulticks="15" fromvoc="6" lessloss="30">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="11" name="Wizard" description="a wizard" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="60" gainmanaticks="2" gainmanaamount="120" manamultiplier="1.1" attackspeed="1600" soulmax="200" gainsoulticks="15" fromvoc="7" lessloss="30">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="12" name="Witchdoctor" description="a witchdoctor" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="60" gainmanaticks="2" gainmanaamount="120" manamultiplier="1.1" attackspeed="1600" soulmax="200" gainsoulticks="15" fromvoc="8" lessloss="30">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="13" name="Hunter" description="a hunter" needpremium="1" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="75" gainmanaticks="3" gainmanaamount="65" manamultiplier="1.4" attackspeed="1400" soulmax="200" gainsoulticks="15" fromvoc="9" lessloss="30">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="14" name="Warrior" description="a warrior" needpremium="1" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="180" gainmanaticks="4" gainmanaamount="55" manamultiplier="3.0" attackspeed="1300" soulmax="200" gainsoulticks="15" fromvoc="10" lessloss="30">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="15" name="Killer" description="a killer" needpremium="1" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="180" gainmanaticks="4" gainmanaamount="55" manamultiplier="3.0" attackspeed="1300" soulmax="200" gainsoulticks="15" fromvoc="11" lessloss="30">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="16" name="Guardian" description="a guardian" needpremium="1" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="180" gainmanaticks="4" gainmanaamount="55" manamultiplier="3.0" attackspeed="1300" soulmax="200" gainsoulticks="15" fromvoc="12" lessloss="30">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
</vocations>
function isMage(cid)
return isInArray({1, 5, 9}, getPlayerVocation(cid))
end
function isHealer(cid)
return isInArray({2, 6, 10}, getPlayerVocation(cid))
end
function isArcher(cid)
return isInArray({3, 7, 11}, getPlayerVocation(cid))
end
function isSwordman(cid)
return isInArray({4, 8, 12}, getPlayerVocation(cid))
end
function isThief(cid)
return isInArray({5, 9, 13}, getPlayerVocation(cid))
end
function isScout(cid)
return isInArray({6, 10, 14}, getPlayerVocation(cid))
end
function isRookie(cid)
return isInArray({0}, getPlayerVocation(cid))
end