• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action Simple Pokedex.

crimm

New Member
Joined
Dec 7, 2008
Messages
44
Reaction score
4
Location
Poland
Hello.
Here you have a simple pokedex script xd
Lua:
function onUse(cid, item, fromPos, itemEx, toPos)

local pokemon = itemEx.uid
local pokemons = 
{
{"Rabbit", "Name: Rabbit\nType: Normal\nLevel: 10", 2342}, 
{"Weepinbell", "Name: Weepinbell\nType: grass\nRequired level: 18\n\nEvolutions:\nBellsprout, requires level 3\nWeepinbell, requires level 18\nVictreebel, requires level 50\n\nDescription: A Pokemon that appears to be a plant. It captures unwary prey by dousing them with a toxic powder.\n\nMoves: \nRazor Leaf - m1 - level 18\nVine Whip - m2 - level 18\nAcid - m3 - level 18\nPoison Bomb - m4 - level 27\nSlash - m5 - level 18\nStun Spore - m6 - level 27\n\nAbility:\nCut\n", 3421}, 
{"Squirtle", "Name: Squirtle\nType: water\nRequired level: 20\n\nEvolutions:\nSquirtle, requires level 20\nWartortle, requires level 40\nBlastoise, requires level 85\n\nDescription: It shelters itself in its shell, then strikes back with spouts of water at every opportunity.\n\nMoves: \nHeadbutt - m1 - level 10\nBubbles - m2 - level 10\nWater Gun - m3 - level 15\nWaterball - m4 - level 12\nAqua Tail - m5 - level 13\nHydro Cannon - m6 - level 35\nHarden - m7 - level 20\n\nAbility:\nSurf\n",3444},
{"Bulbasaur", "Name: Bulbasaur\nType: grass\nRequired level: 20\n\nEvolutions:\nBulbasaur, requires level 20\n", 2342} 
} 
    for _,n in pairs(pokemons) do
    if isCreature(pokemon) == true then
    if getCreatureName(pokemon) == n[1] then
    doShowTextDialog(cid, n[3], n[2])
    end
    end
end
end
Screen:


Regards, crimm.
 
try ["name"]={info} instead of your way
also as you mentioned in topic title its really simple
but hey, everyone started with simple things right?

(also in your way putting isCreature or better isMonster inside of loop is bad idea)


@down: poke servers are really popular AND this script can be used for anything else
 
Last edited:
This is 50% of pokédex, where is list registration? hhahauahaahhahah ^_^

And you can use this function eeemm: getCreatureName(itemEx.uid) ^__^
 
make a good pokedex (easy configurable and those things), without errors or bugs and with all functions that a pokedex should have isnt so hard but it takes so much time

anyway... i wont use it but thanks for share it to the public ^^
 
Lua:
function onUse(cid, item, fromPos, itemEx, toPos)
 
local dex = {
["Rabbit"]= {"Name: Rabbit\nType: Normal\nLevel: 10", 2342}, 
["Weepinbell"] = {"Name: Weepinbell\nType: grass\nRequired level: 18\n\nEvolutions:\nBellsprout, requires level 3\nWeepinbell, requires level 18\nVictreebel, requires level 50\n\nDescription: A Pokemon that appears to be a plant. It captures unwary prey by dousing them with a toxic powder.\n\nMoves: \nRazor Leaf - m1 - level 18\nVine Whip - m2 - level 18\nAcid - m3 - level 18\nPoison Bomb - m4 - level 27\nSlash - m5 - level 18\nStun Spore - m6 - level 27\n\nAbility:\nCut\n", 3421}, 
["Squirtle"] = {"Name: Squirtle\nType: water\nRequired level: 20\n\nEvolutions:\nSquirtle, requires level 20\nWartortle, requires level 40\nBlastoise, requires level 85\n\nDescription: It shelters itself in its shell, then strikes back with spouts of water at every opportunity.\n\nMoves: \nHeadbutt - m1 - level 10\nBubbles - m2 - level 10\nWater Gun - m3 - level 15\nWaterball - m4 - level 12\nAqua Tail - m5 - level 13\nHydro Cannon - m6 - level 35\nHarden - m7 - level 20\n\nAbility:\nSurf\n",3444},
["Bulbasaur"] = {"Name: Bulbasaur\nType: grass\nRequired level: 20\n\nEvolutions:\nBulbasaur, requires level 20\n", 2342} 
} 

local  n = dex[getCreatureName(itemEx.uid, false)] 
return n and doShowTextDialog(cid, n[2], n[1]) or false

end
 
HAHAHHAHAHAHHAHAHHAAHHAHAH hmm I have but I sell this part of script.
 
Back
Top