- 0
pedido scripts BIKE E FLY
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
- 5 answers
- 1861 views
-
- 1 answer
- 1378 views
-
- 1 answer
- 1451 views
-
- 0 answers
- 1425 views
-
- 0 answers
- 1370 views
-
Question
klbkevinklb 6
GALERA, BOA TARDE, EU ESTOU COM UM PROBLEMINHA EM 2 SCRIPTS...VOCE PODERIAM ME AJUDAR?
1 SCRIPT BIKE:
QUERIA POR 10 SEGUNDOS PRA USAR DE NOVO...
local function BikeSpeedOn(cid, t) local agora = os.time() local tempo = 1 -- Quanta horas ele vai usar o comando novamente ? ali está 2 = 2 horas. local config = tempo * (30*30) local somatempo = agora + config 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, Hoverboard!', dtext='Demount, Hoverboard!', s=5700, speed = 7000} 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, 'Voce montou no hoverboard.') BikeSpeedOn(cid, t) if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = 2169}, -1) else doSetCreatureOutfit(cid, {lookType = 2168}, -1) end else doSendMagicEffect(pos, 177) doCreatureSay(cid, t.dtext, 19) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'Voce saiu do hverboard.') BikeSpeedOff(cid, t) doRemoveCondition(cid, CONDITION_OUTFIT) end return true end
E O FLY...TAMBÉM QUERIA PRA PODER USAR DE NOVO EM 10 SEGUNDOS....
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) if isMonster(cid) and not isSummon(cid) then if isInArray(WATER_BORDERS, item.itemid) then if getCreatureTarget(cid) >= 1 then doTeleportThing(cid, getMarkedSpawnPos(cid)) doSendMagicEffect(getThingPos(cid), 10) return true end doTeleportThing(cid, fromPosition) end return true elseif isSummon(cid) then if isInArray(WATER, item.itemid) then doTeleportThing(cid, getThingPos(getCreatureMaster(cid))) setMoveSummon(getCreatureMaster(cid), false) return true end end if (isFly(cid)) then ---- fly local toPos = toPosition toPos.stackpos = 0 if not flyBlackSQM then toPos.z = 7 doCreateTile(toPos) if getThingFromPos(toPos).itemid < 1 or getThingFromPos(toPos).itemid == ITEM_FLYTILE then doTeleportThing(cid, fromPosition) return true end toPos.z = toPosition.z end if nonFlyableBorder and type(nonFlyableBorder) == "table" then for i = toPos.z, 14 do toPos.z = i toPos.stackpos = 1 doCreateTile(toPos) if isInArray(nonFlyableBorder, getThingFromPos(toPos).itemid) then doTeleportThing(cid, fromPosition) return true end end toPos.z = getCreaturePosition(cid).z toPos.stackpos = 0 end for _, area in ipairs(getArea(toPos, RANGEX, RANGEY)) do doCreateTile(area) local thing = getThingFromPos(area) if thing.itemid < 1 or thing.itemid == ITEM_FLYTILE then local itemFly = doCreateItem(ITEM_FLYTILE, 1, area) doItemSetAttribute(itemFly, "flyOrder", getCreatureName(cid)) elseif thing.itemid == ITEM_WATERTILE or isInArray(WATER, thing.itemid) then doTransformItem(thing.uid, ITEM_WATERTILE) doItemSetAttribute(thing.uid, "flyOrder", getCreatureName(cid)) end end return true end if isPlayer(cid) then -- surf if isInArray(WATER, item.itemid) then ---//// Seguranças \\\\--- if isSurf(cid) then return true end ---//// Seguranças \\\\--- if #getCreatureSummons(cid) == 0 then doPlayerSendCancel(cid, "Você não pode andar sobre a água.") doTeleportThing(cid, fromPosition, false) return true end local poke = getCreatureSummons(cid)[1] local name = string.lower(getPokeName(poke)) local habilidades = getPokemonSkills(name) if not string.find(habilidades, "surf") then if isInArray(WATER, item.itemid) then doPlayerSendCancel(cid, "Seu pokemon não tem a habilidade de surfar.") doTeleportThing(cid, fromPosition, false) return true end end if isFight(cid) then -- Edição pra ficar igual pxg.. nao dar fly ou ride com fight doPlayerSendCancel(cid, "Você não pode surfar se estiver em batalha.") doTeleportThing(cid, fromPosition, false) return true end if not isSurf(cid) then doSendMagicEffect(toPosition, 53) setPlayerStorageValue(cid, orderTalks["surf"].storage, 1) local outfit = getPokemonOutfitToSkill(name) local speed = getPokemonSpeedToSkill(name) doSetCreatureOutfit(cid, {lookType = outfit}, -1) doChangeSpeed(cid, -getCreatureSpeed(cid)) doChangeSpeed(cid, speed) doPlayerSay(cid, getCreatureName(poke)..orderTalks["surf"].talks[math.random(#orderTalks["surf"].talks)]) doRemoveCreature(poke) end end return true end return true end local function doSendMagicEffecte(pos, effect) addEvent(doSendMagicEffect, 50, pos, effect) end function onStepOut(cid, item, position, lastPosition, fromPosition, toPosition, actor) if isInArray({460, 11675, 11676}, item.itemid) then doRemoveItem(item.uid) end local area = getAreaToRemove(fromPosition, toPosition) if isMonster(cid) and not isSummon(cid) then if isInArray(WATER_BORDERS, item.itemid) then doTeleportThing(cid, toPosition) end return true end if isFly(cid) or isSurf(cid) then local direffects = {84, 85, 86, 87} if isInArray(WATER, item.itemid) then if getCreatureLookDir(cid) == NORTH then fromPosition.y = fromPosition.y +1 end doSendMagicEffecte(fromPosition, direffects[getCreatureLookDir(cid) + 1]) -- efeito end end if isSurf(cid) and #getCreatureSummons(cid) == 0 then local pPos = toPosition pPos.stackpos = 0 local pos = getThingFromPos(pPos) if isInArray(WATER, item.itemid) and not isInArray(WATER, pos.itemid) then local ball = getPlayerSlotItem(cid, 8) doGoPokemonInOrder(cid, ball, false) doRemoveCondition(cid, CONDITION_OUTFIT) doPlayerSay(cid, getCreatureName(getCreatureSummons(cid)[1]) .. orderTalks["downability"].talks[math.random(#orderTalks["downability"].talks)]) doRegainSpeed(cid) setPlayerStorageValue(cid, orderTalks["surf"].storage, -1) doSendMagicEffect(fromPosition, 53) end return true end for _, arear in ipairs(area) do doCreateTile(arear) local thing = getThingFromPos(arear) if thing.itemid == ITEM_FLYTILE or isInArray({460, 11675, 11676}, thing.itemid) then if getItemAttribute(thing.uid, "flyOrder") == getCreatureName(cid) then doRemoveItem(thing.uid) end elseif thing.itemid == ITEM_WATERTILE then doTransformItem(thing.uid, WATER[1]) end end return true end
POR FAVOR ME AJUDEM...DESDE JA AGRADEÇO.
Link to comment
Share on other sites
0 answers to this question
Recommended Posts