hmm moze w vocation xml sie da
a kiedy to 0.3.4, że się tak spytam?
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, TRUE)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -2.5, -30, -3.125, 0)
local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TARGETCASTERORTOPMOST, TRUE)
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -2.0, -30, -2.5, 0)
function onCastSpell(cid, var)
local voc = getPlayerVocation(cid)
if voc == 1 or voc == 5 or voc == 9 then
return doCombat(cid, combat, var)
elseif voc ~= 1 and voc ~= 5 and voc ~= 9 then
return doCombat(cid, combat2, var)
end
end
A z 0.3.3 na 0.3.4 to normalnei tylko npc data i actions pliki skopiowac i bdzie dzialalo czy trzeba bedzie cos przerabiac ??
Jak masz żalowo napisane skrypty, to będziesz musiał przerobić wszystko.
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerVocation(cid) == 5 then
setPlayerPromotionLevel(cid, 2)
doCreatureSay(cid, "You are now a Super Sorcerer!", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 1)
elseif getPlayerVocation(cid) == 6 then
setPlayerPromotionLevel(cid, 2)
doCreatureSay(cid, "You are now a Super Druid!", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 1)
elseif getPlayerVocation(cid) == 7 then
setPlayerPromotionLevel(cid, 2)
doCreatureSay(cid, "You are now a Super Paladin!", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 1)
elseif getPlayerVocation(cid) == 8 then
setPlayerPromotionLevel(cid, 2)
doCreatureSay(cid, "You are now a Super Knight!", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 1)
else
doPlayerSendCancel(cid,"You need to be promoted in order to use this item.")
end
end