Ir para conteúdo
  • Cadastre-se

porque isso esta acontecendo [video]


Posts Recomendados

preciso que alguem me ajude com isso

o player nao loga mais com o pokemon e sim um tile no lugar da pokebola

 

function onUse(cid, item, frompos, item2, topos)
local zub = {x=850,y=1077,z=5}
local odd = {x=852,y=1077,z=5}
local pid = {x=854,y=1077,z=5}
local pox = getPlayerPosition(cid)

if getPlayerStorageValue(cid, 54842) ~= 1 then
local health = 350
local maxhealth = 350
local description = "Contains a Zubat."
local poke1 = "This is Zubat's pokeball. HP = ["..health.."/"..maxhealth.."]"
item = doCreateItemEx(2219)
doItemSetAttribute(item, "poke", poke1)
doItemSetAttribute(item, "nome", "Zubat")
doItemSetAttribute(item, "description", description)
doPlayerAddItemEx(cid, item, true)
doTransformItem(item, 2222)
doPlayerSendTextMessage(cid, 27, "Voce pegou um pokemon.")
doPlayerSendTextMessage(cid, 27, "Nao esqueca de usar a Pokedex para descobrir mais sobre pokemons na sua jornada!")
doPlayerAddExp(cid, 9300)
doSendMagicEffect(pox, 21)
doPlayerAddSoul(cid, 1)
setPlayerStorageValue(cid, 54842, 1)
else
doPlayerSendTextMessage(cid, 27, "Voce ja pegou o pokemon.")
end
return TRUE
end

 

 

Link para o post
Compartilhar em outros sites

Creaturescript

<?xml version="1.0" encoding="UTF-8"?>
 
<creaturescripts>
 
<event type="advance" name="EffectOnAdvance" event="script" value="levelup.lua"/>
<event type="login" name="PlayerLogin" event="script" value="login.lua"/>
 
<event type="joinchannel" name="GuildMotd" event="script" value="guildmotd.lua"/>
 
<event type="receivemail" name="Mail" event="script" value="mail.lua"/>
 
<event type="reportbug" name="SaveReportBug" script="reportbug.lua"/>
 
<event type="advance" name="AdvanceSave" event="script" value="advancesave.lua"/>
 
 
<event type="think" name="Idle" event="script" value="idle.lua"/>
 
<event type="death" name="PlayerPokeDeath" event="script" value="playerpdeath.lua"/>
<event type="think" name="Flying" event="script" value="flycool.lua"/>
<event type="think" name="Tele" event="script" value="poketele.lua"/>,
<event type="think" name="Shiny" event="script" value="spawn.lua"/>
 
 
<event type="cast" name="BlockSpells" event="script" value="wildpoke.lua"/>
<event type="cast" name="Controled" event="script" value="controlmind.lua"/>
<event type="attack" name="BlockHit3" event="script" value="wildpoke.lua"/>
<event type="statschange" name="Exp" event="script" value="exp.lua"/>
<event type="direction" name="AvoidLook" event="script" value="wildpoke.lua"/>
<event type="attack" name="WildAttack" event="script" value="playerattack.lua"/>
<event type="attack" name="changeTarget" event="script" value="changeTarget.lua"/>
<event type="target" name="WildAttackk" event="script" value="playerattack.lua"/>
 
<event type="look" name="Alook" event="script" value="look.lua"/> 
 
<!-- Pokeballs -->
    <event type="death" name="DiePoke" event="script" value="goback.lua"/>
    <event type="logout" name="LogoutPoke" event="script" value="goback.lua"/>
    <event type="cast" name="Gym1" event="script" value="gym.lua"/>
    <event type="attack" name="Gym2" event="script" value="gym.lua"/>
    <event type="direction" name="Gym3" event="script" value="gym.lua"/>
    <event type="death" name="Gym4" event="script" value="gym.lua"/>
</creaturescripts>
 

 
 
login.lua

local config = {
loginMessage = getConfigValue('loginMessage'),
useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}
 
function onLogin(cid)
for n = 1, #gymStorages do
    setPlayerStorageValue(cid, gymStorages[n], 0)
end 
if getPlayerSlotItem(cid, 8).uid >= 1 then 
 
 if getPlayerSlotItem(cid, 8).itemid == pokeballs[getPokeballType(getPlayerSlotItem(cid, 8).itemid)].use and getPlayerStorageValue(cid, 17000) <= 0 and getPlayerStorageValue(cid, 17001) <= 0 then
   doTransformItem(getPlayerSlotItem(cid, 8).uid, pokeballs[getPokeballType(getPlayerSlotItem(cid, 8).itemid)].off)
 end
 
end
doChangeIconeMode(cid)
getPlayerBurn(cid) 
getPlayerVenom(cid) 
getPlayerIce(cid) 
    registerCreatureEvent(cid, "PlayerAttack")
    registerCreatureEvent(cid, "EffectOnAdvance")
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 80)
doCreatureSetDropLoot(cid, false)
local accountManager = getPlayerAccountManager(cid)
if(accountManager == MANAGER_NONE) then
local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
if(lastLogin > 0) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
else
str = str .. " Have fun! "
end
 
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
elseif(accountManager == MANAGER_NAMELOCK) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
elseif(accountManager == MANAGER_ACCOUNT) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
end
 
if(not isPlayerGhost(cid)) then
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
end
local flys = {
['Moltres'] = {229, 2300},
['Articuno'] = {230, 2100},
['Zapdos'] = {224, 2600},
['Mew'] = {232, 2200},
['Mewtwo'] = {233, 2200},
['Dragonite'] = {221, 1300},
['Pidgeot'] = {222, 900},
['Fearow'] = {226, 800},
['Aerodactyl'] = {227, 1100},
['Charizard'] = {216, 1000},
['Porygon'] = {316, 600},
['Shiny Charizard'] = {295, 2000},
}
 
local rides = {
["Tauros"] = {128, 780, 400}, -- tauros
["Ninetales"] = {129, 800, 375}, -- kyuubi
["Rapidash"] = {130, 800, 395}, -- rapid
["Ponyta"] = {131, 410, 500}, -- ponyta
["Rhyhorn"] = {132, 400, 510}, -- rhyhorn
["Arcanine"] = {12, 900, 390}, -- arcan
["Shiny Arcanine"] = {492, 1000, 360}, -- shiny arca
["Shiny Venusaur"] = {494, 420, 420}, -- shiny vneu
["Crystal Onix"] = {293, 480, 430}, -- cristal onix
["Onix"] = {126, 450, 450}, -- onix
["Venusaur"] = {134, 390, 450}, -- venu
["Dodrio"] = {133, 750, 380}, -- dodrio
["Doduo"] = {135, 420, 500}, -- doduo
}
 
local surf = {
["Poliwag"] = {lookType=278, speed = 320},
["Poliwhirl"] = {lookType=137, speed = 480},
["Seaking"] = {lookType=269, speed = 520},
["Dewgong"] = {lookType=183, speed = 700},
["Blastoise"] = {lookType=184, 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},
}
 
registerCreatureEvent(cid, "GuildMotd")
registerCreatureEvent(cid, "PlayerPokeDeath")
registerCreatureEvent(cid, "LogoutPoke")
registerCreatureEvent(cid, "WildAttack")
 registerCreatureEvent(cid, "WildAttackk")
registerCreatureEvent(cid, "Idle")
registerCreatureEvent(cid, "Tele")
registerCreatureEvent(cid, "Exp")
registerCreatureEvent(cid, "Alook")
setPlayerStorageValue(cid, 61207, 0)
 
doChangeSpeed(cid, -(getCreatureSpeed(cid)))
if getPlayerStorageValue(cid, 17000) >= 1 then
item = getPlayerSlotItem(cid, 8)
poke = getItemAttribute(item.uid, "poke"):match("This is (.-)'s pokeball.")
doChangeSpeed(cid, flys[poke][2])
registerCreatureEvent(cid, "Flying")
doRemoveCondition(cid, CONDITION_OUTFIT)
doSetCreatureOutfit(cid, {lookType = flys[poke][1], lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1)
elseif getPlayerStorageValue(cid, 63215) >= 1 then
item = getPlayerSlotItem(cid, 8)
poke = getItemAttribute(item.uid, "poke"):match("This is (.-)'s pokeball.")
doSetCreatureOutfit(cid, surf[poke], -1)
doChangeSpeed(cid, surf[poke].speed)
elseif getPlayerStorageValue(cid, 17001) >= 1 then
item = getPlayerSlotItem(cid, 8)
poke = getItemAttribute(item.uid, "poke"):match("This is (.-)'s pokeball.")
doChangeSpeed(cid, rides[poke][2])
doRemoveCondition(cid, CONDITION_OUTFIT)
doSetCreatureOutfit(cid, {lookType = rides[poke][1], lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1)
else
if getPlayerGroupId(cid) >= 2 and getPlayerGroupId(cid) <= 7 then
doChangeSpeed(cid, 400*getPlayerGroupId(cid))
else
doChangeSpeed(cid, 250)
end
end
if getPlayerVocation(cid) == 0 then
doPlayerSetVocation(cid, 1)
setCreatureMaxMana(cid, 6)
doPlayerAddSoul(cid, -getPlayerSoul(cid))
setPlayerStorageValue(cid, 19898, 0)
end
if getCreatureOutfit(cid).lookType == 128 then
outfit = {lookType = 159}
doCreatureChangeOutfit(cid, outfit)
elseif getCreatureOutfit(cid).lookType == 136 then
outfit = {lookType = 160}
doCreatureChangeOutfit(cid, outfit)
end
registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "AdvanceSave")
 
return true
end

 
logout nao achei
Editado por Valakinhas (veja o histórico de edições)

 

 

Link para o post
Compartilhar em outros sites

Me manda o seu Goback, do lib ...

 

e o seu Items.xml

desculpa em data/lig nao tem goback e acredito que isso nao tem nada a ver porque peguei o login de outro servidor ai funcionou removeu o bug mais depois deletei porque e dificil ser conpativel mais se quiser eu mando as 2  login.lua

 

 

eu removi a tag doChangeIconeMode(cid) e então voltou a funciona sem bug porem a icon system deixou de funcionar

Editado por Valakinhas (veja o histórico de edições)

 

 

Link para o post
Compartilhar em outros sites

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.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo