assim eu uso o servidor PDA v1.9 do Slicer, eu modifiquei os scripts de um npc paint pra pintar as balls, até ai tudo bem, mas tipo assim, eu tive que criar dois NPCs, um pra pintar as balls shinys e outros pras normais, eu queria saber se alguem pode me ajudar a juntar os dois scripts em um só.
tbm assim, eu uso o icon system do Smixx, como eu faço pro npc reconhecer os novos itens e pintar somente a ball e não trocar a imagem do icon system.
não sei se fui claro nas minhas dúvidas, mas se alguem estiver disposto a ajudar eu dou mais detalhes
segue abaixo os dois scripts:
Paint Shiny
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
npcHandler:setCallback(CALLBACK_GREET, greetCallback)
npcHandler:setMessage(MESSAGE_GREET, 'Bem-vindo à minha loja de pintura |PLAYERNAME|! Lembre-se que eu pinto apenas balls shinys.')
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
-- master, lure, water, fire, dusk, lua, orange, eletric, ice
local pokesalive = {'11746', '11743', '11740', '11737', '12621', '113', '119', '125', '300', '303', '306', '309', '312', '315', '318', '324', '330'}
if(msgcontains(msg, 'paint')) then
selfSay('Você quer pintar a sua pokeball?', cid)
talkState = 1
elseif(msgcontains(msg, 'yes') and talkState == 1) then
selfSay('Olá, você pode escolher: Shiny Masterball, Shiny Pokeball, Shiny Greatball, Shiny Superball, Shiny Ultraball, Shiny Loveball, Shiny Darkball, Shiny Goldenball, Shiny Lureball, Shiny Waterball, Shiny Fireball, Shiny Eletricball, Shiny Iceball Shiny Duskball, Shiny Luaball e Shiny Orangeball', cid)
talkState = 2
elseif(msgcontains(msg, 'no') and talkState == 1) then
selfSay('Volte outra vez!', cid)
talkState = 0
npcHandler:releaseFocus(cid)
elseif((msgcontains(msg, 'Shiny Pokeball') or msgcontains(msg, 'Shiny Poke ball') or msgcontains(msg, 'shiny pokeball') or msgcontains(msg, 'shiny poke ball') or msgcontains(msg, 'pokeball') or msgcontains(msg, 'Pokeball') or msgcontains(msg, 'shinypokeball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
selfSay('Você realmente quer pintar a sua bola como uma Shiny pokeball? isto ira lhe custar 200 dólares!', cid)
talkState = 3
else
selfSay('Você deve colocar a bola fechada no slot.', cid)
talkState = 2
end
elseif(msgcontains(msg, 'yes') and talkState == 3) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
if doPlayerRemoveMoney(cid,20000) == true then
selfSay('Boa escolha, a partir de agora todos irão vê-lo como uma shiny pokeball! Há qualquer outra coisa que eu possa ajudá-lo?', cid)
doTransformItem(getPlayerSlotItem(cid, 8).uid, 11737)
talkState = 0
else
selfSay('Sorry '.. getCreatureName(cid) ..', mas você não tem dinheiro suficiente.', cid)
talkState = 0
end
else
selfSay('Por favor, mantenha sua bola fechada na slot.', cid)
talkState = 2
end
elseif((msgcontains(msg, 'Shiny Greatball') or msgcontains(msg, 'Shiny Great ball') or msgcontains(msg, 'shiny greatball') or msgcontains(msg, 'shinygreatball') or msgcontains(msg, 'shiny great ball') or msgcontains(msg, 'greatball') or msgcontains(msg, 'Greatball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
selfSay('Você realmente quer pintar a sua bola como uma Shiny Greatball? Ele vai te custar 300 dólares!', cid)
talkState = 4
else
selfSay('Você deve colocar a bola fechada no slot.', cid)
talkState = 2
end
elseif(msgcontains(msg, 'yes') and talkState == 4) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
if doPlayerRemoveMoney(cid,30000) == true then
selfSay('Boa escolha, a partir de agora todos irão vê-lo como uma Shiny Greatball! Há qualquer outra coisa que eu possa ajudá-lo?', cid)
doTransformItem(getPlayerSlotItem(cid, 8).uid, 11740)
talkState = 0
else
selfSay('Sorry '.. getCreatureName(cid) ..', mas você não tem dinheiro suficiente.', cid)
talkState = 0
end
else
selfSay('Por favor, mantenha sua bola fechada na slot.', cid)
talkState = 2
end
elseif((msgcontains(msg, 'Shiny Superball') or msgcontains(msg, 'Shiny Super ball') or msgcontains(msg, 'shiny superball') or msgcontains(msg, 'superball') or msgcontains(msg, 'Superball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
selfSay('Você realmente quer pintar a sua bola como uma shiny Superball? Ele vai te custar 300 dólares!', cid)
talkState = 5
else
selfSay('Você deve colocar a bola fechada no slot.', cid)
talkState = 2
end
elseif(msgcontains(msg, 'yes') and talkState == 5) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
if doPlayerRemoveMoney(cid,30000) == true then
selfSay('Boa escolha, a partir de agora todos irão vê-lo como uma Shiny Superball! Há qualquer outra coisa que eu possa ajudá-lo?', cid)
doTransformItem(getPlayerSlotItem(cid, 8).uid, 11743)
talkState = 0
else
selfSay('Sorry '.. getCreatureName(cid) ..', mas você não tem dinheiro suficiente.', cid)
talkState = 0
end
else
selfSay('Por favor, mantenha sua bola fechada na slot.', cid)
talkState = 2
end
elseif((msgcontains(msg, 'Shiny Ultra ball') or msgcontains(msg, 'Shiny Ultraball') or msgcontains(msg, 'shiny ultraball') or msgcontains(msg, 'shinyultraball') or msgcontains(msg, 'ultraball') or msgcontains(msg, 'Ultraball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
selfSay('Você realmente quer pintar a sua bola como um Shiny Ultraball? Ele vai te custar 500 dólares!', cid)
talkState = 6
else
selfSay('Você deve colocar a bola fechada no slot.', cid)
talkState = 2
end
elseif(msgcontains(msg, 'yes') and talkState == 6) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
if doPlayerRemoveMoney(cid,50000) == true then
selfSay('Boa escolha, a partir de agora todos irão vê-lo como uma Shiny Ultraball! Há qualquer outra coisa que eu possa ajudá-lo?', cid)
doTransformItem(getPlayerSlotItem(cid, 8).uid, 11746)
talkState = 0
else
selfSay('Sorry '.. getCreatureName(cid) ..', mas você não tem dinheiro suficiente.', cid)
talkState = 0
end
else
selfSay('Por favor, mantenha sua bola fechada na slot.', cid)
talkState = 2
end
elseif((msgcontains(msg, 'Golden Ball') or msgcontains(msg, 'Shiny Goldenball') or msgcontains(msg, 'Shiny Golden ball') or msgcontains(msg, 'shinygoldenball') or msgcontains(msg, 'goldenball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
selfSay('Você realmente quer pintar a sua bola como uma Goldenball? Ele vai te custar 1000 dólares!', cid)
talkState = 7
else
selfSay('Você deve colocar a bola fechada no slot.', cid)
talkState = 2
end
elseif(msgcontains(msg, 'yes') and talkState == 7) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
if doPlayerRemoveMoney(cid,100000) == true then
selfSay('Boa escolha, a partir de agora todos irão vê-lo como uma Goldenball! Há qualquer outra coisa que eu possa ajudá-lo?', cid)
doTransformItem(getPlayerSlotItem(cid, 8).uid, 113)
talkState = 0
else
selfSay('Sorry '.. getCreatureName(cid) ..', mas você não tem dinheiro suficiente.', cid)
talkState = 0
end
else
selfSay('Por favor, mantenha sua bola fechada na slot.', cid)
talkState = 2
end
elseif((msgcontains(msg, 'Shiny Loveball') or msgcontains(msg, 'Shiny Love ball') or msgcontains(msg, 'shiny love ball') or msgcontains(msg, 'shinyloveball') or msgcontains(msg, 'loveball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
selfSay('Você realmente quer pintar a sua bola como um Loveball? Ele vai te custar 1000 dólares!', cid)
talkState = 8
else
selfSay('Você deve colocar a bola fechada no slot.', cid)
talkState = 2
end
elseif(msgcontains(msg, 'yes') and talkState == 8) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
if doPlayerRemoveMoney(cid,100000) == true then
selfSay('Boa escolha, a partir de agora um, ele vai olhar como uma Loveball! Há qualquer outra coisa que eu possa ajudá-lo?', cid)
doTransformItem(getPlayerSlotItem(cid, 8).uid, 125)
talkState = 0
else
selfSay('Sorry '.. getCreatureName(cid) ..', mas você não tem dinheiro suficiente.', cid)
talkState = 0
end
else
selfSay('Por favor, mantenha sua bola fechada na slot.', cid)
talkState = 2
end
elseif((msgcontains(msg, 'Darkball') or msgcontains(msg, 'Shiny Dark ball') or msgcontains(msg, 'shiny dark ball') or msgcontains(msg, 'shinydarkball') or msgcontains(msg, 'darkball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
selfSay('Você realmente quer pintar a sua bola como um Dark ball? Ele vai te custar 1000 dólares!', cid)
talkState = 9
else
selfSay('Você deve colocar a bola fechada no slot.', cid)
talkState = 2
end
elseif(msgcontains(msg, 'yes') and talkState == 9) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
if doPlayerRemoveMoney(cid,100000) == true then
selfSay('Boa escolha, a partir de agora um, ele vai olhar como uma Darkball! Há qualquer outra coisa que eu possa ajudá-lo?', cid)
doTransformItem(getPlayerSlotItem(cid, 8).uid, 119)
talkState = 0
else
selfSay('Sorry '.. getCreatureName(cid) ..', mas você não tem dinheiro suficiente.', cid)
talkState = 0
end
else
selfSay('Por favor, mantenha sua bola fechada na slot.', cid)
talkState = 2
end
----saffari ball
elseif((msgcontains(msg, 'shiny saffari') or msgcontains(msg, 'saffari') or msgcontains(msg, 'saffari ball') or msgcontains(msg, 'saffariball') or msgcontains(msg, 'shiny saffari ball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
selfSay('Você realmente quer pintar a sua bola como uma Saffari ball? Ele vai te custar 500 dólares!', cid)
talkState = 9
else
selfSay('Você deve colocar a bola fechada no slot.', cid)
talkState = 2
end
elseif(msgcontains(msg, 'yes') and talkState == 9) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
if doPlayerRemoveMoney(cid,50000) == true then
selfSay('Boa escolha, a partir de agora um, ele vai olhar como uma Saffariball! Há qualquer outra coisa que eu possa ajudá-lo?', cid)
doTransformItem(getPlayerSlotItem(cid, 8).uid, 12621)
talkState = 0
else
selfSay('Sorry '.. getCreatureName(cid) ..', mas você não tem dinheiro suficiente.', cid)
talkState = 0
end
else
selfSay('Por favor, mantenha sua bola fechada na slot.', cid)
talkState = 2
end
----fim saffari ball--
--lure ball
elseif((msgcontains(msg, 'shiny lureball') or msgcontains(msg, 'lureball') or msgcontains(msg, 'Lure ball') or msgcontains(msg, 'Shiny Lureball') or msgcontains(msg, 'shiny lure ball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
selfSay('Você realmente quer pintar a sua bola como uma Shiny Lureball? Ele vai te custar 1000 dólares!', cid)
talkState = 10
else
selfSay('Você deve colocar a bola fechada no slot.', cid)
talkState = 2
end
elseif(msgcontains(msg, 'yes') and talkState == 10) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
if doPlayerRemoveMoney(cid,100000) == true then
selfSay('Boa escolha, a partir de agora um, ele vai olhar como uma Lureball! Há qualquer outra coisa que eu possa ajudá-lo?', cid)
doTransformItem(getPlayerSlotItem(cid, 8).uid, 303)
talkState = 0
else
selfSay('Sorry '.. getCreatureName(cid) ..', mas você não tem dinheiro suficiente.', cid)
talkState = 0
end
else
selfSay('Por favor, mantenha sua bola fechada na slot.', cid)
talkState = 2
end
----fim lure ball
--water ball
elseif((msgcontains(msg, 'shiny waterball') or msgcontains(msg, 'waterball') or msgcontains(msg, 'Waterball') or msgcontains(msg, 'Shiny Waterball') or msgcontains(msg, 'shiny water ball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
selfSay('Você realmente quer pintar a sua bola como uma Shiny Waterball? Ele vai te custar 1500 dólares!', cid)
talkState = 11
else
selfSay('Você deve colocar a bola fechada no slot.', cid)
talkState = 2
end
elseif(msgcontains(msg, 'yes') and talkState == 11) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
if doPlayerRemoveMoney(cid,150000) == true then
selfSay('Boa escolha, a partir de agora um, ele vai olhar como uma Waterball! Há qualquer outra coisa que eu possa ajudá-lo?', cid)
doTransformItem(getPlayerSlotItem(cid, 8).uid, 306)
talkState = 0
else
selfSay('Sorry '.. getCreatureName(cid) ..', mas você não tem dinheiro suficiente.', cid)
talkState = 0
end
else
selfSay('Por favor, mantenha sua bola fechada na slot.', cid)
talkState = 2
end
----fim water ball
--fire ball
elseif((msgcontains(msg, 'shiny fireball') or msgcontains(msg, 'fireball') or msgcontains(msg, 'Fireball') or msgcontains(msg, 'Shiny Fireball') or msgcontains(msg, 'shiny fire ball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
selfSay('Você realmente quer pintar a sua bola como uma Shiny Fireball? Ele vai te custar 1500 dólares!', cid)
talkState = 12
else
selfSay('Você deve colocar a bola fechada no slot.', cid)
talkState = 2
end
elseif(msgcontains(msg, 'yes') and talkState == 12) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
if doPlayerRemoveMoney(cid,150000) == true then
selfSay('Boa escolha, a partir de agora um, ele vai olhar como uma Fireball! Há qualquer outra coisa que eu possa ajudá-lo?', cid)
doTransformItem(getPlayerSlotItem(cid, 8).uid, 309)
talkState = 0
else
selfSay('Sorry '.. getCreatureName(cid) ..', mas você não tem dinheiro suficiente.', cid)
talkState = 0
end
else
selfSay('Por favor, mantenha sua bola fechada na slot.', cid)
talkState = 2
end
----fim fire ball
--dusk ball
elseif((msgcontains(msg, 'shiny duskball') or msgcontains(msg, 'duskball') or msgcontains(msg, 'Duskball') or msgcontains(msg, 'Shiny Duskball') or msgcontains(msg, 'shiny dusk ball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
selfSay('Você realmente quer pintar a sua bola como uma Shiny Duskball? Ele vai te custar 1500 dólares!', cid)
talkState = 13
else
selfSay('Você deve colocar a bola fechada no slot.', cid)
talkState = 2
end
elseif(msgcontains(msg, 'yes') and talkState == 13) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
if doPlayerRemoveMoney(cid,150000) == true then
selfSay('Boa escolha, a partir de agora um, ele vai olhar como uma Duskball! Há qualquer outra coisa que eu possa ajudá-lo?', cid)
doTransformItem(getPlayerSlotItem(cid, 8).uid, 312)
talkState = 0
else
selfSay('Sorry '.. getCreatureName(cid) ..', mas você não tem dinheiro suficiente.', cid)
talkState = 0
end
else
selfSay('Por favor, mantenha sua bola fechada na slot.', cid)
talkState = 2
end
----fim dusk ball
--lua ball
elseif((msgcontains(msg, 'shiny luaball') or msgcontains(msg, 'luaball') or msgcontains(msg, 'Luaball') or msgcontains(msg, 'Shiny Luaball') or msgcontains(msg, 'shiny lua ball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
selfSay('Você realmente quer pintar a sua bola como uma Shiny Luaball? Ele vai te custar 1500 dólares!', cid)
talkState = 14
else
selfSay('Você deve colocar a bola fechada no slot.', cid)
talkState = 2
end
elseif(msgcontains(msg, 'yes') and talkState == 14) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
if doPlayerRemoveMoney(cid,150000) == true then
selfSay('Boa escolha, a partir de agora um, ele vai olhar como uma Luaball! Há qualquer outra coisa que eu possa ajudá-lo?', cid)
doTransformItem(getPlayerSlotItem(cid, 8).uid, 315)
talkState = 0
else
selfSay('Sorry '.. getCreatureName(cid) ..', mas você não tem dinheiro suficiente.', cid)
talkState = 0
end
else
selfSay('Por favor, mantenha sua bola fechada na slot.', cid)
talkState = 2
end
----fim lua ball
--orange ball
elseif((msgcontains(msg, 'shiny orangeball') or msgcontains(msg, 'orangeball') or msgcontains(msg, 'Orangeball') or msgcontains(msg, 'Shiny Orangeball') or msgcontains(msg, 'shiny orange ball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
selfSay('Você realmente quer pintar a sua bola como uma Shiny Orangeball? Ele vai te custar 1500 dólares!', cid)
talkState = 15
else
selfSay('Você deve colocar a bola fechada no slot.', cid)
talkState = 2
end
elseif(msgcontains(msg, 'yes') and talkState == 15) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
if doPlayerRemoveMoney(cid,150000) == true then
selfSay('Boa escolha, a partir de agora um, ele vai olhar como uma Orangeball! Há qualquer outra coisa que eu possa ajudá-lo?', cid)
doTransformItem(getPlayerSlotItem(cid, 8).uid, 318)
talkState = 0
else
selfSay('Sorry '.. getCreatureName(cid) ..', mas você não tem dinheiro suficiente.', cid)
talkState = 0
end
else
selfSay('Por favor, mantenha sua bola fechada na slot.', cid)
talkState = 2
end
----fim lua ball
--master ball
elseif((msgcontains(msg, 'shiny masterball') or msgcontains(msg, 'masterball') or msgcontains(msg, 'Masterball') or msgcontains(msg, 'Shiny Masterball') or msgcontains(msg, 'shiny master ball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
selfSay('Você realmente quer pintar a sua bola como uma Shiny Masterball? Ele vai te custar 10 mil dólares!', cid)
talkState = 16
else
selfSay('Você deve colocar a bola fechada no slot.', cid)
talkState = 2
end
elseif(msgcontains(msg, 'yes') and talkState == 16) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
if doPlayerRemoveMoney(cid,1000000) == true then
selfSay('Boa escolha, a partir de agora um, ele vai olhar como uma Orangeball! Há qualquer outra coisa que eu possa ajudá-lo?', cid)
doTransformItem(getPlayerSlotItem(cid, 8).uid, 300)
talkState = 0
else
selfSay('Sorry '.. getCreatureName(cid) ..', mas você não tem dinheiro suficiente.', cid)
talkState = 0
end
else
selfSay('Por favor, mantenha sua bola fechada na slot.', cid)
talkState = 2
end
----fim master ball
--eletric ball
elseif((msgcontains(msg, 'shiny eletricball') or msgcontains(msg, 'eletricball') or msgcontains(msg, 'Eletricball') or msgcontains(msg, 'Shiny Eletricball') or msgcontains(msg, 'shiny eletric ball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
selfSay('Você realmente quer pintar a sua bola como uma Shiny Eletric ball? Ele vai te custar mil dólares!', cid)
talkState = 17
else
selfSay('Você deve colocar a bola fechada no slot.', cid)
talkState = 2
end
elseif(msgcontains(msg, 'yes') and talkState == 17) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
if doPlayerRemoveMoney(cid,100000) == true then
selfSay('Boa escolha, a partir de agora um, ele vai olhar como uma Eletricball! Há qualquer outra coisa que eu possa ajudá-lo?', cid)
doTransformItem(getPlayerSlotItem(cid, 8).uid, 324)
talkState = 0
else
selfSay('Sorry '.. getCreatureName(cid) ..', mas você não tem dinheiro suficiente.', cid)
talkState = 0
end
else
selfSay('Por favor, mantenha sua bola fechada na slot.', cid)
talkState = 2
end
----fim eletric ball
--ice ball
elseif((msgcontains(msg, 'shiny iceball') or msgcontains(msg, 'iceball') or msgcontains(msg, 'Iceball') or msgcontains(msg, 'Shiny Iceball') or msgcontains(msg, 'shiny ice ball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
selfSay('Você realmente quer pintar a sua bola como uma Shiny Ice ball? Ele vai te custar mil dólares!', cid)
talkState = 18
else
selfSay('Você deve colocar a bola fechada no slot.', cid)
talkState = 2
end
elseif(msgcontains(msg, 'yes') and talkState == 18) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
if doPlayerRemoveMoney(cid,100000) == true then
selfSay('Boa escolha, a partir de agora um, ele vai olhar como uma Iceball! Há qualquer outra coisa que eu possa ajudá-lo?', cid)
doTransformItem(getPlayerSlotItem(cid, 8).uid, 330)
talkState = 0
else
selfSay('Sorry '.. getCreatureName(cid) ..', mas você não tem dinheiro suficiente.', cid)
talkState = 0
end
else
selfSay('Por favor, mantenha sua bola fechada na slot.', cid)
talkState = 2
end
----fim ice ball
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
PAINT Normais
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
npcHandler:setCallback(CALLBACK_GREET, greetCallback)
npcHandler:setMessage(MESSAGE_GREET, 'Bem-vindo à minha loja de pintura |PLAYERNAME|!')
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
-- pb , ub , sb , gb , saffari ,golden, dark, love,lure,master, water,fire, dusk, lua, orange, eletric, ice
local pokesalive = {'11826', '11829', '11835', '11832', '10975', '110', '116', '122', '131', '128', '134', '137', '140', '143', '146', '321', '327'}
if(msgcontains(msg, 'paint')) then
selfSay('Você quer pintar a sua pokeball?', cid)
talkState = 1
elseif(msgcontains(msg, 'yes') and talkState == 1) then
selfSay('Olá, você pode escolher: Masterball, Saffari, Pokeball, Greatball, Superball, Ultraball, Loveball, Darkball, Goldenball, Lureball, Waterball, Eletricball, Iceball, Fireball, Luaball, Duskball e Orangeball.', cid)
talkState = 2
elseif(msgcontains(msg, 'no') and talkState == 1) then
selfSay('Volte outra vez!', cid)
talkState = 0
npcHandler:releaseFocus(cid)
elseif((msgcontains(msg, 'Pokeball') or msgcontains(msg, 'Poke ball') or msgcontains(msg, 'pokeball') or msgcontains(msg, 'poke ball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
selfSay('Você realmente quer pintar a sua bola como uma pokeball? isto ira lhe custar 200 dólares!', cid)
talkState = 3
else
selfSay('Você deve colocar a bola fechada no slot.', cid)
talkState = 2
end
elseif(msgcontains(msg, 'yes') and talkState == 3) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
if doPlayerRemoveMoney(cid,20000) == true then
selfSay('Boa escolha, a partir de agora todos irão vê-lo como uma pokeball! Há qualquer outra coisa que eu possa ajudá-lo?', cid)
doTransformItem(getPlayerSlotItem(cid, 8).uid, 11826)
talkState = 0
else
selfSay('Sorry '.. getCreatureName(cid) ..', mas você não tem dinheiro suficiente.', cid)
talkState = 0
end
else
selfSay('Por favor, mantenha sua bola fechada na slot.', cid)
talkState = 2
end
elseif((msgcontains(msg, 'Greatball') or msgcontains(msg, 'Great ball') or msgcontains(msg, 'greatball') or msgcontains(msg, 'great ball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
selfSay('Você realmente quer pintar a sua bola como uma Greatball? Ele vai te custar 300 dólares!', cid)
talkState = 4
else
selfSay('Você deve colocar a bola fechada no slot.', cid)
talkState = 2
end
elseif(msgcontains(msg, 'yes') and talkState == 4) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
if doPlayerRemoveMoney(cid,30000) == true then
selfSay('Boa escolha, a partir de agora todos irão vê-lo como uma Greatball! Há qualquer outra coisa que eu possa ajudá-lo?', cid)
doTransformItem(getPlayerSlotItem(cid, 8).uid, 11832)
talkState = 0
else
selfSay('Sorry '.. getCreatureName(cid) ..', mas você não tem dinheiro suficiente.', cid)
talkState = 0
end
else
selfSay('Por favor, mantenha sua bola fechada na slot.', cid)
talkState = 2
end
elseif((msgcontains(msg, 'Superball') or msgcontains(msg, 'Super ball') or msgcontains(msg, 'super ball') or msgcontains(msg, 'superball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
selfSay('Você realmente quer pintar a sua bola como uma Superball? Ele vai te custar 400 dólares!', cid)
talkState = 5
else
selfSay('Você deve colocar a bola fechada no slot.', cid)
talkState = 2
end
elseif(msgcontains(msg, 'yes') and talkState == 5) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
if doPlayerRemoveMoney(cid,40000) == true then
selfSay('Boa escolha, a partir de agora todos irão vê-lo como uma Superball! Há qualquer outra coisa que eu possa ajudá-lo?', cid)
doTransformItem(getPlayerSlotItem(cid, 8).uid, 11835)
talkState = 0
else
selfSay('Sorry '.. getCreatureName(cid) ..', mas você não tem dinheiro suficiente.', cid)
talkState = 0
end
else
selfSay('Por favor, mantenha sua bola fechada na slot.', cid)
talkState = 2
end
elseif((msgcontains(msg, 'Ultra ball') or msgcontains(msg, 'Ultraball') or msgcontains(msg, 'ultra ball') or msgcontains(msg, 'ultraball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
selfSay('Você realmente quer pintar a sua bola como um Ultraball? Ele vai te custar 500 dólares!', cid)
talkState = 6
else
selfSay('Você deve colocar a bola fechada no slot.', cid)
talkState = 2
end
elseif(msgcontains(msg, 'yes') and talkState == 6) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
if doPlayerRemoveMoney(cid,50000) == true then
selfSay('Boa escolha, a partir de agora todos irão vê-lo como uma Ultraball! Há qualquer outra coisa que eu possa ajudá-lo?', cid)
doTransformItem(getPlayerSlotItem(cid, 8).uid, 11829)
talkState = 0
else
selfSay('Sorry '.. getCreatureName(cid) ..', mas você não tem dinheiro suficiente.', cid)
talkState = 0
end
else
selfSay('Por favor, mantenha sua bola fechada na slot.', cid)
talkState = 2
end
elseif((msgcontains(msg, 'Golden Ball') or msgcontains(msg, 'Goldenball') or msgcontains(msg, 'Golden ball') or msgcontains(msg, 'goldenball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
selfSay('Você realmente quer pintar a sua bola como uma Goldenball? Ele vai te custar 1000 dólares!', cid)
talkState = 7
else
selfSay('Você deve colocar a bola fechada no slot.', cid)
talkState = 2
end
elseif(msgcontains(msg, 'yes') and talkState == 7) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
if doPlayerRemoveMoney(cid,100000) == true then
selfSay('Boa escolha, a partir de agora todos irão vê-lo como uma Goldenball! Há qualquer outra coisa que eu possa ajudá-lo?', cid)
doTransformItem(getPlayerSlotItem(cid, 8).uid, 110)
talkState = 0
else
selfSay('Sorry '.. getCreatureName(cid) ..', mas você não tem dinheiro suficiente.', cid)
talkState = 0
end
else
selfSay('Por favor, mantenha sua bola fechada na slot.', cid)
talkState = 2
end
elseif((msgcontains(msg, 'Loveball') or msgcontains(msg, 'Love ball') or msgcontains(msg, 'love ball') or msgcontains(msg, 'loveball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
selfSay('Você realmente quer pintar a sua bola como um Loveball? Ele vai te custar 1000 dólares!', cid)
talkState = 8
else
selfSay('Você deve colocar a bola fechada no slot.', cid)
talkState = 2
end
elseif(msgcontains(msg, 'yes') and talkState == 8) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
if doPlayerRemoveMoney(cid,100000) == true then
selfSay('Boa escolha, a partir de agora um, ele vai olhar como uma Loveball! Há qualquer outra coisa que eu possa ajudá-lo?', cid)
doTransformItem(getPlayerSlotItem(cid, 8).uid, 122)
talkState = 0
else
selfSay('Sorry '.. getCreatureName(cid) ..', mas você não tem dinheiro suficiente.', cid)
talkState = 0
end
else
selfSay('Por favor, mantenha sua bola fechada na slot.', cid)
talkState = 2
end
elseif((msgcontains(msg, 'Luaball') or msgcontains(msg, 'Lua ball') or msgcontains(msg, 'lua ball') or msgcontains(msg, 'luaball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
selfSay('Você realmente quer pintar a sua bola como um Luaball? Ele vai te custar 1500 dólares!', cid)
talkState = 9
else
selfSay('Você deve colocar a bola fechada no slot.', cid)
talkState = 2
end
elseif(msgcontains(msg, 'yes') and talkState == 9) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
if doPlayerRemoveMoney(cid,150000) == true then
selfSay('Boa escolha, a partir de agora um, ele vai olhar como uma Luaball! Há qualquer outra coisa que eu possa ajudá-lo?', cid)
doTransformItem(getPlayerSlotItem(cid, 8).uid, 143)
talkState = 0
else
selfSay('Sorry '.. getCreatureName(cid) ..', mas você não tem dinheiro suficiente.', cid)
talkState = 0
end
else
selfSay('Por favor, mantenha sua bola fechada na slot.', cid)
talkState = 2
end
elseif((msgcontains(msg, 'Duskball') or msgcontains(msg, 'Dusk ball') or msgcontains(msg, 'dusk ball') or msgcontains(msg, 'duskball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
selfSay('Você realmente quer pintar a sua bola como um Duskball? Ele vai te custar 1500 dólares!', cid)
talkState = 10
else
selfSay('Você deve colocar a bola fechada no slot.', cid)
talkState = 2
end
elseif(msgcontains(msg, 'yes') and talkState == 10) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
if doPlayerRemoveMoney(cid,150000) == true then
selfSay('Boa escolha, a partir de agora um, ele vai olhar como uma Duskball! Há qualquer outra coisa que eu possa ajudá-lo?', cid)
doTransformItem(getPlayerSlotItem(cid, 8).uid, 140)
talkState = 0
else
selfSay('Sorry '.. getCreatureName(cid) ..', mas você não tem dinheiro suficiente.', cid)
talkState = 0
end
else
selfSay('Por favor, mantenha sua bola fechada na slot.', cid)
talkState = 2
end
elseif((msgcontains(msg, 'Darkball') or msgcontains(msg, 'Dark ball') or msgcontains(msg, 'dark ball') or msgcontains(msg, 'darkball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
selfSay('Você realmente quer pintar a sua bola como um Dark ball? Ele vai te custar 1000 dólares!', cid)
talkState = 11
else
selfSay('Você deve colocar a bola fechada no slot.', cid)
talkState = 2
end
elseif(msgcontains(msg, 'yes') and talkState == 11) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
if doPlayerRemoveMoney(cid,100000) == true then
selfSay('Boa escolha, a partir de agora um, ele vai olhar como uma Darkball! Há qualquer outra coisa que eu possa ajudá-lo?', cid)
doTransformItem(getPlayerSlotItem(cid, 8).uid, 116)
talkState = 0
else
selfSay('Sorry '.. getCreatureName(cid) ..', mas você não tem dinheiro suficiente.', cid)
talkState = 0
end
else
selfSay('Por favor, mantenha sua bola fechada na slot.', cid)
talkState = 2
end
elseif((msgcontains(msg, 'Orangeball') or msgcontains(msg, 'Orange ball') or msgcontains(msg, 'orange ball') or msgcontains(msg, 'orangeball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
selfSay('Você realmente quer pintar a sua bola como um Orange ball? Ele vai te custar 1500 dólares!', cid)
talkState = 12
else
selfSay('Você deve colocar a bola fechada no slot.', cid)
talkState = 2
end
elseif(msgcontains(msg, 'yes') and talkState == 12) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
if doPlayerRemoveMoney(cid,150000) == true then
selfSay('Boa escolha, a partir de agora um, ele vai olhar como uma Orangeball! Há qualquer outra coisa que eu possa ajudá-lo?', cid)
doTransformItem(getPlayerSlotItem(cid, 8).uid, 146)
talkState = 0
else
selfSay('Sorry '.. getCreatureName(cid) ..', mas você não tem dinheiro suficiente.', cid)
talkState = 0
end
else
selfSay('Por favor, mantenha sua bola fechada na slot.', cid)
talkState = 2
end
-----------------------saffari
elseif((msgcontains(msg, 'Saffari') or msgcontains(msg, 'saffari') or msgcontains(msg, 'saffari ball') or msgcontains(msg, 'saffariball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
selfSay('Você realmente quer pintar a sua bola como um Saffari ball? Ele vai te custar 500 dólares!', cid)
talkState = 13
else
selfSay('Você deve colocar a bola fechada no slot.', cid)
talkState = 2
end
elseif(msgcontains(msg, 'yes') and talkState == 13) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
if doPlayerRemoveMoney(cid,50000) == true then
selfSay('Boa escolha, a partir de agora um, ele vai olhar como uma Orangeball! Há qualquer outra coisa que eu possa ajudá-lo?', cid)
doTransformItem(getPlayerSlotItem(cid, 8).uid, 10975)
talkState = 0
else
selfSay('Sorry '.. getCreatureName(cid) ..', mas você não tem dinheiro suficiente.', cid)
talkState = 0
end
else
selfSay('Por favor, mantenha sua bola fechada na slot.', cid)
talkState = 2
end
-------------------------end saffari
--------------------lure
elseif((msgcontains(msg, 'Lure') or msgcontains(msg, 'lure') or msgcontains(msg, 'lure ball') or msgcontains(msg, 'lureball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
selfSay('Você realmente quer pintar a sua bola como um lure ball? Ele vai te custar 1500 dólares!', cid)
talkState = 14
else
selfSay('Você deve colocar a bola fechada no slot.', cid)
talkState = 2
end
elseif(msgcontains(msg, 'yes') and talkState == 14) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
if doPlayerRemoveMoney(cid,150000) == true then
selfSay('Boa escolha, a partir de agora um, ele vai olhar como uma lure ball! Há qualquer outra coisa que eu possa ajudá-lo?', cid)
doTransformItem(getPlayerSlotItem(cid, 8).uid, 131)
talkState = 0
else
selfSay('Sorry '.. getCreatureName(cid) ..', mas você não tem dinheiro suficiente.', cid)
talkState = 0
end
else
selfSay('Por favor, mantenha sua bola fechada na slot.', cid)
talkState = 2
end
-------------------------end lure
--------------------master ball
elseif((msgcontains(msg, 'masterball') or msgcontains(msg, 'master ball') or msgcontains(msg, 'Masterball') or msgcontains(msg, 'masterball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
selfSay('Você realmente quer pintar a sua bola como um master ball? Ele vai te custar 10 mil dólares!', cid)
talkState = 15
else
selfSay('Você deve colocar a bola fechada no slot.', cid)
talkState = 2
end
elseif(msgcontains(msg, 'yes') and talkState == 15) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
if doPlayerRemoveMoney(cid,1000000) == true then
selfSay('Boa escolha, a partir de agora um, ele vai olhar como uma master ball! Há qualquer outra coisa que eu possa ajudá-lo?', cid)
doTransformItem(getPlayerSlotItem(cid, 8).uid, 128)
talkState = 0
else
selfSay('Sorry '.. getCreatureName(cid) ..', mas você não tem dinheiro suficiente.', cid)
talkState = 0
end
else
selfSay('Por favor, mantenha sua bola fechada na slot.', cid)
talkState = 2
end
--------------------water ball
elseif((msgcontains(msg, 'waterball') or msgcontains(msg, 'water ball') or msgcontains(msg, 'Waterball') or msgcontains(msg, 'Water ball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
selfSay('Você realmente quer pintar a sua bola como uma water ball? Ele vai te custar 1500 dólares!', cid)
talkState = 16
else
selfSay('Você deve colocar a bola fechada no slot.', cid)
talkState = 2
end
elseif(msgcontains(msg, 'yes') and talkState == 16) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
if doPlayerRemoveMoney(cid,150000) == true then
selfSay('Boa escolha, a partir de agora um, ele vai olhar como uma water ball! Há qualquer outra coisa que eu possa ajudá-lo?', cid)
doTransformItem(getPlayerSlotItem(cid, 8).uid, 134)
talkState = 0
else
selfSay('Sorry '.. getCreatureName(cid) ..', mas você não tem dinheiro suficiente.', cid)
talkState = 0
end
else
selfSay('Por favor, mantenha sua bola fechada na slot.', cid)
talkState = 2
end
--------------------fire ball
elseif((msgcontains(msg, 'fireball') or msgcontains(msg, 'fire ball') or msgcontains(msg, 'Fireball') or msgcontains(msg, 'Fire ball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
selfSay('Você realmente quer pintar a sua bola como uma fire ball? Ele vai te custar 1500 dólares!', cid)
talkState = 17
else
selfSay('Você deve colocar a bola fechada no slot.', cid)
talkState = 2
end
elseif(msgcontains(msg, 'yes') and talkState == 17) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
if doPlayerRemoveMoney(cid,150000) == true then
selfSay('Boa escolha, a partir de agora um, ele vai olhar como uma fire ball! Há qualquer outra coisa que eu possa ajudá-lo?', cid)
doTransformItem(getPlayerSlotItem(cid, 8).uid, 137)
talkState = 0
else
selfSay('Sorry '.. getCreatureName(cid) ..', mas você não tem dinheiro suficiente.', cid)
talkState = 0
end
else
selfSay('Por favor, mantenha sua bola fechada na slot.', cid)
talkState = 2
end
--------------------eletric ball
elseif((msgcontains(msg, 'eletricball') or msgcontains(msg, 'eletric ball') or msgcontains(msg, 'Eletricball') or msgcontains(msg, 'Eletric ball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
selfSay('Você realmente quer pintar a sua bola como uma eletric ball? Ele vai te custar 1000 dólares!', cid)
talkState = 18
else
selfSay('Você deve colocar a bola fechada no slot.', cid)
talkState = 2
end
elseif(msgcontains(msg, 'yes') and talkState == 18) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
if doPlayerRemoveMoney(cid,100000) == true then
selfSay('Boa escolha, a partir de agora um, ele vai olhar como uma eletric ball! Há qualquer outra coisa que eu possa ajudá-lo?', cid)
doTransformItem(getPlayerSlotItem(cid, 8).uid, 321)
talkState = 0
else
selfSay('Sorry '.. getCreatureName(cid) ..', mas você não tem dinheiro suficiente.', cid)
talkState = 0
end
else
selfSay('Por favor, mantenha sua bola fechada na slot.', cid)
talkState = 2
end
--------------------ice ball
elseif((msgcontains(msg, 'iceball') or msgcontains(msg, 'ice ball') or msgcontains(msg, 'Iceball') or msgcontains(msg, 'Ice ball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
selfSay('Você realmente quer pintar a sua bola como uma ice ball? Ele vai te custar 1000 dólares!', cid)
talkState = 19
else
selfSay('Você deve colocar a bola fechada no slot.', cid)
talkState = 2
end
elseif(msgcontains(msg, 'yes') and talkState == 19) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
if doPlayerRemoveMoney(cid,100000) == true then
selfSay('Boa escolha, a partir de agora um, ele vai olhar como uma ice ball! Há qualquer outra coisa que eu possa ajudá-lo?', cid)
doTransformItem(getPlayerSlotItem(cid, 8).uid, 327)
talkState = 0
else
selfSay('Sorry '.. getCreatureName(cid) ..', mas você não tem dinheiro suficiente.', cid)
talkState = 0
end
else
selfSay('Por favor, mantenha sua bola fechada na slot.', cid)
talkState = 2
end
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())