president vankk
Web Developer & AuraOT Owner
- Joined
- Jul 10, 2009
- Messages
- 5,719
- Solutions
- 9
- Reaction score
- 339
Code:
local playerPosition =
{
{x = 235, y = 493, z = 13, stackpos = STACKPOS_TOP_CREATURE},
{x = 235, y = 494, z = 13, stackpos = STACKPOS_TOP_CREATURE},
{x = 235, y = 495, z = 13, stackpos = STACKPOS_TOP_CREATURE},
{x = 235, y = 496, z = 13, stackpos = STACKPOS_TOP_CREATURE}
}
local newPosition =
{
{x=424, y=485, z=10},
{x=423, y=485, z=10},
{x=422, y=485, z=10},
{x=421, y=485, z=10}
}
local demonPosition =
{
{x=422, y=483, z=10},
{x=424, y=483, z=10},
{x=423, y=487, z=10},
{x=425, y=487, z=10},
{x=425, y=485, z=10},
{x=426, y=485, z=10}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local player = {0, 0, 0, 0}
local failed = TRUE
local count = 0
item.new = 1946
if(item.itemid == 1945) then
if(os.time(t) >= (getGlobalStorageValue(9000) + 3600)) then
for i = 1, 4 do
player[i] = getThingfromPos(playerPosition[i])
if(player[i].itemid > 0) then
if(isPlayer(player[i].uid) == TRUE) then
if(getPlayerStorageValue(player[i].uid, 9000) < 1) then
if(getPlayerLevel(player[i].uid) >= 100 or getPlayerAccess(player[i].uid) >= 3) then
failed = FALSE
count = count + 1
end
end
end
end
if(failed == TRUE) then
doTransformItem(item.uid, 1946)
return TRUE
end
end
if(count == 4) then
for i = 1, 6 do
doSummonCreature("Demon", demonPosition[i])
end
for i = 1, 4 do
doSendMagicEffect(playerPosition[i], CONST_ME_POFF)
doTeleportThing(player[i].uid, newPosition[i], FALSE)
doSendMagicEffect(newPosition[i], CONST_ME_ENERGYAREA)
setPlayerStorageValue(player[i].uid, 9000, 1)
end
setGlobalStorageValue(9000, os.time(t))
end
end
else
item.new = 1945
end
doTransformItem(item.uid, item.new)
return TRUE
end
Bug:
he does not go to the place