Faisher
Banidos-
Total de itens
35 -
Registro em
-
Última visita
Tudo que Faisher postou
-
Only 2 scripts?
-
hahahhaha my pokemon(pet) system supports level system on pokemon
-
I have better go / back system than yours. In some scripts, your code is unstructured and your conditions cause erroresl
-
talkaction [TalkAction] !speed
tópico respondeu ao renatodaterra de Faisher em Actions e Talkactions
@up: sim -
Well, when I was bored, I was thinking a one script that is an implementation of !online command. This scripts show, each vocation with short vocation value (function getVocShortString(by me)), and sjows how much sorcs, druids, paladins, knight and rookies are online. Here is an image: Change the normal !online script to this one: local config = { showGamemasters = getBooleanFromString(getConfigValue('displayGamemastersWithOnlineCommand')) } function getVocShortString(cid) -- function by Xafterin local string = "" local tabla = { [0] = {"N"}, [1] = {"S"}, [2] = {"D"}, [3] = {"P"}, [4] = {"K"}, [5] = {"MS"}, [6] = {"ED"}, [7] = {"RP"}, [8] = {"EK"} } local p = tabla[getPlayerVocation(cid)] if p then string = p[1] end return string end function onSay(cid, words, param, channel) local players = getPlayersOnline() local strings = {""} local sorc,druid,paladin,knight,rook = 0,0,0,0,0 local i, position = 1, 1 local added = false for _, pid in ipairs(players) do -- Implementacion por Xafterin. if isSorcerer(pid) then sorc = sorc + 1 elseif isDruid(pid) then druid = druid + 1 elseif isPaladin(pid) then paladin = paladin + 1 elseif isKnight(pid) then knight = knight + 1 elseif isRookie(pid) then rook = rook + 1 end --- if(added) then if(i > (position * 7)) then strings[position] = strings[position] .. "," position = position + 1 strings[position] = "" else strings[position] = i == 1 and "" or strings[position] .. ", " end end if((config.showGamemasters or getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES) or not getPlayerCustomFlagValue(pid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) and (not isPlayerGhost(pid) or getPlayerGhostAccess(cid) >= getPlayerGhostAccess(pid))) then strings[position] = strings[position] .. getCreatureName(pid) .. " [" .. getPlayerLevel(pid) .. "][".. getVocShortString(pid) .."]" i = i + 1 added = true else added = false end end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, (i - 1) .. " player(s) online:") for i, str in ipairs(strings) do if(str:sub(str:len()) ~= ",") then str = str .. ". ".. sorc .." sorcerers, ".. druid .." druids, ".. paladin .." paladins, ".. knight .." knights and ".. rook .." rookies." end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, str) end return true end That's all!
-
No problem brunin .
-
I have posted on the other BR forum the same script but more simplified. local pokes = { [1] = {name = Pidgey, health = 100, maxhealth = 100}, [2] = {name = Caterpie, health = 100, maxhealth = 100}, [3] = {name = Rattata, health = 100, maxhealth = 100}, [4] = {name = Weedle, health = 100, maxhealth = 100}, } function onUse(cid, item, frompos, item2, topos) local s = doPlayerAddItem(cid, 2661) local rand = pokes[math.random(1,4)] if getPlayerLevel(cid) >= 5 then if doPlayerRemoveItem(cid,7884,1) then if rand then doItemSetAttribute(s, "poke", "This is ".. rand.name .."'s pokeball. HP = ["..rand.health.."/"..rand.maxhealth.."]") doItemSetAttribute(s, "description", "Contains a ".. rand.name ..".") doSendMagicEffect(topos, 29) doPlayerSendTextMessage(cid,22,"Você ganhou um ".. rand.name ..".") end else doPlayerSendCancel(cid, "You do not have required item.") end else doPlayerSendCancel(cid, "You must have level 5.") end return true end
-
This think it works: -------------------By Nahruto---------------------------- local storage = 20000 ---The Storage That you Check the Steps, The same Storage That The Npc, The Movement and Te Talkation Would Have. local steps = 600 local out = {x=4469, y=4414, z=6} ---------------------------------------------End Config----------------------------------------------------------------------------- function onSay(cid, words, param) inzone = getPlayerStorageValue(cid,storage) left = steps - inzone if param == "steps" then if inzone == -1 then doPlayerSendTextMessage(cid,22,"You Are not In The Safari Zone.") elseif inzone > -1 then doPlayerSendTextMessage(cid,22,"You Have " .. left .. " Steps Left in the Safari Zone.") end end if param == "leave" then if inzone == -1 then doPlayerSendTextMessage(cid,22,"You Are not In The Safari Zone.") elseif inzone > -1 then doTeleportThing(cid,out) doPlayerSendTextMessage(cid,22,"You Have Left the Safari Zone, Come Back Soon.") setPlayerStorageValue(cid,storage,-1) doSendMagicEffect(out,10) end end return 0 end talkactions.xml <talkaction words="!safari" event="script" value="name.lua"/> Commands: !safari steps -- steps information !safari leave -- leave safari
-
It is nice, but I think you can simplify the talkaction commands with params.
-
script ta desestructurado un arreglo function onSay(cid, words, param) function getChockValue(cid) local chock = getPlayerLookDir(cid) local splash = 0 if chock == 0 then splash = doCreateItem(2025, 6, chicken) elseif chock == 1 then splash = doCreateItem(2025, 6, chocken) elseif chock == 2 then splash = doCreateItem(2025, 6, chak) elseif chock == 3 then splash = doCreateItem(2025, 6, chek) end return splash end local shake = math.random(0, 4) if shake == 4 then chicken = getPlayerPosition(cid) chocken = getPlayerPosition(cid) chak = getPlayerPosition(cid) chek = getPlayerPosition(cid) chicken.y = (chicken.y-1) chocken.x = (chocken.x+1) chak.y = (chak.y+1) chek.x = (chek.x-1) if getPlayerSex(cid) == 1 then doSendAnimatedText(getPlayerPosition(cid), "To Gozando!!", TEXTCOLOR_RED) else doSendAnimatedText(getPlayerPosition(cid), "Que Gostosooo!!", TEXTCOLOR_RED) end doDecayItem(getChockValue(cid)) else if getPlayerSex(cid) == 1 then doSendAnimatedText(getPlayerPosition(cid), "Que Gostoso!", TEXTCOLOR_RED) else doSendAnimatedText(getPlayerPosition(cid), "Oooh!", TEXTCOLOR_RED) end doSendAnimatedText(getPlayerPosition(cid), "Sim Puta!", TEXTCOLOR_RED) return 0 end return 0 end
-
Elhe pode cojer pero com creditos
-
Haha sorry I translate spain language to the portugues language with translator
-
Obrigado, mas porque eu tenho que enviar uma mensagem privada a thalia???
-
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 -> Link 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. 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:
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.