Antes de começar, este sistema tem sido feito por Xafterin / KylerXX.
PokeServer equipe do XTibia -> pelas descrições do pokemon.
thalia eu acho que o gerente de projeto.
Strack -> Ajuda para completar o código de registro.
Você precisa baixar um arquivo RAR contendo uma pasta com todas as descrições.
Aqui ->
Quando você descer as descrições de arquivos, conjunto de descrições na pasta "data/actions/scripts" em seu servidor.
Testado em: TFS 0.3.6
Bem, nós data/lib/000-constant.lua [/ b].
E acrescentar o seguinte:
pokestorages = {
[7274] = {"001","Bulbasaur"},
[7275] = {"002","Ivysaur"},
[7276] = {"003","Venusaur"},
[7277] = {"004","Charmander"},
[7278] = {"005","Charmeleon"},
[7279] = {"006","Charizard"},
[7280] = {"007","Squirtle"},
[7281] = {"008","Wartortle"},
[7282] = {"009","Blastoise"},
[7283] = {"010","Caterpie"},
[7284] = {"011","Metapod"},
[7285] = {"012","Butterfree"},
[7286] = {"013","Weedle"},
[7287] = {"014","Kakuna"},
[7288] = {"015","Beedril"},
[7289] = {"016","Pidgey"},
[7290] = {"017","Pidgeotto"},
[7291] = {"018","Pidgeot"},
[7292] = {"019","Rattata"},
[7293] = {"020","Raticate"},
[7294] = {"021","Spearow"},
[7295] = {"022","Fearow"},
[7296] = {"023","Ekans"},
[7297] = {"024","Arbok"},
[7298] = {"025","Pikachu"},
[7299] = {"026","Raichu"},
[7300] = {"027","Sandshrew"},
[7301] = {"028","Sandslash"},
[7302] = {"029","Nidoran(M)"},
[7303] = {"030","Nidorina"},
[7304] = {"031","Nidoquin"},
[7305] = {"032","Nidora(F)"},
[7306] = {"033","Nidorino"},
[7307] = {"034","Nidokin"},
[7308] = {"035","Clefairy"},
[7309] = {"036","Clefable"},
[7310] = {"037","Vulpix"},
[7311] = {"038","Ninetales"},
[7312] = {"039","Jigglypuff"},
[7313] = {"040","Wigglytuff"},
[7314] = {"041","Zubat"},
[7315] = {"042","Golbat"},
[7316] = {"043","Oddish"},
[7317] = {"044","Gloom"},
[7318] = {"045","Vileplume"},
[7319] = {"046","Paras"},
[7320] = {"047","Parasect"},
[7321] = {"048","Venomat"},
[7322] = {"049","Venomoth"},
[7323] = {"050","Diglett"},
[7324] = {"051","Dugtrio"},
[7325] = {"052","Meowth"},
[7326] = {"053","Persian"},
[7327] = {"054","Psyduck"},
[7328] = {"055","Golduck"},
[7329] = {"056","Mankey"},
[7330] = {"057","Primeape"},
[7331] = {"058","Growlithe"},
[7332] = {"059","Arcanine"},
[7333] = {"060","Poliwag"},
[7334] = {"061","Poliwhirl"},
[7335] = {"062","Poliwrath"},
[7336] = {"063","Abra"},
[7337] = {"064","Kadabra"},
[7338] = {"065","Alakazam"},
[7339] = {"066","Machop"},
[7340] = {"067","Machoke"},
[7341] = {"068","Machamp"},
[7342] = {"069","Bellsprout"},
[7343] = {"070","Weepinbell"},
[7344] = {"071","Victreebell"},
[7345] = {"072","Tentacool"},
[7346] = {"073","Tentacruel"},
[7347] = {"074","Geodude"},
[7348] = {"075","Graveler"},
[7349] = {"076","Golem"},
[7350] = {"077","Ponyta"},
[7351] = {"078","Rapidash"},
[7352] = {"079","Slowpoke"},
[7353] = {"080","Slowbro"},
[7354] = {"081","Magnemite"},
[7355] = {"082","Magneton"},
[7356] = {"083","Farfetch'd"},
[7357] = {"084","Doduo"},
[7358] = {"085","Dodrio"},
[7359] = {"086","Seel"},
[7360] = {"087","Dewong"},
[7361] = {"088","Grimer"},
[7362] = {"089","Muk"},
[7363] = {"090","Shellder"},
[7364] = {"091","Cloyster"},
[7365] = {"092","Gastly"},
[7366] = {"093","Haunter"},
[7367] = {"094","Gengar"},
[7368] = {"095","Onix"},
[7369] = {"096","Drowzee"},
[7370] = {"097","Hypno"},
[7371] = {"098","Krabby"},
[7372] = {"099","Kingler"},
[7373] = {"100","Voltorb"},
[7374] = {"101","Electrode"},
[7375] = {"102","Eggxecute"},
[7376] = {"103","Eggxecutor"},
[7377] = {"104","Cubone"},
[7378] = {"105","Marowak"},
[7379] = {"106","Hitmonlee"},
[7380] = {"107","Hitmonchan"},
[7381] = {"108","Likitung"},
[7382] = {"109","Koffing"},
[7383] = {"110","Weezing"},
[7384] = {"111","Rhyhorn"},
[7385] = {"112","Rhydon"},
[7386] = {"113","Chansey"},
[7387] = {"114","Tangela"},
[7388] = {"115","Kangaskhan"},
[7389] = {"116","Horsea"},
[7390] = {"117","Seadra"},
[7391] = {"118","Goldeen"},
[7392] = {"119","Seaking"},
[7393] = {"120","Staryu"},
[7394] = {"121","Starmie"},
[7395] = {"122","Mr.Mime"},
[7396] = {"123","Scyther"},
[7397] = {"124","Jynx"},
[7398] = {"125","Electrabuzz"},
[7399] = {"126","Magmar"},
[7400] = {"127","Pinsir"},
[7401] = {"128","Tauros"},
[7402] = {"129","Magikarp"},
[7403] = {"130","Gyarados"},
[7404] = {"131","Lapras"},
[7405] = {"132","Ditto"},
[7406] = {"133","Eevee"},
[7407] = {"134","Vaporeon"},
[7408] = {"135","Jolteon"},
[7409] = {"136","Flareon"},
[7410] = {"137","Porygon"},
[7411] = {"138","Omanite"},
[7412] = {"139","Omastar"},
[7413] = {"140","Kabuto"},
[7414] = {"141","Kabutops"},
[7415] = {"142","Aerodactyl"},
[7416] = {"143","Snorlax"},
[7417] = {"144","Articuno"},
[7418] = {"145","Zapdos"},
[7419] = {"146","Moltres"},
[7420] = {"147","Dratini"},
[7421] = {"148","Dragonair"},
[7422] = {"149","Dragonite"},
[7423] = {"150","Mewtwo"},
[7424] = {"151","Mew"}
}
pokemons = { -- { number of storage, itemid on click pokedex, number}
["Bulbasaur"] = {7274, 2222, 1},
["Ivysaur"] = {7275, 2435, 2},
["Venusaur"] = {7276, 2222, 3},
["Charmander"] = {7277, 2222, 4},
["Charmeleon"] = {7278, 2222, 5},
["Charizard"] = {7279, 2222, 6},
["Squirtle"] = {7280, 2222, 7},
["Wartortle"] = {7281, 2222, 8},
["Blastoise"] = {7282, 2222, 9},
["Caterpie"] = {7283, 2222, 10},
["Metapod"] = {7284, 2222, 11},
["Butterfree"] = {7285, 2222, 12},
["Weedle"] = {7286, 2222, 13},
["Kakuna"] = {7287, 2222, 14},
["Beedrill"] = {7288, 2222, 15},
["Pidgey"] = {7289, 2222, 16},
["Pidgeotto"] = {7290, 2222, 17},
["Pidgeot"] = {7291, 2222, 18},
["Ratatta"] = {7292, 2222, 19},
["Raticate"] = {7293, 2222, 20},
["Spearow"] = {7294, 2222, 21},
["Fearow"] = {7295, 2222, 22},
["Ekans"] = {7296, 2222, 23},
["Arbok"] = {7297, 2222, 24},
["Pikachu"] = {7298, 2222, 25},
["Raichu"] = {7299, 2222, 26},
["Sandshrew"] = {7300, 2222, 27},
["Sandslash"] = {7301, 2222, 28},
["Nidoran(H)"] = {7302, 2222, 29},
["Nidorina"] = {7303, 2222, 30},
["Nidoqueen"] = {7304, 2222, 31},
["Nidoran(M)"] = {7305, 2222, 32},
["Nidorino"] = {7306, 2222, 33},
["Nidoking"] = {7307, 2222, 34},
["Clefairy"] = {7308, 2222, 35},
["Clefable"] = {7309, 2222, 36},
["Vulpix"] = {7310, 2222, 37},
["Ninetales"] = {7311, 2222, 38},
["Jigglypuff"] = {7312, 2222, 39},
["Wigglytuff"] = {7313, 2222, 40},
["Zubat"] = {7314, 2222, 41},
["Golbat"] = {7315, 2222, 42},
["Oddish"] = {7316, 2222, 43},
["Gloom"] = {7317, 2222, 44},
["Vileplume"] = {7318, 2222, 45},
["Paras"] = {7319, 2222, 46},
["Parasect"] = {7320, 2222, 47},
["Venomat"] = {7321, 2222, 48},
["Venomoth"] = {7322, 2222, 49},
["Diglett"] = {7323, 2222, 50},
["Dugrio"] = {7324, 2222, 51},
["Meowth"] = {7325, 2435, 52},
["Persian"] = {7326, 2222, 53},
["Psyduck"] = {7327, 2222, 54},
["Golduck"] = {7328, 2222, 55},
["Mankey"] = {7329, 2222, 56},
["Primeape"] = {7330, 2222, 57},
["Growlithe"] = {7331, 2222, 58},
["Arcanine"] = {7332, 2222, 59},
["Poliwag"] = {7333, 2222, 60},
["Poliwhirl"] = {7334, 2222, 61},
["Poliwrath"] = {7335, 2222, 62},
["Abra"] = {7336, 2222, 63},
["Kadabra"] = {7337, 2222, 64},
["Alakazam"] = {7338, 2222, 65},
["Machop"] = {7339, 2222, 66},
["Machoke"] = {7340, 2222, 67},
["Machamp"] = {7341, 2222, 68},
["Bellsprout"] = {7342, 2222, 69},
["Weepinbell"] = {7343, 2222, 70},
["Victreebell"] = {7344, 2222, 71},
["Tentacool"] = {7345, 2222, 72},
["Tentracruel"] = {7346, 2222, 72},
["Geodude"] = {7347, 2222, 74},
["Graveler"] = {7348, 2222, 75},
["Golem"] = {7349, 2222, 76},
["Ponyta"] = {7350, 2222, 77},
["Rapidash"] = {7351, 2222, 78},
["Slowpoke"] = {7352, 2222, 79},
["Slowbro"] = {7353, 2222, 80},
["Magnemite"] = {7354, 2222, 81},
["Magneton"] = {7355, 2222, 82},
["Farfetch'd"] = {7356, 2222, 83},
["Doduo"] = {7357, 2222, 84},
["Dodrio"] = {7358, 2222, 85},
["Seel"] = {7359, 2222, 86},
["Dewong"] = {7360, 2222, 87},
["Grimer"] = {7361, 2222, 88},
["Muk"] = {7362, 2222, 89},
["Shellder"] = {7363, 2222, 90},
["Cloyster"] = {7364, 2222, 91},
["Gastly"] = {7365, 2222, 92},
["Haunter"] = {7366, 2222, 93},
["Gengar"] = {7367, 2222, 94},
["Onix"] = {7368, 2222, 95},
["Drowzee"] = {7369, 2222, 96},
["Hypno"] = {7370, 2222, 97},
["Krabby"] = {7371, 2222, 98},
["Kingler"] = {7372, 2222, 99},
["Voltorb"] = {7373, 2222, 100},
["Electrode"] = {7374, 2222, 101},
["Eggxecute"] = {7375, 2435, 102},
["Eggxecutor"] = {7376, 2222, 103},
["Cubone"] = {7377, 2222, 104},
["Marowak"] = {7378, 2222, 105},
["Hitmonlee"] = {7379, 2222, 106},
["Hitmonchan"] = {7380, 2222, 107},
["Likitung"] = {7381, 2222, 108},
["Koffing"] = {7382, 2222, 109},
["Weezing"] = {7383, 2222, 110},
["Rhyhorn"] = {7384, 2222, 111},
["Rhydon"] = {7385, 2222, 112},
["Chansey"] = {7386, 2222, 113},
["Tangela"] = {7387, 2222, 114},
["Kangaskhan"] = {7388, 2222, 115},
["Horsea"] = {7389, 2222, 116},
["Rotworm"] = {7390, 2222, 117},
["Goldeen"] = {7391, 2222, 118},
["Seaking"] = {7392, 2222, 119},
["Staryu"] = {7393, 2222, 120},
["Starmie"] = {7394, 2222, 121},
["Mr.Mime"] = {7395, 2222, 122},
["Scyther"] = {7396, 2222, 123},
["Jynx"] = {7397, 2222, 124},
["Electrabuzz"] = {7398, 2222, 125},
["Magmar"] = {7399, 2222, 126},
["Pinsir"] = {7400, 2222, 127},
["Tauros"] = {7401, 2222, 128},
["Magikarp"] = {7402, 2222, 129},
["Gyarados"] = {7403, 2222, 130},
["Lapras"] = {7404, 2222, 131},
["Ditto"] = {7405, 2222, 132},
["Eevee"] = {7406, 2222, 133},
["Vaporeon"] = {7407, 2222, 134},
["Jolteon"] = {7408, 2222, 135},
["Flareon"] = {7409, 2222, 136},
["Porigon"] = {7410, 2222, 137},
["Omanite"] = {7411, 2222, 138},
["Omastar"] = {7412, 2222, 139},
["Kabuto"] = {7413, 2222, 140},
["Kabutops"] = {7414, 2222, 141},
["Aerodactyl"] = {7415, 2222, 142},
["Snorlax"] = {7416, 2222, 143},
["Articuno"] = {7417, 2222, 144},
["Zapdos"] = {7418, 2222, 145},
["Moltres"] = {7419, 2222, 146},
["Dratini"] = {7420, 2222, 147},
["Dragonair"] = {7421, 2222, 148},
["Dragonite"] = {7422, 2222, 149},
["Mewtwo"] = {7423, 2222, 150},
["Mew"] = {7424, 2222, 151}
}
Bem, explicar os valores da tabela "pokemons" no arquivo 000-constant.lua.
["Mew"] = {7424, 2222, 151}
RED COLOR -> é o storage do voe quando pokemon se cadastra (não alterar, para precuación).
ORANGE COLOR -> O itemid da imagem do portrait.
YELLOW COLOR -> é a descrição de nome de arquivo. (Não modifique). (Não modifique).
Agora vá para "data/actions/scripts" e crie um arquivo chamado "pokedex.lua" e cole isto em:
function addPoke(cid, storage)
setPlayerStorageValue(cid, storage, 1)
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
if not isCreature(itemEx.uid) then
return doPlayerSendCancel(cid, "Invalid action.")
end
local showpokedex = ""
local img = ""
local p = pokemons[getCreatureName(itemEx.uid)]
if p then
img = p[2]
showpokedex = doShowTextDialog(cid, img, io.open('data/actions/scripts/descriptions/'.. p[3] ..'.txt'):read("*all"))
if isMonster(itemEx.uid) then
return getPlayerStorageValue(cid, p[1]) ~= 1 and doPlayerSendTextMessage(cid, 22, "Now you registered ".. getCreatureName(itemEx.uid) .." into pokedex!") and doPlayerSendTextMessage(cid, 22, "You gain ".. p[1]-7300 .." experience!") and doPlayerAddExperience(cid, p[1]-7300) and showpokedex and addPoke(cid, p[1]) or getPlayerStorageValue(cid, p[1]) == 1 and showpokedex
end
end
if getCreatureName(itemEx.uid) == getCreatureName(cid) then
local list = "Pokedex registration: \n"
local pokemonss = 0
for i = 7274,7424 do
if getPlayerStorageValue(cid, i) == 1 then
list = list.."\n[".. pokestorages[i][1] .."] - ".. pokestorages[i][2] ..""
pokemonss = pokemonss + 1
elseif getPlayerStorageValue(cid, i) == -1 then
list = list.."\n[".. pokestorages[i][1] .."] - Uknown pokemon"
end
end
doPlayerSendTextMessage(cid, TALKTYPE_ORANGE_1, "You have ".. pokemonss .." unlocked pokemons.")
doShowTextDialog(cid, item.itemid, "".. list .."\n\nEnd of registration.")
end
return true
end
Você não precisa modificar nada do script pokedex.lua f você não sabe.
en actions.xml adiciona isso:
<action itemid="id of pokedex" event="script" value="name.lua" allowfaruse="1"/>
Ok, agora uma imagem do Pokémon Registration:
















