- Dołączył
- Kwiecień 15, 2012
- Posty
- 33
- Liczba reakcji
- 1
Mam ma?y b??d z hunting aren? ot?? wchodzenie i wychodzenie z areny chodzi, tworzenie monstra te?, wszystko opr?cz wyrzucania z areny gracza po okre?lonym czasie... Prosz? o pomoc oto skrypt:
[SQL]local storage_czas = 16566
local ile_minut = 1
local storage = 1234
local exh = 20 -- Ile sekund exhaused po kicku
local fromPos = {x=5290, y=5365, z=7} -- lewy g?rny rog hunting room
local toPos = {x=5304, y=5379, z=7} -- prawy dolny r?g hunting roomu
function kick()
if isPlayerInArea(fromPos,toPos) > 0 then
doTpPlayersFromArea(fromPos,toPos, {x=5290, y=5381, z=7}, "Czas minal.")
end
end
function onStepIn(cid, item, pos, fromPosition)
local czas = getGlobalStorageValue(storage_czas)
if isPlayerInArea(fromPos,toPos) == 0 then
if getPlayerStorageValue(cid,storage) > os.time() then
doPlayerSendCancel(cid," Musisz poczekac " .. getPlayerStorageValue(cid,storage)-os.time() .. " sekund.")
doTeleportThing(cid, {x=5297, y=5383, z=7})
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
return true
end
if czas <= os.time() then
doPlayerSendCancel(cid," Musisz poczekac " .. czas-os.time() .. " sekund.")
end
doRemoveMonstersFromArea(fromPos,toPos)
doRemoveItemsFromArea(fromPos,toPos)
doPlayerSendTextMessage(cid, 25, "Wszedles na " .. ile_minut .." minut do pomieszczenia.")
setPlayerStorageValue(cid,storage, os.time() + ile_minut*60)
setGlobalStorageValue(storage_czas, os.time() + ile_minut*60)
doTeleportThing(cid, {x=5297, y=5377, z=7})
addEvent(kick, ile_minut*60 * 1000)
else
doTeleportThing(cid, fromPosition)
doPlayerSendTextMessage(cid,22," Musisz poczkeac ".. czas-os.time() .." sekund.")
doTeleportThing(cid, {x=5297, y=5383, z=7})
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
end
return true
end[/SQL]
[SQL]local storage_czas = 16566
local ile_minut = 1
local storage = 1234
local exh = 20 -- Ile sekund exhaused po kicku
local fromPos = {x=5290, y=5365, z=7} -- lewy g?rny rog hunting room
local toPos = {x=5304, y=5379, z=7} -- prawy dolny r?g hunting roomu
function kick()
if isPlayerInArea(fromPos,toPos) > 0 then
doTpPlayersFromArea(fromPos,toPos, {x=5290, y=5381, z=7}, "Czas minal.")
end
end
function onStepIn(cid, item, pos, fromPosition)
local czas = getGlobalStorageValue(storage_czas)
if isPlayerInArea(fromPos,toPos) == 0 then
if getPlayerStorageValue(cid,storage) > os.time() then
doPlayerSendCancel(cid," Musisz poczekac " .. getPlayerStorageValue(cid,storage)-os.time() .. " sekund.")
doTeleportThing(cid, {x=5297, y=5383, z=7})
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
return true
end
if czas <= os.time() then
doPlayerSendCancel(cid," Musisz poczekac " .. czas-os.time() .. " sekund.")
end
doRemoveMonstersFromArea(fromPos,toPos)
doRemoveItemsFromArea(fromPos,toPos)
doPlayerSendTextMessage(cid, 25, "Wszedles na " .. ile_minut .." minut do pomieszczenia.")
setPlayerStorageValue(cid,storage, os.time() + ile_minut*60)
setGlobalStorageValue(storage_czas, os.time() + ile_minut*60)
doTeleportThing(cid, {x=5297, y=5377, z=7})
addEvent(kick, ile_minut*60 * 1000)
else
doTeleportThing(cid, fromPosition)
doPlayerSendTextMessage(cid,22," Musisz poczkeac ".. czas-os.time() .." sekund.")
doTeleportThing(cid, {x=5297, y=5383, z=7})
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
end
return true
end[/SQL]
szkoda dzi?kuje temat do zamkni?cia