Ir para conteúdo

notle2012

Conde
  • Total de itens

    884
  • Registro em

  • Última visita

  • Dias Ganhos

    8

Tudo que notle2012 postou

  1. tem que baixa o sqlite studio e abrir o forgottenserver.s3db se vc usa ot sqlite
  2. 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 local moeda = 8000 -- TROCA ID DO ITEM local t = { ["light healing"] = {price = 1,vocations = {1,2,3,4},level = 9}, ["find person"] = {price = 1,vocations = {3,4},level = 8}, ["light magic missile"] = {price =1,vocations = {1,5,7,8},level = 15}, ["energy strike"] = {price =1,vocations = {1,2,5,6},level = 12}, ["flame strike"] = {price =1,vocations = {1,2,5,6},level = 12} } if (msgcontains(msg, 'SPELLS') or msgcontains(msg, 'spells'))then local str = "" str = str .. "Eu vendo estas Magias: " for name, pos in pairs(t) do str = str.." {"..name.."} = "..pos.price.." Moedas /" end str = str .. "." npcHandler:say(str, cid) elseif t[msg] then if not getPlayerLearnedInstantSpell(cid, msg) then if getPlayerLevel(cid) >= t[msg].level then if isInArray(t[msg].vocations, getPlayerVocation(cid)) then if doPlayerRemoveItem(cid,moeda,t[msg].price) then doPlayerLearnInstantSpell(cid, msg) npcHandler:say("Você aprendeu uma nova magia chamada ".. msg .."!", cid) else npcHandler:say("você não tem "..t[msg].price.." ".. getItemNameById(moeda), cid) end else npcHandler:say("você não tem a vocação para comprar está spell.", cid) end else npcHandler:say("você precisa ter level "..t[msg].level.." ou mais para comprar essa magia.", cid) end else npcHandler:say("você já aprendeu essa magia.", cid) end end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  3. tem que deleta tabela do player_deaths com esse comando DROP TABLE IF EXISTS `player_deaths`; com esse outro criar tabela denovo CREATE TABLE `player_deaths` ( `id` INT NOT NULL AUTO_INCREMENT, `player_id` INT NOT NULL, `date` BIGINT UNSIGNED NOT NULL, `level` INT UNSIGNED NOT NULL, PRIMARY KEY (`id`), INDEX (`date`), FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE ) ENGINE = InnoDB;
  4. npc que troca item por spells spell_seller.lua 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 local moeda = 2157 local t = { ["light healing"] = {price = 15,vocations = {1,2,3,4},level = 9}, ["find person"] = {price = 25,vocations = {3,4},level = 8}, ["light magic missile"] = {price =30,vocations = {1,5,7,8},level = 15}, ["energy strike"] = {price =20,vocations = {1,2,5,6},level = 12}, ["flame strike"] = {price =100,vocations = {1,2,5,6},level = 12} } if (msgcontains(msg, 'SPELLS') or msgcontains(msg, 'spells'))then local str = "" str = str .. "Eu vendo estas Magias: " for name, pos in pairs(t) do str = str.." {"..name.."} = "..pos.price.." Moedas /" end str = str .. "." npcHandler:say(str, cid) elseif t[msg] then if not getPlayerLearnedInstantSpell(cid, msg) then if getPlayerLevel(cid) >= t[msg].level then if isInArray(t[msg].vocations, getPlayerVocation(cid)) then if doPlayerRemoveItem(cid,moeda,t[msg].price) then doPlayerLearnInstantSpell(cid, msg) npcHandler:say("Você aprendeu uma nova magia chamada ".. msg .."!", cid) else npcHandler:say("você não tem "..t[msg].price.." ".. getItemNameById(moeda), cid) end else npcHandler:say("você não tem a vocação para comprar está spell.", cid) end else npcHandler:say("você precisa ter level "..t[msg].level.." ou mais para comprar essa magia.", cid) end else npcHandler:say("você já aprendeu essa magia.", cid) end end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Você adiciona e configura as spells que serão trocadas aqui local t = { ["light Healing"] = {price = 15,vocations = {1,2,3,4},level = 9}, ["find person"] = {price = 25,vocations = {3,4},level = 8}, ["light magic missile"] = {price =30,vocations = {1,5,7,8},level = 15}, ["energy strike"] = {price =20,vocations = {1,2,5,6},level = 12}, ["flame strike"] = {price =100,vocations = {1,2,5,6},level = 12} } NOME DO SEU NPC.xml <?xml version="1.0"?> <npc name="NOME DO SEU NPC" script="data/npc/scripts/spell_seller.lua" walkinterval="50000" floorchange="0"> <health now="100" max="100"/> <look type="129" head="95" body="116" legs="121" feet="115" addons="3"/> <parameters> <parameter key="message_greet" value="Hello |PLAYERNAME|. Quer comprar algumas {spells} ?" /> </parameters> </npc> e para usar a magia só quem comprou você faz o seguinte vai em Spells.xml e na tag da sua magia vc coloca needlearn="1" needlearn="1" -- precisa aprender para usar a magia needlearn="0" -- n precisa aprender para usar a magia
  5. esse erro aparece quando player morre???
  6. vlw pela dicas esses safados só gosta de da golpe nas pessoas
  7. oq eu entendi vc quer pega de 5 a 1 item do id 2157 vou da um exemplo de 1 a 3 function onSay(cid, words, param) local random = math.random(1, 3) local items = { [1] = {id=2157,quant=10,word="Parabéns, Você pegou 10 gold nugget!"}, [2] = {id=2157,quant=5,word="Parabéns, você pegou 5 gold nugget!"}, [3] = {id=2157,quant=1,word="Parabéns, você pegou 1 gold nugget!"}, } if doPlayerRemoveMoney(cid,10000) then doPlayerAddItem(cid, items[random].id, items[random].quant) doCreatureSay(cid, items[random].word, TALKTYPE_ORANGE_1) doSendMagicEffect(getThingPos(cid), 29) else doPlayerSendTextMessage(cid,22,"Ops, vc não tem grana!") end end (1, 3) quantos tem no random começa do 1 acaba no 3 {id=2157,quant=10,word="Parabéns, Você pegou 10 gold nugget!"}, id=2157 -- id do item rsrs quant=10 -- aqui vc coloca quantos quer que sair word= é a frase espero ter ajudado
  8. xampp q eu uso aqui é XAMPP 1.8.0 o seu deve ta desatualizado
  9. baixando pra ver vc coloco mais 255 effects???
  10. tem uma data prevista???
  11. notle2012

    Distro 9.60

    vlw rep++
  12. @fireelement kkkkkkkkkk eu li em um site que era melhor mais meu ot eu uso 0.3.6 ot de pokemon
  13. notle2012

    Sprite Editor

    Fico Muito Bom mesmo
  14. xampp\htdocs\latestnews.php troca o latestnews.php pelo um que vc não tenha alterado nada ele ta com erro na linha 31 a posta ele
  15. vc ja desbloqueou as port do modem ???
  16. tbm acho mais vc poderia deixa msn pra facilitar???
  17. aposta imagens pra entivar mais pessoas entra no ot
  18. bem legal o phobos bem parecido com tibia
  19. sensacional espero que avancei projeto rápido gostaria de ver mais imagens
  20. parabéns "pena que meus char foi deletados hehe"
  21. kkkkkkkkkkkk, ot do cara vai virar sucesso
  22. vc não viu no topo que é Server 8.6
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...