Ir para conteúdo

Valakinhas

Héroi
  • Registro em

  • Última visita

Tudo que Valakinhas postou

  1. Valakinhas postou uma resposta no tópico em Suporte Tibia OTServer
    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 playerHaveItems(cid, itemid) local items = type(itemid) == "table" and itemid or {itemid} for i = 1, #items do if getPlayerItemCount(cid, items) <= 0 then return false end end return true end function doPlayerRemoveItems(cid, itemid, count) local items = type(itemid) == "table" and itemid or {itemid} for i = 1, #items do doPlayerRemoveItem(cid, items, count ~= nil and count or 1) end return nil end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end if msgcontains(msg, "trocar") then if playerHaveItems(cid, {2134, 2174, 2159}) then doPlayerRemoveItems(cid, {2134, 2174, 2159}, 300) doPlayerAddItem(cid, 2090, 1) else selfSay("Você Não tem os itens necessarios.") end end return true end endnpcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  2. Valakinhas postou uma resposta no tópico em Suporte Tibia OTServer
    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 playerHaveItems(cid, itemid) local items = type(itemid) == "table" and itemid or {itemid} for i = 1, #items do if getPlayerItemCount(cid, items) <= 0 then return false end end return true end function doPlayerRemoveItems(cid, itemid, count) local items = type(itemid) == "table" and itemid or {itemid} for i = 1, #items do doPlayerRemoveItem(cid, items, count ~= nil and count or 1) end return nil end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end if msgcontains(msg, "trocar") then if playerHaveItems(cid, {2134, 2174, 2159}) then doPlayerRemoveItems(cid, {2134, 2174, 2159}, 300) doPlayerAddItem(cid, 2090, 1) else selfSay("Você Não tem os itens necessarios.") end end end return true endnpcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) testa ai n é certeza
  3. Valakinhas postou uma resposta no tópico em Suporte & Pedidos
    porque não faz padrão da cip ? ficaria fodão
  4. function onGetFormulaValues(cid, level, skill, attack, factor) local skillTotal, levelTotal = skill + attack * 12, level * 2 return -(skillTotal * 1.1 + levelTotal), -(skillTotal * 7 + levelTotal) end alguem pode me explicar esse trexo? da minha spells eu gostaria de aumentar o dano dela de acordo com a skill do knight e de acordo com o dano da arma
  5. entao gente é assim se o jogador estiver com a vocação 9,10,11 e 12 o npc recuse a dar o promotion, e porque eu uso epic e se o epic falar promotion ele perde a vocação e fica no vocation .. local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 local node1 = keywordHandler:addKeyword({'promot'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 20000 gold coins. Do you want me to promote you?'}) node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 0,level = 1, promotion = 1, text = 'Congratulations! You are now promoted.'}) node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true}) npcHandler:addModule(FocusModule:new())
  6. function onSay(cid, words, param) if getPlayerBlessing(cid,5) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have already been blessed") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA) else if doPlayerRemoveMoney(cid, 50000) == TRUE then for i = 1,5 do doPlayerAddBlessing(cid,i) end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have received blessings!") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_ENERGYAREA) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need 50,000 gp in backpack for blessings.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_ICEAREA) end end end
  7. na script de party ocorreu um bug de repente ninguem consegue ataca ninguem, só acerta as magia em area nos cara sem party
  8. <event type="kill" name="defaultkiller" script="defaultkiller.lua"/> a script de party funfou certinho deu esse erro ai
  9. então gente eu queria um sistema de quando um player matar outro apareça no default em laranja tipo Y matou Z tipo assim, outro sistema que eu preciso é de não poder matar membros da propria party
  10. tfs 0.4 rev 3884 , toda vez da erro na distro falando player not found, alguem com o mesmo problema ?
  11. Valakinhas postou uma resposta no tópico em Códigos C++
    não encontrado m_confNumber[PACKETS_PER_SECOND] = getGlobalNumber("packetsPerSecond", 50); procede? tfs 0.4 rev3884
  12. sim eu descobri fuçando kkk mais vou dar rep por ter comentado
  13. então gente tenho uma spell e queria configurar ela para dar somente de 10k a 20k de dano alguem poderia ajudar? local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -59.3, -30, -69.7, 0) local arr = { {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, } local area = createCombatArea(arr) setCombatArea(combat, area) function onCastSpell(cid, var) return doCombat(cid, combat, var) end na verdade só quero saber a formula para eu fazer em todas
  14. Valakinhas postou uma resposta no tópico em Suporte Bots
    tente executar como administrador
  15. refere-se a esse bug? eu sei corrigir ele
  16. vai no items.xml pesquise pelo id do seu item e adiciona isso <attribute key="slotType" value="ring" /> pronto ele vai pro slot ring
  17. Valakinhas postou uma resposta no tópico em Scripts tfs 0.4 (OLD)
    exevo song pally ficaria melhor não acha ? se for magia de pally e claro ^^, irei add no meu ot achei interessante
  18. todos os subwat que eu baixei são completamente bugados, eu irei baixar esse e testar, qualquer coisa eu edito
  19. data/mods se n achar deve estar no creaturescript
  20. ficou apenas bug simples as quest tem que por as action e fazer as script tudo de novo porque eu usei uma trunk para fazer o serve
  21. prevejo tibia league of legendz
  22. registrou tudo no movements? exemplo <movevent type="Equip" itemid="2201" slot="necklace" event="function" value="onEquipItem"/> <movevent type="DeEquip" itemid="2201" slot="necklace" event="function" value="onDeEquipItem"/>
  23. porque se quer essa script? porque quer dar kick no jogador quando ele passa no portal ?

Informação Importante

Confirmação de Termo