Ir para conteúdo

xWhiteWolf

Héroi
  • Registro em

  • Última visita

Tudo que xWhiteWolf postou

  1. me passa seu creaturescripts.xml.. cola tudo dele aqui; E me passa o seu creaturescripts\scripts\login.lua
  2. abre o script da vara e da picareta e coloca um local storage = 1479 local storaged = getPlayerStorageValue(cid,storage) if storaged > 0 then resto da action
  3. a storage é da quest, esse script q eu passei foi pra equipar o item. Pra impedir de usar ele mesmo estando na bag precisa mudar a actions da picareta e da vara
  4. não ser mais específico doque eu fui, ta dando conflito de storage entre a quest e a arena (não tem como eu te explicar nada além disso se vc n postar os scripts aqui pra mim analisar) dá uma olhada ai nos seus scripts e muda o storage de 1 das duas
  5. ja atualizei lá cara
  6. xWhiteWolf respondeu ao post em um tópico de lnavas em Suporte Tibia OTServer
    até onde eu sei não dá, só se vc mexer nas sources :~
  7. na certa o storage que você utilizou pra vocação da quest é o mesmo que o do script de arena, por isso ele te impede de deslogar.
  8. @AnaPaula não é complicado, dá uma olhada: adicione essa linha no movements.xml: <movevent type="Equip" itemid="2472" slot="armor" event="script" value="questitem.lua"/> itemid: id do item que vc tá querendo fazer isso slot: qual slot vai ser, nesse caso tá configurado pra uma armor agora crie um arquivo em movements\scripts chamado questitem.lua e adicione o seguinte: --[[Script made by Night Wolf for damiaotorres exclusive for tibiaking.com]] function onEquip(cid, item, position, fromPosition) local config = { storage = 1479 } local storaged = getPlayerStorageValue(cid,config.storage) if storaged < 1 then doPlayerPopupFYI(cid, "You can't equip this item because you haven't done the quest") else return true end end mude ali no storage pro storage da quest que vc quiser e repita pra quantos itens quiser, mas lembre-se que isso vai dar um erro no console de duplicate id porque uma das declarações vai ser pro item funcionar e a outra é pra requerer quest dele.
  9. nunca mexi com sistema de montaria e nem com essas versões mais novas de tibia mas acredito que seja só adaptar esse script aqui http://www.tibiaking.com/forum/topic/17243-resolvidopedido-sistema-mounts/ boa sorte pra você ou pra quem for tentar te ajudar
  10. editei novamente, agora pras classes que você corrigiu.
  11. aqui tem um exemplo de post parecido.. vê se te ajuda nas futuras edições que vc for fazer http://www.tibiaking.com/forum/topic/31450-pedido-editar-items/
  12. npc\promoter.xml <?xml version="1.0" encoding="UTF-8"?> <npc name="Promoter" script="data/npc/scripts/promotion.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"/> </npc> npc\scripts\promotion.lua local focus = 0 local talk_start = 0 local target = 0 local days = 0 function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(cid, pos) if focus == cid then selfSay('Good bye then.') focus = 0 talk_start = 0 end end function onCreatureTurn(creature) end function msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)')) end function onCreatureSay(cid, type, msg) msg = string.lower(msg) if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then selfSay('Hello ' .. creatureGetName(cid) .. '! I sell new promotions.') focus = cid talk_start = os.clock() elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then selfSay('Sorry, ' .. creatureGetName(cid) .. '! I talk to you in a minute.') elseif focus == cid then talk_start = os.clock() if msgcontains(msg, 'promotion') or msgcontains(msg, 'promote') then if getPlayerVocation(cid) > 4 then selfSay('Sorry, you are already promoted.') talk_state = 0 elseif getPlayerLevel(cid) < 20 then selfSay('Sorry, you need level 20 to buy promotion.') talk_state = 0 elseif not isPremium(cid) then selfSay('Sorry, you must be premium to buy promotion.') talk_state = 0 else selfSay('Do you want to buy promotion for 20k?') talk_state = 1 end elseif talk_state == 1 then if msgcontains(msg, 'yes') then if pay(cid,20000) then doPlayerSetVocation(cid, getPlayerVocation(cid)+4) selfSay('You are now promoted!') else selfSay('Sorry, you do not have enough money.') end end talk_state = 0 elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then selfSay('Good bye, ' .. creatureGetName(cid) .. '!') focus = 0 talk_start = 0 end end end function onCreatureChangeOutfit(creature) end function onThink() doNpcSetCreatureFocus(focus) if (os.clock() - talk_start) > 30 then if focus > 0 then selfSay('Next Please...') end focus = 0 end if focus ~= 0 then if getDistanceToCreature(focus) > 5 then selfSay('Good bye then.') focus = 0 end end end depois é só ir no mapa editor, e colocar ele aonde vc quiser ou abrir o server e digitar "/s Promoter" com o god
  13. acho que tu esqueceu de declarar o script no creaturescripts\scripts\login.lua registerCreatureEvent(cid, "glacierrobe") Se você mudou o nome do script, tem que mudar nesse 'glacierrobe' também.
  14. Primeiro: qual a versão do tibia? Segundo: porque a wand tá como great.lua no weapons.xml se vc tá dizendo que o script se chama weapons.script??? Faz isso daqui e me fala se resolveu: weapons\weapons.xml <wand id="12609" level="10" mana="10" event="scripts" value="newwand.lua"> <vocation id="2"/> <vocation id="1"/> </wand> weapons\scripts\newwand.lua local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, 37) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 28) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0, -300, 0, -500) function onUseWeapon(cid, var) return doCombat(cid, combat, var) end Se der certo você muda o range no items.xml. Se não der você ignora o script e adiciona isso daqui na weapons.xml <wand id="12609" level="10" mana="10" min="700" max="1500" type="death" event="function" value="default"> <vocation id="2"/> <vocation id="1"/> </wand> e não esquece de ir no items.xml <item id="12609" article="the" name="Nome da Wand"> <attribute key="description" value="Comentario que aparece quando você da look na wand."/> <attribute key="weight" value="2300"/> <attribute key="weaponType" value="wand"/> <attribute key="range" value="O mesmo valor de alcançe que você botou no weapons.xml"/> </item> obs: veja esse link aqui que tá explicando passo a passo como fazer itens editados http://www.tibiaking.com/forum/topic/31450-pedido-editar-items/
  15. balancear vocações não é só sobre o vocations.xml, você tem que levar em consideração os itens e as weapons que tem no seu server, as magias que vc colocou, a versão, as runas e os scripts em geral
  16. xWhiteWolf respondeu ao post em um tópico de eunaosei123 em Suporte Tibia OTServer
    como assim uma action? Actions são funções do tipo OnUse, elas acontecem após você dar use em algo. No caso, oque dá pra fazer é uma action que ao clicar em determinado item, ele crie um teleporte que te manda pra determinada posição. Tenho razões pra acreditar que oque vc quer de verdade é saber como colocar um "ActionID", esses são ID'S que vc declarar no map editor em determinados lugares para que ao passar por aqueles lugares ative o movements. <movement type="StepIn" actionid="3202" event="Script" value="tpdelvl.lua"/> esse seu script funciona assim, vc coloca um teleporte no mapa editor, clica com o botão direito nele e insere o actionid 3202. Depois disso, toda vez que um player pisar no teleporte ele executará o script, que teleporta pra 'posi' caso o player seja level menor ou igual a 140 e que levo o player pra 'volta' caso ele seja maior que 140
  17. 1) da uma pesquisada antes porque tem mil tópicos aqui ensinando a fazer isso. 2) Quando for fazer um tópico já deixa explícito tudo que vc quer 3) se vc quer que todas as classes usem um determinado item não precisa declarar nenhuma vocação
  18. esse que eu fiz ele reseta primeiro nv mil, dps disso o level pra resetar vai ser 1000+levelbyreset (que no caso que é 1500) dai será 2500, dai o proximo nv vai ser 2500+1500, dps 4000+1500 dps 5500+1500; Não entendi direito oque vc quis dizer, tá do jeito que vc pediu
  19. da uma pesquisada no fórum antes amigo, só essa semana eu ja respondi duas dúvidas iguais a essa. npc\scripts\reset.lua --[[Script made 100% by Nogard and Night Wolf. You can feel free to edit anything you want, but don't remove the credits]] local config = { minlevel = 1000, --- level inical para resetar price = 10000, --- preço inicial para resetar newlevel = 20, --- level após reset priceByReset = 10000, --- preço acrescentado por reset levelbyreset = 1000 --- quanto de level vai precisar a mais no próximo reset } --- end config function addReset(cid) resets = getResets(cid) setPlayerStorageValue(cid, 378378, resets+1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) ------------------------------------ MUDE AQUI A % DE VIDA QUE GANHA AO RESETAR --------------------- local hp = getCreatureMaxHealth(cid) local resethp = hp*0.25 setCreatureMaxHealth(cid, resethp) local differencehp = (hp - resethp) doCreatureAddHealth(cid, -differencehp) local mana = getCreatureMaxMana(cid) local resetmana = mana*0.25 setCreatureMaxMana(cid, resetmana) local differencemana = (mana - resetmana) doCreatureAddMana(cid, -differencemana) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `description` = ' [Reset: "..resets.."]' WHERE `players`.`id` = "..playerid) db.executeQuery("UPDATE `players` SET `level` = "..config.newlevel..", `experience` = 0 WHERE `id` = "..playerid) return TRUE end function getResets(cid) resets = getPlayerStorageValue(cid, 378378) if resets < 0 then resets = 0 end return resets end 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 creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid local newPrice = config.price + (getResets(cid) * config.priceByReset) local newminlevel = config.minlevel + (getResets(cid) * config.levelbyreset) if msgcontains(msg, 'reset') then if getResets(cid) == resets then selfSay('You want to reset your character? It will cost '..newPrice..' gp\'s!', cid) talkState[talkUser] = 1 else selfSay('I couldnt acess your bank of acess!', cid) end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then if getPlayerMoney(cid) < newPrice then selfSay('Its necessary to have at least '..newPrice..' gp\'s for reseting!', cid) elseif getPlayerLevel(cid) < newminlevel then selfSay('The minimum level for reseting is '..newminlevel..'!', cid) else doPlayerRemoveMoney(cid,newPrice) playerid = getPlayerGUID(cid) addEvent(addReset, (5*1000), cid) local msg ="---[Reset: "..getResets(cid).."]-- You have reseted! You'll be disconnected in 5 seconds." if doPlayerPopupFYI(cid, msg) then end end talkState[talkUser] = 0 elseif(msgcontains(msg, 'no')) and isInArray({1}, talkState[talkUser]) == TRUE then talkState[talkUser] = 0 selfSay('Ok.', cid) elseif msgcontains(msg, 'quantity') then selfSay('You have a total of '..getResets(cid)..' reset(s).', cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) npc\reseter.xml <npc name="Reseter" script="data/npc/scripts/reset.lua" access="5" lookdir="1"> <health now="1000" max="1000"/> <look type="133" head="95" body="86" legs="86" feet="38" addons="3"/> <parameters> <parameter key="message_greet" value="Hello |PLAYERNAME|.I've been waiting for you to come.. Say 'reset' or 'quantity'" /> </parameters> </npc> OBS: SE SEU TIBIA FOR DE UMA VERSÃO < 8.6 USE ESSE SCRIPT, SE FOR > 8.6 TROQUE OS db.executeQuery por db.Query
  20. você criou dois tópicos com o mesmo nome, coloca no título oque vc quer.. me recuso a te ajudar num tópico escrito "HELP"
  21. xWhiteWolf respondeu ao post em um tópico de eunaosei123 em Suporte Tibia OTServer
    Mano, se você quiser que as pessoas te ajudem você precisa preencher os seguintes requisitos: 1) Ser claro e objetivo 2) Explicar passo a passo o erro e oque você quer, de forma que até quem não saiba o problema consiga entender 3) Falar a sua versão de tibia e a versão do server 4) Postar o script para a gente analisar
  22. no items.xml procura seu item e adiciona isso nele <attribute key="healthGain" value="250" /> <attribute key="healthTicks" value="1000" /> <attribute key="manaGain" value="250" /> <attribute key="manaTicks" value="1000" /> ticks é o tempo em milisegundos e healthgain e mana gain é o quanto recupera de vida/mana. (ISSO NO ITEMS.XML) DAI VC ABRE O MOVEMENTS.XML E COLOCA ISSO <movevent type="Equip" itemid="ID DA SUA ARMOR" slot="head" level="40" event="function" value="onEquipItem"> <vocation id="1"/> <vocation id="5" showInDescription="0"/> <vocation id="2"/> <vocation id="6" showInDescription="0"/> </movevent> <movevent type="DeEquip" itemid="ID DA SUA ARMOR" slot="head" event="function" value="onDeEquipItem"/> itemid: coloca o id do item slot: tipo de lugar que vai ativar o efeito (nesse caso, se vc colocar a armor em qualquer slot que não seja a armor não ativa) level: level pra usar o item event e value: não mexe vocation id é as classes que podem usar, o showIndescription = 0 indica que não vai mostrar aquela classe na descrição (isso serve pra evitar repetições do tipo: Esse item pode ser usado por sorceres e master sorceres)
  23. se não deu erro era pra ter funcionado.. só se algum comando mudou de nome e eu não sei '-' você modificou alguma coisa antes de testar? a glacier robe funciona só dps de perder 300 de vida (mana não conta, então não use utamo vita) e tem 20% de chance de ativar a skill (igual vc pediu)
  24. aqui tem um npc de reset que eu fiz do jeitinho que vc falou npc\scripts\reset.lua --[[Script made 100% by Nogard and Night Wolf. You can feel free to edit anything you want, but don't remove the credits]] local config = { minlevel = 1000, --- level inical para resetar price = 10000, --- preço inicial para resetar newlevel = 20, --- level após reset priceByReset = 10000, --- preço acrescentado por reset levelbyreset = 1500 --- quanto de level vai precisar a mais no próximo reset } --- end config function addReset(cid) resets = getResets(cid) setPlayerStorageValue(cid, 378378, resets+1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) ------------------------------------ MUDE AQUI A % DE VIDA QUE GANHA AO RESETAR --------------------- local hp = getCreatureMaxHealth(cid) local resethp = hp*0.25 setCreatureMaxHealth(cid, resethp) local differencehp = (hp - resethp) doCreatureAddHealth(cid, -differencehp) local mana = getCreatureMaxMana(cid) local resetmana = mana*0.25 setCreatureMaxMana(cid, resetmana) local differencemana = (mana - resetmana) doCreatureAddMana(cid, -differencemana) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `description` = ' [Reset: "..resets.."]' WHERE `players`.`id` = "..playerid) db.executeQuery("UPDATE `players` SET `level` = "..config.newlevel..", `experience` = 0 WHERE `id` = "..playerid) return TRUE end function getResets(cid) resets = getPlayerStorageValue(cid, 378378) if resets < 0 then resets = 0 end return resets end 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 creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid local newPrice = config.price + (getResets(cid) * config.priceByReset) local newminlevel = config.minlevel + (getResets(cid) * config.levelbyreset) if msgcontains(msg, 'reset') then if getResets(cid) == resets then selfSay('You want to reset your character? It will cost '..newPrice..' gp\'s!', cid) talkState[talkUser] = 1 else selfSay('I couldnt acess your bank of acess!', cid) end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then if getPlayerMoney(cid) < newPrice then selfSay('Its necessary to have at least '..newPrice..' gp\'s for reseting!', cid) elseif getPlayerLevel(cid) < newminlevel then selfSay('The minimum level for reseting is '..newminlevel..'!', cid) else doPlayerRemoveMoney(cid,newPrice) playerid = getPlayerGUID(cid) addEvent(addReset, (5*1000), cid) local msg ="---[Reset: "..getResets(cid).."]-- You have reseted! You'll be disconnected in 5 seconds." if doPlayerPopupFYI(cid, msg) then end end talkState[talkUser] = 0 elseif(msgcontains(msg, 'no')) and isInArray({1}, talkState[talkUser]) == TRUE then talkState[talkUser] = 0 selfSay('Ok.', cid) elseif msgcontains(msg, 'quantity') then selfSay('You have a total of '..getResets(cid)..' reset(s).', cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) npc\reseter.xml <npc name="Reseter" script="data/npc/scripts/reset.lua" access="5" lookdir="1"> <health now="1000" max="1000"/> <look type="133" head="95" body="86" legs="86" feet="38" addons="3"/> <parameters> <parameter key="message_greet" value="Hello |PLAYERNAME|.I've been waiting for you to come.. Say 'reset' or 'quantity'" /> </parameters> </npc>
  25. o tempo do utito tempo é definido por isso daqui setConditionParam(condition, CONDITION_PARAM_TICKS, 300000) explicando: seta parâmetro de condição sendo esse paramêtro contendo os seguintes valores: condição, tempo de condição, 300000 (tempo em milisegundos) Milisegundo é um um segundo multiplicado por mil. Se você tem 300.000 você tem na verdade 300 segundos (que são 5 minutos)

Informação Importante

Confirmação de Termo