/
nun_cda.bcs
168 lines (142 loc) · 6.42 KB
/
nun_cda.bcs
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
SCRIPT_NAME = "nuncda";
SCRIPT_DESC = "abbreviates _your_ holy bolt, dispel evil and holy lance type and damage messages";
SCRIPT_ON = true;
//DISCLAIMER: Nun blast messages are based on the amount of damage done, and as such the resist % should be taken as a guideline, not absolute truth.
// This script is still very much a work in progress, use at your own peril.
// Thanks to Glaurung and Hair for all the advice and emotional support.
//USER SETTINGS: Toggle gags for the original 'spell cast finished' messages. (You are surrounded by fuming white aura as you mutter 'Sanctum circum')
boolean gagSpellLines=true;
// For the Holy Lance gag to work, fill in your unique spellwords:
String holyLanceWords="'uxmus vqsol cyvii";
// Toggle colors.
boolean useColors=true;
// The default HTML color code for the echo. (https://htmlcolorcodes.com/)
String echoColor="FB00FF";
//ANSI color code options for inline coloring, actual colors are stored in the colors map.
String RESET = "\u001b[0m";
String BOLD = "\u001b[1m";
Map relics;
Map resists;
Map colors;
public boolean syggaxShieldSpecial;
public String dmgType;
void bootup() {
initMap();
triggerManager.newTrigger(
"nunCastHolyBolt",
"^Surges of holy force coil around your ([A-Za-z -]+) forming a (?:fuming|pulsing|vibrating|sparkling|radiating|humming) bolt of divine energy. You twist your wrist and bolt hurls through the air ([a-z ]+) on (.*).$",
"$"+SCRIPT_NAME+".echoHolyBoltMsg",
true,false,false,null,Font.PLAIN);
triggerManager.newTrigger(
"nunCastDispelEvil",
"^(?:Flash of brilliance takes over|Waves of holy force enfold|Air crackles around|Holy sparks fly around|White light tangles around) you as dazzling flash erupts from your ([A-Za-z -]+) and strikes ([a-z ]+) upon (.*)\\.$",
"$"+SCRIPT_NAME+".echoDispelEvilMsg",
true,false,false,null,Font.PLAIN);
triggerManager.newTrigger(
"nunCastHolyLance",
"^Your ([A-Za-z -]+) (?:shines divinely|sparkles|blazes in celestial flames|radiates purity|glitters softly) as white lightning strikes through the air ([a-z]+) (.*).$",
"$"+SCRIPT_NAME+".echoHolyLanceMsg",
true,false,false,null,Font.PLAIN);
triggerManager.newTrigger(
"nunSyggaxShieldSpecial",
"^Your round birch shield with bloodstone cross and rim glows (?:faintly|fiercely) violet.$",
"$"+SCRIPT_NAME+".setDmgTypeAsp",
true,false,false,null,Font.PLAIN);
if(gagSpellLines) {
triggerManager.newTrigger(
"gagNunBlastCast",
"^You (?:kiss|frantically swing|praise the saints and raise|kneel down squeezing|hold your|hop with one leg while praising Las and utter|roll your eyes while rubbing halo and sing out|wave|fume celestial force and utter the words|squeeze tightly on your glimmering|rub|raise|stare intensively at|mutter the magic words|cherish your|gaze to the heighs while holding|cut the air with|are surrounded by fuming white aura as you mutter|spread white glow with your|touch your pulsing halo and quickly recite|swing)[A-Za-z ,-]+'(?:Ez' div|Sanctum circum|"+holyLanceWords+")'$",
"",
true,false,false,null,Font.PLAIN);
}
}
void setDmgTypeAsp(){
syggaxShieldSpecial=true;
}
void echoHolyBoltMsg(){
String relic = vars.get(1);
String dmgMessage = vars.get(2);
String target = vars.get(3);
if(syggaxShieldSpecial){
dmgType = "Asph";
}else{
dmgType = relics.get(relic); }
if(dmgType == null){
dmgType = "Unlisted Relic"; }
String resist = resists.get(dmgMessage);
String typeColor = colors.get(dmgType);
if(useColors) {
clientGUI.printText("general", "Holy Bolt -> "+target+" "+BOLD+typeColor+"[ "+dmgType+" "+resist+" ]"+RESET+"\n", echoColor);
}else{ clientGUI.printText("general", "Holy Bolt -> "+target+" [ "+dmgType+" "+resist+" ]\n"); }
syggaxShieldSpecial=false;
}
void echoDispelEvilMsg(){
String relic = vars.get(1);
String dmgMessage = vars.get(2);
String target = vars.get(3);
if(syggaxShieldSpecial){
dmgType = "Asph";
}else{
dmgType = relics.get(relic); }
if(dmgType == null){
dmgType = "Unlisted Relic"; }
String resist = resists.get(dmgMessage);
String typeColor = colors.get(dmgType);
if(useColors) {
clientGUI.printText("general", "Dispel Evil -> "+target+" "+BOLD+typeColor+"[ "+dmgType+" "+resist+" ]"+RESET+"\n", echoColor);
}else{ clientGUI.printText("general", "Dispel Evil -> "+target+" [ "+dmgType+" "+resist+" ]\n"); }
syggaxShieldSpecial=false;
}
void echoHolyLanceMsg(){
String relic = vars.get(1);
String dmgMessage = vars.get(2);
String target = vars.get(3);
if(syggaxShieldSpecial){
dmgType = "Asph";
}else{
dmgType = relics.get(relic); }
if(dmgType == null){
dmgType = "Unlisted Relic"; }
String typeColor = colors.get(dmgType);
if(useColors) {
clientGUI.printText("general", "Holy Lance -> "+target+" "+BOLD+typeColor+"[ "+dmgType+" "+dmgMessage+" ]"+RESET+"\n", echoColor);
}else{ clientGUI.printText("general", "Holy Lance -> "+target+" [ "+dmgType+" "+dmgMessage+" ]\n"); }
syggaxShieldSpecial=false;
}
//SUPPORTED RELICS: crosier of angel, cold relic, fire relic, fat ruler, roth daily shield, add as needed
void initMap(){
relics = new HashMap();
relics.put("Crosier of Angel", "Mana");
relics.put("Ice cross", "Cold");
relics.put("silver crucifix of Las", "REFUEL ME PLZ");
relics.put("BURNING crucifix of Las", "Fire");
relics.put("Fat ruler", "FAT RULER");
relics.put("Misty Rosary", "ROSARY");
relics.put("platinum-cross shield of Sashita", "Mana");
//Damage messages with associated resist bracket
resists = new HashMap();
resists.put("detonating", "0%");
resists.put("bursting", "20%");
resists.put("popping", "100%");
resists.put("crashing", "80%");
resists.put("exploding", "60%");
resists.put("blowing up", "80%");
resists.put("slamming", "40%");
resists.put("with immense power", "0%");
resists.put("with terrific force", "<20%");
resists.put("with sheer force", "20%");
resists.put("with blazing rage", "40%");
resists.put("with purifying glow", "60%");
resists.put("mightily", "80%");
resists.put("hard", "100%");
//ANSI color codes for type damage coloring, customize as needed.
colors = new HashMap();
colors.put("Fire", "\u001b[31m"); // red
colors.put("Mana", "\u001b[33m"); // yellow
colors.put("Cold", "\u001b[36m"); // cyan
colors.put("FAT RULER", "\u001b[33m"); // yellow
colors.put("ROSARY", "\u001b[33m"); // yellow
colors.put("REFUEL ME PLZ", "\u001b[33m"); // yellow
colors.put("Asph", "\u001b[35m"); // magenta
colors.put("Unlisted Relic", "\u001b[33m"); // yellow
}