-
Total de itens
2553 -
Registro em
-
Última visita
-
Dias Ganhos
73
Tudo que zipter98 postou
-
Achei ótimos, principalmente o Typhlosion. Parabéns xD
-
Tenta assim:
-
Editei meu post acima. Não sei se do jeito que eu fiz vai funcionar (até porque, não sou bom com spells ._.), mas se mesmo assim quiser testar.
- 20 respostas
-
- dano de spell fixo
- resolvido
- (e 3 mais)
-
Se o do Adriano não funcionar, tenta assim: Moto: local outfits = { [0] = {lookType = 101}, [1] = {lookType = 258} } local speed = 500 --qnt velo o player vai ficar function onUse(cid, item, fromPosition, itemEx, toPosition) local out = outfits[getPlayerSex(cid)] if not out then return true end local speed_final = speed + getCreatureSpeed(cid) if getCreatureOutfit(cid).lookType == out.lookType then doRemoveCondition(cid, CONDITION_OUTFIT) setPlayerStorageValue(cid, 112001, -1) doChangeSpeed(cid, -getCreatureSpeed(cid)) doChangeSpeed(cid, getCreatureBaseSpeed(cid)) else doSetCreatureOutfit(cid, outfits[getPlayerSex(cid)], -1) setPlayerStorageValue(cid, 112001, 1) doChangeSpeed(cid, -getCreatureSpeed(cid)) doChangeSpeed(cid, speed_final) end return true end Spell: local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA) setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 50, 60, 80, 1200) local area = createCombatArea(AREA_BEAM7, AREADIAGONAL_BEAM7) setCombatArea(combat, area) function onCastSpell(cid, var) return doCombat(cid, combat, var) end function onCastSpell(cid, var) if getPlayerStorageValue(cid, 112001) < 1 then return doPlayerSendCancel(cid, "Você não pode fazer isso.") end if isExhausted(cid, "!chamas") == FALSE then return doCombat(cid, combat, var), setCooldown(cid, "!chamas", 3) end return FALSE, doPlayerSendCancel(cid, "You are exhausted.") end Ou local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA) setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 50, 60, 80, 1200) local area = createCombatArea(AREA_BEAM7, AREADIAGONAL_BEAM7) setCombatArea(combat, area) function onCastSpell(cid, var) if getPlayerStorageValue(cid, 112001) < 1 then return doPlayerSendCancel(cid, "Você não pode fazer isso.") end if isExhausted(cid, "!chamas") == FALSE then return doCombat(cid, combat, var), setCooldown(cid, "!chamas", 3) end return FALSE, doPlayerSendCancel(cid, "You are exhausted.") end edit: Adriano, não sei se é só impressão minha, mas acho que você só verificou se o player está usando a outfit 258 (no caso, a outfit versão male). Se for isso mesmo que eu percebi, tenta fazer como tá no script da moto. Uma tabela com as outfits, uma variável que verifica a outfit dependendo do sexo do player e, depois, getCreatureOutfit(cid).lookType ~= variável
- 20 respostas
-
- dano de spell fixo
- resolvido
- (e 3 mais)
-
Se teleportar todos ao deslogar, tenta assim: local pos = {x = 100, y = 60, z = 7} function onLogout(cid) if getCreatureName(cid) == "Account Manager" then doTeleportThing(cid, pos) end return true end Não sei se dessa maneira irá funcionar, mas se quiser tentar.
-
O player tem que clicar em algum item para montar na moto? Ou essa outfit da moto é só uma outfit "normal"? Se for a primeira opção, suponho que bastaria setar uma storage no player ao montar na moto, e, nesse script da spell, verificasse essa storage.
- 20 respostas
-
- dano de spell fixo
- resolvido
- (e 3 mais)
-
Fiz rapidinho aqui, qualquer erro, só postar: XML (OBS: Não se esqueça de configurá-lo corretamente [no caso, looktype, head, body, name, etc]) <?xml version="1.0" encoding="UTF-8"?> <npc name="Nome do npc" script="tradenpc.lua" walkinterval="350000" floorchange="0" speed="0" lookdir="2"> <health now="150" max="150"/> <look type="1485" head="10" body="15" legs="20" feet="25"/> <parameters> <parameter key="message_greet" value="Ola, eu posso {trocar} alguns items por 30 Major Tokens."/> </parameters> </npc> Crie um arquivo .lua em data/npc/scripts com nome tradenpc, e coloque nele o seguinte conteúdo: 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 t = {items = {xxx, yyy, zzz}, give_items = {xxx, yyy, zzz}} local cfg = { token_id = xxx, --ID do Major Token. token_qnt = 30, --Quantidade de Major Tokens que o player terá que dar pro NPC. } if msgcontains(msg, 'trocar') or msgcontains(msg, 'troca') then selfSay("Então, você gostaria de trocar "..token_qnt.." Major Tokens por x quantidade de x items?", cid) talkState[talkUser] = 1 return true elseif msgcontains(msg, 'yes') and talkState[talkUser] == 1 then if getPlayerItemCount(cid, cfg.token_id) >= cfg.token_qnt then item = t.items qnt = t.give_items for a, b in pairs(t) do for i = 1, #item do selfSay("Certo, aqui estão os items!", cid) doPlayerRemoveItem(cid, cfg.token_id, cfg.token_qnt) doPlayerAddItem(cid, item[i], qnt[i]) talkState[talkUser] = 0 return true end end else selfSay("Você não tem os items necessários...", cid) talkState[talkUser] = 0 end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Sobre a tabela t, mude em items os items que irá ganhar, e a quantidade em give_items. Por exemplo, você quer que o player receba os items de ID 2156 (4 unidades) e 2157(7 unidades). Então, a configuração ficaria assim: local t = {items = {2156, 2157}, give_items = {4, 7}} Se o ID do item fica na primeira posição da tabela items, então sua quantidade deve ficar na primeira posição da tabela give_items.
-
poketibia [Pk] Npc Task System Para Poketibia
tópico respondeu ao GuhPk de zipter98 em NPCs, monsters e raids
Ah, de nada -
poketibia [Pk] Npc Task System Para Poketibia
tópico respondeu ao GuhPk de zipter98 em NPCs, monsters e raids
Vish, vou colocar esse NPC no meu server pra analisar melhor. Ai, quando eu corrigir os erros, posto aqui, ou se você preferir, mando por PM. -
poketibia [Pk] Npc Task System Para Poketibia
tópico respondeu ao GuhPk de zipter98 em NPCs, monsters e raids
Outra burrice, desculpe :c 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 t = {need_items = {2160, 2159, 2158}, remove_items = {1, 2, 3}} local g = t.need_items local h = t.remove_items premio1 = x -- coloque aqui o id do dinheiro quant1 = x -- quantidade de grana que vai ganhar pexp = x -- experiencia que vai ganhar no premio if msgcontains(msg, 'mission') or msgcontains(msg, 'help') then selfSay("Você gostaria de me ajudar numa missão?", cid) doPlayerSendTextMessage(cid, 27, "Say yes or no.") talkState[talkUser] = 1 return true elseif msgcontains(msg, 'yes') and talkState[talkUser] == 1 then if getPlayerStorageValue(cid, storage) < 1 then selfSay("Certo, vá pegar x qnt de x items!", cid) setPlayerStorageValue(cid, 222011, 1) doPlayerSendTextMessage(cid, 27, "If you alreay have the items, say complete.") talkState[talkUser] = 2 return true else selfSay("Você já me ajudou.", cid) talkState[talkUser] = 0 return true end elseif msgcontains(msg, 'no') and talkState[talkUser] == 1 then selfSay("Ok então...", cid) talkState[talkUser] = 0 return true elseif msgcontains(msg, 'complete') and (talkState[talkUser] == 2 or getPlayerStorageValue(cid, 222011) >= 1) then for i = 1, #g do if getPlayerItemCount(cid, g[i]) >= h[i] then doPlayerRemoveItem(cid, g[i], h[i]) selfSay("Obrigado! Aqui está seu prêmio.", cid) doPlayerAddItem(cid, premio1, quant1) setPlayerStorageValue(cid, storage, 1) setPlayerStorageValue(cid, 222011, -1) talkState[talkUser] = 0 return true else selfSay("Você não possui os items requisitados.", cid) talkState[talkUser] = 0 return true end end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) -
Não lembro direito desse script. Me passe por PM, que dou uma olhada melhor.
-
Vá em data/lib/Movement_Effects.lua, procure por: if isCreature(cid) then addEvent(sendAuraEffect, 3000, cid, eff) --Não sei se no seu estará 3000, de qualquer maneira, procure por essa parte. end E mude para: if isCreature(cid) then addEvent(sendAuraEffect, 1000, cid, eff) end 1000 = 1 segundo.
-
Help é no data/xml/channels.
-
Deve ser problema do XML que mandei. Recomendo que faça um XML próprio, ou mude essa parte: <look type="523" head="114" body="119" legs="114" feet="114" corpse="2212"/> Respectivamente, a "roupa" do NPC (look type); as cores da outfit dele (head, body, legs e feet); e a corpse dele. (esse último, como não altera muita coisa, pode deixar 2212.)
-
poketibia [Pk] Npc Task System Para Poketibia
tópico respondeu ao GuhPk de zipter98 em NPCs, monsters e raids
Foi mal, esse erro foi burrice minha ._. 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 t = {need_items = {2160, 2159, 2158}, remove_items = {1, 2, 3}} local g = t.need_items local h = t.remove_items premio1 = x -- coloque aqui o id do dinheiro quant1 = x -- quantidade de grana que vai ganhar pexp = x -- experiencia que vai ganhar no premio if msgcontains(msg, 'mission') or msgcontains(msg, 'help') then selfSay("Você gostaria de me ajudar numa missão?", cid) doPlayerSendTextMessage(cid, 27, "Say yes or no.") talkState[talkUser] = 1 return true elseif msgcontains(msg 'yes') and talkState[talkUser] == 1 then if getPlayerStorageValue(cid, storage) < 1 then selfSay("Certo, vá pegar x qnt de x items!", cid) setPlayerStorageValue(cid, 222011, 1) doPlayerSendTextMessage(cid, 27, "If you alreay have the items, say complete.") talkState[talkUser] = 2 return true else selfSay("Você já me ajudou.", cid) talkState[talkUser] = 0 return true end elseif msgcontains(msg, 'no') and talkState[talkUser] == 1 then selfSay("Ok então...", cid) talkState[talkUser] = 0 return true elseif msgcontains(msg, 'complete') and (talkState[talkUser] == 2 or getPlayerStorageValue(cid, 222011) >= 1) then for i = 1, #g do if getPlayerItemCount(cid, g[i]) >= h[i] then doPlayerRemoveItem(cid, g[i], h[i]) selfSay("Obrigado! Aqui está seu prêmio.", cid) doPlayerAddItem(cid, premio1, quant1) setPlayerStorageValue(cid, storage, 1) setPlayerStorageValue(cid, 222011, -1) talkState[talkUser] = 0 return true else selfSay("Você não possui os items requisitados.", cid) talkState[talkUser] = 0 return true end end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) -
Desculpe, pedi o arquivo errado '-' Poderia postar seu goback.lua, localizado em data/actions/scripts? #EDIT: Estou indo dormir agora, ai amanhã tento arrumar isso pra você.
-
pedido [Encerrado] NPC Chuck Norris da item depois de derrotado
tópico respondeu ao Alkimista de zipter98 em Tópicos Sem Resposta
Só entregar o item? -
poketibia [Pk] Npc Task System Para Poketibia
tópico respondeu ao GuhPk de zipter98 em NPCs, monsters e raids
Fiz esse NPC rapidinho aqui, qualquer erro, só postar. 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 storage = x -- storage id local local t = {need_items = {2160, 2159, 2158}, remove_items = {1, 2, 3}} local g = t.need_items local h = t.remove_items premio1 = x -- coloque aqui o id do dinheiro quant1 = x -- quantidade de grana que vai ganhar pexp = x -- experiencia que vai ganhar no premio if msgcontains(msg, 'mission') or msgcontains(msg, 'help') then selfSay("Você gostaria de me ajudar numa missão?", cid) doPlayerSendTextMessage(cid, 27, "Say yes or no.") talkState[talkUser] = 1 return true elseif msgcontains(msg 'yes') and talkState[talkUser] == 1 then if getPlayerStorageValue(cid, storage) < 1 then selfSay("Certo, vá pegar x qnt de x items!", cid) setPlayerStorageValue(cid, 222011, 1) doPlayerSendTextMessage(cid, 27, "If you alreay have the items, say complete.") talkState[talkUser] = 2 return true else selfSay("Você já me ajudou.", cid) talkState[talkUser] = 0 return true end elseif msgcontains(msg, 'no') and talkState[talkUser] == 1 then selfSay("Ok então...", cid) talkState[talkUser] = 0 return true elseif msgcontains(msg, 'complete') and (talkState[talkUser] == 2 or getPlayerStorageValue(cid, 222011) >= 1) then for i = 1, #g do if getPlayerItemCount(cid, g[i]) >= h[i] then doPlayerRemoveItem(cid, g[i], h[i]) selfSay("Obrigado! Aqui está seu prêmio.", cid) doPlayerAddItem(cid, premio1, quant1) setPlayerStorageValue(cid, storage, 1) setPlayerStorageValue(cid, 222011, -1) talkState[talkUser] = 0 return true else selfSay("Você não possui os items requisitados.", cid) talkState[talkUser] = 0 return true end end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) -
Poderia postar seu some functions.lua? [data/lib]
-
poketibia [Pk] Npc Task System Para Poketibia
tópico respondeu ao GuhPk de zipter98 em NPCs, monsters e raids
Sobre essa parte, tenta assim: local t = {need_items = {2160, 2159, 2158}, remove_items = {1, 2, 3}} g = t.need_items h = t.remove_items if quest1 ==1 then selfSay('Bom! Entao vc trouxe os meus itens? Deixe-me ver.',cid) for i = 1, #g do if getPlayerItemCount(cid, g[i]) >= h[i] then doPlayerRemoveItem(cid, g[i], h[i]) selfSay('Obrigado! Agora poderei termina de concertar minha bicicleta. Aqui esta sua recompenca!',cid) doPlayerAddItem(cid, premio1, quant1) else selfSay("Você não possui os items requisitados.", cid) talkState[talkUser] = 0 end end -
poketibia [Pk] Npc Task System Para Poketibia
tópico respondeu ao GuhPk de zipter98 em NPCs, monsters e raids
Sobre a animação, poderia ser um doSendAnimatedText(getThingPos(cid), pexp, 215) Dessa maneira, irá simular como se o player recebesse a exp normalmente. EDIT: Sobre remover mais de um item, faz tipo assim: local t = {need_items = {2160, 2159, 2158}, remove_items = {1, 2, 3}} g = t.need_items h = t.remove_items for i = 1, #g do if getPlayerItemCount(cid, g[i]) >= h[i] then doPlayerRemoveItem(cid, g[i], h[i]) else return doPlayerSendCancel(cid, "Você não tem os items necessários.") end end Na tabela, a posição dos valores da variável need_items deve ser igual à remove_items. Assim, como o ID 2160 está na posição 1 da variável need_items, irá ser removido apenas uma unidade desde item. (Perceba que na variável remove_items, o valor 1 está na posição 1; portanto, o valor que será retirado do item que se encontra na posição 1 da variável need_items é o valor que se encontra na posição 1 da variável remove_items). Do item que se encontra na posição 2, no caso, 2159, será removido 2 unidades. Já do 2158, 3 unidades. -
Tenta: 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 need_lv = 250 if msgcontains(msg, 'promotion') or msgcontains(msg, 'promote') then selfSay("Então, você gostaria de ser promovido?", cid) doPlayerSendTextMessage(cid, 27, "Say yes or no. You need be at least level "..need_lv.." to be promoted.") talkState[talkUser] = 1 return true elseif msgcontains(msg, 'yes') and talkState[talkUser] == 1 then if getPlayerLevel(cid) >= need_lv then selfSay("Parabéns, você foi promovido.") doPlayerSetPromotionLevel(cid, 1) talkState[talkUser] = 0 return true else selfSay("Você precisa estar, no mínimo, level "..need_lv.." para ser promovido.", cid) talkState[talkUser] = 0 return true end elseif msgcontains(msg, 'no') and talkState[talkUser] == 1 then selfSay("Ok, então...", cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) O XML, você sabe criar?
-
Tinha feito correndo, ai nem reparei nisso e.e Valeu por corrigir!
-
function onUse(cid, item, frompos, item2, topos) local pos = {x=1710, y=1000, z=4} local need_lv = 200 if getPlayerLevel(cid) >= need_lv then doTeleportThing(cid, pos) doSendMagicEffect(pos, CONST_ME_TELEPORT) else return doPlayerSendCancel(cid, "Você precisa ser level "..need_lv.." para passar por esta porta.") end return 1 end
- 4 respostas
-
- pedido - poketibia
- resolvido
- (e 1 mais)
-
[Encerrado] Help here! Como faço para adiciona stones no boostmachine? e_e
tópico respondeu ao JulynaMiiy de zipter98 em Tópicos Sem Resposta
Em relação ao seu boost.lua, você configurou a Ancient Stone e Metal Stone no configuration.lua? (Porque, caso não tenha, metals e ancient vão assumir um valor nulo ao boostar). Sobre isso da configuração das stones, fica nessa parte do configuration.lua: leaf = 11441 grass = 11441 water = 11442 venom = 11443 thunder = 11444 rock = 11445 punch = 11446 fire = 11447 coccon = 11448 crystal = 11449 dark = 11450 earth = 11451 enigma = 11452 heart = 11453 ice = 11454 boostStone = 12618 Se o ID da Ancient Stone for, por exemplo, 11455, você mudaria essa parte para: leaf = 11441 grass = 11441 water = 11442 venom = 11443 thunder = 11444 rock = 11445 punch = 11446 fire = 11447 coccon = 11448 crystal = 11449 dark = 11450 earth = 11451 enigma = 11452 heart = 11453 ice = 11454 boostStone = 12618 ancient = 11455
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.
