52 minutos atrás, Yan Liima disse:Então tem alguma coisa errada ai... Tentou pelo Equip?
Sim pelo Equip, Msm assim não deu. Eu adicionei um Script de moto Olha aqui ele pego. So que ele não da a velocidade. Sera que posso usar o msm para bike e para outras coisas. So falta ter Speed
local bikeCondition = createConditionObject(CONDITION_OUTFIT)
setConditionParam(bikeCondition, CONDITION_PARAM_TICKS, -1)
addOutfitCondition(bikeCondition, {lookType = 258, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0})
local t = {
[7901] = {article='a' ,name='Moto', text='Andar!', dtext='Parar!', s=5700, condition=bikeCondition},
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local v, r = getCreaturePosition(cid), t[item.itemid]
local s = r.s
local pos = {x = v.x, y = v.y, z = v.z}
if r then
if getPlayerStorageValue(cid, 25000) == 5 then
return
end
if getPlayerStorageValue(cid, 23000) == 5 then
return
end
if #getCreatureSummons(cid) >= 1 then
return
end
if getPlayerStorageValue(cid, s) <= 0 then
doSendMagicEffect(pos, 177)
doCreatureSay(cid, r.text, 19)
setPlayerStorageValue(cid, s, 1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'Você esta na Moto ' .. r.article .. ' '.. r.name .. '.')
return doAddCondition(cid, r.condition)
elseif getPlayerStorageValue(cid, s) == 1 then
doSendMagicEffect(pos, 177)
doCreatureSay(cid, r.dtext, 19)
setPlayerStorageValue(cid, s, 0)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'Você parou de andar de Moto ' .. r.article .. ' '.. r.name .. '.')
return doRemoveCondition(cid, CONDITION_OUTFIT)
else
return doPlayerSendCancel(cid, 'You can\'t do this.')
end
else
return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, 'Qualquer erro na Moto contate a staff.')
end
end






info
Group: Diretor
Joined: 12/05/12
Posts: 818
Reputation: +578
Gender: Masculino
Tibia Character: [ADM] Night
Então tem alguma coisa errada ai... Tentou pelo Equip?