Massmurdera
New Member
- Joined
- Jul 24, 2009
- Messages
- 19
- Reaction score
- 0
The server is Armonia, based off of TFS
When a player logs onto one of the custom classes they are not able to be promoted, but all the original vocations are able to be promoted.
Ex: Rogue does not promote to Shadow Rogue
my Vocations.xml
EDIT:
I have two different types promotion scripts:
1st a talkaction !buypromotion
The 2nd is a npc:
When a player logs onto one of the custom classes they are not able to be promoted, but all the original vocations are able to be promoted.
Ex: Rogue does not promote to Shadow Rogue
my Vocations.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<vocations>
<vocation id="0" name="None" description="none" gaincap="5" gainhp="5" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="1" manamultiplier="4.0" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="0">
<formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0"/>
<skill id="0" multiplier="1.5"/>
<skill id="1" multiplier="2.0"/>
<skill id="2" multiplier="2.0"/>
<skill id="3" multiplier="2.0"/>
<skill id="4" multiplier="2.0"/>
<skill id="5" multiplier="1.5"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="1" name="Mage" description="a Mage" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="50" gainmanaticks="3" gainmanaamount="100" manamultiplier="1.1" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="1">
<formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0"/>
<skill id="0" multiplier="1.5"/>
<skill id="1" multiplier="2.0"/>
<skill id="2" multiplier="2.0"/>
<skill id="3" multiplier="2.0"/>
<skill id="4" multiplier="2.0"/>
<skill id="5" multiplier="1.5"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="2" name="Priest" description="a Priest" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="50" gainmanaticks="3" gainmanaamount="100" manamultiplier="1.1" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="2">
<formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0"/>
<skill id="0" multiplier="1.5"/>
<skill id="1" multiplier="1.8"/>
<skill id="2" multiplier="1.8"/>
<skill id="3" multiplier="1.8"/>
<skill id="4" multiplier="1.8"/>
<skill id="5" multiplier="1.5"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="3" name="Paladin" description="a Paladin" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="75" gainmanaticks="4" gainmanaamount="75" manamultiplier="1.4" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="3">
<formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0"/>
<skill id="0" multiplier="1.2"/>
<skill id="1" multiplier="1.2"/>
<skill id="2" multiplier="1.2"/>
<skill id="3" multiplier="1.2"/>
<skill id="4" multiplier="1.1"/>
<skill id="5" multiplier="1.1"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="4" name="Warrior" description="a Warrior" gaincap="25" gainhp="15" gainmana="5" gainhpticks="3" gainhpamount="100" gainmanaticks="6" gainmanaamount="50" manamultiplier="3.0" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="4">
<formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0"/>
<skill id="0" multiplier="1.1"/>
<skill id="1" multiplier="1.1"/>
<skill id="2" multiplier="1.1"/>
<skill id="3" multiplier="1.1"/>
<skill id="4" multiplier="1.4"/>
<skill id="5" multiplier="1.1"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="5" name="Undead Mage" description="an Undead Mage" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="100" gainmanaticks="2" gainmanaamount="200" manamultiplier="1.1" attackspeed="1000" soulmax="200" gainsoulticks="15" fromvoc="1">
<formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0"/>
<skill id="0" multiplier="1.5"/>
<skill id="1" multiplier="2.0"/>
<skill id="2" multiplier="2.0"/>
<skill id="3" multiplier="2.0"/>
<skill id="4" multiplier="2.0"/>
<skill id="5" multiplier="1.5"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="6" name="Unholy Priest" description="an Unholy Priest" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="100" gainmanaticks="2" gainmanaamount="200" manamultiplier="1.1" attackspeed="1000" soulmax="200" gainsoulticks="15" fromvoc="2">
<formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0"/>
<skill id="0" multiplier="1.5"/>
<skill id="1" multiplier="1.8"/>
<skill id="2" multiplier="1.8"/>
<skill id="3" multiplier="1.8"/>
<skill id="4" multiplier="1.8"/>
<skill id="5" multiplier="1.5"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="7" name="Blood Elf Paladin" description="a Blood Elf Hunter" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="150" gainmanaticks="3" gainmanaamount="150" manamultiplier="1.4" attackspeed="1000" soulmax="200" gainsoulticks="15" fromvoc="3">
<formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0"/>
<skill id="0" multiplier="1.2"/>
<skill id="1" multiplier="1.2"/>
<skill id="2" multiplier="1.2"/>
<skill id="3" multiplier="1.2"/>
<skill id="4" multiplier="1.1"/>
<skill id="5" multiplier="1.1"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="8" name="Death Knight" description="a Death Knight" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="200" gainmanaticks="4" gainmanaamount="100" manamultiplier="3.0" attackspeed="1000" soulmax="200" gainsoulticks="15" fromvoc="4">
<formula meleeDamage="1.5" distDamage="1.5" defense="1.5" armor="1.5"/>
<skill id="0" multiplier="1.1"/>
<skill id="1" multiplier="1.1"/>
<skill id="2" multiplier="1.1"/>
<skill id="3" multiplier="1.1"/>
<skill id="4" multiplier="1.4"/>
<skill id="5" multiplier="1.1"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="9" name="Rogue" description="a Rogue" gaincap="15" gainhp="10" gainmana="10" gainhpticks="3" gainhpamount="75" gainmanaticks="6" gainmanaamount="75" manamultiplier="1.1" attackspeed="500" soulmax="100" gainsoulticks="120" fromvoc="9">
<formula meleeDamage="0.6" distDamage="0.6" defense="1.5" armor="1.0"/>
<skill id="0" multiplier="1.2"/>
<skill id="1" multiplier="1.2"/>
<skill id="2" multiplier="1.2"/>
<skill id="3" multiplier="1.2"/>
<skill id="4" multiplier="1.5"/>
<skill id="5" multiplier="1.1"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="10" name="Jugger" description="a Jugger" gaincap="30" gainhp="20" gainmana="2" gainhpticks="3" gainhpamount="100" gainmanaticks="6" gainmanaamount="50" manamultiplier="3.0" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="10">
<formula meleeDamage="2.0" distDamage="2.0" defense="2.0" armor="2.0"/>
<skill id="0" multiplier="1.1"/>
<skill id="1" multiplier="1.1"/>
<skill id="2" multiplier="1.1"/>
<skill id="3" multiplier="1.1"/>
<skill id="4" multiplier="1.4"/>
<skill id="5" multiplier="1.1"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="11" name="Shadow Rogue" description="a Shadow Rogue" gaincap="15" gainhp="10" gainmana="10" gainhpticks="3" gainhpamount="150" gainmanaticks="6" gainmanaamount="150" manamultiplier="1.1" attackspeed="500" soulmax="100" gainsoulticks="120" fromvoc="9">
<formula meleeDamage="0.6" distDamage="0.6" defense="1.5" armor="1.0"/>
<skill id="0" multiplier="1.2"/>
<skill id="1" multiplier="1.2"/>
<skill id="2" multiplier="1.2"/>
<skill id="3" multiplier="1.2"/>
<skill id="4" multiplier="1.5"/>
<skill id="5" multiplier="1.1"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="12" name="Juggernaut" description="a Juggernaut" gaincap="30" gainhp="30" gainmana="2" gainhpticks="3" gainhpamount="300" gainmanaticks="6" gainmanaamount="50" manamultiplier="3.0" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="10">
<formula meleeDamage="2.0" distDamage="2.0" defense="2.5" armor="2.5"/>
<skill id="0" multiplier="1.1"/>
<skill id="1" multiplier="1.1"/>
<skill id="2" multiplier="1.1"/>
<skill id="3" multiplier="1.1"/>
<skill id="4" multiplier="1.4"/>
<skill id="5" multiplier="1.1"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="13" name="Necro" description="a Necro" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="50" gainmanaticks="2" gainmanaamount="100" manamultiplier="1.1" attackspeed="1000" soulmax="100" gainsoulticks="15" fromvoc="13">
<formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0"/>
<skill id="0" multiplier="1.5"/>
<skill id="1" multiplier="1.8"/>
<skill id="2" multiplier="1.8"/>
<skill id="3" multiplier="1.8"/>
<skill id="4" multiplier="1.8"/>
<skill id="5" multiplier="1.5"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="14" name="Necromancer" description="a Necromancer" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="100" gainmanaticks="2" gainmanaamount="200" manamultiplier="1.1" attackspeed="1000" soulmax="200" gainsoulticks="15" fromvoc="13">
<formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0"/>
<skill id="0" multiplier="1.5"/>
<skill id="1" multiplier="1.8"/>
<skill id="2" multiplier="1.8"/>
<skill id="3" multiplier="1.8"/>
<skill id="4" multiplier="1.8"/>
<skill id="5" multiplier="1.5"/>
<skill id="6" multiplier="1.1"/>
</vocation>
</vocations>
EDIT:
I have two different types promotion scripts:
1st a talkaction !buypromotion
Code:
function onSay(cid, words, param, channel)
sorcerer = {
cost = 200000,
level = 20,
text = "Promoted to Master Sorcerer",
}
druid = {
cost = 200000,
level = 20,
text = "Promoted to Elder Druid",
}
paladin = {
cost = 200000,
level = 20,
text = "Promoted to Royal Paladin",
}
knight = {
cost = 200000,
level = 20,
text = "Promoted to Elite Knight",
}
Rogue = {
cost = 200000,
level = 20,
text = "Promoted to Shadow Rogue",
}
Jugger = {
cost = 200000,
level = 20,
text = "Promoted to Juggernaut",
}
Necro = {
cost = 200000,
level = 20,
text = "Promoted to Necromancer",
}
if getPlayerVocation(cid) == 1 then
voc = sorcerer
elseif getPlayerVocation(cid) == 2 then
voc = druid
elseif getPlayerVocation(cid) == 3 then
voc = paladin
elseif getPlayerVocation(cid) == 4 then
voc = knight
elseif getPlayerVocation(cid) == 9 then
voc = rogue
elseif getPlayerVocation(cid) == 10 then
voc = jugger
elseif getPlayerVocation(cid) == 13 then
voc = necro
else
voc = nil
end
if voc ~= nil then
if getPlayerLevel(cid) >= voc.level then
if doPlayerRemoveMoney(cid,voc.cost) == TRUE then
setPlayerPromotionLevel(cid, 1)
doSendMagicEffect(getCreaturePosition(cid),14)
doSendAnimatedText(getCreaturePosition(cid),voc.text,49)
else
doPlayerSendTextMessage(cid,18,"You need "..voc.cost.." to promote.")
end
else
doPlayerSendTextMessage(cid,18,"You need level "..voc.level.." to promote.")
end
else
doPlayerSendTextMessage(cid,18,"You already promoted.")
end
return TRUE
end
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
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 node1 = keywordHandler:addKeyword({'promotion'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 20000 gold coins. Do you want me to promote you?'})
node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 20000, level = 20, text = 'Congratulations! You are now promoted.'})
node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})
local node2 = keywordHandler:addKeyword({'promote'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 20000 gold coins. Do you want me to promote you?'})
node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 20000, level = 20, text = 'Congratulations! You are now promoted.'})
node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})
npcHandler:addModule(FocusModule:new())
Last edited: