Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local config = {
- storage = 16000,
- level = 250,
- firstSqm =
- {
- {x = 247, y = 659, z = 13},
- {x = 247, y = 660, z = 13},
- {x = 247, y = 661, z = 13},
- {x = 247, y = 662, z = 13}
- },
- places =
- {
- {x = 189, y = 650, z = 13},
- {x = 189, y = 651, z = 13},
- {x = 189, y = 652, z = 13},
- {x = 189, y = 653, z = 13},
- }
- }
- function onUse(cid, item, fromPosition, itemEx, toPosition)
- local players = {}
- for _, position in ipairs(config.firstSqm) do
- local pid = getTopCreature(position).uid
- if(pid == 0 or not isPlayer(pid) or getPlayerStorageValue(pid, config.storage) > 0 or getPlayerLevel(pid) < config.level) then
- doPlayerSendTextMessage(pid, "The level required is ".. config.level ..", can only perform the quest once, only players can do it, it takes 4 participants.")
- return true
- end
- table.insert(players, pid)
- end
- for i, pid in ipairs(players) do
- doTeleportThing(pid, config.places[i], false)
- doSendMagicEffect(config.places[i], 14)
- end
- doTransformItem(item.uid, item.itemid + 1)
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement