Gente, tô tentando aprender o máximo que consigo dessas coisas de Lua, script e tal, mas não consigo HSUAUHSUAHUS, testei mil vezes e n foi.
Preciso que esse script só seja usado e pz.
Segue abaixo:
function onUse(cid, item, frompos, item2, topos)
setPlayerStorageValue(cid, 8422, 0)setPlayerStorageValue(cid, 23254, 50)--doPlayerRemoveItem(cid, 7855, 1)if isCreature(item2.uid) thenreturn doPlayerSendCancel(cid, "You can only use revive in pokeballs!")endif isPlayer(item2.uid) thenreturn doPlayerSendCancel(cid, "You cant use potions on wild pokemons.")endlocal x = pokeballs[getPokeballType(item2.itemid)]if not x or isInArray(x.use, item2.itemid) then return doPlayerSendCancel(cid, "Sorry, is not possible.") endif x.on or x.off thendoSendMagicEffect(getThingPos(cid), 14)doRemoveItem(item.uid, 1)maxh = tonumber(getItemAttribute(item2.uid, "poke"):match("/(.+)]"))doItemSetAttribute(item2.uid, "poke", getItemAttribute(item2.uid, "poke"):sub(1, findLetter(getItemAttribute(item2.uid, "poke"), "[")) .. maxh .. getItemAttribute(item2.uid, "poke"):sub(findLetter(getItemAttribute(item2.uid, "poke"), "/")))btype = getPokeballType(item2.itemid)ons = pokeballs[btype].ondoTransformItem(item2.uid, ons)doCureAllStatus(item2.uid)elsedoPlayerSendCancel(cid, "Sorry, is not possible.")return trueendend