forked from gugutz/outlands-razor-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
script-boilerplate.razor
67 lines (48 loc) · 1.43 KB
/
script-boilerplate.razor
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#################################
# CREATE ALL LISTS FOR CONFIG
#################################
if not listexists 'scriptname_config_lists'
createlist 'scriptname_config_lists'
else
clearlist 'scriptname_config_lists'
endif
# routine-related lists
pushlist 'scriptname_config_lists' 'action_delay'
foreach list in 'scriptname_config_lists'
if not listexists list
createlist list
else
clearlist list
endif
endfor
#################################
# CREATE ALL TIMERS
#################################
createlist 'scriptname_timers'
pushlist 'scriptname_timers' 'loop_on_warning_msg'
foreach timer in 'scriptname_timers'
if not timerexists timer
createtimer timer
settimer timer 99999
endif
endfor
################################
# SCRIPT CONFIGURATION
################################
pushlist 'action_delay' 600
# VALIDATE THAT ALL CONFIG LISTS WERE ASSIGNED CONFIG VALUES
foreach list in 'activate_void_config_lists'
if not atlist list 0
sysmsg '{{list}} LIST MISSING VALUE!!!!!'
endif
endfor
#################################
# INITIALIZE THE CONFIGURATION VALUES AS VARIABLES BUT FROM LIST SO WE DONT NEED TO ITERATE TO GET THE INDEX 0
if atlist 'action_delay' 0 as action_delay
################################
# CODE
################################
################################
# CLOSE CONFIG 'if atlist' STATEMENTS
################################
endif