Procházet zdrojové kódy

* Initial implementation of Malangdo Card Separation script.
* Added and documented 'delequip' command, used in new official scripts.
* Fixed issue in Guillotine Cross job quest where mobs did not properly reset (bugreport:7323).
* Minor cleaning of script_commands.txt.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@17168 54d463be-8e91-2dee-dedb-b68131a5f0ec

euphyy před 12 roky
rodič
revize
a76db97c37

+ 15 - 10
doc/script_commands.txt

@@ -4313,20 +4313,17 @@ the results array is limited to 10 items.
 *delitem <item id>,<amount>{,<account ID>};
 *delitem "<item name>",<amount>{,<account ID>};
 
-This command will take a specified amount of items from the invoking/target character. 
-As all the item commands, this one uses the ID of the item found inside 
-'db/(pre-)re/item_db.txt'. The items are destroyed - there is no way an NPC can simply 
-own items and have an inventory of them, other as by destroying and recreating 
-them when needed.
+This command will remove a specified amount of items from the invoking/target character. 
+Like all the item commands, it uses the item ID found inside 'db/(pre-)re/item_db.txt'.
 
-    delitem 502,10 // The person will lose 10 apples
-    delitem 617,1  // The person will lose 1 Old Violet Box
+    delitem 502,10; // The person will lose 10 apples
+    delitem 617,1;  // The person will lose 1 Old Violet Box
 
 It is always a good idea to check if the player actually has the items before you delete them.
 If you try to delete more items that the player has, the player will lose the ones he/she has 
-and the script will be terminated with an error.
+and the script will terminate with an error.
 
-Like 'getitem' this command will also accept an 'english name' field from the 
+Like 'getitem', this command will also accept an 'english name' field from the 
 database. If the name is not found, nothing will be deleted.
 
 ---------------------------------------
@@ -4334,7 +4331,7 @@ database. If the name is not found, nothing will be deleted.
 *delitem2 <item id>,<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,<account ID>};
 *delitem2 "<item name>",<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,<account ID>};
 
-This command will take a specified amount of items from the invoking/target character. 
+This command will remove a specified amount of items from the invoking/target character. 
 Check 'getitem2' to understand its expanded parameters.
 
 ---------------------------------------
@@ -4593,6 +4590,14 @@ them.
 
 ---------------------------------------
 
+*delequip <equipment slot>;
+
+This command will destroy whatever is currently equipped in the invoking
+character's specified equipment slot. For a full list of possible equipment 
+slots see 'getequipid'.
+
+---------------------------------------
+
 *clearitem;
 
 This command will destroy all items the invoking character has in their 

+ 6 - 9
npc/re/cities/malangdo.txt

@@ -152,11 +152,8 @@ lighthalzen,254,83,5	duplicate(Dolangmal)	Dolangmal#8	553
 mora,57,150,4	duplicate(Dolangmal)	Dolangmal#9	553
 
 //Pre-RE: izlude (182,192)
-izlude,182,218,4	script	Odgnalam#iz	554,{
-	if (strnpcinfo(4) == "izlude")
-		mes "Receiving the warm sun of Izlude, the cat is sleeping.";
-	else if (strnpcinfo(4) == "alberta")
-		mes "Receiving the warm sun of Alberta, the cat is sleeping.";
+izlude,182,218,4	script	Odgnalam#Izlude	554,{
+	mes "This cat is sleeping in the warm "+strnpcinfo(2)+" sun.";
 	next;
 	if(select("Let him sleep:Talk to him") == 1) close;
 	mes "[Odgnalam]";
@@ -179,9 +176,9 @@ izlude,182,218,4	script	Odgnalam#iz	554,{
 		mes "You are a hero of cat's fleet. Your activity is the legend between us.";
 		next;
 		mes "[Odgnalam]";
-		mes "As you are hero of fleet so let me send you to the heaven of the cat, ^A2314BMeow Meow Island^000000 for free.";
+		mes "As you are a hero of the cat fleet let me send you to ^A2314BMeow Meow Island^000000 for free.";
 		next;
-		if(select("Let's go Meow Meow Island!!:Do not go") == 1) {
+		if(select("Send me to Meow Meow Island!:Do not go.") == 1) {
 			mes "[Odgnalam]";
 			mes "Have a comfortable trip... Alright let's go~";
 			warp "malangdo",217,85;
@@ -191,7 +188,7 @@ izlude,182,218,4	script	Odgnalam#iz	554,{
 	mes "[Odgnalam]";
 	mes .@s1$;
 	next;
-	if(select("Let's go Meow Meow Island!!:Do not go") == 2) close;
+	if(select("Send me to Meow Meow Island!:Do not go.") == 2) close;
 	if (Zeny < .@price) {
 		mes "[Odgnalam]";
 		mes "Money? Where is the money? You can't go anywhere without the money. Shame on you.";
@@ -203,7 +200,7 @@ izlude,182,218,4	script	Odgnalam#iz	554,{
 	warp "malangdo",217,85;
 	close;
 }
-alberta,200,151,4	duplicate(Odgnalam#iz)	Odgnalam#albe	554
+alberta,200,151,4	duplicate(Odgnalam#Izlude)	Odgnalam#Alberta	554
 
 malangdo,219,86,4	script	Kong#malang	545,{
 	mes "[Kong]";

+ 72 - 71
npc/re/jobs/3-1/guillotine_cross.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= Muad_Dib
 //===== Current Version: ===================================== 
-//= 1.2
+//= 1.3
 //===== Compatible With: ===================================== 
 //= rAthena SVN r16945+
 //===== Description: ========================================= 
@@ -15,6 +15,7 @@
 //= 1.0b Moved warps to separate file. [Euphy]
 //= 1.1 Fixed some minor bugs. [Euphy]
 //= 1.2 Moved "Girl" NPC off ve_fild05. [Euphy]
+//= 1.3 Added missing OnMyMobDead labels. [Euphy]
 //============================================================
 
 que_job01,75,96,3	script	Guild Member#3rdgc01	997,{
@@ -3049,12 +3050,12 @@ OnTouch:
 	disablenpc "Front Gate Guard#g03";
 	disablenpc "Front Gate Guard#g04";
 	disablenpc "Front Gate Guard#g05";
-	monster "job3_guil03",93,37,"Guard Dog",1866,1;
-	monster "job3_guil03",93,36,"Front Gate Guard",1985,1;
-	monster "job3_guil03",93,35,"Front Gate Guard",1985,1;
-	monster "job3_guil03",93,34,"Front Gate Guard",1985,1;
-	monster "job3_guil03",93,33,"Front Gate Guard",1985,1;
-	monster "job3_guil03",93,32,"Guard Dog",1866,1;
+	monster "job3_guil03",93,37,"Guard Dog",1866,1,"Front Gate Guard#g01::OnMyMobDead";
+	monster "job3_guil03",93,36,"Front Gate Guard",1985,1,"Front Gate Guard#g01::OnMyMobDead";
+	monster "job3_guil03",93,35,"Front Gate Guard",1985,1,"Front Gate Guard#g01::OnMyMobDead";
+	monster "job3_guil03",93,34,"Front Gate Guard",1985,1,"Front Gate Guard#g01::OnMyMobDead";
+	monster "job3_guil03",93,33,"Front Gate Guard",1985,1,"Front Gate Guard#g01::OnMyMobDead";
+	monster "job3_guil03",93,32,"Guard Dog",1866,1,"Front Gate Guard#g01::OnMyMobDead";
 	end;
 }
 job3_guil03,93,36,3	duplicate(#3rdgc_guard00)	Front Gate Guard#g03	456
@@ -3078,12 +3079,12 @@ OnTouch:
 	disablenpc "Back Gate Guard#g03";
 	disablenpc "Back Gate Guard#g04";
 	disablenpc "Back Gate Guard#g05";
-	monster "job3_guil03",133,54,"Guard Dog",1866,1;
-	monster "job3_guil03",133,53,"Back Gate Guard",1985,1;
-	monster "job3_guil03",133,52,"Back Gate Guard",1985,1;
-	monster "job3_guil03",133,51,"Back Gate Guard",1985,1;
-	monster "job3_guil03",133,50,"Back Gate Guard",1985,1;
-	monster "job3_guil03",133,49,"Guard Dog",1866,1;
+	monster "job3_guil03",133,54,"Guard Dog",1866,1,"Back Gate Guard#g01::OnMyMobDead";
+	monster "job3_guil03",133,53,"Back Gate Guard",1985,1,"Back Gate Guard#g01::OnMyMobDead";
+	monster "job3_guil03",133,52,"Back Gate Guard",1985,1,"Back Gate Guard#g01::OnMyMobDead";
+	monster "job3_guil03",133,51,"Back Gate Guard",1985,1,"Back Gate Guard#g01::OnMyMobDead";
+	monster "job3_guil03",133,50,"Back Gate Guard",1985,1,"Back Gate Guard#g01::OnMyMobDead";
+	monster "job3_guil03",133,49,"Guard Dog",1866,1,"Back Gate Guard#g01::OnMyMobDead";
 	end;
 }
 job3_guil03,133,53,5	duplicate(#3rdgc_guard00)	Back Gate Guard#g03	456
@@ -3107,12 +3108,12 @@ OnTouch:
 	disablenpc "Interior Guard#g03";
 	disablenpc "Interior Guard#g04";
 	disablenpc "Interior Guard#g05";
-	monster "job3_guil03",117,53,"Guard Dog",1866,1;
-	monster "job3_guil03",117,52,"Interior Guard",1985,1;
-	monster "job3_guil03",117,51,"Interior Guard",1985,1;
-	monster "job3_guil03",117,50,"Interior Guard",1985,1;
-	monster "job3_guil03",117,49,"Interior Guard",1985,1;
-	monster "job3_guil03",117,48,"Guard Dog",1866,1;
+	monster "job3_guil03",117,53,"Guard Dog",1866,1,"Interior Guard#g01::OnMyMobDead";
+	monster "job3_guil03",117,52,"Interior Guard",1985,1,"Interior Guard#g01::OnMyMobDead";
+	monster "job3_guil03",117,51,"Interior Guard",1985,1,"Interior Guard#g01::OnMyMobDead";
+	monster "job3_guil03",117,50,"Interior Guard",1985,1,"Interior Guard#g01::OnMyMobDead";
+	monster "job3_guil03",117,49,"Interior Guard",1985,1,"Interior Guard#g01::OnMyMobDead";
+	monster "job3_guil03",117,48,"Guard Dog",1866,1,"Interior Guard#g01::OnMyMobDead";
 	end;
 }
 job3_guil03,117,52,4	duplicate(#3rdgc_guard00)	Interior Guard#g03	456
@@ -3134,9 +3135,9 @@ OnReset:
 OnTouch:
 	mapannounce "job3_guil03","Guards : Who are you?!",bc_map,"0xA8A8A8"; //FW_NORMAL 12 0 0
 	disablenpc "Exterior Guard#g01";
-	monster "job3_guil03",88,44,"Exterior Guard",1985,1;
-	monster "job3_guil03",88,43,"Exterior Guard",1985,1;
-	monster "job3_guil03",88,45,"Guard Dog",1866,1;
+	monster "job3_guil03",88,44,"Exterior Guard",1985,1,"Exterior Guard#g01::OnMyMobDead";
+	monster "job3_guil03",88,43,"Exterior Guard",1985,1,"Exterior Guard#g01::OnMyMobDead";
+	monster "job3_guil03",88,45,"Guard Dog",1866,1,"Exterior Guard#g01::OnMyMobDead";
 	end;
 }
 
@@ -3155,9 +3156,9 @@ OnReset:
 OnTouch:
 	mapannounce "job3_guil03","Guards : Enemy?!",bc_map,"0xA8A8A8"; //FW_NORMAL 12 0 0
 	disablenpc "Exterior Guard#g02";
-	monster "job3_guil03",88,55,"Exterior Guard",1985,1;
-	monster "job3_guil03",88,54,"Exterior Guard",1985,1;
-	monster "job3_guil03",88,56,"Guard Dog",1866,1;
+	monster "job3_guil03",88,55,"Exterior Guard",1985,1,"Exterior Guard#g02::OnMyMobDead";
+	monster "job3_guil03",88,54,"Exterior Guard",1985,1,"Exterior Guard#g02::OnMyMobDead";
+	monster "job3_guil03",88,56,"Guard Dog",1866,1,"Exterior Guard#g02::OnMyMobDead";
 	end;
 }
 
@@ -3176,9 +3177,9 @@ OnReset:
 OnTouch:
 	mapannounce "job3_guil03","Guards : An invader, remove!",bc_map,"0xA8A8A8"; //FW_NORMAL 12 0 0
 	disablenpc "Exterior Guard#g03";
-	monster "job3_guil03",88,64,"Exterior Guard",1985,1;
-	monster "job3_guil03",88,63,"Exterior Guard",1985,1;
-	monster "job3_guil03",88,65,"Guard Dog",1866,1;
+	monster "job3_guil03",88,64,"Exterior Guard",1985,1,"Exterior Guard#g03::OnMyMobDead";
+	monster "job3_guil03",88,63,"Exterior Guard",1985,1,"Exterior Guard#g03::OnMyMobDead";
+	monster "job3_guil03",88,65,"Guard Dog",1866,1,"Exterior Guard#g03::OnMyMobDead";
 	end;
 }
 
@@ -3197,9 +3198,9 @@ OnReset:
 OnTouch:
 	mapannounce "job3_guil03","Guards : Who are you?!",bc_map,"0xA8A8A8"; //FW_NORMAL 12 0 0
 	disablenpc "Exterior Guard#g04";
-	monster "job3_guil03",73,62,"Exterior Guard",1985,1;
-	monster "job3_guil03",73,61,"Exterior Guard",1985,1;
-	monster "job3_guil03",73,63,"Guard Dog",1866,1;
+	monster "job3_guil03",73,62,"Exterior Guard",1985,1,"Exterior Guard#g04::OnMyMobDead";
+	monster "job3_guil03",73,61,"Exterior Guard",1985,1,"Exterior Guard#g04::OnMyMobDead";
+	monster "job3_guil03",73,63,"Guard Dog",1866,1,"Exterior Guard#g04::OnMyMobDead";
 	end;
 }
 
@@ -3218,9 +3219,9 @@ OnReset:
 OnTouch:
 	mapannounce "job3_guil03","Guards : Who are you?!",bc_map,"0xA8A8A8"; //FW_NORMAL 12 0 0
 	disablenpc "Exterior Guard#g05";
-	monster "job3_guil03",77,51,"Exterior Guards",1985,1;
-	monster "job3_guil03",77,50,"Exterior Guards",1985,1;
-	monster "job3_guil03",77,49,"Guard Dog",1866,1;
+	monster "job3_guil03",77,51,"Exterior Guards",1985,1,"Exterior Guard#g05::OnMyMobDead";
+	monster "job3_guil03",77,50,"Exterior Guards",1985,1,"Exterior Guard#g05::OnMyMobDead";
+	monster "job3_guil03",77,49,"Guard Dog",1866,1,"Exterior Guard#g05::OnMyMobDead";
 	end;
 }
 
@@ -3239,9 +3240,9 @@ OnReset:
 OnTouch:
 	mapannounce "job3_guil03","Guard : Who are you?!",bc_map,"0xA8A8A8"; //FW_NORMAL 12 0 0
 	disablenpc "Exterior Guard#g06";
-	monster "job3_guil03",73,34,"Exterior Guards",1985,1;
-	monster "job3_guil03",73,33,"Exterior guards",1985,1;
-	monster "job3_guil03",73,32,"Guard Dog",1866,1;
+	monster "job3_guil03",73,34,"Exterior Guards",1985,1,"Exterior Guard#g06::OnMyMobDead";
+	monster "job3_guil03",73,33,"Exterior guards",1985,1,"Exterior Guard#g06::OnMyMobDead";
+	monster "job3_guil03",73,32,"Guard Dog",1866,1,"Exterior Guard#g06::OnMyMobDead";
 	end;
 }
 
@@ -3259,10 +3260,10 @@ OnReset:
 OnTouch:
 	mapannounce "job3_guil03","You have been detected by the guard dog.",bc_map,"0x00ff00"; //FW_NORMAL 12 0 0
 	disablenpc "Guard Dog#dog01";
-	monster "job3_guil03",110,27,"Guard Dog",1866,1;
-	monster "job3_guil03",103,27,"Dog Trainer",1985,1;
-	monster "job3_guil03",104,27,"Dog Trainer's Assistant",1985,1;
-	monster "job3_guil03",98,27,"Guard",1985,1;
+	monster "job3_guil03",110,27,"Guard Dog",1866,1,"Guard Dog#dog01::OnMyMobDead";
+	monster "job3_guil03",103,27,"Dog Trainer",1985,1,"Guard Dog#dog01::OnMyMobDead";
+	monster "job3_guil03",104,27,"Dog Trainer's Assistant",1985,1,"Guard Dog#dog01::OnMyMobDead";
+	monster "job3_guil03",98,27,"Guard",1985,1,"Guard Dog#dog01::OnMyMobDead";
 	end;
 }
 
@@ -3280,42 +3281,42 @@ OnReset:
 OnTouch:
 	mapannounce "job3_guil03","You have been detected by the guard dog.",bc_map,"0x00ff00"; //FW_NORMAL 12 0 0
 	disablenpc "Guard Dog#dog02";
-	monster "job3_guil03",124,27,"Guard Dog",1866,1;
-	monster "job3_guil03",126,27,"Dog Trainer",1985,1;
-	monster "job3_guil03",104,27,"Trainer's Assistant",1985,1;
-	monster "job3_guil03",131,27,"Guard",1985,1;
+	monster "job3_guil03",124,27,"Guard Dog",1866,1,"Guard Dog#dog02::OnMyMobDead";
+	monster "job3_guil03",126,27,"Dog Trainer",1985,1,"Guard Dog#dog02::OnMyMobDead";
+	monster "job3_guil03",104,27,"Trainer's Assistant",1985,1,"Guard Dog#dog02::OnMyMobDead";
+	monster "job3_guil03",131,27,"Guard",1985,1,"Guard Dog#dog02::OnMyMobDead";
 	end;
 }
 
 job3_guil03,2,1,0	script	#3rdgc_sunchal_nomal	844,{
 	end;
 OnEnable:
-	monster "job3_guil03",62,35,"Guard",1985,1;
-	monster "job3_guil03",108,78,"Guard",1985,1;
-	monster "job3_guil03",133,77,"Guard",1985,1;
-	monster "job3_guil03",79,69,"Guard",1985,1;
-	monster "job3_guil03",117,27,"Guard",1985,1;
-	monster "job3_guil03",62,48,"Guard",1985,1;
-	monster "job3_guil03",116,24,"Guard Dog",1866,1;
-	monster "job3_guil03",137,24,"Guard Dog",1866,1;
-	monster "job3_guil03",49,74,"Guard Dog",1866,1;
-	monster "job3_guil03",48,50,"Guard Dog",1866,1;
-	monster "job3_guil03",62,48,"Guard Dog",1866,1;
-	monster "job3_guil03",61,38,"Guard Dog",1866,1;
-	monster "job3_guil03",74,47,"Guard Dog",1866,1;
-	monster "job3_guil03",90,34,"Guard Dog",1866,1;
-	monster "job3_guil03",91,51,"Guard Dog",1866,1;
-	monster "job3_guil03",155,77,"Guard Dog",1866,1;
-	monster "job3_guil03",127,67,"Guard Dog",1866,1;
-	monster "job3_guil03",131,43,"Guard Dog",1866,1;
-	monster "job3_guil03",103,27,"Guard Dog",1866,1;
-	monster "job3_guil03",63,74,"Guard Dog",1866,1;
-	monster "job3_guil03",79,69,"Guard Dog",1866,1;
-	monster "job3_guil03",0,0,"Watch Light",1129,1;
-	monster "job3_guil03",0,0,"Watch Light",1129,1;
-	monster "job3_guil03",0,0,"Watch Light",1129,1;
-	monster "job3_guil03",0,0,"Watch Light",1129,1;
-	monster "job3_guil03",0,0,"Watch Light",1129,1;
+	monster "job3_guil03",62,35,"Guard",1985,1,"#3rdgc_sunchal_nomal::OnMyMobDead";
+	monster "job3_guil03",108,78,"Guard",1985,1,"#3rdgc_sunchal_nomal::OnMyMobDead";
+	monster "job3_guil03",133,77,"Guard",1985,1,"#3rdgc_sunchal_nomal::OnMyMobDead";
+	monster "job3_guil03",79,69,"Guard",1985,1,"#3rdgc_sunchal_nomal::OnMyMobDead";
+	monster "job3_guil03",117,27,"Guard",1985,1,"#3rdgc_sunchal_nomal::OnMyMobDead";
+	monster "job3_guil03",62,48,"Guard",1985,1,"#3rdgc_sunchal_nomal::OnMyMobDead";
+	monster "job3_guil03",116,24,"Guard Dog",1866,1,"#3rdgc_sunchal_nomal::OnMyMobDead";
+	monster "job3_guil03",137,24,"Guard Dog",1866,1,"#3rdgc_sunchal_nomal::OnMyMobDead";
+	monster "job3_guil03",49,74,"Guard Dog",1866,1,"#3rdgc_sunchal_nomal::OnMyMobDead";
+	monster "job3_guil03",48,50,"Guard Dog",1866,1,"#3rdgc_sunchal_nomal::OnMyMobDead";
+	monster "job3_guil03",62,48,"Guard Dog",1866,1,"#3rdgc_sunchal_nomal::OnMyMobDead";
+	monster "job3_guil03",61,38,"Guard Dog",1866,1,"#3rdgc_sunchal_nomal::OnMyMobDead";
+	monster "job3_guil03",74,47,"Guard Dog",1866,1,"#3rdgc_sunchal_nomal::OnMyMobDead";
+	monster "job3_guil03",90,34,"Guard Dog",1866,1,"#3rdgc_sunchal_nomal::OnMyMobDead";
+	monster "job3_guil03",91,51,"Guard Dog",1866,1,"#3rdgc_sunchal_nomal::OnMyMobDead";
+	monster "job3_guil03",155,77,"Guard Dog",1866,1,"#3rdgc_sunchal_nomal::OnMyMobDead";
+	monster "job3_guil03",127,67,"Guard Dog",1866,1,"#3rdgc_sunchal_nomal::OnMyMobDead";
+	monster "job3_guil03",131,43,"Guard Dog",1866,1,"#3rdgc_sunchal_nomal::OnMyMobDead";
+	monster "job3_guil03",103,27,"Guard Dog",1866,1,"#3rdgc_sunchal_nomal::OnMyMobDead";
+	monster "job3_guil03",63,74,"Guard Dog",1866,1,"#3rdgc_sunchal_nomal::OnMyMobDead";
+	monster "job3_guil03",79,69,"Guard Dog",1866,1,"#3rdgc_sunchal_nomal::OnMyMobDead";
+	monster "job3_guil03",0,0,"Watch Light",1129,1,"#3rdgc_sunchal_nomal::OnMyMobDead";
+	monster "job3_guil03",0,0,"Watch Light",1129,1,"#3rdgc_sunchal_nomal::OnMyMobDead";
+	monster "job3_guil03",0,0,"Watch Light",1129,1,"#3rdgc_sunchal_nomal::OnMyMobDead";
+	monster "job3_guil03",0,0,"Watch Light",1129,1,"#3rdgc_sunchal_nomal::OnMyMobDead";
+	monster "job3_guil03",0,0,"Watch Light",1129,1,"#3rdgc_sunchal_nomal::OnMyMobDead";
 	end;
 OnReset:
 	killmonster "job3_guil03","#3rdgc_sunchal_nomal::OnMyMobDead";

+ 279 - 0
npc/re/merchants/card_separation.txt

@@ -0,0 +1,279 @@
+//===== rAthena Script ======================================= 
+//= Card Separation System
+//===== By: ================================================== 
+//= Muad_Dib
+//===== Current Version: ===================================== 
+//= 1.0
+//===== Compatible With: ===================================== 
+//= rAthena SVN
+//===== Description: ========================================= 
+//= [Official Conversion]
+//= Separates cards from equipment.
+//===== Additional Comments: ================================= 
+//= 1.0 First Version. [Euphy]
+//============================================================ 
+
+malangdo,215,166,4	script	Jeremy#mal	553,{
+	disable_items;
+	if (checkweight(1201,1) == 0) {
+		mes "You have too many kinds of objects. Let's try to continue after reducing those objects.";
+		close;
+	}
+	if (MaxWeight - Weight < 10000) {
+		mes "Can't continue because you have too many heavy objects. Let's try to continue after reducing the weight.";
+		close;
+	}
+	mes "[Jeremy]";
+	mes "Long time no see~";
+	mes "I have learned a new skill that separates cards from Armor, Shoes, Garment and Headgear. Do you want to try it?";
+	next;
+	mes "[Jeremy]";
+	mes "Generally the fee is 1,000,000 Zeny. During the card separation, you can use ^990000special items that reduce the rate of destroying equipment or cards^000000. We don't charge additional zeny for this.";
+	next;
+	mes "[Jeremy]";
+	mes "There is a possibility of destroying them even using a special item. Also, ^ff0000the refine level might be lost^000000. Do you have any equipment to separate?";
+	next;
+
+	setarray .@equip_name$[0],  "Armor",  "Shoes",  "Garment", "Upper Hat";
+	setarray .@equip_slot[0], EQI_ARMOR,EQI_SHOES,EQI_GARMENT,EQI_HEAD_TOP;
+	for(set .@i,0; .@i<getarraysize(.@equip_slot); set .@i,.@i+1) {
+		if (getequipisequiped(.@equip_slot[.@i]))
+			set .@menu$, .@menu$+getequipname(.@equip_slot[.@i])+":";
+		else
+			set .@menu$, .@menu$+"^999999"+.@equip_name$[.@i]+" (empty)^000000:";
+	}
+
+	set .@i, select("Stop the work:How is it possible?:"+.@menu$);
+	switch(.@i) {
+	case 1:
+		mes "[Jeremy]";
+		mes "Whenever you need the work, visit me here.";
+		close;
+	case 2:
+		mes "[Jeremy]";
+		mes "You wonder what is so special. Well, I hate to give only a guide, so let me tell you the story...";
+		next;
+		mes "^000099Jeremy is stretching his shoulders and hands. He might be waiting for someone to talk with him.^000000";
+		next;
+		mes "[Jeremy]";
+		mes "Do you know that Malangdo's specialty is canned food?";
+		next;
+		select("I knew that well. Is it that limited?");
+		mes "[Jeremy]";
+		mes "Hehe... Everyone loves it. But there were some problems before.";
+		next;
+		select("Problems? Is there any faulty fish?");
+		mes "[Jeremy]";
+		mes "No, the fish does not have any problem. The problem is lots of fish oil produced after processing. That is such an industrial waste.";
+		next;
+		mes "[Jeremy]";
+		mes "However, after a revitalizing refining process, this fish oil became valuable to use for old equipment care and industrial lubricant.";
+		next;
+		mes "[Jeremy]";
+		mes "In addition, this oil is so useful to separate relics from equipped weapons that we can't buy Premium Lubricant and Ordinary Lubricant with Zeny.";
+		next;
+		mes "[Jeremy]";
+		mes "Well, don't worry about money. Surely the Premium Lubricant is expensive. If you pay some zeny, I can give you cheaper lubricant.";
+		next;
+		mes "[Jeremy]";
+		mes "I'm not sure about the quality of success. Anyway, this is so cheap, right?";
+		close;
+	default:
+		set .@equip_num, .@equip_slot[.@i-3];
+		if (!getequipisequiped(.@equip_num)) {
+			mes "[Jeremy]";
+			mes "In this part, there is nothing?";
+			close;
+		}
+		break;
+	}
+	setarray .@equip_card[0], getequipcardid(.@equip_num,0),getequipcardid(.@equip_num,1),getequipcardid(.@equip_num,2),getequipcardid(.@equip_num,3);
+	for(set .@i,0; .@i<4; set .@i,.@i+1) {
+		if (.@equip_card[.@i] >= 4700) // Armor Enchant System
+			set .@equip_card[.@i],0;
+	}
+	if (!getarraysize(.@equip_card)) {
+		mes "[Jeremy]";
+		mes "The card is not equipped. Do you want to check again?";
+		close;
+	}
+
+	// Detect MVP cards.
+	set .@mvp_list$,
+		"|4408|4128|4456|4168|4142"+  //Gloom_Under_Night_Card, Golden_Bug_Card, Nidhogg_Shadow_Card, Dark_Lord_Card, Doppelganger_Card
+		"|4134|4137|4386|4407|4357"+  //Dracula_Card, Drake_Card, Detale_Card, Randgris_Card, B_Seyren_Card
+		"|4146|4132|4147|4372|4145"+  //Maya_Card, Mistress_Card, Baphomet_Card, Bacsojin_Card, Berzebub_Card
+		"|4374|4352|4367|4236|4425"+  //Apocalips_H_Card, B_Ygnizem_Card, B_Shecil_Card, Amon_Ra_Card, Atroce_Card
+		"|4359|4123|4144|4135|4143"+  //B_Eremes_Card, Eddga_Card, Osiris_Card, Orc_Load_Card, Orc_Hero_Card
+		"|4263|4131|4430|4276|4419"+  //Incant_Samurai_Card, Moonlight_Flower_Card, Ifrit_Card, Lord_Of_Death_Card, Ktullanux_Card
+		"|4403|4399|4376|4441|4302"+  //Kiel_Card, Thanatos_Card, Lady_Tanee_Card, Fallen_Bishop_Card, Tao_Gunka_Card
+		"|4305|4148|4318|4121|4365"+  //Turtle_General_Card, Pharaoh_Card, Knight_Windstorm_Card, Phreeoni_Card, B_Katrinn_Card
+		"|4363|4324|4361|4330|4342|"; //B_Magaleta_Card, Garm_Card, B_Harword_Card, Dark_Snake_Lord_Card, Rsx_0806_Card
+	if ((.@equip_card[0] && compare(.@mvp_list$,"|"+.@equip_card[0]+"|")) ||
+	    (.@equip_card[1] && compare(.@mvp_list$,"|"+.@equip_card[1]+"|")) ||
+	    (.@equip_card[2] && compare(.@mvp_list$,"|"+.@equip_card[2]+"|")) ||
+	    (.@equip_card[3] && compare(.@mvp_list$,"|"+.@equip_card[3]+"|")))
+		set .@boss_chk,1;
+
+	if (.@boss_chk == 0) {
+		mes "[Jeremy]";
+		mes "Except cards, ^ff0000all enchanted effects will disappear.^000000 If you agree to this, please choose the work type:";
+		next;
+		set .@menu$,
+			"Next time...:"+
+			((Zeny >= 1000000)?"Use 1,000,000z (Do not use special item):":"^999999Use 1,000,000z (Insufficient)^000000:")+
+			((countitem(6441))?"Use Premium Lubricant:":"^999999Premium Lubricant (Insufficient)^000000:")+
+			((countitem(6440))?"Use Ordinary Lubricant":"^999999Ordinary Lubricant (Insufficient)^000000");
+		switch(select(.@menu$)) {
+		case 1:
+			mes "[Jeremy]";
+			mes "Whenever you need the work, visit me here.";
+			close;
+		case 2:
+			if (Zeny < 1000000) {
+				mes "[Jeremy]";
+				mes "You don't have enough zeny. Please come back with enough fees.";
+				close;
+			}
+			mes "[Jeremy]";
+			mes "This is pretty old equipment. There is a high rate of destroying the cards or equipment during the work. Are you sure you want to continue?";
+			next;
+			if(select("Next time...:Continue") == 1) {
+				mes "[Jeremy]";
+				mes "Whenever you need the work, visit me here.";
+				close;
+			}
+			set .@sf_c_num,150;
+			set .@sf_r_num,150;
+			set .@sf_w_num,150;
+			set Zeny, Zeny - 1000000;
+			break;
+		case 3:
+			if (countitem(6441) == 0) {
+				mes "[Jeremy]";
+				mes "You don't have Premium Lubricant.";
+				close;
+			}
+			mes "[Jeremy]";
+			mes "If you use the Premium Lubricant, the rate of destruction will be decreased highly, but I can't give you a 100% guarantee. Are you sure you want to continue?";
+			next;
+			if(select("Next time...:Continue") == 1) {
+				mes "[Jeremy]";
+				mes "Whenever you need the work, visit me here.";
+				close;
+			}
+			set .@sf_c_num,75;
+			set .@sf_r_num,75;
+			set .@sf_w_num,75;
+			delitem 6441,1; //High_RankLubricant
+			break;
+		case 4:
+			if (countitem(6440) == 0) {
+				mes "[Jeremy]";
+				mes "You don't have Ordinary Lubricant.";
+				close;
+			}
+			mes "[Jeremy]";
+			mes "If you use the Ordinary Lubricant, the rate of destruction will be decreased highly, but I can't give you a 100% guarantee. Are you sure you want to continue?";
+			next;
+			if(select("Next time...:Continue") == 1) {
+				mes "[Jeremy]";
+				mes "Whenever you need the work, visit me here.";
+				close;
+			}
+			set .@sf_c_num,75;
+			set .@sf_r_num,150;
+			set .@sf_w_num,150;
+			delitem 6440,1; //General_Lubricant
+			break;
+		}
+	} else if (.@boss_chk == 1) {
+		mes "[Jeremy]";
+		mes "This equipment contains a precious MVP card. This card can't be separated with lubricant. If you bring the super surfactant ^0000ffSillit Pong^000000, I will be able to work.";
+		next;
+		switch(select("Next time...:I have a Sillit Pong.")) {
+		case 1:
+			mes "[Jeremy]";
+			mes "Whenever you need the work, visit me here.";
+			close;
+		case 2:
+			if (countitem(6443) == 0) {
+				mes "[Jeremy]";
+				mes "You don't have Sillit Pong.";
+				close;
+			}
+			break;
+		}
+		mes "[Jeremy]";
+		mes "Except cards, ^ff0000all enchanted effects will disappear.^000000 If you agree to this, please choose the work type:";
+		next;
+		switch(select("Next time...:Alright, let's do it!")) {
+		case 1:
+			mes "[Jeremy]";
+			mes "Whenever you need the work, visit me here.";
+			close;
+		case 2:
+			set .@sf_c_num,60;
+			set .@sf_r_num,60;
+			set .@sf_w_num,60;
+			delitem 6443,1; //Sillit_Pong_Bottle
+			break;
+		}
+	}
+
+	set .@equip_id, getequipid(.@equip_num);
+	set .@equip_refine, getequiprefinerycnt(.@equip_num);
+	delequip .@equip_num;
+
+	// Chance of retaining refine level.
+	if (rand(1,.@sf_r_num) >= 61)
+		set .@equip_refine,0;
+
+	// Chance of retaining equipment.
+	if (rand(1,.@sf_w_num) < 61) {
+		set .@equip_safe,1;
+		getitem2 .@equip_id,1,1,.@equip_refine,0,0,0,0,0;
+	}
+
+	// Chance of retaining cards.
+	for(set .@i,0; .@i<4; set .@i,.@i+1) {
+		if (.@equip_card[.@i]) {
+			if (rand(1,.@sf_c_num) < 61)
+				getitem .@equip_card[.@i],1;
+			else
+				set .@card_break,1;
+		}
+	}
+
+	// Display corresponding effect.
+	if (!.@equip_safe && .@card_break)
+		specialeffect2 EF_LORD;
+	else if (.@equip_safe && .@card_break)
+		specialeffect2 EF_SUI_EXPLOSION;
+	else if (!.@equip_safe && !.@card_break)
+		specialeffect2 EF_FIREPILLAR;
+	else
+		specialeffect2 EF_MAXPOWER;
+
+	// Output results.
+	mes "-- Result of Card Separation --";
+	if (.@equip_safe) {
+		mes "Crack has not occured during the card separation process.";
+		mes "^0000FFEquipment separation is normal.^000000";
+	} else {
+		mes "Crack has occured during the card separation process.";
+		mes "Equipment has been damaged. ^ff0000Unrecoverable.^000000";
+	}
+	mes "-------------------";
+	if (!.@card_break) {
+		mes "Erosion of surface has not occured during the card separation process.";
+		mes "^0000ffCard separation has succeeded.^000000";
+	} else {
+		mes "Erosion of surface has occured during the card separation process.";
+		mes "Card has been damaged. ^ff0000Unrecoverable.^000000";
+	}
+	next;
+	mes "[Jeremy]";
+	mes "That is all for the results of the card separation. Please come again.";
+	close;
+}

+ 11 - 18
npc/re/merchants/enchan_mal.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= Muad_Dib
 //===== Current Version: ===================================== 
-//= 1.0
+//= 1.0a
 //===== Compatible With: ===================================== 
 //= rAthena SVN
 //===== Description: ========================================= 
@@ -12,6 +12,7 @@
 //= for Malangdo coins.
 //===== Additional Comments: ================================= 
 //= 1.0 First Version. [Euphy]
+//= 1.0a Added 'delequip' command. [Euphy]
 //============================================================ 
 
 malangdo,213,167,4	script	Mayomayo#mal	555,{
@@ -567,10 +568,10 @@ L_Socket:
 			mes "There is something wrong. Please try again.";
 			close;
 		}
-		     if (.@equip_card[3] == 0 && getarg(1) < 4) set .@target,3;
-		else if (.@equip_card[2] == 0 && getarg(1) < 3) set .@target,2;
-		else if (.@equip_card[1] == 0 && getarg(1) < 2) set .@target,1;
-		else if (.@equip_card[0] == 0 && getarg(1) < 1) set .@target,0;
+		     if (.@equip_card[3] == 0 && getarg(1) < 4) set .@equip_card[3],.@enchant;
+		else if (.@equip_card[2] == 0 && getarg(1) < 3) set .@equip_card[2],.@enchant;
+		else if (.@equip_card[1] == 0 && getarg(1) < 2) set .@equip_card[1],.@enchant;
+		else if (.@equip_card[0] == 0 && getarg(1) < 1) set .@equip_card[0],.@enchant;
 		else {
 			mes "[Mayomayo]";
 			mes "This equipment is at the end of enchant. I provide enchant for two times maximum.";
@@ -585,24 +586,18 @@ L_Socket:
 			mes "Oh my god!";
 			mes "This equipment is destroyed because it could not endure powerful ability. I'm so sorry.";
 			delitem .@coin[.@coin_select],.@total[.@coin_select];
-
-//			dropequipitem EQI_HAND_R
-			unequip EQI_HAND_R;
-			delitem2 .@equip_id,1,1,.@equip_refine,0,.@equip_card[0],.@equip_card[1],.@equip_card[2],.@equip_card[3];
+			delequip EQI_HAND_R;
 			close;
 		}
 		specialeffect2 EF_REPAIRWEAPON;
 		mes "[Mayomayo]";
 		mes "I have enchanted ^990000slot "+.@socket+"^000000 of this equipment.";
 		delitem .@coin[.@coin_select],.@total[.@coin_select];
-
-//		dropequipitem EQI_HAND_R
-		unequip EQI_HAND_R;
-		delitem2 .@equip_id,1,1,.@equip_refine,0,.@equip_card[0],.@equip_card[1],.@equip_card[2],.@equip_card[3];
+		delequip EQI_HAND_R;
 
 //		GetNonSlotItemSock2 .@equip_refine .@equip_id .@equip_card[0] .@equip_card[1] .@equip_card[2] .@equip_card[3]
-		set .@equip_card[.@target],.@enchant;
 		getitem2 .@equip_id,1,1,.@equip_refine,0,.@equip_card[0],.@equip_card[1],.@equip_card[2],.@equip_card[3];
+
 		close;
 	} else if (.@select == 2) {
 		mes "[Mayomayo]";
@@ -632,10 +627,7 @@ L_Socket:
 		mes "[Mayomayo]";
 		mes "Initialize the enchant effect from the equipment.";
 		delitem 6417,1; //Silvervine
-
-//		dropequipitem EQI_HAND_R
-		unequip EQI_HAND_R;
-		delitem2 .@equip_id,1,1,.@equip_refine,0,.@equip_card[0],.@equip_card[1],.@equip_card[2],.@equip_card[3];
+		delequip EQI_HAND_R;
 
 //		GetNonSlotItemSock2 .@equip_refine .@equip_id .@equip_card[0] .@equip_card[1] .@equip_card[2] .@equip_card[3]
 		for(set .@i,0; .@i<4; set .@i,.@i+1) {
@@ -643,6 +635,7 @@ L_Socket:
 				set .@equip_card[.@i],0;
 		}
 		getitem2 .@equip_id,1,1,.@equip_refine,0,.@equip_card[0],.@equip_card[1],.@equip_card[2],.@equip_card[3];
+
 		close;
 	}
 }

+ 1 - 0
npc/re/scripts_athena.conf

@@ -49,6 +49,7 @@ npc: npc/re/kafras/kafras.txt
 
 // -------------------------- Merchant --------------------------
 npc: npc/re/merchants/3rd_trader.txt
+npc: npc/re/merchants/card_separation.txt
 npc: npc/re/merchants/catalog.txt
 npc: npc/re/merchants/diamond.txt
 npc: npc/re/merchants/enchan_mal.txt

+ 24 - 0
src/map/script.c

@@ -7787,6 +7787,29 @@ BUILDIN_FUNC(downrefitem)
 	return 0;
 }
 
+/*==========================================
+ * Delete the item equipped at pos.
+ *------------------------------------------*/
+BUILDIN_FUNC(delequip)
+{
+	int i=-1,num;
+	TBL_PC *sd;
+
+	num = script_getnum(st,2);
+	sd = script_rid2sd(st);
+	if( sd == NULL )
+		return 0;
+
+	if (num > 0 && num <= ARRAYLENGTH(equip))
+		i=pc_checkequip(sd,equip[num-1]);
+	if(i >= 0) {
+		pc_unequipitem(sd,i,3); //recalculate bonus
+		pc_delitem(sd,i,1,0,2,LOG_TYPE_SCRIPT);
+	}
+
+	return 0;
+}
+
 /*==========================================
  *
  *------------------------------------------*/
@@ -17820,6 +17843,7 @@ struct script_function buildin_func[] = {
 	BUILDIN_DEF2(cleanmap,"cleanarea","siiii"),
 	BUILDIN_DEF(npcskill,"viii"),
 	BUILDIN_DEF(consumeitem,"v"),
+	BUILDIN_DEF(delequip,"i"),
 	/**
 	 * @commands (script based)
 	 **/