From bc7f9019e8ec1ed3802c49baeaa35fdd20be2ab3 Mon Sep 17 00:00:00 2001 From: AnnieRuru Date: Thu, 11 Apr 2019 11:19:09 +0800 Subject: Standardize to "all" in script commands --- doc/script_commands.txt | 2 +- src/map/script.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/doc/script_commands.txt b/doc/script_commands.txt index b53dda2f6..8f114fbac 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -6502,7 +6502,7 @@ This command will kill all monsters that were spawned with monster() or areamonster() and have a specified event label attached to them. Commonly used to get rid of remaining quest monsters once the quest is complete. -If the label is given as "All", all monsters which have their respawn +If the label is given as "all", all monsters which have their respawn times set to -1 (like all the monsters summoned with 'monster' or 'areamonster' script command, and all monsters summoned with GM commands, but no other ones - that is, all non-permanent monsters) on the specified diff --git a/src/map/script.c b/src/map/script.c index fe8638ac3..01245a617 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -11043,10 +11043,16 @@ static BUILDIN(killmonster) int16 m,allflag=0; mapname=script_getstr(st,2); event=script_getstr(st,3); - if(strcmp(event,"All")==0) + + if (strcmpi(event, "all") == 0) { + if (strcmp(event, "all") != 0) { + ShowWarning("buildin_killmonster: \"%s\" deprecated! Please use \"all\" instead.\n", event); + script->reportsrc(st); + } allflag = 1; - else + } else { script->check_event(st, event); + } if( (m=map->mapname2mapid(mapname))<0 ) return true; -- cgit v1.2.3-60-g2f50 From 3bfc14f1eb52980e8a8610b4f4533fe81966bb98 Mon Sep 17 00:00:00 2001 From: AnnieRuru Date: Thu, 11 Apr 2019 11:20:18 +0800 Subject: change "All" into "all" in npc scripts --- npc/custom/events/mushroom_event.txt | 2 +- npc/re/instances/ghost_palace.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/npc/custom/events/mushroom_event.txt b/npc/custom/events/mushroom_event.txt index b9c54c09e..b0163f232 100644 --- a/npc/custom/events/mushroom_event.txt +++ b/npc/custom/events/mushroom_event.txt @@ -41,7 +41,7 @@ OnMinute10: // Start time (every hour) set .status,1; set .Spawn,rand(1,10); // How many Mushrooms should spawn? set .Map$,.maps$[rand(getarraysize(.maps$))]; - killmonster .Map$,"All"; + killmonster(.Map$, "all"); 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; diff --git a/npc/re/instances/ghost_palace.txt b/npc/re/instances/ghost_palace.txt index 3e708dc57..a291984db 100644 --- a/npc/re/instances/ghost_palace.txt +++ b/npc/re/instances/ghost_palace.txt @@ -601,7 +601,7 @@ OnInstanceInit: OnStart: stopnpctimer instance_npcname("#gp3control"); disablenpc(instance_npcname("#gp3control")); - killmonster(instance_mapname("1@spa"), "All"); + killmonster(instance_mapname("1@spa"), "all"); disablenpc(instance_npcname("#gp3warp")); enablenpc(instance_npcname("Lurid Royal Guard#gp5")); enablenpc(instance_npcname("Tiara Princess#gp5")); -- cgit v1.2.3-60-g2f50