Cara, de novo criando tópico de servidor derivado aqui? Dessa vez passa, na próxima é REP-.
Tópico movido.
Por Pmcd, 08 de dez. de 2012 em Tópicos Sem Resposta
info
Grupo: Marquês
Registrado: 22/07/12
Posts: 1.1k
Reputação: +400
Gênero: Masculino
Char no Tibia: Luck Oake

Cara, de novo criando tópico de servidor derivado aqui? Dessa vez passa, na próxima é REP-.
Tópico movido.
Foi mal Luck
É que se eu não postar aqui ninguém responde .-.
info
Grupo: Príncipe
Registrado: 19/08/10
Posts: 4k
Reputação: +1.1k
Gênero: Masculino

ta ae..
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
msg = string.lower(msg)
--- Atributos ---
local needPoke = "Mr. Mime" --poke q o player precisa ter...
local tradePoke = "Chansey" --poke q o player vai ganhar...
--- end ---
--- Functions ---
function givePoke(cid, pokemon)
if pokemon == "" then return true end
local gender = getRandomGenderByName(pokemon)
local btype = "normal"
local happy = 200
if getPlayerFreeCap(cid) >= 6 or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then -
item = doCreateItemEx(11826)
else
item = addItemInFreeBag(getPlayerSlotItem(cid, 3).uid, 11826, 1)
end
doItemSetAttribute(item, "poke", pokemon)
doItemSetAttribute(item, "hp", 1)
doItemSetAttribute(item, "happy", happy)
doItemSetAttribute(item, "gender", gender)
doItemSetAttribute(item, "description", "Contains a "..pokemon..".")
doItemSetAttribute(item, "fakedesc", "Contains a "..pokemon..".")
if getPlayerFreeCap(cid) >= 6 or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then
doPlayerSendMailByName(getCreatureName(cid), item, 1)
end
end
function havePokemon(cid, poke, excluir)
local pbs = getPokeballsInContainer(getPlayerSlotItem(cid, 3).uid)
local slot = getPlayerSlotItem(cid, 8)
if slot.itemid > 0 and isPokeball(slot.itemid) then
if getItemAttribute(slot.uid, "poke") == poke and excluir and excluir == true then
doRemoveItem(slot.uid, 1)
doTransformItem(getPlayerSlotItem(cid, CONST_SLOT_LEGS).uid, 2395)
return true
elseif getItemAttribute(slot.uid, "poke") == poke then
return true
end
end
for i = 1, #pbs do
if getItemAttribute(pbs, "poke") == poke and excluir and excluir == true then
doRemoveItem(pbs, 1)
return true
elseif getItemAttribute(pbs, "poke") == poke then
return true
end
end
return false
end
--- end ---
if (msgcontains(msg, 'change') or msgcontains(msg, 'trade')) then
if havePokemon(cid, needPoke) then
selfSay("Are you sure you want to exchange your "..needPoke.." for my "..tradePoke.."?", cid)
talkState[talkUser] = 2
else
selfSay("You don't have "..getArticle(needPoke).." "..needPoke.." with you!", cid)
talkState[talkUser] = 0
return true
end
elseif msgcontains(msg, 'yes') then
if havePokemon(cid, needPoke, true) then
selfSay("Thanks so much! I will take care of your "..needPoke.." and i hope you enjoy my "..tradePoke.."!", cid)
givePoke(cid, tradePoke, level)
talkState[talkUser] = 0
return true
else
selfSay("Are you trying to joke with me? Good bye!", cid)
talkState[talkUser] = 0
return true
end
elseif msgcontains(msg, 'no') then
selfSay("Ok then... Good bye.", cid)
talkState[talkUser] = 0
return true
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
Vlw Slicer , amanhã dou REP + pq hj n posso ! Mesmo assim valew mt mt mt mt mt mt mt mt mt !
info
Grupo: Lorde
Registrado: 05/06/12
Posts: 2.2k
Reputação: +215
Gênero: Masculino

Duvida Resolvida!
Tópico Movido.
Fiz um teste e deu um erro , o NPC retira o pokémon mais não entrega o outro. Me ajuda?
info
Grupo: Lorde
Registrado: 05/06/12
Posts: 2.2k
Reputação: +215
Gênero: Masculino

Como a Duvida não foi resolvida, estarei movendo de volta para Pedidos e Duvidas - Servidores Derivados, Mas a proxima vez crie um novo topico.
Editado Dezembro 9 por Yan18
Pow, outro system que eu já pedi aqui, e o slicer já até tinha respondido...
Povo... Tenham mais imaginação, pensem em seus proprios system's, plagiadores... U.U'
info
Grupo: Príncipe
Registrado: 19/08/10
Posts: 4k
Reputação: +1.1k
Gênero: Masculino

/\
esse sistema eh do GBA entao vc q plagiou de la.. n vem fla isso aki blz? todos os nossos sistemas sao plagios de alguma coisa, no caso a maioria eh plagio da pxg...
Não acho que tudo seja plagio cara, pois já vi muitos sistemas de pokemon nunca existentes nem no anime e nem nos jogos...
Mas você não entendeu oque eu quis dizer com "plagio" cara, não vou explicar porque vou acabar fazer bagunça aqui no tópico...
PS: Não curto PxG cara, então pode ter certeza que não copiarei nada de serverzito... U.U' kkk
#Tópico
Aqui está o NPC, quem fez foi o Slicer no tópico que eu havia feito, só fiz TENTAR tirar o level...
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
msg = string.lower(msg)
--- Atributos ---
local needPoke = "Shiny Dragonite" --poke q o player precisa ter...
local tradePoke = "Chansey" --poke q o player vai ganhar...
--- end ---
--- Functions ---
function givePoke(cid, pokemon, lvl)
if pokemon == "" then return true end
local gender = getRandomGenderByName(pokemon)
local mypoke = getPokemonStatus(pokemon)
if not mypoke then return true end
local extrastr = 1.5
local btype = "normal"
local happy = 200
if getPlayerFreeCap(cid) >= 6 or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then
item = doCreateItemEx(11826)
else
item = addItemInFreeBag(getPlayerSlotItem(cid, 3).uid, 11826, 1)
end
doItemSetAttribute(item, "poke", pokemon)
doItemSetAttribute(item, "hp", 1)
doItemSetAttribute(item, "offense", offense)
doItemSetAttribute(item, "defense", defense)
doItemSetAttribute(item, "speed", speed)
doItemSetAttribute(item, "vitality", vit)
doItemSetAttribute(item, "specialattack", spatk)
doItemSetAttribute(item, "happy", happy)
doItemSetAttribute(item, "gender", gender)
doItemSetAttribute(item, "description", "Contains a "..pokemon..".")
doItemSetAttribute(item, "fakedesc", "Contains a "..pokemon..".")
if getPlayerFreeCap(cid) >= 6 or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then --alterado v2.6
doPlayerSendMailByName(getCreatureName(cid), item, 1)
end
end
function havePokemon(cid, poke, excluir)
local pbs = getPokeballsInContainer(getPlayerSlotItem(cid, 3).uid)
local slot = getPlayerSlotItem(cid, 8)
if slot.itemid > 0 and isPokeball(slot.itemid) then
if getItemAttribute(slot.uid, "poke") == poke and excluir and excluir == true then
doRemoveItem(slot.uid, 1)
doTransformItem(getPlayerSlotItem(cid, CONST_SLOT_LEGS).uid, 2395)
return true
elseif getItemAttribute(slot.uid, "poke") == poke then
return true
end
end
for i = 1, #pbs do
if getItemAttribute(pbs, "poke") == poke and excluir and excluir == true then
doRemoveItem(pbs, 1)
return true
elseif getItemAttribute(pbs, "poke") == poke then
return true
end
end
return false
end
--- end ---
if (msgcontains(msg, 'change') or msgcontains(msg, 'trade')) then
if havePokemon(cid, needPoke) then
selfSay("Are you sure you want to exchange your "..needPoke.." for my "..tradePoke.."?", cid)
talkState[talkUser] = 2
else
selfSay("You don't have "..getArticle(needPoke).." "..needPoke.." with you!", cid)
talkState[talkUser] = 0
return true
end
elseif msgcontains(msg, 'yes') then
if havePokemon(cid, needPoke, true) then
selfSay("Thanks so much! I will take care of your "..needPoke.." and i hope you enjoy my "..tradePoke.."!", cid)
givePoke(cid, tradePoke)
talkState[talkUser] = 0
return true
else
selfSay("Are you trying to joke with me? Good bye!", cid)
talkState[talkUser] = 0
return true
end
elseif msgcontains(msg, 'no') then
selfSay("Ok then... Good bye.", cid)
talkState[talkUser] = 0
return true
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
Editado Dezembro 9 por GuhPk
info
Grupo: Herói
Registrado: 28/11/10
Posts: 3.4k
Reputação: +585
Gênero: Masculino

info
Grupo: Artesão
Registrado: 14/09/12
Posts: 104
Reputação: +1
Olá xtibianos , venho aqui novamente para fazer meu pedido de NPC.
Tipo do script: Npc que troca pokémon por outro
Protocolo (versão do Tibia): 8.54
Servidor utilizado: Pokémon Dash Advanced By Slicer SEM LEVEL
Detalhes adicionais :
Quero um Npc assim :
Player : Hi
Npc : Olá ! Você deseja trocar seu Bulbasaur pelo meu Chikorita ?
Player : Sim
NPC : Obrigado pela troca , cuide bem do(a) Chikorita.
e caso o Player não tiver o Bulbausar :
Player : Hi
Npc : Olá ! Você deseja trocar seu Bulbasaur pelo meu Chikorita ?
Player : Sim
NPC : Você não tem um Bulbasaur !
e caso o Player diga não :
Player : Hi
Npc : Olá ! Você deseja trocar seu Bulbasaur pelo meu Chikorita ?
Player : Não
NPC : Ok . volte quando mudar de idéia !
Por favor , preciso disso com urgência , obrigado adiantado para aquele que ajudar ! e um REP + !