Ir para conteúdo
  • Cadastre-se

Puxar/tirar o pokémon se for usar a bike


Posts Recomendados

Pessoal alguém ai pode me ajudar a tirar o comando desse script que não da para puxar/tirar o pokémon se for usar a bike  ?

 

ele é assim: quando to com o pokémon para fora, se eu for clicar na bike para usar ela fala que não pode.

 

e se eu tiver em cima dela e tentar chamar o pokémon para fora não da :C alguém ajuda ae.

 

E se for possível AGRADEÇO!! Uma edição nesse script mesmo que só de para usar a bike se ela estiver dentro da bag

 

TEXTO: Só é possível usar a bike se tiver dentro da PokéBag

 

( Pra que você só quer que tenha como usar a bike dentro da Bag ? ) RESP: Por que tem como buga e usar a bike no chão, Então pode juntar um monte de pessoa para usar uma só BIKE.

 

 

---------------------------------------------------------{ SCRIPT }----------------------------------------------------------------

 

local function BikeSpeedOn(cid, t)                  
setPlayerStorageValue(cid, t.s, t.speed) 
doChangeSpeed(cid, -getCreatureSpeed(cid)) 
doChangeSpeed(cid, t.speed) 
end 
 
local function BikeSpeedOff(cid, t)
setPlayerStorageValue(cid, t.s, -1) 
doRegainSpeed(cid) 
end 
 
local t = {text='Mount, bike!', dtext='Demount, bike!', s=5700, speed = 1000}
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
 
local pos = getThingPos(cid) 
 
if #getCreatureSummons(cid) >= 1 then
return doPlayerSendCancel(cid, "Retorna seu Pokemon.")
end
if getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 or 
getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 75846) >= 1 or
getPlayerStorageValue(cid, 6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 then   --alterado v1.9
   return doPlayerSendCancel(cid, "You can't do that right now.")
end
 
if getPlayerStorageValue(cid, t.s) <= 0 then
   doSendMagicEffect(pos, 177)
   doCreatureSay(cid, t.text, 19)
   doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'Voce Montou na bike.')
   BikeSpeedOn(cid, t)
   if getPlayerSex(cid) == 1 then
      doSetCreatureOutfit(cid, {lookType = 1787}, -1)
   else
       doSetCreatureOutfit(cid, {lookType = 1619}, -1)
   end
else
   doSendMagicEffect(pos, 177)
   doCreatureSay(cid, t.dtext, 19)
   doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'Voce saio da bike.')
   BikeSpeedOff(cid, t)
   doRemoveCondition(cid, CONDITION_OUTFIT)
end
return true
end
Editado por Gerson Silva (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

local function BikeSpeedOn(cid, t)                  
setPlayerStorageValue(cid, t.s, t.speed) 
doChangeSpeed(cid, -getCreatureSpeed(cid)) 
doChangeSpeed(cid, t.speed) 
end 
 
local function BikeSpeedOff(cid, t)
setPlayerStorageValue(cid, t.s, -1) 
doRegainSpeed(cid) 
end 
 
local t = {text='Mount, bike!', dtext='Demount, bike!', s=5700, speed = 1000}
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
 
local pos = getThingPos(cid) 
 
if getPlayerItemCount(cid, iddabikeaqui) <= 0 then
return doPlayerSendCancel(cid, "Você precisa ter a bike na sua bag.")
end
if getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 or 
getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 75846) >= 1 or
getPlayerStorageValue(cid, 6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 then   --alterado v1.9
   return doPlayerSendCancel(cid, "You can't do that right now.")
end
 
if getPlayerStorageValue(cid, t.s) <= 0 then
   doSendMagicEffect(pos, 177)
   doCreatureSay(cid, t.text, 19)
   doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'Voce Montou na bike.')
   BikeSpeedOn(cid, t)
   if getPlayerSex(cid) == 1 then
      doSetCreatureOutfit(cid, {lookType = 1787}, -1)
   else
       doSetCreatureOutfit(cid, {lookType = 1619}, -1)
   end
else
   doSendMagicEffect(pos, 177)
   doCreatureSay(cid, t.dtext, 19)
   doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'Voce saio da bike.')
   BikeSpeedOff(cid, t)
   doRemoveCondition(cid, CONDITION_OUTFIT)
end
return true
end

Nessa parte coloque o id da bike: if getPlayerItemCount(cid, iddabikeaqui) <= 0 then

Acho que com essa função deve solucionar seu problema pra soltar poke com a bike e para só usa-la se ela estiver na bag.

Pra poder usar pokemon quando estiver usando ela será preciso que você poste seu goback.lua(creio eu que seja esse).

Editado por Alencar123 (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

local function BikeSpeedOn(cid, t)                  setPlayerStorageValue(cid, t.s, t.speed) doChangeSpeed(cid, -getCreatureSpeed(cid)) doChangeSpeed(cid, t.speed) end  local function BikeSpeedOff(cid, t)setPlayerStorageValue(cid, t.s, -1) doRegainSpeed(cid) end  local t = {text='Mount, bike!', dtext='Demount, bike!', s=5700, speed = 1000} function onUse(cid, item, fromPosition, itemEx, toPosition) local pos = getThingPos(cid)  if getPlayerItemCount(cid, iddabikeaqui) <= 0 thenreturn doPlayerSendCancel(cid, "Você precisa ter a bike na sua bag.")endif getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 or getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 75846) >= 1 orgetPlayerStorageValue(cid, 6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 then   --alterado v1.9   return doPlayerSendCancel(cid, "You can't do that right now.")end if getPlayerStorageValue(cid, t.s) <= 0 then   doSendMagicEffect(pos, 177)   doCreatureSay(cid, t.text, 19)   doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'Voce Montou na bike.')   BikeSpeedOn(cid, t)   if getPlayerSex(cid) == 1 then      doSetCreatureOutfit(cid, {lookType = 1787}, -1)   else       doSetCreatureOutfit(cid, {lookType = 1619}, -1)   endelse   doSendMagicEffect(pos, 177)   doCreatureSay(cid, t.dtext, 19)   doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'Voce saio da bike.')   BikeSpeedOff(cid, t)   doRemoveCondition(cid, CONDITION_OUTFIT)endreturn trueend
Nessa parte coloque o id da bike: if getPlayerItemCount(cid, iddabikeaqui) <= 0 then

Acho que com essa função deve solucionar seu problema pra soltar poke com a bike e para só usa-la se ela estiver na bag.

Pra poder usar pokemon quando estiver usando ela será preciso que você poste seu goback.lua(creio eu que seja esse).

Aqui meu goback.lua do actions

local EFFECTS = {

--[OutfitID] = {Effect}

["Magmar"] = 35,

["Jynx"] = 17, --alterado v1.5

["Shiny Jynx"] = 17,

["Piloswine"] = 205, --alterado v1.8

["Swinub"] = 205,

}

function onUse(cid, item, frompos, item2, topos)

if exhaustion.get(cid, 6666) and exhaustion.get(cid, 6666) > 0 then return true end

if getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1

or getPlayerStorageValue(cid, 75846) >= 1 or getPlayerStorageValue(cid, 5700) >= 1 then --alterado v1.9 <<

return true

end

local ballName = getItemAttribute(item.uid, "poke")

local btype = getPokeballType(item.itemid)

local usando = pokeballs[btype].use

local effect = pokeballs[btype].effect

if not effect then

effect = 21

end

unLock(item.uid) --alterado v1.8

if item.itemid == usando then

if getPlayerStorageValue(cid, 990) == 1 then -- GYM

doPlayerSendCancel(cid, "You can't return your pokemon during gym battles.")

return true

end

if #getCreatureSummons(cid) > 1 and getPlayerStorageValue(cid, 212124) <= 0 then --alterado v1.6

if getPlayerStorageValue(cid, 637501) == -2 or getPlayerStorageValue(cid, 637501) >= 1 then

BackTeam(cid)

end

end

if #getCreatureSummons(cid) == 2 and getPlayerStorageValue(cid, 212124) >= 1 then

doPlayerSendCancel(cid, "You can't do that while is controling a mind")

return true --alterado v1.5

end

if #getCreatureSummons(cid) <= 0 then

if isInArray(pokeballs[btype].all, item.itemid) then

doTransformItem(item.uid, pokeballs[btype].off)

doItemSetAttribute(item.uid, "hp", 0)

doPlayerSendCancel(cid, "This pokemon is fainted.")

return true

end

end

local cd = getCD(item.uid, "blink", 30)

if cd > 0 then

setCD(item.uid, "blink", 0)

end

local z = getCreatureSummons(cid)[1]

if getCreatureCondition(z, CONDITION_INVISIBLE) and not isGhostPokemon(z) then

return true

end

doReturnPokemon(cid, z, item, effect)

elseif item.itemid == pokeballs[btype].on then

if item.uid ~= getPlayerSlotItem(cid, CONST_SLOT_FEET).uid then

doPlayerSendCancel(cid, "You must put your pokeball in the correct place!")

return TRUE

end

local thishp = getItemAttribute(item.uid, "hp")

if thishp <= 0 then

if isInArray(pokeballs[btype].all, item.itemid) then

doTransformItem(item.uid, pokeballs[btype].off)

doItemSetAttribute(item.uid, "hp", 0)

doPlayerSendCancel(cid, "This pokemon is fainted.")

return true

end

end

local pokemon = getItemAttribute(item.uid, "poke")

if not pokes[pokemon] then

return true

end

----------------------- Sistema de nao poder carregar mais que 3 pokes lvl baixo e + q 1 poke de lvl medio/alto ---------------------------------

if not isInArray({5, 6}, getPlayerGroupId(cid)) then

local balls = getPokeballsInContainer(getPlayerSlotItem(cid, 3).uid)

local low = {}

local lowPokes = {"Rattata", "Caterpie", "Weedle", "Oddish", "Pidgey", "Paras", "Poliwag", "Bellsprout", "Magikarp", "Hoppip", "Sunkern"}

if #balls >= 1 then

for _, uid in ipairs(balls) do

local nome = getItemAttribute(uid, "poke")

if not isInArray(lowPokes, pokemon) and nome == pokemon then

return doPlayerSendTextMessage(cid, 27, "Sorry, but you can't carry two pokemons equals!")

else

if nome == pokemon then

table.insert(low, nome)

end

end

end

end

if #low >= 3 then

return doPlayerSendTextMessage(cid, 27, "Sorry, but you can't carry more than three pokemons equals of low level!")

end

end

---------------------------------------------------------------------------------------------------------------------------------------------------

local x = pokes[pokemon]

local boost = getItemAttribute(item.uid, "boost") or 0

if getPlayerLevel(cid) < (x.level+boost) then

doPlayerSendCancel(cid, "You need level "..(x.level+boost).." to use this pokemon.")

return true

end

---------------------------- Sistema pokes de clan --------------------------------------

local shinysClan = {

["Shiny Fearow"] = {4, "Wingeon"},

["Shiny Flareon"] = {1, "Volcanic"},

["Shiny Vaporeon"] = {2, "Seavel"},

["Shiny Jolteon"] = {9, "Raibolt"},

["Shiny Hypno"] = {7, "Psycraft"},

["Shiny Golem"] = {3, "Orebound"},

["Shiny Vileplume"] = {8, "Naturia"},

["Shiny Nidoking"] = {5, "Malefic"},

["Shiny Hitmontop"] = {6, "Gardestrike"}, --alterado v1.4

}

if shinysClan[pokemon] and (getPlayerGroupId(cid) < 4 or getPlayerGroupId(cid) > 6) then --alterado v1.9 \/

if getPlayerClanNum(cid) ~= shinysClan[pokemon][1] then

doPlayerSendCancel(cid, "You need be a member of the clan "..shinysClan[pokemon][2].." to use this pokemon!")

return true

elseif getPlayerClanRank(cid) ~= 5 then

doPlayerSendCancel(cid, "You need be atleast rank 5 to use this pokemon!")

return true

end

end

--------------------------------------------------------------------------------------

doSummonMonster(cid, pokemon)

local pk = getCreatureSummons(cid)[1]

if not isCreature(pk) then return true end

------------------------passiva hitmonchan------------------------------

if isSummon(pk) then --alterado v1.8 \/

if pokemon == "Shiny Hitmonchan" or pokemon == "Hitmonchan" then

if not getItemAttribute(item.uid, "hands") then

doSetItemAttribute(item.uid, "hands", 0)

end

local hands = getItemAttribute(item.uid, "hands")

doSetCreatureOutfit(pk, {lookType = hitmonchans[pokemon][hands].out}, -1)

end

end

-------------------------------------------------------------------------

---------movement magmar, jynx-------------

if EFFECTS[getCreatureName(pk)] then

markPosEff(pk, getThingPos(pk))

sendMovementEffect(pk, EFFECTS[getCreatureName(pk)], getThingPos(pk))

end

--------------------------------------------------------------------------

if getCreatureName(pk) == "Ditto" or getCreatureName(pk) == "Shiny Ditto" then --edited

local left = getItemAttribute(item.uid, "transLeft")

local name = getItemAttribute(item.uid, "transName")

if left and left > 0 then

setPlayerStorageValue(pk, 1010, name)

doSetCreatureOutfit(pk, {lookType = getItemAttribute(item.uid, "transOutfit")}, -1)

addEvent(deTransform, left * 1000, pk, getItemAttribute(item.uid, "transTurn"))

doItemSetAttribute(item.uid, "transBegin", os.clock())

else

setPlayerStorageValue(pk, 1010, getCreatureName(pk) == "Ditto" and "Ditto" or "Shiny Ditto") --edited

end

end

if isGhostPokemon(pk) then doTeleportThing(pk, getPosByDir(getThingPos(cid), math.random(0, 7)), false) end

doCreatureSetLookDir(pk, 2)

adjustStatus(pk, item.uid, true, true, true)

doAddPokemonInOwnList(cid, pokemon)

doTransformItem(item.uid, item.itemid+1)

local pokename = getPokeName(pk) --alterado v1.7

local mgo = gobackmsgs[math.random(1, #gobackmsgs)].go:gsub("doka", pokename)

doCreatureSay(cid, mgo, TALKTYPE_SAY)

doSendMagicEffect(getCreaturePosition(pk), effect)

if useOTClient then

doPlayerSendCancel(cid, '12//,show') --alterado v1.7

end

else

doPlayerSendCancel(cid, "This pokemon is fainted.")

end

if useKpdoDlls then

doUpdateMoves(cid)

end

return true

end

Olha eu coloquei o ID action da bike naquele lugar e agora ainda ta aquele problema de poder usar foda da bag, e não ta dando para puxar o pokémon para volta da pokébola, Mais ta dando para usar a bike com o pokémon do lado de fora xD.

13:18 You see a pokemon trainer backpack. (Vol:32).

ItemID: [1987]

Editado por Gerson Silva (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

local function BikeSpeedOn(cid, t)
setPlayerStorageValue(cid, t.s, t.speed)
doChangeSpeed(cid, -getCreatureSpeed(cid))
doChangeSpeed(cid, t.speed) 
end 

local function BikeSpeedOff(cid, t)
setPlayerStorageValue(cid, t.s, -1)
doRegainSpeed(cid) 
end 

local t = {text='Mount, bike!', dtext='Demount, bike!', s=5700, speed = 1000}

function onUse(cid, item, fromPosition, itemEx, toPosition)

local pos = getThingPos(cid) 

if getPlayerItemCount(cid, iddabikeaqui) <= 0 then
doPlayerSendCancel(cid, "Você precisa ter a bike na sua bag.")
return true
end
if getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 or
getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 75846) >= 1 or
getPlayerStorageValue(cid, 6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 then --alterado v1.9
return doPlayerSendCancel(cid, "You can't do that right now.")
end

if getPlayerStorageValue(cid, t.s) <= 0 then
doSendMagicEffect(pos, 177)
doCreatureSay(cid, t.text, 19)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'Voce Montou na bike.')
BikeSpeedOn(cid, t)
if getPlayerSex(cid) == 1 then
doSetCreatureOutfit(cid, {lookType = 1787}, -1)
else
doSetCreatureOutfit(cid, {lookType = 1619}, -1)
end
else
doSendMagicEffect(pos, 177)
doCreatureSay(cid, t.dtext, 19)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'Voce saio da bike.')
BikeSpeedOff(cid, t)
doRemoveCondition(cid, CONDITION_OUTFIT)
end
return true
end

o da bike /\

o goback.lua \/

 

local EFFECTS = {
--[OutfitID] = {Effect}
["Magmar"] = 35, 
["Jynx"] = 17, --alterado v1.5
["Shiny Jynx"] = 17, 
["Piloswine"] = 205, --alterado v1.8
["Swinub"] = 205, 
}

function onUse(cid, item, frompos, item2, topos)

if exhaustion.get(cid, 6666) and exhaustion.get(cid, 6666) > 0 then return true end

if getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 
or getPlayerStorageValue(cid, 75846) >= 1 then --alterado v1.9 <<
return true 
end

local ballName = getItemAttribute(item.uid, "poke")
local btype = getPokeballType(item.itemid)
local usando = pokeballs[btype].use

local effect = pokeballs[btype].effect
if not effect then
effect = 21
end

unLock(item.uid) --alterado v1.8

if item.itemid == usando then 

if getPlayerStorageValue(cid, 990) == 1 then -- GYM
doPlayerSendCancel(cid, "You can't return your pokemon during gym battles.")
return true
end
if #getCreatureSummons(cid) > 1 and getPlayerStorageValue(cid, 212124) <= 0 then --alterado v1.6
if getPlayerStorageValue(cid, 637501) == -2 or getPlayerStorageValue(cid, 637501) >= 1 then 
BackTeam(cid) 
end
end 
if #getCreatureSummons(cid) == 2 and getPlayerStorageValue(cid, 212124) >= 1 then
doPlayerSendCancel(cid, "You can't do that while is controling a mind")
return true --alterado v1.5
end
if #getCreatureSummons(cid) <= 0 then
if isInArray(pokeballs[btype].all, item.itemid) then
doTransformItem(item.uid, pokeballs[btype].off)
doItemSetAttribute(item.uid, "hp", 0)
doPlayerSendCancel(cid, "This pokemon is fainted.")
return true
end
end

local cd = getCD(item.uid, "blink", 30)
if cd > 0 then
setCD(item.uid, "blink", 0)
end

local z = getCreatureSummons(cid)[1]

if getCreatureCondition(z, CONDITION_INVISIBLE) and not isGhostPokemon(z) then
return true
end
doReturnPokemon(cid, z, item, effect)

elseif item.itemid == pokeballs[btype].on then

if item.uid ~= getPlayerSlotItem(cid, CONST_SLOT_FEET).uid then
doPlayerSendCancel(cid, "You must put your pokeball in the correct place!")
return TRUE
end

local thishp = getItemAttribute(item.uid, "hp")

if thishp <= 0 then
if isInArray(pokeballs[btype].all, item.itemid) then
doTransformItem(item.uid, pokeballs[btype].off)
doItemSetAttribute(item.uid, "hp", 0)
doPlayerSendCancel(cid, "This pokemon is fainted.")
return true
end
end

local pokemon = getItemAttribute(item.uid, "poke")

if not pokes[pokemon] then
return true
end

----------------------- Sistema de nao poder carregar mais que 3 pokes lvl baixo e + q 1 poke de lvl medio/alto ---------------------------------
if not isInArray({5, 6}, getPlayerGroupId(cid)) then
local balls = getPokeballsInContainer(getPlayerSlotItem(cid, 3).uid)
local low = {}
local lowPokes = {"Rattata", "Caterpie", "Weedle", "Oddish", "Pidgey", "Paras", "Poliwag", "Bellsprout", "Magikarp", "Hoppip", "Sunkern"}
if #balls >= 1 then
for _, uid in ipairs(balls) do
local nome = getItemAttribute(uid, "poke")
if not isInArray(lowPokes, pokemon) and nome == pokemon then
return doPlayerSendTextMessage(cid, 27, "Sorry, but you can't carry two pokemons equals!")
else
if nome == pokemon then
table.insert(low, nome)
end
end
end
end
if #low >= 3 then
return doPlayerSendTextMessage(cid, 27, "Sorry, but you can't carry more than three pokemons equals of low level!")
end 
end
---------------------------------------------------------------------------------------------------------------------------------------------------

local x = pokes[pokemon]
local boost = getItemAttribute(item.uid, "boost") or 0

if getPlayerLevel(cid) < (x.level+boost) then
doPlayerSendCancel(cid, "You need level "..(x.level+boost).." to use this pokemon.")
return true
end

---------------------------- Sistema pokes de clan --------------------------------------
local shinysClan = {
["Shiny Fearow"] = {4, "Wingeon"},
["Shiny Flareon"] = {1, "Volcanic"},
["Shiny Vaporeon"] = {2, "Seavel"}, 
["Shiny Jolteon"] = {9, "Raibolt"},
["Shiny Hypno"] = {7, "Psycraft"}, 
["Shiny Golem"] = {3, "Orebound"},
["Shiny Vileplume"] = {8, "Naturia"},
["Shiny Nidoking"] = {5, "Malefic"},
["Shiny Hitmontop"] = {6, "Gardestrike"}, --alterado v1.4
}

if shinysClan[pokemon] and (getPlayerGroupId(cid) < 4 or getPlayerGroupId(cid) > 6) then --alterado v1.9 \/
if getPlayerClanNum(cid) ~= shinysClan[pokemon][1] then
doPlayerSendCancel(cid, "You need be a member of the clan "..shinysClan[pokemon][2].." to use this pokemon!")
return true 
elseif getPlayerClanRank(cid) ~= 5 then
doPlayerSendCancel(cid, "You need be atleast rank 5 to use this pokemon!")
return true
end
end
--------------------------------------------------------------------------------------

doSummonMonster(cid, pokemon)

local pk = getCreatureSummons(cid)[1]
if not isCreature(pk) then return true end

------------------------passiva hitmonchan------------------------------
if isSummon(pk) then --alterado v1.8 \/
if pokemon == "Shiny Hitmonchan" or pokemon == "Hitmonchan" then
if not getItemAttribute(item.uid, "hands") then
doSetItemAttribute(item.uid, "hands", 0)
end
local hands = getItemAttribute(item.uid, "hands")
doSetCreatureOutfit(pk, {lookType = hitmonchans[pokemon][hands].out}, -1)
end
end
-------------------------------------------------------------------------
---------movement magmar, jynx-------------
if EFFECTS[getCreatureName(pk)] then 
markPosEff(pk, getThingPos(pk))
sendMovementEffect(pk, EFFECTS[getCreatureName(pk)], getThingPos(pk)) 
end
-------------------------------------------------------------------------- 

if getCreatureName(pk) == "Ditto" or getCreatureName(pk) == "Shiny Ditto" then --edited

local left = getItemAttribute(item.uid, "transLeft")
local name = getItemAttribute(item.uid, "transName")

if left and left > 0 then
setPlayerStorageValue(pk, 1010, name)
doSetCreatureOutfit(pk, {lookType = getItemAttribute(item.uid, "transOutfit")}, -1)
addEvent(deTransform, left * 1000, pk, getItemAttribute(item.uid, "transTurn"))
doItemSetAttribute(item.uid, "transBegin", os.clock())
else
setPlayerStorageValue(pk, 1010, getCreatureName(pk) == "Ditto" and "Ditto" or "Shiny Ditto") --edited
end
end

if isGhostPokemon(pk) then doTeleportThing(pk, getPosByDir(getThingPos(cid), math.random(0, 7)), false) end

doCreatureSetLookDir(pk, 2)

adjustStatus(pk, item.uid, true, true, true)
doAddPokemonInOwnList(cid, pokemon)

doTransformItem(item.uid, item.itemid+1)

local pokename = getPokeName(pk) --alterado v1.7 

local mgo = gobackmsgs[math.random(1, #gobackmsgs)].go:gsub("doka", pokename)
doCreatureSay(cid, mgo, TALKTYPE_SAY)

doSendMagicEffect(getCreaturePosition(pk), effect)

if useOTClient then
doPlayerSendCancel(cid, '12//,show') --alterado v1.7
end

else

doPlayerSendCancel(cid, "This pokemon is fainted.")

end

if useKpdoDlls then
doUpdateMoves(cid)
end
return true
end
Editado por Alencar123 (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

Manow aconteceu um erro aqui na bike agora ;-; tentei editar não achei o problema

 

[06/09/2014 14:40:10] [Error - LuaScriptInterface::loadFile] data/actions/scripts/bike.lua:1: unexpected symbol near 'ï'
[06/09/2014 14:40:10] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/bike.lua)
[06/09/2014 14:40:10] data/actions/scripts/bike.lua:1: unexpected symbol near 'ï'
Link para o post
Compartilhar em outros sites

tem não manow

 

 

citar:

 

local function BikeSpeedOn(cid, t)
setPlayerStorageValue(cid, t.s, t.speed)
doChangeSpeed(cid, -getCreatureSpeed(cid))
doChangeSpeed(cid, t.speed) 
end 
 
local function BikeSpeedOff(cid, t)
setPlayerStorageValue(cid, t.s, -1)
doRegainSpeed(cid) 
end 
 
local t = {text='Mount, bike!', dtext='Demount, bike!', s=5700, speed = 1000}
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
 
local pos = getThingPos(cid) 
 
if getPlayerItemCount(cid, iddabikeaqui) <= 0 then
doPlayerSendCancel(cid, "Você precisa ter a bike na sua bag.")
return true
end
if getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 or
getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 75846) >= 1 or
getPlayerStorageValue(cid, 6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 then --alterado v1.9
return doPlayerSendCancel(cid, "You can't do that right now.")
end
 
if getPlayerStorageValue(cid, t.s) <= 0 then
doSendMagicEffect(pos, 177)
doCreatureSay(cid, t.text, 19)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'Voce Montou na bike.')
BikeSpeedOn(cid, t)
if getPlayerSex(cid) == 1 then
doSetCreatureOutfit(cid, {lookType = 1787}, -1)
else
doSetCreatureOutfit(cid, {lookType = 1619}, -1)
end
else
doSendMagicEffect(pos, 177)
doCreatureSay(cid, t.dtext, 19)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'Voce saio da bike.')
BikeSpeedOff(cid, t)
doRemoveCondition(cid, CONDITION_OUTFIT)
end
return true
end
Link para o post
Compartilhar em outros sites

 

tem não manow

 

 

citar:

 

local function BikeSpeedOn(cid, t)
setPlayerStorageValue(cid, t.s, t.speed)
doChangeSpeed(cid, -getCreatureSpeed(cid))
doChangeSpeed(cid, t.speed) 
end 
 
local function BikeSpeedOff(cid, t)
setPlayerStorageValue(cid, t.s, -1)
doRegainSpeed(cid) 
end 
 
local t = {text='Mount, bike!', dtext='Demount, bike!', s=5700, speed = 1000}
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
 
local pos = getThingPos(cid) 
 
if getPlayerItemCount(cid, iddabikeaqui) <= 0 then
doPlayerSendCancel(cid, "Você precisa ter a bike na sua bag.")
return true
end
if getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 or
getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 75846) >= 1 or
getPlayerStorageValue(cid, 6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 then --alterado v1.9
return doPlayerSendCancel(cid, "You can't do that right now.")
end
 
if getPlayerStorageValue(cid, t.s) <= 0 then
doSendMagicEffect(pos, 177)
doCreatureSay(cid, t.text, 19)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'Voce Montou na bike.')
BikeSpeedOn(cid, t)
if getPlayerSex(cid) == 1 then
doSetCreatureOutfit(cid, {lookType = 1787}, -1)
else
doSetCreatureOutfit(cid, {lookType = 1619}, -1)
end
else
doSendMagicEffect(pos, 177)
doCreatureSay(cid, t.dtext, 19)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'Voce saio da bike.')
BikeSpeedOff(cid, t)
doRemoveCondition(cid, CONDITION_OUTFIT)
end
return true
end

 

Tu trocou onde tá de vermelho?

Link para o post
Compartilhar em outros sites

Agora sim, mais ainda ta o mesmo erro

 

SCRIPT:

 

local function BikeSpeedOn(cid, t)
setPlayerStorageValue(cid, t.s, t.speed)
doChangeSpeed(cid, -getCreatureSpeed(cid))
doChangeSpeed(cid, t.speed) 
end 
 
local function BikeSpeedOff(cid, t)
setPlayerStorageValue(cid, t.s, -1)
doRegainSpeed(cid) 
end 
 
local t = {text='Mount, bike!', dtext='Demount, bike!', s=5700, speed = 1000}
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
 
local pos = getThingPos(cid) 
 
if getPlayerItemCount(cid, 12774) <= 0 then
doPlayerSendCancel(cid, "Você precisa ter a bike na sua bag.")
return true
end
if getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 or
getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 75846) >= 1 or
getPlayerStorageValue(cid, 6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 then --alterado v1.9
return doPlayerSendCancel(cid, "You can't do that right now.")
end
 
if getPlayerStorageValue(cid, t.s) <= 0 then
doSendMagicEffect(pos, 177)
doCreatureSay(cid, t.text, 19)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'Voce Montou na bike.')
BikeSpeedOn(cid, t)
if getPlayerSex(cid) == 1 then
doSetCreatureOutfit(cid, {lookType = 1787}, -1)
else
doSetCreatureOutfit(cid, {lookType = 1619}, -1)
end
else
doSendMagicEffect(pos, 177)
doCreatureSay(cid, t.dtext, 19)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'Voce saio da bike.')
BikeSpeedOff(cid, t)
doRemoveCondition(cid, CONDITION_OUTFIT)
end
return true
end
 
af parece que ta tudo certo mais tem algo errado
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.

  • Conteúdo Similar

    • Por ILex WilL
      Olá, Alguém poderia me ajudar com uns Scripts? nem que seja cobrando, dependendo eu pago para me ajudar...
    • Por Kill of sumoners
      Boa noite, estou com um erro ao atacar um player em meu sv eu nao pego pk, nem sai magia, aparece a mensagem "voce so pode usar isso em criaturas"
      obs: magia em area acerta e pega pk, apenas as targets ou hits de arma nao vao 
    • Por Jpminatel
      Estou com os seguintes erros ; e procuro quem poça ajudar ai a eliminar esses 3 erros , erro 1 e 2 acontece qnd um pokemon usa ps   e o erro 3 é nas potions 
      [Error - TalkAction Interface] 
      [30/01/2022 17:04:25] data/talkactions/scripts/move1.lua:onSay
      [30/01/2022 17:04:25] Description: 
      [30/01/2022 17:04:25] data/lib/some functions.lua:338: attempt to call global 'hasTile' (a nil value)
      [30/01/2022 17:04:25] stack traceback:
      [30/01/2022 17:04:25]     data/lib/some functions.lua:338: in function 'getThingFromPosWithProtect'
      Erro 2 ;
      [30/01/2022 18:08:53] [Error - Spell Interface] 
      [30/01/2022 18:08:53] In a timer event called from: 
      [30/01/2022 18:08:53] data/spells/scripts/ps/Earthquake.lua:onCastSpell
      [30/01/2022 18:08:53] Description: 
      [30/01/2022 18:08:53] data/lib/some functions.lua:338: attempt to call global 'hasTile' (a nil value)
      [30/01/2022 18:08:53] stack traceback:
      [30/01/2022 18:08:53]     data/lib/some functions.lua:338: in function 'getThingFromPosWithProtect'
      [30/01/2022 18:08:53]     data/lib/newStatusSyst.lua:844: in function 'doMoveInArea2'
      [30/01/2022 18:08:53]     data/lib/pokemon moves.lua:1355: in function <data/lib/pokemon moves.lua:1351>
      [30/01/2022 18:08:54] [Error - Spell Interface] 
      [30/01/2022 18:08:54] In a timer event called from: 
      [30/01/2022 18:08:54] data/spells/scripts/ps/Earthquake.lua:onCastSpell
      [30/01/2022 18:08:54] Description: 
      [30/01/2022 18:08:54] data/lib/some functions.lua:338: attempt to call global 'hasTile' (a nil value)
      [30/01/2022 18:08:54] stack traceback:
      [30/01/2022 18:08:54]     data/lib/some functions.lua:338: in function 'getThingFromPosWithProtect'
      [30/01/2022 18:08:54]     data/lib/newStatusSyst.lua:844: in function 'doMoveInArea2'
      [30/01/2022 18:08:54]     data/lib/pokemon moves.lua:1355: in function <data/lib/pokemon moves.lua:1351>
      [30/01/2022 18:18:20] [Error - TalkAction Interface] 
      [30/01/2022 18:18:20] data/talkactions/scripts/move1.lua:onSay
      [30/01/2022 18:18:20] Description: 
      [30/01/2022 18:18:20] data/lib/some functions.lua:338: attempt to call global 'hasTile' (a nil value)
      [30/01/2022 18:18:20] stack traceback:
      [30/01/2022 18:18:20]     data/lib/some functions.lua:338: in function 'getThingFromPosWithProtect'
      [30/01/2022 18:18:20]     data/lib/newStatusSyst.lua:1119: in function 'doMoveInAreaMulti'
      [30/01/2022 18:18:20]     data/lib/pokemon moves.lua:458: in function 'docastspell'
      [30/01/2022 18:18:20]     data/talkactions/scripts/move1.lua:173: in function <data/talkactions/scripts/move1.lua:20>
      Erro 3 ; 
      erro potion 
      [30/01/2022 18:48:35] [Error - Action Interface] 
      [30/01/2022 18:48:35] data/actions/scripts/potion.lua:onUse
      [30/01/2022 18:48:35] Description: 
      [30/01/2022 18:48:35] data/lib/some functions.lua:338: attempt to call global 'hasTile' (a nil value)
      [30/01/2022 18:48:35] stack traceback:
      [30/01/2022 18:48:35]     data/lib/some functions.lua:338: in function 'getThingFromPosWithProtect'
      [30/01/2022 18:48:35]     data/actions/scripts/potion.lua:45: in function <data/actions/scripts/potion.lua:43>
      [30/01/2022 18:48:39] [Error - Action Interface] 
      [30/01/2022 18:48:39] data/actions/scripts/potion.lua:onUse
      [30/01/2022 18:48:39] Description: 
      [30/01/2022 18:48:39] data/lib/some functions.lua:338: attempt to call global 'hasTile' (a nil value)
      [30/01/2022 18:48:39] stack traceback:
      [30/01/2022 18:48:39]     data/lib/some functions.lua:338: in function 'getThingFromPosWithProtect'
      [30/01/2022 18:48:39]     data/actions/scripts/potion.lua:45: in function <data/actions/scripts/potion.lua:43>
       
    • Por Barca Furada
      Boa noite meus caros colegas!
      Preciso de um Help!
       
       
      Quando eu coloco meu itens editados no meu xml e otb, acontece isso com os teleportes, perde todas as propriedades:
       
      No lado direito é sem meu Itemxml
      No lado Esquerdo é com meu Itemxml
       
      Como vcs pode vem ele perde a propriedade de destino!
       
      O arquivo Check File Signatures está desativados!
       
      Quando eu entro no REM com meu Itemxml, ele da essas mensagem de erro:
       
       
       
      Antes de fazer tudo isso eu No item editor, todos itens estava com essa borda vermelha, eu tinha dado reload em todos itens para o cliente OTCv8 conseguir visualizar, no primeiro momento achei que era isso que tinha acontecido para bugar meus teleportes, então eu dei reload em todos itens um por um e deixei o teleport sem dar reload, para ver se era esses o bug! e deu na mesma , quando edito o mapa para colocar novas hunt e cidade ele buga todos teleportes!
       
       
       
       
      No itemxml o teleport está com mesmo id!
       
      alguma alma bondosa para ajudar um colega?
    • Por mishell147
      Então Pessoal o meu site ele da esse error  do video, quando clico em creater character mais se eu clicar no endereço da URL e apertar enter aí me redireciona para página, mais se eu atualizar com F5 não redireciona, E na Database tem certinho os char samples, e tanto que cria normalmente eles.
      20210303_213835.mp4
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo