Postado Maio 9, 2014 11 anos Fala galerinha geniosa do TK. Hoje venho pedir a ajuda de vocês. Estou tentando desenvolver um sistema, mas está muito complicado... o sistema funciona da seguinte maneira: O player da use no baú no final da quest, o mesmo verifica a vocação e adiciona o skill de acordo com a vocação. mages = {Druid(id 2), Sorcerer(id 1), VOC NOVA(id 15), Elder Druid(id 6), Master sorcerer(id 5), Promotion nova voc(id 16) Vai adicionar 5 magic level nas vocações citadas acima... e paladin ganhará 15 de distance fighting knight vai ganhar 15 na skill mais alta, exemplo ele tem 20 em sword, 40 em club e 70 em axe, ele vai ganhar mais 15 em axe. e uma outra vocação que vai ganhar 15 de club que o nome ainda nao dei, mas é algo com thor... id dela é 13, promotion 14. e tambem uma storage pro player só poder fazer uma fez a quest... Agradeço desde já REP+ '' Uma ideia é apenas uma ideia, até ser desenvolvida, mastigada, retratada, analisada e por fim se tornar uma boa ideia. ''
Postado Maio 14, 2014 11 anos function doPlayerAddMagicLevel(cid, amount) return doPlayerAddSpentMana(cid, getPlayerRequiredMana(cid, getPlayerMagLevel(cid, true) + amount) - getPlayerSpentMana(cid)) end local STORAGE = 20 function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, STORAGE)>= 1 then return true end local voc = getPlayerVocation(cid) if voc == 1 or voc == 2 or voc == 5 or voc == 6 or voc == 15 or voc == 16 then doPlayerAddMagicLevel(cid, 5) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Você abriu um baú e ganhou 15 de skill em magic level, parabéns.") elseif voc == 3 or voc == 7 then doPlayerAddSkill(cid, SKILL_DISTANCE, 15) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Você abriu um baú e ganhou 15 de skill em distance fighting, parabéns.") elseif voc == 4 or voc == 8 then local club = getPlayerSkillLevel(cid, 1) local sword = getPlayerSkillLevel(cid,2) local axe = getPlayerSkillLevel(cid, 3) local skill_add = "" if club > sword and club > axe then doPlayerAddSkill(cid, 1, 15) skill_add = "club" elseif axe > club and axe > sword then doPlayerAddSkill(cid, 2, 15) skill_add = "axe" else doPlayerAddSkill(cid, 3, 15) skill_add = "sword" end doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Você abriu um baú e ganhou 15 de skill em ".. skill_add .. " fighting, parabéns.") elseif voc == 13 or voc == 14 then doPlayerAddSkill(cid, 1, 15) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Você abriu um baú e ganhou 15 de skill em club, parabéns.") end setPlayerStorageValue(cid, STORAGE, 1) return true end Não encontrei a função que adiciona magic level ao player, por isso pode ser que não funcione bem no seu servidor. Testa aí. Editado Maio 14, 2014 11 anos por Ina Kion (veja o histórico de edições)
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.