Changeset 638

User picture

Author: Aurorablade

(2012/02/22 05:50) 3 months ago

re #89 error on zone level, coordinites returning out of range even when not.

Affected files

Updated GHI/DynamicActions/GHI_ActionEffects.lua Download diff

637638
32
	    for i=1,numPets do
32
	    for i=1,numPets do
33
33
34
	        _, cName, _, _, active,_ = GetCompanionInfo("CRITTER", i)
34
	        _, cName, _, _, active,_ = GetCompanionInfo("CRITTER", i)
35
             if active then
35
36
                  if cName:lower() == targetCompanion:lower() then
36
             if cName:lower() == targetCompanion:lower() then
37
                  if active then
38
                    dyn.TriggerOutPort("issummon");
39
                  else
37
                     dyn.SetOutput("currentPet",cName);
40
                     dyn.SetOutput("currentPet",cName);
38
                     dyn.TriggerOutPort("summon");
41
                     dyn.TriggerOutPort("summon");
39
                     --unsure if correct as the code next to summon will be
42
                     --unsure if correct as the code next to summon will be
40
                     --CallCompanion("CRITTER", i)
43
                     CallCompanion("CRITTER", i)
41
                  else
44
42
                     dyn.TriggerOutPort("issummon");
43
                  end
45
                  end
44
	        end
46
	        end
45
	    end
47
	    end
...
...
52
			description = "If the player does not have the companion summoned, summon it",
54
			description = "If the player does not have the companion summoned, summon it",
53
		},
55
		},
54
		issummon = {
56
		issummon = {
55
			name = "Dismiss Current",
57
			name = "Has a Companion",
56
			direction = "out",
58
			direction = "out",
57
			order = 2,
59
			order = 2,
58
			description = "If the player has pet Summoned but not the one input",
60
			description = "If the player has pet Summoned",
59
		},
61
		},
60
	},
62
	},
61
	inputs = {
63
	inputs = {
...
...
102
104
103
	        if active then
105
	        if active then
104
106
105
              -- DismissCompanion("CRITTER")
107
                DismissCompanion("CRITTER")
106
			 dyn.TriggerOutPort("dismiss");
108
			 dyn.TriggerOutPort("dismiss");
107
	        end
109
	        end
108
	    end
110
	    end
...
...
128
130
129
131
130
table.insert(GHI_ProvidedDynamicActions,{
132
table.insert(GHI_ProvidedDynamicActions,{
133
	name = "Summon Mount",
134
	guid = "mount_01",
135
	authorName = "The Gryphonheart Team",
136
	authorGuid = "00x1",
137
	version = 1,
138
	category = category,
139
	description = "This action summons a mount based on a provided input.",
140
	icon = "Interface\\Icons\\ability_mount_ridinghorse",
141
	gotOnSetupPort = false,
142
	setupOnlyOnce = false,
143
	script =
144
	[[
145
	    local numPets = GetNumCompanions("MOUNT");
146
147
	    local targetCompanion = dyn.GetInput("mount")
148
         local cName,active;
149
150
	    for i=1,numPets do
151
152
	        _, cName, _, _, active,_ = GetCompanionInfo("MOUNT", i)
153
154
             if cName:lower() == targetCompanion:lower() then
155
                  if active then
156
                    dyn.TriggerOutPort("issummon");
157
                  else
158
                   --dyn.SetOutput("currentPet",cName);
159
                     dyn.TriggerOutPort("summon");
160
                     CallCompanion("MOUNT", i)
161
162
                  end
163
	        end
164
	    end
165
	]],
166
	ports = {
167
		summon = {
168
			name = "Summon Mount",
169
			order = 1,
170
			direction = "out",
171
			description = "If the player does not have the mount summoned, summon it",
172
		},
173
		issummon = {
174
			name = "Has a Mount",
175
			direction = "out",
176
			order = 2,
177
			description = "If the player has mount Summoned",
178
		},
179
	},
180
	inputs = {
181
		mount = {
182
			name = "Mount",
183
			description = "The Companion name to summon",
184
			type = "string",
185
			defaultValue = "",
186
		},
187
	},
188
	outputs = {
189
190
	},
191
192
193
});
194
195
196
table.insert(GHI_ProvidedDynamicActions,{
197
	name = "Dismiss Mount",
198
	guid = "pet_02",
199
	authorName = "The Gryphonheart Team",
200
	authorGuid = "00x1",
201
	version = 1,
202
	category = category,
203
	description = "This action dismisses a summoned Mount.",
204
	icon = "Interface\\Icons\\ability_mount_ridinghorse",
205
	gotOnSetupPort = false,
206
	setupOnlyOnce = false,
207
	script =
208
	[[
209
	    local numPets = GetNumCompanions("CRITTER");
210
211
	    --local targetCompanion = dyn.GetInput("companion")
212
         local cName,active;
213
         --dyn.SetOutput("currentPet",false);
214
	    for i=1,numPets do
215
216
	        _, cName, _, _, active,_ = GetCompanionInfo("CRITTER", i)
217
218
	        if active then
219
220
              if not(IsFlying()) then
221
                DismissCompanion("MOUNT")
222
			 dyn.TriggerOutPort("dismiss");
223
		    end
224
	        end
225
	    end
226
	]],
227
	ports = {
228
		dismiss = {
229
			name = "Dismiss Mount",
230
			order = 1,
231
			direction = "out",
232
			description = "Dismisses a currently summoned companion",
233
          },
234
	},
235
	inputs = {
236
237
	},
238
	outputs = {
239
240
241
	},
242
243
244
});
245
246
table.insert(GHI_ProvidedDynamicActions,{
131
	name = "Play Sound",
247
	name = "Play Sound",
132
	guid = "sound_01",
248
	guid = "sound_01",
133
	authorName = "The Gryphonheart Team",
249
	authorName = "The Gryphonheart Team",

Updated GHI/DynamicActions/GHI_Location.lua Download diff

637638
246
	version = 1,
246
	version = 1,
247
	category = category,
247
	category = category,
248
	description = "Check coordinates in a circle",
248
	description = "Check coordinates in a circle",
249
	icon = "Interface\\Icons\\INV_Misc_Map_01",
249
	icon = "Interface\\Icons\\inv_misc_idol_05",
250
	gotOnSetupPort = false,
250
	gotOnSetupPort = false,
251
	setupOnlyOnce = false,
251
	setupOnlyOnce = false,
252
	script =
252
	script =
...
...
332
	version = 1,
332
	version = 1,
333
	category = category,
333
	category = category,
334
	description = "Check coordinates in a Square",
334
	description = "Check coordinates in a Square",
335
	icon = "Interface\\Icons\\INV_Misc_Map_01",
335
	icon = "Interface\\Icons\\inv_misc_idol_05",
336
	gotOnSetupPort = false,
336
	gotOnSetupPort = false,
337
	setupOnlyOnce = false,
337
	setupOnlyOnce = false,
338
	script =
338
	script =

Updated GHI/DynamicActions/GHI_PlayerRequirements.lua Download diff

637638
18
	version = 1,
18
	version = 1,
19
	category = category,
19
	category = category,
20
	description = "This action checks for a Profession based on a provided input.",
20
	description = "This action checks for a Profession based on a provided input.",
21
	icon = "Interface\\Icons\\inv_pet_deweaonizedmechcompanion",
21
	icon = "Interface\\Icons\\trade_tailoring",
22
	gotOnSetupPort = false,
22
	gotOnSetupPort = false,
23
	setupOnlyOnce = false,
23
	setupOnlyOnce = false,
24
	script =
24
	script =

Updated GHI/DynamicActions/GHI_StringFormat.lua Download diff

637638
20
	version = 1,
20
	version = 1,
21
	category = category,
21
	category = category,
22
	description = "This action detects the string contains a given word or not",
22
	description = "This action detects the string contains a given word or not",
23
	icon = "Interface\\Icons\\INV_Misc_Note_04",
23
	icon = "Interface\\Icons\\INV_Misc_Note_01",
24
	gotOnSetupPort = false,
24
	gotOnSetupPort = false,
25
	setupOnlyOnce = false,
25
	setupOnlyOnce = false,
26
	script =
26
	script =
27
	[[  local targetString = dyn.GetInput("string");
27
	[[  local targetString = dyn.GetInput("string");
28
	    local targetWord = dyn.GetInput("word");
28
	    local targetWord = dyn.GetInput("word");
29
29
30
         local gotWord = str	find(targetString,targetWord)
30
         local gotWord = strfind(targetString,targetWord)
31
	    if gotWord then
31
	    if gotWord then
32
	          dyn.TriggerOutPort("hasWord");
32
	          dyn.TriggerOutPort("hasWord");
33
	    else
33
	    else
...
...
78
	version = 1,
78
	version = 1,
79
	category = category,
79
	category = category,
80
	description = "This action detects if a string equals something else",
80
	description = "This action detects if a string equals something else",
81
	icon = "Interface\\Icons\\INV_Misc_Note_04",
81
	icon = "Interface\\Icons\\INV_Misc_Note_03",
82
	gotOnSetupPort = false,
82
	gotOnSetupPort = false,
83
	setupOnlyOnce = false,
83
	setupOnlyOnce = false,
84
	script =
84
	script =
...
...
134
	authorGuid = "00x1",
134
	authorGuid = "00x1",
135
	version = 1,
135
	version = 1,
136
	category = category,
136
	category = category,
137
	description = "This action detects the string contains a given word or not",
137
	description = "This action joins to diffrent string together",
138
	icon = "Interface\\Icons\\INV_Misc_Note_04",
138
	icon = "Interface\\Icons\\INV_Misc_Note_02",
139
	gotOnSetupPort = false,
139
	gotOnSetupPort = false,
140
	setupOnlyOnce = false,
140
	setupOnlyOnce = false,
141
	script =
141
	script =
142
	[[  local targetString = dyn.GetInput("string1");
142
	[[  local targetString = dyn.GetInput("string1");
143
	    local targetString2 = dyn.GetInput("string2");
143
	    local targetString2 = dyn.GetInput("string2");
144
144
145
         local newString = strjoin(" ",targetString,targetString2)
145
         local newString = strjoin("",targetString,targetString2)
146
146
147
	    dyn.SetOutput("joinedString",newString);
147
	    dyn.SetOutput("joinedString",newString);
148
	    dyn.TriggerOutPort("joinString");
148
	    dyn.TriggerOutPort("joinString");