Advertisement
Guest User

Untitled

a guest
Apr 24th, 2015
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.69 KB | None | 0 0
  1. trajet = {}
  2. trajet[1] = "7,7"
  3. trajet[2] = "271"
  4.  
  5. function processMap()
  6.     for index, map in pairs(trajet) do
  7.         if onMap(map[1]) then
  8.                 changeMap(map[2])
  9.             return true
  10.         end
  11.     end
  12.     return false
  13. end
  14.  
  15. -- Boucle principale qui tourne tant que nous sommes sur des maps connues
  16. -- Si aucune action n'est définie sur la map actuelle, stoppe le script
  17. function Main()
  18.     while true do
  19.        printMessage(tostring(trajet[2]))
  20.         if not processMap() then
  21.             printError("Oops, je crois que je suis perdu...")
  22.             break
  23.         end
  24.     end
  25. end
  26.  
  27. printMessage("Démarrage du script.")
  28. Main()
  29. printMessage("Fin du script.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement