Ir para conteúdo

Líderes

Conteúdo Popular

Exibindo conteúdo com a maior reputação em 10/17/20 em todas áreas

  1. Se você tiver a função onMoveItem no seu servidor, em creaturescripts: function onMoveItem(cid, item, fromPosition, toPosition, fromItem, toItem, fromGround, toGround, status) local fromContainer = fromItem local toContainer = toItem if item.itemid == IDBIKE and isBiking(cid) then doPlayerSendCancel(cid, "Você não pode mover este item.") return false end end <event type="moveitem" name="MoveItem" event="script" value="player/moveItem.lua"/> Adicione isso no some functions.lua da lib function isBiking(cid) return getPlayerStorageValue(cid, 32001) == 1 end function cancelBike(cid, NotOutfit) if not NotOutfit then doRemoveCondition(cid, CONDITION_OUTFIT) end setPlayerStorageValue(cid, 32001, -1) end Muda seu script da bike por esse: local sBike = 2547 local t = { [16053] = {article='', name='', text='', dtext='', s=32001, 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 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 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 local underwater = {231, 670, 671, 5405, 5406, 5407, 5408, 5409, 5410, 5427, 5428, 5429, 5430, 5431, 5432, 5433, 5434, 5435, 5436, 5437, 5438} if isInArray(underwater, getTileInfo(getThingPos(cid)).itemid) then return doPlayerSendCancel(cid, "Você não pode usar bike nesse local.") end if getPlayerStorageValue(cid, 22545) >= 1 then doPlayerSendCancel(cid, "Não pode usar isso aqui.") return true end if getPlayerStorageValue(cid, 10) >= 1 or getPlayerStorageValue(cid, 10) >= 1 then doPlayerSendCancel(cid, "Não pode usar bike na loja de roupas.") return true end if getPlayerStorageValue(cid, 154585) >= 1 then return doPlayerSendCancel(cid, "Desculpe, isso não é possível.") end if ( getPlayerItemCount(cid, 13984) <= 0 ) then return doPlayerSendCancel(cid, 'Coloque na mochila para poder usar.') end if getPlayerStorageValue(cid, s) <= 0 then doCreatureSay(cid, r.text, 19) setPlayerStorageValue(cid, s, 1) BikeSpeedOn(cid,600) if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = 2566, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1) else doSetCreatureOutfit(cid, {lookType = 2565, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -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 return true end
    1 ponto
  2. https://github.com/mattyx14/otxserver/wiki/Compilling-on-Windows É OTX isso ai
    1 ponto
Líderes está configurado para São Paulo/GMT-03:00
×
×
  • Criar Novo...