Histórico de Curtidas
-
Akiras Prince deu reputação a 345sat em Comando !cp teleportar após 10 segundos. Como fazer?function onSay(cid, words, param, channel)
local store = 19290 -- storage q salva o delay
local delay = 10 -- tempo em segundos de dela
local tid = cid
if(param ~= '') then
tid = getPlayerByNameWildcard(param)
if(not tid or (isPlayerGhost(tid) and getPlayerGhostAccess(tid) > getPlayerGhostAccess(cid))) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " not found.")
return true
end
end
local pos = getPlayerTown(tid)
local tmp = getTownName(pos)
if(not tmp) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Home town does not exists.")
return true
end
pos = getTownTemplePosition(pos)
if(not pos or isInArray({pos.x, pos.y}, 0)) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong temple position for town " .. tmp .. ".")
return true
end
if getPlayerStorageValue(cid, store) - os.time() <= 0 then
setPlayerStorageValue(cid, store, os.time() + delay)
doPlayerSendCancel(cid, "Vc Tem Quer Espera ".. getPlayerStorageValue(cid, store) - os.time() .." second(s) to cast it again.")
end
pos = getClosestFreeTile(tid, pos)
if(not pos or isInArray({pos.x, pos.y}, 0)) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Destination not reachable.")
return true
end
tmp = getCreaturePosition(tid)
if(doTeleportThing(tid, pos, true) and not isPlayerGhost(tid)) then
doSendMagicEffect(tmp, CONST_ME_POFF)
doSendMagicEffect(pos, CONST_ME_TELEPORT)
end
return true
end
tag
<talkaction log="yes" words="!cp" access="1" event="script" value="teleportmaster.lua"/>
-
Akiras Prince deu reputação a 345sat em Bike Sistem Funciona Porém...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)
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
local pos = getThingPos(cid)
local t = {text='Mount, bike!', dtext='Demount, bike!', s=5700, speed = 1675}
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 = 738}, -1)
else
doSetCreatureOutfit(cid, {lookType = 737}, -1)
end
else
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
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
Testar Assim Não Fucionar sou vim chat