diff --git a/jaggedpine/encounters/jpfwar.lua b/jaggedpine/encounters/jpfwar.lua index 944d9b81..cc1cb75d 100644 --- a/jaggedpine/encounters/jpfwar.lua +++ b/jaggedpine/encounters/jpfwar.lua @@ -140,76 +140,76 @@ function WarTimer(e) gnoll00 = GnollSpawnLocation(spn); elseif gnollcount == 3 then gnoll01 = GnollSpawnLocation(spn); - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll00:GetID()) then + if gnoll00 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll00:GetID()) then gnoll00:CastToNPC():MoveTo(1878,1086,-10,0,true); end elseif gnollcount == 4 then gnoll02 = GnollSpawnLocation(spn); - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll01:GetID()) then + if gnoll01 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll01:GetID()) then gnoll01:CastToNPC():MoveTo(1840,1078,-10,0,true); end elseif gnollcount == 5 then gnoll03 = GnollSpawnLocation(spn); - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll02:GetID()) then + if gnoll02 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll02:GetID()) then gnoll02:CastToNPC():MoveTo(1892,1053,-10,0,true); end elseif gnollcount == 6 then gnoll04 = GnollSpawnLocation(spn); - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll03:GetID()) then + if gnoll03 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll03:GetID()) then gnoll03:CastToNPC():MoveTo(2059,1055,-11,0,true); end elseif gnollcount == 7 then gnoll05 = GnollSpawnLocation(spn); - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll04:GetID()) then + if gnoll04 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll04:GetID()) then gnoll04:CastToNPC():MoveTo(2096,1072,-11,0,true); end elseif gnollcount == 8 then gnoll06 = GnollSpawnLocation(spn); - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll05:GetID()) then + if gnoll05 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll05:GetID()) then gnoll05:CastToNPC():MoveTo(2096,1079,-11,0,true); end elseif gnollcount == 9 then gnoll07 = GnollSpawnLocation(spn); - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll06:GetID()) then + if gnoll06 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll06:GetID()) then gnoll06:CastToNPC():MoveTo(2013,1090,-11,0,true); end elseif gnollcount == 10 then gnoll08 = GnollSpawnLocation(spn); - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll07:GetID()) then + if gnoll07 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll07:GetID()) then gnoll07:CastToNPC():MoveTo(2016,1108,-11,0,true); end elseif gnollcount == 11 then gnoll09 = GnollSpawnLocation(spn); - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll08:GetID()) then + if gnoll08 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll08:GetID()) then gnoll08:CastToNPC():MoveTo(2049,1123,-11,0,true); end elseif gnollcount == 12 then gnoll10 = GnollSpawnLocation(spn); - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll09:GetID()) then + if gnoll09 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll09:GetID()) then gnoll09:CastToNPC():MoveTo(1919,1259,-11,0,true); end elseif gnollcount == 13 then gnoll11 = GnollSpawnLocation(spn); - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll10:GetID()) then + if gnoll10 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll10:GetID()) then gnoll10:CastToNPC():MoveTo(1953,1329,-11,0,true); end elseif gnollcount == 14 then gnoll12 = GnollSpawnLocation(spn); - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll11:GetID()) then + if gnoll11 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll11:GetID()) then gnoll11:CastToNPC():MoveTo(2048,1211,-12,0,true); end elseif gnollcount == 15 then gnoll13 = GnollSpawnLocation(spn); - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll12:GetID()) then + if gnoll12 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll12:GetID()) then gnoll12:CastToNPC():MoveTo(1981,957,-12,0,true); end elseif gnollcount == 16 then gnoll14 = GnollSpawnLocation(spn); - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll13:GetID()) then + if gnoll13 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll13:GetID()) then gnoll13:CastToNPC():MoveTo(1994,1084,-11,0,true); end elseif gnollcount == 17 then - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll14:GetID()) then + if gnoll14 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll14:GetID()) then gnoll14:CastToNPC():MoveTo(1994,1084,-11,0,true); end eq.set_timer("gnollspawn",245000); @@ -217,76 +217,76 @@ function WarTimer(e) gnoll15 = GnollSpawnLocation(spn); elseif gnollcount == 19 then gnoll16 = GnollSpawnLocation(spn); - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll15:GetID()) then + if gnoll15 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll15:GetID()) then gnoll15:CastToNPC():MoveTo(1878,1086,-10,0,true); end elseif gnollcount == 20 then gnoll17 = GnollSpawnLocation(spn); - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll16:GetID()) then + if gnoll16 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll16:GetID()) then gnoll16:CastToNPC():MoveTo(1840,1078,-10,0,true); end elseif gnollcount == 21 then gnoll18 = GnollSpawnLocation(spn); - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll17:GetID()) then + if gnoll17 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll17:GetID()) then gnoll17:CastToNPC():MoveTo(1892,1053,-10,0,true); end elseif gnollcount == 22 then gnoll19 = GnollSpawnLocation(spn); - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll18:GetID()) then + if gnoll18 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll18:GetID()) then gnoll18:CastToNPC():MoveTo(2059,1055,-11,0,true); end elseif gnollcount == 23 then gnoll20 = GnollSpawnLocation(spn); - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll19:GetID()) then + if gnoll19 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll19:GetID()) then gnoll19:CastToNPC():MoveTo(2096,1072,-11,0,true); end elseif gnollcount == 24 then gnoll21 = GnollSpawnLocation(spn); - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll20:GetID()) then + if gnoll20 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll20:GetID()) then gnoll20:CastToNPC():MoveTo(2096,1079,-11,0,true); end elseif gnollcount == 25 then gnoll22 = GnollSpawnLocation(spn); - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll21:GetID()) then + if gnoll21 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll21:GetID()) then gnoll21:CastToNPC():MoveTo(2013,1090,-11,0,true); end elseif gnollcount == 26 then gnoll23 = GnollSpawnLocation(spn); - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll22:GetID()) then + if gnoll22 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll22:GetID()) then gnoll22:CastToNPC():MoveTo(2016,1108,-11,0,true); end elseif gnollcount == 27 then gnoll24 = GnollSpawnLocation(spn); - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll23:GetID()) then + if gnoll23 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll23:GetID()) then gnoll23:CastToNPC():MoveTo(2049,1123,-11,0,true); end elseif gnollcount == 28 then gnoll25 = GnollSpawnLocation(spn); - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll24:GetID()) then + if gnoll24 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll24:GetID()) then gnoll24:CastToNPC():MoveTo(1919,1259,-11,0,true); end elseif gnollcount == 29 then gnoll26 = GnollSpawnLocation(spn); - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll25:GetID()) then + if gnoll25 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll25:GetID()) then gnoll25:CastToNPC():MoveTo(1953,1329,-11,0,true); end elseif gnollcount == 30 then gnoll27 = GnollSpawnLocation(spn); - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll26:GetID()) then + if gnoll26 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll26:GetID()) then gnoll26:CastToNPC():MoveTo(2048,1211,-12,0,true); end elseif gnollcount == 31 then gnoll28 = GnollSpawnLocation(spn); - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll27:GetID()) then + if gnoll27 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll27:GetID()) then gnoll27:CastToNPC():MoveTo(1981,957,-12,0,true); end elseif gnollcount == 32 then gnoll29 = GnollSpawnLocation(spn); - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll28:GetID()) then + if gnoll28 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll28:GetID()) then gnoll28:CastToNPC():MoveTo(1994,1084,-11,0,true); end elseif gnollcount == 33 then - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll29:GetID()) then + if gnoll29 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll29:GetID()) then gnoll29:CastToNPC():MoveTo(1994,1084,-11,0,true); end eq.set_timer("gnollspawn",245000); @@ -295,95 +295,95 @@ function WarTimer(e) elseif gnollcount == 35 then gnoll31 = GnollSpawnLocation(spn); assassin1 = eq.spawn2(181347,0,0,2027,1140,-12,0); -- NPC: a_gnoll_assassin - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll30:GetID()) then + if gnoll30 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll30:GetID()) then gnoll30:CastToNPC():MoveTo(1878,1086,-10,0,true); end elseif gnollcount == 36 then gnoll32 = GnollSpawnLocation(spn); assassin2 = eq.spawn2(181347,0,0,1852,1269,-12,0); -- NPC: a_gnoll_assassin - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll31:GetID()) then + if gnoll31 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll31:GetID()) then gnoll31:CastToNPC():MoveTo(1840,1078,-10,0,true); end - if eq.get_entity_list():IsMobSpawnedByEntityID(assassin1:GetID()) then + if assassin1 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(assassin1:GetID()) then assassin1:CastToNPC():MoveTo(2013,1090,-11,0,true); end elseif gnollcount == 37 then gnoll33 = GnollSpawnLocation(spn); assassin3 = eq.spawn2(181347,0,0,1794,1042,-12,0); -- NPC: a_gnoll_assassin - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll32:GetID()) then + if gnoll32 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll32:GetID()) then gnoll32:CastToNPC():MoveTo(1892,1053,-10,0,true); end - if eq.get_entity_list():IsMobSpawnedByEntityID(assassin2:GetID()) then + if assassin2 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(assassin2:GetID()) then assassin2:CastToNPC():MoveTo(1953,1329,-11,0,true); end elseif gnollcount == 38 then gnoll34 = GnollSpawnLocation(spn); assassin4 = eq.spawn2(181347,0,0,2031,1148,-12,0); -- NPC: a_gnoll_assassin - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll33:GetID()) then + if gnoll33 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll33:GetID()) then gnoll33:CastToNPC():MoveTo(2059,1055,-11,0,true); end - if eq.get_entity_list():IsMobSpawnedByEntityID(assassin3:GetID()) then + if assassin3 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(assassin3:GetID()) then assassin3:CastToNPC():MoveTo(1892,-829,-10,0,true); end elseif gnollcount == 39 then gnoll35 = GnollSpawnLocation(spn); - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll34:GetID()) then + if gnoll34 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll34:GetID()) then gnoll34:CastToNPC():MoveTo(2096,1072,-11,0,true); end - if eq.get_entity_list():IsMobSpawnedByEntityID(assassin4:GetID()) then + if assassin4 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(assassin4:GetID()) then assassin4:CastToNPC():MoveTo(2096,1072,-11,0,true); end elseif gnollcount == 40 then gnoll36 = GnollSpawnLocation(spn); - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll35:GetID()) then + if gnoll35 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll35:GetID()) then gnoll35:CastToNPC():MoveTo(2096,1079,-11,0,true); end elseif gnollcount == 41 then gnoll37 = GnollSpawnLocation(spn); - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll36:GetID()) then + if gnoll36 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll36:GetID()) then gnoll36:CastToNPC():MoveTo(2013,1090,-11,0,true); end elseif gnollcount == 42 then gnoll38 = GnollSpawnLocation(spn); - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll37:GetID()) then + if gnoll37 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll37:GetID()) then gnoll37:CastToNPC():MoveTo(2016,1108,-11,0,true); end elseif gnollcount == 43 then gnoll39 = GnollSpawnLocation(spn); - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll38:GetID()) then + if gnoll38 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll38:GetID()) then gnoll38:CastToNPC():MoveTo(2049,1123,-11,0,true); end elseif gnollcount == 44 then gnoll40 = GnollSpawnLocation(spn); - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll39:GetID()) then + if gnoll39 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll39:GetID()) then gnoll39:CastToNPC():MoveTo(1919,1259,-11,0,true); end elseif gnollcount == 45 then gnoll41 = GnollSpawnLocation(spn); - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll40:GetID()) then + if gnoll40 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll40:GetID()) then gnoll40:CastToNPC():MoveTo(1953,1329,-11,0,true); end elseif gnollcount == 46 then gnoll42 = GnollSpawnLocation(spn); - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll41:GetID()) then + if gnoll41 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll41:GetID()) then gnoll41:CastToNPC():MoveTo(2048,1211,-12,0,true); end elseif gnollcount == 47 then gnoll43 = GnollSpawnLocation(spn); - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll42:GetID()) then + if gnoll42 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll42:GetID()) then gnoll42:CastToNPC():MoveTo(1981,957,-12,0,true); end elseif gnollcount == 48 then gnoll44 = GnollSpawnLocation(spn); - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll43:GetID()) then + if gnoll43 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll43:GetID()) then gnoll43:CastToNPC():MoveTo(1994,1084,-11,0,true); end elseif gnollcount == 49 then - if eq.get_entity_list():IsMobSpawnedByEntityID(gnoll44:GetID()) then + if gnoll44 ~= nil and eq.get_entity_list():IsMobSpawnedByEntityID(gnoll44:GetID()) then gnoll44:CastToNPC():MoveTo(1994,1084,-11,0,true); end eq.set_timer("gnollspawn",245000); @@ -449,7 +449,7 @@ end function SergeantTrade(e) local item_lib = require("items"); - if item_lib.check_turn_in(e.self, e.trade, {item1 = 8368}) then -- Item: Runed Gnollish Tome + if item_lib.check_turn_in(e.trade, {item1 = 8368}) then -- Item: Runed Gnollish Tome if villagedeathcount >= 5 then ThirdTier(e); e.other:QuestReward(e.self,0,0,0,0,eq.ChooseRandom(8389,8392),5000); -- Items: Cloth Cord of Mourning or Blue Colored Fluid @@ -460,7 +460,7 @@ function SergeantTrade(e) FirstTier(e); e.other:QuestReward(e.self,0,0,0,0,eq.ChooseRandom(8384,8376),15000); -- Items: Bracelet of the Defender or Orb of the Defender end - elseif item_lib.check_turn_in(e.self, e.trade, {item1 = 8369}) then -- Item: Gnoll Warriors Crest + elseif item_lib.check_turn_in(e.trade, {item1 = 8369}) then -- Item: Gnoll Warriors Crest if villagedeathcount >= 5 then ThirdTier(e); e.other:QuestReward(e.self,0,0,0,0,eq.ChooseRandom(8390,8393),5000); -- Items: Belt of Mourning or Good Berries @@ -471,7 +471,7 @@ function SergeantTrade(e) FirstTier(e); e.other:QuestReward(e.self,0,0,0,0,eq.ChooseRandom(8385,8377),15000); -- Items: Bracer of the Defender or Long Sword of the Defender end - elseif item_lib.check_turn_in(e.self, e.trade, {item1 = 8370}) then -- Item: Book of Gnollish Hymns + elseif item_lib.check_turn_in(e.trade, {item1 = 8370}) then -- Item: Book of Gnollish Hymns if villagedeathcount >= 5 then ThirdTier(e); e.other:QuestReward(e.self,0,0,0,0,eq.ChooseRandom(9187,8394),5000); -- Items: Belt of Mourning, Feline Elixir @@ -482,7 +482,7 @@ function SergeantTrade(e) FirstTier(e); e.other:QuestReward(e.self,0,0,0,0,9174,15000); -- Item: Bracer of the Defender -- Missing Mace of the Defender end - elseif item_lib.check_turn_in(e.self, e.trade, {item1 = 8371}) then -- Item: Gnoll Pitfighter Gloves + elseif item_lib.check_turn_in(e.trade, {item1 = 8371}) then -- Item: Gnoll Pitfighter Gloves if villagedeathcount >= 5 then ThirdTier(e); e.other:QuestReward(e.self,0,0,0,0,eq.ChooseRandom(8391,8395),5000); -- Items: Sash of Mourning, Griffon Wing @@ -493,7 +493,7 @@ function SergeantTrade(e) FirstTier(e); e.other:QuestReward(e.self,0,0,0,0,eq.ChooseRandom(8386,8391),15000); -- Items: Wrist Wraps of the Defender, Sash of Mourning end - elseif item_lib.check_turn_in(e.self, e.trade, {item1 = 8372}) then -- Item: Gnollish Holy Symbol + elseif item_lib.check_turn_in(e.trade, {item1 = 8372}) then -- Item: Gnollish Holy Symbol if villagedeathcount >= 5 then ThirdTier(e); e.other:QuestReward(e.self,0,0,0,0,eq.ChooseRandom(9189,8396),5000); -- Items: Sash of Mourning, Elixir of Promise @@ -504,7 +504,7 @@ function SergeantTrade(e) FirstTier(e); e.other:QuestReward(e.self,0,0,0,0,eq.ChooseRandom(8388,8380),15000); -- Items: Wristband of the Defender, Helm of the Defender end - elseif item_lib.check_turn_in(e.self, e.trade, {item1 = 8373}) then -- Item: Stolen Seeds + elseif item_lib.check_turn_in(e.trade, {item1 = 8373}) then -- Item: Stolen Seeds if villagedeathcount >= 5 then ThirdTier(e); e.other:QuestReward(e.self,0,0,0,0,eq.ChooseRandom(9190,8397),5000); -- Items: Sash of Mourning, Essence of Rose @@ -515,7 +515,7 @@ function SergeantTrade(e) FirstTier(e); e.other:QuestReward(e.self,0,0,0,0,eq.ChooseRandom(8387,8381),15000); -- Items: Wrist Guards of the Defender, Circlet of the Defender end - elseif item_lib.check_turn_in(e.self, e.trade, {item1 = 8374}) then -- Item: Gnoll Oracle Medicine Bag + elseif item_lib.check_turn_in(e.trade, {item1 = 8374}) then -- Item: Gnoll Oracle Medicine Bag if villagedeathcount >= 5 then ThirdTier(e); e.other:QuestReward(e.self,0,0,0,0,eq.ChooseRandom(9191,8398),5000); -- Items: Sash of Mourning, Herb of Recovery @@ -526,7 +526,7 @@ function SergeantTrade(e) FirstTier(e); e.other:QuestReward(e.self,0,0,0,0,8382,15000); -- Item: Wreath of the Defender -- Missing 9186 Wristband of the Defender end - elseif item_lib.check_turn_in(e.self, e.trade, {item1 = 8375}) then -- Item: Gnoll Dousing Rod + elseif item_lib.check_turn_in(e.trade, {item1 = 8375}) then -- Item: Gnoll Dousing Rod if villagedeathcount >= 5 then ThirdTier(e); e.other:QuestReward(e.self,0,0,0,0,eq.ChooseRandom(9188,8399),5000); -- Items: Belt of Mourning, Fiery Red Fluid @@ -620,7 +620,7 @@ function StaticVillageDepop(e) end function GnollSpawnLocation(spn) - gnollspawn = math.random(80); + local gnollspawn = math.random(80); if gnollspawn < 2 then spn = eq.spawn2(gnoll,0,0,732,1382,-29,0);