ja tinham me reportado isso...
1* actions/scripts/bike.lua
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 = 500}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local pos = getThingPos(cid)
if #getCreatureSummons(cid) >= 1 then
return doPlayerSendCancel(cid, "Return your 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, 'You have mounted in a bike.')
BikeSpeedOn(cid, t)
if getPlayerSex(cid) == 1 then
doSetCreatureOutfit(cid, {lookType = 1394}, -1)
else
doSetCreatureOutfit(cid, {lookType = 1393}, -1)
end
else
doSendMagicEffect(pos, 177)
doCreatureSay(cid, t.dtext, 19)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You haven demouted of a bike.')
BikeSpeedOff(cid, t)
doRemoveCondition(cid, CONDITION_OUTFIT)
end
return true
end
2* movements/scripts/PVP/PVP_Tile.lua
function onStepIn(cid, item, position, fromPosition) --alterado v1.7 reformulado e melhorado ^^
if isSummon(cid) or ehMonstro(cid) then return false end --alterado v1.8
local posis = { --{{pos}, storage, cor da roupa},
[25695] = {{x = 1004, y = 997, z = 13}, 6598754, 113},
[25696] = {{x = 965, y = 997, z = 13}, 6598755, 107},
[25697] = {{x = 973, y = 1065, z = 13}},
[25698] = {{x = 973, y = 1065, z = 13}},
}
local action = posis[item.actionid]
local out = getPlayerSex(cid) == 0 and 511 or 510
--alterado v1.9
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, fromPosition, false) --alterado v1.6
return true
end
if getPlayerStorageValue(cid, 52480) >= 1 then
doPlayerSendCancel(cid, "You are already dueling!")
doTeleportThing(cid, fromPosition, false) --alterado v1.6
return true
end
if posis[item.actionid] then
if isInArray({25695, 25696}, item.actionid) then
setPlayerStorageValue(cid, action[2], 1)
doSetCreatureOutfit(cid, {lookType = out, lookBody = action[3], lookHead = action[3], lookLegs = action[3], lookFeet = action[3]}, -1)
else
setPlayerStorageValue(cid, 6598754, -1)
setPlayerStorageValue(cid, 6598755, -1)
doRemoveCondition(cid, CONDITION_OUTFIT)
end
doTeleportThing(cid, getClosestFreeTile(cid, action[1]), false)
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






info
Grupo: Artesão
Registrado: 27/04/11
Posts: 112
Reputação: +2
Eu não posso usar a bike voando nem nadando mas por algum motivo é possível entrar de bike no meu pvp ;X e usar dentro do pvp tbm ;o
o que isso interfere? o player colocando e tirando a bike pode mudar a corda outfit normalmente!
Segue meu bike.lua
local function BikeSpeedOn(cid, t) --alteradp v1.8 refeita...
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
function onUse(cid, item, fromPosition, itemEx, toPosition)
local pos = getThingPos(cid)
local t = {text='Mount, bike!', dtext='Demount, bike!', s=5700, speed = 500}
if #getCreatureSummons(cid) >= 1 then
return doPlayerSendCancel(cid, "Return your pokemon.")
end
if getPlayerStorageValue(cid, 17001) == 1 or getPlayerStorageValue(cid, 63215) == 1 or getPlayerStorageValue(cid, 17000) == 1 then
return doPlayerSendCancel(cid, "You can't use bike while ride/fly/surf.")
end
if getPlayerStorageValue(cid, t.s) <= 0 then
doSendMagicEffect(pos, 177)
doCreatureSay(cid, t.text, 19)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You have mounted in a bike.')
BikeSpeedOn(cid, t)
if getPlayerSex(cid) == 1 then
doSetCreatureOutfit(cid, {lookType = 1394}, -1)
else
doSetCreatureOutfit(cid, {lookType = 1393}, -1)
end
else
doSendMagicEffect(pos, 177)
doCreatureSay(cid, t.dtext, 19)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You haven demouted of a bike.')
BikeSpeedOff(cid, t)
doRemoveCondition(cid, CONDITION_OUTFIT)
end
return true
end