summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
Diffstat (limited to 'npc')
-rw-r--r--npc/custom/etc/quest_warper.txt6
-rw-r--r--npc/custom/events/mushroom_event.txt9
-rw-r--r--npc/custom/quests/quest_shop.txt4
-rw-r--r--npc/custom/quests/thq/THQS_TTShop.txt4
-rw-r--r--npc/dev/test.txt10
-rw-r--r--npc/other/Global_Functions.txt28
-rw-r--r--npc/quests/quests_rachel.txt2
-rw-r--r--npc/re/jobs/3-1/archbishop.txt12
-rw-r--r--npc/re/jobs/3-1/ranger.txt4
-rw-r--r--npc/re/jobs/3-2/sura.txt6
-rw-r--r--npc/re/quests/eden/eden_tutorial.txt2
-rw-r--r--npc/woe-fe/agit_main.txt3
12 files changed, 43 insertions, 47 deletions
diff --git a/npc/custom/etc/quest_warper.txt b/npc/custom/etc/quest_warper.txt
index 35b863e9d..2ae2e7f7f 100644
--- a/npc/custom/etc/quest_warper.txt
+++ b/npc/custom/etc/quest_warper.txt
@@ -82,7 +82,7 @@ function script Q_Warpra {
case 2:
warp $QW_SP_WarpMap$, $QW_SP_WarpX, $QW_SP_WarpY;
close2;
- debugmes "Please check your special warp menu settings on the Warpra.";
+ consolemes(CONSOLEMES_WARNING, "Please check your special warp menu settings on the Warpra.");
end;
case 3: goto L_town;
case 4: goto L_dungeon;
@@ -1533,7 +1533,7 @@ function script QWS_Dungeon_Warpra {
mes "[Warpra]";
mes "Sorry, I can only unlock this location.";
} else
- debugmes "QWS_Dungeon_Warpra error, improper syntax?";
+ consolemes(CONSOLEMES_ERROR, "QWS_Dungeon_Warpra error, improper syntax?");
return;
function QWS_D_setbin {
@@ -1577,7 +1577,7 @@ function script QWS_Town_Warpra {
} else if (QWS_T_getbin(getarg(0)) == 1) {
callfunc "Q_Warpra",0;
} else
- debugmes "QWS_Town_Warpra error, improper syntax ?";
+ consolemes(CONSOLEMES_ERROR, "QWS_Town_Warpra error, improper syntax ?");
return;
function QWS_T_setbin {
diff --git a/npc/custom/events/mushroom_event.txt b/npc/custom/events/mushroom_event.txt
index b9c54c09e..b04b99fff 100644
--- a/npc/custom/events/mushroom_event.txt
+++ b/npc/custom/events/mushroom_event.txt
@@ -50,9 +50,12 @@ OnMinute10: // Start time (every hour)
OnMobKilled:
set .Spawn, .Spawn - 1;
- getitem .Prize, .Amount;
- if (.Spawn) announce "[ "+strcharinfo(PC_NAME)+" ] has killed a Mushroom. There are now "+.Spawn+" Mushroom(s) left.",bc_map;
- else {
+ if (playerattached() != 0) {
+ getitem .Prize, .Amount;
+ if (.Spawn)
+ announce "[ "+strcharinfo(PC_NAME)+" ] has killed a Mushroom. There are now "+.Spawn+" Mushroom(s) left.",bc_map;
+ }
+ if (!.Spawn) {
announce "The Find the Mushroom Event has ended. All the Mushrooms have been killed.",0;
set .status,0;
}
diff --git a/npc/custom/quests/quest_shop.txt b/npc/custom/quests/quest_shop.txt
index 739b53c02..c2481e991 100644
--- a/npc/custom/quests/quest_shop.txt
+++ b/npc/custom/quests/quest_shop.txt
@@ -170,13 +170,13 @@ OnEnd:
function Add {
if (getitemname(getarg(1)) == "null") {
- debugmes "Quest reward #"+getarg(1)+" invalid (skipped).";
+ consolemes(CONSOLEMES_WARNING, "Quest reward #"+getarg(1)+" invalid (skipped).");
return;
}
setarray .@j[0],getarg(2),getarg(3),getarg(4);
for(set .@i,5; .@i<getargcount(); set .@i,.@i+2) {
if (getitemname(getarg(.@i)) == "null") {
- debugmes "Quest requirement #"+getarg(.@i)+" invalid (skipped).";
+ consolemes(CONSOLEMES_WARNING, "Quest requirement #"+getarg(.@i)+" invalid (skipped).");
return;
} else
setarray .@j[.@i-2],getarg(.@i),getarg(.@i+1);
diff --git a/npc/custom/quests/thq/THQS_TTShop.txt b/npc/custom/quests/thq/THQS_TTShop.txt
index 96e7346d3..4c12f9938 100644
--- a/npc/custom/quests/thq/THQS_TTShop.txt
+++ b/npc/custom/quests/thq/THQS_TTShop.txt
@@ -93,7 +93,7 @@ function script thqs_trade_token {
// getarg(1) - .@mp$ -> PRICE
function script thqs_menu_buy {
if( getargcount() != 2 ) {
- debugmes "thqs_menu_buy: Wrong number of arguments!!";
+ consolemes(CONSOLEMES_ERROR, "thqs_menu_buy: Wrong number of arguments!!");
close;
}
@@ -101,7 +101,7 @@ function script thqs_menu_buy {
.@mp$ = getarg(1);
if( getarraysize( getd(.@mw$) ) != getarraysize( getd(.@mp$) ) ) {
- debugmes "thqs_menu_buy: Missing entries in data!";
+ consolemes(CONSOLEMES_ERROR, "thqs_menu_buy: Missing entries in data!");
close;
}
diff --git a/npc/dev/test.txt b/npc/dev/test.txt
index 2822ee65c..a867a09b2 100644
--- a/npc/dev/test.txt
+++ b/npc/dev/test.txt
@@ -786,10 +786,10 @@ function script HerculesSelfTestHelper {
callsub(OnCheck, "data_to_string (integer variable)", data_to_string(.@x), ".@x");
if (.errors) {
- debugmes "Script engine self-test [ \033[0;31mFAILED\033[0m ]";
- debugmes "**** The test was completed with " + .errors + " errors. ****";
+ consolemes(CONSOLEMES_DEBUG, "Script engine self-test [ \033[0;31mFAILED\033[0m ]");
+ consolemes(CONSOLEMES_DEBUG, "**** The test was completed with " + .errors + " errors. ****");
} else {
- debugmes "Script engine self-test [ \033[0;32mPASSED\033[0m ]";
+ consolemes(CONSOLEMES_DEBUG, "Script engine self-test [ \033[0;32mPASSED\033[0m ]");
}
return .errors;
end;
@@ -840,8 +840,8 @@ OnReportError:
.@val$ = getarg(1,"");
.@ref$ = getarg(2,"");
if (.errors == 1)
- debugmes "**** WARNING: Any self-test results past this point are unreliable because of previous errors. ****";
- debugmes "Error: "+.@msg$+": '"+.@val$+"' (found) != '"+.@ref$+"' (expected)";
+ consolemes(CONSOLEMES_DEBUG, "**** WARNING: Any self-test results past this point are unreliable because of previous errors. ****");
+ consolemes(CONSOLEMES_DEBUG, "Error: "+.@msg$+": '"+.@val$+"' (found) != '"+.@ref$+"' (expected)");
++.errors;
//end;
return;
diff --git a/npc/other/Global_Functions.txt b/npc/other/Global_Functions.txt
index d45b3c3e7..e3741b495 100644
--- a/npc/other/Global_Functions.txt
+++ b/npc/other/Global_Functions.txt
@@ -446,34 +446,26 @@ function script F_MesColor {
function script F_GetTradeRestriction {
.@trade = getiteminfo(getarg(0), ITEMINFO_TRADE);
- if (.@trade == 0) {
+ if (.@trade == 0)
return "None";
- }
.@trade$ = "";
- if (.@trade & ITR_NODROP) {
+ if (.@trade & ITR_NODROP)
.@trade$ += "NoDrop|";
- }
- if (.@trade & ITR_NOTRADE) {
+ if (.@trade & ITR_NOTRADE)
.@trade$ += "NoTrade|";
- }
- if (.@trade & ITR_PARTNEROVERRIDE) {
+ if (.@trade & ITR_PARTNEROVERRIDE)
.@trade$ += "PartnerOverride|";
- }
- if (.@trade & ITR_NOSELLTONPC) {
+ if (.@trade & ITR_NOSELLTONPC)
.@trade$ += "NoSellToNpc|";
- }
- if (.@trade & ITR_NOSTORAGE) {
+ if (.@trade & ITR_NOSTORAGE)
.@trade$ += "NoStorage|";
- }
- if (.@trade & ITR_NOGSTORAGE) {
+ if (.@trade & ITR_NOGSTORAGE)
.@trade$ += "NoGuildStorage|";
- }
- if (.@trade & ITR_NOMAIL) {
+ if (.@trade & ITR_NOMAIL)
.@trade$ += "NoMail|";
- }
- if (.@trade & ITR_NOAUCTION) {
+ if (.@trade & ITR_NOAUCTION)
.@trade$ += "NoAuction|";
- }
+ return .@trade$;
}
//== Function F_MesItemInfo ===================================
diff --git a/npc/quests/quests_rachel.txt b/npc/quests/quests_rachel.txt
index 43e4beadb..1cc002d80 100644
--- a/npc/quests/quests_rachel.txt
+++ b/npc/quests/quests_rachel.txt
@@ -3210,7 +3210,7 @@ OnTouch:
OnTouchNPC:
emotion e_an;
- //emotion e_gg,1; //Emote on monster - unsupported
+ unitemote mobattached(), e_gg;
end;
OnMyMobDead:
diff --git a/npc/re/jobs/3-1/archbishop.txt b/npc/re/jobs/3-1/archbishop.txt
index e59492ce5..e37087857 100644
--- a/npc/re/jobs/3-1/archbishop.txt
+++ b/npc/re/jobs/3-1/archbishop.txt
@@ -779,7 +779,7 @@ job3_arch01,29,34,3 script Valkyrie#arch 4_F_VALKYRIE2,{
warp "odin_tem02",282,263;
end;
}
- if (getmercinfo(1)) {
+ if (getmercinfo(MERCINFO_CLASS)) {
mes "[Valkyrie]";
mes "If you want to talk with me, you have to ^3131FFcancel all contracts^000000 with any mercenaries you have.";
close;
@@ -1006,7 +1006,7 @@ OnTouch:
if (countitem(ValkyrieA_Scroll)) {
delitem ValkyrieA_Scroll,1;
// fall through
- } else if (getmercinfo(1) == 2037) {
+ } else if (getmercinfo(MERCINFO_CLASS) == VALKYRIE_A) {
if (strnpcinfo(NPC_NAME) == "#arch_1_10")
viewpoint 1,113,327,1,0xFF9900;
.@randht = rand(1,10);
@@ -1038,7 +1038,7 @@ OnTouch:
if (countitem(ValkyrieA_Scroll)) {
delitem ValkyrieA_Scroll,1;
// fall through
- } else if (getmercinfo(1) == 2037) {
+ } else if (getmercinfo(MERCINFO_CLASS) == VALKYRIE_A) {
mapannounce "job3_arch02","Valkyrie's Nightmare: An incompetent illusion of Valkyrie came here with the assistance of humans. You wanna have that nightmare?",bc_map,"0xFF0000";
donpcevent "mob#arch_1::OnKill";
end;
@@ -1113,7 +1113,7 @@ OnKill:
}
job3_arch02,113,327,5 script Valkyrie#arch_01 4_F_VALKYRIE2,{
- if (getmercinfo(1)) {
+ if (getmercinfo(MERCINFO_CLASS)) {
mes "[Valkyrie]";
mes "If you want to talk with me, you have to ^3131FFcancel all contracts^000000 with any mercenaries you have.";
close;
@@ -1355,7 +1355,7 @@ OnTouch:
if (countitem(ValkyrieB_Scroll)) {
delitem ValkyrieB_Scroll,1;
// fall through
- } else if (getmercinfo(1) == 2038) {
+ } else if (getmercinfo(MERCINFO_CLASS) == VALKYRIE_B) {
.@randht = rand(1,10);
if (.@randht < 8)
mapannounce "job3_arch02","Whispering of an impersonation: I can feel the devil's spirits. Can you hear? The sound of gathering in crowds.",bc_map,"0xFFCE00";
@@ -1400,7 +1400,7 @@ OnTouch:
if (countitem(ValkyrieB_Scroll)) {
delitem ValkyrieB_Scroll,1;
// fall through
- } else if (getmercinfo(1) == 2038) {
+ } else if (getmercinfo(MERCINFO_CLASS) == VALKYRIE_B) {
mapannounce "job3_arch02","A shout of devil: You are so childish. I invite you a party of devil. I'll make you have a fun!",bc_map,"0xFF0000";
end;
}
diff --git a/npc/re/jobs/3-1/ranger.txt b/npc/re/jobs/3-1/ranger.txt
index 41e5b476f..166a1d42e 100644
--- a/npc/re/jobs/3-1/ranger.txt
+++ b/npc/re/jobs/3-1/ranger.txt
@@ -613,7 +613,7 @@ tur_dun01,91,169,3 script Test Instructor#jr02 4_M_JOB_HUNTER,{
mes "Don't hang around here doing nothing. This is my area!";
close;
L_Start:
- if (getmercinfo(1)) {
+ if (getmercinfo(MERCINFO_CLASS)) {
mes "[Test Instructor, Teardrop]";
mes "Stop!";
next;
@@ -1491,7 +1491,7 @@ job3_rang02,251,49,3 script Test Supervisor#jr_13 4_M_JOB_HUNTER,{
setquest 8261;
close;
}
- if (getmercinfo(1) == 2034) {
+ if (getmercinfo(MERCINFO_CLASS) == M_DESERT_WOLF_B) {
erasequest 8261;
mes "Good! Then I'll start the test right now!";
next;
diff --git a/npc/re/jobs/3-2/sura.txt b/npc/re/jobs/3-2/sura.txt
index 63e689acc..4e0108fd8 100644
--- a/npc/re/jobs/3-2/sura.txt
+++ b/npc/re/jobs/3-2/sura.txt
@@ -654,14 +654,14 @@ OnTimer305000:
OnTimer315000:
mapannounce "sword_2-1","Come on here.",bc_map;
donpcevent "Buddy#job_shuaneh::OnDisable";
- donpcevent "#Sura_garajjom::OnEnable";
+ // donpcevent "#Sura_garajjom::OnEnable"; // Commented to prevent #Sura_garajjom allowing player to success the test at any case (even when failing it).
end;
OnTimer320000:
mapannounce "sword_2-1","I guess you're not ready to meet the master yet...",bc_map;
mapwarp "sword_2-1","yuno_fild07",255,178;
- donpcevent "#Sura_garajjom::OnDisable";
- donpcevent "Drawing Room::OnEnable";
+ // donpcevent "#Sura_garajjom::OnDisable";
donpcevent "Buddy#Sura_Salon::OnDisable";
+ donpcevent "Drawing Room::OnEnable";
end;
}
diff --git a/npc/re/quests/eden/eden_tutorial.txt b/npc/re/quests/eden/eden_tutorial.txt
index 902db7945..188bc514a 100644
--- a/npc/re/quests/eden/eden_tutorial.txt
+++ b/npc/re/quests/eden/eden_tutorial.txt
@@ -228,7 +228,7 @@ moc_para01,34,178,3 script Tutorial Instructor 4_M_KHMAN,{
close;
}
} else if (questprogress(9167) == 1) {
- if (!getmercinfo(1)) {
+ if (!getmercinfo(MERCINFO_CLASS)) {
mes "[Tutorial Instructor]";
mes "You haven't gotten a mercenary yet.";
next;
diff --git a/npc/woe-fe/agit_main.txt b/npc/woe-fe/agit_main.txt
index 5ac5b8e9a..a0db6402b 100644
--- a/npc/woe-fe/agit_main.txt
+++ b/npc/woe-fe/agit_main.txt
@@ -105,7 +105,8 @@ OnAgitBreak:
// Show and log error if an unguilded player breaks the Emperium. (Should NEVER happen)
if (.@GID <= 0) {
.@notice$ = "Character "+strcharinfo(PC_NAME)+" ("+getcharid(CHAR_ID_CHAR)+") broke the Emperium in Castle: "+strnpcinfo(NPC_NAME_HIDDEN)+" while guildless. No data will be saved and Emperium respawned.";
- logmes .@notice$; debugmes .@notice$;
+ logmes .@notice$;
+ consolemes(CONSOLEMES_NOTICE, .@notice$);
donpcevent "Agit#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnStartArena";
end;
}