Postado Março 9, 2017 8 anos Autor 2 horas atrás, robi123 disse: @xWhiteWolf Amigo eu fiz esse modelo aqui... mais ta dando aquele erro ali embaixo.. da uma luz pra mim ???? vlww if doPlayerSetVocation(cid,1 ,2 ,4 ,5 ,6 ,7 ,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 if doPlayerSetVocation(cid,3 ,9 ,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 end vc tá usando doPlayerSetVocation ao invés de doPlayerGetVocation() e pra verificar varios numeros vc tem que usar isInArray({1,2,4,5,6}, getPlayerVocation(cid)) Todos os meus trabalhos importantes estão na seção "Sobre mim" no meu perfil; Dá uma passada lá! "Há três caminhos para o fracasso: não ensinar o que se sabe, não praticar o que se ensina, e não perguntar o que se ignora." - São Beda (obg ao @Beeny por fazer essa linda sign <3)
Postado Março 9, 2017 8 anos @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
Postado Março 10, 2017 8 anos Autor 3 horas atrás, robi123 disse: @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 o legal da computação é que você não precisa fazer do meu jeito, desse jeito fica grande? fica? mas funciona igual... Lembra que player não lê script, então se vc conseguiu fazer, mesmo que do seu jeito, vc é muito muito mais talentoso do que você imagina... Todos os meus trabalhos importantes estão na seção "Sobre mim" no meu perfil; Dá uma passada lá! "Há três caminhos para o fracasso: não ensinar o que se sabe, não praticar o que se ensina, e não perguntar o que se ignora." - São Beda (obg ao @Beeny por fazer essa linda sign <3)
Postado Março 10, 2017 8 anos @xWhiteWolf vlww Editado Março 10, 2017 8 anos por robi123 (veja o histórico de edições)
Postado Março 19, 2017 8 anos @xWhiteWolf, seria possivel ao invez de dar xp e skill, dar itens como recompenças? esses sistema de task e perfeito, porém queria dar item de recompença em todas elas, kill, collete, e randon!!
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.