Sakura777 1 Postado Outubro 28, 2012 Share Postado Outubro 28, 2012 Será que alguém pode fazer 1 detalhe para mim com essa script de bike? tipo quero que possam usa ela apenas quando ela estiver no slot na pokebag, porque ela se jogar no chão e varios clicarem todos ficam montado na bike :\ agradeço quem conseguir fazer isso para mim function onUse(cid, item, fromPosition, itemEx, toPosition) local sBike = 2547 local t = { [2547] = {article='a', name='bike', text='', dtext='', s=5700, condition=bikeCondition}, } function BikeSpeedOn(cid,nSpeed) setPlayerStorageValue(cid,sBike,getCreatureSpeed(cid)) doChangeSpeed(cid,-getCreatureSpeed(cid)) doChangeSpeed(cid,nSpeed) end function BikeSpeedOff(cid) doChangeSpeed(cid,-getCreatureSpeed(cid)) doChangeSpeed(cid,getPlayerStorageValue(cid,sBike)) end 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 getPlayerStorageValue(cid, 17001) == 1 or getPlayerStorageValue(cid, 63215) == 1 or getPlayerStorageValue(cid, 17000) == 1 then doPlayerSendCancel(cid, "You can't use bike while ride/fly/surf.") return true end if getPlayerStorageValue(cid, s) <= 0 then doCreatureSay(cid, r.text, 19) setPlayerStorageValue(cid, s, 1) BikeSpeedOn(cid,1250) if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = 1394, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1) else doSetCreatureOutfit(cid, {lookType = 1393, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1) end elseif getPlayerStorageValue(cid, s) == 1 then doCreatureSay(cid, r.dtext, 19) setPlayerStorageValue(cid, s, 0) BikeSpeedOff(cid) return doRemoveCondition(cid, CONDITION_OUTFIT) else return doPlayerSendCancel(cid, 'You can\'t do this.') end else return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, 'Report bugs in Bike system.') end end Link para o comentário https://xtibia.com/forum/topic/197653-encerrado-pedido-bike-system/ Compartilhar em outros sites More sharing options...
Slicer 1070 Postado Outubro 28, 2012 Share Postado Outubro 28, 2012 ta eh um item normal? q tem q ficar dentro da bag? ou ele VAI no lugar da bag? Link para o comentário https://xtibia.com/forum/topic/197653-encerrado-pedido-bike-system/#findComment-1374764 Compartilhar em outros sites More sharing options...
Sakura777 1 Postado Outubro 28, 2012 Autor Share Postado Outubro 28, 2012 ta eh um item normal? q tem q ficar dentro da bag? ou ele VAI no lugar da bag? Não ele vai fica dentro da bag, exemplo eu fiz 1 slot sepossivel eu quero que ela só funcione se eu por ela no local exemplo no slot acima do cap, é onde eu ponho a bike, porem ela usa em qualquer luga se joga no chão e da use ja monta na bike, se possivel quero ajdua de alguem que faça ela pode ser usada só se por no slot acima do cap ali, ou se por dentro da pokepag. Link para o comentário https://xtibia.com/forum/topic/197653-encerrado-pedido-bike-system/#findComment-1374791 Compartilhar em outros sites More sharing options...
Session Start 125 Postado Outubro 28, 2012 Share Postado Outubro 28, 2012 (editado) tenta colocar isso PEGA DNV, tava slot errado '-' function onUse(cid, item, fromPosition, itemEx, toPosition) local sBike = 2547 local t = { [2547] = {article='a', name='bike', text='', dtext='', s=5700, condition=bikeCondition}, } function BikeSpeedOn(cid,nSpeed) setPlayerStorageValue(cid,sBike,getCreatureSpeed(cid)) doChangeSpeed(cid,-getCreatureSpeed(cid)) doChangeSpeed(cid,nSpeed) end function BikeSpeedOff(cid) doChangeSpeed(cid,-getCreatureSpeed(cid)) doChangeSpeed(cid,getPlayerStorageValue(cid,sBike)) end 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 getPlayerStorageValue(cid, 17001) == 1 or getPlayerStorageValue(cid, 63215) == 1 or getPlayerStorageValue(cid, 17000) == 1 then doPlayerSendCancel(cid, "You can't use bike while ride/fly/surf.") return true end if getPlayerSlotItem(cid, CONST_SLOT_AMMO).uid == item.uid then doPlayerSendCancel("Não está no slot correto") return true end if getPlayerStorageValue(cid, s) <= 0 then doCreatureSay(cid, r.text, 19) setPlayerStorageValue(cid, s, 1) BikeSpeedOn(cid,1250) if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = 1394, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1) else doSetCreatureOutfit(cid, {lookType = 1393, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1) end elseif getPlayerStorageValue(cid, s) == 1 then doCreatureSay(cid, r.dtext, 19) setPlayerStorageValue(cid, s, 0) BikeSpeedOff(cid) return doRemoveCondition(cid, CONDITION_OUTFIT) else return doPlayerSendCancel(cid, 'You can\'t do this.') end else return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, 'Report bugs in Bike system.') end end Editado Outubro 28, 2012 por Cleberadm Link para o comentário https://xtibia.com/forum/topic/197653-encerrado-pedido-bike-system/#findComment-1374843 Compartilhar em outros sites More sharing options...
Sakura777 1 Postado Outubro 28, 2012 Autor Share Postado Outubro 28, 2012 tenta colocar isso PEGA DNV, tava slot errado '-' function onUse(cid, item, fromPosition, itemEx, toPosition) local sBike = 2547 local t = { [2547] = {article='a', name='bike', text='', dtext='', s=5700, condition=bikeCondition}, } function BikeSpeedOn(cid,nSpeed) setPlayerStorageValue(cid,sBike,getCreatureSpeed(cid)) doChangeSpeed(cid,-getCreatureSpeed(cid)) doChangeSpeed(cid,nSpeed) end function BikeSpeedOff(cid) doChangeSpeed(cid,-getCreatureSpeed(cid)) doChangeSpeed(cid,getPlayerStorageValue(cid,sBike)) end 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 getPlayerStorageValue(cid, 17001) == 1 or getPlayerStorageValue(cid, 63215) == 1 or getPlayerStorageValue(cid, 17000) == 1 then doPlayerSendCancel(cid, "You can't use bike while ride/fly/surf.") return true end if getPlayerSlotItem(cid, CONST_SLOT_AMMO).uid == item.uid then doPlayerSendCancel("Não está no slot correto") return true end if getPlayerStorageValue(cid, s) <= 0 then doCreatureSay(cid, r.text, 19) setPlayerStorageValue(cid, s, 1) BikeSpeedOn(cid,1250) if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = 1394, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1) else doSetCreatureOutfit(cid, {lookType = 1393, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1) end elseif getPlayerStorageValue(cid, s) == 1 then doCreatureSay(cid, r.dtext, 19) setPlayerStorageValue(cid, s, 0) BikeSpeedOff(cid) return doRemoveCondition(cid, CONDITION_OUTFIT) else return doPlayerSendCancel(cid, 'You can\'t do this.') end else return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, 'Report bugs in Bike system.') end end Malz tipo, continua quase a mesma coisa exemplo, essa bike script está configurada para quest bike, quando o player pega a bike ela via para 1 slot, mas tipo, se o player joga a bike no chão e clica monta na bike, no caso eu iria querer por a bike para vender no shop quando ela chega na bag se o player joga no chão e tenta clicar vai falar, precisa esta no slot correto para usa a bike. Sendo que a unica solução que tive foi na quest só pega a bike se o slot estive vazio e deixei ela imovel quando ela cai no slot ja era nao tem ais como remove, ams ano quero deixa ela como quest quero vende no shope o player fazer negocios com a bike e esse tipo de coisa, fazer oque ele bem entender.,desde que nao dê pra usa ela no chão e monte de player clica e sair usando bike por ae¬¬. se puder me ajuda fico grata T_____T Leva +rep pq ano quebra dedo Link para o comentário https://xtibia.com/forum/topic/197653-encerrado-pedido-bike-system/#findComment-1374860 Compartilhar em outros sites More sharing options...
Session Start 125 Postado Outubro 28, 2012 Share Postado Outubro 28, 2012 Não tem como eu testar aqui, mas vamo tentanto '-' function onUse(cid, item, fromPosition, itemEx, toPosition) local sBike = 2547 local t = { [2547] = {article='a', name='bike', text='', dtext='', s=5700, condition=bikeCondition}, } function BikeSpeedOn(cid,nSpeed) setPlayerStorageValue(cid,sBike,getCreatureSpeed(cid)) doChangeSpeed(cid,-getCreatureSpeed(cid)) doChangeSpeed(cid,nSpeed) end function BikeSpeedOff(cid) doChangeSpeed(cid,-getCreatureSpeed(cid)) doChangeSpeed(cid,getPlayerStorageValue(cid,sBike)) end 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 getPlayerStorageValue(cid, 17001) == 1 or getPlayerStorageValue(cid, 63215) == 1 or getPlayerStorageValue(cid, 17000) == 1 then doPlayerSendCancel(cid, "You can't use bike while ride/fly/surf.") return true end if getPlayerSlotItem(cid, CONST_SLOT_AMMO).uid == sBike.uid then doPlayerSendCancel("Não está no slot correto") return true end if getPlayerStorageValue(cid, s) <= 0 then doCreatureSay(cid, r.text, 19) setPlayerStorageValue(cid, s, 1) BikeSpeedOn(cid,1250) if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = 1394, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1) else doSetCreatureOutfit(cid, {lookType = 1393, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1) end elseif getPlayerStorageValue(cid, s) == 1 then doCreatureSay(cid, r.dtext, 19) setPlayerStorageValue(cid, s, 0) BikeSpeedOff(cid) return doRemoveCondition(cid, CONDITION_OUTFIT) else return doPlayerSendCancel(cid, 'You can\'t do this.') end else return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, 'Report bugs in Bike system.') end end Link para o comentário https://xtibia.com/forum/topic/197653-encerrado-pedido-bike-system/#findComment-1374874 Compartilhar em outros sites More sharing options...
Sakura777 1 Postado Outubro 28, 2012 Autor Share Postado Outubro 28, 2012 Não tem como eu testar aqui, mas vamo tentanto '-' function onUse(cid, item, fromPosition, itemEx, toPosition) local sBike = 2547 local t = { [2547] = {article='a', name='bike', text='', dtext='', s=5700, condition=bikeCondition}, } function BikeSpeedOn(cid,nSpeed) setPlayerStorageValue(cid,sBike,getCreatureSpeed(cid)) doChangeSpeed(cid,-getCreatureSpeed(cid)) doChangeSpeed(cid,nSpeed) end function BikeSpeedOff(cid) doChangeSpeed(cid,-getCreatureSpeed(cid)) doChangeSpeed(cid,getPlayerStorageValue(cid,sBike)) end 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 getPlayerStorageValue(cid, 17001) == 1 or getPlayerStorageValue(cid, 63215) == 1 or getPlayerStorageValue(cid, 17000) == 1 then doPlayerSendCancel(cid, "You can't use bike while ride/fly/surf.") return true end if getPlayerSlotItem(cid, CONST_SLOT_AMMO).uid == sBike.uid then doPlayerSendCancel("Não está no slot correto") return true end if getPlayerStorageValue(cid, s) <= 0 then doCreatureSay(cid, r.text, 19) setPlayerStorageValue(cid, s, 1) BikeSpeedOn(cid,1250) if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = 1394, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1) else doSetCreatureOutfit(cid, {lookType = 1393, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1) end elseif getPlayerStorageValue(cid, s) == 1 then doCreatureSay(cid, r.dtext, 19) setPlayerStorageValue(cid, s, 0) BikeSpeedOff(cid) return doRemoveCondition(cid, CONDITION_OUTFIT) else return doPlayerSendCancel(cid, 'You can\'t do this.') end else return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, 'Report bugs in Bike system.') end end Agora ela não da use em lugar nenhum. T_____________T Link para o comentário https://xtibia.com/forum/topic/197653-encerrado-pedido-bike-system/#findComment-1374879 Compartilhar em outros sites More sharing options...
Session Start 125 Postado Outubro 28, 2012 Share Postado Outubro 28, 2012 Coloquei agora itemid / era uid e,e function onUse(cid, item, fromPosition, itemEx, toPosition) local sBike = 2547 local t = { [2547] = {article='a', name='bike', text='', dtext='', s=5700, condition=bikeCondition}, } function BikeSpeedOn(cid,nSpeed) setPlayerStorageValue(cid,sBike,getCreatureSpeed(cid)) doChangeSpeed(cid,-getCreatureSpeed(cid)) doChangeSpeed(cid,nSpeed) end function BikeSpeedOff(cid) doChangeSpeed(cid,-getCreatureSpeed(cid)) doChangeSpeed(cid,getPlayerStorageValue(cid,sBike)) end 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 getPlayerStorageValue(cid, 17001) == 1 or getPlayerStorageValue(cid, 63215) == 1 or getPlayerStorageValue(cid, 17000) == 1 then doPlayerSendCancel(cid, "You can't use bike while ride/fly/surf.") return true end if getPlayerSlotItem(cid, CONST_SLOT_AMMO).uid == sBike.itemid then doPlayerSendCancel("Não está no slot correto") return true end if getPlayerStorageValue(cid, s) <= 0 then doCreatureSay(cid, r.text, 19) setPlayerStorageValue(cid, s, 1) BikeSpeedOn(cid,1250) if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = 1394, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1) else doSetCreatureOutfit(cid, {lookType = 1393, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1) end elseif getPlayerStorageValue(cid, s) == 1 then doCreatureSay(cid, r.dtext, 19) setPlayerStorageValue(cid, s, 0) BikeSpeedOff(cid) return doRemoveCondition(cid, CONDITION_OUTFIT) else return doPlayerSendCancel(cid, 'You can\'t do this.') end else return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, 'Report bugs in Bike system.') end end Link para o comentário https://xtibia.com/forum/topic/197653-encerrado-pedido-bike-system/#findComment-1374886 Compartilhar em outros sites More sharing options...
Sakura777 1 Postado Outubro 28, 2012 Autor Share Postado Outubro 28, 2012 (editado) Coloquei agora itemid / era uid e,e function onUse(cid, item, fromPosition, itemEx, toPosition) local sBike = 2547 local t = { [2547] = {article='a', name='bike', text='', dtext='', s=5700, condition=bikeCondition}, } function BikeSpeedOn(cid,nSpeed) setPlayerStorageValue(cid,sBike,getCreatureSpeed(cid)) doChangeSpeed(cid,-getCreatureSpeed(cid)) doChangeSpeed(cid,nSpeed) end function BikeSpeedOff(cid) doChangeSpeed(cid,-getCreatureSpeed(cid)) doChangeSpeed(cid,getPlayerStorageValue(cid,sBike)) end 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 getPlayerStorageValue(cid, 17001) == 1 or getPlayerStorageValue(cid, 63215) == 1 or getPlayerStorageValue(cid, 17000) == 1 then doPlayerSendCancel(cid, "You can't use bike while ride/fly/surf.") return true end if getPlayerSlotItem(cid, CONST_SLOT_AMMO).uid == sBike.itemid then doPlayerSendCancel("Não está no slot correto") return true end if getPlayerStorageValue(cid, s) <= 0 then doCreatureSay(cid, r.text, 19) setPlayerStorageValue(cid, s, 1) BikeSpeedOn(cid,1250) if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = 1394, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1) else doSetCreatureOutfit(cid, {lookType = 1393, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1) end elseif getPlayerStorageValue(cid, s) == 1 then doCreatureSay(cid, r.dtext, 19) setPlayerStorageValue(cid, s, 0) BikeSpeedOff(cid) return doRemoveCondition(cid, CONDITION_OUTFIT) else return doPlayerSendCancel(cid, 'You can\'t do this.') end else return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, 'Report bugs in Bike system.') end end O problema persistiu : T___T nao da use em nenhum lugar Edit: QUando da use [28/10/2012 14:17:08] [Error - Action Interface] [28/10/2012 14:17:08] data/actions/scripts/Bike.lua:onUse [28/10/2012 14:17:08] Description: [28/10/2012 14:17:08] data/actions/scripts/Bike.lua:31: attempt to index local 'sBike' (a number value) [28/10/2012 14:17:08] stack traceback: [28/10/2012 14:17:08] data/actions/scripts/Bike.lua:31: in function <data/actions/scripts/Bike.lua:1> Editado Outubro 28, 2012 por Sakura777 Link para o comentário https://xtibia.com/forum/topic/197653-encerrado-pedido-bike-system/#findComment-1374890 Compartilhar em outros sites More sharing options...
Session Start 125 Postado Outubro 28, 2012 Share Postado Outubro 28, 2012 (editado) Só uma pergunta, aquele 5247 é o ID da bike? G.G Ou é storage? Editado Outubro 28, 2012 por Cleberadm Link para o comentário https://xtibia.com/forum/topic/197653-encerrado-pedido-bike-system/#findComment-1374894 Compartilhar em outros sites More sharing options...
Sakura777 1 Postado Outubro 28, 2012 Autor Share Postado Outubro 28, 2012 Só uma pergunta, aquele 5247 é o ID da bike? G.G Ou é storage? [2547] ID da bike Link para o comentário https://xtibia.com/forum/topic/197653-encerrado-pedido-bike-system/#findComment-1374898 Compartilhar em outros sites More sharing options...
Session Start 125 Postado Outubro 28, 2012 Share Postado Outubro 28, 2012 A mano, já vi, eu pus pra usar no lugar do colar, pensei que AMMO éra emcima do cap vou ver se acho o nome certo daquilo g,g Link para o comentário https://xtibia.com/forum/topic/197653-encerrado-pedido-bike-system/#findComment-1374914 Compartilhar em outros sites More sharing options...
Slicer 1070 Postado Outubro 28, 2012 Share Postado Outubro 28, 2012 ta ae... function onUse(cid, item, fromPosition, itemEx, toPosition) local sBike = 2547 local t = { [2547] = {article='a', name='bike', text='', dtext='', s=5700, condition=bikeCondition}, } function BikeSpeedOn(cid,nSpeed) setPlayerStorageValue(cid,sBike,getCreatureSpeed(cid)) doChangeSpeed(cid,-getCreatureSpeed(cid)) doChangeSpeed(cid,nSpeed) end function BikeSpeedOff(cid) doChangeSpeed(cid,-getCreatureSpeed(cid)) doChangeSpeed(cid,getPlayerStorageValue(cid,sBike)) end 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 getPlayerStorageValue(cid, 17001) == 1 or getPlayerStorageValue(cid, 63215) == 1 or getPlayerStorageValue(cid, 17000) == 1 then doPlayerSendCancel(cid, "You can't use bike while ride/fly/surf.") return true end if getPlayerSlotItem(cid, 10).uid ~= item.uid then return doPlayerSendCancel(cid, "You have to put the bike in the correct slot!") end if getPlayerStorageValue(cid, s) <= 0 then doCreatureSay(cid, r.text, 19) setPlayerStorageValue(cid, s, 1) BikeSpeedOn(cid,1250) if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = 1394, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1) else doSetCreatureOutfit(cid, {lookType = 1393, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1) end elseif getPlayerStorageValue(cid, s) == 1 then doCreatureSay(cid, r.dtext, 19) setPlayerStorageValue(cid, s, 0) BikeSpeedOff(cid) return doRemoveCondition(cid, CONDITION_OUTFIT) else return doPlayerSendCancel(cid, 'You can\'t do this.') end else return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, 'Report bugs in Bike system.') end end @Cleberadm vc tinha feito certo.. soh q tu boto para caso a bike estivese no slot de ammo mandase a msg q esta no lugar errado ;x if getPlayerSlotItem(cid, CONST_SLOT_AMMO).uid == item.uid then doPlayerSendCancel("Não está no slot correto") return true end deveria ser.. if getPlayerSlotItem(cid, CONST_SLOT_AMMO).uid ~= item.uid then doPlayerSendCancel("Não está no slot correto") return true end Link para o comentário https://xtibia.com/forum/topic/197653-encerrado-pedido-bike-system/#findComment-1375017 Compartilhar em outros sites More sharing options...
Sakura777 1 Postado Outubro 28, 2012 Autor Share Postado Outubro 28, 2012 ta ae... function onUse(cid, item, fromPosition, itemEx, toPosition) local sBike = 2547 local t = { [2547] = {article='a', name='bike', text='', dtext='', s=5700, condition=bikeCondition}, } function BikeSpeedOn(cid,nSpeed) setPlayerStorageValue(cid,sBike,getCreatureSpeed(cid)) doChangeSpeed(cid,-getCreatureSpeed(cid)) doChangeSpeed(cid,nSpeed) end function BikeSpeedOff(cid) doChangeSpeed(cid,-getCreatureSpeed(cid)) doChangeSpeed(cid,getPlayerStorageValue(cid,sBike)) end 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 getPlayerStorageValue(cid, 17001) == 1 or getPlayerStorageValue(cid, 63215) == 1 or getPlayerStorageValue(cid, 17000) == 1 then doPlayerSendCancel(cid, "You can't use bike while ride/fly/surf.") return true end if getPlayerSlotItem(cid, 10).uid ~= item.uid then return doPlayerSendCancel(cid, "You have to put the bike in the correct slot!") end if getPlayerStorageValue(cid, s) <= 0 then doCreatureSay(cid, r.text, 19) setPlayerStorageValue(cid, s, 1) BikeSpeedOn(cid,1250) if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = 1394, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1) else doSetCreatureOutfit(cid, {lookType = 1393, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1) end elseif getPlayerStorageValue(cid, s) == 1 then doCreatureSay(cid, r.dtext, 19) setPlayerStorageValue(cid, s, 0) BikeSpeedOff(cid) return doRemoveCondition(cid, CONDITION_OUTFIT) else return doPlayerSendCancel(cid, 'You can\'t do this.') end else return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, 'Report bugs in Bike system.') end end @Cleberadm vc tinha feito certo.. soh q tu boto para caso a bike estivese no slot de ammo mandase a msg q esta no lugar errado ;x if getPlayerSlotItem(cid, CONST_SLOT_AMMO).uid == item.uid then doPlayerSendCancel("Não está no slot correto") return true end deveria ser.. if getPlayerSlotItem(cid, CONST_SLOT_AMMO).uid ~= item.uid then doPlayerSendCancel("Não está no slot correto") return true end @Slicer *----------------------* Muito obrigado muito mesmo leva + rep essa foi perfeita @Cleberadm: Muito obrigado por tenta me ajuda foi quase la Link para o comentário https://xtibia.com/forum/topic/197653-encerrado-pedido-bike-system/#findComment-1375020 Compartilhar em outros sites More sharing options...
Session Start 125 Postado Outubro 28, 2012 Share Postado Outubro 28, 2012 Que isso UHSUASHA to aprendendo também ^~~. reportei pra moreverem Link para o comentário https://xtibia.com/forum/topic/197653-encerrado-pedido-bike-system/#findComment-1375030 Compartilhar em outros sites More sharing options...
Posts Recomendados