Seria interessante você postar os IDs das pokeballs.
- Fórum
- xTibia - Notícias e Suporte
- Soluções
- Archived
- PEDIDO NPC PDA
7
882
21 de março de 2014 às 19:39
21 de março de 2014 às 20:02
Seria interessante você postar os IDs das pokeballs.
[2394]"normal"
[2391] "great"
[2393] = "super"
[2392] = "ultra"
ESSES ?
21 de março de 2014 às 20:23
Sabe fazer o .xml?
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 configuration = {
id = xxx, --ID do item que o jogador irá receber.
position = {x = x, y = y, z = z}, --Para onde o jogador irá ser teleportado.
quantity = 5,
}
local check = {}
if msgcontains(msg:lower(), "enter") or msgcontains(msg:lower(), "travel") then
selfSay("Para ser teleportado e receber "..configuration.quantity.." "..getItemNameById(configuration.id)..", você precisa remover as pokeballs vazias de sua bag. Deseja continuar?", cid)
talkState[talkuser] = 1
return true
elseif (msgcontains(msg:lower(), "yes") or msgcontains(msg:lower(), "sim")) and talkState[talkUser] == 1 then
for i = 2391, 2394 do
if getPlayerItemCount(cid, i) > 0 then
table.insert(check, i)
end
end
if #check > 0 then
local str = ""
for i = 1, #check do
if str == "" then
str = getItemNameById(check[i])
else
str = str..", "..getItemNameById(check[i])
end
end
selfSay("Você possui em sua bag a(s) seguinte(s) pokeball(s): "..str, cid)
talkState[talkUser] = 0
return true
else
selfSay("Boa sorte!", cid)
doPlayerAddItem(cid, configuration.id, configuration.quantity)
doTeleportThing(cid, configuration.position)
talkState[talkUser] = 0
return true
end
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
21 de março de 2014 às 20:24
Nao =/ ![]()
![]()
21 de março de 2014 às 23:08
<?xml version="1.0" encoding="UTF-8"?> <npc name="Nome" script="nome do arquivo.lua" walkinterval="0" floorchange="0" access="5" level="1" maglevel="1"> <health now="150" max="150"/> <look type="523" head="114" body="119" legs="114" feet="114" corpse="2212"/> <parameters> <parameter key="message_greet" value="Hello |PLAYERNAME|, wants travel?"/> </parameters> </npc>
Não se esqueça de alterar a fala, looktype e etc.
Editado Março 21 por zipter98




info
Grupo: Campones
Registrado: 27/02/13
Posts: 12
Reputação: +1
Char no Tibia: Erik
EAE GALERA, to aqui pra pedir a ajuda de vocês eu queria um npc que teletransporta o player para um lugar ,e que pra isso o player não pode ter nenhuma ball dentro da bag ultra,great,pokeball,ultraball ele só pode ir com os pokes e a hora que ele for teleportado o npc vai da 5 pokeballs pra ele...
QUEM AJUDAR REP+