Ir para conteúdo
  • 0

Pontos ao matar mobs


wenderotpoke

Pergunta

Opaaa... quero uma ajudinha aqui sobre esse assunto... quero que os pontos por matar determinados pokes sejam esses dessa lista


 

Spoiler

            if getPlayerInGolden(getCreatureMaster(cid)) then
                local goldenpoints = 5
                addSurvivalPoints(getCreatureMaster(cid), goldenpoints)
                doPlayerSendTextMessage(getCreatureMaster(cid), 20, "Você ganhou "..goldenpoints.." Survival Points após derrotar o "..getCreatureName(target)..".")
            end

 Em local goldenpoints = 5 

quero que ele pegue os pontos da tabela

Link para o comentário
Compartilhar em outros sites

2 respostass a esta questão

Posts Recomendados

  • 0
10 minutos atrás, wenderotpoke disse:
Versão do Servidor: TFS - 0.3.4
Tipo de Script: creaturescript
Código:
  Ocultar conteúdo


pontoarena = {
["Bulbasaur"] = {point = 5}
["Ivysaur"] = {point = 40}
["Venusaur"] = {point = 85}
["Charmander"] = {point = 5}
["Charmeleon"] = {point = 40}
["Charizard"] = {point = 85}
["Squirtle"] = {point = 5}
["Wartortle"] = {point = 40}
["Blastoise"] = {point = 85}
["Caterpie"] = {point = 5}
["Metapod"] = {point = 15}
["Butterfree"] = {point = 30}
["Weedle"] = {point = 5}
["Kakuna"] = {point = 15}
["Beedrill"] = {point = 30}
["Pidgey"] = {point = 5}
["Pidgeotto"] = {point = 20}
["Pidgeot"] = {point = 75}
["Rattata"] = {point = 5}
["Raticate"] = {point = 60}
["Spearow"] = {point = 10}
["Fearow"] = {point = 50}
["Ekans"] = {point = 15}
["Arbok"] = {point = 35}
["Pikachu"] = {point = 40}
["Raichu"] = {point = 85}
["Sandshrew"] = {point = 20}
["Sandslash"] = {point = 65}
["Nidoran Female"] = {point = 10}
["Nidorina"] = {point = 30}
["Nidoqueen"] = {point = 65}
["Nidoran Male"] = {point = 10}
["Nidorino"] = {point = 30}
["Nidoking"] = {point = 65}
["Clefairy"] = { point = 50}
["Clefable"] = { point = 65}
["Vulpix"] = { point = 15}
["Ninetales"] = { point = 70}
["Jigglypuff"] = { point = 40}
["Wigglytuff"] = { point = 65}
["Zubat"] = {point = 10}
["Golbat"] = {point = 35}
["Oddish"] = {point = 5}
["Gloom"] = {point = 30}
["Vileplume"] = {point = 50}
["Paras"] = {point = 5}
["Parasect"] = {point = 50}
["Venonat"] = {point = 20}
["Venomoth"] = {point = 50}
["Diglett"] = {point = 10}
["Dugtrio"] = {point = 35}
["Meowth"] = {point = 15}
["Persian"] = {point = 30}
["Psyduck"] = {point = 20}
["Golduck"] = {point = 55}
["Mankey"] = {point = 10}
["Primeape"] = {point = 50}
["Growlithe"] = {point = 25}
["Arcanine"] = {point = 80}
["Poliwag"] = {point = 5}
["Poliwhirl"] = {point = 25}
["Poliwrath"] = {point = 65}
["Abra"] = {point = 15}
["Kadabra"] = {point = 45}
["Alakazam"] = {point = 80}
["Machop"] = {point = 20}
["Machoke"] = {point = 45}
["Machamp"] = {point = 80}
["Bellsprout"] = {point = 5}
["Weepinbell"] = {point = 25}
["Victreebel"] = {point = 50}
["Tentacool"] = {point = 15}
["Tentacruel"] = {point = 75}
["Geodude"] = {point = 15}
["Graveler"] = {point = 40}
["Golem"] = {point = 70}
["Ponyta"] = {point = 20}
["Rapidash"] = {point = 50}
["Slowpoke"] = {point = 15}
["Slowbro"] = {point = 45}
["Magnemite"] = {point = 15}
["Magneton"] = {point = 75}
["Magnezone"] = {point = 100}
["Farfetch'd"] = {point = 40}
["Doduo"] = {point = 15}
["Dodrio"] = {point = 45}
["Seel"] = {point = 20}
["Dewgong"] = {point = 65}
["Grimer"] = {point = 15}
["Muk"] = {point = 70}
["Shellder"] = {point = 10}
["Cloyster"] = {point = 60}
["Gastly"] = {point = 20}
["Haunter"] = {point = 45}
["Gengar"] = {point = 80}
["Onix"] = {point = 50}
["Drowzee"] = {point = 25}
["Hypno"] = {point = 55}
["Krabby"] = {point = 10}
["Kingler"] = {point = 40}
["Voltorb"] = {point = 10}
["Electrode"] = {point = 35}
["Exeggcute"] = {point = 10}
["Exeggutor"] = {point = 80}
["Cubone"] = {point = 20}
["Marowak"] = {point = 55}
["Hitmonlee"] = {point = 60}
["Hitmonchan"] = {point = 60}
["Lickitung"] = {point = 55}
["Koffing"] = {point = 15}
["Weezing"] = {point = 35}
["Rhyhorn"] = {point = 30}
["Rhydon"] = {point = 75}
["Chansey"] = {point = 60}
["Tangela"] = {point = 50}
["Kangaskhan"] = {point = 80}
["Horsea"] = {point = 10}
["Seadra"] = {point = 45}
["Goldeen"] = {point = 10}
["Seaking"] = {point = 35}
["Staryu"] = {point = 15}
["Starmie"] = {point = 75}
["Mr. Mime"] = {point = 45}
["Scyther"] = {point = 80}
["Jynx"] = {point = 80}
["Electabuzz"] = {point = 80}
["Magmar"] = {point = 80}
["Pinsir"] = {point = 45}
["Tauros"] = {point = 45}
["Magikarp"] = {point = 5}
["Gyarados"] = {point = 85}
["Lapras"] = {point = 80}
["Ditto"] = {point = 40}
["Eevee"] = {point = 20}
["Vaporeon"] = {point = 55}
["Jolteon"] = {point = 55}
["Flareon"] = {point = 55}
["Porygon"] = {point = 40}
["Omanyte"] = {point = 20}
["Omastar"] = {point = 80}
["Kabuto"] = {point = 20}
["Kabutops"] = {point = 80}
["Aerodactyl"] = {point = 100}
["Snorlax"] = {point = 85}
["Articuno"] = {point = 150}
["Zapdos"] = {point = 150}
["Moltres"] = {point = 150}
["Dratini"] = {point = 20}
["Dragonair"] = {point = 60}
["Dragonite"] = {point = 100}
["Mewtwo"] = {point = 150}
["Mew"] = {point = 150}
["Giant Magikarp"] = {point = 10}


["Shiny Venusaur"] = {point = 100}
["Shiny Charizard"] = {point = 100}
["Shiny Blastoise"] = {point = 100}
["Shiny Butterfree"] = {point = 60}
["Shiny Beedrill"] = {point = 60}
["Shiny Pidgeot"] = {point = 100}
["Shiny Rattata"] = {point = 10}
["Shiny Raticate"] = {point = 60}
["Shiny Fearow"] = {point = 100}
["Shiny Raichu"] = {point = 100}
["Shiny Nidoking"] = {point = 100}
["Shiny Zubat"] = {point = 10}
["Shiny Golbat"] = {point = 60}
["Shiny Oddish"] = {point = 10}
["Shiny Vileplume"] = {point = 100}
["Shiny Paras"] = {point = 10}
["Shiny Parasect"] = {point = 60}
["Shiny Venonat"] = {point = 30}
["Shiny Venomoth"] = {point = 80}
["Shiny Growlithe"] = {point = 35}
["Shiny Arcanine"] = {point = 100}
["Shiny Abra"] = {point = 80}
["Shiny Alakazam"] = {point = 100}
["Shiny Tentacool"] = {point = 25}
["Shiny Tentacruel"] = {point = 100}
["Shiny Golem"] = {point = 100}
["Shiny Farfetch'd"] = {point = 100}
["Shiny Grimer"] = {point = 25}
["Shiny Muk"] = {point = 100}
["Shiny Gengar"] = {point = 100}
["Shiny Onix"] = {point = 100}
["Shiny Hypno"] = {point = 100}
["Shiny Krabby"] = {point = 15}
["Shiny Kingler"] = {point = 60}
["Shiny Voltorb"] = {point = 25}
["Shiny Electrode"] = {point = 80}
["Shiny Cubone"] = {point = 30}
["Shiny Marowak"] = {point = 100}
["Shiny Hitmonlee"] = {point = 100}
["Shiny Hitmonchan"] = {point = 100}
["Shiny Tangela"] = {point = 100}
["Shiny Horsea"] = {point = 15}
["Shiny Seadra"] = {point = 60}
["Shiny Scyther"] = {point = 100}
["Shiny Jynx"] = {point = 100}
["Shiny Electabuzz"] = {point = 100}
["Shiny Pinsir"] = {point = 100}
["Shiny Magikarp"] = {point = 10}
["Shiny Gyarados"] = {point = 120}
["Shiny Vaporeon"] = {point = 100}
["Shiny Jolteon"] = {point = 100}
["Shiny Flareon"] = {point = 100}
["Shiny Snorlax"] = {point = 120}
["Shiny Dratini"] = {point = 25}
["Shiny Dragonair"] = {point = 100}
["Shiny Dragonite"] = {point = 120}

["Chikorita"] = {point = 20}
["Bayleef"] = {point = 40}
["Meganium"] = {point = 85}
["Cyndaquil"] = {point = 20}
["Quilava"] = {point = 40}
["Typhlosion"] = {point = 85}
["Totodile"] = {point = 20}
["Croconaw"] = {point = 40}
["Feraligatr"] = {point = 85}
["Sentret"] = {point = 15}
["Furret"] = {point = 35}
["Hoothoot"] = {point = 20}
["Noctowl"] = {point = 65}
["Ledyba"] = {point = 15}
["Ledian"] = {point = 35}
["Spinarak"] = {point = 10}
["Ariados"] = {point = 40}
["Crobat"] = {point = 60}
["Chinchou"] = {point = 15}
["Lanturn"] = {point = 50}
["Pichu"] = {point = 20}
["Cleffa"] = {point = 20}
["Igglybuff"] = {point = 20}
["Togepi"] = {point = 5}
["Togetic"] = {point = 60}
["Natu"] = {point = 25}
["Xatu"] = {point = 75}
["Mareep"] = {point = 20}
["Flaaffy"] = {point = 40}
["Ampharos"] = {point = 85}
["Bellossom"] = {point = 50}
["Marill"] = {point = 20}
["Azumarill"] = {point = 65}
["Sudowoodo"] = {point = 80}
["Politoed"] = {point = 65}
["Hoppip"] = {point = 5}
["Skiploom"] = {point = 25}
["Jumpluff"] = {point = 50}
["Aipom"] = {point = 40}
["Sunkern"] = {point = 5}
["Sunflora"] = {point = 30}
["Yanma"] = {point = 50}
["Wooper"] = {point = 20}
["Quagsire"] = {point = 65}
["Espeon"] = {point = 55}
["Umbreon"] = {point = 55}
["Murkrow"] = {point = 55}
["Slowking"] = {point = 100}
["Misdreavus"] = {point = 80}
["Unown"] = {point = 100}
["Wobbuffet"] = {point = 80}
["Girafarig"] = {point = 80}
["Pineco"] = {point = 15}
["Forretress"] = {point = 65}
["Dunsparce"] = {point = 30}
["Gligar"] = {point = 40}
["Steelix"] = {point = 100}
["Snubbull"] = { point = 30}
["Granbull"] = { point = 65}
["Qwilfish"] = {point = 55}
["Scizor"] = {point = 100}
["Shuckle"] = {point = 30}
["Heracross"] = {point = 80}
["Sneasel"] = {point = 55}
["Teddiursa"] = {point = 20}
["Ursaring"] = {point = 90}
["Slugma"] = {point = 15}
["Magcargo"] = {point = 60}
["Swinub"] = {point = 15}
["Piloswine"] = {point = 80}
["Corsola"] = { point = 50}
["Remoraid"] = {point = 10}
["Octillery"] = {point = 70}
["Delibird"] = {point = 40}
["Mantine"] = {point = 80}
["Skarmory"] = {point = 85}
["Houndour"] = {point = 50}
["Houndoom"] = {point = 80}
["Kingdra"] = {point = 90}
["Phanpy"] = {point = 20}
["Donphan"] = {point = 80}
["Porygon2"] = {point = 75}
["Stantler"] = {point = 55}
["Tyrogue"] = {point = 30}
["Hitmontop"] = {point = 60}
["Smoochum"] = {point = 30}
["Elekid"] = {point = 30}
["Magby"] = {point = 30}
["Miltank"] = {point = 80}
["Blissey"] = {point = 100}
["Raikou"] = {point = 150}
["Entei"] = {point = 150}
["Suicune"] = {point = 150}
["Larvitar"] = {point = 20}
["Pupitar"] = {point = 65}
["Tyranitar"] = {point = 100}
["Lugia"] = {point = 150}
["Ho-oh"] = {point = 150}
["Celebi"] = {point = 150}

["Shiny Hitmontop"] = {point = 100}
["Shiny Mr. Mime"] = {point = 150}
["Shiny Rhydon"] = {point = 150}
["Shiny Ninetales"] = { point = 150}
["Shiny Ariados"] = {point = 150}
["Shiny Magneton"] = {point = 150}
["Shiny Espeon"] = {point = 150}
["Shiny Politoed"] = {point = 150}
["Shiny Umbreon"] = {point = 150}
["Shiny Stantler"] = {point = 150}
["Shiny Dodrio"] = {point = 150}
["Shiny Weezing"] = {point = 100}
["Shiny Sandslash"] = {point = 100}
["Shiny Crobat"] = {point = 100}
["Shiny Magmar"] = {point = 100}
["Shiny Giant Magikarp"] = {point = 100}
["Shiny Ampharos"] = {point = 100}
["Shiny Feraligatr"] = {point = 100}
["Shiny Machamp"] = {point = 100}
["Shiny Meganium"] = {point = 100}
["Shiny Larvitar"] = {point = 60}
["Shiny Pupitar"] = {point = 100}
["Shiny Tauros"] = {point = 100}
["Shiny Typhlosion"] = {point = 100}
["Shiny Xatu"] = {point = 100}
["Shiny Ditto"] = {point = 100}

["Shiny Magcargo"] = {point = 100}
["Shiny Lanturn"] = {point = 100}
["Shiny Magmortar"] = {point = 150}
["Shiny Electivire"] = {point = 150}
["Magmortar"] = {point = 100}
["Electivire"] = {point = 100}
["Shiny Mantine"] = {point = 150}
["Salamence"] = {point = 120}
["Shiny Salamence"] = {point = 150}
["Milotic"] = {point = 150}
["Tropius"] = {point = 90}
["Absol"] = {point = 130}
["Wailord"] = {point = 150}
["Beldum"] = {point = 25}
["Metang"] = {point = 80}
["Metagross"] = {point = 150}
["Shiny Arbok"] = {point = 150}
["Shiny Bulbasaur"] = {point = 150}
["Shiny Caterpie"] = {point = 150}
["Shiny Chansey"] = {point = 150}
["Shiny Charmander"] = {point = 150}
["Shiny Charmeleon"] = {point = 150}
["Shiny Clefable"] = {point = 150}
["Shiny Clefairy"] = {point = 150}
["Shiny Cleffa"] = {point = 150}
["Shiny Cloyster"] = {point = 150}
["Shiny Dewgong"] = {point = 150}
["Shiny Diglett"] = {point = 150}
["Shiny Doduo"] = {point = 150}
["Shiny Drowzee"] = {point = 150}
["Shiny Dugtrio"] = {point = 150}
["Shiny Ekans"] = {point = 150}
["Shiny Elekid"] = {point = 150}
["Shiny Exeggcute"] = {point = 150}
["Shiny Exeggutor"] = {point = 150}
["Shiny Gastly"] = {point = 150}
["Shiny Geodude"] = {point = 150}
["Shiny Gloom"] = {point = 150}
["Shiny Goldeen"] = {point = 150}
["Shiny Golduck"] = {point = 150}
["Shiny Graveler"] = {point = 150}
["Shiny Haunter"] = {point = 150}
["Shiny Igglybuff"] = {point = 150}
["Shiny Ivysaur"] = {point = 150}
["Shiny Jigglypuff"] = {point = 150}
["Shiny Kakuna"] = {point = 150}
["Shiny Koffing"] = {point = 150}
["Shiny Lickitung"] = {point = 150}
["Shiny Machoke"] = {point = 150}
["Shiny Machop"] = {point = 150}
["Shiny Magnemite"] = {point = 150}
["Shiny Mankey"] = {point = 150}
["Shiny Meowth"] = {point = 150}
["Shiny Metapod"] = {point = 150}
["Shiny Nidoran Female"] = {point = 150}
["Shiny Nidoran Male"] = {point = 150}
["Shiny Nidorina"] = {point = 150}
["Shiny Nidorino"] = {point = 150}
["Shiny Pidgeotto"] = {point = 150}
["Shiny Pidgey"] = {point = 150}
["Shiny Pikachu"] = {point = 150}
["Shiny Poliwag"] = {point = 150}
["Shiny Poliwhirl"] = {point = 150}
["Shiny Poliwrath"] = {point = 150}
["Shiny Ponyta"] = {point = 150}
["Shiny Porygon"] = {point = 150}
["Shiny Psyduck"] = {point = 150}
["Shiny Rapidash"] = {point = 150}
["Shiny Rhyhorn"] = {point = 150}
["Shiny Sandshrew"] = {point = 150}
["Shiny Sandslash"] = {point = 150}
["Shiny Seaking"] = {point = 150}
["Shiny Seel"] = {point = 150}
["Shiny Shellder"] = {point = 150}
["Shiny Slowbro"] = {point = 150}
["Shiny Slowpoke"] = {point = 150}
["Shiny Spearow"] = {point = 150}
["Shiny Squirtle"] = {point = 150}
["Shiny Starmie"] = {point = 150}
["Shiny Staryu"] = {point = 150}
["Shiny Victreebel"] = {point = 150}
["Shiny Vulpix"] = {point = 150}
["Shiny Wartortle"] = {point = 150}
["Shiny Weedle"] = {point = 150}
["Shiny Weepinbell"] = {point = 150}
["Shiny Wigglytuff"] = {point = 150}
["Shiny Scizor"] = { point = 2}
["Shiny Kabutops"] = { point = 2}

-- 3 GENERATION POKEMON --
["Treecko"] = {point = 20}
["Grovyle"] = {point = 40}
["Sceptile"] = {point = 80}
["Mudkip"] = {point = 20}
["Marshtomp"] = {point = 40}
["Swampert"] = {point = 80}
["Torchic"] = {point = 20}
["Combusken"] = {point = 40}
["Blaziken"] = {point = 80}
["Poochyena"] = {point = 20}
["Mightyena"] = {point = 80}
["Zigzagoon"] = {point = 20}
["Linoone"] = {point = 40}
["Wurmple"] = {point = 10}
["Silcoon"] = {point = 25}
["Cascoon"] = {point = 25}
["Beautifly"] = {point = 60}
["Dustox"] = {point = 60}
["Lotad"] = {point = 20}
["Lombre"] = {point = 40}
["Ludicolo"] = {point = 80}
["Seedot"] = {point = 20}
["Nuzleaf"] = {point = 40}
["Shiftry"] = {point = 80}
["Nincada"] = {point = 20}
["Ninjask"] = {point = 100}
["Shedinja"] = {point = 60}
["Taillow"] = {point = 20}
["Swellow"] = {point = 80}
["Shroomish"] = {point = 20}
["Breloom"] = {point = 80}
["Spinda"] = {point = 30}
["Wingull"] = {point = 20}
["Pelipper"] = {point = 80}
["Surskit"] = {point = 20 23}
["Masquerain"] = {point = 80}
["Wailmer"] = {point = 80}
["Skitty"] = {point = 20}
["Delcatty"] = {point = 80}
["Baltoy"] = {point = 20}
["Claydol"] = {point = 80}
["Torkoal"] = {point = 80}
["Barboach"] = {point = 20}
["Whiscash"] = {point = 60}
["Luvdisc"] = {point = 20}
["Corphish"] = {point = 20}
["Crawdaunt"] = {point = 80}
["Feebas"] = {point = 20}
["Carvanha"] = {point = 20}
["Sharpedo"] = {point = 60}
["Trapinch"] = {point = 20}
["Vibrava"] = {point = 40}
["Flygon"] = {point = 80}
["Makuhita"] = {point = 20}
["Hariyama"] = {point = 80}
["Electrike"] = {point = 20}
["Manectric"] = {point = 80}
["Numel"] = {point = 25}
["Camerupt"] = {point = 80}
["Spheal"] = {point = 30}
["Sealeo"] = {point = 60}
["Walrein"] = {point = 85}
["Cacnea"] = {point = 20}
["Cacturn"] = {point = 80}
["Snorunt"] = {point = 30}
["Glalie"] = {point = 80}
["Spoink"] = {point = 20}
["Grumpig"] = {point = 80}
["Plusle"] = {point = 30}
["Minun"] = {point = 30}
["Mawile"] = {point = 80}
["Meditite"] = {point = 30}
["Medicham"] = {point = 80}
["Swablu"] = {point = 30}
["Duskull"] = {point = 40}
["Dusclops"] = {point = 70}
["Budew"] = {point = 10}
["Roselia"] = {point = 30}
["Roserade"] = {point = 80}
["Slakoth"] = {point = 20}
["Vigoroth"] = {point = 40}
["Gulpin"] = {point = 30}
["Swalot"] = {point = 80}
["Whismur"] = {point = 20}
["Loudred"] = {point = 50}
["Exploud"] = {point = 80}
["Clamperl"] = {point = 20}
["Huntail"] = {point = 60}
["Gorebyss"] = {point = 60}
["Shuppet"] = {point = 30}
["Banette"] = {point = 70}
["Seviper"] = {point = 80}
["Zangoose"] = {point = 80}
["Relicanth"] = {point = 60}
["Aron"] = {point = 30}
["Lairon"] = {point = 60}
["Aggron"] = {point = 100}
["Volbeat"] = {point = 40}
["Illumise"] = {point = 40}
["Lileep"] = {point = 20}
["Anorith"] = {point = 20}
["Ralts"] = {point = 20 90}
["Kirlia"] = {point = 60}
["Bagon"] = {point = 20}
["Shelgon"] = {point = 60}
["Beldum"] = {point = 20}
["Metang"] = {point = 60}
["Kecleon"] = {point = 80}
["Lunatone"] = {point = 150}
["Solrock"] = {point = 150}
["Castform"] = {point = 80}
["Cradily"] = {point = 80}
["Altaria"] = {point = 80}
["Armaldo"] = {point = 80}
["Gardevoir"] = {point = 80}
["Tropius"] = {point = 100}
["Slaking"] = {point = 150}
["Absol"] = {point = 150}
["Metagross"] = {point = 150}
["Salamence"] = {point = 150}
["Marill"] = {point = 20}
["Smeargle 1"] = {point = 10}
["Smeargle 2"] = {point = 20}
["Smeargle 3"] = {point = 30}
["Smeargle 4"] = {point = 40}
["Smeargle 5"] = {point = 50}
["Smeargle 6"] = {point = 60}
["Smeargle 7"] = {point = 70}
["Smeargle 8"] = {point = 80}
["Smeargle"] = {point = 10}
["Sunny Castform"] = {point = 80}
["Rainy Castform"] = {point = 80}
["Snowy Castform"] = {point = 80}
["Wynaut"] = {point = 30}
["Sableye"] = {point = 80}
["Lucario"] = {point = 80}

["Shiny Lucario"] = {point = 120}
["Shiny Tyranitar"] = {point = 100}
["Shiny Sudowoodo"] = {point = 100}
["Shiny Steelix"] = {point = 100}
["Shiny Skarmory"] = {point = 100}
["Shiny Salamence"] = {point = 100}
["Shiny Magmortar"] = {point = 100}
["Shiny Electivire"] = {point = 100}
["Shiny Scizor"] = {point = 100}
}

Opaaa... quero uma ajudinha aqui sobre esse assunto... quero que os pontos por matar determinados pokes sejam esses dessa lista


 

  Ocultar conteúdo

            if getPlayerInGolden(getCreatureMaster(cid)) then
                local goldenpoints = 5
                addSurvivalPoints(getCreatureMaster(cid), goldenpoints)
                doPlayerSendTextMessage(getCreatureMaster(cid), 20, "Você ganhou "..goldenpoints.." Survival Points após derrotar o "..getCreatureName(target)..".")
            end

 Em local goldenpoints = 5 

quero que ele pegue os pontos da tabela

 

 

 

mande os scripts todos para pode ajudar

Link para o comentário
Compartilhar em outros sites

  • 0
6 horas atrás, Poke X Ice disse:

 

 

 

mande os scripts todos para pode ajudar

Mano o código onde está essa função é grande.... a edição para os pontos é só nessa parte mas... por via das duvidas OK
 

Spoiler

local function checkTaskByDrazyn(cid, target)
    for a, b in pairs(taskStorages) do
        if getPlayerStorageValue(cid, b) ~= -1 and getPlayerStorageValue(cid, b) ~= 1 then
            local tab = string.explode(getPlayerStorageValue(cid, b), "|")
            
            local count = 0
            local cont = false
            local str = {}
            local str1 = {}
            local expe = {}
            
            for a, b in pairs(tab) do
                if b:find(target) then
                    cont = true
                    count = a
                end
            end
            
            if cont then
                cont = true
                for i = 2, #tab do
                    expe = tab:explode(",")
                    if (tonumber(expe[2]) - 1) > 0 then
                        if i == count then
                            table.insert(str, {expe[1], tonumber(expe[2])- 1})
                            if (tonumber(expe[2])- 1) > 0 then
                                cont = false
                            end
                        else
                            table.insert(str, {expe[1], tonumber(expe[2])})
                            cont = false
                        end
                    end
                    
                    if i == count then
                        if (expe[2] - 1) > 0 then
                            table.insert(str1, (tonumber(expe[2]) - 1) .." "..expe[1]..((tonumber(expe[2]) - 1) > 1 and "s" or ""))
                        end
                    else
                        if (expe[2] - 1) > 0 then
                            table.insert(str1, expe[2].." "..expe[1]..(tonumber(expe[2]) > 1 and "s" or ""))
                        end
                    end
                end
                
                --[[local skills = string.explode(tab[2], "/")
                skills[1] = tonumber(skills[1]) + 1    ]]
                if cont then
                    doPlayerSendTextMessage(cid, 20, tab[1]..": Parabéns! Você terminou a minha task.")
                else
                    doPlayerSendTextMessage(cid, 20, tab[1]..": Está faltando você matar "..doConcatTable(str1, ", ", " e ")..".")
                end
                local str2 = {}
                for a, b in pairs(str) do
                    table.insert(str2, table.concat(b, ",").."|")
                end
                
                setPlayerStorageValue(cid, b, tab[1].."|"..table.concat(str2))
                
            end
            
        end
    end
end

local stoneEffect = {
    ["fire stone"] = 268,
    ["water stone"] = 269,
    ["leaf stone"] = 270,
    ["heart stone"] = 271,
    ["thunder stone"] = 272,
    ["venom stone"] = 273,
    ["enigma stone"] = 962, -- 274 (shiny stone)
    ["rock stone"] = 275,
    ["earth stone"] = 276,
    ["ice stone"] = 277,
    ["darkness stone"] = 278,
    ["punch stone"] = 279,
    ["coccon stone"] = 280,
    ["metal stone"] = 281,
    ["ancient stone"] = 282,
    ["crystal stone"] = 283, -- antiga crystal stone
    ["feather stone"] = 284,
    ["shiny stone"] = 285,
}

function doSendLootChannel(cid, itemid, poke)
    if isStone(itemid) or isFrag(itemid) or isRare(itemid) then
        for _, oid in ipairs(getPlayersOnline()) do
            doPlayerSendChannelMessage(oid, "Loot System", "O jogador [".. getCreatureName(cid) .."] matou um "..poke.." e dropou um ".. getItemNameById(itemid) ..".", TALKTYPE_CHANNEL_W, 12)
        end    
    end
end

local function doCorpseAddLoot(name, item, cid, target) -- essa func j?? vai ajudar em um held, luck.
    
    if cid == target then 
        doItemSetAttribute(item, "corpseowner", "asçdlkasçldkaçslkdçaskdçaslkdçlsakdçkaslç")
        return true 
    end
    
    local lootList = getMonsterLootList(name)
    local isStoneDroped = false
    name = doCorrectString(name)
    local pokeName = name
    local megaID, megaName = "", ""
    local lootListNow = {}
    local oldLootList = {}
    local oldChance = 0
    local stringLucky = ""
    local id, count, chance = 0,0,0
    local percent = 0
    local str, vir = string.format("Loot from %s: ", name), 0
    
    if isMega(target) then
        if name == "Charizard" then
            megaID = getPlayerStorageValue(target, storages.isMegaID)
        end
        megaName = "Mega " .. name .. (megaID ~= "" and " " .. megaID or "")
        str = "Loot from " .. megaName .. ": "
        pokeName = megaName
        local t = {id = megasConf[megaName].itemToDrop, count = 1, chance = 32} -- 32 oficial, 50 durante o beta. 50 = 10% ((chance*2)/10)
        table.insert(lootList, t)
    end
    
    local luckyItems, NormalItems = {}, {}
    
    for a, loot in pairs(lootList) do
        
        heldx = getItemAttribute(getPlayerSlotItem(getCreatureMaster(cid), 8).uid, "xHeldItem") or ""    
        
        if isNpc(cid) then
            heldx = getItemAttribute(getPlayerSlotItem(getNpcMaster(cid), 8).uid, "xHeldItem") or ""
        elseif isSummon(cid) then
            heldx = getItemAttribute(getPlayerSlotItem(getCreatureMaster(cid), 8).uid, "xHeldItem") or ""
        end
        
        local heldName = string.explode(heldx, "|")[1] or ""
        local heldTier = string.explode(heldx, "|")[2] or ""

        itemid = loot.id
        Itemchance = loot.chance * 2
        
        if isStone(itemid) then
            Itemchance = Itemchance * rateStone    
        elseif isFrag(itemid) then
            Itemchance = Itemchance * rateFrag
        else
            Itemchance = Itemchance * rateLoot
        end
        
            if heldx and heldName == "X-Lucky" then
                local chance = Itemchance * heldLucky[tonumber(heldTier)]
                if math.random(1, 100) <= chance then
                    if Itemchance >= math.random(1, 1000) then
                    lootCount = math.random(1, loot.count) * heldLucky[tonumber(heldTier)] / 1000
                
                        if isStone(itemid) then
                            isStoneDroped = true
                            local posCorpse = getThingPos(item)
                            posCorpse.x = posCorpse.x +1
                            doSendMagicEffect(posCorpse, stoneEffect[getItemNameById(itemid):lower()])
                            posCorpse.y = posCorpse.y +1
                            addEvent(doSendMagicEffect, 2000, posCorpse, 285)    
                            doSendLootChannel(cid, itemid, name)
                        elseif isToken(itemid) then
                            local posCorpse = getThingPos(item)
                            posCorpse.x = posCorpse.x +1
                            doSendMagicEffect(posCorpse, 963) -- token effect
                            posCorpse.y = posCorpse.y +1
                            addEvent(doSendMagicEffect, 2000, posCorpse, 285)    
                            doSendLootChannel(cid, itemid, name)        
                        elseif isFrag(itemid) then
                            local posCorpse = getThingPos(item)
                            posCorpse.x = posCorpse.x +1
                            doSendMagicEffect(posCorpse, 964) -- frag effect
                            posCorpse.y = posCorpse.y +1
                            addEvent(doSendMagicEffect, 2000, posCorpse, 285)    
                            doSendLootChannel(cid, itemid, name)    
                        elseif isRare(itemid) then
                            local posCorpse = getThingPos(item)
                            posCorpse.x = posCorpse.x +1
                            doSendMagicEffect(posCorpse, stoneEffect[getItemNameById(itemid):lower()])
                            posCorpse.y = posCorpse.y +1
                            addEvent(doSendMagicEffect, 2000, posCorpse, 285)        
                            doSendLootChannel(cid, itemid, name)                        
                        end 
                        
                        if item then
                            doAddContainerItem(item, itemid, lootCount)
                        end
                        
                        local lootStringCount = ""
                        
                        if (lootCount > 1) then
                            lootStringCount = string.format(" (%s)",lootCount)
                        end    
                        
                        table.insert(luckyItems, string.format("%s%s", getItemNameById(itemid), lootStringCount))
                    end
                end
            end

        
        if Itemchance >= math.random(1, 1000) then
            lootCount = math.random(1, loot.count)
            if isStone(itemid) then
                isStoneDroped = true
                local posCorpse = getThingPos(item)
                posCorpse.x = posCorpse.x +1
                doSendMagicEffect(posCorpse, stoneEffect[getItemNameById(itemid):lower()])
                posCorpse.y = posCorpse.y +1
                addEvent(doSendMagicEffect, 2000, posCorpse, 285)        
                doSendLootChannel(cid, itemid, name)                
            elseif isToken(itemid) then
                local posCorpse = getThingPos(item)
                posCorpse.x = posCorpse.x +1
                doSendMagicEffect(posCorpse, 963) -- token effect
                posCorpse.y = posCorpse.y +1
                addEvent(doSendMagicEffect, 2000, posCorpse, 285)    
                doSendLootChannel(cid, itemid, name)        
            elseif isFrag(itemid) then
                local posCorpse = getThingPos(item)
                posCorpse.x = posCorpse.x +1
                doSendMagicEffect(posCorpse, 964) -- frag effect
                posCorpse.y = posCorpse.y +1
                addEvent(doSendMagicEffect, 2000, posCorpse, 285)    
                doSendLootChannel(cid, itemid, name)    
            elseif isRare(itemid) then
                local posCorpse = getThingPos(item)
                posCorpse.x = posCorpse.x +1
                doSendMagicEffect(posCorpse, stoneEffect[getItemNameById(itemid):lower()])
                posCorpse.y = posCorpse.y +1
                addEvent(doSendMagicEffect, 2000, posCorpse, 285)        
                doSendLootChannel(cid, itemid, name)                            
            end 
            
            if item then
                doAddContainerItem(item, itemid, lootCount)    
            end
            
            local lootStringCount = ""
            
            if (lootCount > 1) then
                lootStringCount = string.format(" (%s)", lootCount)
            end
            
            table.insert(NormalItems, getItemNameById(itemid)..lootStringCount)            
        end
    end
    
    if #NormalItems == 0 and #luckyItems == 0 then
        str = str .. "Nothing."
    else
        if #NormalItems > 0 then
            str = str.. doConcatTable(NormalItems, ", ", " and ")..". "
        end
        
        if #luckyItems > 0 then
            str = str.. "\nLucky Items: "..doConcatTable(luckyItems, ", ", " and ").."."
        end
    end            
    
    if getExpByMoreDano(target) == true then
        return true
    end
    
    local players = string.explode(getExpByMoreDano(target), "|")
    local xp = getPokemonExperienceD(name) * (isHoenn(name) and 1.30 or 1) / 2 -- 2 por causa da nova formula de xp.
    local maiorPercent = 0
    local playerWinner = ""
    
    if players ~= nil then    
        for i = 1, #players do
            local name = string.explode(players, "/")[1] or ""
            local percent = tonumber(string.explode(players, "/")[2]) or ""
            if percent > maiorPercent then
                playerWinner = name
                maiorPercent = percent
            end
        --    if #players > 1 and percent >= 1000 then
            --    percent = 100 / tonumber(#players)
        --    end
            if #players == 1 then -- caso so um player matou o bixo
                percent = 100
            end
            local player = getPlayerByName(name)
            playerAddExp1(player, math.ceil(percent * xp / 100))
        end
    end
    
    local pWinnerLoot = getPlayerByName(playerWinner)    
    if isCreature(pWinnerLoot) then
        --checkDirias(pWinnerLoot, pokeName)
        doItemSetAttribute(item, "corpseowner", playerWinner)
        doItemSetAttribute(item, "aid", 43242)
        
        local loot = str .. (str == "Loot from ".. name .. ": " and "Nothing." or "")
        doPlayerSendTextMessage(pWinnerLoot, MESSAGE_INFO_DESCR, loot)
        if isStoneDroped then
            doSendMagicEffect(getThingPos(pWinnerLoot), 173, pWinnerLoot)
        end
    end
end

function getPlayerStage(cid)
    local lvl = getPlayerLevel(cid)
    if lvl <= 50 then
        mult = 3.0
    elseif lvl >= 51 and lvl < 100 then
        mult = 5.0
    elseif lvl >= 100 and lvl < 300 then
        mult = 10.0                                    
    else 
        mult = 15.0
    end
    return mult
end

function getPlayerExperienceToThis(cid, exp, hasDamaged)
    local experience = exp * getPlayerStage(cid)
    experience = experience + (experience * getPlayerTotalExtraExperience(cid))
    if hasDamaged then
        local heldx = getItemAttribute(getPlayerSlotItem(getCreatureMaster(cid), 8).uid, "xHeldItem")
        local heldExp = 0
        if heldx then
            local heldName, heldTier = string.explode(heldx, "|")[1] or "", string.explode(heldx, "|")[2] or ""
            if heldName == "X-Experience" then -- dar mais experiencia
                heldExp = heldExperience[tonumber(heldTier)]
            end
        end
        experience = experience + ((exp * getPlayerStage(cid)) * heldExp)
    end
    return math.floor(experience * rateExp) 
end
    
function playerAddExp1(cid, exp)
    
    if exp <= 0 then return true end
    
    local multiply = 1
    
    if not isCreature(cid) then return true end
    
    if isInParty(cid) and getPlayerStorageValue(cid, 4875498) == 1 then
        local partyPlayers = getPartyMembers(getPlayerParty(cid))
        
        local menor = 1000000000
        local maior = 1
        
        for a, player in pairs(partyPlayers) do
            if isPlayer(player) then
                if getPlayerLevel(player) > maior then
                    maior = getPlayerLevel(player)
                end
                if getPlayerLevel(player) < menor then
                    menor = getPlayerLevel(player)
                end            
            end
        end

        if #partyPlayers == 2 then
            multiply = 0.65
        elseif #partyPlayers == 4 then
            multiply = 0.50
        else
            multiply = 0.40
        end

        --    heldExp = 1
        for a, player in pairs(partyPlayers) do
            if isPlayer(player) then
                if player == cid then
                    local exp1 = math.floor(getPlayerExperienceToThis(player, exp, true) * multiply)
                    doPlayerAddExp(player, exp1)
                    doPlayerSendCancel(player, "Você ganhou ".. exp1 .." de experiência.")
                    doSendAnimatedText(getThingPos(player), exp1, 215)
                else
                    if (maior - menor) <= 15 then
                        local exp1 = math.floor(getPlayerExperienceToThis(player, exp, false) * multiply)
                        doPlayerAddExp(player, exp1)
                        doPlayerSendCancel(player, "Você acaba de ganhar ".. exp1 .." de experiência pela party.")
                        doSendAnimatedText(getThingPos(player), exp1, 215)
                    end    
                end
            end
        end    
        return true
    else
        exp = getPlayerExperienceToThis(cid, exp, true)
        doPlayerSendCancel(cid, "Você acaba de ganhar ".. exp .." de experiência.")
        doPlayerAddExp(cid, exp)
        doSendAnimatedText(getThingPos(cid), exp, 215)
    end
end

local function doSendMsgInParty(cid, loot)
    if isInPartyAndSharedExperience(cid) then
        local partyPlayers = getPartyMembers(getPlayerParty(cid))
        for i = 1, #partyPlayers do
            if isPlayer(partyPlayers) then
                doSendMsgToPartyChannel(partyPlayers, loot)
            end
        end
        return true
    end
end

local function checkDirias(cid, nameDeath)
    
    local master = (isSummon(cid) and getCreatureMaster(cid) or isNpc(cid) and getNpcMaster(cid)) or cid
    local pokeTask1 = tostring(getPlayerStorageValue(master, 24001))
    local pokecount = tonumber(getPlayerStorageValue(master, 24003) <= 0 and 1 or getPlayerStorageValue(master, 24003))
    
    if pokeTask1 ~= -1 and pokeTask1 == nameDeath then
        setPlayerStorageValue(master, 24003, pokecount+1)
        if pokecount >= getKillCount(master) then
            doPlayerSendTextMessage(master, 20, "[Daily Kill]: Você concluiu minha task, venha pegar sua recompensa.")
            setKillCatched(master, true)
        else
            doPlayerSendTextMessage(master, 20, "[Daily Kill]: Faltam " .. getKillCount(master) - pokecount.. " " .. nameDeath .. (pokecount > 1 and "s" or "") .. ".")
        end
    end
    
end

function doKillWildPoke(cid, target)
    if isSummon(target) and isPlayer(getCreatureMaster(target)) then
        
        checkGiveUp(getCreatureMaster(target))
        doSendPlayerExtendedOpcode(getCreatureMaster(target), 95, '12//,hide')
        doUpdateMoves(getCreatureMaster(target))
        doKillPlayerPokemon(target)
        doSendPlayerExtendedOpcode(getCreatureMaster(target), opcodes.OPCODE_POKEMON_HEALTH, "0|0")
        doRemoveCreature(target)
        
    elseif isWild(target) then
    
    local Pokeboss = {
        ["Moltres"] = {storage = 27201},
        ["Zapdos"] = {storage = 27202},
        ["Articuno"] = {storage = 27203},
        ["Mew"] = {storage = 27204},
        ["Mewtwo"] = {storage = 27205},
        ["Lugia"] = {storage = 27206},
        ["Ho-oh"] = {storage = 27207},
        ["Raikou"] = {storage = 27208},
        ["Entei"] = {storage = 27209},
        ["Suicune"] = {storage = 27210}
    }
    
        if getPlayerStorageValue(target, 637500) >= 1 then -- sherdder team
            doRemoveCreature(target)
            return true
        end    
        
        local nameDeath = doCorrectString(getCreatureName(target))
        local pos = getThingPos(target)
        local corpseID = getPokemonCorpse(nameDeath)
        local bossName = Pokeboss[nameDeath]
        local posC1 = getThingPosWithDebug(cid) posC1.x = posC1.x+5 posC1.y = posC1.y PosC1 = posC1 posCid1 = posC1 PosCid1 = posC1 
        if not isWalkable(posC1) then
            posC1 = getThingPosWithDebug(cid) posC1.x = posC1.x+1 posC1.y = posC1.y PosC1 = posC1 posCid1 = posC1 PosCid1 = posC1     
        else
            posC1 = getThingPosWithDebug(cid) posC1.x = posC1.x+5 posC1.y = posC1.y PosC1 = posC1 posCid1 = posC1 PosCid1 = posC1 
        end        
                        
        if corpseID ~= 0 then
            local corpse = doCreateItem(corpseID, 1, pos)
            if isNpc(getCreatureMaster(target)) then
                doRemoveItem(corpse, 1)
                corpse = nil
            end
            
            if isSummon(cid) or isNpc(cid) then
                checkDirias(cid, nameDeath)
                if isNpc(cid) then
                    checkTaskByDrazyn(getNpcMaster(cid), nameDeath)        
                else
                    checkTaskByDrazyn(getCreatureMaster(cid), nameDeath)
                end
            end
            
            if isSummon(cid) then
                if isWild(target) and bossName then
                    local contagem = getPlayerStorageValue(getCreatureMaster(cid), bossName.storage) <= 0 and 1 or getPlayerStorageValue(getCreatureMaster(cid), bossName.storage)
                    setPlayerStorageValue(getCreatureMaster(cid), bossName.storage, contagem + 1)
                    doPlayerSendTextMessage(getCreatureMaster(cid), 20, "Você já matou no total ["..contagem.."] "..getCreatureName(target)..".")
                end        
            end

            if getPlayerInGolden(getCreatureMaster(cid)) then
                local goldenpoints = 5
                addSurvivalPoints(getCreatureMaster(cid), goldenpoints)
                doPlayerSendTextMessage(getCreatureMaster(cid), 20, "Você ganhou "..goldenpoints.." Survival Points após derrotar o "..getCreatureName(target)..".")
            end
            
            if getPlayerStorageValue(getCreatureMaster(cid), 2154600) >= 1 then 
                if getPlayerStorageValue(getCreatureMaster(cid), 43144) - os.time() > 0 then
                    doAddExpClan(getCreatureMaster(cid), 2, math.random(100)) 
                else
                    doAddExpClan(getCreatureMaster(cid), 1, math.random(100)) 
                end
            end
                
            if isNpc(cid) then
                if getPlayerStorageValue(getNpcMaster(cid), 2154600) >= 1 then
                    if getPlayerStorageValue(getNpcMaster(cid), 43144) - os.time() > 0 then
                        doAddExpClan(getNpcMaster(cid), 2, math.random(100))
                    else
                        doAddExpClan(getNpcMaster(cid), 1, math.random(100))
                    end
                end
            end

            if isNpc(cid) then
                doKillBossTower(getNpcMaster(cid), target)
            else
                doKillBossTower(getCreatureMaster(cid), target)
            end

            local function doShiny(pos, name, mode)
                if pos and name then
                    name = "Shiny "..name
                    
                    if not pokes[name] then 
                        return true 
                    end    
                    
                    doSendMagicEffect(pos, 21) 
                    doCreateMonsterNick(cid, name, retireShinyName(name), pos, false)
                end    
            end

            if isPokeTower(target) then
                if isNpc(cid) then
                    doMsgKillTower(getNpcMaster(cid))
                else
                    doMsgKillTower(getCreatureMaster(cid))
                end    
            end    
            
            doQuestMonster(target) -- MPV Quests
            setContractFinish(target, getCreatureMaster(cid)) -- Brotherhood
    
-- // Charm System // --
            
            local charmchance = 35
            
            if isNpc(cid) and not isSummon(target) and not getCreatureName(target):find("Shiny ") and isShinyCharm(getCreatureName(target)) then
                if getPlayerStorageValue(getNpcMaster(cid), 4125) - os.time() > 0 then
                    if math.random(1, 1000) <= charmchance or isGod(getNpcMaster(cid)) then    
                        addEvent(doShiny, 5 * 1000, posC1, nameDeath)
                        doPlayerSendTextMessage(getNpcMaster(cid), 20, "[Shiny Charm]: Irá nascer em 5 segundos um Shiny "..getCreatureName(target)..".")        
                    end
                end
            end
            
            if isWild(target) and not getCreatureName(target):find("Shiny ") and isShinyCharm(getCreatureName(target)) then
                if getPlayerStorageValue(getCreatureMaster(cid), 4125) - os.time() > 0 then
                    if math.random(1, 1500) <= charmchance or isGod(getCreatureMaster(cid)) then    
                        addEvent(doShiny, 5 * 1000, posC1, nameDeath)
                        doPlayerSendTextMessage(getCreatureMaster(cid), 20, "[Shiny Charm]: Irá nascer em 5 segundos um Shiny "..getCreatureName(target)..".")        
                    end
                end
            end    

-- // Charm System // --
                    
            if corpse and not isSummon(target) then
                
                doItemSetAttribute(corpse, "pokeName", "fainted " .. nameDeath:lower())
                
                if nameDeath:find("Smeargle") then
                    doItemSetAttribute(corpse, "smeargleID", getPlayerStorageValue(target, storages.SmeargleID))
                end
                
                    doDecayItem(corpse)
                
                local name = getCreatureName(getCreatureMaster(cid))
                
                if isNpc(cid) then
                    doCorpseAddLoot(getCreatureName(target), corpse, getNpcMaster(cid), target)
                else
                    doCorpseAddLoot(getCreatureName(target), corpse, getCreatureMaster(cid), target)
                end
                
            end
        end
        
        if isSummon(cid) then
            doSendPlayerExtendedOpcode(getCreatureMaster(cid), 57,  "nothing|0|0")
        end    
            
        doRemoveCreature(target)    
    end    
end

 

Link para o comentário
Compartilhar em outros sites

  • Quem Está Navegando   0 membros estão online

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