@xWhiteWolf faz esse pra mim bem de parceria, eu não entendo nada disso, aquilo ali eu fiz chutando :S
eu sou um zero a frente eheheh
Eu nao consegui fazer do seu jeito
mais fiz uma ganbiara pra ficar assim...
if getPlayerVocation(cid) == 1 then
if (type == 1) or (doPlayerRemoveItem(cid, getPlayerStorageValue(cid, storages.name), getPlayerStorageValue(cid, storages.maxcount)) and type == 2) then
-- a divisao por 3000 foi porque cada ponto de skill try equivale a 30 tries de skill e nos naturalmente dividimos por 100. 1/30 * 1/100 = 1/3000
local qnt = math.ceil(getPlayerRequiredSkillTries(cid, SKILL_SWORD, getPlayerSkillLevel(cid, SKILL_SWORD) / 2) +70/1000) * ((getPlayerStorageValue(cid, storages.length)) * (getPlayerStorageValue(cid, storages.difficult)) * config.multiplicator)
local qnt = math.ceil(getPlayerRequiredSkillTries(cid, SKILL_SHIELD, getPlayerSkillLevel(cid, SKILL_SHIELD) / 2) +70/1000) * ((getPlayerStorageValue(cid, storages.length)) * (getPlayerStorageValue(cid, storages.difficult)) * config.multiplicator)
for k, v in pairs(storages) do
setPlayerStorageValue(cid, v, 0)
end
doPlayerAddSkillTry(cid, SKILL_SWORD, qnt)
doPlayerAddSkillTry(cid, SKILL_SHIELD, qnt)
doSendMagicEffect(getCreaturePosition(cid), 39)
talkState[talkUser] = 0
selfSay('Thanks for your help, here is your prize..', cid)
end
elseif getPlayerVocation(cid) == 2 then
if (type == 1) or (doPlayerRemoveItem(cid, getPlayerStorageValue(cid, storages.name), getPlayerStorageValue(cid, storages.maxcount)) and type == 2) then
-- a divisao por 3000 foi porque cada ponto de skill try equivale a 30 tries de skill e nos naturalmente dividimos por 100. 1/30 * 1/100 = 1/3000
local qnt = math.ceil(getPlayerRequiredSkillTries(cid, SKILL_SWORD, getPlayerSkillLevel(cid, SKILL_SWORD) / 2) +70/1000) * ((getPlayerStorageValue(cid, storages.length)) * (getPlayerStorageValue(cid, storages.difficult)) * config.multiplicator)
local qnt = math.ceil(getPlayerRequiredSkillTries(cid, SKILL_SHIELD, getPlayerSkillLevel(cid, SKILL_SHIELD) / 2) +70/1000) * ((getPlayerStorageValue(cid, storages.length)) * (getPlayerStorageValue(cid, storages.difficult)) * config.multiplicator)
for k, v in pairs(storages) do
setPlayerStorageValue(cid, v, 0)
end
doPlayerAddSkillTry(cid, SKILL_SWORD, qnt)
doPlayerAddSkillTry(cid, SKILL_SHIELD, qnt)
doSendMagicEffect(getCreaturePosition(cid), 39)
talkState[talkUser] = 0
selfSay('Thanks for your help, here is your prize..', cid)
end
elseif getPlayerVocation(cid) == 4 then
if (type == 1) or (doPlayerRemoveItem(cid, getPlayerStorageValue(cid, storages.name), getPlayerStorageValue(cid, storages.maxcount)) and type == 2) then
-- a divisao por 3000 foi porque cada ponto de skill try equivale a 30 tries de skill e nos naturalmente dividimos por 100. 1/30 * 1/100 = 1/3000
local qnt = math.ceil(getPlayerRequiredSkillTries(cid, SKILL_SWORD, getPlayerSkillLevel(cid, SKILL_SWORD) / 2) +70/1000) * ((getPlayerStorageValue(cid, storages.length)) * (getPlayerStorageValue(cid, storages.difficult)) * config.multiplicator)
local qnt = math.ceil(getPlayerRequiredSkillTries(cid, SKILL_SHIELD, getPlayerSkillLevel(cid, SKILL_SHIELD) / 2) +70/1000) * ((getPlayerStorageValue(cid, storages.length)) * (getPlayerStorageValue(cid, storages.difficult)) * config.multiplicator)
for k, v in pairs(storages) do
setPlayerStorageValue(cid, v, 0)
end
doPlayerAddSkillTry(cid, SKILL_SWORD, qnt)
doPlayerAddSkillTry(cid, SKILL_SHIELD, qnt)
doSendMagicEffect(getCreaturePosition(cid), 39)
talkState[talkUser] = 0
selfSay('Thanks for your help, here is your prize..', cid)
end
elseif getPlayerVocation(cid) == 5 then
if (type == 1) or (doPlayerRemoveItem(cid, getPlayerStorageValue(cid, storages.name), getPlayerStorageValue(cid, storages.maxcount)) and type == 2) then
-- a divisao por 3000 foi porque cada ponto de skill try equivale a 30 tries de skill e nos naturalmente dividimos por 100. 1/30 * 1/100 = 1/3000
local qnt = math.ceil(getPlayerRequiredSkillTries(cid, SKILL_SWORD, getPlayerSkillLevel(cid, SKILL_SWORD) / 2) +70/1000) * ((getPlayerStorageValue(cid, storages.length)) * (getPlayerStorageValue(cid, storages.difficult)) * config.multiplicator)
local qnt = math.ceil(getPlayerRequiredSkillTries(cid, SKILL_SHIELD, getPlayerSkillLevel(cid, SKILL_SHIELD) / 2) +70/1000) * ((getPlayerStorageValue(cid, storages.length)) * (getPlayerStorageValue(cid, storages.difficult)) * config.multiplicator)
for k, v in pairs(storages) do
setPlayerStorageValue(cid, v, 0)
end
doPlayerAddSkillTry(cid, SKILL_SWORD, qnt)
doPlayerAddSkillTry(cid, SKILL_SHIELD, qnt)
doSendMagicEffect(getCreaturePosition(cid), 39)
talkState[talkUser] = 0
selfSay('Thanks for your help, here is your prize..', cid)
end
elseif getPlayerVocation(cid) == 6 then
if (type == 1) or (doPlayerRemoveItem(cid, getPlayerStorageValue(cid, storages.name), getPlayerStorageValue(cid, storages.maxcount)) and type == 2) then
-- a divisao por 3000 foi porque cada ponto de skill try equivale a 30 tries de skill e nos naturalmente dividimos por 100. 1/30 * 1/100 = 1/3000
local qnt = math.ceil(getPlayerRequiredSkillTries(cid, SKILL_SWORD, getPlayerSkillLevel(cid, SKILL_SWORD) / 2) +70/1000) * ((getPlayerStorageValue(cid, storages.length)) * (getPlayerStorageValue(cid, storages.difficult)) * config.multiplicator)
local qnt = math.ceil(getPlayerRequiredSkillTries(cid, SKILL_SHIELD, getPlayerSkillLevel(cid, SKILL_SHIELD) / 2) +70/1000) * ((getPlayerStorageValue(cid, storages.length)) * (getPlayerStorageValue(cid, storages.difficult)) * config.multiplicator)
for k, v in pairs(storages) do
setPlayerStorageValue(cid, v, 0)
end
doPlayerAddSkillTry(cid, SKILL_SWORD, qnt)
doPlayerAddSkillTry(cid, SKILL_SHIELD, qnt)
doSendMagicEffect(getCreaturePosition(cid), 39)
talkState[talkUser] = 0
selfSay('Thanks for your help, here is your prize..', cid)
end
elseif getPlayerVocation(cid) == 7 then
if (type == 1) or (doPlayerRemoveItem(cid, getPlayerStorageValue(cid, storages.name), getPlayerStorageValue(cid, storages.maxcount)) and type == 2) then
-- a divisao por 3000 foi porque cada ponto de skill try equivale a 30 tries de skill e nos naturalmente dividimos por 100. 1/30 * 1/100 = 1/3000
local qnt = math.ceil(getPlayerRequiredSkillTries(cid, SKILL_SWORD, getPlayerSkillLevel(cid, SKILL_SWORD) / 2) +70/1000) * ((getPlayerStorageValue(cid, storages.length)) * (getPlayerStorageValue(cid, storages.difficult)) * config.multiplicator)
local qnt = math.ceil(getPlayerRequiredSkillTries(cid, SKILL_SHIELD, getPlayerSkillLevel(cid, SKILL_SHIELD) / 2) +70/1000) * ((getPlayerStorageValue(cid, storages.length)) * (getPlayerStorageValue(cid, storages.difficult)) * config.multiplicator)
for k, v in pairs(storages) do
setPlayerStorageValue(cid, v, 0)
end
doPlayerAddSkillTry(cid, SKILL_SWORD, qnt)
doPlayerAddSkillTry(cid, SKILL_SHIELD, qnt)
doSendMagicEffect(getCreaturePosition(cid), 39)
talkState[talkUser] = 0
selfSay('Thanks for your help, here is your prize..', cid)
end
elseif getPlayerVocation(cid) == 8 then
if (type == 1) or (doPlayerRemoveItem(cid, getPlayerStorageValue(cid, storages.name), getPlayerStorageValue(cid, storages.maxcount)) and type == 2) then
-- a divisao por 3000 foi porque cada ponto de skill try equivale a 30 tries de skill e nos naturalmente dividimos por 100. 1/30 * 1/100 = 1/3000
local qnt = math.ceil(getPlayerRequiredSkillTries(cid, SKILL_SWORD, getPlayerSkillLevel(cid, SKILL_SWORD) / 2) +70/1000) * ((getPlayerStorageValue(cid, storages.length)) * (getPlayerStorageValue(cid, storages.difficult)) * config.multiplicator)
local qnt = math.ceil(getPlayerRequiredSkillTries(cid, SKILL_SHIELD, getPlayerSkillLevel(cid, SKILL_SHIELD) / 2) +70/1000) * ((getPlayerStorageValue(cid, storages.length)) * (getPlayerStorageValue(cid, storages.difficult)) * config.multiplicator)
for k, v in pairs(storages) do
setPlayerStorageValue(cid, v, 0)
end
doPlayerAddSkillTry(cid, SKILL_SWORD, qnt)
doPlayerAddSkillTry(cid, SKILL_SHIELD, qnt)
doSendMagicEffect(getCreaturePosition(cid), 39)
talkState[talkUser] = 0
selfSay('Thanks for your help, here is your prize..', cid)
end
elseif getPlayerVocation(cid) == 9 then
if (type == 1) or (doPlayerRemoveItem(cid, getPlayerStorageValue(cid, storages.name), getPlayerStorageValue(cid, storages.maxcount)) and type == 2) then
-- a divisao por 3000 foi porque cada ponto de skill try equivale a 30 tries de skill e nos naturalmente dividimos por 100. 1/30 * 1/100 = 1/3000
local qnt = math.ceil(getPlayerRequiredSkillTries(cid, SKILL_DISTANCE, getPlayerSkillLevel(cid, SKILL_DISTANCE) / 2) +70/1000) * ((getPlayerStorageValue(cid, storages.length)) * (getPlayerStorageValue(cid, storages.difficult)) * config.multiplicator)
local qnt = math.ceil(getPlayerRequiredSkillTries(cid, SKILL_SHIELD, getPlayerSkillLevel(cid, SKILL_SHIELD) / 2) +70/1000) * ((getPlayerStorageValue(cid, storages.length)) * (getPlayerStorageValue(cid, storages.difficult)) * config.multiplicator)
for k, v in pairs(storages) do
setPlayerStorageValue(cid, v, 0)
end
doPlayerAddSkillTry(cid, SKILL_DISTANCE, qnt)
doPlayerAddSkillTry(cid, SKILL_SHIELD, qnt)
doSendMagicEffect(getCreaturePosition(cid), 39)
talkState[talkUser] = 0
selfSay('Thanks for your help, here is your prize..', cid)
else
selfSay('Something went wrong..', cid)
end
elseif getPlayerVocation(cid) == 10 then
if (type == 1) or (doPlayerRemoveItem(cid, getPlayerStorageValue(cid, storages.name), getPlayerStorageValue(cid, storages.maxcount)) and type == 2) then
-- a divisao por 3000 foi porque cada ponto de skill try equivale a 30 tries de skill e nos naturalmente dividimos por 100. 1/30 * 1/100 = 1/3000
local qnt = math.ceil(getPlayerRequiredSkillTries(cid, SKILL_DISTANCE, getPlayerSkillLevel(cid, SKILL_DISTANCE) / 2) +70/1000) * ((getPlayerStorageValue(cid, storages.length)) * (getPlayerStorageValue(cid, storages.difficult)) * config.multiplicator)
local qnt = math.ceil(getPlayerRequiredSkillTries(cid, SKILL_SHIELD, getPlayerSkillLevel(cid, SKILL_SHIELD) / 2) +70/1000) * ((getPlayerStorageValue(cid, storages.length)) * (getPlayerStorageValue(cid, storages.difficult)) * config.multiplicator)
for k, v in pairs(storages) do
setPlayerStorageValue(cid, v, 0)
end
doPlayerAddSkillTry(cid, SKILL_DISTANCE, qnt)
doPlayerAddSkillTry(cid, SKILL_SHIELD, qnt)
doSendMagicEffect(getCreaturePosition(cid), 39)
talkState[talkUser] = 0
selfSay('Thanks for your help, here is your prize..', cid)
else
selfSay('Something went wrong..', cid)
end