Ir para conteúdo

Marshmello

Conde
  • Total de itens

    831
  • Registro em

  • Última visita

  • Dias Ganhos

    69

Posts postados por Marshmello

  1. Fala galera , faz tempo que não venho aqui

     

      estou postando pq vi uns frango vendendo o código idêntico ao meu

     

    Antes de começar já aviso que e necessário ter opcodes instalados na source do server

     

    Vamos la

     

    Em Creaturescript crie um arquivo chamado lookhouse.lua e cole isso lá

    function stringValue(preco)
    
    	if preco < 100 then
    	 return tostring(preco)
    	 
    	 else
    	 return tostring(string.format("%1.01f", value/100))
    	 end
    	return 'none'
    end
    
    
    
    function onLook(cid, thing, position, lookDistance)
    
    
    if not isCreature(thing.uid) then
    local house = getHouseFromPos(position)
    if house then
    
    local str = "Casa: "..getHouseName(house)..".\n"
    if getHouseOwner(house) ~= 0 then
    str = str.."Propietário: "..getPlayerNameByGUID( getHouseOwner(house) ).."\nPreço: "..getHousePrice(house).." dólares"
    else
    str = str.."Propietário: Não tem\nPreço: "..getHousePrice(house).." dólares"
    end
    
    if thing.itemid == 1252 or thing.itemid == 1249 or thing.itemid == 1251 or thing.itemid == 1254 or thing.itemid == 1250 or thing.itemid == 1212 or thing.itemid == 1214 or thing.itemid == 6891 or thing.itemid == 6893 or
    thing.itemid == 6900 or thing.itemid == 6902 or thing.itemid == 6892 or  thing.itemid == 1213 or thing.itemid == 1219 or thing.itemid == 1220 or thing.itemid == 1222 or thing.itemid == 1221 or thing.itemid == 5515 or thing.itemid == 5516 or thing.itemid == 5517 or
    thing.itemid == 5518 or thing.itemid == 5119 or thing.itemid == 5120 or thing.itemid == 5128 or thing.itemid == 5129 or thing.itemid == 5098 or thing.itemid == 5100 or thing.itemid == 5107 or thing.itemid ==  5109 then
    
    if getHouseOwner(house) ~= 0 then
    doSendPlayerExtendedOpcode(cid, 78, getHouseName(house).."@"..getPlayerNameByGUID( getHouseOwner(house) ).."@"..getHousePrice(house).."@"..getHouseInfo(house).beds/2)
    else
    doSendPlayerExtendedOpcode(cid, 78, getHouseName(house).."@Não a Propietário@"..stringValue(getHousePrice(house)).."@"..getHouseInfo(house).beds/2)
    end
    
    
    
    
    end
    return false
    end
    end
    return true
    end

     

    em login.lua registre o evento 

    registerCreatureEvent(cid, "LookHouse")

    em creaturescript.xml coloque a tag

    	<event type="look" name="Lookhouse" event="script" value="lookhouse.lua"/>

     

    Modules do OTC

    game_house.rar

    Não esqueça de registrar o modulo no interface.otmod

    - game_house

     E isso bom proveito 

     

    Créditos a mim por te feito o código e o modulo

     

     

    Como vai ficar

    Spoiler

    768279868_unknown(1).png.7017ad9ff44207719bddf8a34d22f7b2.png

     

  2. Citar

    local quests = {
        ["vipquest"] = {
            min_level = 500,
            enter_pos = {x = 1283, y = 191, z = 7}, 
            area = {fromPos = {x = 1263, y = 245, z = 7}, toPos = {x = 1525, y = 143, z = 7}}, 
            time_to_finish = {15, "min"}, 
            time_to_make_again = {15, "min"}
        -- },
        -- ["dragon"] = {
            -- min_level = 10,
            -- enter_pos = {x = 1, y = 1, z = 1}, 
            -- area = {fromPos = {x = 1, y = 1, z = 1}, toPos = {x = 1, y = 1, z = 1}}, 
            -- time_to_finish = {10, "min"}, 
            -- time_to_make_again = {1, "hour"}
        }
        position = {x = 1038, y = 1043, z = 7} -- Posição que o Player precisa para usar o comando
    }

    local time_storage = 87871 -- só modifique se necessário

    function onSay(cid, words, param, channel)
        local param, p, check = param:lower(), getPlayerPosition(cid), false
        if not param or param == "" then
            local str, n = '~~ [Available Quests] ~~\n\n', 1
            for quest, info in pairs(quests) do
                str = str .. n .. " - " .. Fupper(quest) .. " (Level: "..info.min_level..")\n"
                n = n + 1
            end
            doShowTextDialog(cid, 1955, str)
            return true
        end
        local t = quests[param]
        if not t then
            return doPlayerSendCancel(cid, "Quest not found.")
        end
        if getPlayerLevel(cid) < t.min_level then
            return doPlayerSendCancel(cid, "Only players level "..t.min_level.." or higher can go the "..param.." quest.")
        end
        if isInRange(p, t.area.fromPos, t.area.toPos) then
            return doPlayerSendCancel(cid, "You are already inside the "..param.." quest area.")
        end
        for quest, info in pairs(quests) do
            if isInRange(p, info.area.fromPos, info.area.toPos) then
                check = true
            end
        end
        if check then
            return doPlayerSendCancel(cid, "You cannot go to another quest inside a quest.")
        end
        local stor = getPlayerStorageValue(cid, time_storage)
        if stor > os.time() then
            return doPlayerSendCancel(cid, "Voce so podera entrar novamente na quest "..os.date("%d %B %Y %X", stor)..".")
        end
        if getCreaturePosition(cid).x == quests.position.x and getCreaturePosition(cid).y == quests.position.y and getCreaturePosition(cid).z == quests.position.z then

        doSendMagicEffect(p, CONST_ME_POFF)
        local destination = t.enter_pos
        doTeleportThing(cid, destination)
        doSendMagicEffect(destination, CONST_ME_TELEPORT)
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Good luck in "..param.." quest! You have "..getStrTime(t.time_to_finish).." to finish or you will be kicked.")
        setPlayerStorageValue(cid, time_storage, mathtime(t.time_to_make_again) + os.time())
        addEvent(function()
            if isPlayer(cid) then
                if isInRange(getPlayerPosition(cid), t.area.fromPos, t.area.toPos) then
                    doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
                    local temple = getTownTemplePosition(getPlayerTown(cid))
                    doTeleportThing(cid, temple)
                    doSendMagicEffect(temple, CONST_ME_TELEPORT)
                    doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Your time is over!")
                end
            end
        end, mathtime(t.time_to_finish) * 1000)
        else
        doPlayerSendTextMessage(cid, 25, "wrong position")
        end
        return true
    end

    function mathtime(table) -- by dwarfer
    local unit = {"sec", "min", "hour", "day"}
    for i, v in pairs(unit) do
    if v == table[2] then
    return table[1]*(60^(v == unit[4] and 2 or i-1))*(v == unit[4] and 24 or 1)
    end
    end
    return error("Bad declaration in mathtime function.")
    end

    function getStrTime(table) -- by dwarfer
    local unit = {["sec"] = "second",["min"] = "minute",["hour"] = "hour",["day"] = "day"}
    return tostring(table[1].." "..unit[table[2]]..(table[1] > 1 and "s" or ""))
    end 

    function Fupper(str)
        return (str:gsub("^%l", string.upper))
    end  

     

  3. Citar

    --[[
    Feito por : Brendo Hiesttfer e Lucas Silva
    tag xml :    <event type="kill" name="PokeLevel" script="pokelevel.lua"/> 
    Registrar isso no login.lua
    registerCreatureEvent(cid, "PokeLevel")
    ]] 

    local BrendoXp = {
    ---------1º Geração---------
     ["Abra"] = {exp = 6},
     ["Aerodactyl"] = {exp = 26},
     ["Alakazam"] = {exp = 24},
     ["Arbok"] = {exp = 6},
     ["Arcanine"] = {exp = 15},
     ["Articuno"] = {exp = 450},
     ["Beedrill"] = {exp = 11},
     ["Bellsprout"] = {exp = 5},
     ["Blastoise"] = {exp = 26},
     ["Bulbasaur"] = {exp = 5},
     ["Butterfree"] = {exp = 9},
     ["Caterpie"] = {exp = 3},
     ["Chansey"] = {exp = 10},
     ["Charizard Halloween"] = {exp = 1},
     ["Charizard"] = {exp = 19},
     ["Charmander"] = {exp = 9},
     ["Charmeleon"] = {exp = 14},
     ["Clefable"] = {exp = 21},
     ["Clefairy"] = {exp = 5},
     ["Cloyster"] = {exp = 6},
     ["Cubone"] = {exp = 5},
     ["Dewgong"] = {exp = 5},
     ["Diglett"] = {exp = 9},
     ["Ditto"] = {exp = 9},
     ["Dodrio"] = {exp = 9},
     ["Doduo"] = {exp = 7},
     ["Dragonair"] = {exp = 18},
     ["Dragonite"] = {exp = 30},
     ["Dratini"] = {exp = 22},
     ["Drowzee"] = {exp = 21},
     ["Dugtrio"] = {exp = 12},
     ["Eevee"] = {exp = 12},
     ["Ekans"] = {exp = 9},
     ["Ekans"] = {exp = 9},
     ["Electabuzz"] = {exp = 16},
     ["Electrode"] = {exp = 16},
     ["Exeggcute"] = {exp = 19},
     ["Exeggutor"] = {exp = 20},
     ["Farfetch'd"] = {exp = 19},
     ["Fearow"] = {exp = 17},
     ["Furious Charizard"] = {exp = 1},
     ["Gastly"] = {exp = 10},
     ["Gengar"] = {exp = 25},
     ["Geodude"] = {exp = 9},
     ["Giant Gengar"] = {exp = 22},
     ["Gloom"] = {exp = 12},
     ["Golbat"] = {exp = 5},
     ["Goldeen"] = {exp = 4},
     ["Golduck"] = {exp = 16},
     ["Golem"] = {exp = 24},
     ["Graveler"] = {exp = 15},
     ["Growlithe"] = {exp = 16},
     ["Gyarados"] = {exp = 20},
     ["Haunter"] = {exp = 12},
     ["Hitmonchan"] = {exp = 9},
     ["Hitmonlee"] = {exp = 8},
     ["Horsea"] = {exp = 4},
     ["Hypno"] = {exp = 8},
     ["Ivysaur"] = {exp = 4},
     ["jeuhgw"] = {exp = 3},
     ["Jolteon"] = {exp = 13},
     ["Jynx"] = {exp = 19},
     ["Jigglypuff"] = {exp = 14},
     ["Kabuto"] = {exp = 19},
     ["Kabutops"] = {exp = 16},
     ["Kadabra"] = {exp = 14},
     ["Kakuna"] = {exp = 4},
     ["Kangaskhan"] = {exp = 16},
     ["Kingler"] = {exp = 12},
     ["Koffing"] = {exp = 11},
     ["Krabby"] = {exp = 7},
     ["Lapras"] = {exp = 20},
     ["Lickitung"] = {exp = 20},
     ["Machamp"] = {exp = 16},
     ["Machoke"] = {exp = 15},
     ["Machop"] = {exp = 21},
     ["Magikarp"] = {exp = 10},
     ["Magmar"] = {exp = 22},
     ["Magnemite"] = {exp = 21},
     ["Magneton"] = {exp = 17},
     ["Mankey"] = {exp = 12},
     ["Marowak Halloween"] = {exp = 1},
     ["Marowak"] = {exp = 16},
     ["Meowth"] = {exp = 14},
     ["Metapod"] = {exp = 13},
     ["Mew"] = {exp = 210},
     ["Mewtwo"] = {exp = 290},
     ["Moltres"] = {exp = 300},
     ["Mr. Mime"] = {exp = 13},
     ["Muk"] = {exp = 12},
     ["Nidoking"] = {exp = 20},
     ["Nidoqueen"] = {exp = 21},
     ["Nidoran Female"] = {exp = 18},
     ["Nidoran Male"] = {exp = 18},
     ["Nidorina"] = {exp = 19},
     ["Nidorino"] = {exp = 14},
     ["Ninetales"] = {exp = 16},
     ["Oddish"] = {exp = 12},
     ["Omanyte"] = {exp = 10},
     ["Omastar"] = {exp = 11},
     ["Onix"] = {exp = 16},
     ["Paras"] = {exp = 16},
     ["Parasect"] = {exp = 19},
     ["Persian"] = {exp = 6},
     ["Pidgeot"] = {exp = 19},
     ["Pidgeotto"] = {exp = 18},
     ["Pidgey"] = {exp = 16},
     ["Pikachu"] = {exp = 17},
     ["Pinsir"] = {exp = 13},
     ["Poliwag"] = {exp = 10},
     ["Poliwhirl"] = {exp = 20},
     ["Poliwrath"] = {exp = 16},
     ["Ponyta"] = {exp = 22},
     ["Porygon"] = {exp = 22},
     ["Primeape"] = {exp = 16},
     ["Psyduck"] = {exp = 14},
     ["Raichu"] = {exp = 21},
     ["Rapidash"] = {exp = 21},
     ["Raticate"] = {exp = 11},
     ["Rattata"] = {exp = 9},
     ["Rhydon"] = {exp = 21},
     ["Rhyhorn"] = {exp = 29},
     ["Sandshrew"] = {exp = 12},
     ["Sandslash"] = {exp = 16},
     ["Scyther"] = {exp = 14},
     ["Seadra"] = {exp = 15},
     ["Seaking"] = {exp = 12},
     ["Seel"] = {exp = 10},
     ["Shellder"] = {exp = 11},
     ["Shiny Aerodactyl"] = {exp = 78},
     ["Shiny Caterpie"] = {exp = 44},
     ["Shiny Chansey"] = {exp = 61},
     ["Shiny Charmeleon"] = {exp = 55},
     ["Shiny Exeggutor"] = {exp = 61},
     ["Shiny Gloom"] = {exp = 51},
     ["Shiny Ivysaur"] = {exp = 48},
     ["Shiny Lapras"] = {exp = 72},
     ["Shiny Magmar"] = {exp = 72},
     ["Shiny Porygon"] = {exp = 82},
     ["Shiny Staryu"] = {exp = 61},
     ["Shiny Wartortle"] = {exp = 51},
     ["Shiny Weezing"] = {exp = 65},
     ["Slowbro"] = {exp = 15},
     ["Slowpoke"] = {exp = 19},
     ["Snorlax"] = {exp = 25},
     ["Spearow"] = {exp = 6},
     ["Squirtle"] = {exp = 6},
     ["Starmie"] = {exp = 10},
     ["Staryu"] = {exp = 11},
     ["Tangela"] = {exp = 21},
     ["Tauros"] = {exp = 20},
     ["Tentacool"] = {exp = 12},
     ["Tentacruel"] = {exp = 29},
     ["Vaporeon"] = {exp = 26},
     ["Venomoth"] = {exp = 23},
     ["Venonat"] = {exp = 14},
     ["Venusaur"] = {exp = 44},
     ["Victreebel"] = {exp = 31},
     ["Vileplume"] = {exp = 27},
     ["Voltorb"] = {exp = 19},
     ["Vulpix"] = {exp = 14},
     ["Wartortle"] = {exp = 20},
     ["Weedle"] = {exp = 9},
     ["Weepinbell"] = {exp = 22},
     ["Weezing"] = {exp = 19},
     ["Wigglytuff"] = {exp = 11},
     ["Zapdos"] = {exp = 302},
     ["Zubat"] = {exp = 12},
    ----------2ºGeração--------
     ["Aipom"] = {exp = 12},
     ["Ampharos"] = {exp = 16},
     ["Ariados"] = {exp = 10},
     ["Azumarill"] = {exp = 16},
     ["Bayleef"] = {exp = 9},
     ["Bellossom"] = {exp = 8},
     ["Blissey"] = {exp = 19},
     ["Celebi"] = {exp = 350},
     ["Chikorita"] = {exp = 6},
     ["Chinchou"] = {exp = 7},
     ["Cleffa"] = {exp = 10},
     ["Corsola"] = {exp = 5},
     ["Crobat"] = {exp = 17},
     ["Croconaw"] = {exp = 5},
     ["Cyndaquil"] = {exp = 4},
     ["Delibird"] = {exp = 15},
     ["Donphan"] = {exp = 11},
     ["Dunsparce"] = {exp = 6},
     ["Elekid"] = {exp = 4},
     ["Entei"] = {exp = 290},
     ["Espeon"] = {exp = 29},
     ["Feraligatr"] = {exp = 21},
     ["Flaaffy"] = {exp = 16},
     ["Forretress"] = {exp = 13},
     ["Furret"] = {exp = 11},
     ["Girafarig"] = {exp = 19},
     ["Gligar"] = {exp = 6},
     ["Granbull"] = {exp = 4},
     ["Heracross"] = {exp = 12},
     ["Hitmontop"] = {exp = 15},
     ["Ho-oh"] = {exp = 490},
     ["Hoothoot"] = {exp = 11},
     ["Hoppip"] = {exp = 7},
     ["Houndoom"] = {exp = 12},
     ["Houndour"] = {exp = 10},
     ["Igglybuff"] = {exp = 4},
     ["Jumpluff"] = {exp = 3},
     ["Kingdra"] = {exp = 16},
     ["Lanturn"] = {exp = 13},
     ["Larvitar"] = {exp = 5},
     ["Ledian"] = {exp = 13},
     ["Ledyba"] = {exp = 10},
     ["Lugia"] = {exp = 410},
     ["Magby"] = {exp = 12},
     ["Mantine"] = {exp = 13},
     ["Mareep"] = {exp = 12},
     ["Marill"] = {exp = 8},
     ["Meganium"] = {exp = 20},
     ["Miltank"] = {exp = 19},
     ["Misdreavus"] = {exp = 19},
     ["Murkrow"] = {exp = 12},
     ["Natu"] = {exp = 10},
     ["Noctowl"] = {exp = 27},
     ["Octillery"] = {exp = 16},
     ["Phanpy"] = {exp = 6},
     ["Pichu"] = {exp = 5},
     ["Piloswine"] = {exp = 8},
     ["Pineco"] = {exp = 4},
     ["Politoed"] = {exp = 11},
     ["Porygon2"] = {exp = 16},
     ["Pupitar"] = {exp = 15},
     ["Quagsire"] = {exp = 12},
     ["Quilava"] = {exp = 15},
     ["Qwilfish"] = {exp = 12},
     ["Raikou"] = {exp = 390},
     ["Remoraid"] = {exp = 5},
     ["Scizor"] = {exp = 12},
     ["Sentret"] = {exp = 12},
     ["Shiny Blissey"] = {exp = 66},
     ["Shiny Kingdra"] = {exp = 55},
     ["Shiny Miltank"] = {exp = 51},
     ["Shiny Steelix"] = {exp = 61},
     ["Shiny Typhlosion"] = {exp = 57},
     ["Shiny Tyranitar"] = {exp = 64},
     ["Shuckle"] = {exp = 4},
     ["Skarmory"] = {exp = 15},
     ["Skiploom"] = {exp = 13},
     ["Slowking"] = {exp = 16},
     ["Slugma"] = {exp = 6},
     ["Smoochum"] = {exp = 12},
     ["Sneasel"] = {exp = 13},
     ["Spinarak"] = {exp = 4},
     ["Stantler"] = {exp = 6},
     ["Steelix"] = {exp = 20},
     ["Sudowoodo"] = {exp = 15},
     ["Suicune"] = {exp = 410},
     ["Sunflora"] = {exp = 12},
     ["Sunkern"] = {exp = 9},
     ["Swinub"] = {exp = 9},
     ["Teddiursa"] = {exp = 10},
     ["Togepi"] = {exp = 19},
     ["Togetic"] = {exp = 25},
     ["Totodile"] = {exp = 16},
     ["Typhlosion"] = {exp = 31},
     ["Tyranitar"] = {exp = 26},
     ["Tyrogue"] = {exp = 19},
     ["Umbreon"] = {exp = 17},
     ["Unown"] = {exp = 6},
     ["Ursaring"] = {exp = 15},
     ["Wobbuffet"] = {exp = 16},
     ["Wooper"] = {exp = 12},
     ["Xatu"] = {exp = 9},
     ["Yanma"] = {exp = 10},
     -------- 3º Geração---------
     ["Absol"] = {exp = 22},
     ["Aggron"] = {exp = 9},
     ["Altaria"] = {exp = 12},
     ["Anorith"] = {exp = 7},
     ["Armaldo"] = {exp = 10},
     ["Aron"] = {exp = 6},
     ["Bagon"] = {exp = 4},
     ["Baltoy"] = {exp = 5},
     ["Banette"] = {exp = 4},
     ["Barboach"] = {exp = 8},
     ["Beautifly"] = {exp = 7},
     ["Beldum"] = {exp = 2},
     ["Blaziken"] = {exp = 34},
     ["Breloom"] = {exp = 19},
     ["Budew"] = {exp = 6},
     ["Cacnea"] = {exp = 7},
     ["Cacturne"] = {exp = 9},
     ["Camerupt"] = {exp = 12},
     ["Carvanha"] = {exp = 9},
     ["Cascoon"] = {exp = 5},
     ["Castform"] = {exp = 4},
     ["Chimecho"] = {exp = 21},
     ["Chingling"] = {exp = 4},
     ["Clamperl"] = {exp = 13},
     ["Claydol"] = {exp = 25},
     ["Combusken"] = {exp = 15},
     ["Corphish"] = {exp = 11},
     ["Cradily"] = {exp = 12},
     ["Crawdaunt"] = {exp = 9},
     ["Delcatty"] = {exp = 15},
     ["Dusclops"] = {exp = 19},
     ["Dusknoir"] = {exp = 32},
     ["Duskull"] = {exp = 9},
     ["Dustox"] = {exp = 10},
     ["Electrike"] = {exp = 12},
     ["Exploud"] = {exp = 16},
     ["Feebas"] = {exp = 3},
     ["Feebas"] = {exp = 3},
     ["Flygon"] = {exp = 44},
     ["Froslass"] = {exp = 22},
     ["Gallade"] = {exp = 26},
     ["Gardevoir"] = {exp = 22},
     ["Glalie"] = {exp = 18},
     ["Glalie"] = {exp = 16},
     ["Groudon"] = {exp = 500},
     ["Grovyle"] = {exp = 20},
     ["Grumpig"] = {exp = 12},
     ["Gulpin"] = {exp = 12},
     ["Hariyama"] = {exp = 11},
     ["Huntail"] = {exp = 9},
     ["Illumise"] = {exp = 12},
     ["Jirachi"] = {exp = 350},
     ["Kecleon"] = {exp = 6},
     ["Kirlia"] = {exp = 10},
     ["Kyogre"] = {exp = 700},
     ["Lairon"] = {exp = 10},
     ["Lileep"] = {exp = 6},
     ["Linoone"] = {exp = 8},
     ["Lombre"] = {exp = 9},
     ["Lotad"] = {exp = 7},
     ["Loudred"] = {exp = 9},
     ["Loudred"] = {exp = 9},
     ["Ludicolo"] = {exp = 12},
     ["Lunatone"] = {exp = 15},
     ["Luvdisc"] = {exp = 21},
     ["Magnezone"] = {exp = 27},
     ["Makuhita"] = {exp = 11},
     ["Manectric"] = {exp = 13},
     ["Marshtomp"] = {exp = 16},
     ["Masquerain"] = {exp = 11},
     ["Mawile"] = {exp = 10},
     ["Medicham"] = {exp = 20},
     ["Meditite"] = {exp = 16},
     ["Metagross"] = {exp = 25},
     ["Metang"] = {exp = 14},
     ["Mightyena"] = {exp = 22},
     ["Milotic"] = {exp = 23},
     ["Minun"] = {exp = 14},
     ["Mudkip"] = {exp = 9},
     ["Nincada"] = {exp = 11},
     ["Ninjask"] = {exp = 14},
     ["Nosepass"] = {exp = 13},
     ["Numel"] = {exp = 16},
     ["Nuzleaf"] = {exp = 21},
     ["Palkia"] = {exp = 250},
     ["Pelipper"] = {exp = 15},
     ["Phione"] = {exp = 14},
     ["Plusle"] = {exp = 11},
     ["Poochyena"] = {exp = 10},
     ["Primal Kyogre"] = {exp = 410},
     ["Probopass"] = {exp = 24},
     ["Ralts"] = {exp = 14},
     ["Rayquaza"] = {exp = 410},
     ["Regice"] = {exp = 354},
     ["Regirock"] = {exp = 354},
     ["Registeel"] = {exp = 354},
     ["Relicanth"] = {exp = 20},
     ["Roselia"] = {exp = 14},
     ["Roserade"] = {exp = 25},
     ["Sableye"] = {exp = 25},
     ["Salamence"] = {exp = 26},
     ["Sceptile"] = {exp = 24},
     ["Sealeo"] = {exp = 22},
     ["Seedot"] = {exp = 19},
     ["Seviper"] = {exp = 17},
     ["Sharpedo"] = {exp = 13},
     ["Shedinja"] = {exp = 16},
     ["Shelgon"] = {exp = 13},
     ["Shiftry"] = {exp = 19},
     ["Shiny Absol"] = {exp = 55},
     ["Shiny Aggron"] = {exp = 48},
     ["Shiny Aron"] = {exp = 42},
     ["Shiny Beldum"] = {exp = 44},
     ["Shiny Cradily"] = {exp = 38},
     ["Shiny Flygon"] = {exp = 51},
     ["Shiny Gallade"] = {exp = 55},
     ["Shiny Gardevoir"] = {exp = 57},
     ["Shiny Lairon"] = {exp = 39},
     ["Shiny Lileep"] = {exp = 38},
     ["Shiny Metagross"] = {exp = 69},
     ["Shiny Metang"] = {exp = 44},
     ["Shiny Milotic"] = {exp = 65},
     ["Shiny Probopass"] = {exp = 66},
     ["Shiny Salamence"] = {exp = 64},
     ["Shiny Sceptile"] = {exp = 64},
     ["Shiny Shelgon"] = {exp = 55},
     ["Shiny Treecko"] = {exp = 33},
     ["Shiny Tropius"] = {exp = 77},
     ["Shroomish"] = {exp = 20},
     ["Shuppet"] = {exp = 21},
     ["Silcoon"] = {exp = 16},
     ["Skitty"] = {exp = 14},
     ["Slaking"] = {exp = 25},
     ["Slakoth"] = {exp = 22},
     ["Snorunt"] = {exp = 23},
     ["Solrock"] = {exp = 21},
     ["Spheal"] = {exp = 14},
     ["Spinda"] = {exp = 10},
     ["Spoink"] = {exp = 10},
     ["Surskit"] = {exp = 15},
     ["Swablu"] = {exp = 15},
     ["Swalot"] = {exp = 16},
     ["Swampert"] = {exp = 13},
     ["Swellow"] = {exp = 13},
     ["Taillow"] = {exp = 15},
     ["Torchic"] = {exp = 10},
     ["Torkoal"] = {exp = 12},
     ["Trapinch"] = {exp = 11},
     ["Treecko"] = {exp = 8},
     ["Tropius"] = {exp = 29},
     ["Vibrava"] = {exp = 20},
     ["Vigoroth"] = {exp = 11},
     ["Volbeat"] = {exp = 12},
     ["Wailmer"] = {exp = 13},
     ["Wailord"] = {exp = 20},
     ["Walrein"] = {exp = 14},
     ["Whiscash"] = {exp = 14},
     ["Whismur"] = {exp = 11},
     ["Wingull"] = {exp = 10},
     ["Wurmple"] = {exp = 13},
     ["Zangoose"] = {exp = 16},
     ["Zigzagoon"] = {exp = 16},
     -------- 4º Geração---------
     ["Abomasnow"] = {exp = 21},
     ["Ambipom"] = {exp = 22},
     ["Bastiodon"] = {exp = 26},
     ["Bibarel"] = {exp = 19},
     ["Bonsly"] = {exp = 12},
     ["Bronzong"] = {exp = 16},
     ["Bronzor"] = {exp = 14},
     ["Buizel"] = {exp = 11},
     ["Buneary"] = {exp = 14},
     ["Burmy"] = {exp = 16},
     ["Carnivine"] = {exp = 20},
     ["Chatot"] = {exp = 12},
     ["Cherrim"] = {exp = 11},
     ["Cherubi"] = {exp = 9},
     ["Chimchar"] = {exp = 11},
     ["Combee"] = {exp = 11},
     ["Cranidos"] = {exp = 21},
     ["Croagunk"] = {exp = 21},
     ["Darkrai Nightmare"] = {exp = 189},
     ["Darkrai"] = {exp = 310},
     ["Drapion"] = {exp = 26},
     ["Drifblim"] = {exp = 24},
     ["Drifloon"] = {exp = 16},
     ["Electivire"] = {exp = 14},
     ["Empoleon"] = {exp = 33},
     ["Finneon"] = {exp = 19},
     ["Floatzel"] = {exp = 14},
     ["Gabite"] = {exp = 9},
     ["Garchomp"] = {exp = 24},
     ["Gastrodon"] = {exp = 19},
     ["Gible"] = {exp = 13},
     ["Giratina"] = {exp = 480},
     ["Glaceon"] = {exp = 21},
     ["Glameow"] = {exp = 19},
     ["Gliscor"] = {exp = 24},
     ["Grotle"] = {exp = 19},
     ["Happiny"] = {exp = 14},
     ["Heatran"] = {exp = 16},
     ["Hippopotas"] = {exp = 17},
     ["Hippowdon"] = {exp = 13},
     ["Honchkrow"] = {exp = 27},
     ["Infernape"] = {exp = 26},
     ["Kricketot"] = {exp = 21},
     ["Kricketune"] = {exp = 19},
     ["Leafeon"] = {exp = 19},
     ["Lickilicky"] = {exp = 25},
     ["Lopunny"] = {exp = 25},
     ["Lucario"] = {exp = 25},
     ["Lumineon"] = {exp = 16},
     ["Luxio"] = {exp = 13},
     ["Luxray"] = {exp = 9},
     ["Magmortar"] = {exp = 26},
     ["Mamoswine"] = {exp = 24},
     ["Mantyke"] = {exp = 21},
     ["Mime Jr."] = {exp = 22},
     ["Mismagius"] = {exp = 19},
     ["Monferno"] = {exp = 10},
     ["Mothim"] = {exp = 7},
     ["Pachirisu"] = {exp = 9},
     ["Piplup"] = {exp = 4},
     ["Prinplup"] = {exp = 10},
     ["Purugly"] = {exp = 6},
     ["Rampardos"] = {exp = 22},
     ["Regigigas"] = {exp = 244},
     ["Riolo"] = {exp = 22},
     ["Shaymin"] = {exp = 22},
     ["Shellos"] = {exp = 16},
     ["Shieldon"] = {exp = 13},
     ["Shinx"] = {exp = 13},
     ["Shiny Drapion"] = {exp = 53},
     ["Shiny Gliscor"] = {exp = 44},
     ["Shiny Lucario"] = {exp = 66},
     ["Shiny Spiritomb"] = {exp = 74},
     ["Shiny Togekiss"] = {exp = 74},
     ["Skorupi"] = {exp = 16},
     ["Skuntank"] = {exp = 11},
     ["Snover"] = {exp = 9},
     ["Spiritomb"] = {exp = 55},
     ["Staraptor"] = {exp = 19},
     ["Staravia"] = {exp = 19},
     ["Starly"] = {exp = 8},
     ["Stunky"] = {exp = 9},
     ["Tangrowth"] = {exp = 34},
     ["Togekiss"] = {exp = 55},
     ["Torterra"] = {exp = 26},
     ["Toxicroak"] = {exp = 22},
     ["Turtwig"] = {exp = 16},
     ["Uxie"] = {exp = 9},
     ["Vespiquen"] = {exp = 9},
     ["Weavile"] = {exp = 6},
     ["Wormadam Grass"] = {exp = 6},
     ["Wormadam steel"] = {exp = 6},
     ["Wormadam Ground"] = {exp = 6},
     ["Yanmega"] = {exp = 7},
     ----------Especiais----------
      ["Cresselia"] = {exp = 200},
      ["Dragonite Milenar"] = {exp = 100},
      ["Horder Leader Alakazam"] = {exp = 100},
      ["Giant Gallade"] = {exp = 90},
      ["Natal Machine"] = {exp = 90},
      ["Rocket Machine"] = {exp = 90},
     ---------Shinys--------------
     ["Shiny Abra"] = {exp = 60},
     ["Shiny Alakazam"] = {exp = 60},
     ["Shiny Arcanine"] = {exp = 60},
     ["Shiny Ariados"] = {exp = 60},
     ["Shiny Beedrill"] = {exp = 60},
     ["Shiny Blastoise"] = {exp = 60},
     ["Shiny Butterfree"] = {exp = 60},
     ["Shiny Charizard"] = {exp = 60},
     ["Shiny Clefable"] = {exp = 60},
     ["Shiny Cubone"] = {exp = 60},
     ["Shiny Dodrio"] = {exp = 60},
     ["Shiny Dragonair"] = {exp = 60},
     ["Shiny Dragonite"] = {exp = 60},
     ["Shiny Dratini"] = {exp = 60},
     ["Shiny Electabuzz"] = {exp = 60},
     ["Shiny Electrode"] = {exp = 60},
     ["Shiny Farfetch'd"] = {exp = 60},
     ["Shiny Fearow"] = {exp = 60},
     ["Shiny Flareon"] = {exp = 60},
     ["Shiny Gengar"] = {exp = 60},
     ["Shiny Golbat"] = {exp = 44},
     ["Shiny Golem"] = {exp = 44},
     ["Grimer"] = {exp = 11},
     ["Shiny Grimer"] = {exp = 44},
     ["Shiny Growlithe"] = {exp = 44},
     ["Shiny Hitmonchan"] = {exp = 44},
     ["Shiny Hitmonlee"] = {exp = 44},
     ["Shiny Hitmontop"] = {exp = 44},
     ["Shiny Hypno"] = {exp = 44},
     ["Shiny Jynx"] = {exp = 44},
     ["Shiny Kingler"] = {exp = 44},
     ["Shiny Krabby"] = {exp = 44},
     ["Shiny Magby"] = {exp = 44},
     ["Shiny Magikarp"] = {exp = 26},
     ["Shiny Marowak"] = {exp = 26},
     ["Shiny Magneton"] = {exp = 26},
     ["Shiny Mr. Mime"] = {exp = 26},
     ["Shiny Muk"] = {exp = 26},
     ["Shiny Nidoking"] = {exp = 26},
     ["Shiny Ninetales"] = {exp = 26},
     ["Shiny Oddish"] = {exp = 26},
     ["Shiny Onix"] = {exp = 26},
     ["Shiny Paras"] = {exp = 26},
     ["Shiny Parasect"] = {exp = 26},
     ["Shiny Pidgeot"] = {exp = 26},
     ["Shiny Pinsir"] = {exp = 26},
     ["Shiny Politoed"] = {exp = 26},
     ["Shiny Raichu"] = {exp = 26},
     ["Shiny Raticate"] = {exp = 26},
     ["Shiny Rattata"] = {exp = 26},
     ["Shiny Rhydon"] = {exp = 26},
     ["Shiny Rhyperior"] = {exp = 26},
     ["Shiny Roserade"] = {exp = 26},
     ["Shiny Scyther"] = {exp = 26},
     ["Shiny Seadra"] = {exp = 26},
     ["Shiny Snorlax"] = {exp = 26},
     ["Shiny Stantler"] = {exp = 26},
     ["Shiny Tangela"] = {exp = 26},
     ["Shiny Tangrowth"] = {exp = 26},
     ["Shiny Tentacool"] = {exp = 26},
     ["Shiny Tentacruel"] = {exp = 26},
     ["Shiny Umbreon"] = {exp = 26},
     ["Shiny Vaporeon"] = {exp = 26},
     ["Shiny Venomoth"] = {exp = 26},
     ["Shiny Venonat"] = {exp = 26},
     ["Shiny Venusaur"] = {exp = 26},
     ["Shiny Vileplume"] = {exp = 26},
     ["Shiny Voltorb"] = {exp = 26},
     ["Shiny Wigglytuff"] = {exp = 26},
     ["Shiny Zubat"] = {exp = 26},
     ["Shiny Arbok"] = {exp = 46},
     ---------Boss---------------
      ["Guardian Magmar"] = {exp = 1},
      ["Boss Togekiss"] = {exp = 1},
      ["Boss Metagross"] = {exp = 1},
      ["Maquina Magmar"] = {exp = 900},
    -----------6º Geração-------------
      ["Chandelure"] = {exp = 10},
      ["Hydreigon"] = {exp = 12},
      ["Emboar"] = {exp = 12},
      ["Serperior"] = {exp = 13},
      ["Shiny Serperior"] = {exp = 19},
      ["Shiny Hydreigon"] = {exp = 19},
      ["Shiny Emboar"] = {exp = 19},
      ["Shiny Chandelure"] = {exp = 19},
      ["Zorua"] = {exp = 19},
      ["Latios"] = {exp = 350},
      ["Latias"] = {exp = 360},
      ["Gient Gallede"] = {exp = 120},
      ["Joker Gengar"] = {exp = 120},
      
      --------CASTLE----------
      ["Castle Mewtwo"] = {exp = 120},
      ["Castle Charizard"] = {exp = 50},
      ["Castle Blastoise"] = {exp = 50},
      ["Castle Venusaur"] = {exp = 50},
      ["Castle Snorlax"] = {exp = 50},

     
     

     }
     
    function onKill(cid, target)

     local posss = getCreaturePosition(cid)
     local Buceta = BrendoXp[getCreatureName(target)]
     local Buceta2 = math.random(1,5)

    if not buceta then
     buceta = {exp = math.random(30,50)
     end
     local feet = getPlayerSlotItem(cid, CONST_SLOT_FEET)
     local chck = getItemAttribute(feet.uid, "exp")
     local chckc = getItemAttribute(feet.uid, "level")
     
     local summons = getPlayerPokemons(cid)
     if #summons == 0 then
     return true
     end
     
     if getItemAttribute(feet.uid, "level") == levelMax then 
     return true
     end
     
     if getTileInfo(getThingPos(cid)).pvp then 
     return true
     end
     
     if getPlayerStorageValue(cid, 990) > 0 then
     return true
     end
     
     if isSummon(cid) and getCreatureStorage(cid,10) == "guardian" then
     return true
     end
     
     local pk = getPlayerPokemons(cid)[1]
     
     if isPlayer(cid) == TRUE and isSummon(target) == true then
     doPlayerSendCancel(cid, "Your Pokemon dont gain experience in Duel")
     return TRUE
     end
     ---------------------------------------------------------------- level 1 ----------------------------------------------------------------
     if isPlayer(target) == FALSE and getItemAttribute(feet.uid, "level") == False then
     return true
     end
     
     local level = getItemAttribute(feet.uid, "level")
     local exp = getItemAttribute(feet.uid, "exp")
     local pk = getPlayerPokemons(cid)[1]
     
     if isPlayer(target) == FALSE and getItemAttribute(feet.uid, "level") < levelMax and getItemAttribute(feet.uid, "exp") >= 0 and (Buceta.exp + exp) < (level * expStart) + (expStart *(level - 1)) then
     doItemSetAttribute(feet.uid, "exp", chck +Buceta.exp) 
     doPlayerSendTextMessage(cid, 25, "Seu "..getPokeName(getPlayerPokemons(cid)[1]).." ganhou ".. Buceta.exp.." de experiência por derrotar "..getCreatureName(target)..".")
     return true
     end

     if isPlayer(target) == FALSE and getItemAttribute(feet.uid, "level") < levelMax and (Buceta.exp + exp) >= (level * expStart) + (expStart *(level - 1)) then

     doPlayerSendTextMessage(cid, 25, "Seu "..getCreatureName(getPlayerPokemons(cid)[1]).." avançou do nível "..level.." para o nível "..level + 1 ..".")
     doItemSetAttribute(feet.uid, "level", level +1) 
     doItemSetAttribute(feet.uid, "exp", 0)
     doSendAnimatedText(getCreaturePosition(getPlayerPokemons(cid)[1]), "LEVEL UP!", 215) 
     doSendMagicEffect(getCreaturePosition(getPlayerPokemons(cid)[1]), 211) 
     adjustStatus(pk, feet.uid, true, true, true)
     doUpdatePokemonsBar(cid)
     return true
     end
     ------------------------------------------------------------------------------------------------------------------------------------------
     ------------------------------------------------------------------------------------------------------------------------------------------
     
     end

     

  4. Citar

    function onUse(cid, item, frompos, item2, topos)
        local config = {
        timeExhausted = 0, -- tempo em horas para poder usar o item novamente.
        timeForUse = 1, -- tempo em horas que o player poderá entrar na cave.
        exhausted = 156751,
        storage = 789450,
        toKnow = 456789,
        effect = 27, -- efeito que dará ao usar o item.
        }
        
        if getPlayerStorageValue(cid, config.exhausted) < os.time() then
            setPlayerStorageValue (cid, config.storage, config.timeForUse * 60 + os.time())
            setPlayerStorageValue (cid, config.exhausted, config.timeExhausted * 60 + os.time())
                    doRemoveItem(item.uid,1)
            setPlayerStorageValue (cid, config.toKnow, 1)
            doSendMagicEffect (getThingPos(cid), config.effect)
            doPlayerSendTextMessage (cid, 19, "Voce Usou a Bonus Area")
        else
            doPlayerSendTextMessage (cid, 19, "Voce precisa esperar "..getPlayerStorageValue(cid, config.exhausted)- os.time().." segundos")
        end
    return true
    end

     

  5. function onStepIn(cid, item, position, fromPosition)
    local pos = {x = 1037, y = 1034, z = 7}
    local battlewin = 1
    if #getCreatureSummons(cid) >= 1 then
    return true
    end
    
    addEvent(function()
    
    if #getPlayersInArea(battleroyale.area) > 1 then 
    doTeleportThing(cid, pos)
    local item = doPlayerAddItem(cid, 5805, 1)
    doItemSetAttribute(item, "description", getCreatureName(cid).." conquistou este trofeu apos vencer uma partida no Battle Royale.")
    doBroadcastMessage(""..getCreatureName(cid).." Venceu o evento Battle Royale")
    doPlayerAddItem(cid,12618,1)
    doPlayerAddItem(cid,2152,30)
    addTopbattle(cid, battlewin)
    else
    doPlaerSendCancel(cid, "Not Win")
    end
    
    end,5*10000)
    return true
    end

     

  6. local cidades = {
    ["NOME DA CIDADE VIP"] = {pos = {x=1054,y=1050,z=7}}, -- POSICAO DA CIDADE VIP
    ["NOME DA CIDADE VIP"] = {pos = {x=1060,y=903,z=7}}, -- POSICAO DA CIDADE VIP
    ["NOME DA CIDADE VIP"] = {pos = {x=1204,y=1046,z=7}}, -- POSICAO DA CIDADE VIP
    ["NOME DA CIDADE VIP"] = {pos = {x=1122,y=1449,z=7}}, -- POSICAO DA CIDADE VIP
    ["NOME DA CIDADE VIP"] = {pos = {x=862,y=1035,z=6}}, -- POSICAO DA CIDADE VIP
    ["NOME DA CIDADE VIP"] = {pos = {x=575,y=1143,z=7}}, -- POSICAO DA CIDADE VIP
    }
    
    
    function  onSay(cid, words, param, channel)
    
    
    local teleporta = cidades[param]
    if(param == "") then
    doPlayerSendCancel(cid, "digite o nome da cidade.")
    return true
    end
    
    if (param ~= teleporta ) then
    doPlayerSendCancel(cid, "Cidade não existente")
    return true
    end
    
    
    if(isPlayerPzLocked(cid) == false) and isPremium(cid) == true then
    doTeleportThing(cid, teleporta.pos)
    doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT)
    doPlayerSendTextMessage(cid, 22, "Voce foi teleportado para ".. param ..".")
    else
    doPlayerSendCancel(cid, "Voce nao e premium account ou esta em batalha")
    end
    return true
    end

     

  7. function SendEffect(cid)
      doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, "Você está sem o Efeito de Gemas.")
      return TRUE
    end
    
    local storages = {77000,77001,77002,77003}
    local time = os.time()
    function onLogin(cid)
    
    
      for i = 1, #storages do
    
        if getPlayerStorageValue(cid, storage[i]) - time < 1 then
          return false and SendEffect(cid)
        end
      end
    
      doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, "Você está sob o Efeito de Gemas.")
    
      return true
    end

     

  8. Tenta ai cara

    
    
    function SendEffect(cid)
      doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, "Você está sem o Efeito de Gemas.")
      return TRUE
    end
    
    local storages = {77000,77001,77002,77003}
    local time = os.time()
    function onLogin(cid)
    
    
      for i = 1, #storages do
    
        if getPlayerStorageValue(cid, storage[i]) - time < 1 then
          SendEffect(cid)
        end
      end
    
      doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, "Você está sob o Efeito de Gemas.")
    
      return true
    end
    
    

     

  9. local pokemon = "Alakazam" -- pokemon que vai precisar
    function onStepIn(cid, item, position, fromPosition)
    
      local slot = getPlayerSlotItem(cid, 8).uid
      if getItemAttribute(slot, "poke") == pokemon and #getCreatureSummons(cid) > 0 then
        doPlayerSendTextMessage(cid, 22, "Bem vindo")
      else
        doTeleportThing(cid, fromPosition)
        doPlayerSendTextMessage(cid, 22, "Você não tem o pokemon nescessario")
      end
    
      return true
    end

     

  10. Teste

    local sto = 44487
    
    function isOnSameFloor(fromPos, toPos)
        return fromPos.z == toPos.z and true or false
    end
    
    function isEven(arg)
        return arg % 2 == 0 and true or false
    end
    
    function getMiddlePos(fromPos, toPos)
        if not isOnSameFloor(fromPos, toPos) then
            return false
        end
        
        local middle = {x = 0, y = 0, z = 0}    
            middle.x = isEven(fromPos.x + toPos.x) and (fromPos.x + toPos.x)/2 or math.floor((fromPos.x + toPos.x)/2) + 1
            middle.y = isEven(fromPos.y + toPos.y) and (fromPos.y + toPos.y)/2 or math.floor((fromPos.y + toPos.y)/2) + 1
            middle.z = fromPos.z or toPos.z
        return middle
    end
    
    function getDistanceRadius(fromPos, toPos)
        if not isOnSameFloor(fromPos, toPos) then
            return false
        end
        
        local distance = getDistanceBetween(fromPos, toPos)
        return isEven(distance) and (distance/2) or math.floor(distance/2) + 1
    end
    
    function cleareArea1(middlePos, rangex, rangey)
        local final = {x=1030, y=1085, z=7} -- Posição onde será teleportado quando acabar o tempo
        
        for i = -rangex, rangex do
            for j = -rangey, rangey do
                pos = {x = middlePos.x + i, y = middlePos.y + j, z = middlePos.z}
                creature = getTopCreature(pos).uid
                
                if isMonster(creature) then
                    doSendMagicEffect(getThingPos(creature), 14)
                    doRemoveCreature(creature)
                elseif isPlayer(creature) then
                    doSendMagicEffect(getThingPos(creature), 10)
                    doTeleportThing(creature, final)
                end
            end
        end
        
        setGlobalStorageValue(sto, -1)
        return true
    end
        
    local t = {
        lvl = 150,
        lvl2 = 201,
        entrada = {
            {x = 1067, y = 1067, z = 9}, -- pos players
            {x = 1067, y = 1068, z = 9}, -- pos players
            {x = 1067, y = 1069, z = 9}, -- pos players
            {x = 1067, y = 1070, z = 9}, -- pos players
            {x = 1067, y = 1071, z = 9}, -- pos players
        },
        saida = {
            {x = 717, y = 1013, z = 9}, -- pos para onde eles irão
            {x = 717, y = 1013, z = 9}, -- pos para onde eles irão
            {x = 717, y = 1013, z = 9}, -- pos para onde eles irão
            {x = 717, y = 1013, z = 9}, -- pos para onde eles irão
            {x = 717, y = 1013, z = 9}, -- pos para onde eles irão
        },    
    }
    
    function onUse(cid, item, fromPosition, itemEx, toPosition)
        local configure = {
            fromPos = {x=702, y=988, z=9}, -- posição superior esquerda do mapa, da area em que esta mapeado a area.
            toPos = {x=811, y=1025, z=9}, -- posição inferior direita do mapa, da area em que esta mapeado a area.
        }
        
        local config = {
            position = {x=1067, y=1066, z=9}, -- Contagem
            fromPosition = {x=1022, y=1024, z=9},
            toPosition = {x=1139, y=1134, z=9},
            id = 1498,
            time = 1
        }
    
        local time = 300
        local check = {}
        
        for _, k in ipairs(t.entrada) do
             local x = getTopCreature(k).uid  
                if getPlayerLevel(cid) <= 149 then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Você precisa estar entre os níveis 150 á 200 para poder entrar.")
                return true
            end
    
      for _, k in ipairs(t.entrada) do
             local x = getTopCreature(k).uid  
                if getPlayerLevel(cid) >= 201 then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Você precisa estar entre os níveis 150 á 200 para poder entrar.")
                return true
            end
    
    
       
                 
                if getGlobalStorageValue(sto) == 1 then
                    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde até que a sala seja liberada.")
                    return true
                end
                
            table.insert(check, x)
        end
                                        
                        for i, tid in ipairs(check) do
                            doTeleportThing(tid, t.saida[i], false)
                            doSendMagicEffect(t.saida[i], 10)
                            doTransformItem(item.uid, item.itemid == 1810 and 1810 or 1810)
                        end
                        
                for i = 1,time do
                    formula = time - 1*i
                    addEvent(doSendAnimatedText, i*1000, config.position, formula, TEXTCOLOR_GREY)                
                end
        
        setGlobalStorageValue(sto, 1)
        local rx = getDistanceRadius(configure.fromPos, configure.toPos)
        addEvent(cleareArea1, config.time * 1800 * 1000, getMiddlePos(configure.fromPos, configure.toPos), rx, rx)
        return true
    end
    end

     

  11. mano da uma olhada ai , nao sei se vai dar certo..

    local config = {
        playerCount = 2001, -- Global storage for counting the players left/entered in the event
        zombieCount = 2002, -- Global storage for counting the zombies in the event
        teleportActionId = 2000, -- Action id of the teleport needed for the movement script
        teleportPosition = {x = 1143, y = 1054, z = 7, stackpos = 1}, -- Where the teleport will be created
        teleportToPosition = {x = 1152, y = 1028, z = 7}, -- Where the teleport will take you
        teleportId = 1387, -- Id of the teleport
        timeToStartEvent = 2, -- Minutes, after these minutes the teleport will be removed and the event will be declared started
        timeBetweenSpawns = 5, -- Seconds between each spawn of zombie
        zombieName = "Zombie", -- Name of the zombie that should be summoned
        playersNeededToStartEvent = 5, -- Players needed before the zombies can spawn.
            walls = {x = 1189, y = 1044, z = 7,  stackpos = 1},
        
        -- Should be the same as in the creaturescript!
        -- The zombies will spawn randomly inside this area
        fromPosition = {x = 1135, y = 1018, z = 7}, {x = 1170, y = 1040, z = 7}, -- top left cornor of the playground
        toPosition = {x = 1170, y = 1040, z = 7}, {x = 1135, y = 1018, z = 7}, -- bottom right cornor of the playground
        }
    
    
    function onThink()
        local tp = doCreateTeleport(config.teleportId, config.teleportToPosition, config.teleportPosition)
        doItemSetAttribute(tp, "aid", config.teleportActionId)
        doBroadcastMessage("EVENTO ZUMBI MENSAGEM: O evento 'Zumbi' começará em 2 minutos. O portal será fechado quando o evento começar.", MESSAGE_STATUS_CONSOLE_BLUE)
            doRemoveItem(getThingFromPos(config.walls).uid, 1)
        setGlobalStorageValue(config.playerCount, 0)
        setGlobalStorageValue(config.zombieCount, 0)
        addEvent(startEvent, config.timeToStartEvent * 1000 * 60)
        print(getGlobalStorageValue(2001))
    end
    
    function startEvent()
        local get = getThingfromPos(config.teleportPosition)
        if get.itemid == config.teleportId then
            doRemoveItem(get.uid, 1)
                    doCreateItem(9486, 9532, 1, config.walls)
        end
        
        local fromPosition, toPosition = config.fromPosition, config.toPosition
    
        if getGlobalStorageValue(config.playerCount) >= config.playersNeededToStartEvent then
            addEvent(spawnZombie, config.timeBetweenSpawns * 1000)
            doBroadcastMessage("EVENTO ZUMBI MENSAGEM: Boa sorte no evento 'Zumbi' jogadores! O portal foi fechado! E o primeiro zumbi aparecerá em 5 segundos.", MESSAGE_STATUS_CONSOLE_BLUE)
                    doCreateItem(9486, 9532, 1, config.walls)
    
            
            for x = fromPosition.x, toPosition.x do
                for y = fromPosition.y, toPosition.y do
                    for z = fromPosition.z, toPosition.z do
                        areapos = {x = x, y = y, z = z, stackpos = 253}
                        getPlayers = getThingfromPos(areapos)
                        if isPlayer(getPlayers.uid) then
                            doBroadcastMessage(getPlayers.uid, "EVENTO ZUMBI MENSAGEM: O primeiro zumbie vai aparecer em " .. config.timeBetweenSpawns .. " segundos. Boa sorte!", MESSAGE_STATUS_CONSOLE_BLUE)
                        end
                    end
                end
            end
        else
            doBroadcastMessage("EVENTO ZUMBI MENSAGEM: O evento 'Zumbi' não pode ser iniciado pelo pequeno número de jogadores participando. No mínimo " .. config.playersNeededToStartEvent .. " jogadores é necessário!", MESSAGE_STATUS_CONSOLE_BLUE)
                    doCreateItem(9486, 9532, 1, config.walls)
            for x = fromPosition.x, toPosition.x do
                for y = fromPosition.y, toPosition.y do
                    for z = fromPosition.z, toPosition.z do
                        areapos = {x = x, y = y, z = z, stackpos = 253}
                        getPlayers = getThingfromPos(areapos)
                        if isPlayer(getPlayers.uid) then
                                                doRemoveCreature(pid)
                            doTeleportThing(getPlayers.uid, getTownTemplePosition(getPlayerTown(getPlayers.uid)), true)
                            doSendMagicEffect(getPlayerPosition(getPlayers.uid), CONST_ME_TELEPORT)
                        end
                    end
                end
            end
        end
    end
    
    function spawnZombie()
        if getGlobalStorageValue(config.playerCount) >= 2 then
            pos = {x = math.random(config.fromPosition.x, config.toPosition.x), y = math.random(config.fromPosition.y, config.toPosition.y), z = math.random(config.fromPosition.z, config.toPosition.z)}
            doSummonCreature(config.zombieName, pos)
            doSendMagicEffect(pos, CONST_ME_MORTAREA)
            setGlobalStorageValue(config.zombieCount, getGlobalStorageValue(config.zombieCount)+1)
            doBroadcastMessage("EVENTO ZUMBI MENSAGEM: Um novo zumbi apareceu! Agora temos: " .. getGlobalStorageValue(config.zombieCount) .. " zumbis no evento!", MESSAGE_STATUS_CONSOLE_BLUE)
            addEvent(spawnZombie, config.timeBetweenSpawns * 1000)
        end
    end

     

  12. ---------Criado por Alisson Linneker---------
    
    ---Base
    
    local itemID = 6119 -- O ID do item que quando usado ira dar a quantidade de EXP desejada
    
    local exp = 500 -- A quantidade de EXP desejada
    
    local mensagem = "Uhul! EXP" -- A mensagem q ira aparecer quando for usado o item
    
     
    
    ----Estrutura
    
    function onUse(cid, item, frompos, item2, topos)
    
    playerpos = getPlayerPosition(cid)
    
    
    doPlayerAddExp(cid, exp)
    
    doSendMagicEffect(playerpos,30)
    
    doCreatureSay(cid, mensagem, 3)
    
    doRemoveItem(cid, item.uid, 1)
    
    doPlayerSendTextMessage(cid,20, "Você ganhou " ..exp.. " de experiência.")
    
    return 1
    
    end
    
    --------Criado por Alisson Linneker---------

     

  13. Teste adicionei 2 variaveis no topo do script para que vc mude os ids da outfit (male e female)

     

    local roupaFemale = 000
    local RoupaMale = 000
    
    local fishing = {
    ["Magikarp"] = {skill = 1, level = 1},
    ["Krabby"] = {skill = 5, level = 5},
    ["Horsea"] = {skill = 5, level = 5},
    ["Luvdisc"] = {skill = 10, level = 10},
    ["Finneon"] = {skill = 10, level = 10},
    ["Tympole"] = {skill = 10, level = 10},
    ["Tirtouga"] = {skill = 10, level = 10},
    ["Ducklett"] = {skill = 10, level = 10},
    ["Clamperl"] = {skill = 15, level = 15},
    ["Tynamo"] = {skill = 15, level = 15},
    ["Spheal"] = {skill = 15, level = 15},
    ["Goldeen"] = {skill = 20, level = 20},
    ["Marill"] = {skill = 20, level = 20},
    ["Remoraid"] = {skill = 20, level = 20},
    ["Tentacool"] = {skill = 20, level = 20},
    ["Corphish"] = {skill = 20, level = 20},
    ["Poliwag"] = {skill = 25, level = 25},
    ["Chinchou"] = {skill = 25, level = 25},
    ["Basculin"] = {skill = 30, level = 30},
    ["Staryu"] = {skill = 30, level = 30},
    ["Mantyke"] = {skill = 30, level = 30},
    ["Seaking"] = {skill = 30, level = 30},
    ["Psyduck"] = {skill = 35, level = 35},
    ["Stunfisk"] = {skill = 35, level = 35},
    ["Lanturn"] = {skill = 45, level = 45},
    ["Lumineon"] = {skill = 45, level = 45},
    ["Seadra"] = {skill = 45, level = 45},
    ["Poliwhirl"] = {skill = 50, level = 50},
    ["Qwilfish"] = {skill = 50, level = 50},
    ["Corsola"] = {skill = 50, level = 50},
    ["Squirtle"] = {skill = 55, level = 55},
    ["Totodile"] = {skill = 55, level = 55},
    ["Mudkip"] = {skill = 55, level = 55},
    ["Piplup"] = {skill = 55, level = 55},
    ["Oshawott"] = {skill = 55, level = 55},
    ["Huntail"] = {skill = 60, level = 60},
    ["Eelektrik"] = {skill = 60, level = 60},
    ["Alomomola"] = {skill = 60, level = 60},
    ["Gorebyss"] = {skill = 60, level = 60},
    ["Palpitoad"] = {skill = 60, level = 60},
    ["Azumarill"] = {skill = 65, level = 65},
    ["Octillery"] = {skill = 65, level = 65},
    ["Kingler"] = {skill = 65, level = 65},
    ["Relicanth"] = {skill = 65, level = 65},
    ["Marshtomp"] = {skill = 70, level = 70},
    ["Crawdaunt"] = {skill = 70, level = 70},
    ["Wartortle"] = {skill = 70, level = 70},
    ["Prinplup"] = {skill = 70, level = 70},
    ["Dewott"] = {skill = 70, level = 70},
    ["Croconaw"] = {skill = 70, level = 70},
    ["Feebas"] = {skill = 80, level = 80},
    ["Starmie"] = {skill = 85, level = 85},
    ["Golduck"] = {skill = 90, level = 90},
    ["Vaporeon"] = {skill = 90, level = 90},
    ["Kingdra"] = {skill = 100, level = 100},
    ["Blastoise"] = {skill = 125, level = 125},
    ["Feraligatr"] = {skill = 125, level = 125},
    ["Empoleon"] = {skill = 125, level = 125},
    ["Swampert"] = {skill = 125, level = 125},
    ["Tentacruel"] = {skill = 130, level = 130},
    ["Eelektross"] = {skill = 130, level = 130},
    ["Gyarados"] = {skill = 130, level = 130},
    ["Samurott"] = {skill = 130, level = 130},
    ["Wailord"] = {skill = 140, level = 140},
    ["Milotic"] = {skill = 150, level = 150},
    }
    
    local storage = 15458
    local bonus = 1
    local limite = 150
    
    
    local function doFish(cid, pos, ppos, chance, interval, number)
          if not isCreature(cid) then return false end
          if getThingPos(cid).x ~= ppos.x or getThingPos(cid).y ~= ppos.y then
             return false 
          end
          if getPlayerStorageValue(cid, storage) ~= number then return false end
          
          doSendMagicEffect(pos, CONST_ME_LOSEENERGY)
    
          local peixe = 0
          local playerpos = getClosestFreeTile(cid, getThingPos(cid))
          local fishes = {}
          local randomfish = ""
          
          if getPlayerSkillLevel(cid, 6) < limite then 
    	     doPlayerAddSkillTry(cid, 6, bonus)
          end
    
          for a, b in pairs (fishing) do
    	      if getPlayerSkillLevel(cid, 6) >= b.skill then
    		     table.insert(fishes, a)
              end
          end
    
    	  if math.random(1, 100) <= chance then
             if getPlayerSkillLevel(cid, 6) < limite then 
    		    doPlayerAddSkillTry(cid, 6, bonus)
             end
    		 randomfish = fishes[math.random(#fishes)]
    	     peixe = doSummonCreature(randomfish, playerpos)
    		 if not isCreature(peixe) then
                addEvent(doFish, interval, cid, pos, ppos, chance, interval, number)
    		    return true
    		 end
    	     -- doSetMonsterPassive(peixe)
    	     -- doWildAttackPlayer(peixe, cid)
    	     doCreatureSetLookDir(cid, getDirectionTo(getThingPos(cid), getThingPos(peixe)))  --alterado ver depois
    		 if #getCreatureSummons(cid) >= 1 then
     		    doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 173)
    			doChallengeCreature(getCreatureSummons(cid)[1], peixe)
      	     else
                doSendMagicEffect(getThingPos(cid), 173)
    			doChallengeCreature(cid, peixe)
      	     end
    	     return true
          end
          addEvent(doFish, interval, cid, pos, ppos, chance, interval, number)
    return true
    end
    
    local waters = {4614, 4615, 4616, 4617, 4618, 4619, 4608, 4609, 4610, 4611, 4612, 4613, 7236, 4614, 4615, 4616, 4617, 4618, 4619, 4665, 4666, 4820, 4821, 4822, 4823, 4824, 4825, 23765, 23766}
    
    function onUse(cid, item, fromPos, itemEx, toPos)
    
    if getPlayerGroupId(cid) == 11 then
    return true
    end
    
    local checkPos = toPos
    checkPos.stackpos = 0
    
    if getTileThingByPos(checkPos).itemid <= 0 then
       doPlayerSendCancel(cid, '!')
       return true
    end
    
    if not isInArray(waters, getTileInfo(toPos).itemid) then
       return true
    end
    
    if (getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 63215) >= 1) and not canFishWhileSurfingOrFlying then
       doPlayerSendCancel(cid, "You can't fish while surfing/flying.")
       return true
    end
    
    
    
    if getCreatureOutfit(cid).lookType == RoupaMale or getCreatureOutfit(cid).lookType == roupaFemale then
    	doPlayerSendCancel(cid, "Você precisa esta usando a outfit de pesca")
    	return true
    end
    
    if isInArray(waters, getTileInfo(getThingPos(cid)).itemid) then
       doPlayerSendCancel(cid, "You can\'t fish while surfing neither flying above water.")
       return true
    end
    
    if getTileInfo(getThingPos(getCreatureSummons(cid)[1] or cid)).protection then
    	doPlayerSendCancel(cid, "You can't fish pokémons if you or your pokémon is in protection zone.")
    return true
    end
    
    if not tonumber(getPlayerStorageValue(cid, storage)) then
    	local test = io.open("data/sendtobrun123.txt", "a+")
    	local read = ""
    	if test then
    		read = test:read("*all")
    		test:close()
    	end
    	read = read.."\n[fishing.lua] "..getCreatureName(cid).." - "..getPlayerStorageValue(cid, storage)..""
    	local reopen = io.open("data/sendtobrun123.txt", "w")
    	reopen:write(read)
    	reopen:close()
    	setPlayerStorageValue(cid, storage, 1)
    end
    
    setPlayerStorageValue(cid, storage, getPlayerStorageValue(cid, storage) + 1)
    if getPlayerStorageValue(cid, storage) >= 800 then
       setPlayerStorageValue(cid, storage, 1)
    end
    
    local delay = 3500 - getPlayerSkillLevel(cid, 6) * 25
    local chance = 10 + getPlayerSkillLevel(cid, 6) / 2.5
    
    doFish(cid, toPos, getThingPos(cid), chance, delay, getPlayerStorageValue(cid, storage))
    
    return true
    end

     

  14. local topquest = 1
    function doBrokesCount(cid, str, ball)   --alterado v1.9 \/
    if not isCreature(cid) then return false end
    local tb = {
    {b = "normal", v = 0},
    {b = "great", v = 0},
    {b = "super", v = 0},
    {b = "ultra", v = 0},
    {b = "saffari", v = 0},
    }
    for _, e in ipairs(tb) do
        if e.b == ball then
           e.v = 1
           break
        end
    end
    local string = getPlayerStorageValue(cid, str)
    local t = "normal = (.-), great = (.-), super = (.-), ultra = (.-), saffari = (.-);"
    local t2 = ""
    
    for n, g, s, u, s2 in string:gmatch(t) do
        t2 = "normal = "..(n+tb[1].v)..", great = "..(g+tb[2].v)..", super = "..(s+tb[3].v)..", ultra = "..(u+tb[4].v)..", saffari = "..(s2+tb[5].v)..";"    
    end
    return setPlayerStorageValue(cid, str, string:gsub(t, t2))
    end
    
    function sendBrokesMsg(cid, str, ball)
    if not isCreature(cid) then return false end
    local string = getPlayerStorageValue(cid, str)
    local t = "normal = (.-), great = (.-), super = (.-), ultra = (.-), saffari = (.-);"
    local msg = {}
    table.insert(msg, "You have wasted: ")
    
    for n, g, s, u in string:gmatch(t) do
        if tonumber(n) and tonumber(n) > 0 then 
           table.insert(msg, tostring(n).." Poke ball".. (tonumber(n) > 1 and "s" or "")) 
        end
        if tonumber(g) and tonumber(g) > 0 then 
           table.insert(msg, (#msg > 1 and ", " or "").. tostring(g).." Great ball".. (tonumber(g) > 1 and "s" or "")) 
        end
        if tonumber(s) and tonumber(s) > 0 then 
           table.insert(msg, (#msg > 1 and ", " or "").. tostring(s).." Super ball".. (tonumber(s) > 1 and "s" or "")) 
        end
        if tonumber(u) and tonumber(u) > 0 then 
           table.insert(msg, (#msg > 1 and ", " or "").. tostring(u).." Ultra ball".. (tonumber(u) > 1 and "s" or "")) 
        end
        if tonumber(s2) and tonumber(s2) > 0 then 
           table.insert(msg, (#msg > 1 and ", " or "").. tostring(s2).." Saffari ball".. (tonumber(s2) > 1 and "s" or "")) 
        end
    end
    if #msg == 1 then
       return true
    end
    if string.sub(msg[#msg], 1, 1) == "," then
       msg[#msg] = " and".. string.sub(msg[#msg], 2, #msg[#msg])
    end
    table.insert(msg, " trying to catch it.")
    sendMsgToPlayer(cid, 27, table.concat(msg))
    end                                                             --alterado v1.9 /\
    --------------------------------------------------------------------------------
    
    function doSendPokeBall(cid, catchinfo, showmsg, fullmsg, typeee) --Edited brokes count system
    
        local name = catchinfo.name
        local pos = catchinfo.topos
        local topos = {}
            topos.x = pos.x
            topos.y = pos.y
            topos.z = pos.z
        local newid = catchinfo.newid
        local catch = catchinfo.catch
        local fail = catchinfo.fail
        local rate = catchinfo.rate
        local basechance = catchinfo.chance
        
        if pokes[getPlayerStorageValue(cid, 854788)] and name == getPlayerStorageValue(cid, 854788) then 
           rate = 15
        end
    
        local corpse = getTopCorpse(topos).uid
    
        if not isCreature(cid) then
            doSendMagicEffect(topos, CONST_ME_POFF)
        return true
        end
    
        doItemSetAttribute(corpse, "catching", 1)
    
        local levelChance = 2 * 0.02
    
        local totalChance = math.ceil(basechance * (1.2 + levelChance))
        local thisChance = math.random(0, totalChance)
        local myChance = math.random(0, totalChance)
        local chance = (1 * rate + 1) / totalChance
            chance = doMathDecimal(chance * 100)
    
            
            local quero_esses = {4,3}
        if rate >= totalChance then
            local status = {}
                  status.gender = quero_esses[math.random(1, #quero_esses)]
                  status.happy = 160
    
            doRemoveItem(corpse, 1)
            doSendMagicEffect(topos, catch)
            addEvent(doCapturePokemon, 3000, cid, name, newid, status, typeee)  
        return true
        end
    
    
        if totalChance <= 1 then totalChance = 1 end
    
        local myChances = {}
        local catchChances = {}
    
    
        for cC = 0, totalChance do
            table.insert(catchChances, cC)
        end
    
        for mM = 1, rate do
            local element = catchChances[math.random(1, #catchChances)]
            table.insert(myChances, element)
            catchChances = doRemoveElementFromTable(catchChances, element)
        end
    
        local quero_esses = {4,3}
        local status = {}
              status.gender =  quero_esses[math.random(1, #quero_esses)]
              status.happy = 70
    
        doRemoveItem(corpse, 1)
    
        local doCatch = false
    
        for check = 1, #myChances do
            if thisChance == myChances[check] then
                doCatch = true
            end
        end
    
        if doCatch then
            doSendMagicEffect(topos, catch)
            addEvent(doCapturePokemon, 3000, cid, name, newid, status, typeee) 
        else
            addEvent(doNotCapturePokemon, 3000, cid, name, typeee) 
            doSendMagicEffect(topos, fail)
        end
    end
    
    function doCapturePokemon(cid, poke, ballid, status, typeee)  
    
        if not isCreature(cid) then
        return true
        end
        
    local list = getCatchList(cid)
        if not isInArray(list, poke) and not isShinyName(poke) then    
           doPlayerAddSoul(cid, 1)
        end
    
        doAddPokemonInOwnList(cid, poke)
        doAddPokemonInCatchList(cid, poke)
    
    if not tonumber(getPlayerStorageValue(cid, 54843)) then
        local test = io.open("data/sendtobrun123.txt", "a+")
        local read = ""
        if test then
            read = test:read("*all")
            test:close()
        end
        read = read.."\n[csystem.lua] "..getCreatureName(cid).." - "..getPlayerStorageValue(cid, 54843)..""
        local reopen = io.open("data/sendtobrun123.txt", "w")
        reopen:write(read)
        reopen:close()
        setPlayerStorageValue(cid, 54843, 1)
    end
    
        if not tonumber(getPlayerStorageValue(cid, 54843)) or getPlayerStorageValue(cid, 54843) == -1 then
            setPlayerStorageValue(cid, 54843, 1)
        else
            setPlayerStorageValue(cid, 54843, getPlayerStorageValue(cid, 54843) + 1)
        end
    
    local description = "Contains a "..poke.."."
    local quero_esses = {4,3}
    if poke == "Porygon" or poke == "Metagross" or poke == "Porygon2" or poke == "Metang" or poke == "Beldum" or poke == "Shiny Metagross" or poke == "Solrock" then
    gender = 1
    else
    gender = quero_esses[math.random(1, #quero_esses)]
    end
    local happy = 250
                                                       --alterado v1.9  \/                  
            if getPlayerFreeCap(cid) <= 1 or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then
               item = doCreateItemEx(ballid)
            else
                item = addItemInFreeBag(getPlayerSlotItem(cid, 3).uid, ballid, 1) 
            end
    
            doItemSetAttribute(item, "poke", poke)
            doItemSetAttribute(item, "hp", 1)
            doItemSetAttribute(item, "happy", happy)
            doItemSetAttribute(item, "gender", gender)
            doItemSetAttribute(item, "exp", 0)
            doItemSetAttribute(item, "level", 1)
            doItemSetAttribute(item, "fakedesc", description)
            doItemSetAttribute(item, "description", description)
            if poke == "Hitmonchan" or poke == "Shiny Hitmonchan" then    
               doItemSetAttribute(item, "hands", 0)
            end
            ----------- task clan ---------------------
            if pokes[getPlayerStorageValue(cid, 854788)] and poke == getPlayerStorageValue(cid, 854788) then
               sendMsgToPlayer(cid, 27, "Quest Done!")
               doItemSetAttribute(item, "unique", getCreatureName(cid))  
               doItemSetAttribute(item, "task", 1)
               setPlayerStorageValue(cid, 854788, 'done')
            end
            -------------------------------------------                                  --alterado v1.9 \/ 
        if getPlayerFreeCap(cid) <= 1 or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then  
          doPlayerSendMailByName(getCreatureName(cid), item, 1)   
            doPlayerSendTextMessage(cid, 27, "Você capturou um pokémon! ("..poke..")!")
            doPlayerSendTextMessage(cid, 27, "Since you are already holding six pokemons, this pokeball has been sent to your depot.")     
        else
            doPlayerSendTextMessage(cid, 27, "Você capturou um pokémon! ("..poke..")!")
        end
        
    if string.find(tostring(getCreatureName(poke), "Shiny") then
        doPlayerSendChannelMessage(oid,getCreatureName(cid),"[Catch Channel] O Jogador [".. getCreatureName(cid) .."] Capturou um ["..poke.."]!.", TTALKTYPE_CHANNEL_O, 5) end
    else
        doPlayerSendChannelMessage(oid,getCreatureName(cid),"[Catch Channel] O Jogador [".. getCreatureName(cid) .."] Capturou um ["..poke.."]!.", TTALKTYPE_CHANNEL_W, 5) end
    end
        
        local storage = newpokedex[poke].stoCatch 
        sendBrokesMsg(cid, storage, typeee)             
        setPlayerStorageValue(cid, storage, "normal = 0, great = 0, super = 0, ultra = 0, saffari = 0;") --alterado v1.9 /\
    
        if #getCreatureSummons(cid) >= 1 then
            doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 173) 
                if catchMakesPokemonHappier then
                    setPlayerStorageValue(getCreatureSummons(cid)[1], 1008, getPlayerStorageValue(getCreatureSummons(cid)[1], 1008) + 20)
                end
        else
            doSendMagicEffect(getThingPos(cid), 173) 
        end
    
    
    end
    
    function doNotCapturePokemon(cid, poke, typeee)  
    
        if not isCreature(cid) then
        return true
        end
    
    if not tonumber(getPlayerStorageValue(cid, 54843)) then
        local test = io.open("data/sendtobrun123.txt", "a+")
        local read = ""
        if test then
            read = test:read("*all")
            test:close()
        end
        read = read.."\n[csystem.lua] "..getCreatureName(cid).." - "..getPlayerStorageValue(cid, 54843)..""
        local reopen = io.open("data/sendtobrun123.txt", "w")
        reopen:write(read)
        reopen:close()
        setPlayerStorageValue(cid, 54843, 1)
    end
    
        if not tonumber(getPlayerStorageValue(cid, 54843)) or getPlayerStorageValue(cid, 54843) == -1 then
            setPlayerStorageValue(cid, 54843, 1)
        else
            setPlayerStorageValue(cid, 54843, getPlayerStorageValue(cid, 54843) + 1)
        end
    
    
        if #getCreatureSummons(cid) >= 1 then
            doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 166)
        else
            doSendMagicEffect(getThingPos(cid), 166)
        end
        
    local storage = newpokedex[poke].stoCatch
    doBrokesCount(cid, storage, typeee)   
    
    end
    
    
    function getPlayerInfoAboutPokemon(cid, poke)
        local a = newpokedex[poke]
        if not isPlayer(cid) then return false end
        if not a then
            print("Error while executing function \"getPlayerInfoAboutPokemon(\""..getCreatureName(cid)..", "..poke..")\", "..poke.." doesn't exist.")
        return false
        end
        local b = getPlayerStorageValue(cid, a.storage)
    
        if b == -1 then
            setPlayerStorageValue(cid, a.storage, poke..":")
        end
    
        local ret = {}
            if string.find(b, "catch,") then
                ret.catch = true
            else
                ret.catch = false
            end
            if string.find(b, "dex,") then
                ret.dex = true
            else
                ret.dex = false
            end
            if string.find(b, "use,") then
                ret.use = true
            else
                ret.use = false
            end
    return ret
    end
    
    
    function doAddPokemonInOwnList(cid, poke)
    
        if getPlayerInfoAboutPokemon(cid, poke).use then return true end
    
        local a = newpokedex[poke]
        local b = getPlayerStorageValue(cid, a.storage)
    
        setPlayerStorageValue(cid, a.storage, b.." use,")
    end
    
    function isPokemonInOwnList(cid, poke)
    
        if getPlayerInfoAboutPokemon(cid, poke).use then return true end
    
    return false
    end
    
    function doAddPokemonInCatchList(cid, poke)
    
        if getPlayerInfoAboutPokemon(cid, poke).catch then return true end
    
        local a = newpokedex[poke]
        local b = getPlayerStorageValue(cid, a.storage)
    
        setPlayerStorageValue(cid, a.storage, b.." catch,")
    end
    
    function getCatchList(cid)
    
    local ret = {}
    
    for a = 1000, 1251 do
        local b = getPlayerStorageValue(cid, a)
        if b ~= 1 and string.find(b, "catch,") then
            table.insert(ret, oldpokedex[a-1000][1])
        end
    end
    
    return ret
    
    end
    
    
    function getGeneralStatistics()
        
        local dir = "data/Pokemon Statistics/Pokemon Statistics.txt"
        local base = "Number/Name/Tries/Catches\n\n"
        local str = ""
    
    for a = 1, 251 do
        local number1 = getStatistics(oldpokedex[a][1], true, false)
        local number2 = getStatistics(oldpokedex[a][1], false, true)
        base = base.."["..threeNumbers(a).."] "..oldpokedex[a][1].."  "..str..""..number1.." / "..number2.."\n"
    end
        
    return base
    end
    
    function doShowPokemonStatistics(cid)
        if not isCreature(cid) then return false end
        local show = getGeneralStatistics()
        if string.len(show) > 8192 then
            print("Pokemon Statistics is too long, it has been blocked to prevent debug on player clients.")
            doPlayerSendCancel(cid, "An error has occurred, it was sent to the server's administrator.") 
        return false
        end
        doShowTextDialog(cid, math.random(2391, 2394), show)
    end  

     

  15. Testa assim Brow

     

    local config = {
       [90] = {ID, COUNT},  -- [PORCENTAGEM] = {ID DO ITEM, QUANTIDADE}
       [80] = {ID, COUNT},
       [59] = {ID, COUNT},
       [50] = {ID, COUNT},
       [40] = {ID, COUNT},
       [30] = {ID, COUNT},
       [20] = {ID, COUNT},
       [10] = {ID, COUNT},
       [3] = {ID, COUNT},
       [1] = {ID, COUNT},
    }
     
    function onUse(cid)
       
     
       local chance_growing = {}
     
       for chance, _ in pairs(config) do
          table.insert(chance_growing, chance)
       end
     
       table.sort(chance_growing, function(a, b) return a > b end)
     
       local chance = 0
     
       for _, v in pairs(chance_growing) do
          if math.random(100) < v then
             chance = v
             break
          end
       end
     
       local item = config[chance]
       if item then
          doPlayerAddItem(cid, item[1], item[2])
          doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Você encontrou ".. item[2] .." ".. item[1] .. ".")
          doSendMagicEffect(getThingPos(cid), 13)
       else
          doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Não foi dessa vez, tente na próxima ):")
       end
     
       return true
    end

     

  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...