Ir para conteúdo

BUG ADDON SISTEM - HELP PLEASE.


lucasweich

Posts Recomendados

Base = (cv8 edited by lordbaxx)
Pessoal, fui atualizar minhas sprites do servidor, e me deparei com a seguinte situação.
Quando eu uso o item de addon em um pokemon, ele funciona 100%, POREM, quando dou fly/ride/ ele simplismente buga, e quando eu retorno o pokemon, ele volta sem o addon...
No Surf, estava com o mesmo erro. Porem eu adicionei uma linha no final do script, e parece que "deu certo"...
Quando Eu uso o surf com o pokemon, e retorno do surf, o addon fica normal.... Porem, eu fico sem o looktype do surf, aparecendo "invisivel" Ex:

Gostaria de saber AONDE eu edito os looktypes de fly/ride/surf DOS ADDONS! ...
Gostaria tambem que o addon continuasse no pokemon ao dar ride/fly ...
Meu addons.lua :

function onUse(cid, item, fromPosition, itemEx, toPosition)
local addons = {
[12731] = {pokemon= "Cubone" , looktype = 1730, count = 5},
[12730] = {pokemon= "Bulbasaur" , looktype = 1729, count = 1},
[12743] = {pokemon= "Bulbasaur" , looktype = 1738, count = 1},
[12870] = {pokemon= "Clefable" , looktype = 1731, count = 1},
[12871] = {pokemon= "Wigglytuff" , looktype = 1732, count = 1},
[12876] = {pokemon= "Bulbasaur" , looktype = 1737, count = 1},
[12878] = {pokemon= "Charmander" , looktype = 1740, count = 1},
[12880] = {pokemon= "Butterfree" , looktype = 1742, count = 1},
[12881] = {pokemon= "Meowth" , looktype = 1743, count = 1},
[12882] = {pokemon= "Caterpie" , looktype = 1744, count = 1},
[12883] = {pokemon= "Pidgey" , looktype = 1745, count = 1},
[12884] = {pokemon= "Pidgey" , looktype = 1746, count = 1},
[12885] = {pokemon= "Pidgey" , looktype = 1747, count = 1},
[12886] = {pokemon= "Squirtle" , looktype = 1748, count = 1},
[12887] = {pokemon= "Squirtle" , looktype = 1749, count = 1},
[12888] = {pokemon= "Pidgeotto" , looktype = 1750, count = 1},
[12892] = {pokemon= "Rattata" , looktype = 1779, count = 1},
[12893] = {pokemon= "Pikachu" , looktype = 1780, count = 1},
[12895] = {pokemon= "Nidoqueen" , looktype = 1782, count = 1},
[12897] = {pokemon= "Dugtrio" , looktype = 1784, count = 1},
[12898] = {pokemon= "Diglett" , looktype = 1785, count = 1},
[12899] = {pokemon= "Diglett" , looktype = 1786, count = 1},
[12900] = {pokemon= "Diglett" , looktype = 1787, count = 1},
[12901] = {pokemon= "Raticate" , looktype = 1788, count = 1},
[12902] = {pokemon= "Golbat" , looktype = 1789, count = 1},
[12905] = {pokemon= "Golduck" , looktype = 1792, count = 1},
[12906] = {pokemon= "Golduck" , looktype = 1793, count = 1},
[12911] = {pokemon= "Marowak" , looktype = 1798, count = 1},
[12913] = {pokemon= "Mr. Mime" , looktype = 1800, count = 1},
[12915] = {pokemon= "Abra" , looktype = 1802, count = 1},
[12916] = {pokemon= "Mankey" , looktype = 1803, count = 1},
[12921] = {pokemon= "Farfetch'd" , looktype = 1808, count = 1},
[12922] = {pokemon= "Marowak" , looktype = 1809, count = 1},
[12926] = {pokemon= "Haunter" , looktype = 1813, count = 1},
[12930] = {pokemon= "Hypno" , looktype = 1817, count = 1},
[12931] = {pokemon= "Hypno" , looktype = 1818, count = 1},
[12932] = {pokemon= "Ponyta" , looktype = 1819, count = 1},
[12939] = {pokemon= "Tangela" , looktype = 1829, count = 1},
[12940] = {pokemon= "Tangela" , looktype = 1830, count = 1},
[12942] = {pokemon= "Pikachu" , looktype = 1832, count = 1},
[12879] = {pokemon= "Charmander" , looktype = 1741, count = 1},
[12872] = {pokemon= "Electabuzz" , looktype = 1733, count = 1},
[12873] = {pokemon= "Chansey" , looktype = 1734, count = 1},
[12874] = {pokemon= "Alakazam" , looktype = 1735, count = 1},
[12875] = {pokemon= "Electabuzz" , looktype = 1736, count = 1},
[12877] = {pokemon= "Venusaur" , looktype = 1739, count = 1},
[12889] = {pokemon= "Charizard" , looktype = 1751, count = 1},
[12890] = {pokemon= "Blastoise" , looktype = 1777, count = 1},
[12891] = {pokemon= "Blastoise" , looktype = 1778, count = 1},
[12894] = {pokemon= "Kangaskhan" , looktype = 1781, count = 1},
[12896] = {pokemon= "Nidoking" , looktype = 1783, count = 1},
[12903] = {pokemon= "Sandslash" , looktype = 1790, count = 1},
[12904] = {pokemon= "Sandslash" , looktype = 1791, count = 1},
[12907] = {pokemon= "Primeape" , looktype = 1794, count = 1},
[12909] = {pokemon= "Alakazam" , looktype = 1796, count = 1},
[12910] = {pokemon= "Poliwrath" , looktype = 1797, count = 1},
[12912] = {pokemon= "Machamp" , looktype = 1799, count = 1},
[12914] = {pokemon= "Poliwrath" , looktype = 1801, count = 1},
[12917] = {pokemon= "Machamp" , looktype = 1804, count = 1},
[12918] = {pokemon= "Arcanine" , looktype = 1805, count = 1},
[12919] = {pokemon= "Golem" , looktype = 1806, count = 1},
[12920] = {pokemon= "Muk" , looktype = 1807, count = 1},
[12923] = {pokemon= "Scyther" , looktype = 1811, count = 1},
[12924] = {pokemon= "Chansey" , looktype = 1812, count = 1},
[12925] = {pokemon= "Weezing" , looktype = 1812, count = 1},
[12927] = {pokemon= "Gengar" , looktype = 1814, count = 1},
[12928] = {pokemon= "Gengar" , looktype = 1815, count = 1},
[12929] = {pokemon= "Cloyster" , looktype = 1816, count = 1},
[12933] = {pokemon= "Exeggutor" , looktype = 1821, count = 1},
[12934] = {pokemon= "Weezing" , looktype = 1822, count = 1},
[12935] = {pokemon= "Jynx" , looktype = 1823, count = 1},
[12936] = {pokemon= "Jynx" , looktype = 1828, count = 1},
[12937] = {pokemon= "Magmar" , looktype = 1826, count = 1},
[12938] = {pokemon= "Lickitung" , looktype = 1827, count = 1},
[12941] = {pokemon= "Snorlax" , looktype = 1831, count = 1},
[12943] = {pokemon= "Raichu" , looktype = 1833, count = 1},
[12944] = {pokemon= "Raichu" , looktype = 1834, count = 1},
}
if #getCreatureSummons(cid) > 0 then
doPlayerSendCancel(cid, "Please back your pokemon.")
return false
end
local numero = addons[item.itemid].looktype
local count = addons[item.itemid].count
local pb = getPlayerSlotItem(cid, 8).uid
local pk = addons[item.itemid].pokemon
if pb <= 0 then
doPlayerSendCancel(cid, "Desculpe, você não tem um "..pk.." no slot")
return false
end
if getItemAttribute(pb,"poke") ~= pk then
doPlayerSendCancel(cid, "Desculpe, você não pode usar esse addon nesse pokemon.")
return false
end
if getItemAttribute(pb,"addon") < 1 then
if(doRemoveItem(item.uid, count)) then
doPlayerSendTextMessage(cid, 27, "Parabéns, você executou isso com sucesso. Para remover seu addon diga !addons remove")
doSetItemAttribute(pb,"addon", numero)
else
doPlayerSendCancel(cid, "Você não tem o necessário para adicionar no seu "..pk..".")
end
return true
end
return true
end

 

 

Meu Surf.lua aonde foi adicionado a linha...

local function doSendMagicEffecte(pos, effect)
addEvent(doSendMagicEffect, 50, pos, effect)
end
local waters = {11756, 4614, 4615, 4616, 4617, 4618, 4619, 4608, 4609, 4610, 4611, 4612, 4613, 7236, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4665, 4666, 4820, 4821, 4822, 4823, 4824, 4825}
local poke = {'Shiny Poliwag', 'Poliwag', 'Shiny Poliwhirl', 'Poliwhirl', 'Shiny Seaking', 'Seaking', 'Shiny Dewgong', 'Dewgong', 'Shiny Blastoise', 'Blastoise', 'Shiny Tentacruel', 'Tentacruel', 'Shiny Lapras', 'Lapras', 'Shiny Gyarados', 'Gyarados', 'Shiny Omastar', 'Omastar', 'Shiny Kabutops', 'Kabutops', 'Shiny Vaporeon', 'Vaporeon', 'Shiny Staryu', 'Staryu', 'Shiny Starmie', 'Starmie', 'Shiny Goldeen', 'Goldeen', 'Shiny Seadra', 'Seadra', 'Shiny Golduck', 'Golduck', 'Shiny Squirtle', 'Squirtle', 'Shiny Wartortle', 'Wartortle', 'Shiny Tentacool', 'Tentacool', 'Shiny Snorlax', 'Snorlax', 'Shiny Poliwrath', 'Poliwrath',
'Mantine', 'Totodile', 'Croconaw', 'Feraligatr', 'Marill', 'Azumarill', 'Quagsire', 'Wooper', 'Octillery', 'Kingdra', 'Sharpedo', 'Floatzel', 'Swampert', 'Marshtomp', 'Wailord', 'Milotic', 'Shiny Sharpedo', 'Shiny Floatzel', 'Shiny Totodile', 'Shiny Croconaw', 'Shiny Feraligatr', 'Barboach', 'Whiscash', 'Huntail', 'Gorebyss', 'Luvdisc', 'Relicanth', 'Spheal', 'Spheal', 'Walrein'}
local flie = {'4820', '4821', '4822', '4823', '4824', '4825'}
local surf = {
["Poliwag"] = {lookType=278, speed = 320},
["Poliwhirl"] = {lookType=137, speed = 480},
["Seaking"] = {lookType=269, speed = 520},
["Dewgong"] = {lookType=183, speed = 700},
["Blastoise"] = {lookType=2051, speed = 850},
["Tentacruel"] = {lookType=185, speed = 750},
["Lapras"] = {lookType=186, speed = 960},
["Gyarados"] = {lookType=187, speed = 1050},
["Omastar"] = {lookType=188, speed = 680},
["Kabutops"] = {lookType=189, speed = 840},
["Poliwrath"] = {lookType=190, speed = 680},
["Vaporeon"] = {lookType=191, speed = 800},
["Staryu"] = {lookType=266, speed = 385},
["Starmie"] = {lookType=267, speed = 685},
["Goldeen"] = {lookType=268, speed = 355},
["Seadra"] = {lookType=270, speed = 655},
["Golduck"] = {lookType=271, speed = 760},
["Squirtle"] = {lookType=273, speed = 365},
["Wartortle"] = {lookType=275, speed = 605},
["Tentacool"] = {lookType=277, speed = 340},
["Snorlax"] = {lookType=300, speed = 500},
----------------Shiny----------------------
["Shiny Poliwag"] = {lookType=1010, speed = 352},
["Shiny Poliwhirl"] = {lookType=1011, speed = 528},
["Shiny Seaking"] = {lookType=1027, speed = 572},
["Shiny Dewgong"] = {lookType=1015, speed = 770},
["Shiny Blastoise"] = {lookType=1756, speed = 935},
["Shiny Tentacruel"] = {lookType=1014, speed = 825},
["Shiny Lapras"] = {lookType=1031, speed = 1056},
["Shiny Gyarados"] = {lookType=1030, speed = 1155},
["Shiny Omastar"] = {lookType=1033, speed = 748},
["Shiny Kabutops"] = {lookType=1034, speed = 924},
["Shiny Poliwrath"] = {lookType=1012, speed = 748},
["Shiny Vaporeon"] = {lookType=1032, speed = 880},
["Shiny Staryu"] = {lookType=1028, speed = 423.5},
["Shiny Starmie"] = {lookType=1029, speed = 753.5},
["Shiny Goldeen"] = {lookType=1026, speed = 390.5},
["Shiny Seadra"] = {lookType=1025, speed = 720.5},
["Shiny Golduck"] = {lookType=1009, speed = 836},
["Shiny Squirtle"] = {lookType=1000, speed = 401.5},
["Shiny Wartortle"] = {lookType=1001, speed = 665.5},
["Shiny Tentacool"] = {lookType=1013, speed = 374},
["Shiny Snorlax"] = {lookType=1035, speed = 550},
----------------Johto----------------------
["Mantine"] = {lookType=636, speed = 820},
["Totodile"] = {lookType=637, speed = 360},
["Croconaw"] = {lookType=638, speed = 590},
["Feraligatr"] = {lookType=645, speed = 900},
["Marill"] = {lookType=639, speed = 340},
["Azumarill"] = {lookType=642, speed = 680},
["Quagsire"] = {lookType=643, speed = 740},
["Kingdra"] = {lookType=644, speed = 1020},
["Octillery"] = {lookType=641, speed = 600},
["Wooper"] = {lookType=640, speed = 315},
["Sharpedo"] = {lookType=1139, speed = 600},
["Floatzel"] = {lookType=1138, speed = 700},
["Swampert"] = {lookType=1135, speed = 650},
["Marshtomp"] = {lookType=1134, speed = 502},
["Wailord"] = {lookType=1137, speed = 450},
["Milotic"] = {lookType=1136, speed = 780},
["Shiny Sharpedo"] = {lookType=1141, speed = 650},
["Shiny Floatzel"] = {lookType=1140, speed = 750},
["Shiny Totodile"] = {lookType=1239, speed = 360},
["Shiny Croconaw"] = {lookType=1238, speed = 590},
["Shiny Feraligatr"] = {lookType=1237, speed = 900},
["Barboach"] = {lookType=1354, speed = 315},
["Whiscash"] = {lookType=1356, speed = 740},
["Huntail"] = {lookType=1360, speed = 540},
["Gorebyss"] = {lookType=1359, speed = 740},
["Luvdisc"] = {lookType=1355, speed = 440},
["Relicanth"] = {lookType=1364, speed = 500},
["Spheal"] = {lookType=1357, speed = 300},
["Sealeo"] = {lookType=1362, speed = 500},
["Walrein"] = {lookType=1363, speed = 700},
}
local premium = false
function onStepIn(cid, item, position, fromPosition)
if not isPlayer(cid) or getPlayerAccess(cid) >= 6 then
return true
end
if isPlayer(cid) and getCreatureOutfit(cid).lookType == 814 then return false end -- TV
if isPlayer(cid) and not isPremium(cid) and premium == true then
doTeleportThing(cid, fromPosition, false)
doPlayerSendCancel(cid, "Only premium members are allowed to surf.")
return true
end
if getCreatureOutfit(cid).lookType == 316 or getCreatureOutfit(cid).lookType == 648 then
doSendMagicEffect(fromPosition, 136)
end
if (getPlayerStorageValue(cid, 63215) >= 1 or getPlayerStorageValue(cid, 17000) >= 1) then
return true
end
if #getCreatureSummons(cid) == 0 then
doPlayerSendCancel(cid, "You need a pokemon to surf.")
doTeleportThing(cid, fromPosition, false)
return true
end
if (not isInArray(poke, getPokemonName(getCreatureSummons(cid)[1]))) then
doPlayerSendCancel(cid, "This pokemon cannot surf.")
doTeleportThing(cid, fromPosition, false)
return true
end
doSetCreatureOutfit(cid, {lookType = surf[getPokemonName(getCreatureSummons(cid)[1])].lookType + 351}, -1)
doCreatureSay(cid, ""..getPokeName(getCreatureSummons(cid)[1])..", lets surf!", 1)
doChangeSpeed(cid, -(getCreatureSpeed(cid)))
local speed = 75 + PlayerSpeed + getSpeed(getCreatureSummons(cid)[1]) * 8 * speedRate
setPlayerStorageValue(cid, 54844, speed)
doChangeSpeed(cid, speed)
local pct = getCreatureHealth(getCreatureSummons(cid)[1]) / getCreatureMaxHealth(getCreatureSummons(cid)[1])
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "hp", pct)
doRemoveCreature(getCreatureSummons(cid)[1])
addEvent(setPlayerStorageValue, 100, cid, 63215, 1)
return true
end
local direffects = {30, 49, 9, 51}
function onStepOut(cid, item, position, fromPosition)
if isPlayer(cid) and getCreatureOutfit(cid).lookType == 814 then return false end
local checkpos = fromPosition
checkpos.stackpos = 0
if isInArray(waters, getTileInfo(checkpos).itemid) then
if getPlayerStorageValue(cid, 63215) >= 1 or getPlayerStorageValue(cid, 17000) >= 1 then
doSendMagicEffecte(fromPosition, direffects[getCreatureLookDir(cid) + 1])
end
end
if not isInArray(waters, getTileInfo(getThingPos(cid)).itemid) then
if getPlayerStorageValue(cid, 17000) >= 1 then return true end
if getPlayerStorageValue(cid, 63215) <= 0 then return true end
doRemoveCondition(cid, CONDITION_OUTFIT)
setPlayerStorageValue(cid, 63215, -1)
local item = getPlayerSlotItem(cid, 8)
local pokemon = getItemAttribute(item.uid, "poke")
local x = pokes[pokemon]
if not x then return true end
if getItemAttribute(item.uid, "nick") then
doCreatureSay(cid, getItemAttribute(item.uid, "nick")..", I'm tired of surfing!", 1)
else
doCreatureSay(cid, getItemAttribute(item.uid, "poke")..", I'm tired of surfing!", 1)
end
doSummonMonster(cid, pokemon)
local pk = getCreatureSummons(cid)[1]
if not isCreature(pk) then
pk = doCreateMonster(pokemon, backupPos)
if not isCreature(pk) then
doPlayerSendCancel(cid, "You can't stop surfing here.")
doTeleportThing(cid, fromPosition, false)
return true
end
doConvinceCreature(cid, pk)
end
doChangeSpeed(pk, getCreatureSpeed(cid))
doChangeSpeed(cid, -getCreatureSpeed(cid))
doChangeSpeed(cid, PlayerSpeed)
doTeleportThing(pk, fromPosition, false)
doTeleportThing(pk, getThingPos(cid), true)
doCreatureSetLookDir(pk, getCreatureLookDir(cid))
adjustStatus(pk, item.uid, true, false, true)
end
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
end
return true
end

Editado por lucasweich
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...