Chcia?bym przedstawi? prosty pokedex mojego autorstwa.
Opiera si? on na wy?wietlaniu danych z tabeli ; p
Skrypt:
Screen:
Spos?b dodawania:
1. Doda? linijk? nad "Rabbit".
Opiera si? on na wy?wietlaniu danych z tabeli ; p
Skrypt:
PHP:
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:
Spos?b dodawania:
1. Doda? linijk? nad "Rabbit".
PHP:
- Imi? Poka ; Tekst, kt?ry ma by? wy?wietlany ; ID Portretu Pokemona ;
{"Charizard", "Name: Charizard\nType: fire\nLevel: 60", 2342},