Ir para conteúdo

Nazo

Banido
  • Registro em

  • Última visita

Solutions

  1. Nazo's post in (Resolvido)Erro nos Potions was marked as the answer   
    O que me parece é que no OTX a função isInArray não existe, tenta adicionar numa lib aí:
    function isInArray(t, v, c) v = (c ~= nil and string.lower(v)) or v if type(t) == "table" and v ~= nil then for key, value in pairs(t) do value = (c ~= nil and string.lower(value)) or value if v == value then return true end end end return false end  
  2. Nazo's post in (Resolvido)Ajuda em melhorar script de add/remover dias premium was marked as the answer   
    function onSay(cid, words, param)     if param == "" then         return doPlayerPopupFYI(cid,"Está com problemas?\nAprenda os comandos!\n---------------\nAdicionar premium:\n/pa add days player\n/pa add 30 Wakon\n---------------\nRemover premium:\n/pa remove player\n/pa remove Wakon\n---------------\nVer Premium:\n/pa days player\n/pa days Wakon\n---------------")     end     if param:lower():find('add') == 1 and 3 then         local _,_,id,name = param:lower():find('add (%d+) (.+)')         name = name or ""         id = tonumber(id or 1) or 1         if tonumber(id) == nil or getPlayerByName(name) == false then             return doPlayerSendTextMessage(cid,25,"Adicionar premium:\n/pa add days player\n/pa add 30 Wakon\n [Player: "..name.."]")         end          if isPlayer(getPlayerByName(name)) == TRUE then             doPlayerAddPremiumDays(getPlayerByName(name), id)                                       doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Foram adicionados "..tonumber(id).." dias de premium ao jogador "..name..".")             doPlayerSendTextMessage(getPlayerByName(name),25,"Você recebeu "..tonumber(id).." dias de premium, relogue para atualizar.")         else             doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"O jogador "..name.." não esta online ou não existe.")         end     elseif param:lower():find('remove') == 1 and 3 then         local _,_,id2,name2 = param:lower():find('remove (%d+) (.+)')         name2 = name2 or ""         id2 = tonumber(id2 or 1) or 1         if tonumber(id2) == nil or getPlayerByName(name2) == false then             return doPlayerSendTextMessage(cid,25,"Remover premium:\n/pa remove days player\n/pa remove 30 Wakon\n [Player: "..name2.."]")         end          if isPlayer(getPlayerByName(name2)) == TRUE and getPlayerPremiumDays(getPlayerByName(name2)) >= id2 then             doPlayerRemovePremiumDays(getPlayerByName(name2), id2)             return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Foram retirados "..tonumber(id2).." dias de premium do jogador "..name2..".")          end         doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"O jogador "..name2.." não esta online, não existe ou tem menos dias de premium do que será removido.")     end     if param:lower():find('days') == 1 and 3 then         local _,_,name3 = param:lower():find('days (.+)')         name3 = name3 or ""         prem = getPlayerPremiumDays(getPlayerByName(name3))         if isPlayer(getPlayerByName(name3)) == false then             return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"O jogador "..name3.." não esta online ou não existe.")         end          if prem >= 1 then             return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "O jogador "..name3.." tem "..prem.." dias de premium.")         else             doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"O jogador "..name3.." é free account.")         end     end     return TRUE end  
  3. Nazo's post in (Resolvido)Usar spell apenas em players was marked as the answer   
    Não tenho certeza se vai funcionar baseado na versão do seu TFS, mas tenta:
    function onCastSpell(cid, var) local jogadorpos = getCreaturePosition(cid) local target = getCreatureTarget(cid) local monsterpos = getCreaturePosition(target) if (isPlayer(target)) then doTeleportThing(cid,monsterpos) doTeleportThing(target,jogadorpos) doSendMagicEffect(jogadorpos, 7) doSendMagicEffect(monsterpos, 7) else doPlayerSendTextMessage(cid,20,'You can only use it on players.') end end  
  4. Nazo's post in (Resolvido)[DUVIDA] Um player pode Usar Mais de uma Storage ? was marked as the answer   
    Imagine os players como estantes com gavetas, as storages são como gavetas que são representadas por um número de até 65535 se não me engano, cada uma tem um conteúdo que é um número, imagine que você tem a gaveta de número 31223, e bota o valor 5 dentro dela, o player terá na storage 31223 o valor 5, entendeu?
    o valor padrão em todas storages é -1 se não houver sido setada
  5. Nazo's post in (Resolvido)[PEDIDO] effect ao matar players was marked as the answer   
    local storage = 13122 local effects = {10,11,12,13,14} function onKill(cid, target, lastHit) if not isPlayer(target) then return true end if(getPlayerStorageValue(cid,storage) > 5 and getPlayerStorageValue(cid,storage) < 1) then setPlayerStorageValue(cid,storage,1) else setPlayerStorageValue(cid,storage,getPlayerStorageValue(cid,storage)+1) end doSendMagicEffect(getCreaturePosition(cid), effects[getPlayerStorageValue(cid,storage)]) return true end  
  6. Nazo's post in (Resolvido)error no order was marked as the answer   
    @robson da silva, testa:
    https://hastebin.com/raw/ufifefedan
  7. Nazo's post in (Resolvido)Account Manager louco was marked as the answer   
    @perfollgustavo, adicione essa tag XML no seu creaturescripts.xml:
    <!-- Anti MageBomb by Nazo (tibiaking.com) --> <event type="login" name="antiMageBomb" event="script" value="antiMageBomb.lua"/>  
    Crie o arquivo antiMageBomb.lua em creaturescripts\scripts\ e use o seguinte conteúdo no mesmo:
    -- anti Mage Bomb by Nazo (tibiaking.com) function onLogin(cid) if(getPlayerName(cid) == "Account Manager") then playersOnline = getPlayersOnline() for _, pid in ipairs(players) do if(getPlayerIp(pid)==getPlayerIp(cid)) then doRemoveCreature(pid) end return false end end return true end  
    E no arquivo creaturescripts\scripts\login.lua antes do último return true, adicione a seguinte linha:
    registerCreatureEvent(cid, "antiMageBomb")  
  8. Nazo's post in (Resolvido)Adicionar Delay A Cada Hit ( Weapons) was marked as the answer   
    Testa isso, @Hokograma:
    local storage = 43103 -- mude caso dê conflito de storage apenas local delay = 5 -- delay em segundos local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 35) setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0.0, -89, 0.0, -90) function onUseWeapon(cid, var) if(getPlayerStorageValue(cid,storage) < os.time()) then setPlayerStorageValue(cid,storage,os.time()+delay) return doCombat(cid, combat, var) else return false end end  
  9. Nazo's post in (Resolvido)[GESIOR] Como remover o female sex do create character was marked as the answer   
    Faço questão de que funcione 100%, testa agora:
    https://pastebin.com/raw/L17JMYYE
     
    Caso minha resposta tenha sido a melhor, marque na parte superior esquerda do post!
  10. Nazo's post in (Resolvido)Erro Creaturescripts was marked as the answer   
    @Tchuka, testa aí:
    local level = 0 local config = { tempo = 3, -- tempo, em segundos que o efeito demorará para sair. } local eggo = { ["Holy Pet"] = {id = 6541, mon = "Holy Pet", cor = TEXTCOLOR_YELLOW}, ["Fire Pet"] = {id = 6542, mon = "Fire Pet", cor = TEXTCOLOR_RED}, ["Ice Pet"] = {id = 6543, mon = "Ice Pet", cor = TEXTCOLOR_BLUE}, ["Terra Pet"] = {id = 6544, mon = "Terra Pet", cor = TEXTCOLOR_LIGHTGREEN}, ["Phoenix Pet"] = {id = 2695, mon = "Phoenix Pet", cor = TEXTCOLOR_GREY}, ["Draug Pet"] = {id = 6544, mon = "Draug Pet", cor = TEXTCOLOR_BROWN}, ["Many Pet"] = {id = 2695, mon = "Many Pet", cor = TEXTCOLOR_TEAL}, ["Energy Pet"] = {id = 6545, mon = "Energy Pet", cor = TEXTCOLOR_PURPLE} } function onThink(cid, interval) local function Macabro(cid) for k, v in pairs(eggo) do if(not cid) then break end if isMonster and getCreatureName(cid) == v.mon then doSendMagicEffect(getThingPos(cid), 37) doSendAnimatedText(getThingPos(cid), "level: ".. level .. "", v.cor) return addEvent(Macabro, 3000, cid) end end end if (getPlayerStorageValue(cid, 70071)) <= 0 then -- storage que guarda o tempo do efeito. Macabro(cid) setPlayerStorageValue(cid, 70071, config.tempo + os.time()) else return true end return TRUE end  
  11. Nazo's post in (Resolvido)error no look was marked as the answer   
    @robson da silva substitua seu look.lua por esse e tente:
    local NPCBattle = { ["Brock"] = {artig = "He is", cidbat = "Pewter"}, ["Misty"] = {artig = "She is", cidbat = "Cerulean"}, ["Blaine"] = {artig = "He is", cidbat = "Cinnabar"}, ["Sabrina"] = {artig = "She is", cidbat = "Saffron"}, --alterado v1.9 \/ peguem tudo! ["Kira"] = {artig = "She is", cidbat = "Viridian"}, ["Koga"] = {artig = "He is", cidbat = "Fushcia"}, ["Erika"] = {artig = "She is", cidbat = "Celadon"}, ["Surge"] = {artig = "He is", cidbat = "Vermilion"}, } function onLook(cid, thing, position, lookDistance) local str = {} if not isCreature(thing.uid) then local iname = getItemInfo(thing.itemid) if isPokeball(thing.itemid) and getItemAttribute(thing.uid, "poke") then unLock(thing.uid) local lock = getItemAttribute(thing.uid, "lock") local pokename = getItemAttribute(thing.uid, "poke") table.insert(str, "You see "..iname.article.." "..iname.name..".") if getItemAttribute(thing.uid, "unique") then table.insert(str, " It's an unique item.") end table.insert(str, "\nIt contains "..getArticle(pokename).." "..pokename..".\n") if lock and lock > 0 then table.insert(str, "It will unlock in ".. os.date("%d/%m/%y %X", lock)..".\n") end local boost = getItemAttribute(thing.uid, "boost") or 0 if boost > 0 then table.insert(str, "Boost level: +"..boost..".\n") end if getItemAttribute(thing.uid, "nick") then table.insert(str, "It's nickname is: "..getItemAttribute(thing.uid, "nick")..".\n") end if getItemAttribute(thing.uid, "gender") == SEX_MALE then table.insert(str, "It is male.") elseif getItemAttribute(thing.uid, "gender") == SEX_FEMALE then table.insert(str, "It is female.") else table.insert(str, "It is genderless.") end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) return false elseif string.find(iname.name, "fainted") or string.find(iname.name, "defeated") then table.insert(str, "You see a "..string.lower(iname.name)..". ") if isContainer(thing.uid) then table.insert(str, "(Vol: "..getContainerCap(thing.uid)..")") end table.insert(str, "\n") if getItemAttribute(thing.uid, "gender") == SEX_MALE then table.insert(str, "It is male.") elseif getItemAttribute(thing.uid, "gender") == SEX_FEMALE then table.insert(str, "It is female.") else table.insert(str, "It is genderless.") end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) return false elseif isContainer(thing.uid) then --containers if iname.name == "dead human" and getItemAttribute(thing.uid, "pName") then table.insert(str, "You see a dead human (Vol:"..getContainerCap(thing.uid).."). ") table.insert(str, "You recognize ".. getItemAttribute(thing.uid, "pName")..". ".. getItemAttribute(thing.uid, "article").." was killed by a ") table.insert(str, getItemAttribute(thing.uid, "attacker")..".") else table.insert(str, "You see "..iname.article.." "..iname.name..". (Vol:"..getContainerCap(thing.uid)..").") end if getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 6 then table.insert(str, "\nItemID: ["..thing.itemid.."]") local pos = getThingPos(thing.uid) table.insert(str, "\nPosition: [X: "..pos.x.."][Y: "..pos.y.."][Z: "..pos.z.."]") end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) return false elseif getItemAttribute(thing.uid, "unique") then local p = getThingPos(thing.uid) table.insert(str, "You see ") if thing.type > 1 then table.insert(str, thing.type.." "..iname.plural..".") else table.insert(str, iname.article.." "..iname.name..".") end table.insert(str, " It's an unique item.\n"..iname.description) if getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 6 then table.insert(str, "\nItemID: ["..thing.itemid.."]") table.insert(str, "\nPosition: ["..p.x.."]["..p.y.."]["..p.z.."]") end sendMsgToPlayer(cid, MESSAGE_INFO_DESCR, table.concat(str)) return false else return true end end local npcname = getCreatureName(thing.uid) if ehNPC(thing.uid) and NPCBattle[npcname] then --npcs duel table.insert(str, "You see "..npcname..". "..NPCBattle[npcname].artig.." leader of the gym from "..NPCBattle[npcname].cidbat..".") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) return false end if getPlayerStorageValue(thing.uid, 697548) ~= -1 then table.insert(str, getPlayerStorageValue(thing.uid, 697548)) local pos = getThingPos(thing.uid) if youAre[getPlayerGroupId(cid)] then table.insert(str, "\nPosition: [X: "..pos.x.."][Y: "..pos.y.."][Z: "..pos.z.."]") end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) return false end if not isPlayer(thing.uid) and not isMonster(thing.uid) then --outros npcs table.insert(str, "You see "..getCreatureName(thing.uid)..".") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) return false end if isPlayer(thing.uid) then --player doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, getPlayerDesc(cid, thing, false)) return true end if getCreatureName(thing.uid) == "Evolution" then return false end if not isSummon(thing.uid) then --monstros table.insert(str, "You see a wild "..string.lower(getCreatureName(thing.uid))..".\n") table.insert(str, "Hit Points: "..getCreatureHealth(thing.uid).." / "..getCreatureMaxHealth(thing.uid)..".\n") if getPokemonGender(thing.uid) == SEX_MALE then table.insert(str, "It is male.") elseif getPokemonGender(thing.uid) == SEX_FEMALE then table.insert(str, "It is female.") else table.insert(str, "It is genderless.") end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) return false elseif isSummon(thing.uid) and not isPlayer(thing.uid) then --summons local boostlevel = getItemAttribute(getPlayerSlotItem(getCreatureMaster(thing.uid), 8).uid, "boost") or 0 if getCreatureMaster(thing.uid) == cid then local myball = getPlayerSlotItem(cid, 8).uid table.insert(str, "You see your "..string.lower(getCreatureName(thing.uid))..".") if boostlevel > 0 then table.insert(str, "\nBoost level: +"..boostlevel..".") end table.insert(str, "\nHit points: "..getCreatureHealth(thing.uid).."/"..getCreatureMaxHealth(thing.uid)..".") table.insert(str, "\n"..getPokemonHappinessDescription(thing.uid)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..string.lower(getCreatureName(thing.uid))..".\nIt belongs to "..getCreatureName(getCreatureMaster(thing.uid))..".") end return false end return true end  
  12. Nazo's post in (Resolvido)Town portal like WOW was marked as the answer   
    Hi, 'meu chapa' :rofl: test this, @noktuno:
     
    -- Town Portal Scroll System based in Dota 2 -- by Nazo (tibiaking.com) local config = { portalId = 1231, -- change to portal item id portalTime = 30, -- portal duration in seconds scrollId = 1232, -- change to scroll item id effect = CONST_ME_POFF -- effect id or CONST that appears at the end of time } local function removePortal(portal, position) portal:remove() Position(position):sendMagicEffect(config.effect) end function onUse(player, item, fromPosition, target, toPosition, isHotkey) if(item:getId()==config.scrollId) then portal = Item(Game.createItem(config.portalId, 1, player:getPosition())) portal:setCustomAttribute("party", player:getParty()) addEvent(removePortal, config.portalTime * 1000, portal, player:getPosition()) item:remove() else if(player:getParty()==item:getCustomAttribute("party")) then player:teleportTo(player:getTown():getTemplePosition(), true) else player:popupFYI("You do not participate in the portal creator's party.") end end return true end  
  13. Nazo's post in (Resolvido)Erro ao abrir site was marked as the answer   
    Esse erro é simples meu chapa, abra o config.php localizado na pasta config do seu htdocs, procure por "$config['site']['serverPath']" no CTRL + F, e deixe com o caminho até a pasta do seu servidor, como no exemplo abaixo:
    $config['site']['serverPath'] = "C:/Users/Nazo/Desktop/OTServer/"; (use a barra "/" para indicar o diretório, e não a contra-barra "\")
  14. Nazo's post in (Resolvido)(PEDIDO) Script de quest que dar para escolher 2 báus, configuravel. was marked as the answer   
    Coloque o mesmo script em todos baús:
    -- by Nazo (tibiaking.com) config = { storage = 123123, -- você usará essa storage em todos baús premio = {2160, 1}, -- {id do item, quantia} maxPremios = 2 -- máximo de baús que podem ser pegos } function onUse(cid, item, frompos, item2, toPosition) queststatus = getPlayerStorageValue(cid,config.storage) if(queststatus < config.maxPremios) then doPlayerSendTextMessage(cid,22,"Tome seu item.") doPlayerAddItem(cid,config.premio[1],config.premio[2]) setPlayerStorageValue(cid,config.storage,queststatus+1) else doPlayerSendTextMessage(cid,22,"Você já pegou dois baús.") end end  
  15. Nazo's post in (Resolvido)[AJUSTE] Speed da bike was marked as the answer   
    Fiz corrido, testa aí:
     
    function onUse(cid, item, fromPosition, itemEx, toPosition) local sBike = 2547 local speed = 20 -- speed que você quer extra local t = { [16689] = {article='a', name='Bike', text='', dtext='', s=9999, condition=bikeCondition}, } function BikeSpeedOn(cid,nSpeed) setPlayerStorageValue(cid,sBike,getCreatureSpeed(cid)) doChangeSpeed(cid,getCreatureSpeed(cid)+nSpeed) end function BikeSpeedOff(cid) doChangeSpeed(cid,-getCreatureSpeed(cid)) doChangeSpeed(cid,getPlayerStorageValue(cid,sBike)) end local v, r = getCreaturePosition(cid), t[item.itemid] local s = r.s local pos = {x = v.x, y = v.y, z = v.z} if r then if getPlayerStorageValue(cid, 25000) == 5 then return end if getPlayerStorageValue(cid, 23000) == 5 then return end if getPlayerStorageValue(cid, 17001) == 1 or getPlayerStorageValue(cid, 63215) == 1 or getPlayerStorageValue(cid, 17000) == 1 then doPlayerSendCancel(cid, "You can't use bike while ride/fly/surf.") return true end if getPlayerSlotItem(cid, CONST_SLOT_AMMO).uid == item.uid then doPlayerSendCancel("Não está no slot correto") return true end if getPlayerStorageValue(cid, s) <= 0 then doCreatureSay(cid, r.text, 19) setPlayerStorageValue(cid, s, 1) BikeSpeedOn(cid,speed) if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = 2293, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1) ---Female else doSetCreatureOutfit(cid, {lookType = 2292, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1) --- Male end elseif getPlayerStorageValue(cid, s) == 1 then doCreatureSay(cid, r.dtext, 19) setPlayerStorageValue(cid, s, 0) BikeSpeedOff(cid) return doRemoveCondition(cid, CONDITION_OUTFIT) else return doPlayerSendCancel(cid, 'You can\'t do this.') end else return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, 'Report bugs in Bike system.') end end  
  16. Nazo's post in (Resolvido)[PEDIDO] UniqueID só passa com "x" storage was marked as the answer   
    Em movements.xml adicione a seguinte tag:
    <movevent type="StepIn" actionid="9914" event="script" value="newbietile.lua"/> Em movements/scripts/ crie o arquivo newbietile.lua e adicione o seguinte conteúdo:
    -- by Nazo (tibiaking.com) function onStepIn(cid, item, position, fromPosition) if(getPlayerStorageValue(cid,54842) == -1) then doTeleportThing(cid,fromPosition) doPlayerSendTextMessage(cid,22,"Pegue seu pokémon para passar por aqui.") end return true end  
    Com o map editor, coloque o actionid "9914" (ou outro, caso você altere na tag XML) nos dois tiles.
  17. Nazo's post in (Resolvido)[AJUSTE] NPC de pokemon inicial was marked as the answer   
    Tentei no olho aqui @tavarb, vê se funciona aí:
    local focus = 0 -- NÃO EDITE ISSO local talk_start = 0 -- NÃO EDITE ISSO local target = 0 -- NÃO EDITE ISSO local following = false -- NÃO EDITE ISSO local attacking = false -- NÃO EDITE ISSO local newbie = 1010101 function onCreatureDisappear(cid, pos) if focus == cid then selfSay('Good bye then.') focus = 0 talk_start = 0 end end function msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)')) end function onCreatureSay(cid, type, msg) local health = 1000 local maxhealth = 1000 newbies = getPlayerStorageValue(cid,newbie) msg = string.lower(msg) newperson = getPlayerStorageValue(cid,newbie) if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then selfSay('Hello, I am professor Hoa. I was once a legendary pokemon trainer, now I have switched to studies in the laboratory of Professor Oak.') focus = cid talk_start = os.clock() elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then selfSay('Sorry, wait your turn.') elseif focus == cid then talk_start = os.clock() if msgcontains(msg, 'help') and newbies <= 0 then selfSay('I have a charmander, squirtle anh bulbasaur. I can give you one pokemon to help you make your journey, would you like?') talk_state = 1 elseif talk_state == 1 and newbies <= 0 then if msgcontains(msg, 'yes') then selfSay('Ok, so what pokemon you like?') talk_state_s = 2 elseif talk_state_s == 2 then if msgcontains(msg, 'bulbasaur') then addPokeToPlayer(cid, "Bulbasaur", 0, nil, "poke") doPlayerAddItem(cid, 2394, 16) doPlayerAddItem(cid, 2391, 4) doPlayerAddItem(cid, 2393, 1) doPlayerAddItem(cid, 12348, 1) doPlayerAddSoul(cid, 1) setPlayerStorageValue(cid, 54842, "Bulbasaur, ") selfSay("Here is your Bulbasaur and some supplies.") setPlayerStorageValue(cid,newbie,1) elseif msgcontains(msg, 'charmander') then local description = "Contains a Charmander." local poke1 = "This is Charmander's pokeball. HP = ["..health.."/"..maxhealth.."]" addPokeToPlayer(cid, "Charmander", 0, nil, "poke") doPlayerAddItem(cid, 2394, 14) doPlayerAddItem(cid, 2391, 2) doPlayerAddItem(cid, 12347, 1) doPlayerAddSoul(cid, 1) setPlayerStorageValue(cid, 54842, "Charmander, ") selfSay("Here is your Charmander and some supplies.") setPlayerStorageValue(cid,newbie,1) elseif msgcontains(msg, 'squirtle') then local description = "Contains a Squirtle." local poke1 = "This is Squirtle's pokeball. HP = ["..health.."/"..maxhealth.."]" addPokeToPlayer(cid, "Squirtle", 0, nil, "poke") doPlayerAddItem(cid, 2394, 18) doPlayerAddItem(cid, 2391, 6) doPlayerAddItem(cid, 2392, 1) doPlayerAddItem(cid, 12346, 1) doPlayerAddSoul(cid, 1) setPlayerStorageValue(cid, 54842, "Squirtle, ") selfSay("Here is your Squirtle and some supplies.") setPlayerStorageValue(cid,newbie,1) elseif msgcontains(msg, 'no') then selfSay("OK... What you want?") elseif msgcontains(msg, 'bye') then selfSay("OK! Bye...") focus = 0 talk_start = 0 else selfSay("Tell me what pokemon you like?") end elseif msgcontains(msg, 'no') then selfSay("OK... What you want?") talk_state = 0 elseif msgcontains(msg, 'bye') then selfSay("OK! Bye...") focus = 0 talk_start = 0 end elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 2 then selfSay('Good bye!') focus = 0 talk_start = 0 end end end function onThink() doNpcSetCreatureFocus(focus) if (os.clock() - talk_start) > 30 then if focus > 0 then selfSay('Bye...') end focus = 0 end if focus ~= 0 then if getDistanceToCreature(focus) >= 2 then selfSay('Good bye then.') focus = 0 end end end  
  18. Nazo's post in (Resolvido)[PEDIDO] NPC que troca itens por dias premium was marked as the answer   
    Aqui, meu chapa:
    config = { item = 2145, -- id do diamond min = 7 } 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 if (msgcontains(msg, 'TROCAR') or msgcontains(msg, 'trocar')) then npcHandler:say("Quantos diamonds você deseja trocar por dias premium?", cid) talkState[cid] = 1 elseif talkState[cid] == 1 then msg = tonumber(msg) if(doPlayerRemoveItem(cid,config.item,msg) and isNumber(msg) and msg >= config.min)then doPlayerAddPremiumDays(cid, msg) str = "Agora você possui mais " .. msg .. " dia(s) premium." else str = "Você não possui essa quantia, ou ofereceu menos que "..config.min.." diamonds." end npcHandler:say(str, cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())  
  19. Nazo's post in (Resolvido)DUVIDA SIMPLES - Alguem me ajuda com o erro aqui was marked as the answer   
    Vai na função de executar um código SQL (algo como SQL query editor) e digita isso aqui abaixo:
     
    CREATE TABLE IF NOT EXISTS `z_ots_comunication` ( `id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `type` varchar(255) NOT NULL, `action` varchar(255) NOT NULL, `param1` varchar(255) NOT NULL, `param2` varchar(255) NOT NULL, `param3` varchar(255) NOT NULL, `param4` varchar(255) NOT NULL, `param5` varchar(255) NOT NULL, `param6` varchar(255) NOT NULL, `param7` varchar(255) NOT NULL, `delete_it` int(2) NOT NULL DEFAULT '1', PRIMARY KEY (`id`) ); Se não funcionar, volte com o erro ;3

Informação Importante

Confirmação de Termo