Ir para conteúdo

Axion Nitron

Membro
  • Registro em

  • Última visita

Solutions

  1. Axion Nitron's post in (Resolvido)Npc que troca vocaçao e outifit was marked as the answer   
    Too testando no Bills numero da vocação é 212
    Man eu tenho um script akii do npc maiiis nao sei editar.
    Eu queria que o npc transformase qualquer vocação em Bills mais ele só transformar a 2.
    E quando ele transformase em Bills o player relogava e quando voltase ja estaria com o looktype de Bills.
     
    Resumindo: Queria que trocase a vocação e o outifit de qualquer player mais precisaria do item nessesario segue o script:
    local item1 = 9971 local quant1 = 1 local vocation13 = 6 local pos = {x=160, y=58, z=7} 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 function santaNPC(cid, message, keywords, parameters, node) if(not npcHandler:isFocused(cid)) then return false end if getPlayerVocation(cid) ~= 2 then npcHandler:say('Vaza mano você não é vocation 2.',cid) return false end if(parameters.present == true) then if(doPlayerRemoveItem(cid,item1,quant1) == true) then doPlayerSetVocation(cid, 6) doTeleportThing(cid, pos) npcHandler:say('You changed your vocation to vocation of the Angel.',cid) else npcHandler:say('You have ever vocation is the Angel or do not have the necessary items .',cid) end npcHandler:resetNpc() return true end end npcHandler:setMessage(MESSAGE_GREET, "Hello |PLAYERNAME|. Do you want to be promoted to {angel}?.") local noNode = KeywordNode:new({'no'}, santaNPC, {present = false}) local yesNode = KeywordNode:new({'yes'}, santaNPC, {present = true}) local node = keywordHandler:addKeyword({'angel'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Bring me an enchanted wing !. Do you sure? it will be irreversible! {yes}'}) node:addChildKeywordNode(yesNode) node:addChildKeywordNode(noNode) npcHandler:addModule(FocusModule:new())  
    Conseguir eliminar algumas partes que estava dando erro no script voou posta para a posteridade não ter dor de cabeça.
    local item1 = 4759 local quant1 = 1 local vocation13 = 212 local pos = {x=160, y=58, z=7} 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 function santaNPC(cid, message, keywords, parameters, node) if(not npcHandler:isFocused(cid)) then return false end if(parameters.present == true) then if(doPlayerRemoveItem(cid,item1,quant1) == true) then doPlayerSetVocation(cid, 212) npcHandler:say('You changed your vocation to vocation of the Angel.',cid) else npcHandler:say('You have ever vocation is the Angel or do not have the necessary items .',cid) end npcHandler:resetNpc() return true end end npcHandler:setMessage(MESSAGE_GREET, "Hello |PLAYERNAME|. Do you want to be promoted to {angel}?.") local noNode = KeywordNode:new({'no'}, santaNPC, {present = false}) local yesNode = KeywordNode:new({'yes'}, santaNPC, {present = true}) local node = keywordHandler:addKeyword({'angel'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Bring me an enchanted wing !. Do you sure? it will be irreversible! {yes}'}) node:addChildKeywordNode(yesNode) node:addChildKeywordNode(noNode) npcHandler:addModule(FocusModule:new()) Só editar a sua escolha preechendo as opções.. haa lembrando que tem que colocar o numero da vocação nessa parte doPlayerSetVocation(cid, 212) se não vai dar erro.
  2. Axion Nitron's post in (Resolvido)Remover Aol Com um Script was marked as the answer   
    Bom eu descobrir o problema e ele vem dos servidores 8.54 para cima

    O Aol fica infinito. Simplesmente quando o jogador morre, o aol continua após o relogamento.

    Depois de muitas tentativas frustradas de Resolver o problema, finalmente percebi qual era o problema.

    Eu estava criando o amulet of loss com meu GM dando "/i 2173" e dando para o meu jogador. Descobri que quando o GM dá item que pode ser removido, simplesmente o item vira infinito (Isso é erro de Programação de todos os servidores que testei, entre eles : Baiak Yurotz 2.0.7, Baiak 2.0.8, TFS 0.3.6, TFS 0.2.7 e Alissow 3.9.0).

    O Erro é simples : Quando o jogador compra o aol na loja, é adicionado um storage value, indicando que foi comprando um aol no personagem tal...

    Então o erro acontece da seguinte forma: O Gm ao criar o item, não é adicionado nenhum storage value no banco de dados MYSQL, então por isso que ao usar o item que foi criado pelo GM, o item fica infinito.

    O Servidor ele indentifica o Storage Value do Aol no banco de dados na tabela "player_storage", então se estiver "1" significa que existe aol, se tiver "0" é por que não existe.

    Solução para esse problema : Não criem Amulet of Loss para os jogadores do seu servidor, pois eles ficarão infinitos!!!

    Outra Solução : Os programadores resolverem esse problema =/.
    Ou fazer um script em CreatureScripts.

    Vi por aew que algumas pessoas estão dizendo que para resolver esse erro é preciso ir na linha:
     
    <item id="2173" article="an" name="amulet of loss"> <attribute key="weight" value="420"/> <attribute key="slotType" value="necklace"/> <attribute key="charges" value="1"/> <attribute key="preventDrop" value="1"/> </item> E então é só remover a linha que está marcada de vermelho, ficando assim:
     
    <attribute key="weight" value="420"/> <attribute key="slotType" value="necklace"/> <attribute key="preventDrop" value="1"/> </item> É o seguinte, eu tentei fazer isso, e NÃO FUNCIONOU.

    Obrigado por Ler, se estiver com duvidas ou deseja falar que algo está errado, poste aqui. Porque essas coisas que eu acabei de escrever aqui, foram devidamente COMPROVADAS pela Equipe do Zenon Ot Server.

Informação Importante

Confirmação de Termo