Advertisement
Guest User

Магрогул

a guest
Sep 11th, 2015
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.24 KB | None | 0 0
  1. init python:import random
  2.     last = -1
  3.     def margo_rand(o):
  4.         global last
  5.         z = random.randint(0, o)
  6.         while z == last:
  7.             z = random.randint(0, o)
  8.         last = z
  9.         return z
  10.    
  11.    
  12.     def margo_main(amount = 10):
  13.         result = u"М"
  14.         t = 5 + margo_rand(amount)
  15.         tmp = margo_rand(2)
  16.         if tmp == 0:
  17.             result += u"а"
  18.         elif tmp == 1:
  19.             result += u"у"
  20.         else:
  21.             result += u"о"
  22.         if margo_rand(1) == 1:
  23.             result += u"рг"
  24.         else:
  25.             result += u"гр"
  26.         result += u"а"
  27.         i = 0
  28.         while i < t:
  29.             i += 1
  30.             tmp = margo_rand(4)
  31.             if tmp == 0:
  32.                 result += u"р"
  33.             elif tmp == 1:
  34.                 result += u"гу"
  35.             elif tmp == 2:
  36.                 result += u"ла"
  37.             elif tmp == 3:
  38.                 result += u"го"
  39.         result += u"л"
  40.         return result
  41.    
  42.     mods["TheRasVa__magro_test"] = u"Генератор Моргораграгола"
  43.  
  44.  
  45. label TheRasVa__magro_test:
  46.     $ ololo = margo_main(1)
  47.     $ alala = margo_main()
  48.     $ renpy.say(ololo, "%(alala)s")
  49.     jump TheRasVa__magro_test
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement