Метатабличный / Говнокод #27687 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
  33. 33
  34. 34
  35. 35
  36. 36
  37. 37
  38. 38
  39. 39
  40. 40
  41. 41
  42. 42
  43. 43
  44. 44
  45. 45
  46. 46
  47. 47
  48. 48
  49. 49
  50. 50
  51. 51
  52. 52
  53. 53
  54. 54
  55. 55
  56. 56
  57. 57
  58. 58
  59. 59
  60. 60
  61. 61
  62. 62
  63. 63
  64. 64
  65. 65
  66. 66
  67. 67
  68. 68
  69. 69
  70. 70
  71. 71
  72. 72
  73. 73
  74. 74
  75. 75
  76. 76
  77. 77
  78. 78
  79. 79
  80. 80
  81. 81
  82. 82
  83. 83
  84. 84
  85. 85
  86. 86
  87. 87
  88. 88
  89. 89
  90. 90
  91. 91
  92. 92
  93. 93
  94. 94
  95. 95
function throw_artefact(obj)
	if obj==nil then
		return
	end
	math.randomseed(time_global())
	local rnd=math.random(10)
	local sect = obj:section()
	local lv = obj:level_vertex_id()
	local gv = obj:game_vertex_id()
	local pos = obj:position()
	local off_x = 2
	local off_y = 1.5
	local off_z = 2
	pos.x = pos.x + off_x
	pos.y = pos.y + off_y
	pos.z = pos.z + off_z	
	if lv and gv and pos then
		math.randomseed(time_global())
		if string.find(sect, "witches") then			
			if string.find(sect, "weak") then
				math.randomseed(time_global())
				if math.random(4) == 1 then alife():create("af_electra_sparkler", pos, lv, gv) end
			elseif string.find(sect, "average") then
				math.randomseed(time_global())
				if math.random(6) == 1 then alife():create("af_electra_sparkler", pos, lv, gv) end
				if math.random(4) == 1 then alife():create("af_electra_flash", pos, lv, gv) end
			else
				math.randomseed(time_global())
				if math.random(4) == 1 then alife():create("af_electra_moonlight", pos, lv, gv) end
				if math.random(5) == 1 then alife():create("af_electra_flash", pos, lv, gv) end
				if math.random(5) == 1 then alife():create("af_electra_sparkler", pos, lv, gv) end
			end
			
		elseif string.find(sect, "mosquito") then
			math.randomseed(time_global())
			if string.find(sect, "weak") then
				if math.random(6) == 1 then alife():create("af_cristall_flower", pos, lv, gv) end
			elseif string.find(sect, "average") then
				if math.random(4) == 1 then alife():create("af_cristall_flower", pos, lv, gv) end
				if math.random(5) == 1 then alife():create("af_medusa", pos, lv, gv) end
			else
				if math.random(6) 	== 1 then alife():create("af_night_star", pos, lv, gv) end
				if math.random(4)  == 1 then alife():create("af_medusa", pos, lv, gv) end
				if math.random(5)  == 1 then alife():create("af_cristall_flower", pos, lv, gv) end
			end
			
		elseif string.find(sect, "mincer") then
			math.randomseed(time_global())
			if string.find(sect, "weak") then
				if math.random(6)==1 then alife():create("af_blood", pos, lv, gv) end
			elseif string.find(sect, "average") then
				if math.random(5) == 1 then alife():create("af_blood", pos, lv, gv) end
				if math.random(4) <= 1 then alife():create("af_mincer_meat", pos, lv, gv) end
			else
				if math.random(6) == 1 then alife():create("af_soul", pos, lv, gv) end
				if math.random(4) == 1 then alife():create("af_mincer_meat", pos, lv, gv) end
				if math.random(5) == 1 then alife():create("af_blood", pos, lv, gv) end
			end
			
		elseif string.find(sect, "gravi") then
			math.randomseed(time_global())
			if string.find(sect, "weak") then
				if math.random(6)==1 then alife():create("af_vyvert", pos, lv, gv) end
			elseif string.find(sect, "average") then
				if math.random(4) == 1 then alife():create("af_vyvert", pos, lv, gv) end
				if math.random(5) <= 1 then alife():create("af_gravi", pos, lv, gv) end
			else
				if math.random(6) == 1 then alife():create("af_gold_fish", pos, lv, gv) end
				if math.random(4) == 1 then alife():create("af_gravi", pos, lv, gv) end
				if math.random(5) == 1 then alife():create("af_vyvert", pos, lv, gv) end
			end
			
		elseif string.find(sect, "ameba") or string.find(sect, "burning_fuzz") or string.find(sect, "rusty") then
				math.randomseed(time_global())
				if math.random(2) == 1 then alife():create("af_rusty_sea-urchin", pos, lv, gv) end
				if math.random(2) == 1 then alife():create("af_rusty_kristall", pos, lv, gv) end
				if math.random(2) == 1 then alife():create("af_rusty_thorn", pos, lv, gv) end
		elseif string.find(sect, "buzz") then
			if string.find(sect, "weak") then
				if math.random(6)==1 then alife():create("af_ameba_slug", pos, lv, gv) end
			elseif string.find(sect, "average") then
				if math.random(5) == 1 then alife():create("af_ameba_slime", pos, lv, gv) end
				if math.random(4) <= 1 then alife():create("af_ameba_slug", pos, lv, gv) end
			else
				if math.random(5) == 1 then alife():create("af_ameba_mica", pos, lv, gv) end
				if math.random(5) == 1 then alife():create("af_ameba_slug", pos, lv, gv) end
				if math.random(4) == 1 then alife():create("af_ameba_slime", pos, lv, gv) end
			end

elseif string.find(sect, "doggy") then
			local n=0
			math.randomseed(time_global())
			for n=1, math.random(3) do
				alife():create("dog_weak", pos, lv, gv)
			end

Свиток перебирает аномалии на локации и по рандому спавнит в них артефакты.
Да, блять - мне пришлось изучить луа. Теперь я тоже "золотой хуй".

Нижние строки отвечают за функционирование самодельной аномалии, которая после полуночи (по ИВ) плодит гипнособак и прочую нечисть. Стаи собак вырезают целые поселения; таким образом, я стал поистине сталкером. Так как я давно фриплею, надо разнообразить ко-ко-корутину.

Запостил: CBuHOKYP CBuHOKYP, (Updated )

Комментарии (17) RSS

  • Давайте же, прокомментируйте мой труд. Я зря что ли выебывался?
    Ответить
    • луа гавно ... у меня есть TypeScript для Lua. используй его
      Ответить
      • Все было пасмурно и серо,
        И лес стоял, как неживой

        И только гиря говномера
        Слегка качала головой.

        Не все напрасно в этом мире,
        Хотя и грош ему цена,

        Покуда существуют гири
        И виден уровень говна
        Ответить
  • Мдя. Единственный осмысленный говнокод с этой файки.
    Ответить

Добавить комментарий

Семь раз отмерь — один отрежь, guest!

    А не использовать ли нам bbcode?


    8