Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local requiredGroup = 3
- local MSG = ".:: Events Options ::.\nPossible Events:\n*Football\nExample of how you use it: /event football\nIf you wish to end a current event, type for an example: /event footballstop"
- local item = 1810
- local EventMsg = "Walk through this teleport to get back to thais temple!"
- local EventMsg1 = "Walk through this teleport to get to the current Event!"
- local eventfootball = "The football event has started! \n Go to Thais, Carlin or Venore and step into the teleport to join!"
- local teleportfootball = {x = 32791, y = 31167, z = 8}
- local teleportfootballback = {x = 32791, y = 31167, z = 8}
- local thaisdp = {x = 32342, y = 32220, z = 7}
- local carlindp = {x = 32329, y =31779, z = 7}
- local venoredp = {x = 32915, y = 32072, z = 7}
- local Temple = {x = 32369, y= 32241, z= 7}
- local players_pos = {
- {x =, y =, z =},
- {x =, y =, z =},
- {x =, y =, z =},
- {x =, y =, z =},
- {x =, y =, z =},
- {x =, y =, z =},
- {x =, y =, z =},
- {x =, y =, z =},
- {x =, y =, z =},
- {x =, y =, z =},
- {x =, y =, z =},
- {x =, y =, z =},
- {x =, y =, z =},
- {x =, y =, z =},
- {x =, y =, z =},
- {x =, y =, z =},
- {x =, y =, z =},
- {x =, y =, z =},
- {x =, y =, z =}
- }
- function onSay(cid, words, param)
- local param = param.explode(param, ',')
- doShowTextDialog(cid, item, MSG)
- if param == "football" then
- broadcastMessage(eventfootball, MESSAGE_EVENT_ADVANCE)
- doCreateTeleport(1387, teleportfootball, thaisdp)
- doCreateTeleport(1387, teleportfootball, carlindp)
- doCreateTeleport(1387, teleportfootball, venoredp)
- doCreateTeleport(1387, Temple, teleportfootballback) -- Teleport going back from Football event
- doCreateItem(1304, 1, {x = 32790, y = 31168, z = 8}) -- Stone blocking regular teleport to the football arena
- local blackboard = doCreateItem(1818, 1, {x = 32790, y = 31167, z = 8}) -- Thais blackboard information
- doSetItemText(blackboard, EventMsg)
- local blackboard1 = doCreateItem(1811, 1, {x = 32342, y = 32219, z = 7}) -- Football event blackboard information
- doSetItemText(blackboard1, EventMsg1)
- local blackboard2 = doCreateItem(1815, 1, {x = 32914, y = 32072, z = 7})
- doSetItemText(blackboard2, EventMsg1)
- local blackboard3 = doCreateItem(1810, 1, {x = 32329, y = 31778, z = 7})
- doSetItemText(blackboard3, EventMsg1)
- elseif param == "footballstop" then
- doRemoveItem(getTileItemById(thaisdp, 1387).uid, 1)
- doRemoveItem(getTileItemById(carlindp, 1387).uid, 1)
- doRemoveItem(getTileItemById(venoredp, 1387).uid, 1)
- doRemoveItem(getTileItemById(teleportfootballback, 1387).uid, 1)
- doRemoveItem(getTileItemById({x = 32790, y = 31168, z = 8}, 1304).uid, 1)
- doRemoveItem(getTileItemById({x = 32790, y = 31167, z = 8}, 1818).uid, 1)
- doRemoveItem(getTileItemById({x = 32342, y = 32219, z = 7}, 1811).uid, 1)
- doRemoveItem(getTileItemById({x = 32914, y = 32072, z = 7}, 1815).uid, 1)
- doRemoveItem(getTileItemById({x = 32329, y = 31778, z = 7}, 1810).uid, 1)
- for i = 1, #players_pos do
- if local player = getThingfromPos(pos)
- if player.itemid > 0 then
- if isPlayer(player.uid) then
- doTeleportThing(player, Temple)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement