From 773fc1befb1fe510393ebb423d06efd9c489e641 Mon Sep 17 00:00:00 2001 From: HoraK-FDF Date: Sat, 11 Nov 2023 01:56:04 +0100 Subject: fluffy event mobpt and kill handler --- world/map/npc/functions/mob_points.txt | 272 -------------------------------- world/map/npc/mobs/mob_kill_handler.txt | 66 ++++++++ world/map/npc/mobs/mob_points.txt | 222 ++++++++++++++++++++++++++ 3 files changed, 288 insertions(+), 272 deletions(-) delete mode 100644 world/map/npc/functions/mob_points.txt create mode 100644 world/map/npc/mobs/mob_kill_handler.txt create mode 100644 world/map/npc/mobs/mob_points.txt diff --git a/world/map/npc/functions/mob_points.txt b/world/map/npc/functions/mob_points.txt deleted file mode 100644 index cf93fdae..00000000 --- a/world/map/npc/functions/mob_points.txt +++ /dev/null @@ -1,272 +0,0 @@ -// Mob points - -function|script|MobPoints -{ - if (@mobID < 1002) goto L_Return; - - setarray @points, - 1, // 1002 Maggot - 2, // 1003 Scorpion - 20, // 1004 Red Scorpion - 40, // 1005 Green Slime - 30, // 1006 Giant Maggot - 15, // 1007 Yellow Slime - 25, // 1008 Red Slime - 45, // 1009 Black Scorpion - 50, // 1010 Snake - 6, // 1011 Fire Goblin - 55, // 1012 Spider - 35, // 1013 Evil Mushroom - 35, // 1014 Pink Flower - 40, // 1015 Santa Slime - 15, // 1016 Rudolph Slime - 2, // 1017 Bat - 16, // 1018 Pinkie - 10, // 1019 Spiky Mushroom - 14, // 1020 Fluffy - 25, // 1021 Cave Snake - 200, // 1022 Jack O - 85, // 1023 Fire Skull - 85, // 1024 Poison Skull - 20, // 1025 Log Head - 70, // 1026 Mountain Snake - 15, // 1027 Easter Fluffy - 40, // 1028 Mouboo - 0, // 1029 Mauve Plant - 0, // 1030 Cobalt Plant - 0, // 1031 Gamboge Plant - 0, // 1032 Alizarin Plant - 20, // 1033 Sea Slime - 75, // 1034 Grass Snake - 0, // 1035 Silk Worm - 125, // 1036 Zombie - 0, // 1037 Clover Patch - 5, // 1038 Squirrel - 0, // 1039 Fire Lizard - 80, // 1040 Wisp - 15, // 1041 Snail - 80, // 1042 Spectre - 100, // 1043 Skeleton - 100, // 1044 Lady Skeleton - 150, // 1045 Fallen - 0, // 1046 Snake Lord - 80, // 1047 Poltergeist - 0, // 1048 Duck - 15, // 1049 Bee - 0, // 1050 Larvespa [DOES NOT EXIST] - 0, // 1051 Vespa [DOES NOT EXIST] - 0, // 1052 Hivespa [DOES NOT EXIST] - 0, // 1053 Froad [DOES NOT EXIST] - 0, // 1054 Troll - 15, // 1055 Butterfly - 2, // 1056 Cave Maggot - 10, // 1057 Angry Scorpion - 6, // 1058 Ice Goblin - 40, // 1059 Giant Cave Maggot - 20, // 1060 Archant - 35, // 1061 Moggun - 100, // 1062 Terranite - 10, // 1063 Pumpkin - 10, // 1064 Bandit - 20, // 1065 Bandit Lord - 30, // 1066 Vampire Bat - 150, // 1067 Reaper2 - 100, // 1068 Reaper - 20, // 1069 Scythe - 20, // 1070 Ball Lightning - 60, // 1071 Ice Element - 80, // 1072 Yeti - 100, // 1073 The Lost - 60, // 1074 Red Bone - 60, // 1075 Stalker - 0, // 1076 Dreadwing [DOES NOT EXIST] - 100, // 1077 Drunken Skeleton - 100, // 1078 Tipsy Skeleton - 100, // 1079 Drunken Lady Skeleton - 60, // 1080 BlueSpark - 60, // 1081 RedSpark - 0, // 1082 Serqet - 60, // 1083 HuntsmanSpider, - 40, // 1084 CrotcherScorpion, - 0, // 1085 IceSkull, - 120, // 1086 FeyElement, - 10, // 1087 Larvern, - 60, // 1088 Hyvern, - 20, // 1089 HungryFluffy, - 40, // 1090 Wolvern, - 50, // 1091 BlueSlime, - 0, // 1092 SlimeBlast, - 20, // 1093 WhiteSlime, - 40, // 1094 Reinboo, - 0, // 1095 WhiteBell, - 60, // 1096 SoulSnake - 100, // 1097 SoulEater - 25, // 1098 CopperSlime - 0, // 1099 SleepingBandit - 20, // 1100 AzulSlime - 80, // 1101 DemonicSpirit - 940, // 1102 Luvia - 150, // 1103 WitchGuard - 50, // 1104 DemonicMouboo - 15, // 1105 ViciousSquirrel - 20, // 1106 WickedMushroom - 18, // 1107 Bluepar - 10, // 1108 AngryFireGoblin - 35, // 1109 AngrySeaSlime - 50, // 1110 AngryGreenSlime - 50, // 1111 CandiedSlime - 40, // 1112 Santaboo - 30, // 1113 Pollett - 100, // 1114 Nutcracker - 40, // 1115 SeaSlimeMother - 50, // 1116 UndeadWitch - 60, // 1117 UndeadTroll - 80, // 1118 GreenSlimeMother - 100, // 1119 Thug - 100, // 1120 Swashbuckler - 100, // 1121 Grenadier - 150, // 1122 DreadPirateMarley - 10, // 1123 DreadPirateMarleyClone - 100, // 1124 Wight - 100, // 1125 ManaGhost - 100, // 1126 PsiBrain - 150 // 1127 GeneralKurkan - // No more room! script engine is buggy, sorry. - // -o11c - ; // END - - setarray @points_extended, - 175, // 1128 GeneralRazha - 200, // 1129 GeneralTerogan - 100, // 1130 Moonshroom - 20, // 1131 ManaBug - 80, // 1132 LavaSlime - 80, // 1133 Anne - 200, // 1134 SUSAN - 80, // 1135 LovelyMaggot - 10, // 1136 LesserGhost - 500, // 1137 Tormenta - 200, // 1138 ManaGuardian - 10, // 1139 Virus - 200, // 1140 Tengu - 200, // 1141 Sasquatch - 999, // 1142 ZaxDeKagen - 200, // 1143 ManaSlayer - 200, // 1144 GreatDragon - -99, // 1145 KageGolem - 200, // 1146 Flashmob - 200, // 1147 Koyntety - 100, // 1148 DoomGolem - 100, // 1149 Enchanter - 0, // 1150 ManaTyrant - 0, // 1151 VoidFlower - 0, // 1152 VoidArchant - 0, // 1153 VoidSlime - 0, // 1154 VoidSnake - 0, // 1155 VoidBat - 0, // 1156 VoidMaggot - 25, // 1157 VoidSoldier - 0, // 1158 VoidMouboo - 0, // 1159 VoidScorpion - 0, // 1160 VoidShroom - -99, // 1161 Xakelbael - 0, // 1162 Grinchboo - 15, // 1163 Friday - 0, // 1164 RESERVED - 0, // 1165 RESERVED - 0, // 1166 RESERVED - 0, // 1167 RESERVED - 0 // 1168 Floyd - ; - - if ((MPQUEST == 1) && (@mobID < 1128)) - goto L_Table1; - - if ((MPQUEST == 1) && (@mobID > 1127)) - goto L_Table2; - - goto L_PostLoop; - -L_Table1: - set Mobpt, Mobpt + @points[@mobID - 1002]; - goto L_PostLoop; - -L_Table2: - set Mobpt, Mobpt + @points_extended[@mobID - 1128]; - goto L_PostLoop; - -L_PostLoop: - callfunc "ValonCount"; - if (((QL_VALON >= 2) && (QL_VALON < 6)) && (@mobID == $@ValonMob[@valon_mob])) - goto L_ValonMobKill; - goto L_NatureKarma; - -L_ValonMobKill: - callfunc "AddValonCntMask"; - goto L_NatureKarma; - -L_NatureKarma: -// Scorpion, Red Scorpion, Black Scorpion, Angry Scorpion -// DemonicMouboo, ViciousSquirrel, WickedMushroom, Bluepar - if ((@mobID == 1003) || (@mobID == 1004) || (@mobID == 1009) || (@mobID == 1057) - || (@mobID == 1104) || (@mobID == 1105) || (@mobID == 1106) || (@mobID == 1107)) - goto L_good; - - // Attitude adjustment for the witch (can we refactor this to another function? Not sure about max. recursion depth) - - set @value, 0; -// Pinkie - if (@mobID == 1018) - set @value, 3; - -// Fluffy - if (@mobID == 1020) - set @value, 3; -// Easter Fluffy - if (@mobID == 1027) - set @value, 3; -// Mouboo - if (@mobID == 1028) - set @value, 4; -// Squirrel - if (@mobID == 1038) - set @value, 2; -// Reinboo - if (@mobID == 1094) - set @value, 3; -// Santaboo - if (@mobID == 1112) - set @value, 3; -// Pollett - if (@mobID == 1113) - set @value, 3; - - if (@value == 0) - goto L_Celestia; - - callfunc "QuestSagathaAnnoy"; - goto L_Celestia; - -L_good: - set @value, 1; - callfunc "QuestSagathaHappy"; - goto L_Celestia; - -L_Celestia: - if (QL_CELESTIA < 5 || QL_CELESTIA >= 205 || @mobID != 1072) goto L_Terranite; - set QL_CELESTIA, QL_CELESTIA + 1; - if (QL_CELESTIA == 205) - message strcharinfo(0), "Yeti : ##3This should be enough yetis killed to please Celestia."; - goto L_Terranite; - -L_Terranite: - if (TERRAC < 1 || TERRAC > 1500 || @mobID != 1062) goto L_Return; - if (TERRAC % 100 == 0) - message strcharinfo(0), "Terranite : ##3Total Terranites Slain: "+TERRAC; - set TERRAC, TERRAC + 1; - goto L_Return; - -L_Return: - set @value, 0; - return; -} diff --git a/world/map/npc/mobs/mob_kill_handler.txt b/world/map/npc/mobs/mob_kill_handler.txt new file mode 100644 index 00000000..5542dcdb --- /dev/null +++ b/world/map/npc/mobs/mob_kill_handler.txt @@ -0,0 +1,66 @@ + +-|script|#MobKillHandlerInit|32767 +{ + end; + +OnInit: + setarray $@QuestMobs, Maggot, Scorpion, RedScorpion, BlackScorpion, Pinkie, Fluffy, EasterFluffy, Mouboo, Squirrel, TameScorpion, HouseMaggot, AngryScorpion, + Terranite, Yeti, Reinboo, DemonicMouboo, ViciousSquirrel, WickedMushroom, Bluepar, Santaboo, Pollett; + setarray $@NatureKarmaGood, Scorpion, RedScorpion, BlackScorpion, AngryScorpion, DemonicMouboo, ViciousSquirrel, WickedMushroom, Bluepar; + setarray $@NatureKarmaBad, Pinkie, Fluffy, EasterFluffy, Mouboo, Squirrel, Reinboo, Santaboo, Pollett; + setarray $@NatureKarmaBadVal, 3, 3, 3, 4, 2, 3, 3, 3; + end; +} + +function|script|MobKillHandler +{ + if (@mobID < 1002) goto L_Return; + + set .@find, array_search(@mobID, $@QuestMobs); + if (.@find < 0) goto L_Return; + + callfunc "ValonCount"; + if (((QL_VALON >= 2) && (QL_VALON < 6)) && (@mobID == $@ValonMob[@valon_mob])) + goto L_ValonMobKill; + goto L_NatureKarma; + +L_ValonMobKill: + callfunc "AddValonCntMask"; + goto L_NatureKarma; + +L_NatureKarma: + set .@find, array_search(@mobID, $@NatureKarmaGood); + if (.@find >= 0) goto L_Good; + set .@find, array_search(@mobID, $@NatureKarmaBad); + if (.@find >= 0) goto L_Bad; + goto L_Celestia; + + // Attitude adjustment for the witch (can we refactor this to another function? Not sure about max. recursion depth) + +L_Bad: + set @value, $@NatureKarmaBadVal[.@find]; + callfunc "QuestSagathaAnnoy"; + goto L_Celestia; + +L_Good: + set @value, 1; + callfunc "QuestSagathaHappy"; + goto L_Celestia; + +L_Celestia: + if (QL_CELESTIA < 5 || QL_CELESTIA >= 205 || @mobID != Yeti) goto L_Terranite; + set QL_CELESTIA, QL_CELESTIA + 1; + if (QL_CELESTIA == 205) + message strcharinfo(0), "Yeti : ##3This should be enough yetis killed to please Celestia."; + goto L_Terranite; + +L_Terranite: + if (TERRAC < 1 || TERRAC > 1500 || @mobID != Terranite) goto L_Return; + if (TERRAC % 100 == 0) + message strcharinfo(0), "Terranite : ##3Total Terranites Slain: "+TERRAC; + set TERRAC, TERRAC + 1; + goto L_Return; + +L_Return: + return; +} diff --git a/world/map/npc/mobs/mob_points.txt b/world/map/npc/mobs/mob_points.txt new file mode 100644 index 00000000..773e5773 --- /dev/null +++ b/world/map/npc/mobs/mob_points.txt @@ -0,0 +1,222 @@ +// Mob points + +function|script|MobPoints +{ + if (@mobID < 1002) goto L_Return; + + setarray @points, + 1, // 1002 Maggot + 3, // 1003 Scorpion + 20, // 1004 RedScorpion + 40, // 1005 GreenSlime + 30, // 1006 GiantMaggot + 15, // 1007 YellowSlime + 25, // 1008 RedSlime + 45, // 1009 BlackScorpion + 50, // 1010 Snake + 6, // 1011 FireGoblin + 55, // 1012 Spider + 35, // 1013 EvilMushroom + 35, // 1014 PinkFlower + 40, // 1015 SantaSlime + 15, // 1016 RudolphSlime + 2, // 1017 Bat + 16, // 1018 Pinkie + 10, // 1019 SpikyMushroom + 14, // 1020 Fluffy + 25, // 1021 CaveSnake + 200, // 1022 JackO + 85, // 1023 FireSkull + 85, // 1024 PoisonSkull + 20, // 1025 LogHead + 70, // 1026 MountainSnake + 15, // 1027 EasterFluffy + 40, // 1028 Mouboo + 1, // 1029 MauvePlant + 1, // 1030 CobaltPlant + 1, // 1031 GambogePlant + 1, // 1032 AlizarinPlant + 20, // 1033 SeaSlime + 75, // 1034 GrassSnake + 1, // 1035 Silkworm + 125, // 1036 Zombie + 1, // 1037 CloverPatch + 5, // 1038 Squirrel + 0, // 1039 FireLizard + 80, // 1040 Wisp + 15, // 1041 Snail + 80, // 1042 Spectre + 100, // 1043 Skeleton + 100, // 1044 LadySkeleton + 150, // 1045 Fallen + 2, // 1046 TameScorpion + 80, // 1047 Poltergeist + 0, // 1048 Duck + 15, // 1049 Bee + 2, // 1050 HouseMaggot + 0, // 1051 Larvespa + 0, // 1052 Vespa + 0, // 1053 Hivespa + 50, // 1054 Troll + 2, // 1055 Butterfly + 2, // 1056 CaveMaggot + 10, // 1057 AngryScorpion + 6, // 1058 IceGoblin + 40, // 1059 GCMaggot + 20, // 1060 Archant + 35, // 1061 Moggun + 100, // 1062 Terranite + 10, // 1063 Pumpkin + 10, // 1064 Bandit + 20, // 1065 BanditLord + 30, // 1066 VampireBat + 666, // 1067 Reaper2 + 400, // 1068 Reaper + 100, // 1069 FlyingScythe + 20, // 1070 BallLightning + 60, // 1071 IceElement + 80, // 1072 Yeti + 100, // 1073 TheLost + 60, // 1074 RedBone + 60, // 1075 Stalker + 0, // 1076 Dreadwing + 100, // 1077 DrunkenSkeleton + 100, // 1078 TipsySkeleton + 100, // 1079 DrunkenLadySkeleton + 60, // 1080 BlueSpark + 60, // 1081 RedSpark + 1, // 1082 Serqet + 60, // 1083 HuntsmanSpider + 40, // 1084 CrotcherScorpion + 100, // 1085 IceSkull + 120, // 1086 FeyElement + 10, // 1087 Larvern + 60, // 1088 Hyvern + 20, // 1089 HungryFluffy + 40, // 1090 Wolvern + 50, // 1091 BlueSlime + 1, // 1092 SlimeBlast + 20, // 1093 WhiteSlime + 40, // 1094 Reinboo + 10, // 1095 WhiteBell + 60, // 1096 SoulSnake + 100, // 1097 SoulEater + 25, // 1098 CopperSlime + 1, // 1099 SleepingBandit + 20, // 1100 AzulSlime + 80, // 1101 DemonicSpirit + 940, // 1102 Luvia + 150, // 1103 WitchGuard + 50, // 1104 DemonicMouboo + 15, // 1105 ViciousSquirrel + 20, // 1106 WickedMushroom + 18, // 1107 Bluepar + 10, // 1108 AngryFireGoblin + 35, // 1109 AngrySeaSlime + 35, // 1110 AngryGreenSlime + 50, // 1111 CandiedSlime + 40, // 1112 Santaboo + 30, // 1113 Pollett + 100, // 1114 Nutcracker + 40, // 1115 SeaSlimeMother + 50, // 1116 UndeadWitch + 60, // 1117 UndeadTroll + 80, // 1118 GreenSlimeMother + 100, // 1119 Thug + 100, // 1120 Swashbuckler + 100, // 1121 Grenadier + 150, // 1122 DreadPirateMarley + 10, // 1123 DreadPirateMarleyClone + 100, // 1124 Wight + 100, // 1125 ManaGhost + 100, // 1126 PsiBrain + 150 // 1127 GeneralKrukan + // No more room! script engine is buggy, sorry. (126 entrys) + // -o11c + ; // END + + setarray @points_extended, + 175, // 1128 GeneralRazha + 200, // 1129 GeneralTerogan + 100, // 1130 Moonshroom + 20, // 1131 ManaBug + 80, // 1132 LavaSlime + 80, // 1133 Anne + 400, // 1134 SUSAN + 80, // 1135 LovelyMaggot + 10, // 1136 LesserGhost + 500, // 1137 Tormenta + 200, // 1138 ManaGuard + 60, // 1139 Virus + 200, // 1140 Tengu + 200, // 1141 Sasquatch + 999, // 1142 Kage + 200, // 1143 ManaSlayer + 500, // 1144 Dragon + 888, // 1145 KageGolem + 200, // 1146 Flashmob + 200, // 1147 Koyntety + 200, // 1148 DoomGolem + 200, // 1149 Enchanter + 200, // 1150 ManaTyrant + 100, // 1151 VoidFlower + 80, // 1152 VoidArchant + 80, // 1153 VoidSlime + 100, // 1154 VoidSnake + 100, // 1155 VoidBat + 80, // 1156 VoidMaggot + 120, // 1157 VoidSoldier + 100, // 1158 VoidMouboo + 80, // 1159 VoidScorpion + 100, // 1160 VoidShroom + 999, // 1161 Xakelbael + 1, // 1162 Grinchboo + 13, // 1163 FridayCat + 22, // 1164 ChristmasTree + 11, // 1165 ChristmasGift + 100, // 1166 Snowman + 300, // 1167 SnowmanBoss + 1, // 1168 Floyd + 66, // 1169 CrystalSpider + 200, // 1170 CrystalGolem + 200, // 1171 BlackCrystalGolem + 1, // 1172 Bif + 500, // 1173 MontBlanc + 200, // 1174 Emo + 35 // 1175 MegaManaBug + ; // END + +// the following mobs where replaced by other mobs: +// 1046 Snake Lord <> TameScorpion +// 1055 Froad <> Butterfly + +// the following mobs are still free: +// 1039 FireLizard +// 1048 Duck +// 1051 Larvespa +// 1052 Vespa +// 1053 Hivespa +// 1076 Dreadwing + + if ((MPQUEST == 1) && (@mobID < 1128)) + goto L_Table1; + + if ((MPQUEST == 1) && (@mobID > 1127)) + goto L_Table2; + + goto L_PostLoop; + +L_Table1: + set Mobpt, Mobpt + @points[@mobID - 1002]; + goto L_PostLoop; + +L_Table2: + set Mobpt, Mobpt + @points_extended[@mobID - 1128]; + goto L_PostLoop; + +L_PostLoop: + goto L_Return; + +L_Return: + return; +} -- cgit v1.2.3-60-g2f50