Ir para conteúdo

Ragnar Lothbrook

Membro
  • Registro em

  • Última visita

Tudo que Ragnar Lothbrook postou

  1. Então, o problema é que isso é uma quest, Não tem como te dizer a quantidade exata de players que estarão na sala. Isso é um problema ?!
  2. Amigo, segue a imagem da sala. Não sei se era isso que você queria. Caso queira as positions me avise.
  3. Em qualquer lugar da sala @Mathwsz. Estou com ele no projeto. Um player vai puxar uma alavanca, e quem estiver na sala com ele é teleportado para 6 posições aleatoreas.
  4. Tente este tutorial amigo. LINK
  5. No arquivo lua coloque: 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 if msgcontains(msg, "first") or msgcontains(msg, "first bless") or msgcontains(msg, "primeira bless") or msgcontains(msg, "primeira") then selfSay("You sure to pay "..pre.." gold coins for a first bless?", cid) talkState[cid] = 1 elseif msgcontains(msg, 'yes') and talkState[cid] == 1 then if not getPlayerBlessing(cid, 1) then if doPlayerRemoveMoney(cid, pre) then doPlayerAddBlessing(cid, 1) selfSay("Now you have the first bless.", cid) talkState[cid] = 0 else selfSay("You don't have enough money to pay.", cid) end else selfSay("You already have the first bless.", cid) end elseif msgcontains(msg, 'no') and talkState[cid] == 1 then selfSay("What you wanna?", cid) talkState[cid] = 0 end if msgcontains(msg, "second") or msgcontains(msg, "second bless") or msgcontains(msg, "segunda bless") or msgcontains(msg, "segunda") then selfSay("You sure to pay "..pre.." gold coins for a second bless?", cid) talkState[cid] = 2 elseif msgcontains(msg, "yes") and talkState[cid] == 2 then if not getPlayerBlessing(cid, 2) then if doPlayerRemoveMoney(cid, pre) then doPlayerAddBlessing(cid, 2) selfSay("Now you have the second bless.", cid) talkState[cid] = 0 else selfSay("You don't have enough money to pay.", cid) end else selfSay("You already have the second bless.", cid) end elseif msgcontains(msg, 'no') and talkState[cid] == 2 then selfSay("What you wanna?", cid) talkState[cid] = 0 end if msgcontains(msg, "third") or msgcontains(msg, "third bless") or msgcontains(msg, "terceira bless") or msgcontains(msg, "terceira") then selfSay("You sure to pay "..pre.." gold coins for a third bless?", cid) talkState[cid] = 3 elseif msgcontains(msg, "yes") and talkState[cid] == 3 then if not getPlayerBlessing(cid, 3) then if doPlayerRemoveMoney(cid, pre) then doPlayerAddBlessing(cid, 3) selfSay("Now you have the third bless.", cid) talkState[cid] = 0 else selfSay("You don't have enough money to pay.", cid) end else selfSay("You already have the third bless.", cid) end elseif msgcontains(msg, 'no') and talkState[cid] == 3 then selfSay("What you wanna?", cid) talkState[cid] = 0 end if msgcontains(msg, "fourth") or msgcontains(msg, "fourth bless") or msgcontains(msg, "quarta bless") or msgcontains(msg, "quarta") then selfSay("You sure to pay "..pre.." gold coins for a fourth bless?", cid) talkState[cid] = 4 elseif msgcontains(msg, "yes") and talkState[cid] == 4 then if not getPlayerBlessing(cid, 4) then if doPlayerRemoveMoney(cid, pre) then doPlayerAddBlessing(cid, 4) selfSay("Now you have the fourth bless.", cid) talkState[cid] = 0 else selfSay("You don't have enough money to pay.", cid) end else selfSay("You already have the fourth bless.", cid) end elseif msgcontains(msg, 'no') and talkState[cid] == 4 then selfSay("What you wanna?", cid) talkState[cid] = 0 end if msgcontains(msg, "fifth") or msgcontains(msg, "fifth bless") or msgcontains(msg, "quinta bless") or msgcontains(msg, "quinta") then selfSay("You sure to pay "..pre.." gold coins for a fifth bless?", cid) talkState[cid] = 5 elseif msgcontains(msg, "yes") and talkState[cid] == 5 then if isPremium(cid) then if not getPlayerBlessing(cid, 5) then if doPlayerRemoveMoney(cid, pre) then doPlayerAddBlessing(cid, 5) selfSay("Now you have the fifth bless.", cid) talkState[cid] = 0 else selfSay("You don't have enough money to pay.", cid) end else selfSay("You already have the fifth bless.", cid) end elseif msgcontains(msg, 'no') and talkState[cid] == 5 then selfSay("What you wanna?", cid) talkState[cid] = 0 else selfSay("You need premium account to buy the fifth bless.", cid) end end local bless = {1, 2, 3, 4, 5} if msgcontains(msg, "all") or msgcontains(msg, "all blessings") or msgcontains(msg, "todas as bless") or msgcontains(msg, "todas") then selfSay("You sure to pay 50000 gold coins for a all blessings?", cid) talkState[cid] = 6 elseif msgcontains(msg, "yes") and talkState[cid] == 6 then for i = 1, table.maxn(bless) do if getPlayerBlessing(cid, bless[i]) then return selfSay("You already have all the blessings.", cid) end end if not isPremium(cid) then return selfSay("You need premium account to buy all blessings.", cid) end if not doPlayerRemoveMoney(cid, 50000) then return selfSay("You don't have enough money to pay.", cid) end local bless = {1, 2, 3, 4, 5} selfSay("Now you have the all blessings.", cid) talkState[cid] = 0 for i = 1, table.maxn(bless) do doPlayerAddBlessing(cid, bless[i]) end elseif msgcontains(msg, 'no') and talkState[cid] == 6 then selfSay("What you wanna?", cid) talkState[cid] = 0 end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Qualquer erro me informe.
  6. Ragnar Lothbrook postou uma resposta no tópico em Suporte & Pedidos
    Parabéns pelo trabalho, ficou muito bom, continue assim. REP+
  7. Apenas procure um TFS 0.4, execute no lugar do seu distro atual, e pronto.
  8. Tente este attackspeed.lua local valorspeed = 5000 ---EDITE O VALOR DESEJADO function onUse(cid, item, fromPosition, itemEx, toPosition) doPlayerSetAttackSpeed(cid, valorspeed) doRemoveItem(item.uid) return TRUE end
  9. attackspeed.lua local valorspeed = 5000 ---EDITE O VALOR DESEJADO function onUse(cid, item, fromPosition, itemEx, toPosition) doPlayerSetExtraAttackSpeed(cid, valorspeed) doRemoveItem(item.uid) return TRUE end actions.XML <action itemid="ID" event="script" value="others/attackspeed.lua" allowfaruse="0"/> ID = Escolha uma pedra, pode até ser uma potion, e coloque o ID dela. NPC.XML <?xml version="1.0" encoding="UTF-8"?> <npc name="Alef" script="data/npc/scripts/default.lua" walkinterval="2000" floorchange="0"> <health now="150" max="150"/> <look type="146" head="0" body="115" legs="115" feet="115" addons="0"/> <parameters> <parameter key="module_shop" value="1"/> <parameter key="message_greet" value="Ola |PLAYERNAME|. Hungry?"/> <parameter key="shop_buyable" value="NOME DO ITEM, ID DO ITEM, PREÇO;"/> </parameters> </npc> <parameter key="shop_buyable" value="NOME DO ITEM, ID DO ITEM, PREÇO;"/> -- Altere de acordo.
  10. Nossa, sua versão é bem inferior as que estou acostumado. Poderia ser um NPC que venda um ITEM que de Attack Speed ?
  11. Nossa... Me informe a versão do seu server, e o TFS usado.
  12. Troca de TFS. Eu uso o TFS 0.4, nunca me deu problema com essas coisas de lagg.
  13. Coloque este: <event type="advance" name="LevelMax" event="script" value="maxlvl.lua"/>
  14. Pode me dizer mais sobre esse bug ? As vezes não entendi bem como você se expressou. Fica mais facil eu te ajudar.
  15. Ok. Modifique a gosto: Em NPC.XML <?xml version="1.0" encoding="UTF-8"?> <npc name="NPC Fast Attack" script="fastattack.lua" walkinterval="2000" floorchange="0"> <health now="150" max="150" /> <look type="133" head="79" body="132" legs="94" feet="0" addons="3"/> <parameters> <parameter key="message_greet" value="Ola |PLAYERNAME|. Posso lhe dar {fast} attack." /> <parameter key="message_farewell" value="Até mais!" /> </parameters> </npc> em fastattack.lua 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 -- Storage IDs -- local fastattack = 74247424 -- nao mexa, isso fara com que o player adicione fast attack apenas uma vez local transmuted = 'Aqui esta sua seu fast attack!' local noitems = 'Voce nao tem o iten necessario.' local nolevel1 = 'Voce nao tem level 250.' local already = 'Voce ja recebeu fast attack, nao me sacaneie!' -- FASTATTACK START -- function FastAttack(cid, message, keywords, parameters, node) if(not npcHandler:isFocused(cid)) then return false end transm = getPlayerStorageValue(cid,fastattack) if transm == -1 then if getPlayerLevel(cid) >= 250 then --altere aqui o level que podera receber fast attack if getPlayerItemCount(cid,2328) >= 1 then --altere aqui o ID do item e a quantidade if doPlayerRemoveItem(cid,2328,1) then -- aqui tem sempre que ser igual o de cima, senão o npc nao remove o item selfSay(transmuted, cid) doSendMagicEffect(getCreaturePosition(cid), 13) local transmuted1 = doPlayerSetExtraAttackSpeed(cid, 5000) --aqui o valor do fast attack, creio que esteja num bom valor, mas altere a gosto setPlayerStorageValue(cid,fastattack,1) end else selfSay(noitems, cid) end else selfSay(nolevel1, cid) end else selfSay(already, cid) end end -- FASTATTACK END -- local node1 = keywordHandler:addKeyword({'fast'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Para obter a Fast Attack, vai precisar ter level 250, 1 fired demon eye. Voce tem esses itens com voce?'}) node1:addChildKeyword({'yes'}, FastAttack, {npcHandler = npcHandler, onlyFocus = true, reset = true}) node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Tudo bem, volte quando tiver todos os itens.', reset = true}) npcHandler:addModule(FocusModule:new()) Não testei, se der erro poste aqui que resolvo.
  16. Ragnar Lothbrook postou uma resposta no tópico em Suporte Tibia OTServer
    Se quer saber se tem como um player Summonar um NPC, a resposta é SIM! summon npc.lua function onSay(cid, words, param, channel) local func = doCreateMonster if(words:sub(2, 2) == "summon npc") then -- palavra que dira pra sumonar o NPC func = doCreateNpc end local pid = cid local t = string.explode(param, ",") if(t[2]) then pid = getPlayerByNameWildcard(t[2]) if(not pid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[2] .. " not found.") return true end end local position = getCreaturePosition(pid) local effect = CONST_ME_MAGIC_RED local ret = func(t[1], position, false) if(tonumber(ret) == nil) then effect = CONST_ME_POFF doPlayerSendDefaultCancel(cid, (ret == false and RETURNVALUE_NOTPOSSIBLE or RETURNVALUE_NOTENOUGHROOM)) end doSendMagicEffect(position, effect) return true end Em Talkactions.XML <talkaction words="summon npc" event="script" value="summon npc.lua"/> Em words, coloque a mesma palavra que colocou no script.lua
  17. Modifique a gosto: historias.lua 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 -- HISTORIA START -- keywordHandler:addKeyword({'historia um'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "era uma vez um lobo que comeu ração velha e morreu"}) keywordHandler:addKeyword({'historia dois'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "era uma vez uma ração velha, foi comida por um lobo e morreu"}) npcHandler:addModule(FocusModule:new()) Contador de Hiostorias.xml <?xml version="1.0" encoding="UTF-8"?> <npc name="Contador de Historias" script="historias.lua" walkinterval="2000" floorchange="0"> <health now="150" max="150" /> <look type="277" head="0" body="0" legs="0" feet="0"/> <parameters> <parameter key="message_greet" value="Ola |PLAYERNAME|. Eu conto historias, tenho duas historias pra contar. A {historia um} e a {historia dois}" /> <parameter key="message_farewell" value="Volte para ouvir mais historias!" /> </parameters> </npc> Não testei, se der algum erro, poste, que lhe ajudarei.
  18. Ragnar Lothbrook postou uma resposta no tópico em Suporte Tibia OTServer
    Em items.XML Verifique o ID da sua soft boots enquanto estiver equipada, e desequipada. Se os IDs forem dierentes, procure no Items.XML o ID dela DESEQUIPADA, e adicione esta tag: <attribute key="stopduration" value="1" /> Qualquer problema, poste que lhe ajudarei.
  19. Bom, eu precisaria do script do seu NPC pra colocar o comando, mas creio que se eu colocar a função você vai saber adicionar sem erro. doPlayerSetExtraAttackSpeed(cid, 5000) Caso não saiba onde colocar, poste, que eu faço pra você.
  20. Vai na pasta do seu ot, em data/XML Abra vocations.xml Edite esta parte: <skill id="0" multiplier="1.5"/> --fist <skill id="1" multiplier="2.0"/> --club <skill id="2" multiplier="2.0"/> --sword <skill id="3" multiplier="2.0"/> --axe <skill id="4" multiplier="2.0"/> --distance <skill id="5" multiplier="1.5"/> --shielding <skill id="6" multiplier="1.1"/> --fishing Ou em alguns servers está assim: <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"/> Quanto MENOR o numero, mais o skill irá upar.
  21. Ragnar Lothbrook postou uma resposta no tópico em Suporte Tibia OTServer
    No caso teria que transforma-lo em wand, colocando a vocação desejada. Adicione em Items.XML <item id="5907" article="a" name="slingshot"> <attribute key="weight" value="4300" /> <attribute key="weaponType" value="wand" /> <attribute key="shootType" value="smallstone" /> -- efeito que sairá do slingshot, no caso saem small stones <attribute key="range" value="3" /> -- distancia em que o sligshot alcançará Em Weapons.XML <wand id="5907" level="7" mana="2" min="8" max="18" type="pshysical" event="function" value="default"> <!-- SlingShot --> <vocation name="Royal Paladin"/> </wand> Em MIN e MAX, adicione os valores dos hits que você deseja, se quiser que ele hite apenas 300, coloque min ="300" max="300", assim o hit será apenas 300. Qualquer problema, poste que o ajudo resolver.
  22. Se o server for por Rates, coloque a rate 0 na tag de level 400+, ou 0.1, no caso ficaria 10% da XP do global.
  23. Ragnar Lothbrook postou uma resposta no tópico em Suporte Tibia OTServer
    Vá em Actions.XML e verifique o numero do item que você colocou na tag do script. Confira se o numero que esta na tag é igual a este que está no seu script: local item = config[chance] if item then doPlayerAddItem(cid, item[1]) doRemoveItem(item.uid, 15572,1) doSendMagicEffect(getThingPos(cid), 13) doRemoveItem(item.uid, 1) else doRemoveItem(item.uid, 15572,1) Se não for, modifique no script para o numero do item que você colocou no Actions.XML.
  24. Só pode modificar isso nas Sources camarada, vai te dar trabalho.

Informação Importante

Confirmação de Termo