@
ja q eh soh pra deixa como um item normal.. tenta deixa soh assim...
<item id="11737" article="a" name="Shining pokeball"> </item>
e dai vai la em lib/some function.lua e ache isso..
function isPokeball(item)
if not item then return false end
if item >= 11826 and item <= 11837 then
return true
end
if item >= 11737 and item <= 11748 then
return true
end
return false
end
e deixa assim..
function isPokeball(item)
if not item then return false end
if item >= 11826 and item <= 11837 then
return true
end
if item >= 11738 and item <= 11748 then --alterado
return true
end
return false
end
e coloca assim aquela linha ali do pvp..
doTeleportThing(cid, fromPosition, false)
e a fight town parece ta certa... oq ta dando de errado?












info
Grupo: Barão
Registrado: 28/12/11
Posts: 233
Reputação: +3
@Slicer
então cara, isso da shining ball eu tava usando ela pra "fight tower" funcionou perfeitamente, porém tem isso do look, ou seja eu add a ball pelo mapa :x
ai eu coloquei esse attribute que voce mandou no itens.xml e nada.
outra coisa cara, tu sabe configura a fight tower do zeref por actionid ?
eu tentei aqui mais não deu muito certo!
local level = 85
local extrastr = 5
local btype = "normal"
function onUse(cid, item, frompos, item2, topos)
local pokemon = ""
if item.uid == nil then return true end
if item.actionid == 4260 then
pokemon = "Hitmonlee"
if item.actionid == 4261 then
pokemon = "Hitmonchan"
else
return true
end
if getPlayerStorageValue(cid, 344487) == 2 then
return doPlayerSendCancel(cid, "You have picked your prize!")
end
if getPlayerStorageValue(cid, 344487) ~= 1 then
return doPlayerSendCancel(cid, "You need own all fight trainer to choose your prize!")
end
if getPlayerMana(cid) >= 6 then
return doPlayerSendCancel(cid, "You don't have capacity for your prize!")
end
if pokemon == "" then return true end
local gender = getRandomGenderByName(pokemon)
local happy = 180
local item = doCreateItemEx(2219)
doItemSetAttribute(item, "poke", pokemon)
doItemSetAttribute(item, "hp", 1)
doItemSetAttribute(item, "happy", happy)
doItemSetAttribute(item, "gender", gender)
doItemSetAttribute(item, "description", "Contains a "..pokemon..".")
doItemSetAttribute(item, "fakedesc", "Contains a "..pokemon..".")
doPlayerAddItemEx(cid, item, true)
doTransformItem(item, pokeballs[btype].on)
doPlayerSendTextMessage(cid, 27, "You choose a "..pokemon..".")
setPlayerStorageValue(cid, 344487, 2)
doSendMagicEffect(getThingPos(cid), 29)
doSendMagicEffect(getThingPos(cid), 27)
doSendMagicEffect(getThingPos(cid), 29)
return TRUE
end
end
ve se eu esqueci algo, ou coloquei algo errado ai por favor /\
ai em xml eu add
"<action actionid="4260-4261" event="script" value="leechan.lua"/>"
/ aah e tem outra coisa tbm, o PVP_Tile, quando você tenta entrar no pvp (team blue/red) de fly ou ride, vai aparece aquela msg "(cid, "You can't do that while ride/fly/or in a bike.")" blz, mais ai da um erro no console!
é um erro de "doTeleporThing"
script:
function onStepIn(cid, item, position, fromPosition)
local s = getCreatureSummons(cid)
local t = getCreatureOutfit(cid).lookType
local h = getCreatureOutfit(cid).lookHead
local b = getCreatureOutfit(cid).lookBody
local l = getCreatureOutfit(cid).lookLegs
local f = getCreatureOutfit(cid).lookFeet
if isSummon(cid) or isMonster(cid) then return false end
if getPlayerStorageValue(cid, 17001) == 1 or getPlayerStorageValue(cid, 5700) == 1 or getPlayerStorageValue(cid, 17000) == 1 then
doPlayerSendCancel(cid, "You can't do that while ride/fly/or in a bike.")
doTeleportThing(cid, frompos, false)
return true
end
if item.actionid == 25695 then --team red
setPlayerStorageValue(cid, 6598754, 1)
doSetCreatureOutfit(cid, {lookType = t, lookBody = 113, lookHead = 113, lookLegs = 113, lookFeet = 113}, -1)
doTeleportThing(cid, getClosestFreeTile(cid, {x = 48, y = 980, z = 7}), false)
if #s >= 1 then
setPlayerStorageValue(s[1], 6598754, 1)
doTeleportThing(s[1], getClosestFreeTile(s[1], {x = 48, y = 980, z = 7}), false)
end
elseif item.actionid == 25696 then --team azul
setPlayerStorageValue(cid, 6598755, 1)
doSetCreatureOutfit(cid, {lookType = t, lookBody = 107, lookHead = 107, lookLegs = 107, lookFeet = 107}, -1)
doTeleportThing(cid, getClosestFreeTile(cid, {x = 49, y = 932, z = 7}), false)
if #s >= 1 then
setPlayerStorageValue(s[1], 6598755, 1)
doTeleportThing(s[1], getClosestFreeTile(s[1], {x = 49, y = 932, z = 7}), false)
end
elseif item.actionid == 25697 then
setPlayerStorageValue(cid, 6598754, -1)
setPlayerStorageValue(cid, 6598755, -1)
doRemoveCondition(cid, CONDITION_OUTFIT)
doTeleportThing(cid, getClosestFreeTile(cid, {x = 1060, y = 904, z = 7}), false)
if #s >= 1 then
setPlayerStorageValue(s[1], 6598754, -1)
setPlayerStorageValue(s[1], 6598755, -1)
doTeleportThing(s[1], getClosestFreeTile(s[1], {x = 1060, y = 904, z = 7}), false)
end
elseif item.actionid == 25698 then
setPlayerStorageValue(cid, 6598754, -1)
setPlayerStorageValue(cid, 6598755, -1)
doRemoveCondition(cid, CONDITION_OUTFIT)
doTeleportThing(cid, getClosestFreeTile(cid, {x = 1061, y = 904, z = 7}), false)
if #s >= 1 then
setPlayerStorageValue(s[1], 6598754, -1)
setPlayerStorageValue(s[1], 6598755, -1)
doTeleportThing(s[1], getClosestFreeTile(s[1], {x = 1061, y = 904, z = 7}), false)
end
elseif item.actionid == 24158 then
if getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE then
doPlayerSendCancel(cid, "You can't do that while is in battle!")
doTeleportThing(cid, fromPosition, false)
end
end
return true
end
na linha em que está em negrito!
se você puder me ajudar cara, agradeceria *~*, vlw brow (y'