summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/003-1/neko.txt4
-rw-r--r--npc/020-5/_import.txt1
-rw-r--r--npc/020-5/bracco.txt132
-rw-r--r--npc/functions/mobpoint.txt3
4 files changed, 137 insertions, 3 deletions
diff --git a/npc/003-1/neko.txt b/npc/003-1/neko.txt
index 8f1829d70..b8720b6d6 100644
--- a/npc/003-1/neko.txt
+++ b/npc/003-1/neko.txt
@@ -64,7 +64,7 @@ OnInit:
setunitdata(.@npcId, UDT_HAIRCOLOR, 2);
tradertype(NST_MARKET);
- sellitem LeatherShirt, 120000, 1;
+ sellitem LeatherShirt, 12000, 1;
sellitem ShortTankTop, 8000, 1;
sellitem TrainingBow, 990, 2;
sellitem RoastedMaggot, -1, 2;
@@ -78,7 +78,7 @@ OnInit:
end;
OnClock2359:
- restoreshopitem LeatherShirt, 120000, 1;
+ restoreshopitem LeatherShirt, 12000, 1;
restoreshopitem TrainingBow, 990, 2;
restoreshopitem ShortTankTop, 8000, 1;
restoreshopitem ArrowAmmoBox,rand(5,10);
diff --git a/npc/020-5/_import.txt b/npc/020-5/_import.txt
index 5857fefbe..c98775e96 100644
--- a/npc/020-5/_import.txt
+++ b/npc/020-5/_import.txt
@@ -1,3 +1,4 @@
// Map 020-5: Nivalis Indoors
// This file is generated automatically. All manually added changes will be removed when running the Converter.
"npc/020-5/_warps.txt",
+"npc/020-5/bracco.txt",
diff --git a/npc/020-5/bracco.txt b/npc/020-5/bracco.txt
new file mode 100644
index 000000000..31174bdb3
--- /dev/null
+++ b/npc/020-5/bracco.txt
@@ -0,0 +1,132 @@
+// TMW-2 Script
+// Author:
+// Jesusalva
+// Description:
+// Nivalis shopkeeper & forge master. He deals with the equipment which Nicholas,
+// Silversmith and Nahred doesn't works with.
+
+020-5,31,25,0 script Bracco NPC_M_SHOPKEEPER,{
+ goto L_Start;
+ // blacksmith_create( BaseItem1, Amount, BaseItem2, Amount, PrizeItem, Price )
+ function blacksmith_create {
+ .@base1=getarg(0);
+ .@amon1=getarg(1);
+ .@base2=getarg(2);
+ .@amon2=getarg(3);
+ .@prize=getarg(4);
+ .@price=getarg(5);
+
+ mesn;
+ mesq l("Do you want to craft @@? For that I will need:", getitemlink(.@prize));
+ mesc l("@@/@@ @@", countitem(.@base1), .@amon1, getitemlink(.@base1));
+ mesc l("@@/@@ @@", countitem(.@base2), .@amon2, getitemlink(.@base2));
+ mesc l("@@/@@ GP", format_number(Zeny), format_number(.@price));
+
+ select
+ l("Yes"),
+ l("No");
+
+ if (@menu == 2)
+ return;
+
+ if (countitem(.@base1) >= .@amon1 &&
+ countitem(.@base2) >= .@amon2 &&
+ Zeny >= .@price) {
+ inventoryplace .@prize, 1;
+ delitem .@base1, .@amon1;
+ delitem .@base2, .@amon2;
+ Zeny = Zeny - .@price;
+ getitem .@prize, 1;
+ .@xp=getiteminfo(.@base1, ITEMINFO_SELLPRICE)*.@amon1+getiteminfo(.@base2, ITEMINFO_SELLPRICE)*.@amon2;
+ .@xp=.@xp*2/3;
+ getexp .@xp, rand(1,10);
+
+ mes "";
+ mesn;
+ mesq l("Many thanks! Come back soon.");
+ } else {
+ speech S_FIRST_BLANK_LINE,// | S_LAST_NEXT,
+ l("You don't have enough material, sorry.");
+ }
+ return;
+ }
+
+// Start
+L_Start:
+ mesn;
+ mesq l("Welcome to my fine establishment!");
+ mes "";
+ select
+ l("Trade"),
+ l("I'm actually looking for an item forged!"),
+ l("Leave");
+
+ if (@menu == 2)
+ goto L_Forge;
+
+ closedialog;
+ if (@menu == 1)
+ shop .name$;
+ goodbye;
+ close;
+// Note: the prices are absurd atm, but hey hey, every single one of them are cap items currently
+L_Forge:
+ mesn;
+ mesq l("Well, if you want warrior craft, perhaps you should look for @@ or @@.", l("Nicholas"), l("Nahrec"));
+ mes "";
+ select
+ l("Nothing, sorry!"),
+ l("I want leather armbands!"),
+ l("I want copper armbands!"),
+ l("I want iron armbands!");
+ mes "";
+ switch (@menu) {
+ case 1:
+ close; break;
+ case 2:
+ blacksmith_create(LeatherPatch, 60, TitaniumIngot, 1, Armbands, 4500);
+ break;
+ case 3:
+ blacksmith_create(CopperIngot, 40, Coal, 40, CopperArmbands, 9000);
+ break;
+ case 4:
+ blacksmith_create(IronIngot, 100, Coal, 90, IronArmbands, 15000);
+ break;
+ }
+ goto L_Forge;
+
+OnInit:
+ .@npcId = getnpcid(.name$);
+ setunitdata(.@npcId, UDT_HEADTOP, NPCEyes);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, TneckSweater);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, RaidTrousers);
+ setunitdata(.@npcId, UDT_WEAPON, FurBoots);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 26);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 2);
+
+ tradertype(NST_MARKET);
+ sellitem LeatherShirt, 15000, 1;
+ sellitem LeatherShield, 5000, 1;
+ sellitem ShortBow, 11200, 1;
+ sellitem ArrowAmmoBox,-1,rand(8,12);
+ sellitem IronAmmoBox,-1,rand(3,5);
+
+ npcsit;
+ .sex = G_MALE;
+ .distance = 5;
+ end;
+
+OnWed0000:
+OnThu0400:
+OnFri0800:
+OnSat1200:
+OnSun1600:
+OnMon2000:
+ restoreshopitem LeatherShirt, 15000, 1;
+ restoreshopitem LeatherShield, 5000, 1;
+ restoreshopitem ShortBow, 11200, 1;
+ restoreshopitem ArrowAmmoBox,rand(8,12);
+ restoreshopitem IronAmmoBox,rand(3,5);
+ end;
+
+}
diff --git a/npc/functions/mobpoint.txt b/npc/functions/mobpoint.txt
index 7e3a6e1f2..aa1e69436 100644
--- a/npc/functions/mobpoint.txt
+++ b/npc/functions/mobpoint.txt
@@ -48,12 +48,13 @@ OnPCKillEvent:
if (is_staff()) {
// First: Assume the killedrid is the actual Account ID
dispbottom l("ID: @@", killedrid);
- getexp readparam(BaseLevel, killedrid), 0;
.@killed$=strcharinfo(0,"error",killedrid);
dispbottom l("You murder @@ in cold blood.", .@killed$);
// Second: Assume the killedrid is actually the Char ID
.@killed$=strcharinfo(0,"error",charid2rid(killedrid));
dispbottom l("In case of false positive, @@ was murdered.", .@killed$);
+ // Third: this one may crash
+ getexp readparam(BaseLevel, killedrid), 0;
}
end;