NightTerror Posted January 4, 2012 Posted January 4, 2012 (edited) Customisable Monster Invasion Hi everyone, as none of the current available Monster Invasion scripts really satisfied my needs, I decided to make my own one. I got inspired by the "Automated MVP Event" from xMachina / Acetito and Emistry, but wrote all the code myself. Feature List: Parameters are defined via an NPC Nice and easy ingame defining of monsters and item reward types and quantitys and the desired Map Top Killers are listed and rewared after the event is over A logmes is generated with information about the top Killer, his kills, the chosen item reward and the count of previous monster invasions to detect possible abuses. Temporarily saves inputs How to operate: It's pretty simple, you just talk to the NPC and choose the desired options. You don't have to write monster or Item IDs ingame, you define them in the script. I provided a list of pre-defined monsters and items, if you want to alter it then do the following: 1. Mind the 4 lines after the comment: "//define monsterlist and itemlist", i made two categorys for monsters and items respectively for a better overview. 2. Add the desired item/monster ID to the desired category. 3. For monsters: Go to the function "F_ChooseMob" and extend the respective category list with the monster name (mind the correct order!), for items: search for the lines below the comment: "//Item & Item amount list, sorted like rms does" (I was too lazy to make a separate function out of it D:) and do the same (mind the correct order again). Example for a not working monster list extension (Marin in this case): changing setarray $@Monsteridweak[1],1301,1297,1403,1654,1268,1507,1830,1307,1302,1635,1655,1636,1777,1837,1656, 1219,1502,1637,1262,1700,1320,1865,1657,1702,1829,1375,1204,1653,1416,1200,1197; to setarray $@Monsteridweak[1],1301,1297,1403,1654,1268,1507,1830,1307,1302,1635,1655,1636,1777,1837,1656, 1219,1502,1637,1262,1700,1320,1865,1657,1702,1829,1375,1204,1653,1416,1200,1197:1242; and changing set @Monsters[getarg(0)],$@Monsteridweak[select("Am Mut:Ancient Mummy:Firelock Soldier:Armeyer Dinze:Bloody Knight:Bloody Murderer:Bow Guardian:Cat o' Nine Tails:Dark Illusion:Eremes Guile:Errende Ebecee:Howard Alt-Eisen:Ice Titan:Imp:Kavach Icarus:Knight of Abyss:Loli Ruri:Margaretha Sorin:Mutant Dragonoid:Observation:Owl Duke:Ragged Zombie:Laurell Weinder:Retribution:Sword Guardian:The Paper:Tirfing/Ogretooth:Wickebine Tres:Wicked Nymph:Zealotus:Zombie Prisoner")]; to set @Monsters[getarg(0)],$@Monsteridweak[select("Am Mut:Ancient Mummy:Firelock Soldier:Armeyer Dinze:Bloody Knight:Bloody Murderer:Bow Guardian:Cat o' Nine Tails:Dark Illusion:Eremes Guile:Errende Ebecee:Howard Alt-Eisen:Ice Titan:Imp:Kavach Icarus:Knight of Abyss:Loli Ruri:Margaretha Sorin:Marin:Mutant Dragonoid:Observation:Owl Duke:Ragged Zombie:Laurell Weinder:Retribution:Sword Guardian:The Paper:Tirfing/Ogretooth:Wickebine Tres:Wicked Nymph:Zealotus:Zombie Prisoner")]; //This won't work because the monster ID is added to the end on one list, while the monster name is added somewhere in the middle on the other list. The positions of the monster IDs and names have to match. Example for a working monster list extension (Marin in this case): changing setarray $@Monsteridweak[1],1301,1297,1403,1654,1268,1507,1830,1307,1302,1635,1655,1636,1777,1837,1656, 1219,1502,1637,1262,1700,1320,1865,1657,1702,1829,1375,1204,1653,1416,1200,1197; to setarray $@Monsteridweak[1],1301,1297,1403,1654,1268,1507,1830,1307,1302,1635,1655,1636,1777,1837,1656, 1219,1502,1637,1262,1700,1320,1865,1657,1702,1829,1375,1204,1653,1416,1200,1197:1242; and changing set @Monsters[getarg(0)],$@Monsteridweak[select("Am Mut:Ancient Mummy:Firelock Soldier:Armeyer Dinze:Bloody Knight:Bloody Murderer:Bow Guardian:Cat o' Nine Tails:Dark Illusion:Eremes Guile:Errende Ebecee:Howard Alt-Eisen:Ice Titan:Imp:Kavach Icarus:Knight of Abyss:Loli Ruri:Margaretha Sorin:Mutant Dragonoid:Observation:Owl Duke:Ragged Zombie:Laurell Weinder:Retribution:Sword Guardian:The Paper:Tirfing/Ogretooth:Wickebine Tres:Wicked Nymph:Zealotus:Zombie Prisoner")]; to set @Monsters[getarg(0)],$@Monsteridweak[select("Am Mut:Ancient Mummy:Firelock Soldier:Armeyer Dinze:Bloody Knight:Bloody Murderer:Bow Guardian:Cat o' Nine Tails:Dark Illusion:Eremes Guile:Errende Ebecee:Howard Alt-Eisen:Ice Titan:Imp:Kavach Icarus:Knight of Abyss:Loli Ruri:Margaretha Sorin:Mutant Dragonoid:Observation:Owl Duke:Ragged Zombie:Laurell Weinder:Retribution:Sword Guardian:The Paper:Tirfing/Ogretooth:Wickebine Tres:Wicked Nymph:Zealotus:Zombie Prisoner:Marin")]; //Although not sorted alphabetically, this will work as both Monster ID and name share the same position in their respective lists in this example. The script kills all summoned monsters if 5 or less remain, because it's boring if you have to teleport 2000 times to find the last ones. To change this, go to "if(mobcount($@Map$,strnpcinfo(3)+"::OnMobKill") <=5)" in the script and replace the last number with the desired amount. Well, have fun with it! Downloads: Monsterinvasion - German Version Monsterinvasion - English Version Monsterinvasion - Spanish Version Credits: BlackScythe, who translated the script to spanish. Thanks very much! Link to eAthena post:http://www.eathena.w...howtopic=282806 Monsterinvasion-de.txt Monsterinvasion-en.txt Monsterinvasion_es.txt Edited January 4, 2012 by NightTerror 1 Quote
Brynner Posted July 6, 2012 Posted July 6, 2012 [Error]: script error on npc\custom\AleconRO\Monsterinvasion-en.txt line 127 parse_simpleexpr: unmatch ')' 122 : mes "[ ^0C66C0Event Helper^00000 0 ]"; 123 : mes "Please choose your desired map!"; 124 : mes "Obviously, the map has to b e valid."; 125 : next; 126 : do{ //Loop to ensure valid map * 127 : input $@Map$;}while(getmapmobs'( '$@Map$) == -1 ); 128 : break; 129 : Case 3: 130 : 131 : mes "[ ^0C66C0Event Helper^00000 0 ]"; 132 : mes "Which monster do you want t o spawn?"; what is this problem? Quote
NightTerror Posted July 6, 2012 Author Posted July 6, 2012 [Error]: script error on npc\custom\AleconRO\Monsterinvasion-en.txt line 127 parse_simpleexpr: unmatch ')' 122 : mes "[ ^0C66C0Event Helper^00000 0 ]"; 123 : mes "Please choose your desired map!"; 124 : mes "Obviously, the map has to b e valid."; 125 : next; 126 : do{ //Loop to ensure valid map * 127 : input $@Map$;}while(getmapmobs'( '$@Map$) == -1 ); 128 : break; 129 : Case 3: 130 : 131 : mes "[ ^0C66C0Event Helper^00000 0 ]"; 132 : mes "Which monster do you want t o spawn?"; what is this problem? Getmapmobs seems to be an outdated function, I'm too lazy to update rathena myself, but try to replace "getmapmobs" with "mobcount". It should work if I understood this right. Quote
Brynner Posted July 7, 2012 Posted July 7, 2012 (edited) still not working. [Error]: script error on npc\custom\AleconRO\Monsterinvasion-en.txt line 127 need '(' 122 : mes "[ ^0C66C0Event Helper^00000 0 ]"; 123 : mes "Please choose your desired map!"; 124 : mes "Obviously, the map has to b e valid."; 125 : next; 126 : do{ //Loop to ensure valid map * 127 : input $@Map$;}while(mobcount'''( $@Map$) == -1 ); 128 : break; 129 : Case 3: 130 : 131 : mes "[ ^0C66C0Event Helper^00000 0 ]"; 132 : mes "Which monster do you want t o spawn?"; Edited July 7, 2012 by Brynner Quote
NightTerror Posted July 7, 2012 Author Posted July 7, 2012 still not working. [Error]: script error on npc\custom\AleconRO\Monsterinvasion-en.txt line 127 need '(' 122 : mes "[ ^0C66C0Event Helper^00000 0 ]"; 123 : mes "Please choose your desired map!"; 124 : mes "Obviously, the map has to b e valid."; 125 : next; 126 : do{ //Loop to ensure valid map * 127 : input $@Map$;}while(mobcount'''( $@Map$) == -1 ); 128 : break; 129 : Case 3: 130 : 131 : mes "[ ^0C66C0Event Helper^00000 0 ]"; 132 : mes "Which monster do you want t o spawn?"; Sucks to be you I guess? Quote
Lelouch vi Britannia Posted July 22, 2012 Posted July 22, 2012 (edited) I have the same error like Brynner have * 127 : input $@Map$;}while(getmapmobs'('$@Map$) == -1 ); Edited July 22, 2012 by Lelouch Quote
Kurby Posted July 22, 2012 Posted July 22, 2012 I have the same error like Brynner have * 127 : input $@Map$;}while(getmapmobs'('$@Map$) == -1 ); Same error. Quote
Emistry Posted July 23, 2012 Posted July 23, 2012 @Post#7 / Post#8 / Post#9 mobcount("<map name>","<event label>") Quote
kojex 2.0 Posted September 12, 2012 Posted September 12, 2012 (edited) @Post#7 / Post#8 / Post#9 mobcount("<map name>","<event label>") can explain further how to input that? Edited September 12, 2012 by kojex 2.0 Quote
mrlongshen Posted April 1, 2013 Posted April 1, 2013 Customisable Monster Invasion Hi everyone, as none of the current available Monster Invasion scripts really satisfied my needs, I decided to make my own one. I got inspired by the "Automated MVP Event" from xMachina / Acetito and Emistry, but wrote all the code myself. Feature List: Parameters are defined via an NPC Nice and easy ingame defining of monsters and item reward types and quantitys and the desired Map Top Killers are listed and rewared after the event is over A logmes is generated with information about the top Killer, his kills, the chosen item reward and the count of previous monster invasions to detect possible abuses. Temporarily saves inputs How to operate:It's pretty simple, you just talk to the NPC and choose the desired options. You don't have to write monster or Item IDs ingame, you define them in the script. I provided a list of pre-defined monsters and items, if you want to alter it then do the following: 1. Mind the 4 lines after the comment: "//define monsterlist and itemlist", i made two categorys for monsters and items respectively for a better overview. 2. Add the desired item/monster ID to the desired category. 3. For monsters: Go to the function "F_ChooseMob" and extend the respective category list with the monster name (mind the correct order!), for items: search for the lines below the comment: "//Item & Item amount list, sorted like rms does" (I was too lazy to make a separate function out of it D:) and do the same (mind the correct order again). Example for a not working monster list extension (Marin in this case): changing setarray $@Monsteridweak[1],1301,1297,1403,1654,1268,1507,1830,1307,1302,1635,1655,1636,1777,1837,1656, 1219,1502,1637,1262,1700,1320,1865,1657,1702,1829,1375,1204,1653,1416,1200,1197; to setarray $@Monsteridweak[1],1301,1297,1403,1654,1268,1507,1830,1307,1302,1635,1655,1636,1777,1837,1656, 1219,1502,1637,1262,1700,1320,1865,1657,1702,1829,1375,1204,1653,1416,1200,1197:1242; and changing set @Monsters[getarg(0)],$@Monsteridweak[select("Am Mut:Ancient Mummy:Firelock Soldier:Armeyer Dinze:Bloody Knight:Bloody Murderer:Bow Guardian:Cat o' Nine Tails:Dark Illusion:Eremes Guile:Errende Ebecee:Howard Alt-Eisen:Ice Titan:Imp:Kavach Icarus:Knight of Abyss:Loli Ruri:Margaretha Sorin:Mutant Dragonoid:Observation:Owl Duke:Ragged Zombie:Laurell Weinder:Retribution:Sword Guardian:The Paper:Tirfing/Ogretooth:Wickebine Tres:Wicked Nymph:Zealotus:Zombie Prisoner")]; to set @Monsters[getarg(0)],$@Monsteridweak[select("Am Mut:Ancient Mummy:Firelock Soldier:Armeyer Dinze:Bloody Knight:Bloody Murderer:Bow Guardian:Cat o' Nine Tails:Dark Illusion:Eremes Guile:Errende Ebecee:Howard Alt-Eisen:Ice Titan:Imp:Kavach Icarus:Knight of Abyss:Loli Ruri:Margaretha Sorin:Marin:Mutant Dragonoid:Observation:Owl Duke:Ragged Zombie:Laurell Weinder:Retribution:Sword Guardian:The Paper:Tirfing/Ogretooth:Wickebine Tres:Wicked Nymph:Zealotus:Zombie Prisoner")]; //This won't work because the monster ID is added to the end on one list, while the monster name is added somewhere in the middle on the other list. The positions of the monster IDs and names have to match. Example for a working monster list extension (Marin in this case): changing setarray $@Monsteridweak[1],1301,1297,1403,1654,1268,1507,1830,1307,1302,1635,1655,1636,1777,1837,1656, 1219,1502,1637,1262,1700,1320,1865,1657,1702,1829,1375,1204,1653,1416,1200,1197; to setarray $@Monsteridweak[1],1301,1297,1403,1654,1268,1507,1830,1307,1302,1635,1655,1636,1777,1837,1656, 1219,1502,1637,1262,1700,1320,1865,1657,1702,1829,1375,1204,1653,1416,1200,1197:1242; and changing set @Monsters[getarg(0)],$@Monsteridweak[select("Am Mut:Ancient Mummy:Firelock Soldier:Armeyer Dinze:Bloody Knight:Bloody Murderer:Bow Guardian:Cat o' Nine Tails:Dark Illusion:Eremes Guile:Errende Ebecee:Howard Alt-Eisen:Ice Titan:Imp:Kavach Icarus:Knight of Abyss:Loli Ruri:Margaretha Sorin:Mutant Dragonoid:Observation:Owl Duke:Ragged Zombie:Laurell Weinder:Retribution:Sword Guardian:The Paper:Tirfing/Ogretooth:Wickebine Tres:Wicked Nymph:Zealotus:Zombie Prisoner")]; to set @Monsters[getarg(0)],$@Monsteridweak[select("Am Mut:Ancient Mummy:Firelock Soldier:Armeyer Dinze:Bloody Knight:Bloody Murderer:Bow Guardian:Cat o' Nine Tails:Dark Illusion:Eremes Guile:Errende Ebecee:Howard Alt-Eisen:Ice Titan:Imp:Kavach Icarus:Knight of Abyss:Loli Ruri:Margaretha Sorin:Mutant Dragonoid:Observation:Owl Duke:Ragged Zombie:Laurell Weinder:Retribution:Sword Guardian:The Paper:Tirfing/Ogretooth:Wickebine Tres:Wicked Nymph:Zealotus:Zombie Prisoner:Marin")]; //Although not sorted alphabetically, this will work as both Monster ID and name share the same position in their respective lists in this example. The script kills all summoned monsters if 5 or less remain, because it's boring if you have to teleport 2000 times to find the last ones. To change this, go to "if(mobcount($@Map$,strnpcinfo(3)+"::OnMobKill") <=5)" in the script and replace the last number with the desired amount. Well, have fun with it! Downloads: Monsterinvasion - German Version Monsterinvasion - English Version Monsterinvasion - Spanish Version Credits: BlackScythe, who translated the script to spanish. Thanks very much! Link to eAthena post:http://www.eathena.w...howtopic=282806 someone please reupload. i cant download it. or share in here! Quote
Emistry Posted April 1, 2013 Posted April 1, 2013 @mrlongshen http://pastebin.com/raw.php?i=ba8eDVqn 1 Quote
mrlongshen Posted April 1, 2013 Posted April 1, 2013 (edited) @mrlongshen http://pastebin.com/raw.php?i=ba8eDVqn thx emistry btw. i got this problem. [Error]: Loading NPC file: npc/1.test/monsterinvansion.txt script error on npc/1.test/monsterinvansion.txt line 127 parse_simpleexpr: unmatch ')' 122 : mes "[ ^0C66C0Event Helper^00000 0 ]"; 123 : mes "Please choose your desired map!"; 124 : mes "Obviously, the map has to b e valid."; 125 : next; 126 : do{ //Loop to ensure valid map * 127 : input $@Map$;}while(getmapmobs'( '$@Map$) == -1 ); 128 : break; 129 : Case 3: 130 : 131 : mes "[ ^0C66C0Event Helper^00000 0 ]"; 132 : mes "Which monster do you want t o spawn?"; Edited April 1, 2013 by mrlongshen Quote
urmel Posted June 13, 2013 Posted June 13, 2013 show; input $@Map$;}while(getmapmobs'('$@Map$) == -1 ); edit: input $@Map$;}while (mobcount("prontera", "all") == -1 ); Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.