Pesquisar na Comunidade
Mostrando resultados para as tags ''addonsystem''.
Encontrado 2 registros
-
-
Adicione a linha no Actions.xml Crie um arquivo no com o nome addonsys.xml em <action itemid="ID DO ADDON ANTES DE APLICAR NO POKEMON" event="script" value="addonsys.lua"/> Actions/Data/addonsys.xml function onUse(cid, item, fromPosition, itemEx, toPosition) local addons = { [12595] = {pokemon= "Arcanine" , looktype = 1469, fly = 0, ride = 1470, surf = 0}, [12686] = {pokemon= "Lucario" , looktype = 1494, fly = 0, ride = 0, surf = 0}, [12685] = {pokemon= "Electabuzz" , looktype = 1493, fly = 0, ride = 0, surf = 0}, [12684] = {pokemon= "Noctowl" , looktype = 1495, fly = 1496, ride = 0, surf = 0}, [12699] = {pokemon= "Shiny Electabuzz" , looktype = 1497, fly = 0, ride = 0, surf = 0}, [ID DO ADDON] = {pokemon= "NOME DO POKEMON" , looktype = O ID DO POKEMON COM A ROUPA, fly = 0, ride = 0, surf = 0}, } if #getCreatureSummons(cid) > 0 then doPlayerSendCancel(cid, "Please back your pokemon.") return false end local addon = addons[item.itemid].looktype local fly = addons[item.itemid].fly local ride = addons[item.itemid].ride local surf = addons[item.itemid].surf -- local addonItem = addons[item.itemid] local pb = getPlayerSlotItem(cid, 8).uid local pk = addons[item.itemid].pokemon if getItemAttribute(pb,"poke") ~= pk then doPlayerSendCancel(cid, "Sorry, you can't use this addon on this poke.") return false end if getItemAttribute(pb,"addon") >= 0 then doRemoveItem(item.uid, 1) doPlayerSendTextMessage(cid, 27, "Congratulations! Your Pokémon received a Addon.") doSetItemAttribute(pb,"addon",addon) doSetItemAttribute(pb,"addonItem",addonItem) doSetItemAttribute(pb,"addonfly",fly) doSetItemAttribute(pb,"addonride",ride) doSetItemAttribute(pb,"addonsurf",surf) return true end if getItemAttribute(getPlayerSlotItem(cid, 8).uid, "ehditto") or getItemAttribute(getPlayerSlotItem(cid, 8).uid, "ehshinyditto") thendoPlayerSendCancel(cid, "Você não pode usar Addons em Dittos transformados.")end return trueend No goback.lua antes de return true end Adicione: local pk = getCreatureSummons(cid)[1] local pb = getPlayerSlotItem(cid, 8).uid local look = getItemAttribute(pb,"addon") if not look then doSetItemAttribute(pb,"addon",0) return false end if look > 0 then doSetCreatureOutfit(pk, {lookType = look}, -1) return true endelse doPlayerSendCancel(cid, "This pokemon is fainted.")end Prints: Créditos Bluester
- 3 respostas