Ir para conteúdo

zipter98

Herói
  • Total de itens

    2553
  • Registro em

  • Última visita

  • Dias Ganhos

    72

Tudo que zipter98 postou

  1. Movido para Anúncio de OTservers - Servidores Derivados. Mais cuidado da próxima vez.
  2. Aparentemente, o Torchic não consta na tabela icons. Essa é a causa do erro.
  3. Não, nada. Tenta colocar outro ID na tag, vai que é o diamond que tá bugado.
  4. Ué, tem certeza? Deu algum erro no console? Testei aqui, e tá funcionando direitinho
  5. Tenta assim:
  6. Provavelmente você não adicionou o Numel em todas as tabelas de configuration.lua.
  7. Poderia enviar o quê se encontra na linha 101 dessa talkaction? No caso, a variável x.
  8. Assim? function onUse(cid, item, frompos, item2, topos) doPlayerSendTextMessage(cid, 27, "Você ganhou 30 dias VIP.") doPlayerAddPremiumDays(cid, 30) doRemoveItem(item.uid, 1) return true end Tag: <action actionid="id do diamond" event="script" value="nome do arquivo.lua"/>
  9. Esse erro, aparentemente, não é relacionado com a mudança. De qualquer maneira, poderia postar seu walk.lua?
  10. No script das talkactions desejadas, tenta colocar logo no início uma proteção verificando o group id do jogador. Se for abaixo de, por exemplo, 4, o jogador não poderá usar o comando. Ex.: if getPlayerGroupId(cid) <= 3 then return doPlayerSendCancel(cid, "Apenas pessoas com group ID superior à 4 podem usar esse comando!") end Foi isso que fiz em meu servidor (estava com o mesmo "erro" que o seu). Com essa proteção acima, apenas pessoas com o group ID acima de 4 (GM em diante) poderiam usar o comando. Se você quiser que apenas GODs (group id 6) usem tal comando, bastaria mudar o 3 para 6.
  11. Pode postar seu level system.lua? data/lib
  12. Será de apenas 1 outfit, o addon recebido? Ou será de todas? Se for a primeira opção, poderia informar qual o ID da outfit? De qualquer maneira, tenta assim: Primeira opção: 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 cfg = { outfit = xxx, --ID da outfit. sto = xxx, --Storage. } if msgcontains(msg, 'first addon') then if getPlayerStorageValue(cid, 845511) < 1 then selfSay("Você tem storage "..cfg.sto.."?", cid) talkState[talkUser] = 1 return true else selfSay("Você já pegou seu primeiro addon.", cid) talkState[talkUser] = 0 return true end elseif msgcontains(msg, 'yes') and talkState[talkUser] == 1 then if getPlayerStorageValue(cid, cfg.sto) >= 1 then selfSay("Ok, aqui está.", cid) doPlayerAddAddon(cid, cfg.outfit, 1) setPlayerStorageValue(cid, 845511, 1) talkState[talkUser] = 0 return true else selfSay("Você não tem a storage!", cid) talkState[talkUser] = 0 return true end elseif msgcontains(msg, 'no') and talkState[talkUser] == 1 then selfSay("Ok, então,") talkState[talkUser] = 0 return true end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Segunda opção: 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 sto = xxx --Storage. if msgcontains(msg, 'first addon') then if getPlayerStorageValue(cid, 845511) < 1 then selfSay("Você tem storage "..sto.."?", cid) talkState[talkUser] = 1 return true else selfSay("Você já pegou seu primeiro addon.", cid) talkState[talkUser] = 0 return true end elseif msgcontains(msg, 'yes') and talkState[talkUser] == 1 then if getPlayerStorageValue(cid, sto) >= 1 then selfSay("Ok, aqui está.", cid) doPlayerAddAddons(cid, 1) setPlayerStorageValue(cid, 845511, 1) talkState[talkUser] = 0 return true else selfSay("Você não tem a storage!", cid) talkState[talkUser] = 0 return true end elseif msgcontains(msg, 'no') and talkState[talkUser] == 1 then selfSay("Ok, então,") talkState[talkUser] = 0 return true end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Sabe fazer o XML?
  13. Cara, tenta colocar esse código em spoiler. [.spoiler] [./spoiler], sem os pontos.
  14. Pode postar sua função addPokeToPlayer (se não me engano, fica em some functions.lua). local starterpokes = { ["hitmonchan"] = {x = 613, y = 990, z = 7}, ["hitmonlee"] = {x = 615, y = 990, z = 7}, } local btype = "normal" function onUse(cid, item, frompos, item2, topos) if getPlayerLevel(cid) > 20 then return true end local pokemon = "" for a, b in pairs (starterpokes) do if isPosEqualPos(topos, b) then pokemon = a end end if pokemon == "" then return true end if getPlayerStorageValue(cid, 759848) <= 6 then sendMsgToPlayer(cid, 27, "Derrote o Chuck Norris primeiro!!") return true end --alterado v1.9 \/ if getPlayerStorageValue(cid, 938111) >= 1 then return doPlayerSendCancel(cid, "Você já pegou um pokémon!") end doPlayerSendTextMessage(cid, 27, "You got your first pokemon! You also received some pokeballs to help you in your way.") doPlayerSendTextMessage(cid, 27, "Don't forget to use your pokedex on every undiscovered pokemon!") addPokeToPlayer(cid, pokemon, 0, nil, btype, true) doPlayerAddItem(cid, 11446, 10) doSendMagicEffect(getThingPos(cid), 29) setPlayerStorageValue(cid, 938111, 1) doSendMagicEffect(getThingPos(cid), 27) doSendMagicEffect(getThingPos(cid), 29) return TRUE end
  15. Sorry, falta de atenção. local chance = 5 --Chance, pokémon de jogador, sem aura de dar critical. local wild_chance = 10 --Chance do pokémon selvagem de dar critical. local chance_aura = 5 --Chance que será aumentada caso o pokémon tenha aura. if isSummon(attacker) then if getItemAttribute(getPlayerSlotItem(getCreatureMaster(attacker), 8).uid, "aura") then chance = chance + chance_aura else chance = chance end else chance = wild_chance end if math.random(1, 100) <= chance then if combat == PHYSICALDAMAGE then valor = valor else doSendAnimatedText(getThingPos(attacker), "Critical", 215) valor = valor * 2 --O critical está servindo como um "focus" (damage * 2) end end Ou local chance = 5 --Chance, pokémon de jogador, sem aura de dar critical. local wild_chance = 10 --Chance do pokémon selvagem de dar critical. local chance_aura = 5 --Chance que será aumentada caso o pokémon tenha aura. if isSummon(attacker) then if getItemAttribute(getPlayerSlotItem(getCreatureMaster(attacker), 8).uid, "aura") then chance = chance + chance_aura else chance = chance end else chance = wild_chance end if math.random(1, 100) <= chance then if combat == COMBAT_PHYSICALDAMAGE then valor = valor else doSendAnimatedText(getThingPos(attacker), "Critical", 215) valor = valor * 2 --O critical está servindo como um "focus" (damage * 2) end end
  16. data/creaturescripts/scripts, look.lua. Procure por: table.insert(str, "\nHit points: "..getCreatureHealth(thing.uid).."/"..getCreatureMaxHealth(thing.uid)..".") Adicione, abaixo: table.insert(str, "\nOffense: "..getPlayerStorageValue(thing.uid, 1001).."") table.insert(str, "\nSp.Attack: "..getPlayerStorageValue(thing.uid, 1005).."") table.insert(str, "\nDefense: "..getPlayerStorageValue(thing.uid, 1002).."") table.insert(str, "\nAgility: "..getPlayerStorageValue(thing.uid, 1003).."")
  17. Primeiramente, você quer que apareça no look da ball, do pokémon, ou na verificação da pokedex? Ou nos três? #EDIT: Aliás, no look da ball não é possível, infelizmente.
  18. Opa, essa área aqui é para aprovação de tutoriais. Como não é o caso do seu tópico, a área mais apropriada é Pedidos e dúvidas - Servidores derivados. Quando você quiser fazer algum pedido, ou dúvida, relacionado à servidores derivados (como Pokémon), opte por postar nessa área que mencionei. Cuidado da próxima vez, e obrigado.
  19. zipter98

    Item de transformar

    Movements, colartrans.lua. function onEquip(cid, item, slot) doPlayerSendTextMessage(cid, 27, "Você se transformou.") doSetCreatureOutfit(cid, {lookType = 254, lookBody = 77, lookHead = 0, lookLegs = 77, lookFeet = 114}, -1) return true end function onDeEquip(cid, item, slot) doPlayerSendTextMessage(cid, 27, "Você voltou ao normal.") if getCreatureCondition(cid, CONDITION_OUTFIT) then doRemoveCondition(cid, CONDITION_OUTFIT) end return true end Tags: <movevent type="Equip" itemid="10220" slot="necklace" event="script" value="colartrans.lua"/> <movevent type="DeEquip" itemid="10220" slot="necklace" event="script" value="colartrans.lua"/>
  20. zipter98

    Pedido De Npc

    Área incorreta. Essa área é para postagem de códigos prontos, e não para pedidos. Para esse último, há uma área específica: Pedidos e dúvidas - Scripting. Portanto, quando for fazer pedidos/dúvidas relacionados à scripting, opte por postar lá. Já quando for relacionado à servidores derivados (Pokémon, Naruto, etc), Pedidos e dúvidas - Servidores derivados. Cuidado da próxima vez, e obrigado.
  21. zipter98

    Item de transformar

    Cara, não é assim que configura a outfit. Como eu disse, é o ID da outfit. Por exemplo, 114. E tirar o tempo = tirar exausted? Se for, function onUse(cid, item, frompos, item2, topos) local outfit = xxx --ID da outfit. local storage_one = 982011 local storage_two = 982012 if getPlayerStorageValue(cid, storage_one) >= 1 then if getCreatureCondition(cid, CONDITION_OUTFIT) then doRemoveCondition(cid, CONDITION_OUTFIT) doPlayerSendTextMessage(cid, 27, "Você voltou ao normal!") setPlayerStorageValue(cid, storage_one, -1) setPlayerStorageValue(cid, storage_two, 1) end elseif getPlayerStorageValue(cid, storage_two) >= 1 then doSetCreatureOutfit(cid, {lookType = outfit}, -1) doPlayerSendTextMessage(cid, 27, "Você se transformou!") setPlayerStorageValue(cid, storage_two, -1) setPlayerStorageValue(cid, storage_one, 1) end return true end E com essa configuração que você colocou, ficaria assim: function onUse(cid, item, frompos, item2, topos) local storage_one = 982011 local storage_two = 982012 if getPlayerStorageValue(cid, storage_one) >= 1 then if getCreatureCondition(cid, CONDITION_OUTFIT) then doRemoveCondition(cid, CONDITION_OUTFIT) doPlayerSendTextMessage(cid, 27, "Você voltou ao normal!") setPlayerStorageValue(cid, storage_one, -1) setPlayerStorageValue(cid, storage_two, 1) end elseif getPlayerStorageValue(cid, storage_two) >= 1 then doSetCreatureOutfit(cid, {lookType = 254, lookBody = 77, lookHead = 0, lookLegs = 77, lookFeet = 114}, -1) doPlayerSendTextMessage(cid, 27, "Você se transformou!") setPlayerStorageValue(cid, storage_two, -1) setPlayerStorageValue(cid, storage_one, 1) end return true end
  22. Só se esses status que você se refere, tiverem o valor igual às storages que mencionei acima.
  • Quem Está Navegando   0 membros estão online

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