Hi, I have a problem I can not solve it: /
Console debug:
Only work change vocation and outfit + effect
but dont give Health and Mana :/
Code:
local config = {
[1] = { 25, 2, 840, 208},
[2] = { 50, 3, 91, 208},
[3] = { 75, 4, 841, 208},
[4] = { 100, 5, 676, 208},
[5] = { 125, 6, 842, 208},
[6] = { 150, 7, 40, 208},
[7] = { 175, 8, 305, 208},
[8] = { 200, 9, 677, 208},
[9] = { 225, 10, 686, 208},
[10] = { 250, 11, 179, 208},
[11] = { 275, 12, 683, 208},
[12] = { 300, 13, 397, 208},
[13] = { 400, 14, 607, 208},
[14] = { 425, 15, 752, 208},
[15] = { 500, 16, 875, 208},
}
local przyrost = createConditionObject(CONDITION_ATTRIBUTES)
function onSay(cid, words, param, channel)
local voc = config[getPlayerVocation(cid)]
if voc then
setConditionParam(przyrost, CONDITION_PARAM_TICKS, -1)
setConditionParam(przyrost, CONDITION_PARAM_STAT_MAXHITPOINTSPERCENT, voc[4])
setConditionParam(przyrost, CONDITION_PARAM_STAT_MAXMANAPOINTSPERCENT, voc[4])
end
if (getPlayerStorageValue(cid,112) > 0) then
return doPlayerSendCancel(cid, "raz dwa trzy")
end
if voc then
if getPlayerLevel(cid) >= voc[1] then
doPlayerSetVocation(cid, voc[2])
local outfit = {lookType = voc[3]}
doCreatureChangeOutfit(cid, outfit)
doAddCondition(cid, przyrost)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Potrzebujesz " .. voc[1] .. " poziomu.")
end
else
doPlayerSendCancel(cid, "Nie!")
end
return true
end
Console debug:
[Error - TalkAction Interface]
data/talkactions/scripts/trans.luanSay
Description:
<luaSetConditionParam> This fuctions can only be used while loading the script.
Only work change vocation and outfit + effect
but dont give Health and Mana :/
Last edited by a moderator: