Reyenq
New Member
- Joined
- Dec 7, 2008
- Messages
- 14
- Reaction score
- 0
I need real addon npc, and loot buyer and seller
What i must change in this script, becouse ppl can do this 1 time. Switch no back to 1945
Quote:
What i must change in this script, becouse ppl can do this 1 time. Switch no back to 1945
Quote:
local playerPosition =
{
{x = 956, y = 1001, z = 7, stackpos = STACKPOS_TOP_CREATURE},
{x = 957, y = 1001, z = 7, stackpos = STACKPOS_TOP_CREATURE},
{x = 958, y = 1001, z = 7, stackpos = STACKPOS_TOP_CREATURE},
{x = 959, y = 1001, z = 7, stackpos = STACKPOS_TOP_CREATURE}
}
local newPosition =
{
{x = 956, y = 988, z = 7},
{x = 957, y = 988, z = 7},
{x = 958, y = 988, z = 7},
{x = 959, y = 988, z = 7}
}
-- Do not modify the declaration lines below.
local player = {0, 0, 0, 0}
local failed = TRUE
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == 1945 then
for i = 1, 4 do
player = getThingfromPos(playerPosition)
if player.itemid > 0 then
if isPlayer(player.uid) == TRUE then
if getPlayerStorageValue(player.uid, 40001) == -1 then
if getPlayerLevel(player.uid) >= 20 then
failed = FALSE
end
end
end
end
if failed == TRUE then
doPlayerSendCancel(cid, "Sorry, not possible.")
return TRUE
end
failed = TRUE
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