Postado Setembro 2, 2014 10 anos bom tentei criar um script que vc usa um item no pokemon e ele ganha defense, no meu servidor a storage da defense é 1002 ai tentei fazer tipo isso: function onUse(cid, item, frompos, item2, topos) if not isCreature(cid) or not isCreature(item2.uid) or #getCreatureSummons(cid) <= 0 or not isSummon(item2.uid) then return false end if getCreatureMaster(item2.uid) ~= cid then doPlayerSendTextMessage(cid, 27, "You only use this in your pokemons!") return false end if getPlayerStorageValue(item2.uid, 1002) >= 10 then return doPlayerSendCancel(cid, "This pokemon is already under effects of calcium.") end doCreatureSay(cid, ""..getCreatureName(item2.uid)..", take this calcium!", TALKTYPE_SAY) doSendMagicEffect(getThingPos(item2.uid), 29) setPlayerStorageValue(item2.uid, 1002, 10) doRemoveItem(item.uid, 1) end Mas não dá certo pq diz q o meu poke já tem a storage que é defense que todos pokemons tem, mas não quero que o player use varias vezes somente uma vez e que desse o atributo no pokemon n na ball. Ent pensei no seguinte eu vi uma function que da status pro pokemon de qualquer atributo function doRaiseStatus(cid, off, def, agi, time) if not isCreature(cid) then return true end local A = getOffense(cid) local B = getDefense(cid) local C = getSpeed(cid) if off > 0 then setPlayerStorageValue(cid, 1001, A * off) end if def > 0 then setPlayerStorageValue(cid, 1002, B * def) end if agi > 0 then setPlayerStorageValue(cid, 1003, C + agi) if getCreatureSpeed(cid) ~= 0 then doRegainSpeed(cid) end end teria como no lugar de adicionar a storage eu ajustar um atributo para o pokemon? Rep+ Meus trabalhos °Pacote de shinys da 3ª e 4ª geração http://www.tibiaking.com/forum/topic/37128-patch-pokemons-shinys-3%C2%AA-e-alguns-da-4%C2%AA-gera%C3%A7%C3%A3o/ °Como criar novos pokemons no pda http://www.tibiaking.com/forum/topic/37546-tutorial-como-criar-novos-pokemons-para-seu-servidor/#entry212787 °Script de boost stone do otpokemonhttp://www.tibiaking.com/forum/topic/37849-action-script-de-boost-stone-parecido-com-otpokemon/ °Fly só para vipshttp://www.tibiaking.com/forum/topic/40868-poketibia-fly-para-vips/
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.