Postado Outubro 20, 2014 10 anos A Ideia: Eu estou criando um servidor 7.6 WAR a umas 2 semanas e eu já editei bastante coisa porém eu não estou conseguindo criar um script para cada Vocation começar com determinados Itens e Skills Por enquanto eu já coloquei para começar level 80 e Ml 50 e tais itens para Mage! Porém se o cara criar um Knight vai ficar muito roubado ter um Ml de 50. Também tirei qualquer tipo de evolução de skills e assim também perda delas ou seja todos estão programados para estar permanentemente: *LVL: 80 *ML: 50 *Skills: 10 *Itens de Mage Script: Gostaria de uma ajuda nesse script para quando o player criar o Character e escolher a vocação, ao iniciar o jogo já começar predefinido os itens e skills, diferente para cada uma! Um dia você brinca o outro é o brinquedo! -Desconhecido
Postado Outubro 20, 2014 10 anos nunca mexi com ot 7.6 mais déve ser mesma coisa vai em data/creaturescripts/scripts abra o arquivo firstitems lá você escolhe os itens que cada vocação vai começar. Já o problema das skills não posso te ajudar Ajudei? então de um Rep+ Att,Dieguiin XP »»http://baiakfull.com/««
Postado Outubro 21, 2014 10 anos já começar predefinido os itens e skills, diferente para cada uma Não testei newplayer.lua (data/creaturescripts/scripts): local tab = { items = { [1] = {1234, 2341, 3412, 4123, 4321}, -- {itemid1, itemdid2, itemdi3..} [2] = {1234, 2341, 3412, 4123, 4321}, [3] = {1234, 2341, 3412, 4123, 4321}, [4] = {1234, 2341, 3412, 4123, 4321} }, skills = { [1] = {fist = 10, club = 10, sword = 10, axe = 10, distance = 10, shield = 10, ml = 50}, [2] = {fist = 10, club = 10, sword = 10, axe = 10, distance = 10, shield = 10, ml = 50}, [3] = {fist = 10, club = 10, sword = 10, axe = 10, distance = 10, shield = 10, ml = 50}, [4] = {fist = 10, club = 10, sword = 10, axe = 10, distance = 10, shield = 10, ml = 50} }, containers = { [1] = {hpotion = {1234, 50}, mpotion = {4321, 50}, others = {123, 456, 789}}, -- {hpotion = {itemid, count}, mpotion = {itemid, count}, others = {itemid1, itemid2, itemid3..} [2] = {hpotion = {1234, 50}, mpotion = {4321, 50}, others = {123, 456, 789}}, [3] = {hpotion = {1234, 50}, mpotion = {4321, 50}, others = {123, 456, 789}}, [4] = {hpotion = {1234, 50}, mpotion = {4321, 50}, others = {123, 456, 789}} } } function onLogin(cid) local bag = doPlayerAddItem(cid, 12345, 1) -- 12345 = itemid da bag/backpack na qual serão adicionados os itens configurados em tab.containers if(getPlayerLastLoginSaved(cid) == 0) then for i = 1, table.maxn(tab.items[getPlayerVocation(cid)]) do for c = 1, table.maxn(tab.containers.others[getPlayerVocation(cid)]) do for voc, s in pairs(tab.skills[getPlayerVocation(cid)]) do doAddContainerItem(bag, tab.containers[getPlayerVocation(cid)].others[c], 1) doAddContainerItem(bag, tab.containers[getPlayerVocation(cid)].hpotion[1], tab.containers[getPlayerVocation(cid)].hpotion[2]) doAddContainerItem(bag, tab.containers[getPlayerVocation(cid)].mpotion[1], tab.containers[getPlayerVocation(cid)].mpotion[2]) doPlayerAddItem(cid, tab.items[getPlayerVocation(cid)][i], 1) doPlayerAddSkillTry(cid, SKILL_FIST, s.fist) doPlayerAddSkillTry(cid, SKILL_CLUB, s.club) doPlayerAddSkillTry(cid, SKILL_SWORD, s.sword) doPlayerAddSkillTry(cid, SKILL_AXE, s.axe) doPlayerAddSkillTry(cid, SKILL_DISTANCE, s.distance) doPlayerAddSkillTry(cid, SKILL_SHIELD, s.shield) doPlayerAddSkillTry(cid, SKILL__MAGLEVEL, s.ml) end end end end return true end tag - creaturescripts.xml (data/creaturescripts): <event type="login" name="NewPlayer" event="script" value="newplayer.lua"/> Ah sim, em ambas as tabelas, onde está: [1] = {.. [2] = {.. [3] = {.. [4] = {.. Esses números entre os colchetes [] são os IDs das vocações. Usei os valores no script como exemplo, é só alterar como preferir. Editado Outubro 21, 2014 10 anos por Suicide (veja o histórico de edições) The corrupt fear us. The honest support us. The heroic join us.
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.