Suggestion: NPC name as parameter in enablenpc (#6233)

* The required NPC name parameter is now optional for the following script commands:
    enablenpc
    disablenpc
    hideonnpc
    hideoffnpc
    cloakonnpc
    cloakoffnpc
    isnpccloaked
* Updated docs

Co-authored-by: Aleos <aleos89@users.noreply.github.com>
This commit is contained in:
Atemo 2021-09-09 14:50:24 +02:00 committed by GitHub
parent c18707bb6d
commit 69802a23fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
63 changed files with 364 additions and 375 deletions

View File

@ -6600,8 +6600,8 @@ Examples:
--------------------------------------- ---------------------------------------
*disablenpc "<NPC object name>"; *disablenpc {"<NPC object name>"};
*enablenpc "<NPC object name>"; *enablenpc {"<NPC object name>"};
These two commands will disable and enable, respectively, an NPC object These two commands will disable and enable, respectively, an NPC object
specified by name. The disabled NPC will disappear from sight and will no longer specified by name. The disabled NPC will disappear from sight and will no longer
@ -6618,8 +6618,8 @@ copies, and then disable all except one.
--------------------------------------- ---------------------------------------
*hideonnpc "<NPC object name>"; *hideonnpc {"<NPC object name>"};
*hideoffnpc "<NPC object name>"; *hideoffnpc {"<NPC object name>"};
These commands will make the NPC object specified display as hidden/visible, These commands will make the NPC object specified display as hidden/visible,
even though not actually disabled per se. Hidden as in thief Hide skill, but even though not actually disabled per se. Hidden as in thief Hide skill, but
@ -6639,8 +6639,8 @@ This command will fully unload a NPC object and all of it's duplicates.
--------------------------------------- ---------------------------------------
*cloakonnpc "<NPC object name>"{,<character ID>}; *cloakonnpc {"<NPC object name>"{,<character ID>}};
*cloakoffnpc "<NPC object name>"{,<character ID>}; *cloakoffnpc {"<NPC object name>"{,<character ID>}};
These commands will make the NPC object specified display as cloaked/uncloaked, These commands will make the NPC object specified display as cloaked/uncloaked,
even though not actually disabled. even though not actually disabled.
@ -6653,7 +6653,7 @@ If no <character ID> is specified it will display to the area.
--------------------------------------- ---------------------------------------
*isnpccloaked "<NPC object name>"{,<character ID>}; *isnpccloaked {"<NPC object name>"{,<character ID>}};
Returns true if the NPC has been cloaked to the attached player or given Returns true if the NPC has been cloaked to the attached player or given
<character ID>, false otherwise. This works in association with cloakonnpc <character ID>, false otherwise. This works in association with cloakonnpc

View File

@ -24,11 +24,11 @@ airplane,243,73,0 script #AirshipWarp-1 45,1,1,{
OnInit: OnInit:
OnHide: OnHide:
specialeffect EF_BASH; specialeffect EF_BASH;
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnUnhide: OnUnhide:
enablenpc strnpcinfo(0); enablenpc();
specialeffect EF_SUMMONSLAVE; specialeffect EF_SUMMONSLAVE;
end; end;
@ -670,11 +670,11 @@ OnTouch_:
OnInit: OnInit:
OnHide: OnHide:
specialeffect EF_BASH; specialeffect EF_BASH;
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnUnhide: OnUnhide:
enablenpc strnpcinfo(0); enablenpc();
specialeffect EF_SUMMONSLAVE; specialeffect EF_SUMMONSLAVE;
end; end;
} }

View File

@ -853,10 +853,10 @@ OnTouch:
OnInstanceInit: OnInstanceInit:
OnDisable: OnDisable:
disablenpc instance_npcname(strnpcinfo(0)); disablenpc();
end; end;
OnEnable: OnEnable:
enablenpc instance_npcname(strnpcinfo(0)); enablenpc();
end; end;
} }
@ -913,7 +913,7 @@ OnInstanceInit:
OnInstanceInit: OnInstanceInit:
OnEnable: OnEnable:
enablenpc instance_npcname(strnpcinfo(0)); enablenpc();
end; end;
} }

View File

@ -1055,7 +1055,7 @@ OnInit:
close2; close2;
donpcevent "df"+.@num+"#"+strnpcinfo(4)+"::OnEnable"; donpcevent "df"+.@num+"#"+strnpcinfo(4)+"::OnEnable";
specialeffect EF_ICECRASH; specialeffect EF_ICECRASH;
disablenpc strnpcinfo(0); disablenpc();
setd .@var$+"["+(.@num-1)+"]",0; setd .@var$+"["+(.@num-1)+"]",0;
set .@df_all,getd(.@var$+"[0]")+getd(.@var$+"[1]"); set .@df_all,getd(.@var$+"[0]")+getd(.@var$+"[1]");
if (!.@df_all) { if (!.@df_all) {
@ -1092,11 +1092,11 @@ OnInit:
OnInit: OnInit:
OnDisable: OnDisable:
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnEnable: OnEnable:
enablenpc strnpcinfo(0); enablenpc();
specialeffect EF_MAPPILLAR2; specialeffect EF_MAPPILLAR2;
end; end;
} }
@ -1297,7 +1297,7 @@ OnEnable:
delitem 984,5; //Oridecon delitem 984,5; //Oridecon
close2; close2;
donpcevent "RL"+.@num+"#"+strnpcinfo(4)+"::OnEnable"; donpcevent "RL"+.@num+"#"+strnpcinfo(4)+"::OnEnable";
disablenpc strnpcinfo(0); disablenpc();
if (.@num == 1) set .@str$,"1st"; if (.@num == 1) set .@str$,"1st";
else if (.@num == 2) set .@str$,"2nd"; else if (.@num == 2) set .@str$,"2nd";
else if (.@num == 3) set .@str$,"3rd"; else if (.@num == 3) set .@str$,"3rd";
@ -1336,11 +1336,11 @@ OnEnable:
OnInit: OnInit:
OnDisable: OnDisable:
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnEnable: OnEnable:
enablenpc strnpcinfo(0); enablenpc();
end; end;
} }

View File

@ -1248,11 +1248,11 @@ OnTimer5000:
end; end;
OnInstanceInit: OnInstanceInit:
disablenpc instance_npcname(strnpcinfo(0)); disablenpc();
end; end;
OnEnable: OnEnable:
enablenpc instance_npcname(strnpcinfo(0)); enablenpc();
callfunc "F_Tower_Monster", callfunc "F_Tower_Monster",
atoi(replacestr(strnpcinfo(0),"FGate102tower","")) + 1, atoi(replacestr(strnpcinfo(0),"FGate102tower","")) + 1,
strnpcinfo(4), strnpcinfo(4),

View File

@ -2004,11 +2004,11 @@ OnEnable:
2@nyd,115,278,0 script nyd_2f_red -1,5,5,{ 2@nyd,115,278,0 script nyd_2f_red -1,5,5,{
OnInstanceInit: OnInstanceInit:
disablenpc instance_npcname(strnpcinfo(0)); disablenpc();
end; end;
OnEnable: OnEnable:
enablenpc instance_npcname(strnpcinfo(0)); enablenpc();
donpcevent instance_npcname(strnpcinfo(0)+"_warp1")+"::OnEnable"; donpcevent instance_npcname(strnpcinfo(0)+"_warp1")+"::OnEnable";
donpcevent instance_npcname(strnpcinfo(0)+"_warp2")+"::OnEnable"; donpcevent instance_npcname(strnpcinfo(0)+"_warp2")+"::OnEnable";
donpcevent instance_npcname(strnpcinfo(0)+"_warp3")+"::OnEnable"; donpcevent instance_npcname(strnpcinfo(0)+"_warp3")+"::OnEnable";
@ -2020,7 +2020,7 @@ OnDisable:
donpcevent instance_npcname(strnpcinfo(0)+"_warp1")+"::OnDisable"; donpcevent instance_npcname(strnpcinfo(0)+"_warp1")+"::OnDisable";
donpcevent instance_npcname(strnpcinfo(0)+"_warp2")+"::OnDisable"; donpcevent instance_npcname(strnpcinfo(0)+"_warp2")+"::OnDisable";
donpcevent instance_npcname(strnpcinfo(0)+"_warp3")+"::OnDisable"; donpcevent instance_npcname(strnpcinfo(0)+"_warp3")+"::OnDisable";
disablenpc instance_npcname(strnpcinfo(0)); disablenpc();
end; end;
OnTouch: OnTouch:
@ -2042,18 +2042,18 @@ OnTouch:
end; end;
OnTimer10000: OnTimer10000:
disablenpc instance_npcname(strnpcinfo(0)); disablenpc();
stopnpctimer; stopnpctimer;
end; end;
} }
2@nyd,6,6,0 script nyd_2f_red_c -1,{ 2@nyd,6,6,0 script nyd_2f_red_c -1,{
OnInstanceInit: OnInstanceInit:
disablenpc instance_npcname(strnpcinfo(0)); disablenpc();
end; end;
OnEnable: OnEnable:
enablenpc instance_npcname(strnpcinfo(0)); enablenpc();
initnpctimer; initnpctimer;
set .@map$, instance_mapname("2@nyd"); set .@map$, instance_mapname("2@nyd");
set .@label$, instance_npcname(strnpcinfo(0))+"::OnMyMobDead"; set .@label$, instance_npcname(strnpcinfo(0))+"::OnMyMobDead";
@ -2105,7 +2105,7 @@ OnDisable:
stopnpctimer; stopnpctimer;
killmonster instance_mapname("2@nyd"),instance_npcname(strnpcinfo(0))+"::OnMyMobDead"; //custom killmonster instance_mapname("2@nyd"),instance_npcname(strnpcinfo(0))+"::OnMyMobDead"; //custom
donpcevent instance_npcname(substr(strnpcinfo(0),0,getstrlen(strnpcinfo(0))-3))+"::OnDisable"; donpcevent instance_npcname(substr(strnpcinfo(0),0,getstrlen(strnpcinfo(0))-3))+"::OnDisable";
disablenpc instance_npcname(strnpcinfo(0)); disablenpc();
end; end;
OnTimer180000: OnTimer180000:
@ -2118,11 +2118,11 @@ OnTimer180000:
2@nyd,130,298,0 script nyd_2f_red_warp1 -1,6,6,{ 2@nyd,130,298,0 script nyd_2f_red_warp1 -1,6,6,{
OnInstanceInit: OnInstanceInit:
OnDisable: OnDisable:
disablenpc instance_npcname(strnpcinfo(0)); disablenpc();
end; end;
OnEnable: OnEnable:
enablenpc instance_npcname(strnpcinfo(0)); enablenpc();
end; end;
OnTouch: OnTouch:

View File

@ -685,16 +685,16 @@ OnTimer23910:
else else
donpcevent instance_npcname("Torch#"+.@id[0]+"-"+(.@id[1]+1))+"::OnEnable"; donpcevent instance_npcname("Torch#"+.@id[0]+"-"+(.@id[1]+1))+"::OnEnable";
initnpctimer; initnpctimer;
disablenpc instance_npcname(strnpcinfo(0)); disablenpc();
end; end;
OnInstanceInit: OnInstanceInit:
if (strnpcinfo(0) != "Torch#2-1" && strnpcinfo(0) != "Torch#3-1") if (strnpcinfo(0) != "Torch#2-1" && strnpcinfo(0) != "Torch#3-1")
disablenpc instance_npcname(strnpcinfo(0)); disablenpc();
end; end;
OnEnable: OnEnable:
enablenpc instance_npcname(strnpcinfo(0)); enablenpc();
end; end;
OnTimer100: OnTimer100:

View File

@ -891,7 +891,7 @@ OnInstanceInit:
specialeffect2 EF_HOLYHIT; specialeffect2 EF_HOLYHIT;
getitem 6001,1; //Essence_Of_Fire getitem 6001,1; //Essence_Of_Fire
mes "The symbol of inheritor shines. Then a small crystal falls into my hand from the torch."; mes "The symbol of inheritor shines. Then a small crystal falls into my hand from the torch.";
disablenpc instance_npcname(strnpcinfo(0)); disablenpc();
close; close;
} }
else if (('ins_baphomet == 3) && (countitem(6001) > 10)) { else if (('ins_baphomet == 3) && (countitem(6001) > 10)) {
@ -914,7 +914,7 @@ OnInstanceInit:
} }
OnInstanceInit: OnInstanceInit:
disablenpc instance_npcname(strnpcinfo(0)); disablenpc();
end; end;
} }
1@cata,267,210,0 duplicate(Bobbing Torch#SS) Bobbing Torch#1 844 1@cata,267,210,0 duplicate(Bobbing Torch#SS) Bobbing Torch#1 844
@ -1093,7 +1093,7 @@ OnTouch_:
} }
if (.@seal_check == 2) erasequest 3041; if (.@seal_check == 2) erasequest 3041;
specialeffect EF_LEXDIVINA; specialeffect EF_LEXDIVINA;
disablenpc instance_npcname(strnpcinfo(0)); disablenpc();
set .@map$, instance_mapname("2@cata"); set .@map$, instance_mapname("2@cata");
if (strnpcinfo(2) == "0") areamobuseskill .@map$,79,81,10,1929,"NPC_INVINCIBLEOFF",1,0,0,ET_HELP,0; if (strnpcinfo(2) == "0") areamobuseskill .@map$,79,81,10,1929,"NPC_INVINCIBLEOFF",1,0,0,ET_HELP,0;
else if (strnpcinfo(2) == "2") areamobuseskill .@map$,123,109,10,1929,"NPC_INVINCIBLEOFF",1,0,0,ET_HELP,0; else if (strnpcinfo(2) == "2") areamobuseskill .@map$,123,109,10,1929,"NPC_INVINCIBLEOFF",1,0,0,ET_HELP,0;
@ -1110,7 +1110,7 @@ OnTouch_:
close; close;
OnInstanceInit: OnInstanceInit:
disablenpc instance_npcname(strnpcinfo(0)); disablenpc();
end; end;
} }
2@cata,79,81,0 duplicate(Magical Seal#SS) Magical Seal#0 844 2@cata,79,81,0 duplicate(Magical Seal#SS) Magical Seal#0 844

View File

@ -2257,7 +2257,7 @@ OnTouch_:
end; end;
OnInit: OnInit:
disablenpc strnpcinfo(0); disablenpc();
end; end;
} }
in_moc_16,156,87,1 duplicate(#moc_assin_dup) [Huey] 55 in_moc_16,156,87,1 duplicate(#moc_assin_dup) [Huey] 55

View File

@ -208,7 +208,7 @@ OnInit:
- script Runner_main -1,{ - script Runner_main -1,{
OnEnable: OnEnable:
emotion ET_SURPRISE; emotion ET_SURPRISE;
enablenpc strnpcinfo(0); enablenpc();
getmapxy(.@m$,.@x,.@y,BL_NPC); getmapxy(.@m$,.@x,.@y,BL_NPC);
setarray .@mob[1], 1725,1726,1727,1728,1730,1729; setarray .@mob[1], 1725,1726,1727,1728,1730,1729;
.@n = atoi( strnpcinfo(2) ); .@n = atoi( strnpcinfo(2) );
@ -216,7 +216,7 @@ OnEnable:
end; end;
OnDisable: OnDisable:
disablenpc strnpcinfo(0); disablenpc();
killmonster "p_track01",strnpcinfo(0)+"::OnMyMobDead"; killmonster "p_track01",strnpcinfo(0)+"::OnMyMobDead";
end; end;
@ -243,7 +243,7 @@ OnTouchNPC:
OnInit: OnInit:
if (strnpcinfo(2) != "" ) if (strnpcinfo(2) != "" )
disablenpc strnpcinfo(0); disablenpc();
end; end;
} }
p_track01,30,38,0 duplicate(Runner_main) Runner No. 1#1 -1,1,0 p_track01,30,38,0 duplicate(Runner_main) Runner No. 1#1 -1,1,0
@ -783,7 +783,7 @@ OnTouchNPC:
end; end;
OnInit: OnInit:
disablenpc strnpcinfo(0); disablenpc();
end; end;
} }
@ -799,7 +799,7 @@ OnTouchNPC:
end; end;
OnInit: OnInit:
disablenpc strnpcinfo(0); disablenpc();
end; end;
} }
@ -814,7 +814,7 @@ OnTouchNPC:
end; end;
OnInit: OnInit:
disablenpc strnpcinfo(0); disablenpc();
end; end;
} }
@ -829,7 +829,7 @@ OnTouchNPC:
end; end;
OnInit: OnInit:
disablenpc strnpcinfo(0); disablenpc();
end; end;
} }
@ -1690,7 +1690,7 @@ function MN {
} }
OnEnable: OnEnable:
enablenpc strnpcinfo(0); enablenpc();
setarray .@n[1], 1725,1726,1727,1728,1730,1729; setarray .@n[1], 1725,1726,1727,1728,1730,1729;
getmapxy(.@m$,.@x,.@y,BL_NPC); getmapxy(.@m$,.@x,.@y,BL_NPC);
.@i = MN; .@i = MN;
@ -1728,7 +1728,7 @@ OnDisable:
OnInit: OnInit:
if ( strnpcinfo(2) != "main" ) if ( strnpcinfo(2) != "main" )
disablenpc strnpcinfo(0); disablenpc();
end; end;
} }
p_track02,30,38,0 duplicate(mob1#main) #poring1 139,0,0 p_track02,30,38,0 duplicate(mob1#main) #poring1 139,0,0
@ -1822,7 +1822,7 @@ OnDisable:
} }
OnInit: OnInit:
disablenpc strnpcinfo(0); disablenpc();
end; end;
} }

View File

@ -29,7 +29,7 @@ function script F_tt {
end; end;
OnEnable: OnEnable:
enablenpc strnpcinfo(0); enablenpc();
enablewaitingroomevent strnpcinfo(0); enablewaitingroomevent strnpcinfo(0);
end; end;
@ -2044,7 +2044,7 @@ OnTouch_:
OnInit: OnInit:
set .@w$,callfunc("F_tt"); set .@w$,callfunc("F_tt");
disablenpc strnpcinfo(0); disablenpc();
end; end;
} }
turbo_e_4,11,266,0 duplicate(Flasher#tt_main) Flasher_Exit_1#e4 45,1,1 turbo_e_4,11,266,0 duplicate(Flasher#tt_main) Flasher_Exit_1#e4 45,1,1

View File

@ -8432,7 +8432,7 @@ mid_camp,88,100,55 script Cat Paw Mining Agent 876,{
else if (.@rhea_ran == 16) getitem 993,1; //Yellow_Live else if (.@rhea_ran == 16) getitem 993,1; //Yellow_Live
else getitem 6048,1; //Unidentified_Mineral else getitem 6048,1; //Unidentified_Mineral
initnpctimer; initnpctimer;
disablenpc strnpcinfo(0); disablenpc();
end; end;
} }
else { else {
@ -8443,7 +8443,7 @@ mid_camp,88,100,55 script Cat Paw Mining Agent 876,{
end; end;
OnTimer120000: OnTimer120000:
enablenpc strnpcinfo(0); enablenpc();
stopnpctimer; stopnpctimer;
end; end;
} }
@ -13696,11 +13696,11 @@ OnTimer11000:
OnInit: OnInit:
OnDisable: OnDisable:
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnEnable: OnEnable:
enablenpc strnpcinfo(0); enablenpc();
end; end;
} }

View File

@ -427,7 +427,7 @@ man_fild02,132,47,4 duplicate(Cat Paw Agent#spl) Cat Paw Agent#man 421
else if (.@rhea_ran == 17) getitem 6080,1; //Manuk_Coin else if (.@rhea_ran == 17) getitem 6080,1; //Manuk_Coin
else getitem 6048,1; //Unidentified_Mineral else getitem 6048,1; //Unidentified_Mineral
initnpctimer; initnpctimer;
disablenpc strnpcinfo(0); disablenpc();
end; end;
} }
else { else {
@ -438,7 +438,7 @@ man_fild02,132,47,4 duplicate(Cat Paw Agent#spl) Cat Paw Agent#man 421
end; end;
OnTimer120000: OnTimer120000:
enablenpc strnpcinfo(0); enablenpc();
stopnpctimer; stopnpctimer;
end; end;
} }
@ -3282,23 +3282,23 @@ mid_camp,192,239,4 script Wanted Sign#ep13_2ect01 857,{
if ((ep13_2_dayegg == 1) && (countitem(6093) < 10)) { if ((ep13_2_dayegg == 1) && (countitem(6093) < 10)) {
mes "We just got fresh eggs from the dragon nest."; mes "We just got fresh eggs from the dragon nest.";
getitem 6093,1; //Egg_Of_Draco getitem 6093,1; //Egg_Of_Draco
disablenpc strnpcinfo(0); disablenpc();
initnpctimer; initnpctimer;
close; close;
} }
end; end;
OnTimer420000: OnTimer420000:
enablenpc strnpcinfo(0); enablenpc();
stopnpctimer; stopnpctimer;
end; end;
OnEnable: OnEnable:
enablenpc strnpcinfo(0); enablenpc();
end; end;
OnDisable: OnDisable:
disablenpc strnpcinfo(0); disablenpc();
end; end;
} }
@ -3317,23 +3317,23 @@ nyd_dun02,68,256,0 script Dragon Egg#ep13_degg_1 463,{
if ((ep13_2_dayegg == 1) && (countitem(6093) < 10)) { if ((ep13_2_dayegg == 1) && (countitem(6093) < 10)) {
mes "We just got fresh eggs from the dragon nest."; mes "We just got fresh eggs from the dragon nest.";
getitem 6093,1; //Egg_Of_Draco getitem 6093,1; //Egg_Of_Draco
disablenpc strnpcinfo(0); disablenpc();
initnpctimer; initnpctimer;
close; close;
} }
end; end;
OnTimer240000: OnTimer240000:
enablenpc strnpcinfo(0); enablenpc();
stopnpctimer; stopnpctimer;
end; end;
OnEnable: OnEnable:
enablenpc strnpcinfo(0); enablenpc();
end; end;
OnDisable: OnDisable:
disablenpc strnpcinfo(0); disablenpc();
end; end;
} }
nyd_dun02,68,256,0 duplicate(Dragon Egg#ep13_degg_1) Dragon Egg#ep13_degg11 463 nyd_dun02,68,256,0 duplicate(Dragon Egg#ep13_degg_1) Dragon Egg#ep13_degg11 463
@ -3348,23 +3348,23 @@ nyd_dun02,201,166,0 script Dragon Egg#ep13_degg_2 463,{
if ((ep13_2_dayegg == 1) && (countitem(6093) < 10)) { if ((ep13_2_dayegg == 1) && (countitem(6093) < 10)) {
mes "We just got fresh eggs from the dragon nest."; mes "We just got fresh eggs from the dragon nest.";
getitem 6093,1; //Egg_Of_Draco getitem 6093,1; //Egg_Of_Draco
disablenpc strnpcinfo(0); disablenpc();
initnpctimer; initnpctimer;
close; close;
} }
end; end;
OnTimer120000: OnTimer120000:
enablenpc strnpcinfo(0); enablenpc();
stopnpctimer; stopnpctimer;
end; end;
OnEnable: OnEnable:
enablenpc strnpcinfo(0); enablenpc();
end; end;
OnDisable: OnDisable:
disablenpc strnpcinfo(0); disablenpc();
end; end;
} }
nyd_dun02,201,166,0 duplicate(Dragon Egg#ep13_degg_2) Dragon Egg#ep13_degg16 463 nyd_dun02,201,166,0 duplicate(Dragon Egg#ep13_degg_2) Dragon Egg#ep13_degg16 463
@ -4907,7 +4907,7 @@ mjolnir_12,220,37,0 duplicate(mjo_no_find) #mj12_find_3 -1,5,5
else getitem 6077,2; //Rough_Mineral else getitem 6077,2; //Rough_Mineral
close2; close2;
donpcevent strnpcinfo(0)+"_t::OnEnable"; donpcevent strnpcinfo(0)+"_t::OnEnable";
disablenpc strnpcinfo(0); disablenpc();
end; end;
} }
case 2: case 2:
@ -4923,7 +4923,7 @@ mjolnir_12,220,37,0 duplicate(mjo_no_find) #mj12_find_3 -1,5,5
end; end;
OnInit: OnInit:
enablenpc strnpcinfo(0); enablenpc();
end; end;
OnTouch_: OnTouch_:
@ -5257,7 +5257,7 @@ OnTouch_:
else if (.@stst == 1) getitem 6077,2; //Rough_Mineral else if (.@stst == 1) getitem 6077,2; //Rough_Mineral
else getitem 6077,1; //Rough_Mineral else getitem 6077,1; //Rough_Mineral
donpcevent strnpcinfo(0)+"_t::OnEnable"; donpcevent strnpcinfo(0)+"_t::OnEnable";
disablenpc strnpcinfo(0); disablenpc();
close; close;
} }
case 2: case 2:
@ -5273,7 +5273,7 @@ OnTouch_:
end; end;
OnInit: OnInit:
enablenpc strnpcinfo(0); enablenpc();
end; end;
OnTouch_: OnTouch_:
@ -5390,7 +5390,7 @@ OnTouch_:
else if (.@stst == 1) getitem 6077,2; //Rough_Mineral else if (.@stst == 1) getitem 6077,2; //Rough_Mineral
else getitem 6077,1; //Rough_Mineral else getitem 6077,1; //Rough_Mineral
donpcevent strnpcinfo(0)+"_t::OnEnable"; donpcevent strnpcinfo(0)+"_t::OnEnable";
disablenpc strnpcinfo(0); disablenpc();
close; close;
} }
case 2: case 2:
@ -5406,7 +5406,7 @@ OnTouch_:
end; end;
OnInit: OnInit:
enablenpc strnpcinfo(0); enablenpc();
end; end;
OnTouch_: OnTouch_:
@ -6974,7 +6974,7 @@ OnTouch_:
- script ep13_warp_s_0 -1,{ - script ep13_warp_s_0 -1,{
OnEnable: OnEnable:
enablenpc strnpcinfo(0); enablenpc();
initnpctimer; initnpctimer;
OnTimer2000: OnTimer2000:
OnTimer4000: OnTimer4000:
@ -6988,18 +6988,18 @@ OnTimer8000:
OnTimer10000: OnTimer10000:
specialeffect EF_STEAL; specialeffect EF_STEAL;
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnDisable: OnDisable:
specialeffect EF_WIND; specialeffect EF_WIND;
disablenpc strnpcinfo(0); disablenpc();
end; end;
} }
- script ep13_warp_s_1 -1,{ - script ep13_warp_s_1 -1,{
OnEnable: OnEnable:
enablenpc strnpcinfo(0); enablenpc();
initnpctimer; initnpctimer;
OnTimer2000: OnTimer2000:
OnTimer4000: OnTimer4000:
@ -7014,18 +7014,18 @@ OnTimer10000:
OnTimer12000: OnTimer12000:
specialeffect EF_STEAL; specialeffect EF_STEAL;
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnDisable: OnDisable:
specialeffect EF_WIND; specialeffect EF_WIND;
disablenpc strnpcinfo(0); disablenpc();
end; end;
} }
- script ep13_warp_s_2 -1,{ - script ep13_warp_s_2 -1,{
OnEnable: OnEnable:
enablenpc strnpcinfo(0); enablenpc();
initnpctimer; initnpctimer;
OnTimer2000: OnTimer2000:
OnTimer4000: OnTimer4000:
@ -7041,12 +7041,12 @@ OnTimer12000:
OnTimer15000: OnTimer15000:
specialeffect EF_STEAL; specialeffect EF_STEAL;
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnDisable: OnDisable:
specialeffect EF_WIND; specialeffect EF_WIND;
disablenpc strnpcinfo(0); disablenpc();
end; end;
} }

View File

@ -2688,11 +2688,11 @@ OnTouch:
- script Baehideun#main -1,{ - script Baehideun#main -1,{
OnInit: OnInit:
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnEnable: OnEnable:
enablenpc strnpcinfo(0); enablenpc();
.@c = charat(strnpcinfo(0),9); .@c = charat(strnpcinfo(0),9);
if (checkre(0)) { if (checkre(0)) {
switch (.@c) { switch (.@c) {
@ -2720,7 +2720,7 @@ OnTimer300000:
OnDisable: OnDisable:
$@mos1_edq = 0; $@mos1_edq = 0;
stopnpctimer; stopnpctimer;
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnMyMobDead: OnMyMobDead:
@ -7162,14 +7162,14 @@ OnTimer300000:
OnEnable: OnEnable:
initnpctimer; initnpctimer;
enablenpc strnpcinfo(0); enablenpc();
end; end;
OnTimer120000: OnTimer120000:
OnDisable: OnDisable:
stopnpctimer; stopnpctimer;
OnInit: OnInit:
disablenpc strnpcinfo(0); disablenpc();
end; end;
} }
mosk_dun01,50,256,3 duplicate(mos_rus#main) Gray Wolf#rus05 4_RUS_DWOLF mosk_dun01,50,256,3 duplicate(mos_rus#main) Gray Wolf#rus05 4_RUS_DWOLF
@ -8271,13 +8271,13 @@ mosk_fild02,157,233,0 script Shepherdess#rus10 1_F_04,{
OnDisable: OnDisable:
initnpctimer; initnpctimer;
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnTimer60000: OnTimer60000:
OnEnable: OnEnable:
stopnpctimer; stopnpctimer;
enablenpc strnpcinfo(0); enablenpc();
end; end;
} }
mosk_fild02,151,188,0 duplicate(PTree#rusmain) Pointed Tree#rus11 HIDDEN_NPC mosk_fild02,151,188,0 duplicate(PTree#rusmain) Pointed Tree#rus11 HIDDEN_NPC
@ -10027,7 +10027,7 @@ OnTouch_:
specialeffect EF_TELEPORTATION2; specialeffect EF_TELEPORTATION2;
next; next;
mes "- You cast the spell in a hurry and the cow is surronded by the light and disappears !! -"; mes "- You cast the spell in a hurry and the cow is surronded by the light and disappears !! -";
disablenpc strnpcinfo(0); disablenpc();
enablenpc "Cow#rus3"+ .@other_npc[0]; enablenpc "Cow#rus3"+ .@other_npc[0];
next; next;
} else { } else {
@ -10037,7 +10037,7 @@ OnTouch_:
emotion ET_THINK; emotion ET_THINK;
next; next;
mes "- The cow, seems to gibe at you, looks at you quickly and runs to bushes !! -"; mes "- The cow, seems to gibe at you, looks at you quickly and runs to bushes !! -";
disablenpc strnpcinfo(0); disablenpc();
if (rand(2)) if (rand(2))
enablenpc "Cow#rus3"+ .@other_npc[0]; enablenpc "Cow#rus3"+ .@other_npc[0];
else else
@ -10049,7 +10049,7 @@ OnTouch_:
mes "Akkkk?! Eh!? The s-spell..."; mes "Akkkk?! Eh!? The s-spell...";
next; next;
mes "- You hesitate, the cow, seems to gibe at you, passes by you and runs to bushes !! -"; mes "- You hesitate, the cow, seems to gibe at you, passes by you and runs to bushes !! -";
disablenpc strnpcinfo(0); disablenpc();
if (rand(2)) if (rand(2))
enablenpc "Cow#rus3"+ .@other_npc[0]; enablenpc "Cow#rus3"+ .@other_npc[0];
else else

View File

@ -811,7 +811,7 @@ OnDisable:
que_god01,154,67,0 script god_failwarp#1 -1,4,7,{ que_god01,154,67,0 script god_failwarp#1 -1,4,7,{
OnInit: OnInit:
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnTouch_: OnTouch_:
warp "prontera",156,324; warp "prontera",156,324;

View File

@ -1681,10 +1681,10 @@ tha_t08,90,153,0 script Shining Crystal#tt_r1 844,{
OnInit: OnInit:
OnDisable: OnDisable:
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnEnable: OnEnable:
enablenpc strnpcinfo(0); enablenpc();
end; end;
} }
tha_t08,90,62,0 duplicate(Shining Crystal#tt_r1) Shining Crystal#tt_r2 844 tha_t08,90,62,0 duplicate(Shining Crystal#tt_r1) Shining Crystal#tt_r2 844
@ -1715,10 +1715,10 @@ tha_t08,49,153,0 script Shining Crystal#tt_y1 844,{
OnInit: OnInit:
OnDisable: OnDisable:
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnEnable: OnEnable:
enablenpc strnpcinfo(0); enablenpc();
end; end;
} }
tha_t08,90,150,0 duplicate(Shining Crystal#tt_y1) Shining Crystal#tt_y2 844 tha_t08,90,150,0 duplicate(Shining Crystal#tt_y1) Shining Crystal#tt_y2 844
@ -1749,10 +1749,10 @@ tha_t08,49,65,0 script Shining Crystal#tt_b1 844,{
OnInit: OnInit:
OnDisable: OnDisable:
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnEnable: OnEnable:
enablenpc strnpcinfo(0); enablenpc();
end; end;
} }
tha_t08,49,150,0 duplicate(Shining Crystal#tt_b1) Shining Crystal#tt_b2 844 tha_t08,49,150,0 duplicate(Shining Crystal#tt_b1) Shining Crystal#tt_b2 844
@ -1783,10 +1783,10 @@ tha_t08,90,65,0 script Shining Crystal#tt_g1 844,{
OnInit: OnInit:
OnDisable: OnDisable:
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnEnable: OnEnable:
enablenpc strnpcinfo(0); enablenpc();
end; end;
} }
tha_t08,49,62,0 duplicate(Shining Crystal#tt_g1) Shining Crystal#tt_g2 844 tha_t08,49,62,0 duplicate(Shining Crystal#tt_g1) Shining Crystal#tt_g2 844

View File

@ -150,10 +150,10 @@ OnInit:
donpcevent "Unidentified Creature#"+.@npc$[.@i]+"::"+((.@i == .@rand)?"OnEnable":"OnDisable"); donpcevent "Unidentified Creature#"+.@npc$[.@i]+"::"+((.@i == .@rand)?"OnEnable":"OnDisable");
end; end;
OnEnable: OnEnable:
enablenpc strnpcinfo(0); enablenpc();
end; end;
OnDisable: OnDisable:
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnBingx2: OnBingx2:
switch(atoi(strnpcinfo(2))) { switch(atoi(strnpcinfo(2))) {
@ -196,10 +196,10 @@ ma_scene01,195,92,4 duplicate(Unidentified Creature#i) Unidentified Creature#09
- script Unidentified Creature#j -1,{ - script Unidentified Creature#j -1,{
end; end;
OnEnable: OnEnable:
enablenpc strnpcinfo(0); enablenpc();
end; end;
OnDisable: OnDisable:
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnBingx2: OnBingx2:
switch(atoi(strnpcinfo(2))) { switch(atoi(strnpcinfo(2))) {

View File

@ -452,7 +452,7 @@ OnEnable2:
OnEnable3: OnEnable3:
.@i = atoi(charat(strnpcinfo(2),4))+1; .@i = atoi(charat(strnpcinfo(2),4))+1;
donpcevent instance_npcname("#Ward" + .@i + " Entry") + "::OnEnable1"; donpcevent instance_npcname("#Ward" + .@i + " Entry") + "::OnEnable1";
disablenpc instance_npcname(strnpcinfo(0)); disablenpc();
end; end;
OnMyMobDead: OnMyMobDead:
initnpctimer; initnpctimer;
@ -473,7 +473,7 @@ OnTimer1000:
stopnpctimer; stopnpctimer;
end; end;
OnInstanceInit: OnInstanceInit:
disablenpc instance_npcname(strnpcinfo(0)); disablenpc();
end; end;
} }
1@ma_h,57,147,0 duplicate(#Ward1 Entry) #Ward2 Entry HIDDEN_WARP_NPC //3,3 1@ma_h,57,147,0 duplicate(#Ward1 Entry) #Ward2 Entry HIDDEN_WARP_NPC //3,3
@ -915,7 +915,7 @@ OnTouch:
donpcevent instance_npcname("#Boss Room Entry_time") + "::OnEnable"; donpcevent instance_npcname("#Boss Room Entry_time") + "::OnEnable";
end; end;
OnInstanceInit: OnInstanceInit:
disablenpc instance_npcname(strnpcinfo(0)); disablenpc();
end; end;
} }
1@ma_h,132,171,0 duplicate(#Boss Room Entry_a) #Boss Room Entry_b HIDDEN_WARP_NPC,10,10 1@ma_h,132,171,0 duplicate(#Boss Room Entry_a) #Boss Room Entry_b HIDDEN_WARP_NPC,10,10

View File

@ -1766,14 +1766,14 @@ OnTouch_:
donpcevent instance_npcname("GeneratorBroadcast#1") + "::OnStart"; donpcevent instance_npcname("GeneratorBroadcast#1") + "::OnStart";
disablenpc instance_npcname("Charleston 1#2"); disablenpc instance_npcname("Charleston 1#2");
enablenpc instance_npcname("Charleston 1#3"); enablenpc instance_npcname("Charleston 1#3");
disablenpc instance_npcname( strnpcinfo(0) ); disablenpc();
} }
close; close;
} }
if ('ep15_1_mcd01 == 6 || 'ep15_1_mcd01 == 5) { if ('ep15_1_mcd01 == 6 || 'ep15_1_mcd01 == 5) {
mes "You turned on the generator. The sounds of turning wheels can be heard."; mes "You turned on the generator. The sounds of turning wheels can be heard.";
'ep15_1_mcd01++; 'ep15_1_mcd01++;
disablenpc instance_npcname( strnpcinfo(0) ); disablenpc();
close; close;
} }
end; end;
@ -1890,7 +1890,7 @@ OnTouch_:
1@mcd,127,262,0 script mob#1 HIDDEN_WARP_NPC,5,5,{ 1@mcd,127,262,0 script mob#1 HIDDEN_WARP_NPC,5,5,{
end; end;
OnTouch_: OnTouch_:
disablenpc instance_npcname( strnpcinfo(0) ); disablenpc();
switch( atoi(strnpcinfo(2)) ) { switch( atoi(strnpcinfo(2)) ) {
case 1: case 1:
areamonster 'map_name$,106,246,115,256,"Security robot", 3128,5; // KICK_AND_KICK areamonster 'map_name$,106,246,115,256,"Security robot", 3128,5; // KICK_AND_KICK

View File

@ -534,7 +534,7 @@ OnTimer26000:
if ('devil_tower == 1) { if ('devil_tower == 1) {
delitem 7641,1; delitem 7641,1;
specialeffect EF_ENTRY; specialeffect EF_ENTRY;
disablenpc instance_npcname( strnpcinfo(0) ); disablenpc();
enablenpc instance_npcname( strnpcinfo(1) + "#" + replacestr( strnpcinfo(2), "_1", "" ) ); enablenpc instance_npcname( strnpcinfo(1) + "#" + replacestr( strnpcinfo(2), "_1", "" ) );
specialeffect EF_ENTRY,AREA, instance_npcname( strnpcinfo(1) + "#" + replacestr( strnpcinfo(2), "_1", "" ) ); specialeffect EF_ENTRY,AREA, instance_npcname( strnpcinfo(1) + "#" + replacestr( strnpcinfo(2), "_1", "" ) );
mes "It worked."; mes "It worked.";
@ -1276,7 +1276,7 @@ OnDisable:
stopnpctimer; stopnpctimer;
killmonster 'map_tnm2$, instance_npcname(strnpcinfo(0)) + "::OnMobDead"; // note : officially still alive killmonster 'map_tnm2$, instance_npcname(strnpcinfo(0)) + "::OnMobDead"; // note : officially still alive
killmonster 'map_tnm2$, instance_npcname("#devil_seal_dead") + "::OnSeal_" + strnpcinfo(2); // note : officially still alive killmonster 'map_tnm2$, instance_npcname("#devil_seal_dead") + "::OnSeal_" + strnpcinfo(2); // note : officially still alive
disablenpc instance_npcname(strnpcinfo(0)); disablenpc();
end; end;
OnStop: OnStop:
stopnpctimer; stopnpctimer;
@ -1294,7 +1294,7 @@ OnMobDead:
1@tnm2,1,1,0 script seal_reach_center#DIR_NORTHWEST HIDDEN_WARP_NPC,{ 1@tnm2,1,1,0 script seal_reach_center#DIR_NORTHWEST HIDDEN_WARP_NPC,{
end; end;
OnStart: OnStart:
enablenpc instance_npcname(strnpcinfo(0)); enablenpc();
initnpctimer; initnpctimer;
end; end;
OnTimer2000: OnTimer2000:
@ -1305,7 +1305,7 @@ OnTimer4000:
npctalk "Thanatos: Stop him! Prevent him from coming closer!!!", 'thanatos$; npctalk "Thanatos: Stop him! Prevent him from coming closer!!!", 'thanatos$;
mapannounce 'map_tnm2$, "Thanatos: Stop him! Prevent him from coming closer!!!", bc_map,0xFF00; mapannounce 'map_tnm2$, "Thanatos: Stop him! Prevent him from coming closer!!!", bc_map,0xFF00;
stopnpctimer; stopnpctimer;
disablenpc instance_npcname(strnpcinfo(0)); disablenpc();
end; end;
} }
1@tnm2,1,1,0 duplicate(seal_reach_center#DIR_NORTHWEST) seal_reach_center#DIR_SOUTHWEST HIDDEN_WARP_NPC 1@tnm2,1,1,0 duplicate(seal_reach_center#DIR_NORTHWEST) seal_reach_center#DIR_SOUTHWEST HIDDEN_WARP_NPC

View File

@ -149,7 +149,7 @@ OnInstanceInit:
OnInstanceInit: OnInstanceInit:
'mob_summoned = 0; 'mob_summoned = 0;
disablenpc instance_npcname(strnpcinfo(0)); disablenpc();
end; end;
OnEnable: OnEnable:

View File

@ -2049,7 +2049,7 @@ OnTouch_:
initnpctimer; initnpctimer;
end; end;
OnTimer45000: OnTimer45000:
enablenpc instance_npcname(strnpcinfo(0)); enablenpc();
stopnpctimer; stopnpctimer;
end; end;
OnMyMobDead: OnMyMobDead:
@ -2137,7 +2137,7 @@ OnTouch_:
initnpctimer; initnpctimer;
end; end;
OnTimer15000: OnTimer15000:
enablenpc instance_npcname(strnpcinfo(0)); enablenpc();
stopnpctimer; stopnpctimer;
end; end;
OnMyMobDead: OnMyMobDead:

View File

@ -207,7 +207,7 @@ function script F_Mora_Mist {
mes "You chop down the tree, which was blocking the path of the maze, "+((getarg(3,0))?"clearing the way out of the forest.":"so now you can continue."); mes "You chop down the tree, which was blocking the path of the maze, "+((getarg(3,0))?"clearing the way out of the forest.":"so now you can continue.");
mapannounce .@map$,getarg(1),bc_map,"0xccffcc"; //FW_NORMAL 12 0 0 mapannounce .@map$,getarg(1),bc_map,"0xccffcc"; //FW_NORMAL 12 0 0
enablenpc instance_npcname(getarg(0)); enablenpc instance_npcname(getarg(0));
disablenpc instance_npcname(strnpcinfo(0)); disablenpc();
if (getarg(4,0)) if (getarg(4,0))
initnpctimer; initnpctimer;
close; close;
@ -451,7 +451,7 @@ OnMyMobDead:
1@mist,73,290,0 script Mysterious Flower#1 844,{ 1@mist,73,290,0 script Mysterious Flower#1 844,{
specialeffect EF_LEVEL99_4; specialeffect EF_LEVEL99_4;
disablenpc instance_npcname(strnpcinfo(0)); disablenpc();
getitem 12561,1; //Mysterious_Seed getitem 12561,1; //Mysterious_Seed
end; end;
} }

View File

@ -510,7 +510,7 @@ OnTouch_:
end; end;
OnTimer45000: OnTimer45000:
enablenpc instance_npcname( strnpcinfo(0) ); enablenpc();
killmonster 'xm_d_map$, instance_npcname( strnpcinfo(0) ) +"::OnMyMobDead"; killmonster 'xm_d_map$, instance_npcname( strnpcinfo(0) ) +"::OnMyMobDead";
stopnpctimer; stopnpctimer;
end; end;
@ -753,7 +753,7 @@ OnStart:
break; break;
} }
sleep2 3000; sleep2 3000;
disablenpc instance_npcname( strnpcinfo(0) ); disablenpc();
if ('worker[.@num] == 0) { if ('worker[.@num] == 0) {
'worker[.@num] = 1; 'worker[.@num] = 1;
donpcevent instance_npcname("#fac2wpc") + "::OnStart"; donpcevent instance_npcname("#fac2wpc") + "::OnStart";
@ -1360,7 +1360,7 @@ OnStart:
1@xm_d,210,141,3 script Packaged Present#1 4_TREASURE_BOX,{ 1@xm_d,210,141,3 script Packaged Present#1 4_TREASURE_BOX,{
specialeffect EF_COIN; specialeffect EF_COIN;
disablenpc instance_npcname( strnpcinfo(0) ); disablenpc();
initnpctimer; initnpctimer;
end; end;

View File

@ -319,7 +319,7 @@ OnTouch:
sscanf( strnpcinfo(2), "lrboom%d", .@num ); sscanf( strnpcinfo(2), "lrboom%d", .@num );
areamonster 'map_name$,178,34,198,54, "Machine Component", (3251 + ((.@num-1) % 2)), 3; areamonster 'map_name$,178,34,198,54, "Machine Component", (3251 + ((.@num-1) % 2)), 3;
mapannounce 'map_name$, "System message : Intruder detected in Zone 2.",bc_map,"0xFF0000"; mapannounce 'map_name$, "System message : Intruder detected in Zone 2.",bc_map,"0xFF0000";
disablenpc instance_npcname( strnpcinfo(0) ); disablenpc();
end; end;
} }
1@uns,164,97,0 duplicate(#lrboom1) #lrboom2 4_CRACK,2,2 1@uns,164,97,0 duplicate(#lrboom1) #lrboom2 4_CRACK,2,2

View File

@ -597,12 +597,12 @@ function script F_mal_missing {
disablenpc instance_npcname("Culvert Entrance#"+.@i$); disablenpc instance_npcname("Culvert Entrance#"+.@i$);
disablenpc instance_npcname("Missing, the Cleaner#"+.@i$+"o"); disablenpc instance_npcname("Missing, the Cleaner#"+.@i$+"o");
donpcevent instance_npcname("Monster Hole#"+.@i$)+"::OnClear"; donpcevent instance_npcname("Monster Hole#"+.@i$)+"::OnClear";
disablenpc instance_npcname(strnpcinfo(0)); disablenpc();
close; close;
} }
close; close;
OnInstanceInit: OnInstanceInit:
disablenpc instance_npcname(strnpcinfo(0)); disablenpc();
end; end;
} }
@ -712,13 +712,13 @@ OnClear:
1@pump,36,111,4 script #Culvert_n1 844,14,14,{ //temporary workaround for ALL_SAMEMAP 1@pump,36,111,4 script #Culvert_n1 844,14,14,{ //temporary workaround for ALL_SAMEMAP
progressbar "0xFFFF00",10; progressbar "0xFFFF00",10;
stopnpctimer; stopnpctimer;
disablenpc instance_npcname(strnpcinfo(0)); disablenpc();
end; end;
OnInstanceInit: OnInstanceInit:
disablenpc instance_npcname(strnpcinfo(0)); disablenpc();
end; end;
OnEnable: OnEnable:
enablenpc instance_npcname(strnpcinfo(0)); enablenpc();
set .@label$, instance_npcname(strnpcinfo(0))+"::OnMyMobDead"; set .@label$, instance_npcname(strnpcinfo(0))+"::OnMyMobDead";
set .@map$, instance_mapname("1@pump"); set .@map$, instance_mapname("1@pump");
set .@index, atoi(charat(strnpcinfo(2),9)); set .@index, atoi(charat(strnpcinfo(2),9));
@ -758,7 +758,7 @@ OnClear:
OnTimer49500: //OnTimer50000 clashes with the timer in "Missing, the Cleaner#h". OnTimer49500: //OnTimer50000 clashes with the timer in "Missing, the Cleaner#h".
donpcevent instance_npcname("Missing, the Cleaner#n")+"::OnAddSeaweed"; donpcevent instance_npcname("Missing, the Cleaner#n")+"::OnAddSeaweed";
donpcevent instance_npcname(strnpcinfo(0))+"::OnClear"; donpcevent instance_npcname(strnpcinfo(0))+"::OnClear";
disablenpc instance_npcname(strnpcinfo(0)); disablenpc();
end; end;
OnTouch: OnTouch:
specialeffect EF_MAPPILLAR2; specialeffect EF_MAPPILLAR2;
@ -773,10 +773,10 @@ OnTouch:
1@pump,1,1,4 script Boss Creation#n -1,{ 1@pump,1,1,4 script Boss Creation#n -1,{
end; end;
OnInstanceInit: OnInstanceInit:
disablenpc instance_npcname(strnpcinfo(0)); disablenpc();
end; end;
OnEnable: OnEnable:
enablenpc instance_npcname(strnpcinfo(0)); enablenpc();
initnpctimer; initnpctimer;
end; end;
OnTimer100: OnTimer100:
@ -875,7 +875,7 @@ OnMyMobDead:
mes "If Tomas closes this down, we will lose our jobs!"; mes "If Tomas closes this down, we will lose our jobs!";
close; close;
OnInstanceInit: OnInstanceInit:
disablenpc instance_npcname(strnpcinfo(0)); disablenpc();
end; end;
} }
@ -972,13 +972,13 @@ OnTimer425000:
2@pump,53,114,4 script #Culvert_h1 844,14,14,{ //temporary workaround for ALL_SAMEMAP 2@pump,53,114,4 script #Culvert_h1 844,14,14,{ //temporary workaround for ALL_SAMEMAP
progressbar "0xFFFF00",15; progressbar "0xFFFF00",15;
stopnpctimer; stopnpctimer;
disablenpc instance_npcname(strnpcinfo(0)); disablenpc();
end; end;
OnInstanceInit: OnInstanceInit:
disablenpc instance_npcname(strnpcinfo(0)); disablenpc();
end; end;
OnEnable: OnEnable:
enablenpc instance_npcname(strnpcinfo(0)); enablenpc();
set .@label$, instance_npcname(strnpcinfo(0))+"::OnMyMobDead"; set .@label$, instance_npcname(strnpcinfo(0))+"::OnMyMobDead";
set .@map$, instance_mapname("2@pump"); set .@map$, instance_mapname("2@pump");
set .@index, atoi(substr(strnpcinfo(2),9,getstrlen(strnpcinfo(2))-1)); set .@index, atoi(substr(strnpcinfo(2),9,getstrlen(strnpcinfo(2))-1));
@ -1012,7 +1012,7 @@ OnClear:
OnTimer39500: //OnTimer40000 clashes with the timer in "Missing, the Cleaner#h". OnTimer39500: //OnTimer40000 clashes with the timer in "Missing, the Cleaner#h".
donpcevent instance_npcname("Missing, the Cleaner#h")+"::OnAddSeaweed"; donpcevent instance_npcname("Missing, the Cleaner#h")+"::OnAddSeaweed";
donpcevent instance_npcname(strnpcinfo(0))+"::OnClear"; donpcevent instance_npcname(strnpcinfo(0))+"::OnClear";
disablenpc instance_npcname(strnpcinfo(0)); disablenpc();
end; end;
OnTouch: OnTouch:
specialeffect EF_MAPPILLAR2; specialeffect EF_MAPPILLAR2;

View File

@ -273,7 +273,7 @@ OnTouch:
if (getnpctimer(0) > 0) if (getnpctimer(0) > 0)
end; end;
initnpctimer; initnpctimer;
//disablenpc instance_npcname( strnpcinfo(0) ); //disablenpc();
hideonnpc instance_npcname( strnpcinfo(0) ); hideonnpc instance_npcname( strnpcinfo(0) );
specialeffect EF_ICEWALL; specialeffect EF_ICEWALL;
end; end;
@ -380,7 +380,7 @@ OnInstanceInit:
1@rev,34,120,0 script #RZ Memorial Effect 1 HIDDEN_WARP_NPC,4,4,{ 1@rev,34,120,0 script #RZ Memorial Effect 1 HIDDEN_WARP_NPC,4,4,{
end; end;
OnInstanceInit: OnInstanceInit:
//disablenpc instance_npcname( strnpcinfo(0) ); //disablenpc();
hideonnpc instance_npcname( strnpcinfo(0) ); hideonnpc instance_npcname( strnpcinfo(0) );
initnpctimer; initnpctimer;
end; end;

View File

@ -239,7 +239,7 @@ OnInstanceInit:
donpcevent instance_npcname(strnpcinfo(0))+"::OnDisable"; donpcevent instance_npcname(strnpcinfo(0))+"::OnDisable";
end; end;
OnEnable: OnEnable:
enablenpc instance_npcname(strnpcinfo(0)); enablenpc();
set .@label$, instance_npcname(strnpcinfo(0))+"::OnMyMobDead"; set .@label$, instance_npcname(strnpcinfo(0))+"::OnMyMobDead";
set .@i, atoi(charat(strnpcinfo(0),8)); set .@i, atoi(charat(strnpcinfo(0),8));
set .@map$, instance_mapname("1@cash"); set .@map$, instance_mapname("1@cash");
@ -300,7 +300,7 @@ OnEnable:
end; end;
OnDisable: OnDisable:
killmonster instance_mapname("1@cash"),instance_npcname(strnpcinfo(0))+"::OnMyMobDead"; // Not in official script. killmonster instance_mapname("1@cash"),instance_npcname(strnpcinfo(0))+"::OnMyMobDead"; // Not in official script.
disablenpc instance_npcname(strnpcinfo(0)); disablenpc();
end; end;
OnTouch_: OnTouch_:
if (getd("."+strnpcinfo(0)+instance_id())) end; if (getd("."+strnpcinfo(0)+instance_id())) end;
@ -664,7 +664,7 @@ OnMyMobDead:
1@cash,190,208,0 script oct_exit_1 45,2,2,{ 1@cash,190,208,0 script oct_exit_1 45,2,2,{
end; end;
OnInstanceInit: OnInstanceInit:
disablenpc instance_npcname(strnpcinfo(0)); disablenpc();
end; end;
OnTouch: OnTouch:
mes "Do you want to go out from the octopus dungeon?"; mes "Do you want to go out from the octopus dungeon?";

View File

@ -777,7 +777,7 @@ OnTouch_:
getmapxy .@map$,.@x,.@y, BL_NPC; getmapxy .@map$,.@x,.@y, BL_NPC;
specialeffect EF_VENOMDUST; specialeffect EF_VENOMDUST;
monster .@map$,.@x,.@y,"Maggot",2467,.@mobs; monster .@map$,.@x,.@y,"Maggot",2467,.@mobs;
disablenpc instance_npcname( strnpcinfo(0) ); disablenpc();
end; end;
} }
1@gl_k,233,123,4 duplicate(A dead man#1) A dead man#2 4_M_DIEMAN,5,5 1@gl_k,233,123,4 duplicate(A dead man#1) A dead man#2 4_M_DIEMAN,5,5
@ -1076,7 +1076,7 @@ OnTimer69000:
2@gl_k,118,141,0 script #ogh_2-1 HIDDEN_WARP_NPC,20,20,{ 2@gl_k,118,141,0 script #ogh_2-1 HIDDEN_WARP_NPC,20,20,{
end; end;
OnTouch_: OnTouch_:
disablenpc instance_npcname( strnpcinfo(0) ); disablenpc();
.@hidden_name$ = strnpcinfo(2); .@hidden_name$ = strnpcinfo(2);
.@event_type = atoi( charat(.@hidden_name$,4) ); .@event_type = atoi( charat(.@hidden_name$,4) );
if (.@event_type == 2) if (.@event_type == 2)
@ -1092,11 +1092,11 @@ OnTouch_:
initnpctimer; initnpctimer;
end; end;
OnTimer30000: OnTimer30000:
enablenpc instance_npcname( strnpcinfo(0) ); enablenpc();
stopnpctimer; stopnpctimer;
end; end;
OnStop: OnStop:
disablenpc instance_npcname( strnpcinfo(0) ); disablenpc();
stopnpctimer; stopnpctimer;
end; end;
} }
@ -1253,7 +1253,7 @@ OnTouch_:
2@gl_k,143,260,4 script Decomposed body#1 4_M_DIEMAN,5,5,{ 2@gl_k,143,260,4 script Decomposed body#1 4_M_DIEMAN,5,5,{
end; end;
OnTouch_: OnTouch_:
disablenpc instance_npcname( strnpcinfo(0) ); disablenpc();
.@i = rand(1,10); .@i = rand(1,10);
if (.@i == 1) .@mobs = 3; if (.@i == 1) .@mobs = 3;
else if (.@i == 2) .@mobs = 4; else if (.@i == 2) .@mobs = 4;
@ -1266,7 +1266,7 @@ OnTouch_:
initnpctimer; initnpctimer;
end; end;
OnTimer45000: OnTimer45000:
enablenpc instance_npcname( strnpcinfo(0) ); enablenpc();
stopnpctimer; stopnpctimer;
end; end;
} }
@ -1570,7 +1570,7 @@ OnTouch:
end; end;
OnEvent: OnEvent:
initnpctimer; initnpctimer;
enablenpc instance_npcname( strnpcinfo(0) ); enablenpc();
.@num = atoi( replacestr(strnpcinfo(2), "Buff", "") ); .@num = atoi( replacestr(strnpcinfo(2), "Buff", "") );
if (.@num == 1) if (.@num == 1)
npctalk "Varmundt's Ghost: Amdarais may use a strong magic shield! Stay close to me and I'll protect you!"; npctalk "Varmundt's Ghost: Amdarais may use a strong magic shield! Stay close to me and I'll protect you!";
@ -1583,7 +1583,7 @@ OnEvent:
end; end;
OnTimer10000: OnTimer10000:
stopnpctimer; stopnpctimer;
disablenpc instance_npcname( strnpcinfo(0) ); disablenpc();
end; end;
} }
2@gl_k,165,247,3 duplicate(Varmundt's Ghost#Buff1) Varmundt's Ghost#Buff2 4_M_BARMUND,2,2 2@gl_k,165,247,3 duplicate(Varmundt's Ghost#Buff1) Varmundt's Ghost#Buff2 4_M_BARMUND,2,2
@ -1710,7 +1710,7 @@ OnTimer10000:
makeitem 6608,1,"this",129,138; makeitem 6608,1,"this",129,138;
break; break;
} }
disablenpc instance_npcname( strnpcinfo(0) ); disablenpc();
end; end;
} }
1@gl_k,159,136,3 duplicate(Strange crack#2) Strange crack#3 CLEAR_NPC 1@gl_k,159,136,3 duplicate(Strange crack#2) Strange crack#3 CLEAR_NPC

View File

@ -712,7 +712,7 @@ OnInstanceInit:
2@mir,96,83,0 script dummy_npc_rituel_disabled -1,{ 2@mir,96,83,0 script dummy_npc_rituel_disabled -1,{
end; end;
OnInstanceInit: OnInstanceInit:
disablenpc instance_npcname( strnpcinfo(0) ); disablenpc();
end; end;
} }
2@mir,88,74,3 duplicate(dummy_npc_rituel_disabled) Ian Walther#ian02 1_M_JOBTESTER 2@mir,88,74,3 duplicate(dummy_npc_rituel_disabled) Ian Walther#ian02 1_M_JOBTESTER

View File

@ -408,7 +408,7 @@ OnTimer16500:
donpcevent instance_npcname("eq#mir3") + "::OnStart"; donpcevent instance_npcname("eq#mir3") + "::OnStart";
OnStop: OnStop:
stopnpctimer; stopnpctimer;
disablenpc instance_npcname( strnpcinfo(0) ); disablenpc();
disablenpc instance_npcname( "Iris#" + strnpcinfo(2) ); disablenpc instance_npcname( "Iris#" + strnpcinfo(2) );
'touch_mob = 0; 'touch_mob = 0;
'random_letter$ = ""; 'random_letter$ = "";

View File

@ -2038,7 +2038,7 @@ OnMobDead:
OnTouch: OnTouch:
getmapxy .@map$,.@x,.@y, BL_NPC; getmapxy .@map$,.@x,.@y, BL_NPC;
monster .@map$,.@x,.@y, "Mutant Gargoyle",3197,1, instance_npcname( strnpcinfo(0) ) + "::OnMobDead"; // MM_M_GARGOYLE monster .@map$,.@x,.@y, "Mutant Gargoyle",3197,1, instance_npcname( strnpcinfo(0) ) + "::OnMobDead"; // MM_M_GARGOYLE
disablenpc instance_npcname( strnpcinfo(0) ); disablenpc();
end; end;
OnMobDead: OnMobDead:
end; end;

View File

@ -949,7 +949,7 @@ OnTouch:
mes "- Dreary warp -"; mes "- Dreary warp -";
mes "- is brought up -"; mes "- is brought up -";
mes "- shining in black -"; mes "- shining in black -";
disablenpc instance_npcname( strnpcinfo(0) ); disablenpc();
enablenpc instance_npcname("Activated Warp#" + strnpcinfo(2)); enablenpc instance_npcname("Activated Warp#" + strnpcinfo(2));
close; close;
} }
@ -1132,7 +1132,7 @@ OnTouch:
sleep2 3000; sleep2 3000;
if (is_party_leader() == false) if (is_party_leader() == false)
end; end;
disablenpc instance_npcname( strnpcinfo(0) ); disablenpc();
mes "- In that treasure box, -"; mes "- In that treasure box, -";
.@r = rand(100); .@r = rand(100);
if (.@r < 32) { if (.@r < 32) {
@ -1948,11 +1948,11 @@ OnEvent:
specialeffect EF_GUMGANG4; specialeffect EF_GUMGANG4;
progressbar_npc "000000",4; progressbar_npc "000000",4;
specialeffect EF_NPC_EARTHQUAKE; specialeffect EF_NPC_EARTHQUAKE;
cloakoffnpc instance_npcname( strnpcinfo(0) ); cloakoffnpc();
initnpctimer; initnpctimer;
end; end;
OnTimer1000: OnTimer1000:
cloakonnpc instance_npcname( strnpcinfo(0) ); cloakonnpc();
end; end;
OnTimer2000: OnTimer2000:
stopnpctimer; stopnpctimer;

View File

@ -513,7 +513,7 @@ OnTouch:
.@label$ = instance_npcname("#security_device_lab") + "::OnRight2"; .@label$ = instance_npcname("#security_device_lab") + "::OnRight2";
break; break;
} }
disablenpc instance_npcname( strnpcinfo(0) ); disablenpc();
areamonster .@map$, (.@x-2), (.@y-2), (.@x+2), (.@y+2), "Special Guard", 3622, .@mob_count, .@label$; // EP16_2_MM_S_GUARDS areamonster .@map$, (.@x-2), (.@y-2), (.@x+2), (.@y+2), "Special Guard", 3622, .@mob_count, .@label$; // EP16_2_MM_S_GUARDS
end; end;
} }

View File

@ -628,16 +628,16 @@ que_lhz,140,231,1 script Human Guinea pig#01 2224,{
end; end;
OnInit: OnInit:
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnEnable: OnEnable:
enablenpc strnpcinfo(0); enablenpc();
end; end;
OnDisable: OnDisable:
specialeffect EF_FLASHER; specialeffect EF_FLASHER;
disablenpc strnpcinfo(0); disablenpc();
end; end;
} }
que_lhz,147,231,0 duplicate(Human Guinea pig#01) Human Guinea pig#02 2224 que_lhz,147,231,0 duplicate(Human Guinea pig#01) Human Guinea pig#02 2224
@ -1530,7 +1530,7 @@ OnMyMobDead:
progressbar "0xffff00", 20; progressbar "0xffff00", 20;
stopnpctimer; stopnpctimer;
donpcevent instance_npcname("Lab2#2_2")+"::OnDisableValve1"; donpcevent instance_npcname("Lab2#2_2")+"::OnDisableValve1";
disablenpc instance_npcname(strnpcinfo(0)); disablenpc();
end; end;
} else { } else {
mes "Let your party leader handle the valve."; mes "Let your party leader handle the valve.";
@ -1538,11 +1538,11 @@ OnMyMobDead:
} }
OnInstanceInit: OnInstanceInit:
disablenpc instance_npcname(strnpcinfo(0)); disablenpc();
end; end;
OnEnable: OnEnable:
enablenpc instance_npcname(strnpcinfo(0)); enablenpc();
initnpctimer; initnpctimer;
end; end;
@ -1991,7 +1991,7 @@ OnEnable:
OnDisable: OnDisable:
killmonster instance_mapname("1@lhz"),instance_npcname(strnpcinfo(0))+"::OnMyMobDead"; killmonster instance_mapname("1@lhz"),instance_npcname(strnpcinfo(0))+"::OnMyMobDead";
disablenpc instance_npcname(strnpcinfo(0)); disablenpc();
end; end;
OnMyMobDead: OnMyMobDead:

View File

@ -3042,10 +3042,10 @@ OnTimer5000:
end; end;
OnInit: OnInit:
OnDisable: OnDisable:
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnEnable: OnEnable:
enablenpc strnpcinfo(0); enablenpc();
end; end;
} }
@ -3399,10 +3399,10 @@ job3_guil03,2,4,0 duplicate(#3rdgc_sunchal_kill01) #3rdgc_sunchal_kill03 844
job3_guil03,64,68,3 script #3rdgc_gojung_kill01 456,7,7,{ job3_guil03,64,68,3 script #3rdgc_gojung_kill01 456,7,7,{
end; end;
OnEnable: OnEnable:
enablenpc strnpcinfo(0); enablenpc();
end; end;
OnDisable: OnDisable:
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnStop: OnStop:
mapannounce "job3_guil03","Guard : Am I imagining things? I just heard something.",bc_map,"0xA8A8A8"; //FW_NORMAL 12 0 0 mapannounce "job3_guil03","Guard : Am I imagining things? I just heard something.",bc_map,"0xA8A8A8"; //FW_NORMAL 12 0 0
@ -3416,7 +3416,7 @@ OnTouch_:
setarray .@x[1],64,86,83; setarray .@x[1],64,86,83;
setarray .@y[1],68,63,36; setarray .@y[1],68,63,36;
mapannounce "job3_guil03","Guard : Who are you?!",bc_map,"0x7b68ee"; //FW_NORMAL 12 0 0 mapannounce "job3_guil03","Guard : Who are you?!",bc_map,"0x7b68ee"; //FW_NORMAL 12 0 0
disablenpc strnpcinfo(0); disablenpc();
monster "job3_guil03",.@x[.@i],.@y[.@i],"Guard",1985,1,strnpcinfo(0)+"::OnMyMobDead"; monster "job3_guil03",.@x[.@i],.@y[.@i],"Guard",1985,1,strnpcinfo(0)+"::OnMyMobDead";
initnpctimer; initnpctimer;
end; end;

View File

@ -1577,10 +1577,10 @@ OnTimer133000:
- script Egg Bomb#0 -1,{ - script Egg Bomb#0 -1,{
OnInit: OnInit:
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnEnable: OnEnable:
enablenpc strnpcinfo(0); enablenpc();
initnpctimer; initnpctimer;
getmapxy(.@map$,.@x,.@y,BL_NPC); getmapxy(.@map$,.@x,.@y,BL_NPC);
monster "job3_rang02",.@x,.@y,"Egg Bomb",1047,1,strnpcinfo(0)+"::OnMyMobDead"; monster "job3_rang02",.@x,.@y,"Egg Bomb",1047,1,strnpcinfo(0)+"::OnMyMobDead";
@ -1594,7 +1594,7 @@ OnEnable:
OnDisable: OnDisable:
stopnpctimer; stopnpctimer;
killmonster "job3_rang02",strnpcinfo(0)+"::OnMyMobDead"; killmonster "job3_rang02",strnpcinfo(0)+"::OnMyMobDead";
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnMyMobDead: OnMyMobDead:
set $@job_rang_point03, $@job_rang_point03+1; set $@job_rang_point03, $@job_rang_point03+1;

View File

@ -801,10 +801,10 @@ OnDisable:
- script The chamber of magic#2 -1,{ - script The chamber of magic#2 -1,{
OnInit: OnInit:
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnEnable: OnEnable:
enablenpc strnpcinfo(0); enablenpc();
monster "job3_war02",23,32,"Magic Monster",2047,1,strnpcinfo(0)+"::OnMyMobDead"; monster "job3_war02",23,32,"Magic Monster",2047,1,strnpcinfo(0)+"::OnMyMobDead";
monster "job3_war02",23,21,"Magic Monster",2048,1,strnpcinfo(0)+"::OnMyMobDead"; monster "job3_war02",23,21,"Magic Monster",2048,1,strnpcinfo(0)+"::OnMyMobDead";
monster "job3_war02",34,32,"Magic Monster",2049,1,strnpcinfo(0)+"::OnMyMobDead"; monster "job3_war02",34,32,"Magic Monster",2049,1,strnpcinfo(0)+"::OnMyMobDead";
@ -819,7 +819,7 @@ OnReset:
killmonster "job3_war02",strnpcinfo(0)+"::OnMyMobDead"; killmonster "job3_war02",strnpcinfo(0)+"::OnMyMobDead";
end; end;
OnDisable: OnDisable:
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnMyMobDead: OnMyMobDead:
if (mobcount("job3_war02",strnpcinfo(0)+"::OnMyMobDead") < 1) { if (mobcount("job3_war02",strnpcinfo(0)+"::OnMyMobDead") < 1) {

View File

@ -963,7 +963,7 @@ job3_gen01,91,48,3 script Demi Calberine#gen 982,{
mes "- You found a little metal fragment. -"; mes "- You found a little metal fragment. -";
set job_gen, job_gen+1; set job_gen, job_gen+1;
specialeffect EF_BASH; specialeffect EF_BASH;
disablenpc strnpcinfo(0); disablenpc();
initnpctimer; initnpctimer;
close; close;
} else if (job_gen == 74) { } else if (job_gen == 74) {
@ -972,7 +972,7 @@ job3_gen01,91,48,3 script Demi Calberine#gen 982,{
} }
end; end;
OnTimer7000: OnTimer7000:
enablenpc strnpcinfo(0); enablenpc();
stopnpctimer; stopnpctimer;
end; end;
} }

View File

@ -815,14 +815,14 @@ OnTimer300000:
yuno,146,168,0 script Karian#cmd2 486,{ yuno,146,168,0 script Karian#cmd2 486,{
end; end;
OnInit: OnInit:
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnEnable: OnEnable:
enablenpc strnpcinfo(0); enablenpc();
initnpctimer; initnpctimer;
end; end;
OnDisable: OnDisable:
disablenpc strnpcinfo(0); disablenpc();
stopnpctimer; stopnpctimer;
end; end;
OnTimer100000: OnTimer100000:

View File

@ -455,7 +455,7 @@ gl_church,173,88,0 script Delicate trace#01 844,{
getitem 7049,1; //Stone getitem 7049,1; //Stone
else { else {
mes "While investigating, the topography breaks. It would be better to dig other places for a while."; mes "While investigating, the topography breaks. It would be better to dig other places for a while.";
disablenpc strnpcinfo(0); disablenpc();
initnpctimer; initnpctimer;
close; close;
} }
@ -463,7 +463,7 @@ gl_church,173,88,0 script Delicate trace#01 844,{
mes "There is a trace that someone has already dug here."; mes "There is a trace that someone has already dug here.";
close; close;
OnTimer60000: OnTimer60000:
enablenpc strnpcinfo(0); enablenpc();
stopnpctimer; stopnpctimer;
OnTimer1000: OnTimer1000:
OnTimer20000: OnTimer20000:

View File

@ -1032,7 +1032,7 @@ OnInit:
- script #wander_xmas -1,{ - script #wander_xmas -1,{
end; end;
OnInit: OnInit:
disablenpc strnpcinfo(0); disablenpc();
end; end;
} }
xmas,149,135,3 duplicate(#wander_xmas) Guitar Song#xmas 479 xmas,149,135,3 duplicate(#wander_xmas) Guitar Song#xmas 479

View File

@ -120,7 +120,7 @@ iz_int,56,32,3 script Wounded Swordsman#intro_npc02_iz_int 4_TOWER_02,{
OnInit: OnInit:
questinfo( QTYPE_QUEST, QMARK_YELLOW, "!isbegin_quest(21001) && Class == Job_Novice" ); questinfo( QTYPE_QUEST, QMARK_YELLOW, "!isbegin_quest(21001) && Class == Job_Novice" );
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
} }
iz_int01,56,32,3 duplicate(Wounded Swordsman#intro_npc02_iz_int) Wounded Swordsman#intro_npc02_iz_int01 4_TOWER_02 iz_int01,56,32,3 duplicate(Wounded Swordsman#intro_npc02_iz_int) Wounded Swordsman#intro_npc02_iz_int01 4_TOWER_02

View File

@ -1714,7 +1714,7 @@ lhz_dun_n,75,121,0 script #Alphoccio_Basil_A1 HIDDEN_WARP_NPC,3,3,{
end; end;
OnTouch: OnTouch:
specialeffect EF_BAT2; specialeffect EF_BAT2;
disablenpc strnpcinfo(0); disablenpc();
initnpctimer; initnpctimer;
end; end;
OnTimer1000: OnTimer1000:
@ -1974,7 +1974,7 @@ OnTimer1000:
end; end;
OnTimer40000: OnTimer40000:
stopnpctimer; stopnpctimer;
enablenpc strnpcinfo(0); enablenpc();
end; end;
} }

View File

@ -280,7 +280,7 @@ yuno_fild11,141,357,4 duplicate(ach_treasure#touch) #wp120061 HIDDEN_WARP_NPC,5,
cloakonnpc strnpcinfo(0), getcharid(0); cloakonnpc strnpcinfo(0), getcharid(0);
end; end;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
} }

View File

@ -13,6 +13,6 @@
- script dummy_cloaked_npc -1,{ - script dummy_cloaked_npc -1,{
end; end;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
} }

View File

@ -3315,7 +3315,7 @@ verus03,127,36,4 script ???#EP15_1D_01 4_CRACK,{
} }
close2; close2;
initnpctimer; initnpctimer;
disablenpc strnpcinfo(0); disablenpc();
} }
end; end;
@ -3326,7 +3326,7 @@ OnTimer120000:
if (rand(1,2) != 1) if (rand(1,2) != 1)
end; end;
OnTimer150000: OnTimer150000:
enablenpc strnpcinfo(0); enablenpc();
stopnpctimer; stopnpctimer;
end; end;
} }
@ -3559,7 +3559,7 @@ verus04,187,219,4 script Thicket#EP15_1D_01 4_CREEPER,{
mes "Gathered the herb."; mes "Gathered the herb.";
} }
close2; close2;
disablenpc strnpcinfo(0); disablenpc();
initnpctimer; initnpctimer;
} }
end; end;
@ -3571,7 +3571,7 @@ OnTimer240000:
if (rand(1,2) != 1) if (rand(1,2) != 1)
end; end;
OnTimer300000: OnTimer300000:
enablenpc strnpcinfo(0); enablenpc();
stopnpctimer; stopnpctimer;
end; end;
} }
@ -3914,13 +3914,13 @@ verus03,127,145,0 script Machine Remnant#atnd01 4_ENERGY_RED,3,3,{
getitem 6756,1;// Condensed_Energy getitem 6756,1;// Condensed_Energy
mes "Collected Condensed Energy!"; mes "Collected Condensed Energy!";
initnpctimer; initnpctimer;
disablenpc strnpcinfo(0); disablenpc();
} }
close; close;
OnTimer30000: OnTimer30000:
stopnpctimer; stopnpctimer;
enablenpc strnpcinfo(0); enablenpc();
end; end;
OnTouch_: OnTouch_:

View File

@ -2287,7 +2287,7 @@ un_bunker,382,335,3 script Box#e152p00 4_ENERGY_BLUE,{
close; close;
} }
progressbar "ffff00",3; progressbar "ffff00",3;
disablenpc strnpcinfo(0); disablenpc();
initnpctimer; initnpctimer;
if (.@npc_name$ == "Box") { if (.@npc_name$ == "Box") {
mes "Found a Memory Record in the box."; mes "Found a Memory Record in the box.";
@ -2346,14 +2346,14 @@ un_bunker,382,335,3 script Box#e152p00 4_ENERGY_BLUE,{
close; close;
} }
progressbar "ffff00",3; progressbar "ffff00",3;
disablenpc strnpcinfo(0); disablenpc();
initnpctimer; initnpctimer;
mes "Found a Memory Record."; mes "Found a Memory Record.";
getitem 6824,1; // Lab_Memory_Record getitem 6824,1; // Lab_Memory_Record
close; close;
OnTimer30000: OnTimer30000:
enablenpc strnpcinfo(0); enablenpc();
stopnpctimer; stopnpctimer;
end; end;
} }
@ -2407,7 +2407,7 @@ verus02,60,30,1 script Strewn paper#e152a01 4_ENERGY_BLUE,{
OnTimer60000: OnTimer60000:
stopnpctimer; stopnpctimer;
enablenpc strnpcinfo(0); enablenpc();
end; end;
S_Type: S_Type:
@ -2424,7 +2424,7 @@ S_Type:
close; close;
} }
progressbar "ffff00",3; progressbar "ffff00",3;
disablenpc strnpcinfo(0); disablenpc();
initnpctimer; initnpctimer;
getitem 6757,1;// Memory_Record getitem 6757,1;// Memory_Record

View File

@ -2081,7 +2081,7 @@ prt_lib,80,79,3 script Kronecker G. Heine#ep16_01_lib01 4_EP16_GRANZ,{
} }
end; end;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
cloakonnpc "Kronecker G. Heine#ep16_01_lib02"; cloakonnpc "Kronecker G. Heine#ep16_01_lib02";
cloakonnpc "Nyhill M. Heine#ep16_lib01"; cloakonnpc "Nyhill M. Heine#ep16_lib01";
end; end;
@ -2723,7 +2723,7 @@ prt_lib_q,88,90,1 script Swaying Space#evt_gate02 4_ENERGY_RED,{
} }
end; end;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
} }
@ -4356,7 +4356,7 @@ prt_cas_q,18,136,3 script Spica Nerius#ep16_room02 4_EP16_SPICA,{
} }
end; end;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
cloakonnpc "Nyhill M. Heine#ep16_nroom01"; cloakonnpc "Nyhill M. Heine#ep16_nroom01";
end; end;
} }
@ -4364,7 +4364,7 @@ OnInit:
prt_cas_q,23,187,3 script Mysterious Person#ep16wal 4_M_04,{ prt_cas_q,23,187,3 script Mysterious Person#ep16wal 4_M_04,{
end; end;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
} }
@ -7859,7 +7859,7 @@ prt_cas_q,92,182,7 script Myer Roegenburg#ep16lug 4_EP16_MEYER,{
end; end;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
} }
@ -8653,7 +8653,7 @@ prontera,269,73,5 script Ordinary Man#ep16lug02 4_M_04,{
close; close;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
} }
@ -11893,7 +11893,7 @@ prt_cas_q,94,7,7 script Isaac Wigner#ep16wig 4_EP16_ISAAC,{
prt_cas_q,80,23,5 script Jurgen Wigner#ep16wig00 4_M_4THPRIN1,{ prt_cas_q,80,23,5 script Jurgen Wigner#ep16wig00 4_M_4THPRIN1,{
end; end;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
} }
prt_cas_q,93,10,4 duplicate(Jurgen Wigner#ep16wig00) Maid#ep16wig01 1_F_04 prt_cas_q,93,10,4 duplicate(Jurgen Wigner#ep16wig00) Maid#ep16wig01 1_F_04
@ -14846,7 +14846,7 @@ prt_q,221,193,4 script Village Lad#EP161HO01 4_M_03,{
end; end;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
} }
@ -14953,7 +14953,7 @@ prt_q,77,98,8 script Village Lad#EP161HO03 4_M_03,{
end; end;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
} }
@ -15127,7 +15127,7 @@ prt_q,276,242,4 script Girl#EP161GU01 4_F_RUSCHILD,{
end; end;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
} }
@ -15333,7 +15333,7 @@ prt_q,229,317,6 script Girl#EP161GU03 4_F_RUSCHILD,{
end; end;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
} }
@ -15430,7 +15430,7 @@ prt_q,55,347,6 script Rosa Erinin#EP161GU07 4W_F_01,{
end; end;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
} }
prt_q,57,346,4 duplicate(Rosa Erinin#EP161GU07) Girl#EP161GU06 4_F_RUSCHILD prt_q,57,346,4 duplicate(Rosa Erinin#EP161GU07) Girl#EP161GU06 4_F_RUSCHILD
@ -15533,7 +15533,7 @@ prt_q,68,336,4 script Soldier#EP161HU02 4_M_GEF_SOLDIER,{
end; end;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
} }
@ -15597,7 +15597,7 @@ prt_q,79,102,8 script Soldier#EP161HU03 4_M_GEF_SOLDIER,{
end; end;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
} }
@ -15667,7 +15667,7 @@ prt_q,38,261,6 script Eryus#EP161BU01 4_F_03,{
end; end;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
} }
@ -15774,7 +15774,7 @@ prt_q,231,310,4 script Eryus#EP161BU02 4_F_03,{
end; end;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
} }
@ -15814,7 +15814,7 @@ prt_q,108,164,4 script Female#EP161BU03 4W_F_01,{
close; close;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
} }
@ -15875,7 +15875,7 @@ prt_q,229,310,6 script Female#EP161BU04 4W_F_01,{
end; end;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
} }
@ -15911,7 +15911,7 @@ OnTouch_:
monster "prt_q",.@x,.@y,"Resurrected Corpse",1015,1, strnpcinfo(0) + "::OnMyMobDead";// ZOMBIE monster "prt_q",.@x,.@y,"Resurrected Corpse",1015,1, strnpcinfo(0) + "::OnMyMobDead";// ZOMBIE
monster "prt_q",.@x,.@y,"Maggot",1194,1, strnpcinfo(0) + "::OnMyMobDead";// ARCLOUSE monster "prt_q",.@x,.@y,"Maggot",1194,1, strnpcinfo(0) + "::OnMyMobDead";// ARCLOUSE
monster "prt_q",.@x,.@y,"Fly",1035,1, strnpcinfo(0) + "::OnMyMobDead";// HUNTER_FLY monster "prt_q",.@x,.@y,"Fly",1035,1, strnpcinfo(0) + "::OnMyMobDead";// HUNTER_FLY
disablenpc strnpcinfo(0); disablenpc();
initnpctimer; initnpctimer;
end; end;
OnMyMobDead: OnMyMobDead:
@ -15919,7 +15919,7 @@ OnMyMobDead:
OnTimer180000: OnTimer180000:
killmonster "prt_q", strnpcinfo(0) + "::OnMyMobDead"; killmonster "prt_q", strnpcinfo(0) + "::OnMyMobDead";
stopnpctimer; stopnpctimer;
enablenpc strnpcinfo(0); enablenpc();
end; end;
} }
prt_q,214,85,6 duplicate(Dead Villager#EP161DIE01) Dead Villager#EP161DIE02 4_M_LIEMAN,2,2 prt_q,214,85,6 duplicate(Dead Villager#EP161DIE01) Dead Villager#EP161DIE02 4_M_LIEMAN,2,2
@ -15959,7 +15959,7 @@ OnTouch_:
monster "prt_q",.@x,.@y,"Resurrected Corpse",1015,1, strnpcinfo(0) + "::OnMyMobDead";// ZOMBIE monster "prt_q",.@x,.@y,"Resurrected Corpse",1015,1, strnpcinfo(0) + "::OnMyMobDead";// ZOMBIE
monster "prt_q",.@x,.@y,"Maggot",1194,1, strnpcinfo(0) + "::OnMyMobDead";// ARCLOUSE monster "prt_q",.@x,.@y,"Maggot",1194,1, strnpcinfo(0) + "::OnMyMobDead";// ARCLOUSE
monster "prt_q",.@x,.@y,"Fly",1035,1, strnpcinfo(0) + "::OnMyMobDead";// HUNTER_FLY monster "prt_q",.@x,.@y,"Fly",1035,1, strnpcinfo(0) + "::OnMyMobDead";// HUNTER_FLY
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
OnMyMobDead: OnMyMobDead:
if (mobcount( "prt_q", strnpcinfo(0) + "::OnMyMobDead" ) < 1) if (mobcount( "prt_q", strnpcinfo(0) + "::OnMyMobDead" ) < 1)
@ -15967,7 +15967,7 @@ OnMyMobDead:
end; end;
OnTimer300000: OnTimer300000:
stopnpctimer; stopnpctimer;
cloakoffnpc strnpcinfo(0); cloakoffnpc();
end; end;
} }
prt_q,88,279,2 duplicate(Dead Villager#EP161DIE01) Dead Villager#EP161DIE07 4_M_LIEMAN,2,2 prt_q,88,279,2 duplicate(Dead Villager#EP161DIE01) Dead Villager#EP161DIE07 4_M_LIEMAN,2,2
@ -17201,7 +17201,7 @@ prt_prison,205,139,4 script Dark Shape#EP161A01 4_GHOST_STAND,{
.@num = atoi( replacestr( strnpcinfo(2), "EP161A0", "" ) ); .@num = atoi( replacestr( strnpcinfo(2), "EP161A0", "" ) );
setarray .@npc_num[1],1,2,3,4,5; setarray .@npc_num[1],1,2,3,4,5;
deletearray .@npc_num[.@num],1; deletearray .@npc_num[.@num],1;
disablenpc strnpcinfo(0); disablenpc();
enablenpc "Dark Shape#EP161A0" + .@npc_num[ rand(1,4) ];// enable another npc randomly enablenpc "Dark Shape#EP161A0" + .@npc_num[ rand(1,4) ];// enable another npc randomly
close; close;
@ -17210,7 +17210,7 @@ OnInit:
if (.num_enabled == 0) if (.num_enabled == 0)
.num_enabled = rand(1,5); .num_enabled = rand(1,5);
if (.num_enabled != .@npc_num) if (.num_enabled != .@npc_num)
disablenpc strnpcinfo(0);// disable 4/5 npcs disablenpc();// disable 4/5 npcs
end; end;
} }
prt_prison,153,175,4 duplicate(Dark Shape#EP161A01) Dark Shape#EP161A02 4_GHOST_STAND prt_prison,153,175,4 duplicate(Dark Shape#EP161A01) Dark Shape#EP161A02 4_GHOST_STAND
@ -17585,7 +17585,7 @@ prt_prison,118,247,4 script Rubbish heap#EP161C01 4_ENERGY_BLACK,{
setquest 5435;// [Repeat]Cleaning is complete. setquest 5435;// [Repeat]Cleaning is complete.
} }
initnpctimer; initnpctimer;
disablenpc strnpcinfo(0); disablenpc();
} }
close; close;
} }
@ -17601,12 +17601,12 @@ OnTimer240000:
OnTimer270000: OnTimer270000:
if (rand(1,2) == 1) { if (rand(1,2) == 1) {
stopnpctimer; stopnpctimer;
enablenpc strnpcinfo(0); enablenpc();
} }
end; end;
OnTimer300000: OnTimer300000:
stopnpctimer; stopnpctimer;
enablenpc strnpcinfo(0); enablenpc();
end; end;
} }
prt_prison,171,247,4 duplicate(Rubbish heap#EP161C01) Rubbish heap#EP161C02 4_ENERGY_BLACK prt_prison,171,247,4 duplicate(Rubbish heap#EP161C01) Rubbish heap#EP161C02 4_ENERGY_BLACK
@ -17912,7 +17912,7 @@ prt_prison,146,268,4 script Torch#EP161EB01 CLEAR_NPC,{
mes "You carefully collected the light but it scattered."; mes "You carefully collected the light but it scattered.";
} }
initnpctimer; initnpctimer;
disablenpc strnpcinfo(0); disablenpc();
} }
close; close;
@ -17923,12 +17923,12 @@ OnTimer120000:
OnTimer150000: OnTimer150000:
if (rand(1,2) == 1) { if (rand(1,2) == 1) {
stopnpctimer; stopnpctimer;
enablenpc strnpcinfo(0); enablenpc();
} }
end; end;
OnTimer180000: OnTimer180000:
stopnpctimer; stopnpctimer;
enablenpc strnpcinfo(0); enablenpc();
end; end;
} }
prt_prison,177,268,4 duplicate(Torch#EP161EB01) Torch#EP161EB02 CLEAR_NPC prt_prison,177,268,4 duplicate(Torch#EP161EB01) Torch#EP161EB02 CLEAR_NPC

View File

@ -2093,7 +2093,7 @@ einbech,218,82,5 script Gonie#16nego02 4_M_FALLENGONY,{
mes "......"; mes "......";
close3; close3;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
} }
@ -2187,7 +2187,7 @@ einbech,217,82,3 script Lazy#16nego03 4_M_LAZY,{
} }
end; end;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
} }
@ -2235,7 +2235,7 @@ rebel_in,23,43,5 script Gonie#16nego03 4_M_FALLENGONY,{
cloakonnpc "Gonie#16nego03", getcharid(0); cloakonnpc "Gonie#16nego03", getcharid(0);
end; end;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
} }
@ -2250,7 +2250,7 @@ rebel_in,23,42,3 script Lucky#16nego01 4_M_ROOKIE,{
} }
end; end;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
} }
@ -3250,7 +3250,7 @@ ein_in01,269,285,5 script Nihil#ep162_02 4_EP16_NIHIL,{
callfunc( "F_Terra_Gloria_Inn" ); callfunc( "F_Terra_Gloria_Inn" );
end; end;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
} }
@ -3276,7 +3276,7 @@ ein_in01,274,278,3 script Lazy#ep162_01 4_M_LAZY,{
} }
end; end;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
} }
@ -3298,7 +3298,7 @@ ein_in01,272,282,3 script Rookie#ep162_01 4_M_ROOKIE,{
} }
end; end;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
} }
@ -3316,7 +3316,7 @@ ein_in01,271,284,3 script Skia#ep162_05 4_EP16_SKIA,{
} }
end; end;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
} }
@ -3335,7 +3335,7 @@ ein_in01,269,282,1 script Philopontess#ep162_03 4_M_PHILOFONTES,{
callfunc( "F_Terra_Gloria_Inn" ); callfunc( "F_Terra_Gloria_Inn" );
end; end;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
} }
@ -5509,7 +5509,7 @@ rebel_in,119,68,7 script Rebellion Guard leader#4 4_M_REBELLION,{
} }
end; end;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
} }
@ -5620,7 +5620,7 @@ rebel_in,121,69,8 script Dien#162gmbs2 4_F_DIENE,{
} }
end; end;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
} }
@ -8530,7 +8530,7 @@ rebel_in,78,66,6 script Arivero Yurhik#TFQ02 4_M_GUNSLINGER,{
} }
end; end;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
} }
@ -8604,7 +8604,7 @@ rebel_in,78,63,6 script Rebellion leader#TFQ15 4_M_RUPERT,{
} }
end; end;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
} }
@ -8732,7 +8732,7 @@ einbech,212,212,6 script Arivero Yurhik#TFQ04 4_M_GUNSLINGER,{
} }
end; end;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
} }
@ -8842,7 +8842,7 @@ lighthalzen,135,233,6 script Arivero Yurhik#TFQ07 4_M_GUNSLINGER,{
} }
end; end;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
} }
@ -8923,7 +8923,7 @@ yuno,204,226,6 script Arivero Yurhik#TFQ10 4_M_GUNSLINGER,{
} }
end; end;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
} }
@ -9028,7 +9028,7 @@ einbroch,262,42,4 script Arivero Yurhik#TFQ13 4_M_GUNSLINGER,{
} }
end; end;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
} }
@ -10586,7 +10586,7 @@ einbech,34,209,3 script Empty bench#16.2rm2 HIDDEN_NPC,{
mes "After waiting for a while, you reclaimed the Anchovy cookies."; mes "After waiting for a while, you reclaimed the Anchovy cookies.";
mes "Go to another bench or wait for a while."; mes "Go to another bench or wait for a while.";
initnpctimer; initnpctimer;
disablenpc strnpcinfo(0); disablenpc();
close; close;
} }
if (strnpcinfo(0) == "Empty bench#16.2rm2") if (strnpcinfo(0) == "Empty bench#16.2rm2")
@ -10613,7 +10613,7 @@ einbech,34,209,3 script Empty bench#16.2rm2 HIDDEN_NPC,{
OnTimer30000: OnTimer30000:
stopnpctimer; stopnpctimer;
enablenpc strnpcinfo(0); enablenpc();
end; end;
} }
einbech,144,98,3 duplicate(Empty bench#16.2rm2) Empty bench#16.2rm3 HIDDEN_NPC einbech,144,98,3 duplicate(Empty bench#16.2rm2) Empty bench#16.2rm3 HIDDEN_NPC
@ -11854,11 +11854,11 @@ ein_fild09,70,175,5 script Suspicious Heap of Earth#1 4_SOIL,{
else if (.@r == 7) unittalk $@mobid[0], "So you are abandoning me again? Then let me kill you first!"; else if (.@r == 7) unittalk $@mobid[0], "So you are abandoning me again? Then let me kill you first!";
else if (.@r == 8) unittalk $@mobid[0], "It's been cold and I was lonely waiting for you... Let us die together."; else if (.@r == 8) unittalk $@mobid[0], "It's been cold and I was lonely waiting for you... Let us die together.";
initnpctimer; initnpctimer;
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnTimer300000: OnTimer300000:
stopnpctimer; stopnpctimer;
enablenpc strnpcinfo(0); enablenpc();
end; end;
} }
ein_fild09,136,157,5 duplicate(Suspicious Heap of Earth#1) Suspicious Heap of Earth#2 4_SOIL ein_fild09,136,157,5 duplicate(Suspicious Heap of Earth#1) Suspicious Heap of Earth#2 4_SOIL
@ -13384,7 +13384,7 @@ slabw01,235,137,3 script Suspicious cabinet#hide01 4_ENERGY_WHITE,{
} }
unittalk getcharid(3), "" + strcharinfo(0) + " : .. This looks suspicious!", bc_self; unittalk getcharid(3), "" + strcharinfo(0) + " : .. This looks suspicious!", bc_self;
progressbar "000000",3; progressbar "000000",3;
disablenpc strnpcinfo(0); disablenpc();
enablenpc "Hiding researcher#" + strnpcinfo(2); enablenpc "Hiding researcher#" + strnpcinfo(2);
npctalk "Arrrgh!", "Hiding researcher#" + strnpcinfo(2); npctalk "Arrrgh!", "Hiding researcher#" + strnpcinfo(2);
cutin "16loo_02.bmp",0; cutin "16loo_02.bmp",0;
@ -13411,7 +13411,7 @@ slabw01,235,137,3 script Suspicious cabinet#hide01 4_ENERGY_WHITE,{
cutin "",255; cutin "",255;
end; end;
OnTimer30000: OnTimer30000:
enablenpc strnpcinfo(0); enablenpc();
disablenpc "Hiding researcher#" + strnpcinfo(2); disablenpc "Hiding researcher#" + strnpcinfo(2);
stopnpctimer; stopnpctimer;
end; end;
@ -13420,7 +13420,7 @@ OnTimer30000:
slabw01,235,137,3 script Hiding researcher#hide01 4_M_ALCHE_A,{ slabw01,235,137,3 script Hiding researcher#hide01 4_M_ALCHE_A,{
end; end;
OnInit: OnInit:
disablenpc strnpcinfo(0); disablenpc();
end; end;
} }

View File

@ -1605,11 +1605,11 @@ dew_fild01,259,48,4 script Poby#dew_drink 538,{
donpcevent strnpcinfo(0)+"::OnDisable"; donpcevent strnpcinfo(0)+"::OnDisable";
end; end;
OnEnable: OnEnable:
enablenpc strnpcinfo(0); enablenpc();
stopnpctimer; stopnpctimer;
end; end;
OnDisable: OnDisable:
disablenpc strnpcinfo(0); disablenpc();
initnpctimer; initnpctimer;
end; end;
OnTimer60000: OnTimer60000:

View File

@ -6660,7 +6660,7 @@ mid_campin,165,127,5 script Hibba Agip#ep133_is07 459,{
mes "I should go now."; mes "I should go now.";
close2; close2;
OnInit: OnInit:
disablenpc strnpcinfo(0); disablenpc();
end; end;
} }

View File

@ -11372,7 +11372,7 @@ ecl_tdun02,99,63,5 script Rosi#No.1 4_F_HUWOMAN,1,1,{
end; end;
OnInit: OnInit:
if (strnpcinfo(2) != "No.1") if (strnpcinfo(2) != "No.1")
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnTouch: OnTouch:
mes "[Rosi]"; mes "[Rosi]";
@ -11429,7 +11429,7 @@ ecl_tdun01,11,62,5 script Euncheong#No.1 4_M_HUBOY,1,1,{
end; end;
OnInit: OnInit:
if (strnpcinfo(2) != "No.1") if (strnpcinfo(2) != "No.1")
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnTouch: OnTouch:
mes "[Euncheong]"; mes "[Euncheong]";

View File

@ -1383,11 +1383,11 @@ mal_in02,140,94,0 script Bob#mal 553,{
mes "- not enough supporters yet. -"; mes "- not enough supporters yet. -";
close; close;
OnEnable: OnEnable:
enablenpc strnpcinfo(0); enablenpc();
end; end;
OnDisable: OnDisable:
set .off,0; set .off,0;
disablenpc strnpcinfo(0); disablenpc();
end; end;
} }
malangdo,114,157,0 duplicate(Crack#mal0) Crack#mal1 550 malangdo,114,157,0 duplicate(Crack#mal0) Crack#mal1 550
@ -1404,15 +1404,15 @@ malangdo,162,183,0 duplicate(Crack#mal0) Crack#mal10 550
- script Crackt0#mal -1,{ - script Crackt0#mal -1,{
end; end;
OnInit: OnInit:
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnEnable: OnEnable:
enablenpc strnpcinfo(0); enablenpc();
initnpctimer; initnpctimer;
end; end;
OnDisable: OnDisable:
stopnpctimer; stopnpctimer;
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnTimer1000: OnTimer1000:
donpcevent "Crack#mal"+substr(strnpcinfo(1),6,getstrlen(strnpcinfo(1))-1)+"::OnDisable"; donpcevent "Crack#mal"+substr(strnpcinfo(1),6,getstrlen(strnpcinfo(1))-1)+"::OnDisable";
@ -1921,11 +1921,11 @@ mal_in01,116,168,0 script Dry Machine#mal 563,{
mes "- But it's just sand... -"; mes "- But it's just sand... -";
close; close;
OnEnable: OnEnable:
enablenpc strnpcinfo(0); enablenpc();
end; end;
OnDisable: OnDisable:
set .off,0; set .off,0;
disablenpc strnpcinfo(0); disablenpc();
end; end;
} }
malangdo,221,139,0 duplicate(Suspicious Sand Pile#0) Suspicious Sand Pile#1 557 malangdo,221,139,0 duplicate(Suspicious Sand Pile#0) Suspicious Sand Pile#1 557
@ -1941,15 +1941,15 @@ malangdo,242,175,0 duplicate(Suspicious Sand Pile#0) Suspicious Sand Pile#10 557
- script Water Sand0#mal -1,{ - script Water Sand0#mal -1,{
OnInit: OnInit:
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnEnable: OnEnable:
enablenpc strnpcinfo(0); enablenpc();
initnpctimer; initnpctimer;
end; end;
OnDisable: OnDisable:
stopnpctimer; stopnpctimer;
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnTimer1000: OnTimer1000:
donpcevent "Suspicious Sand Pile#"+substr(strnpcinfo(1),10,getstrlen(strnpcinfo(1))-1)+"::OnDisable"; donpcevent "Suspicious Sand Pile#"+substr(strnpcinfo(1),10,getstrlen(strnpcinfo(1))-1)+"::OnDisable";

View File

@ -1477,7 +1477,7 @@ malaya,62,274,0 script Sand Trap#malaya 557,{
mes "someone scattered on the sea water."; mes "someone scattered on the sea water.";
close2; close2;
progressbar "0xffff00", 5; progressbar "0xffff00", 5;
disablenpc strnpcinfo(0); disablenpc();
initnpctimer; initnpctimer;
getitem 6501, 1; // Salt_Bag getitem 6501, 1; // Salt_Bag
mes "[" + strcharinfo(0) + "]"; mes "[" + strcharinfo(0) + "]";
@ -1485,7 +1485,7 @@ malaya,62,274,0 script Sand Trap#malaya 557,{
close; close;
OnTimer30000: OnTimer30000:
enablenpc strnpcinfo(0); enablenpc();
stopnpctimer; stopnpctimer;
end; end;
} }
@ -1509,7 +1509,7 @@ ma_fild01,178,206,0 script Black Bamboo#malaya 844,4,4,{
mes "If some of it is cut off and sharpened, I think it will suffice for the Sharpened Bamboo Imelda wanted."; mes "If some of it is cut off and sharpened, I think it will suffice for the Sharpened Bamboo Imelda wanted.";
close2; close2;
progressbar "0xffff00", 3; progressbar "0xffff00", 3;
disablenpc strnpcinfo(0); disablenpc();
initnpctimer; initnpctimer;
getitem 6500, 1; //Sharp_Bamboo getitem 6500, 1; //Sharp_Bamboo
mes "[" + strcharinfo(0) + "]"; mes "[" + strcharinfo(0) + "]";
@ -1521,7 +1521,7 @@ OnTouch_:
} }
end; end;
OnTimer30000: OnTimer30000:
enablenpc strnpcinfo(0); enablenpc();
stopnpctimer; stopnpctimer;
end; end;
} }
@ -3137,7 +3137,7 @@ ma_fild01,251,93,3 script Lost Child#malaya01 576,{
setquest 7389; setquest 7389;
erasequest 7388; erasequest 7388;
close2; close2;
disablenpc strnpcinfo(0); disablenpc();
if (strnpcinfo(0) == "Lost Child#malaya01") { if (strnpcinfo(0) == "Lost Child#malaya01") {
enablenpc "Lost Child#malaya02"; enablenpc "Lost Child#malaya02";
} else if (strnpcinfo(0) == "Lost Child#malaya01") { } else if (strnpcinfo(0) == "Lost Child#malaya01") {
@ -3171,7 +3171,7 @@ ma_fild01,251,93,3 script Lost Child#malaya01 576,{
OnInit: OnInit:
if (strnpcinfo(0) != "Lost Child#malaya01") if (strnpcinfo(0) != "Lost Child#malaya01")
disablenpc strnpcinfo(0); disablenpc();
} }
ma_fild01,114,141,3 duplicate(Lost Child#malaya01) Lost Child#malaya02 576 ma_fild01,114,141,3 duplicate(Lost Child#malaya01) Lost Child#malaya02 576
ma_fild01,130,314,3 duplicate(Lost Child#malaya01) Lost Child#malaya03 576 ma_fild01,130,314,3 duplicate(Lost Child#malaya01) Lost Child#malaya03 576
@ -4552,13 +4552,13 @@ OnInit:
mes "[" + strcharinfo(0) + "]"; mes "[" + strcharinfo(0) + "]";
mes "It's warm as a mother's bosom."; mes "It's warm as a mother's bosom.";
getitem 6519,1; //Collected_Sample getitem 6519,1; //Collected_Sample
disablenpc strnpcinfo(0); disablenpc();
initnpctimer; initnpctimer;
close; close;
} }
end; end;
OnTimer20000: OnTimer20000:
enablenpc strnpcinfo(0); enablenpc();
stopnpctimer; stopnpctimer;
end; end;
} }
@ -7958,15 +7958,15 @@ malaya,59,84,4 duplicate(MalayaStick) Suspicious Wooden Stick::MalayaStick10 858
- script Tent#ma -1,{ //557 - script Tent#ma -1,{ //557
end; end;
OnInit: OnInit:
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnEnable: OnEnable:
enablenpc strnpcinfo(0); enablenpc();
initnpctimer; initnpctimer;
end; end;
OnDisable: OnDisable:
stopnpctimer; stopnpctimer;
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnTimer1000: OnTimer1000:
donpcevent "MalayaStick"+replacestr(strnpcinfo(1),"Tent","")+"::OnDisable"; donpcevent "MalayaStick"+replacestr(strnpcinfo(1),"Tent","")+"::OnDisable";
@ -9120,13 +9120,13 @@ ma_fild01,164,231,6 script Beat Catching Boy#pin10 577,{
close; close;
OnInit: OnInit:
if (!$malaya_pintados_00) if (!$malaya_pintados_00)
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnEnable: OnEnable:
enablenpc strnpcinfo(0); enablenpc();
end; end;
OnDisable: OnDisable:
disablenpc strnpcinfo(0); disablenpc();
end; end;
} }
ma_fild01,170,228,4 duplicate(Beat Catching Boy#pin10) Beat Catching Boy#pin11 577 ma_fild01,170,228,4 duplicate(Beat Catching Boy#pin10) Beat Catching Boy#pin11 577

View File

@ -379,11 +379,11 @@ OnTouch:
donpcevent "Bush"+.@i+"Timer::OnEnable"; donpcevent "Bush"+.@i+"Timer::OnEnable";
close; close;
OnEnable: OnEnable:
enablenpc strnpcinfo(0); enablenpc();
donpcevent "Bush"+charat(strnpcinfo(2),9)+"Timer::OnDisable"; donpcevent "Bush"+charat(strnpcinfo(2),9)+"Timer::OnDisable";
end; end;
OnDisable: OnDisable:
disablenpc strnpcinfo(0); disablenpc();
end; end;
} }
@ -430,14 +430,14 @@ OnTouch:
- script #mora_fairy -1,{ - script #mora_fairy -1,{
end; end;
OnInit: OnInit:
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnEnable: OnEnable:
enablenpc strnpcinfo(0); enablenpc();
initnpctimer; initnpctimer;
end; end;
OnDisable: OnDisable:
disablenpc strnpcinfo(0); disablenpc();
stopnpctimer; stopnpctimer;
end; end;
OnTimer5000: OnTimer5000:
@ -485,15 +485,15 @@ spl_fild02,186,260,6 duplicate(#mora_fairy) Fairy#cmd63 439
- script #mora_bush_timer -1,{ - script #mora_bush_timer -1,{
end; end;
OnInit: OnInit:
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnEnable: OnEnable:
enablenpc strnpcinfo(0); enablenpc();
initnpctimer; initnpctimer;
end; end;
OnDisable: OnDisable:
stopnpctimer; stopnpctimer;
disablenpc strnpcinfo(0); disablenpc();
end; end;
OnTimer1000: OnTimer1000:
donpcevent "Bush#ep14_1_bs"+charat(strnpcinfo(0),4)+"::OnDisable"; donpcevent "Bush#ep14_1_bs"+charat(strnpcinfo(0),4)+"::OnDisable";
@ -4171,11 +4171,11 @@ OnFullon:
} }
end; end;
OnEnable: OnEnable:
enablenpc strnpcinfo(0); enablenpc();
stopnpctimer; stopnpctimer;
end; end;
OnDisable: OnDisable:
disablenpc strnpcinfo(0); disablenpc();
initnpctimer; initnpctimer;
end; end;
OnReset: OnReset:

View File

@ -1214,7 +1214,7 @@ OnInit:
rockrdg1,160,306,3 script Johnny James#revt04 10213,{ rockrdg1,160,306,3 script Johnny James#revt04 10213,{
end; end;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
} }
rockrdg1,168,306,3 duplicate(Johnny James#revt04) Albert Ford#revt08 10214 rockrdg1,168,306,3 duplicate(Johnny James#revt04) Albert Ford#revt08 10214
@ -2117,7 +2117,7 @@ rockrdg2,295,309,3 script Albert Ford#rockrdg2 10214,{
} }
end; end;
OnInit: OnInit:
cloakonnpc strnpcinfo(0); cloakonnpc();
end; end;
} }
@ -3700,12 +3700,12 @@ harboro2,52,261,3 script Red Pipe#1 4_ENERGY_RED,{
completequest .@quest_id; completequest .@quest_id;
if (isbegin_quest(12405) == 2 && isbegin_quest(12406) == 2 && isbegin_quest(12407) == 2 && isbegin_quest(12408) == 2) if (isbegin_quest(12405) == 2 && isbegin_quest(12406) == 2 && isbegin_quest(12407) == 2 && isbegin_quest(12408) == 2)
setquest 12409;// Pipes Maintained setquest 12409;// Pipes Maintained
disablenpc strnpcinfo(0); disablenpc();
initnpctimer; initnpctimer;
} }
end; end;
OnTimer30000: OnTimer30000:
enablenpc strnpcinfo(0); enablenpc();
stopnpctimer; stopnpctimer;
end; end;
} }

View File

@ -370,9 +370,9 @@ S_Fuse:
OnInit: OnInit:
if ($2012_tegod_kafra == 3 || agitcheck3())// 3 -> quest failed if ($2012_tegod_kafra == 3 || agitcheck3())// 3 -> quest failed
disablenpc strnpcinfo(0); disablenpc();
else else
enablenpc strnpcinfo(0); enablenpc();
end; end;
} }
@ -996,7 +996,7 @@ OnCommandOn:
OnCommandOff: OnCommandOff:
setnpcdisplay strnpcinfo(0),CLEAR_NPC; setnpcdisplay strnpcinfo(0),CLEAR_NPC;
OnInit: OnInit:
disablenpc strnpcinfo(0); disablenpc();
end; end;
} }
te_aldecas1,227,35,3 duplicate(#end_aira_alde01) #end_kuluna_alde01 CLEAR_NPC te_aldecas1,227,35,3 duplicate(#end_aira_alde01) #end_kuluna_alde01 CLEAR_NPC

View File

@ -370,9 +370,9 @@ S_Fuse:
OnInit: OnInit:
if ($2012_tegod_gloria == 3 || agitcheck3())// 3 -> quest failed if ($2012_tegod_gloria == 3 || agitcheck3())// 3 -> quest failed
disablenpc strnpcinfo(0); disablenpc();
else else
enablenpc strnpcinfo(0); enablenpc();
end; end;
} }
@ -993,7 +993,7 @@ OnCommandOn:
OnCommandOff: OnCommandOff:
setnpcdisplay strnpcinfo(0),CLEAR_NPC; setnpcdisplay strnpcinfo(0),CLEAR_NPC;
OnInit: OnInit:
disablenpc strnpcinfo(0); disablenpc();
end; end;
} }
te_prtcas01,205,205,3 duplicate(#end_aira_prt01) #end_kuluna_prt01 CLEAR_NPC te_prtcas01,205,205,3 duplicate(#end_aira_prt01) #end_kuluna_prt01 CLEAR_NPC

View File

@ -4744,8 +4744,10 @@ ACMD_FUNC(shownpc)
return -1; return -1;
} }
if (npc_name2id(NPCname) != NULL) { npc_data* nd = npc_name2id(NPCname);
npc_enable(NPCname, 1);
if (nd) {
npc_enable(nd, 1);
clif_displaymessage(fd, msg_txt(sd,110)); // Npc Enabled. clif_displaymessage(fd, msg_txt(sd,110)); // Npc Enabled.
} else { } else {
clif_displaymessage(fd, msg_txt(sd,111)); // This NPC doesn't exist. clif_displaymessage(fd, msg_txt(sd,111)); // This NPC doesn't exist.
@ -4770,12 +4772,14 @@ ACMD_FUNC(hidenpc)
return -1; return -1;
} }
if (npc_name2id(NPCname) == NULL) { npc_data* nd = npc_name2id(NPCname);
if (!nd) {
clif_displaymessage(fd, msg_txt(sd,111)); // This NPC doesn't exist. clif_displaymessage(fd, msg_txt(sd,111)); // This NPC doesn't exist.
return -1; return -1;
} }
npc_enable(NPCname, 0); npc_enable(nd, 0);
clif_displaymessage(fd, msg_txt(sd,112)); // Npc Disabled. clif_displaymessage(fd, msg_txt(sd,112)); // Npc Disabled.
return 0; return 0;
} }

View File

@ -254,20 +254,15 @@ static int npc_cloaked_sub(struct block_list *bl, va_list ap)
/*========================================== /*==========================================
* Disable / Enable NPC * Disable / Enable NPC
*------------------------------------------*/ *------------------------------------------*/
bool npc_enable_target(const char* name, uint32 char_id, int flag) bool npc_enable_target(npc_data* nd, uint32 char_id, int flag)
{ {
struct npc_data* nd = npc_name2id(name); nullpo_ret(nd);
if (!nd) {
ShowError("npc_enable: Attempted to %s a non-existing NPC '%s' (flag=%d).\n", (flag&11) ? "show" : "hide", name, flag);
return false;
}
if (char_id > 0 && (flag & 24)) { if (char_id > 0 && (flag & 24)) {
map_session_data *sd = map_charid2sd(char_id); map_session_data *sd = map_charid2sd(char_id);
if (!sd) { if (!sd) {
ShowError("npc_enable: Attempted to %s a NPC '%s' on an invalid target %d.\n", (flag & 8) ? "show" : "hide", name, char_id); ShowError("npc_enable: Attempted to %s a NPC '%s' on an invalid target %d.\n", (flag & 8) ? "show" : "hide", nd->name, char_id);
return false; return false;
} }

View File

@ -1330,8 +1330,8 @@ void npc_setcells(struct npc_data* nd);
void npc_unsetcells(struct npc_data* nd); void npc_unsetcells(struct npc_data* nd);
bool npc_movenpc(struct npc_data* nd, int16 x, int16 y); bool npc_movenpc(struct npc_data* nd, int16 x, int16 y);
bool npc_is_cloaked(struct npc_data* nd, struct map_session_data* sd); bool npc_is_cloaked(struct npc_data* nd, struct map_session_data* sd);
bool npc_enable_target(const char* name, uint32 char_id, int flag); bool npc_enable_target(npc_data* nd, uint32 char_id, int flag);
#define npc_enable(name, flag) npc_enable_target(name, 0, flag) #define npc_enable(nd, flag) npc_enable_target(nd, 0, flag)
void npc_setdisplayname(struct npc_data* nd, const char* newname); void npc_setdisplayname(struct npc_data* nd, const char* newname);
void npc_setclass(struct npc_data* nd, short class_); void npc_setclass(struct npc_data* nd, short class_);
struct npc_data* npc_name2id(const char* name); struct npc_data* npc_name2id(const char* name);

View File

@ -11684,40 +11684,38 @@ BUILDIN_FUNC(getareadropitem)
*------------------------------------------*/ *------------------------------------------*/
BUILDIN_FUNC(enablenpc) BUILDIN_FUNC(enablenpc)
{ {
const char *str = script_getstr(st,2); npc_data* nd;
if (npc_enable(str,1)) int flag = 0;
return SCRIPT_CMD_SUCCESS; int char_id = script_hasdata(st, 3) ? script_getnum(st, 3) : 0;
const char* command = script_getfuncname(st);
return SCRIPT_CMD_FAILURE; if (script_hasdata(st, 2))
} nd = npc_name2id(script_getstr(st,2));
else
nd = map_id2nd(st->oid);
/*========================================== if (!strcmp(command,"enablenpc"))
*------------------------------------------*/ flag = 1;
BUILDIN_FUNC(disablenpc) else if (!strcmp(command,"disablenpc"))
{ flag = 0;
const char *str = script_getstr(st,2); else if (!strcmp(command,"hideoffnpc"))
if (npc_enable(str,0)) flag = 2;
return SCRIPT_CMD_SUCCESS; else if (!strcmp(command,"hideonnpc"))
flag = 4;
else if (!strcmp(command,"cloakoffnpc"))
flag = 8;
else if (!strcmp(command,"cloakonnpc"))
flag = 16;
return SCRIPT_CMD_FAILURE; if (!nd) {
} if (script_hasdata(st, 2))
ShowError("buildin_%s: Attempted to %s a non-existing NPC '%s' (flag=%d).\n", (flag&11) ? "show" : "hide", command, script_getstr(st,2), flag);
else
ShowError("buildin_%s: Attempted to %s a non-existing NPC (flag=%d).\n", (flag&11) ? "show" : "hide", command, flag);
return SCRIPT_CMD_FAILURE;
}
/*========================================== if (npc_enable_target(nd, char_id, flag))
*------------------------------------------*/
BUILDIN_FUNC(hideoffnpc)
{
const char *str = script_getstr(st,2);
if (npc_enable(str,2))
return SCRIPT_CMD_SUCCESS;
return SCRIPT_CMD_FAILURE;
}
/*==========================================
*------------------------------------------*/
BUILDIN_FUNC(hideonnpc)
{
const char *str = script_getstr(st,2);
if (npc_enable(str,4))
return SCRIPT_CMD_SUCCESS; return SCRIPT_CMD_SUCCESS;
return SCRIPT_CMD_FAILURE; return SCRIPT_CMD_FAILURE;
@ -25082,28 +25080,20 @@ BUILDIN_FUNC(convertpcinfo) {
return SCRIPT_CMD_SUCCESS; return SCRIPT_CMD_SUCCESS;
} }
BUILDIN_FUNC(cloakoffnpc)
{
if (npc_enable_target(script_getstr(st, 2), script_hasdata(st, 3) ? script_getnum(st, 3) : 0, 8))
return SCRIPT_CMD_SUCCESS;
return SCRIPT_CMD_FAILURE;
}
BUILDIN_FUNC(cloakonnpc)
{
if (npc_enable_target(script_getstr(st, 2), script_hasdata(st, 3) ? script_getnum(st, 3) : 0, 16))
return SCRIPT_CMD_SUCCESS;
return SCRIPT_CMD_FAILURE;
}
BUILDIN_FUNC(isnpccloaked) BUILDIN_FUNC(isnpccloaked)
{ {
struct npc_data *nd = npc_name2id(script_getstr(st, 2)); npc_data *nd;
if (script_hasdata(st, 2))
nd = npc_name2id(script_getstr(st, 2));
else
nd = map_id2nd(st->oid);
if (!nd) { if (!nd) {
ShowError("buildin_isnpccloaked: %s is a non-existing NPC.\n", script_getstr(st, 2)); if (script_hasdata(st, 2))
ShowError("buildin_isnpccloaked: %s is a non-existing NPC.\n", script_getstr(st, 2));
else
ShowError("buildin_isnpccloaked: non-existing NPC.\n");
return SCRIPT_CMD_FAILURE; return SCRIPT_CMD_FAILURE;
} }
@ -25375,10 +25365,12 @@ struct script_function buildin_func[] = {
BUILDIN_DEF2(getunits, "getmapunits", "is?"), BUILDIN_DEF2(getunits, "getmapunits", "is?"),
BUILDIN_DEF2(getunits, "getareaunits", "isiiii?"), BUILDIN_DEF2(getunits, "getareaunits", "isiiii?"),
BUILDIN_DEF(getareadropitem,"siiiiv"), BUILDIN_DEF(getareadropitem,"siiiiv"),
BUILDIN_DEF(enablenpc,"s"), BUILDIN_DEF(enablenpc,"?"),
BUILDIN_DEF(disablenpc,"s"), BUILDIN_DEF2(enablenpc, "disablenpc", "?"),
BUILDIN_DEF(hideoffnpc,"s"), BUILDIN_DEF2(enablenpc, "hideoffnpc", "?"),
BUILDIN_DEF(hideonnpc,"s"), BUILDIN_DEF2(enablenpc, "hideonnpc", "?"),
BUILDIN_DEF2(enablenpc, "cloakoffnpc", "??"),
BUILDIN_DEF2(enablenpc, "cloakonnpc", "??"),
BUILDIN_DEF(sc_start,"iii???"), BUILDIN_DEF(sc_start,"iii???"),
BUILDIN_DEF2(sc_start,"sc_start2","iiii???"), BUILDIN_DEF2(sc_start,"sc_start2","iiii???"),
BUILDIN_DEF2(sc_start,"sc_start4","iiiiii???"), BUILDIN_DEF2(sc_start,"sc_start4","iiiiii???"),
@ -25839,9 +25831,7 @@ struct script_function buildin_func[] = {
BUILDIN_DEF(achievement_condition,"i"), BUILDIN_DEF(achievement_condition,"i"),
BUILDIN_DEF(getvariableofinstance,"ri"), BUILDIN_DEF(getvariableofinstance,"ri"),
BUILDIN_DEF(convertpcinfo,"vi"), BUILDIN_DEF(convertpcinfo,"vi"),
BUILDIN_DEF(cloakoffnpc, "s?"), BUILDIN_DEF(isnpccloaked, "??"),
BUILDIN_DEF(cloakonnpc, "s?"),
BUILDIN_DEF(isnpccloaked, "s?"),
BUILDIN_DEF(rentalcountitem, "v?"), BUILDIN_DEF(rentalcountitem, "v?"),
BUILDIN_DEF2(rentalcountitem, "rentalcountitem2", "viiiiiii?"), BUILDIN_DEF2(rentalcountitem, "rentalcountitem2", "viiiiiii?"),