victorbeico 0 Postado Agosto 9, 2013 Share Postado Agosto 9, 2013 Boa noite galera, gostaria de saber se alguém pode me ajudar? Queria que mesmo usando a bike eu pode-se solta meu pokemon e caçar normalmente, estou usando o server pda! Script da bike: 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 Obrigado a todos que possam me ajudar! Link para o comentário https://xtibia.com/forum/topic/219178-encerrado-duvida-bike-pda/ Compartilhar em outros sites More sharing options...
StyloMaldoso 330 Postado Agosto 9, 2013 Share Postado Agosto 9, 2013 tira isso if #getCreatureSummons(cid) >= 1 then return doPlayerSendCancel(cid, "Return your pokemon.") end Link para o comentário https://xtibia.com/forum/topic/219178-encerrado-duvida-bike-pda/#findComment-1549236 Compartilhar em outros sites More sharing options...
Roksas 846 Postado Agosto 9, 2013 Share Postado Agosto 9, 2013 Ficando assim: 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 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 Link para o comentário https://xtibia.com/forum/topic/219178-encerrado-duvida-bike-pda/#findComment-1549250 Compartilhar em outros sites More sharing options...
victorbeico 0 Postado Agosto 9, 2013 Autor Share Postado Agosto 9, 2013 po galera, deu certo, porem tenho outra duvida, ele só troca o pokemon se eu troco ali na cd bar ou eu tiro o pokemon antes de dar mount na bike, mais montado nela não sai ou se ja tiver la fora ele nao entra haiaeheah, sabem porque disso? Link para o comentário https://xtibia.com/forum/topic/219178-encerrado-duvida-bike-pda/#findComment-1549395 Compartilhar em outros sites More sharing options...
Stigal 585 Postado Abril 21, 2018 Share Postado Abril 21, 2018 A questão neste tópico de suporte foi encerrada por falta de respostas. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta. + Caso a dúvida não tenha sido resolvida você poderá criar outro tópico solicitando ajuda. * Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado. Link para o comentário https://xtibia.com/forum/topic/219178-encerrado-duvida-bike-pda/#findComment-1735051 Compartilhar em outros sites More sharing options...
Posts Recomendados