Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local config = {
- entry =
- {
- {x = 1000, y = 1000, z = 7}, -- player 1
- {x = 1000, y = 1002, z = 7} -- player 2
- },
- destination =
- {
- {x = 1000, y = 1002, z = 7}, --player 1 ny plats
- {x = 1000, y = 1000, z = 7} --player 2 ny plats
- }
- }
- function onUse(cid, item, fromPosition, itemEx, toPosition)
- if(item.itemid == 1946) then
- if(config.daily) then
- doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
- else
- doTransformItem(item.uid, item.itemid - 1)
- end
- return true
- end
- if(item.itemid ~= 1945) then
- return true
- end
- local players = {}
- for _, position in ipairs(config.entry) do
- local pid = getTopCreature(position).uid
- end
- end
- for i, pid in ipairs(players) do
- doSendMagicEffect(config.entry[i], CONST_ME_POFF)
- doTeleportThing(pid, config.destination[i], false)
- doSendMagicEffect(config.destination[i], CONST_ME_ENERGYAREA)
- end
- doTransformItem(item.uid, item.itemid + 1)
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement