Postado Agosto 7, 2012 12 anos Meu ot vem com vocações nova: arquivo vocations xml <?xml version="1.0" encoding="UTF-8"?> <vocations> <vocation id="0" name="None" description="none" needpremium="0" gaincap="5" gainhp="5" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="2" manamultiplier="4.0" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="0" attackable="no"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="5" name="Sorcerer" description="a sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="3" gainhpamount="50" gainmanaticks="2" gainmanaamount="100" manamultiplier="1.1" attackspeed="800" soulmax="100" gainsoulticks="120" fromvoc="1"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="6" name="Druid" description="a druid" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="3" gainhpamount="50" gainmanaticks="2" gainmanaamount="100" manamultiplier="1.1" attackspeed="800" soulmax="100" gainsoulticks="120" fromvoc="2"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="7" name="Paladin" description="a paladin" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="75" gainmanaticks="3" gainmanaamount="75" manamultiplier="1.4" attackspeed="1500" soulmax="100" gainsoulticks="120" fromvoc="3"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="8" name="Knight" description="a knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="10" gainhpamount="5" gainmanaticks="6" gainmanaamount="3" manamultiplier="3.0" attackspeed="1500" soulmax="100" gainsoulticks="120" fromvoc="4"> <formula meleeDamage="2.5" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.5" defense="1.5" magDefense="1.0" armor="1.0"/> <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="1" name="Master Sorcerer" description="a master sorcerer" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="2" gainhpamount="50" gainmanaticks="2" gainmanaamount="100" manamultiplier="1.1" attackspeed="800" soulmax="200" gainsoulticks="1" fromvoc="5" lessloss="30"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="2" name="Elder Druid" description="an elder druid" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="2" gainhpamount="50" gainmanaticks="2" gainmanaamount="100" manamultiplier="1.1" attackspeed="800" soulmax="200" gainsoulticks="1" fromvoc="6" lessloss="30"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="3" name="Royal Paladin" description="a royal paladin" needpremium="1" gaincap="20" gainhp="10" gainmana="15" gainhpticks="2" gainhpamount="75" gainmanaticks="3" gainmanaamount="75" manamultiplier="1.4" attackspeed="1000" soulmax="200" gainsoulticks="1" fromvoc="7" lessloss="30"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="4" name="Elite Knight" description="an elite knight" needpremium="1" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="100" gainmanaticks="2" gainmanaamount="50" manamultiplier="3.0" attackspeed="1000" soulmax="200" gainsoulticks="1" fromvoc="8" lessloss="30"> <formula meleeDamage="1.5" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.5" defense="1.5" magDefense="1.0" armor="1.0"/> <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="9" name="Hell Wizard" description="an hell wizard" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="2" gainhpamount="100" gainmanaticks="2" gainmanaamount="200" manamultiplier="1.1" attackspeed="800" soulmax="200" gainsoulticks="1" fromvoc="9" lessloss="50"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="10" name="High Saintess" description="an high saintess" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="2" gainhpamount="100" gainmanaticks="2" gainmanaamount="200" manamultiplier="1.1" attackspeed="800" soulmax="200" gainsoulticks="1" fromvoc="10" lessloss="50"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="11" name="Force Archer" description="an force archer" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="2" gainhpamount="150" gainmanaticks="2" gainmanaamount="150" manamultiplier="1.4" attackspeed="600" soulmax="200" gainsoulticks="1" fromvoc="11" lessloss="50"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="12" name="Titan Blader" description="an titan blader" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="200" gainmanaticks="2" gainmanaamount="100" manamultiplier="3.0" attackspeed="1000" soulmax="200" gainsoulticks="1" fromvoc="12" lessloss="50"> <formula meleeDamage="2.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="2.0" defense="2.0" magDefense="1.0" armor="1.0"/> <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> </vocations> Então criei um npc para dar essas vocações supremas, mas ele dá a vocação e tals com o item, mas qdo da logout o personagem volta ser a vocação anterior.... o arquivo xml do npc <?xml version="1.0" encoding="UTF-8"?> <npc name="Lord of Vocation" script="data/npc/scripts/vocationsuprema.lua" walkinterval="2000" floorchange="0"> <mana now="800" max="800"/> <health now="200" max="200"/> <look type="133" head="114" body="119" legs="132" feet="114"/> <parameters> <parameter key="message_greet" value="Ola |PLAYERNAME|. Você deseja comprar vocação suprema? Basta você dizer !vip suprem vocation, apos isso diga-me {voc suprem} ." /> </parameters> </npc> e o script dele local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid if(msgcontains(msg, 'voc suprem') or msgcontains(msg, 'voc suprem')) then selfSay('Deseja virar {Voc suprem} ?', cid) talkState[talkUser] = 1 elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then if(getPlayerItemCount(cid, 142) >= 1) then doPlayerRemoveItem(cid, 142, 1) doPlayerSetVocation(cid, getPlayerVocation(cid) > 4 and getPlayerVocation(cid) + 4 or getPlayerVocation(cid) + 8) selfSay('Parabéns você acaba de completar Asgard.', cid) else selfSay('Você não tem {suprem vocation} suficientes.', cid) end talkState[talkUser] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Não sei onde ta o erro me ajuda plx
Postado Agosto 8, 2012 12 anos em data>lib>vocations.lua Adicione as novas vocações!! Ou troque por este(fiz para vc): function isSorcerer(cid) return isInArray({1, 5, 9}, getPlayerVocation(cid)) end function isDruid(cid) return isInArray({2, 6, 10}, getPlayerVocation(cid)) end function isPaladin(cid) return isInArray({3, 7, 11}, getPlayerVocation(cid)) end function isKnight(cid) return isInArray({4, 8, 12}, getPlayerVocation(cid)) end function isRookie(cid) return isInArray({0}, getPlayerVocation(cid)) end
Postado Dezembro 29, 2017 7 anos bom dia, tbm estou com o mesmo problema, o npc lord of vocation pede pra mim falar voc suprem eu falo ele pede 1 item mais n sei qual item é. o meu npc nao esta funfando, me ajuda por favor ..
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.