diff options
author | Asheraf <acheraf1998@gmail.com> | 2016-08-28 17:03:57 +0100 |
---|---|---|
committer | hemagx <ibrahem.h.basyone@gmail.com> | 2016-08-29 01:03:42 +0200 |
commit | 86977d79269408a371384e61111c3a9cf6e87b0c (patch) | |
tree | 4f2a9b1f9a3ee6436a0b857d05caa2be7e99a877 /npc/custom | |
parent | 16f998c8a79153ed9f6721c36e129b6080fa59d2 (diff) | |
download | hercules-86977d79269408a371384e61111c3a9cf6e87b0c.tar.gz hercules-86977d79269408a371384e61111c3a9cf6e87b0c.tar.bz2 hercules-86977d79269408a371384e61111c3a9cf6e87b0c.tar.xz hercules-86977d79269408a371384e61111c3a9cf6e87b0c.zip |
*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
Diffstat (limited to 'npc/custom')
-rw-r--r-- | npc/custom/etc/mvp_arena.txt | 4 | ||||
-rw-r--r-- | npc/custom/events/mushroom_event.txt | 4 | ||||
-rw-r--r-- | npc/custom/quests/quest_shop.txt | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/npc/custom/etc/mvp_arena.txt b/npc/custom/etc/mvp_arena.txt index b8e1af564..d4205456e 100644 --- a/npc/custom/etc/mvp_arena.txt +++ b/npc/custom/etc/mvp_arena.txt @@ -49,7 +49,7 @@ quiz_00,49,31,4 script MVP Arena Guide 4_M_TWTEAMAN,{ // Keepers function script Keeper { - mes "[ ^0065DF"+strnpcinfo(1)+"^000000 ]"; + mes "[ ^0065DF"+strnpcinfo(NPC_NAME_VISIBLE)+"^000000 ]"; mes "Which arena would you"; mes "like to enter?"; set .@menu$,""; @@ -57,7 +57,7 @@ function script Keeper { set .@menu$, .@menu$+"Arena "+.@i+" ["+getmapusers("pvp_n_"+.@i+"-"+getarg(0))+"/20]:"; set .@i, select(.@menu$); if (getmapusers("pvp_n_"+.@i+"-"+getarg(0))>19) { - mes "[ ^0065DF"+strnpcinfo(1)+"^000000 ]"; + mes "[ ^0065DF"+strnpcinfo(NPC_NAME_VISIBLE)+"^000000 ]"; mes "Sorry, this arena is full!"; close; } diff --git a/npc/custom/events/mushroom_event.txt b/npc/custom/events/mushroom_event.txt index ef25a9294..6a8cbc59d 100644 --- a/npc/custom/events/mushroom_event.txt +++ b/npc/custom/events/mushroom_event.txt @@ -24,7 +24,7 @@ prontera,142,228,6 script Find the Mushroom BLACK_MUSHROOM,{ mes "Start the event?"; next; if(select("- No", "- Yes") == 1) close; - donpcevent strnpcinfo(0)+"::OnMinute10"; + donpcevent strnpcinfo(NPC_NAME)+"::OnMinute10"; mes "[ Find The Mushroom ]"; mes "Event started!"; close; @@ -42,7 +42,7 @@ OnMinute10: // Start time (every hour) set .Spawn,rand(1,10); // How many Mushrooms should spawn? set .Map$,.maps$[rand(getarraysize(.maps$))]; killmonster .Map$,"All"; - monster .Map$,0,0,"Please don't kill me!",1084,.Spawn,strnpcinfo(0)+"::OnMobKilled"; + monster .Map$,0,0,"Please don't kill me!",1084,.Spawn,strnpcinfo(NPC_NAME)+"::OnMobKilled"; announce "Find the Mushroom : Total of "+.Spawn+" Mushrooms have been spawned in "+.Map$+"!",0; sleep 2500; announce "Find the Mushroom : Every Mushroom you kill will give you "+getitemname(.Prize)+"!",0; diff --git a/npc/custom/quests/quest_shop.txt b/npc/custom/quests/quest_shop.txt index dd7fad138..2db3b069a 100644 --- a/npc/custom/quests/quest_shop.txt +++ b/npc/custom/quests/quest_shop.txt @@ -124,7 +124,7 @@ OnBuyItem: setarray @qe[1], getiteminfo(.@q[0],5), getiteminfo(.@q[0],11); if (@qe[2] > 0 && ((@qe[1] & 1) || (@qe[1] & 256) || (@qe[1] & 512) || (@qe[1] & 1024) || (@qe[1] & 2048) || (@qe[1] & 4096) || (@qe[1] & 4) || (@qe[1] & 8192))) set .@preview,1; - addtimer 1000, strnpcinfo(0)+"::OnEnd"; + addtimer 1000, strnpcinfo(NPC_NAME)+"::OnEnd"; while(1) { switch(select(" ~ Purchase ^0055FF"+ getitemname(.@q[0]) +"^000000", ((.@preview && !@qe[7])?" ~ Preview...": ""), " ~ ^777777Cancel^000000")) { case 1: |