From 0b7b3796ec987cbb1c263722b841cfa5795aa6d3 Mon Sep 17 00:00:00 2001 From: Haru Date: Fri, 8 Nov 2013 03:09:20 +0100 Subject: Added support for monster spritename constants - Follow-up to 124ab2a1cdb344f24170a4d91f7000ebabf39b40 - Replaced numeric IDs in NPC definitions and setnpcdisplay calls with the appropriate constants - Made possible thanks to Ind Signed-off-by: Haru --- npc/custom/events/disguise.txt | 28 +++++++++++++++------------- npc/custom/events/mushroom_event.txt | 2 +- 2 files changed, 16 insertions(+), 14 deletions(-) (limited to 'npc/custom/events') diff --git a/npc/custom/events/disguise.txt b/npc/custom/events/disguise.txt index a1d8c11c3..877916738 100644 --- a/npc/custom/events/disguise.txt +++ b/npc/custom/events/disguise.txt @@ -127,10 +127,12 @@ OnInit: set .Prize,512; set .PrizeAmt,1; set .Rule,1; - setarray .MVP[0],1038,1039,1046,1059,1086,1087,1112,1115,1147,1150,1157,1159,1190,1251,1252,1272,1312,1373, - 1389,1399,1418,1492,1502,1511,1583,1623,1630,1646,1647,1648,1649,1650,1651,1658,1685,1688, - 1708,1719,1734,1751,1768,1779,1785,1802,1832,1871,1874,1885,1917,1980,2022,2068,2087,2131, - 2156,2165; + setarray .MVP[0], OSIRIS, BAPHOMET, DOPPELGANGER, MISTRESS, GOLDEN_BUG, ORK_HERO, DRAKE, EDDGA, MAYA, MOONLIGHT, + PHARAOH, PHREEONI, ORC_LORD, KNIGHT_OF_WINDSTORM, GARM, DARK_LORD, TURTLE_GENERAL, LORD_OF_DEATH, DRACULA, EVENT_BAPHO, + DARK_SNAKE_LORD, INCANTATION_SAMURAI, PORING_V, AMON_RA, TAO_GUNKA, RSX_0806, BACSOJIN_, B_SEYREN, B_EREMES, B_HARWORD, + B_MAGALETA, B_SHECIL, B_KATRINN, B_YGNIZEM, APOCALIPS_H, LADY_TANEE, THANATOS, DETALE, KIEL_, RANDGRIS, + GLOOMUNDERNIGHT, KTULLANUX, ATROCE, G_MAGALETA_, IFRIT, FALLINGBISHOP, BEELZEBUB_, GOPINICH, MOROCC_, KUBLIN, + S_NYDHOG, BOITATA, QUEEN_SCARABA, LOST_DRAGON, LEAK, I_QUEEN_SCARABA; set .BlackList$, "1003,1006,1017,1021,1022,1027,1043,1075,1136,1137,1168," + "1171,1172,1173,1181,1187,1210,1217,1218,1222,1223,1224,1225,1226,1227,1228," + "1233,1284,1407,1411,1414,1495,1501,1900,1996,2000,2001,2002,2003,2004," + @@ -199,22 +201,22 @@ OnTimer180000: iDisguise: if (.Rule==1) { set .Winner,0; - set .Monster,1000+rand(1,995); - if (compare(","+.BlackList$+"," , ","+.Monster+",")) goto iDisguise; - if (.Monster==.LastMonster) goto iDisguise; - set .LastMonster,.Monster; - set $MonsterName$,getmonsterinfo(.Monster,0); + set .@Monster, rand(SCORPION, PINGUICULA); + if (compare(","+.BlackList$+"," , ","+.@Monster+",")) goto iDisguise; + if (.@Monster==.LastMonster) goto iDisguise; + set .LastMonster,.@Monster; + set $MonsterName$,getmonsterinfo(.@Monster,0); } if (.Rule==2) { set .Winner,0; - set .Monster,rand(49); - set $MonsterName$,getmonsterinfo(.MVP[.Monster],0); + set .@Monster, rand(getarraysize(.MVP)); + set $MonsterName$,getmonsterinfo(.MVP[.@Monster],0); } deletepset 1; defpattern 1,"([^:]+):.\\s*"+$MonsterName$+".*", "iCorrect"; activatepset 1; - if (.Rule==1) setnpcdisplay "Disguise Event",.Monster; - if (.Rule==2) setnpcdisplay "Disguise Event",.MVP[.Monster]; + if (.Rule==1) setnpcdisplay "Disguise Event",.@Monster; + if (.Rule==2) setnpcdisplay "Disguise Event",.MVP[.@Monster]; set .Change,1; setnpctimer 0; end; diff --git a/npc/custom/events/mushroom_event.txt b/npc/custom/events/mushroom_event.txt index bab31ec79..1d632d3e9 100644 --- a/npc/custom/events/mushroom_event.txt +++ b/npc/custom/events/mushroom_event.txt @@ -12,7 +12,7 @@ //= 3.6a Slightly edited. [Euphy] //============================================================ -prontera,142,228,6 script Find the Mushroom 1084,{ +prontera,142,228,6 script Find the Mushroom BLACK_MUSHROOM,{ mes "[ Find The Mushroom ]"; if (!.Status) mes "There is no event at the moment!"; -- cgit v1.2.3-60-g2f50