Advertisement
Guest User

Untitled

a guest
Feb 11th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.09 KB | None | 0 0
  1. local requiredGroup = 3
  2. 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"
  3. local item = 1810
  4. local EventMsg = "Walk through this teleport to get back to thais temple!"
  5. local EventMsg1 = "Walk through this teleport to get to the current Event!"
  6.  
  7. local eventfootball = "The football event has started! \n Go to Thais, Carlin or Venore and step into the teleport to join!"
  8. local teleportfootball = {x = 32791, y = 31167, z = 8}
  9. local teleportfootballback = {x = 32791, y = 31167, z = 8}
  10.  
  11. local thaisdp = {x = 32342, y = 32220, z = 7}
  12. local carlindp = {x = 32329, y =31779, z = 7}
  13. local venoredp = {x = 32915, y = 32072, z = 7}
  14. local Temple = {x = 32369, y= 32241, z= 7}
  15.  
  16. local players_pos = {
  17. {x =, y =, z =},
  18. {x =, y =, z =},
  19. {x =, y =, z =},
  20. {x =, y =, z =},
  21. {x =, y =, z =},
  22. {x =, y =, z =},
  23. {x =, y =, z =},
  24. {x =, y =, z =},
  25. {x =, y =, z =},
  26. {x =, y =, z =},
  27. {x =, y =, z =},
  28. {x =, y =, z =},
  29. {x =, y =, z =},
  30. {x =, y =, z =},
  31. {x =, y =, z =},
  32. {x =, y =, z =},
  33. {x =, y =, z =},
  34. {x =, y =, z =},
  35. {x =, y =, z =}
  36. }
  37.  
  38.  
  39.  
  40.  
  41. function onSay(cid, words, param)
  42. local param = param.explode(param, ',')
  43. doShowTextDialog(cid, item, MSG)
  44. if param == "football" then
  45. broadcastMessage(eventfootball, MESSAGE_EVENT_ADVANCE)
  46. doCreateTeleport(1387, teleportfootball, thaisdp)
  47. doCreateTeleport(1387, teleportfootball, carlindp)
  48. doCreateTeleport(1387, teleportfootball, venoredp)
  49. doCreateTeleport(1387, Temple, teleportfootballback) -- Teleport going back from Football event
  50. doCreateItem(1304, 1, {x = 32790, y = 31168, z = 8}) -- Stone blocking regular teleport to the football arena
  51. local blackboard = doCreateItem(1818, 1, {x = 32790, y = 31167, z = 8}) -- Thais blackboard information
  52. doSetItemText(blackboard, EventMsg)
  53. local blackboard1 = doCreateItem(1811, 1, {x = 32342, y = 32219, z = 7}) -- Football event blackboard information
  54. doSetItemText(blackboard1, EventMsg1)
  55. local blackboard2 = doCreateItem(1815, 1, {x = 32914, y = 32072, z = 7})
  56. doSetItemText(blackboard2, EventMsg1)
  57. local blackboard3 = doCreateItem(1810, 1, {x = 32329, y = 31778, z = 7})
  58. doSetItemText(blackboard3, EventMsg1)
  59. elseif param == "footballstop" then
  60. doRemoveItem(getTileItemById(thaisdp, 1387).uid, 1)
  61. doRemoveItem(getTileItemById(carlindp, 1387).uid, 1)
  62. doRemoveItem(getTileItemById(venoredp, 1387).uid, 1)
  63. doRemoveItem(getTileItemById(teleportfootballback, 1387).uid, 1)
  64. doRemoveItem(getTileItemById({x = 32790, y = 31168, z = 8}, 1304).uid, 1)
  65. doRemoveItem(getTileItemById({x = 32790, y = 31167, z = 8}, 1818).uid, 1)
  66. doRemoveItem(getTileItemById({x = 32342, y = 32219, z = 7}, 1811).uid, 1)
  67. doRemoveItem(getTileItemById({x = 32914, y = 32072, z = 7}, 1815).uid, 1)
  68. doRemoveItem(getTileItemById({x = 32329, y = 31778, z = 7}, 1810).uid, 1)
  69. for i = 1, #players_pos do
  70. if local player = getThingfromPos(pos)
  71. if player.itemid > 0 then
  72. if isPlayer(player.uid) then
  73. doTeleportThing(player, Temple)
  74. end
  75. end
  76. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement