summaryrefslogtreecommitdiff
path: root/npc/custom
diff options
context:
space:
mode:
Diffstat (limited to 'npc/custom')
-rw-r--r--npc/custom/bartershop.txt21
-rw-r--r--npc/custom/etc/quest_warper.txt6
-rw-r--r--npc/custom/events/disguise.txt10
-rw-r--r--npc/custom/events/mushroom_event.txt11
-rw-r--r--npc/custom/quests/quest_shop.txt4
-rw-r--r--npc/custom/quests/thq/THQS_TTShop.txt4
-rw-r--r--npc/custom/stylist.txt78
7 files changed, 104 insertions, 30 deletions
diff --git a/npc/custom/bartershop.txt b/npc/custom/bartershop.txt
new file mode 100644
index 000000000..bcb61795e
--- /dev/null
+++ b/npc/custom/bartershop.txt
@@ -0,0 +1,21 @@
+//===== Hercules Script ======================================
+//= Barter shop demo
+//===== By: ==================================================
+//= 4144
+//===== Current Version: =====================================
+//= 1.0
+//===== Description: =========================================
+//= Barter shop demo in prontera.
+//============================================================
+
+prontera,159,284,4 trader Barter Shop#prt 4_M_KID1,{
+OnInit:
+ tradertype(NST_BARTER);
+ sellitem White_Herb, 100, Red_Potion, 2;
+ sellitem Blue_Herb, 200, Orange_Potion, 3;
+ sellitem Green_Herb, 100, Red_Potion, 4;
+ sellitem White_Herb, 100, Orange_Potion, 1;
+ sellitem Apple, -1, Orange_Potion, 1;
+ sellitem Praetorian_Shield, 100, Berserk_Potion, 10;
+ end;
+}
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/disguise.txt b/npc/custom/events/disguise.txt
index b9071d162..fde5e544a 100644
--- a/npc/custom/events/disguise.txt
+++ b/npc/custom/events/disguise.txt
@@ -8,6 +8,7 @@
//= Note: This script requires PCRE to run properly.
//= 5.0 Last update by GmOcean.
//= 5.1 Cleaned and standardized, mostly. [Euphy]
+//= 5.2 Fix a bug that causes this event run indefinitely [AnnieRuru]
//============================================================
prontera,160,155,4 script Disguise Event 4_M_NFDEADMAN,{
@@ -183,6 +184,15 @@ OnTimer30000:
deletepset 1;
stopnpctimer;
setnpctimer 0;
+ ++.RoundCount;
+ if (.RoundCount >= .Rounds) {
+ setnpcdisplay "Disguise Event", 4_M_NFDEADMAN;
+ .RoundCount = 0;
+ .Change = 0;
+ .EventON = 0;
+ npctalk "Thank you all for playing. That was the last round of the Disguise Event. Come play again later.";
+ end;
+ }
initnpctimer;
end;
OnTimer60000:
diff --git a/npc/custom/events/mushroom_event.txt b/npc/custom/events/mushroom_event.txt
index b9c54c09e..fc7446814 100644
--- a/npc/custom/events/mushroom_event.txt
+++ b/npc/custom/events/mushroom_event.txt
@@ -41,7 +41,7 @@ OnMinute10: // Start time (every hour)
set .status,1;
set .Spawn,rand(1,10); // How many Mushrooms should spawn?
set .Map$,.maps$[rand(getarraysize(.maps$))];
- killmonster .Map$,"All";
+ killmonster(.Map$, "all");
monster .Map$,0,0,"Please don't kill me!",1084,.Spawn,strnpcinfo(NPC_NAME)+"::OnMobKilled";
announce "Find the Mushroom : Total of "+.Spawn+" Mushrooms have been spawned in "+.Map$+"!",0;
sleep 2500;
@@ -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/custom/stylist.txt b/npc/custom/stylist.txt
index 0ee7d8822..188a91ca7 100644
--- a/npc/custom/stylist.txt
+++ b/npc/custom/stylist.txt
@@ -3,32 +3,72 @@
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
-//= 1.1
+//= 1.2
//===== Description: =========================================
//= Changes your hair style, hair color, and cloth color.
//===== Additional Comments: =================================
//= 1.1 Switched to 'getbattleflag', credits to Saithis. [Euphy]
+//= 1.2 Fix style start at min_style, add Job_Summoner [AnnieRuru]
//============================================================
prontera,170,180,1 script Stylist#custom_stylist 2_M_DYEINGER,{
-
- setarray .@styles[1],getbattleflag("max_cloth_color"),getbattleflag("max_hair_style"),getbattleflag("max_hair_color");
- setarray .@Look[1],7,1,6;
- set .@s, select(" ~ Cloth color", " ~ Hairstyle", " ~ Hair color");
- set .@Revert, getlook(.@Look[.@s]);
- set .@style,1;
- while(1) {
- setlook .@Look[.@s], .@style;
- message strcharinfo(PC_NAME),"This is style #"+.@style+".";
- set .@menu$, " ~ Next (^0055FF"+((.@style!=.@styles[.@s])?.@style+1:1)+"^000000): ~ Previous (^0055FF"+((.@style!=1)?.@style-1:.@styles[.@s])+"^000000): ~ Jump to...: ~ Revert to original (^0055FF"+.@Revert+"^000000)";
- switch(select(.@menu$)) {
- case 1: set .@style, ((.@style!=.@styles[.@s])?.@style+1:1); break;
- case 2: set .@style, ((.@style!=1)?.@style-1:.@styles[.@s]); break;
- case 3: message strcharinfo(PC_NAME),"Choose a style between 1 - "+.@styles[.@s]+".";
- input .@style,0,.@styles[.@s];
- if (!.@style) set .@style, rand(1,.@styles[.@s]);
- break;
- case 4: set .@style, .@Revert; setlook .@Look[.@s], .@Revert; break;
+ .@choose = select("Hair style", "Hair color", "Cloth color") - 1;
+ .@part = .look[.@choose];
+ if (BaseClass != Job_Summoner)
+ callsub(L_styles, .@part, .minstyle[.@part], .maxstyle[.@part]);
+ else
+ callsub(L_styles, .@part, .summoner_minstyle[.@part], .summoner_maxstyle[.@part]);
+L_styles:
+ .@lookpart = getarg(0);
+ .@minstyle = getarg(1);
+ .@maxstyle = getarg(2);
+ .@i = .@revert = getlook(.@lookpart);
+ while (true) {
+ setlook(.@lookpart, .@i);
+ message(strcharinfo(PC_NAME), sprintf(_("This is style #%d."), .@i));
+ if (.@i == .@maxstyle)
+ .@next = .@minstyle;
+ else
+ .@next = .@i + 1;
+ if (.@i == .@minstyle)
+ .@previous = .@maxstyle;
+ else
+ .@previous = .@i - 1;
+ switch(select(
+ sprintf(_(" ~ Next (%s%d%s)"), F_MesColor(C_BLUE), .@next, F_MesColor(C_BLACK)),
+ sprintf(_(" ~ Previous (%s%d%s)"), F_MesColor(C_BLUE), .@previous, F_MesColor(C_BLACK)),
+ " ~ Jump to...",
+ sprintf(_(" ~ Revert to original (%s%d%s)"), F_MesColor(C_BLUE), .@revert, F_MesColor(C_BLACK)))) {
+ case 1:
+ .@i = .@next;
+ break;
+ case 2:
+ .@i = .@previous;
+ break;
+ case 3:
+ message(strcharinfo(PC_NAME), sprintf(_("Choose a style between %d - %d."), .@minstyle, .@maxstyle));
+ input(.@i, .@minstyle, .@maxstyle);
+ break;
+ case 4:
+ .@i = .@revert;
}
}
+ end;
+OnInit:
+ setarray .look[0], LOOK_HAIR, LOOK_HAIR_COLOR, LOOK_CLOTHES_COLOR;
+
+ .minstyle[LOOK_HAIR] = getbattleflag("min_hair_style");
+ .maxstyle[LOOK_HAIR] = getbattleflag("max_hair_style");
+ .minstyle[LOOK_HAIR_COLOR] = getbattleflag("min_hair_color");
+ .maxstyle[LOOK_HAIR_COLOR] = getbattleflag("max_hair_color");
+ .minstyle[LOOK_CLOTHES_COLOR] = getbattleflag("min_cloth_color");
+ .maxstyle[LOOK_CLOTHES_COLOR] = getbattleflag("max_cloth_color");
+
+ .summoner_minstyle[LOOK_HAIR] = getbattleflag("min_hair_style");
+ .summoner_maxstyle[LOOK_HAIR] = getbattleflag("max_hair_style");
+ .summoner_minstyle[LOOK_HAIR_COLOR] = getbattleflag("min_hair_color");
+ .summoner_maxstyle[LOOK_HAIR_COLOR] = getbattleflag("max_hair_color");
+ .summoner_minstyle[LOOK_CLOTHES_COLOR] = getbattleflag("min_cloth_color");
+ .summoner_maxstyle[LOOK_CLOTHES_COLOR] = getbattleflag("max_cloth_color");
+ end;
}