From 9f32aa958f86a228290c43544c8b9bbf3f1c2cc0 Mon Sep 17 00:00:00 2001 From: Haru Date: Thu, 7 Nov 2013 19:47:47 +0100 Subject: Extended script constants to support NPC sprite IDs - Added support for constants whose name begins with a number. - Follow-up to 124ab2a1cdb344f24170a4d91f7000ebabf39b40. - Replaced calls to setnpcdisplay with hardcoded numeric IDs to constants. - Thanks to Yommy. Signed-off-by: Haru --- npc/custom/events/disguise.txt | 8 ++++---- npc/events/gdevent_aru.txt | 14 +++++++------- npc/quests/newgears/2004_headgears.txt | 2 +- npc/quests/quests_rachel.txt | 6 +++--- npc/re/quests/quests_brasilis.txt | 2 +- npc/re/quests/quests_mora.txt | 4 ++-- 6 files changed, 18 insertions(+), 18 deletions(-) (limited to 'npc') diff --git a/npc/custom/events/disguise.txt b/npc/custom/events/disguise.txt index 1b46e9b16..a1d8c11c3 100644 --- a/npc/custom/events/disguise.txt +++ b/npc/custom/events/disguise.txt @@ -38,7 +38,7 @@ prontera,160,155,4 script Disguise Event 4_M_NFDEADMAN,{ setnpctimer 0; stopnpctimer; announce "A GM has decided to turn the Disguise Event off. As a result no further prizes will be given.",bc_map | bc_blue; deletepset 1; - setnpcdisplay "Disguise Event",795; + setnpcdisplay "Disguise Event", 4_M_NFDEADMAN; close; } set .EventON,1; set .Timer,1; setnpctimer 0; initnpctimer; @@ -171,7 +171,7 @@ OnTimer10000: OnTimer30000: if (.Timer) end; set .Change,0; - setnpcdisplay "Disguise Event",795; + setnpcdisplay "Disguise Event", 4_M_NFDEADMAN; npctalk "You took too long to guess what I was. Please wait 10 seconds while I disguise again."; specialeffect 725; set $MonsterName$,""; @@ -230,13 +230,13 @@ iCorrect: getitem .Prize,.PrizeAmt; announce strcharinfo(0)+" is correct! I was disguised as: "+$MonsterName$+"",bc_map | bc_blue; if (.RoundCount>=.Rounds) { - setnpcdisplay "Disguise Event",795; + setnpcdisplay "Disguise Event", 4_M_NFDEADMAN; set .RoundCount,0; set .Change,0; set .EventON,0; setnpctimer 0; stopnpctimer; npctalk "Thank you all for playing. That was the last round of the Disguise Event. Come play again later."; end; } - setnpcdisplay "Disguise Event",795; + setnpcdisplay "Disguise Event", 4_M_NFDEADMAN; set .Change,0; setnpctimer 0; end; diff --git a/npc/events/gdevent_aru.txt b/npc/events/gdevent_aru.txt index e0098bf9b..9f1a9617a 100644 --- a/npc/events/gdevent_aru.txt +++ b/npc/events/gdevent_aru.txt @@ -480,19 +480,19 @@ arug_que01,100,81,3 script Pierrot Pier#aru_gd 4_M_PIERROT,{ specialeffect EF_POISONHIT; set .@sprchg_gd,rand(1,5); if (.@sprchg_gd == 1) { - setnpcdisplay "Pierrot Pier#aru_gd",950; + setnpcdisplay "Pierrot Pier#aru_gd", 4_GHOSTRING; } else if (.@sprchg_gd == 2) { - setnpcdisplay "Pierrot Pier#aru_gd",715; + setnpcdisplay "Pierrot Pier#aru_gd", 4_M_PIERROT; } else if (.@sprchg_gd == 3) { - setnpcdisplay "Pierrot Pier#aru_gd",714; + setnpcdisplay "Pierrot Pier#aru_gd", 4_F_06; } else if (.@sprchg_gd == 4) { - setnpcdisplay "Pierrot Pier#aru_gd",785; + setnpcdisplay "Pierrot Pier#aru_gd", 4_M_UMDANCEKID2; } else { - setnpcdisplay "Pierrot Pier#aru_gd",876; + setnpcdisplay "Pierrot Pier#aru_gd", 4_CAT; } if (checkweight(1201,1) == 0) { mes "- Wait!! -"; @@ -506,7 +506,7 @@ arug_que01,100,81,3 script Pierrot Pier#aru_gd 4_M_PIERROT,{ if ($@gdeventv_a2 == 0) { set .@que_2143,checkquest(2143,PLAYTIME); if (.@que_2143 == -1) { - setnpcdisplay "Pierrot Pier#aru_gd",715; + setnpcdisplay "Pierrot Pier#aru_gd", 4_M_PIERROT; mes "A lonely clown is juggling."; next; mes "When looked at closely, the clown is just a puppet that looks like a human."; @@ -845,7 +845,7 @@ arug_que01,100,81,3 script Pierrot Pier#aru_gd 4_M_PIERROT,{ } else { if ($@gdeventv_a2 == 0) { - setnpcdisplay "Pierrot Pier#aru_gd",715; + setnpcdisplay "Pierrot Pier#aru_gd", 4_M_PIERROT; mes "A lonely clown is juggling."; next; mes "When looked at closely, the clown is just a puppet that looks like a human."; diff --git a/npc/quests/newgears/2004_headgears.txt b/npc/quests/newgears/2004_headgears.txt index 1cfa2bc03..a6638d6a7 100644 --- a/npc/quests/newgears/2004_headgears.txt +++ b/npc/quests/newgears/2004_headgears.txt @@ -2034,7 +2034,7 @@ alde_alche,88,180,0 script Muscle Man#Alarm Mask 4_M_ALCHE_A,{ OnTimer4000: specialeffect EF_FLASHER; - setnpcdisplay "Muscle Man#Alarm Mask", 748; + setnpcdisplay "Muscle Man#Alarm Mask", 4_M_ALCHE_A; disablenpc " #Alarm Mask Man1"; disablenpc " #Alarm Mask Man2"; disablenpc " #Alarm Mask Man3"; diff --git a/npc/quests/quests_rachel.txt b/npc/quests/quests_rachel.txt index cf2e62dcb..fc96796bb 100644 --- a/npc/quests/quests_rachel.txt +++ b/npc/quests/quests_rachel.txt @@ -3131,7 +3131,7 @@ ice_dun02,120,105,3 script Man Stuck in Ice#cave 4_M_FROZEN1,5,5,{ mes "^3355FF*Pzzzzz*"; mes "*CRASH!*^000000"; next; - setnpcdisplay "Man Stuck in Ice#cave",937; + setnpcdisplay "Man Stuck in Ice#cave", 4_M_ARUNA_NFM1; emotion e_gasp; mes "[Maheo]"; mes "Finally...!"; @@ -3193,7 +3193,7 @@ ice_dun02,120,105,3 script Man Stuck in Ice#cave 4_M_FROZEN1,5,5,{ getitem 7574,4; //Ice_Particle close2; cutin "",255; - setnpcdisplay "Man Stuck in Ice#cave",924; + setnpcdisplay "Man Stuck in Ice#cave", 4_M_FROZEN1; end; } @@ -7495,4 +7495,4 @@ OnTouch: //= 2.7 Corrected overlaping warp coordinates. [L0ne_W0lf] //= 2.8 Replaced effect numerics with constants. [L0ne_W0lf] //= 2.9 Replaced effect numerics with constants. [Samuray22] -//============================================================ \ No newline at end of file +//============================================================ diff --git a/npc/re/quests/quests_brasilis.txt b/npc/re/quests/quests_brasilis.txt index 306a19cdb..5276fafe5 100644 --- a/npc/re/quests/quests_brasilis.txt +++ b/npc/re/quests/quests_brasilis.txt @@ -814,7 +814,7 @@ brasilis,56,224,7 script Mage Paje#bra 4_M_BIBI,{ mes "[Mage Paje]"; mes "Abracadabra~"; specialeffect EF_POISONHIT,AREA,"Poring#bra"; - setarray .@display[0],800,876,909; + setarray .@display[0], 4_NFCOCK, 4_CAT, 4_PORING; setnpcdisplay "Poring#bra",.@display[rand(3)]; if (brazil_gua != 5) close; next; diff --git a/npc/re/quests/quests_mora.txt b/npc/re/quests/quests_mora.txt index 9acebd207..1d7e9bbd0 100644 --- a/npc/re/quests/quests_mora.txt +++ b/npc/re/quests/quests_mora.txt @@ -2461,14 +2461,14 @@ bif_fild01,132,338,3 script Lope#pa 4_M_FAIRYSOLDIER2,2,2,{ } end; OnEnable: - setnpcdisplay "Lope#pa",999; + setnpcdisplay "Lope#pa", 4_M_MUT1; end; OnDisable: disablenpc "Lope#pa"; initnpctimer; end; OnReset: - setnpcdisplay "Lope#pa",461; + setnpcdisplay "Lope#pa", 4_M_FAIRYSOLDIER2; enablenpc "Lope#pa"; end; OnTimer2000: -- cgit v1.2.3-70-g09d2