• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[HELEP] Anni .

zyirc

New Member
Joined
Jul 15, 2008
Messages
175
Reaction score
0
Location
Sweden
Hello i have anni quest in my server and i mapped today i changed Switch:1945 to Switch:1946 and it worked but it only works every server restart and i want to change that it works everytime with out restart. so if someone would mind to give me some help and help me fix this i give you REP+++

TFS.02

annihilator.lua

local playerPosition =
{
{x = 33222, y = 31671, z = 13, stackpos = STACKPOS_TOP_CREATURE},
{x = 33223, y = 31671, z = 13, stackpos = STACKPOS_TOP_CREATURE},
{x = 33224, y = 31671, z = 13, stackpos = STACKPOS_TOP_CREATURE},
{x = 33225, y = 31671, z = 13, stackpos = STACKPOS_TOP_CREATURE}
}

local newPosition =
{
{x = 33219, y = 31659, z = 13},
{x = 33220, y = 31659, z = 13},
{x = 33221, y = 31659, z = 13},
{x = 33222, y = 31659, z = 13}
}

-- Do not modify the declaration lines below.
local player = {0, 0, 0, 0}
local failed = FALSE

function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == 1945 then
for i = 1, 4 do
failed = TRUE
player = getThingfromPos(playerPosition)
if player.itemid > 0 then
if isPlayer(player.uid) == TRUE then
if getPlayerStorageValue(player.uid, 30015) == -1 then
if getPlayerLevel(player.uid) >= 100 then
failed = FALSE
end
end
end
end
if failed == TRUE then
doPlayerSendCancel(cid, "Sorry, not possible.")
return TRUE
end
end
for i = 1, 4 do
doSendMagicEffect(playerPosition, CONST_ME_POFF)
doTeleportThing(player.uid, newPosition, FALSE)
doSendMagicEffect(newPosition, CONST_ME_ENERGYAREA)
end
doTransformItem(item.uid, item.itemid + 1)
elseif item.itemid == 1946 then
doPlayerSendCancel(cid, "Sorry, not possible.")
end
return TRUE
end
 
Back
Top