From 86977d79269408a371384e61111c3a9cf6e87b0c Mon Sep 17 00:00:00 2001 From: Asheraf Date: Sun, 28 Aug 2016 17:03:57 +0100 Subject: *strnpcinfo now uses constants - NPC_NAME for the whole npc name including hidden part - NPC_NAME_VISIBLE for the visible part of the npc name - NPC_NAME_HIDDEN for the hidden part of the npc name - NPC_NAME_UNIQUE for the npc unique name - NPC_MAP for npc map --- npc/events/halloween_2006.txt | 12 ++++++------ npc/events/halloween_2009.txt | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'npc/events') diff --git a/npc/events/halloween_2006.txt b/npc/events/halloween_2006.txt index 8b34ab824..8c7b4dcbf 100644 --- a/npc/events/halloween_2006.txt +++ b/npc/events/halloween_2006.txt @@ -672,10 +672,10 @@ nif_fild01,167,113,3 script Masta's chicken#06_hw01 4_NFCOCK,{ specialeffect EF_TELEPORTATION; mes "The magic spell has been casted."; halloween = 103; - disablenpc "Masta's chicken#"+strnpcinfo(1); + disablenpc "Masta's chicken#"+strnpcinfo(NPC_NAME_VISIBLE); close2; sleep 180000; - enablenpc "Masta's chicken#"+strnpcinfo(1); + enablenpc "Masta's chicken#"+strnpcinfo(NPC_NAME_VISIBLE); end; } else { @@ -695,13 +695,13 @@ nif_fild01,167,113,3 script Masta's chicken#06_hw01 4_NFCOCK,{ if( @egg_temp == 3) { mes "As soon as you got close to the chicken and touched it, it disappeared completely."; mes "You got an 'egg' in the place where the chicken disappeared."; - disablenpc "Chicken#"+strnpcinfo(1); + disablenpc "Chicken#"+strnpcinfo(NPC_NAME_VISIBLE); getitem Egg,1; close; } else { mes "As soon as you got close to the chicken and touched it, it disappeared completely."; - disablenpc "Chicken#"+strnpcinfo(1); + disablenpc "Chicken#"+strnpcinfo(NPC_NAME_VISIBLE); close; } } @@ -711,13 +711,13 @@ nif_fild01,167,113,3 script Masta's chicken#06_hw01 4_NFCOCK,{ if( @egg_temp == 3) { mes "As soon as you got close to the chicken and touched it, it disappeared completely."; mes "You got an 'egg' in the place where the chicken disappeared."; - disablenpc "Chicken#"+strnpcinfo(1); + disablenpc "Chicken#"+strnpcinfo(NPC_NAME_VISIBLE); getitem Egg,1; close; } else { mes "As soon as you got close to the chicken and touched it, it disappeared completely."; - disablenpc "Chicken#"+strnpcinfo(1); + disablenpc "Chicken#"+strnpcinfo(NPC_NAME_VISIBLE); close; } diff --git a/npc/events/halloween_2009.txt b/npc/events/halloween_2009.txt index b1c00048e..ac2b0d39d 100644 --- a/npc/events/halloween_2009.txt +++ b/npc/events/halloween_2009.txt @@ -116,7 +116,7 @@ prontera,152,192,5 script Pumpkin Hat Researcher 4_M_05,{ //== Buffs - Trick or Treaters ============================= - script Trick or Treater::09Treats 4_M_KID1,2,2,{ OnTouch: - hideoffnpc strnpcinfo(3); + hideoffnpc strnpcinfo(NPC_NAME_UNIQUE); initnpctimer; mes "[Trick or Treater]"; mes "Hooray! hooray! Hooray!"; @@ -215,17 +215,17 @@ OnInit: end; OnEnableTreat: - enablenpc strnpcinfo(3); - hideonnpc strnpcinfo(3); + enablenpc strnpcinfo(NPC_NAME_UNIQUE); + hideonnpc strnpcinfo(NPC_NAME_UNIQUE); end; OnTimer15000: - hideonnpc strnpcinfo(3); - disablenpc strnpcinfo(3); + hideonnpc strnpcinfo(NPC_NAME_UNIQUE); + disablenpc strnpcinfo(NPC_NAME_UNIQUE); end; OnTimer300000: - donpcevent strnpcinfo(3)+"::OnEnableTreat"; + donpcevent strnpcinfo(NPC_NAME_UNIQUE)+"::OnEnableTreat"; stopnpctimer; end; } -- cgit v1.2.3-70-g09d2