├── random-selection-fixtures ├── import.xml └── script.lua └── README.md /random-selection-fixtures/import.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /random-selection-fixtures/script.lua: -------------------------------------------------------------------------------- 1 | -- For select a random fixtures in the selection 2 | -- Created by Corentin Azelart, 03-Jun-2015, v3.1.0.8 3 | 4 | -- Extract some vars 5 | local internal_name = select(1,...); 6 | local visible_name = select(2,...); 7 | 8 | -- Declare a logger 9 | local E = gma.feedback; 10 | 11 | -- Declare a gma command 12 | local C = gma.cmd; 13 | 14 | -- Init... 15 | E("Plugin " .. internal_name .. " successfully loaded.") 16 | E("Plugin will appear as " .. visible_name .. " in plugin pool.") 17 | 18 | local function NewRandomFixturesSelection() 19 | local selectedFixtures = gma.show.getvar("SELECTEDFIXTURESCOUNT"); 20 | if(tonumber(selectedFixtures) > 0) then 21 | for count = 0, selectedFixtures, 1 do 22 | C("Next"); 23 | if(math.random(0, 1) == 0) then 24 | C("At 100"); 25 | end 26 | end 27 | else 28 | gma.gui.confirm("Unable to find fixture selected", "Please select more groups and/or fixtures"); 29 | end 30 | end 31 | 32 | return NewRandomFixturesSelection; -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GrandMA2-Lua-Scripts 2 | A collection of GrandMA2 Lua Scripts 3 | 4 | ## Scripts 5 | 6 | * random-selection-fixtures : open the dimmer on a random fixtures selected 7 | * to be continued... 8 | 9 | ## Website 10 | * [GrandMA2.fr](http://www.grandma2.fr) 11 | * [MaLighting.com](http://www.malighting.com/) 12 | 13 | ## License 14 | 15 | ``` 16 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 17 | Version 2, December 2004 18 | 19 | Copyright (C) 2015 20 | 21 | Everyone is permitted to copy and distribute verbatim or modified 22 | copies of this license document, and changing it is allowed as long 23 | as the name is changed. 24 | 25 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 26 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 27 | 28 | 0. You just DO WHAT THE FUCK YOU WANT TO. 29 | ``` 30 | 31 | ``` 32 | This program is free software. It comes without any warranty, to 33 | the extent permitted by applicable law. You can redistribute it 34 | and/or modify it under the terms of the Do What The Fuck You Want 35 | To Public License, Version 2, as published by Corentin A. See 36 | http://www.wtfpl.net/ for more details. 37 | ``` --------------------------------------------------------------------------------