Advertisement
Guest User

Untitled

a guest
May 24th, 2015
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. cmdprops = {
  2. permission = 1,
  3. parameters = "is",
  4. }
  5.  
  6. local areas = {
  7. [0] = "San d'Oria",
  8. [1] = "Bastok",
  9. [2] = "Windurst",
  10. [3] = "Rise of the Zilart",
  11. [4] = "Treasures of Aht Urgan",
  12. [5] = "Wings of the Goddess",
  13. [6] = "Chains of Promathia",
  14. [7] = "Assault",
  15. [8] = "Campaign",
  16. [9] = "Crystalline Prophecy",
  17. [10] = "moogle Kupo d'Etat",
  18. [11] = "Shantotto Ascension",
  19. [12] = "Seekers of Adoulin",
  20. }
  21.  
  22. function onTrigger(player, logId, target)
  23. if not logId then
  24. player:PrintToPlayer( "You must enter a valid LogID!" )
  25. player:PrintToPlayer( "@checkmission <Log ID> <Player>" )
  26. return
  27. end
  28.  
  29. local person = player
  30. if target then
  31. person = GetPlayerByName(target)
  32. if not person then
  33. player:PrintToPlayer("Player '"..target.."' not found.")
  34. return
  35. end
  36. end
  37.  
  38. local name = areas[logId]
  39. if not name then
  40. player:PrintToPlayer("Invalid or unsupported LogID. The LogID must be 0-12.")
  41. return
  42. end
  43.  
  44. local current = person:getCurrentMission(logId)
  45. -- In the original code, the following check was only performed for the first 5 areas.
  46. -- This is presumably because the author gave up.
  47. if current == 255 then
  48. player:PrintToPlayer("No current "..name.." mission.")
  49. else
  50. player:PrintToPlayer("Current "..name.." mission ID is: '"..current.."' !")
  51. end
  52. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement