Jump to content

Bringer

Members
  • Posts

    748
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Bringer

  1. 1 hour ago, DevKira said:

    Hello, is there anyway how can i change mind breaker to passive? /thx/bawi

    skill_db.txt
    inf
    04 inf (0- passive, 1- enemy, 2- place, 4- self, 16- friend, 32- trap)

     

    402,9,6,0,0,0x1,0,5,1,no,0,0,0,none,0,0x0,        PF_MINDBREAKER,Mind Breaker

  2. @Cretino 

    v1.1 is Only  For Upper Headgear only  can i  request for Costume Upper/Mid/Lower

    Specific Menu

    • Costume Upper
    • Costume Middle
    • Costume Lower

     

    Different For gemstone for each slot

    • 3rd Slot / Resistance Amulet
    • 4th Slot / Skill Amulet

     

    Different Requirements for each slot

    • 3rd Slot
    • 4th Slot

     

  3. 10 hours ago, BFPkiller said:

    Can you tell us how to make it work ?

    we got this error to begin with

    unknown.png.9ac5ab4f03bed788154748360f00d72a.png

    diff --git a/conf/battle/battle.conf b/conf/battle/battle.conf
    index 593d4e92f4..30251a4834 100644
    --- a/conf/battle/battle.conf
    +++ b/conf/battle/battle.conf
    @@ -158,3 +158,9 @@ warg_can_falcon: no
     // Should the target be able of dodging damage by snapping away to the edge of the screen?
     // Official behavior is "no"
     snap_dodge: no
    +
    +// ****************************************
    +// Reserved Costume ID's
    +// ****************************************
    +// Reserved Char ID for costume converted items.
    +reserved_costume_id: 999998
    \ No newline at end of file
    diff --git a/doc/script_commands.txt b/doc/script_commands.txt
    index 70113c4145..d769b4364d 100644
    --- a/doc/script_commands.txt
    +++ b/doc/script_commands.txt
    @@ -9633,6 +9633,25 @@ solution rather than sending the map and the monster_id.
     
     ---------------------------------------
     
    +*costume <equipment position>;
    +
    +Converts equipment in <equipment position> to costume version that has no stats.
    +
    +Applicable positions are:
    + EQI_HEAD_TOP - Top Headgear
    + EQI_HEAD_MID - Middle Headgear
    + EQI_HEAD_LOW - Lower Headgear
    + EQI_GARMENT - Garment
    + 
    +---------------------------------------
    +
    +*getcostumeitem <item id>;
    +*getcostumeitem <"item name">;
    +
    +Spawn a costume version of an <item id> or <"item name"> in attached player's inventory.
    +
    +---------------------------------------
    +
     *hateffect(<Hat Effect ID>,<State>);
     
     This will set a Hat Effect onto the player. The state field allows you to
    diff --git a/src/map/atcommand.cpp b/src/map/atcommand.cpp
    index 43d6ad4d7d..e2897a48b5 100644
    --- a/src/map/atcommand.cpp
    +++ b/src/map/atcommand.cpp
    @@ -1218,7 +1218,7 @@ ACMD_FUNC(heal)
     ACMD_FUNC(item)
     {
     	char item_name[100];
    -	int number = 0, bound = BOUND_NONE;
    +	int number = 0, bound = BOUND_NONE, costume = 0;
     	char flag = 0;
     	struct item item_tmp;
     	struct item_data *item_data[10];
    @@ -1267,6 +1267,27 @@ ACMD_FUNC(item)
     
     	for(j--; j>=0; j--){ //produce items in list
     		unsigned short item_id = item_data[j]->nameid;
    +		if (!strcmpi(command + 1, "costumeitem"))
    +		{
    +			if (!battle_config.reserved_costume_id)
    +			{
    +				clif_displaymessage(fd, "Costume convertion is disable. Set a value for reserved_cosutme_id on your battle.conf file.");
    +				return -1;
    +			}
    +			if (!(item_data[j]->equip&EQP_HEAD_LOW) &&
    +				!(item_data[j]->equip&EQP_HEAD_MID) &&
    +				!(item_data[j]->equip&EQP_HEAD_TOP) &&
    +				!(item_data[j]->equip&EQP_COSTUME_HEAD_LOW) &&
    +				!(item_data[j]->equip&EQP_COSTUME_HEAD_MID) &&
    +				!(item_data[j]->equip&EQP_COSTUME_HEAD_TOP) &&
    +				!(item_data[j]->equip&EQP_GARMENT) &&
    +				!(item_data[j]->equip&EQP_COSTUME_GARMENT))
    +			{
    +				clif_displaymessage(fd, "You cannot costume this item. Costume only work for headgears.");
    +				return -1;
    +			}
    +			costume = 1;
    +		}
     		//Check if it's stackable.
     		if (!itemdb_isstackable2(item_data[j]))
     			get_count = 1;
    @@ -1277,6 +1298,11 @@ ACMD_FUNC(item)
     				memset(&item_tmp, 0, sizeof(item_tmp));
     				item_tmp.nameid = item_id;
     				item_tmp.identify = 1;
    +				if (costume == 1) { // Costume item
    +					item_tmp.card[0] = CARD0_CREATE;
    +					item_tmp.card[2] = GetWord(battle_config.reserved_costume_id, 0);
    +					item_tmp.card[3] = GetWord(battle_config.reserved_costume_id, 1);
    +				}
     				item_tmp.bound = bound;
     				if ((flag = pc_additem(sd, &item_tmp, get_count, LOG_TYPE_COMMAND)))
     					clif_additem(sd, 0, 0, flag);
    @@ -10282,6 +10308,7 @@ void atcommand_basecommands(void) {
     		ACMD_DEF(clonestat),
     		ACMD_DEF(bodystyle),
     		ACMD_DEF(adopt),
    +		ACMD_DEF2("costumeitem", item),
     		ACMD_DEF(agitstart3),
     		ACMD_DEF(agitend3),
     	};
    diff --git a/src/map/battle.cpp b/src/map/battle.cpp
    index 839cfb5620..d28c5f0182 100644
    --- a/src/map/battle.cpp
    +++ b/src/map/battle.cpp
    @@ -8482,6 +8482,7 @@ static const struct _battle_data {
     	{ "exp_cost_inspiration",               &battle_config.exp_cost_inspiration,            1,      0,      100,            },
     	{ "mvp_exp_reward_message",             &battle_config.mvp_exp_reward_message,          0,      0,      1,              },
     	{ "can_damage_skill",                   &battle_config.can_damage_skill,                1,      0,      BL_ALL,         },
    +	{ "reserved_costume_id",				&battle_config.reserved_costume_id,				999998,	0,		INT_MAX,		},
     	{ "atcommand_levelup_events",			&battle_config.atcommand_levelup_events,		0,		0,		1,				},
     	{ "block_account_in_same_party",		&battle_config.block_account_in_same_party,		1,		0,		1,				},
     	{ "tarotcard_equal_chance",             &battle_config.tarotcard_equal_chance,          0,      0,      1,              },
    diff --git a/src/map/battle.hpp b/src/map/battle.hpp
    index ad13f69d53..b8f36aaf00 100644
    --- a/src/map/battle.hpp
    +++ b/src/map/battle.hpp
    @@ -618,6 +618,7 @@ struct Battle_Config
     	int exp_cost_inspiration;
     	int mvp_exp_reward_message;
     	int can_damage_skill; //Which BL types can damage traps
    +	int reserved_costume_id;
     	int atcommand_levelup_events;
     	int block_account_in_same_party;
     	int tarotcard_equal_chance; //Official or equal chance for each card
    diff --git a/src/map/map.cpp b/src/map/map.cpp
    index 8b70459939..3b06cd032c 100644
    --- a/src/map/map.cpp
    +++ b/src/map/map.cpp
    @@ -1865,6 +1865,12 @@ void map_reqnickdb(struct map_session_data * sd, int charid)
     
     	nullpo_retv(sd);
     
    +	if (battle_config.reserved_costume_id && battle_config.reserved_costume_id == charid)
    +	{
    +		clif_solved_charname(sd->fd, charid, "Costume");
    +		return;
    +	}
    +
     	tsd = map_charid2sd(charid);
     	if( tsd )
     	{
    diff --git a/src/map/pc.cpp b/src/map/pc.cpp
    index c0126b1597..015381e857 100755
    --- a/src/map/pc.cpp
    +++ b/src/map/pc.cpp
    @@ -746,6 +746,7 @@ int pc_equippoint_sub(struct map_session_data *sd,struct item_data* id){
     				return EQP_SHADOW_ARMS;
     		}
     	}
    +
     	return ep;
     }
     
    @@ -757,7 +758,18 @@ int pc_equippoint_sub(struct map_session_data *sd,struct item_data* id){
     int pc_equippoint(struct map_session_data *sd,int n){
     	nullpo_ret(sd);
     
    -	return pc_equippoint_sub(sd,sd->inventory_data[n]);
    +	int ep = pc_equippoint_sub(sd, sd->inventory_data[n]);
    +
    +	if (battle_config.reserved_costume_id &&
    +		sd->inventory.u.items_inventory[n].card[0] == CARD0_CREATE &&
    +		MakeDWord(sd->inventory.u.items_inventory[n].card[2], sd->inventory.u.items_inventory[n].card[3]) == battle_config.reserved_costume_id)
    +	{ // Costume Item - Converted
    +		if (ep&EQP_HEAD_TOP) { ep &= ~EQP_HEAD_TOP; ep |= EQP_COSTUME_HEAD_TOP; }
    +		if (ep&EQP_HEAD_LOW) { ep &= ~EQP_HEAD_LOW; ep |= EQP_COSTUME_HEAD_LOW; }
    +		if (ep&EQP_HEAD_MID) { ep &= ~EQP_HEAD_MID; ep |= EQP_COSTUME_HEAD_MID; }
    +		if (ep&EQP_GARMENT) { ep &= ~EQP_GARMENT; ep |= EQP_COSTUME_GARMENT; }
    +	}
    +	return ep;
     }
     
     /**
    diff --git a/src/map/script.cpp b/src/map/script.cpp
    index 0b2386c32d..70127734b0 100644
    --- a/src/map/script.cpp
    +++ b/src/map/script.cpp
    @@ -22601,6 +22601,114 @@ BUILDIN_FUNC(getexp2) {
     	return SCRIPT_CMD_SUCCESS;
     }
     
    +/*==========================================
    +* Costume Items
    +*------------------------------------------*/
    +BUILDIN_FUNC(costume)
    +{
    +	int i = -1, num, ep;
    +	TBL_PC *sd;
    +
    +	num = script_getnum(st, 2); // Equip Slot
    +
    +	if (!script_rid2sd(sd))
    +		return SCRIPT_CMD_FAILURE;
    +
    +	if (equip_index_check(num))
    +		i = pc_checkequip(sd, equip_bitmask[num]);
    +	if (i < 0)
    +		return SCRIPT_CMD_FAILURE;
    +
    +	ep = sd->inventory.u.items_inventory[i].equip;
    +	if (!(ep&EQP_HEAD_LOW) && !(ep&EQP_HEAD_MID) && !(ep&EQP_HEAD_TOP) && !(ep&EQP_GARMENT)) {
    +		ShowError("buildin_costume: Attempted to convert non-cosmetic item to costume.");
    +		return SCRIPT_CMD_FAILURE;
    +	}
    +	log_pick_pc(sd, LOG_TYPE_SCRIPT, -1, &sd->inventory.u.items_inventory[i]);
    +	pc_unequipitem(sd, i, 2);
    +	clif_delitem(sd, i, 1, 3);
    +	// --------------------------------------------------------------------
    +	sd->inventory.u.items_inventory[i].refine = 0;
    +	sd->inventory.u.items_inventory[i].attribute = 0;
    +	sd->inventory.u.items_inventory[i].card[0] = CARD0_CREATE;
    +	sd->inventory.u.items_inventory[i].card[1] = 0;
    +	sd->inventory.u.items_inventory[i].card[2] = GetWord(battle_config.reserved_costume_id, 0);
    +	sd->inventory.u.items_inventory[i].card[3] = GetWord(battle_config.reserved_costume_id, 1);
    +
    +	if (ep&EQP_HEAD_TOP) { ep &= ~EQP_HEAD_TOP; ep |= EQP_COSTUME_HEAD_TOP; }
    +	if (ep&EQP_HEAD_LOW) { ep &= ~EQP_HEAD_LOW; ep |= EQP_COSTUME_HEAD_LOW; }
    +	if (ep&EQP_HEAD_MID) { ep &= ~EQP_HEAD_MID; ep |= EQP_COSTUME_HEAD_MID; }
    +	if (ep&EQP_GARMENT) { ep &= EQP_GARMENT; ep |= EQP_COSTUME_GARMENT; }
    +	// --------------------------------------------------------------------
    +	log_pick_pc(sd, LOG_TYPE_SCRIPT, 1, &sd->inventory.u.items_inventory[i]);
    +
    +	clif_additem(sd, i, 1, 0);
    +	pc_equipitem(sd, i, ep);
    +	clif_misceffect(&sd->bl, 3);
    +
    +	return SCRIPT_CMD_SUCCESS;
    +}
    +
    +/*===============================
    + * getcostumeitem <item id>;
    + * getcostumeitem <"item name">;
    + *===============================*/
    +BUILDIN_FUNC(getcostumeitem)
    +{
    +	unsigned short nameid;
    +	struct item item_tmp;
    +	TBL_PC *sd;
    +	struct script_data *data;
    +
    +	if (!script_rid2sd(sd))
    +	{	// No player attached.
    +		script_pushint(st, 0);
    +		return SCRIPT_CMD_SUCCESS;
    +	}
    +
    +	data = script_getdata(st, 2);
    +	get_val(st, data);
    +	if (data_isstring(data)) {
    +		int ep;
    +		const char *name = conv_str(st, data);
    +		struct item_data *item_data = itemdb_searchname(name);
    +		if (item_data == NULL)
    +		{	//Failed
    +			script_pushint(st, 0);
    +			return SCRIPT_CMD_SUCCESS;
    +		}
    +		ep = item_data->equip;
    +		if (!(ep&EQP_HEAD_LOW) && !(ep&EQP_HEAD_MID) && !(ep&EQP_HEAD_TOP) && !(ep&EQP_GARMENT)){
    +			ShowError("buildin_getcostumeitem: Attempted to convert non-cosmetic item to costume.");
    +			return SCRIPT_CMD_FAILURE;
    +		}
    +		nameid = item_data->nameid;
    +	}
    +	else
    +		nameid = conv_num(st, data);
    +
    +	if (!itemdb_exists(nameid))
    +	{	// Item does not exist.
    +		script_pushint(st, 0);
    +		return SCRIPT_CMD_SUCCESS;
    +	}
    +
    +	memset(&item_tmp, 0, sizeof(item_tmp));
    +	item_tmp.nameid = nameid;
    +	item_tmp.amount = 1;
    +	item_tmp.identify = 1;
    +	item_tmp.card[0] = CARD0_CREATE;
    +	item_tmp.card[2] = GetWord(battle_config.reserved_costume_id, 0);
    +	item_tmp.card[3] = GetWord(battle_config.reserved_costume_id, 1);
    +	if (pc_additem(sd, &item_tmp, 1, LOG_TYPE_SCRIPT)) {
    +		script_pushint(st, 0);
    +		return SCRIPT_CMD_SUCCESS;	//Failed to add item, we will not drop if they don't fit
    +	}
    +
    +	script_pushint(st, 1);
    +	return SCRIPT_CMD_SUCCESS;
    +}
    +
     /**
     * Force stat recalculation of sd
     * recalculatestat;
    @@ -24343,6 +24451,8 @@ struct script_function buildin_func[] = {
     	BUILDIN_DEF(getguildalliance,"ii"),
     	BUILDIN_DEF(adopt,"vv"),
     	BUILDIN_DEF(getexp2,"ii?"),
    +	BUILDIN_DEF(costume, "i"),
    +	BUILDIN_DEF(getcostumeitem, "v"),
     	BUILDIN_DEF(recalculatestat,""),
     	BUILDIN_DEF(hateffect,"ii"),
     	BUILDIN_DEF(getrandomoptinfo, "i"),
    diff --git a/src/map/status.cpp b/src/map/status.cpp
    index af4c3afb00..a296f7b89e 100644
    --- a/src/map/status.cpp
    +++ b/src/map/status.cpp
    @@ -3492,6 +3492,8 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt)
     			continue;
     		if (!sd->inventory_data[index])
     			continue;
    +		if (sd->inventory.u.items_inventory[current_equip_item_index].card[0] == CARD0_CREATE && MakeDWord(sd->inventory.u.items_inventory[current_equip_item_index].card[2], sd->inventory.u.items_inventory[current_equip_item_index].card[3]) == battle_config.reserved_costume_id)
    +			continue;
     
     		base_status->def += sd->inventory_data[index]->def;
     

    try this

  4. 55 minutes ago, itsmeyoe said:

    First Level (1/4) - 3 Acolytes Second

    Level (2/4) - 3 High Priests

    Third Level (3/4) - 3 Sniper Fourth

    Level (4/4) - 3 Lord Knights

    	case AM_CANNIBALIZE:
    		{
    			int summons[5] = { MOBID_G_MANDRAGORA, MOBID_G_HYDRA, MOBID_G_FLORA, MOBID_G_PARASITE, MOBID_G_GEOGRAPHER };
    			int class_ = skill_id==AM_SPHEREMINE?MOBID_MARINE_SPHERE:summons[skill_lv-1];
    			enum mob_ai ai = (skill_id == AM_SPHEREMINE) ? AI_SPHERE : AI_FLORA;
    			struct mob_data *md;
    
    			// Correct info, don't change any of this! [celest]
    			md = mob_once_spawn_sub(src, src->m, x, y, status_get_name(src), class_, "", SZ_SMALL, ai);
    			if (md) {
    				md->master_id = src->id;
    				md->special_state.ai = ai;
    				if( md->deletetimer != INVALID_TIMER )
    					delete_timer(md->deletetimer, mob_timer_delete);
    				md->deletetimer = add_timer (gettick() + skill_get_time(skill_id,skill_lv), mob_timer_delete, md->bl.id, 0);
    				mob_spawn (md); //Now it is ready for spawning.
    			}
    		}
    		break;

    Just Find all AM_CANNIBALIZE Duplicate it and change the ID # of summon

  5. //===== eAthena Script ======================================= 
    //= Refining NPCs
    //===== By: ==================================================
    //= Syrus22 (1.1) dafide18 (1.4) Skotlex (1.5), Kenedos (4.0)
    //===== Current Version: =====================================
    //= 4.0
    //===== Compatible With: =====================================
    //= Any Athena Version
    //===== Description: =========================================
    //= Refining NPCs and Metal Salesmen.
    //===== Additional Comments: =================================
    //= 1.0 - by A bunch of people!
    //=       Syrus22 - Completely redid the script using functions... also
    //=       added the option for auto safe refining and multiple refining.
    //= 1.1 - Negative input bug fixed [Lupus]
    //= 1.2 - Added additional reparimen in morroc and payon. Added
    //=       Christopher the blacksmith in Geffen. Edited some dialogue [kobra_k88]
    //= 1.3 - New Payon Locations [Darkchild]
    //=       Corrected zeny subtraction thx to jpnmania77.[kobra_k88]
    //= 1.3a - Temporary corrected an exploit. Need to check sources
    //=        to fully fix bug [Shinigami]
    //=        Fixed repairman prices [shadowlady]
    //=        Fixed bug that skips requirements thanks to sir_loon [massdriller]
    //=        Fixed itemid error thanks to -Vitamin- [massdriller]
    //= 1.4 - check again item in refining procedure to avoid
    //=        hacker that can change item [dafide18]
    //= 1.5 - Fixed crashing due to badly used callfunc's [Skotlex]
    //        Lupus, don't rollback this important fix again! >.<
    //= 1.5a - Corrected an unneeded callfunc, fixed the anti-bot 
    //=       exploit ruining the safe refine loop. [Skotlex]
    //= 1.5b - Fixed Spelling mistakes. [Nexon] 
    //= 1.6	- Replaced all breaks for ends as per the new script engine [Skotlex]
    //= 1.7 - Added Einbroch Refiners (Custom names ^^;) and a duplicated BS Shop. [Poki#3]
    //= 1.8 - Added Lighthalzen Refiners (Custom names again ^^;) [Poki#3]
    //= 1.8a - Fixed wrong indication thanks to NeoSaro [Lupus]
    //= 1.9 - Rewrote repairman, removed the Steel from repair cost [DracoRPG]
    //= 2.0 - Fixed missed equppment presence check. Thx2 Coltaro [Lupus]
    //= 2.0a - Added weight checks thanks to Neouni [Playtester]
    //= 2.0b - Fixed the names of Lighthalzen and Einbroch refiners thanks to Maud_Dib [Kargha]
    //= 2.1 - Removed Duplicates [Silent]
    //= 2.2 - Changed name from "Emvertacon" to "Emveretarcon". [Samuray22]
    //	- Thanks to Barron-Monster.
    //= 2.2b - Changed name from "Pharacon" to "Phracon". [Samuray22]
    //	- Thanks to Barron-Monster.
    //= 2.3 Corrected NPC names to fall within proper restrictions. [L0ne_W0lf]
    //= 2.4 Updated Refiner function. cleaner, and less dated. [L0ne_w0lf]
    //= 2.5 Rather large update to the refiner and merchants. :D [L0ne_W0lf]
    //= 2.6 Fixed a few bugs with creating pure stones. [L0ne_W0lf]
    //= 2.7 Refiner function accepts additional paramater. [L0ne_W0lf]
    //=     0 = No special features; 1 = new refining features
    //=     Updated Repairmen and function. No longer shows menu.
    //= 2.7a A couple touch-ups to the repairman function. [L0ne_w0lf]
    //= 2.8 Changed the nonexistent variable .@matname$ for getitemname(.@material). (bugreport:2340) [Samuray22]
    //= 2.8 Added proper Blacksmith Supplier to Einroch. [L0ne_W0lf]
    //=     Updated dated features comment to reflect new usage.
    //= 2.8a Small bugfix. (bugreport:2418) [Paradox924X]
    //= 2.9 Moved Morroc repairman to Morroc Ruins. [L0ne_W0lf]
    //= 4.0 Added the "Refine all Items in Inventory" function. [Kenedos]
    //= 4.0 Added the "Quick Refine" function. [Kenedos]
    //= 4.0 Fixed some other messages, and overall functions. [Kenedos]
    //============================================================
    
    
    //=========================================================
    // Christopher: Geffen Blacksmith
    //=========================================================
    geffen_in,110,172,0	script	Christopher#1	63,{
    	mes "[Christopher Guillenrow]";
    	mes "Welcome to Christopher's Workshop. Ye can get all yer stuff for forging here. What business";
    	mes "brings ye to me?";
    	next;
    	switch(select("Purchase Anvil:Purchase Forging Item:Purchase Metal:Purify Rough Ores:Cancel")) {
    	case 1:
    		mes "[Christopher Guillenrow]";
    		mes "A better Anvil gives ye a greeeater chance to make better weapons, ye know? But they'll cost ye more zeny. Just get it off yer chest and buy what fits your purposes best, laddy.";
    		next;
    		switch(select("Anvil - 30,000 zeny:Oridecon Anvil - 120,000 zeny:Golden Anvil - 300,000 zeny:Better Anvil than the others.:Cancel.")) {
    		case 1:
    			if (Zeny < 30000) {
    				mes "[Christopher Guillenrow]";
    				mes "I don't think I can let ye have this with the zeny ye have. I can't lose me money because of ye.";
    				close;
    			}
    			getitem 986,1; // Anvil
    			set Zeny,Zeny-30000;
    			mes "[Christopher Guillenrow]";
    			mes "This is the cheapest one, but efficient enough to forge most items. Thank ye fer shopping at me workshop.  Feel free to come anytime, whenever ye need.";
    			close;
    		case 2:
    			if (Zeny < 120000) {
    				mes "[Christopher Guillenrow]";
    				mes "I don't think I can let ye have this with the zeny ye have. I can't lose me money because of ye.";
    				close;
    			}
    			getitem 987,1; // Oridecon_Anvil
    			set Zeny,Zeny-120000;
    			mes "[Christopher Guillenrow]";
    			mes "Aye, friend ye have an eye for the anvil. This must be the proper anvil for a Blacksmith, eh? Thank ye fer shopping at me workshop.  Feel free to come anytime, whenever ye need.";
    			close;
    		case 3:
    			if (Zeny < 300000) {
    				mes "[Christopher Guillenrow]";
    				mes "I don't think I can let ye have this with the zeny ye have. I can't lose me money because of ye.";
    				close;
    			}
    			getitem 988,1; // Golden_Anvil
    			set Zeny,Zeny-300000;
    			mes "[Christopher Guillenrow]";
    			mes "This one is the best among all me stuffs in me workshop! With this, ye can rule the Blacksmith world! Thank ye fer shopping at me workshop.  Feel free to come anytime, whenever ye need.";
    			close;
    		case 4:
    			mes "[Christopher Guillenrow]";
    			mes "Well, sorry. But I don't have anythin' harder' than the Golden Anvil.";
    			next;
    			mes "[Christopher Guillenrow]";
    			mes "Me thinks 'Ringgel,' the Legendary Anvil Maker would have one. But, I don't think ye can find him, though he be somewhere in this world.";
    			close;
    		case 5:
    			mes "[Christopher Guillenrow]";
    			mes "Okay, feel free to come anytime, whenever ye need. Fare ye well.";
    			close;
    		}
    	case 2:
    		mes "[Christopher Guillenrow]";
    		mes "A respectable blacksmith uses fine tools. Ye can become one o'those with me Stuff. Choose anything ye want.";
    		next;
    		switch(select("Mini-Furnace - 150 zeny:Iron Hammer - 1000 zeny:Golden Hammer - 3000 zeny:Oridecon Hammer - 5000 zeny:Cancel.")) {
    		case 1:
    			mes "[Christopher Guillenrow]";
    			mes "It's a much needed tool fer refining metal! So, How many do ye wish to buy? If ye want to quit, just type the number '0.'";
    			next;
    			while(1) {
    				input .@input;
    				if (.@input == 0) {
    					mes "[Christopher Guillenrow]";
    					mes "Aye, the deal is canceled. Fare ye well.";
    					close;
    				}
    				else if ((.@input < 0) || (.@input > 500)) {
    					mes "[Christopher Guillenrow]";
    					mes "Ye can buy 500, er less.";
    					next;
    				}
    				else {
    					break;
    				}
    			}
    			set .@sell,.@input * 150;
    			if (Zeny < .@sell) {
    				mes "[Christopher Guillenrow]";
    				mes "I don't think I can let ye have this with the zeny ye have. I can't lose me money because of ye.";
    				close;
    			}
    			if (checkweight(612,.@input) == 0) {
    				mes "[Christopher Guillenrow]";
    				mes "Ye look like you don't got enough room in yer inventory. Put some stuff into your Kafra Storage, why don't ye?";
    				close;
    			}
    			getitem 612,.@input; // Portable_Furnace
    			set Zeny,Zeny-.@sell;
    			mes "[Christopher Guillenrow]";
    			mes "Thank ye fer shopping at me workshop. Feel free to come anytime, whenever ye need.";
    			close;
    		case 2:
    			if (Zeny < 1000) {
    				mes "[Christopher Guillenrow]";
    				mes "I don't think I can let ye have this with the zeny ye have. I can't lose me money because of ye.";
    				close;
    			}
    			getitem 613,1; // Iron_Hammer
    			set Zeny,Zeny-1000;
    			mes "[Christopher Guillenrow]";
    			mes "Thank ye fer shopping at me workshop. Feel free to come anytime, whenever ye need.";
    			close;
    		case 3:
    			if (Zeny < 3000) {
    				mes "[Christopher Guillenrow]";
    				mes "I don't think I can let ye have this with the zeny ye have. I can't lose me money because of ye.";
    				close;
    			}
    			getitem 614,1; // Golden_Hammer
    			set Zeny,Zeny-3000;
    			mes "[Christopher Guillenrow]";
    			mes "Thank ye fer shopping at me workshop. Feel free to come anytime, whenever ye need.";
    			close;
    		case 4:
    			if (Zeny < 5000) {
    				mes "[Christopher Guillenrow]";
    				mes "I don't think I can let ye have this with the zeny ye have. I can't lose me money because of ye.";
    				close;
    			}
    			getitem 615,1; // Oridecon_Hammer
    			set Zeny,Zeny-5000;
    			mes "[Christopher Guillenrow]";
    			mes "Thank ye fer shopping at me workshop. Feel free to come anytime, whenever ye need.";
    			close;
    		case 5:
    			mes "[Christopher Guillenrow]";
    			mes "Feel free to come anytime, whenever ye need. Fare ye well.";
    			close;
    		}
    	case 3:
    		mes "[Christopher Guillenrow]";
    		mes "I prepare every Metal, and only the high quality ones o'course. Now then, which one do ye need?";
    		next;
    		switch(select("Phracon - 200z.:Emveretarcon - 1000z.:Cancel.")) {
    		case 1:
    			mes "[Christopher Guillenrow]";
    			mes "So, How many do ye wish to buy? If ye dont want anything, just type the number as '0.'";
    			next;
    			while(1) {
    				input .@input;
    				if (.@input == 0) {
    					mes "[Christopher Guillenrow]";
    					mes "Deal has";
    					mes "been canceled.";
    					mes "Fare ye well.";
    					close;
    				}
    				else if ((.@input < 0) || (.@input > 500)) {
    					mes "[Christopher Guillenrow]";
    					mes "Ye can buy 500, er less.";
    					next;
    				}
    				else {
    					break;
    				}
    			}
    			set .@sell,.@input * 200;
    			if (Zeny < .@sell) {
    				mes "[Christopher Guillenrow]";
    				mes "Ye don't have enough money. Ye know I can't sell this at a lower price... You know how the wifey nags about Zeny.";
    				close;
    			}
    			if (checkweight(1010,.@input) == 0) {
    				mes "[Christopher Guillenrow]";
    				mes "Ye look like you don't have the room to carry anythin' new. Why don't ye put some things into Kafra Storage n' come back.";
    				close;
    			}
    			getitem 1010,.@input; // Phracon
    			set Zeny,Zeny-.@sell;
    			mes "[Christopher Guillenrow]";
    			mes "Thank ye fer shopping at me workshop. Feel free to come anytime, whenever ye need.";
    			close;
    		case 2:
    			mes "[Christopher Guillenrow]";
    			mes "So, how many do ye wish to buy? If ye dont want anything at all, just type the number as '0.'";
    			next;
    			while(1) {
    				input .@input;
    				if (.@input == 0) {
    					mes "[Christopher Guillenrow]";
    					mes "Deal has";
    					mes "been canceled.";
    					mes "Fare ye well.";
    					close;
    				}
    				else if ((.@input < 0) || (.@input > 500)) {
    					mes "[Christopher Guillenrow]";
    					mes "Ye can buy 500, er less.";
    					next;
    				}
    				else {
    					break;
    				}
    			}
    			set .@sell,.@input * 1000;
    			if (Zeny < .@sell) {
    				mes "[Christopher Guillenrow]";
    				mes "I don't think I can let ye have this with the zeny ye have. I can't lose me money because of ye.";
    				close;
    			}
    			if (checkweight(1011,.@input) == 0) {
    				mes "[Christopher Guillenrow]";
    				mes "Me friend... Seems to me ye don't have Inventory space. Why doncha put some things into Kafra Storage first?";
    				close;
    			}
    			getitem 1011,.@input; // Emveretarcon
    			set Zeny,Zeny-.@sell;
    			mes "[Christopher Guillenrow]";
    			mes "Thank ye fer shopping at me workshop. Feel free to come anytime, whenever ye need, whenever ye want.";
    			close;
    		case 3:
    			mes "[Christopher Guillenrow]";
    			mes "Feel free to come anytime, whenever ye need. Fare ye well.";
    			close;
    		}
    	case 4:
    		mes "[Christopher Guillenrow]";
    		mes "I can purify yer Oridecon and Elunium. I make a refined Ore out of 5 o'each rough ones. Well... Which one do ye want to make?";
    		next;
    		switch(select("Make Oridecon:Make Elunium:Cancel.")) {
    		case 1:
    			if (countitem(756) < 5) {
    				mes "[Christopher Guillenrow]";
    				mes "I told ye, I need 5 o'the rough Oridecons fer one Oridecon.";
    				close;
    			}
    			else {
    				delitem 756,5;  //Oridecon_Stone
    				getitem 984,1; // Oridecon
    				mes "[Christopher Guillenrow]";
    				mes "Here's an Oridecon fer ye. Ye will be always welcome here, I'll be waitin' for ye.";
    				close;
    			}
    		case 2:
    			if (countitem(757) < 5) {
    				mes "[Christopher Guillenrow]";
    				mes "I told ye, I need 5 rough Eluniums fer one Elunium.";
    				close;
    			}
    			else {
    				delitem 757,5;  //Elunium_Stone
    				getitem 985,1; // Elunium
    				mes "[Christopher Guillenrow]";
    				mes "Arrr, here's yer Elunium. Yer business is always welcome here, so feel free to come again.";
    				close;
    			}
    		case 3:
    			mes "[Christopher Guillenrow]";
    			mes "Feel free to come anytime, whenever ye need. Fare ye well.";
    			close;
    		}
    	case 5:
    		mes "[Christopher Guillenrow]";
    		mes "Feel free to come anytime, whenever ye need and whenever ye want. Fare ye well.";
    		close;
    	}
    }
    
    //=========================================================
    // Paul Spanner: Einbroch Blacksmith Supplier
    //=========================================================
    ein_in01,38,29,0	script	Paul Spanner	63,{
    	if (checkweight(1201,1) == 0) {
    		mes "- Wait a minute !! -";
    		mes "- Currently you're carrying -";
    		mes "- too many items with you. -";
    		mes "- Please try again -";
    		mes "- after you loose some weight. -";
    		close;
    	}
    	mes "[Paul Spanner]";
    	mes "Welcome, my friend.";
    	mes "In my shop, you will find everything that you need in forging.";
    	mes "Tell me what you need.";
    	next;
    	switch(select("Purchase Anvil.:Purchase Forging Items.:Purchase Metal.:Process Ores.:Quit.")) {
    	case 1:
    		mes "[Paul Spanner]";
    		mes "Anvil is the most necessary item for Blacksmiths.";
    		mes "Since you will use an Anvil more than once, you'd better buy a nice one.";
    		next;
    		switch(select("Anvil - 30,000z.:Oridecon Anvil - 120,000z.:Golden Anvil - 300,000z.:I need a better anvil.:Cancel.")) {
    		case 1:
    			if (zeny < 30000) {
    				mes "[Paul Spanner]";
    				mes "With that much of money, you cannot even buy a toy anvil!";
    				close;
    			}
    			getitem 986,1; //Anvil
    			set zeny,zeny-30000;
    			mes "[Paul Spanner]";
    			mes "It is the cheapest anvil which has the most basic ability.";
    			mes "Thank you for using my shop. If you need anything, just let me know.";
    			close;
    		case 2:
    			if (zeny < 120000) {
    				mes "[Paul Spanner]";
    				mes "With that much of money, you cannot even buy a toy anvil!";
    				close;
    			}
    			getitem 987,1; //Oridecon_Anvil
    			set zeny,zeny-120000;
    			mes "[Paul Spanner]";
    			mes "Ah, you have an eye for anvil. A Blacksmith needs an anvil at least as good as this.";
    			mes "Thank you for using my shop. If you need anything, just let me know.";
    			close;
    		case 3:
    			if (zeny < 300000) {
    				mes "[Paul Spanner]";
    				mes "With that much of money, you cannot even buy a toy anvil!";
    				close;
    			}
    			getitem 988,1; //Golden_Anvil
    			set zeny,zeny-300000;
    			mes "[Paul Spanner]";
    			mes "I can tell your ambition to become a good Blacksmith just by looking at you to choose this Golden Anvil!";
    			mes "This anvil will surely aid you in creating the best weapons.";
    			close;
    		case 4:
    			mes "[Paul Spanner]";
    			mes "I am sorry, but I do not sell better anvils than Golden Anvil.";
    			mes "Unless you find the legendary anvil of 'Linggell', I don't think that you could find better one than Golden Anvil in any other places.";
    			close;
    		case 5:
    			mes "[Paul Spanner]";
    			mes "If you need anything, just let me know.";
    			close;
    		}
    	case 2:
    		mes "[Paul Spanner]";
    		mes "You need various materials to process ores and to forge weapons.";
    		mes "I have everything that you need. Take a look.";
    		next;
    		switch(select("Mini Furnace - 150z.:Iron Hammer - 1,000z.:Golden Hammer - 3,000z.:Oridecon Hammer - 5,000z.:Cancel.")) {
    		case 1:
    			set .@item,612;
    			set .@item_cost,150;
    			set .@item_weight,200;
    			mes "[Paul Spanner]";
    			mes "You definately need this furnce to process ores!";
    			next;
    			break;
    		case 2:
    			set .@item,613;
    			set .@item_cost,1000;
    			set .@item_weight,200;
    			break;
    		case 3:
    			set .@item,614;
    			set .@item_cost,3000;
    			set .@item_weight,300;
    			break;
    		case 4:
    			set .@item,615;
    			set .@item_cost,5000;
    			set .@item_weight,400;
    			break;
    		case 5:
    			mes "[Paul Spanner]";
    			mes "If you need anything, just let me know.";
    			close;
    		}
    		mes "[Paul Spanner]";
    		mes "So, how many do you need? If you want to cancel the trade, enter '0'.";
    		next;
    		while(1) {
    			input .@input;
    			if (.@input == 0) {
    				mes "[Paul Spanner]";
    				mes "You have canceled the trade. If you need anything, just let me know.";
    				close;
    			}
    			else if ((.@input < 0) || (.@input > 500)) {
    				mes "[Paul Spanner]";
    				mes "You can only buy 500 or less at a time.";
    				next;
    			}
    			else {
    				break;
    			}
    		}
    		set .@sell,.@input * .@item_cost;
    		if (zeny < .@sell) {
    			mes "[Paul Spanner]";
    			mes "You don't have enough money. Sorry, I cannot sell them at a loss.";
    			close;
    		}
    		if (checkweight(.@item,.@input) == 0) {
    			mes "[Paul Spanner]";
    			mes "Hey, you look pale. Why don't you go lighten your weight first.";
    			close;
    		}
    		set zeny,zeny-.@sell;
    		getitem .@item,.@input;
    		mes "[Paul Spanner]";
    		mes "Thank you for using my shop. If you need anything, just let me know.";
    		close;
    	case 3:
    		mes "[Paul Spanner]";
    		mes "I have high quality metal.";
    		mes "So, which metal would you like to buy?";
    		next;
    		switch(select("Phracon - 200z.:Emveretarcon - 1,000z.:Quit.")) {
    		case 1:
    			set .@item,1010;
    			set .@item_price,200;
    			break;
    		case 2:
    			set .@item,1011;
    			set .@item_price,1000;
    			break;		
    		case 3:
    			mes "[Paul Spanner]";
    			mes "If you need anything, just let me know.";
    			close;
    		}
    		mes "[Paul Spanner]";
    		mes "So, how many of them do you need? If you want to cancel the trade, enter '0'.";
    		next;
    		while(1) {
    			input .@input;
    			if (.@input == 0) {
    				mes "[Paul Spanner]";
    				mes "The trade has been canceled. If you need anything, just let me know.";
    				close;
    			}
    			else if ((.@input < 0) || (.@input > 500)) {
    				mes "[Paul Spanner]";
    				mes "You can buy 500 or less at a time.";
    				next;
    			}
    			else {
    				break;
    			}
    		}
    		set .@sell,.@input * .@item_price;
    		if (zeny < .@sell) {
    			mes "[Paul Spanner]";
    			mes "You don't have enough money. Sorry, I cannot sell them at a loss.";
    			close;
    		}
    		if (checkweight(.@item,.@input) == 0) {
    			mes "[Paul Spanner]";
    			mes "Hey, you look pale. Why don't you go lighten your weight first?";
    			close;
    		}
    		getitem .@item,.@input;
    		set zeny,zeny-.@sell;
    		mes "[Paul Spanner]";
    		mes "Thank you for using my shop. If you need anything, just let me know.";
    		close;
    	case 4:
    		mes "[Paul Spanner]";
    		mes "I can process Oridecon and Elunium for you.";
    		mes "You need 5 ores to process them into one Oridecon or Elunium.";
    		mes "So, which one do you want to process?";
    		switch(select("Oridecon:Elunium:Quit.")) {
    		case 1:
    			if (countitem(756) < 5) {
    				mes "[Paul Spanner]";
    				mes "You need 5 ores to process them into one pure Oridecon.";
    				close;
    			}
    			else {
    				delitem 756,5; //Oridecon_Stone
    				getitem 984,1; //Oridecon
    				mes "[Paul Spanner]";
    				mes "There you go. Thank you for using my service.";
    				close;
    			}
    		case 2:
    			if (countitem(757) < 5) {
    				mes "[Paul Spanner]";
    				mes "You need 5 ores to process them into one pure Elunium.";
    				close;
    			}
    			else {
    				delitem 757,5; //Elunium_Stone
    				getitem 985,1; //Elunium
    				mes "[Paul Spanner]";
    				mes "There you go. Thank you for using my service.";
    				close;
    			}
    		case 3:
    			mes "[Paul Spanner]";
    			mes "If you need anything, just let me know.";
    			close;
    		}
    	case 5:
    		mes "[Paul Spanner]";
    		mes "If you need anything, just let me know.";
    		close;
    	}
    }
    
    //=====================================================================================
    // Weapon/Armor Refiners
    //=====================================================================================
    prt_in,63,60,4	script	Hollengrhen	85,{
    	callfunc "refinemain","Hollengrhen",1;
    	end;
    }
    morocc_in,73,38,4	script	Aragham	99,{
    	callfunc "refinemain","Aragham",1;
    	end;
    }
    payon,144,173,4	script	Antonio	88,{
    	callfunc "refinemain","Antonio",1;
    	end;
    }
    alberta_in,28,58,4	script	Fredrik	85,{
    	callfunc "refinemain","Fredrik",1;
    	end;
    }
    yuno_in01,164,26,6	script	Disturb	88,{
    	callfunc "refinemain","Disturb",1;
    	end;
    }
    ein_in01,24,87,6	script	Manthasman	826,{
    	callfunc "refinemain","Manthasman Pruhag",1;
    	end;
    }
    lhz_in02,282,20,7	script	Fulerr	869,{
    	callfunc "refinemain","Fulerr",1;
    	end;
    }
    
    //============================================================
    //= Main Refiner Function
    //============================================================
    //= To allow auto safe refining/multiple refining set the
    //= second argument to '1' in the function call.
    //============================================================
    function	script	refinemain	{
    	set .@features,getarg(1);
    	mes "[" + getarg(0) + "]";
    	mes "I'm the Armsmith.";
    	mes "I can refine all kinds of weapons, armor and equipment, so let me";
    	mes "know what you want me to refine.";
    	next;
    
    	setarray .@position$[1], "Head","Body","Left hand","Right hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3";
    	set .@menu$,"";
    	for( set .@i,1; .@i <= 10; set .@i,.@i+1 )
    	{
    		if( getequipisequiped(.@i) )
    			set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]";
    
    		set .@menu$, .@menu$ + ":";
    	}
    	if (!M_quickref)
    		set .@menu$, .@menu$ + "^0000FFTurn ^009933ON^0000FF Quick Refining^000000";
    	else
    		set .@menu$, .@menu$ + "^0000FFTurn ^FF0000OFF^0000FF Quick Refining^000000";
    	set .@part,select(.@menu$);
    	if (.@part == .@i ) {
    		mes "[" + getarg(0) + "]";
    		if (!M_quickref) {
    			mes "The ^0000FFQuick Refine^000000 Function has been Turned ^009933ON^000000";
    			set M_quickref, 1;
    		}
    		else {
    			mes "The ^0000FFQuick Refine^000000 Function has been Turned ^FF0000OFF^000000";
    			set M_quickref, 0;
    		}
    		close;
    	}
    	if(!getequipisequiped(.@part)) {
    		mes "[" + getarg(0) + "]";
    		mes "You're not wearing";
    		mes "anything there that";
    		mes "I can refine.";
    		emotion 6;
    		close;
    	}
    	//Check if the item is refinable...
    	if(!getequipisenableref(.@part)) {
    		mes "[" + getarg(0) + "]";
    		mes "I don't think I can";
    		mes "refine this item at all...";
    		close;
    	}
    	//Check if the item is identified... (Don't know why this is in here... but kept it anyway)
    	if(!getequipisidentify(.@part)) {
    		mes "[" + getarg(0) + "]";
    		mes "You can't refine this";
    		mes "if you haven't appraised";
    		mes "it first. Make sure your";
    		mes "stuff is identified before";
    		mes "I can refine it.";
    		close;
    	}
    	//Check to see if the items is already +10
    	if(getequiprefinerycnt(.@part) >= 10) {
    		mes "[" + getarg(0) + "]";
    		mes "I can't refine this";
    		mes "any more. This is as";
    		mes "refined as it gets!";
    		close;
    	}
    	set .@refineitemid, getequipid(.@part); // save id of the item
    	set .@refinerycnt, getequiprefinerycnt(.@part); //save refinery count
    	switch(getequipweaponlv(.@part)){
    	case 0: 	//Refine Armor
    		set .@price,2000;
    		set .@material,985;
    		set .@safe,5;
    		break;
    	case 1: 	//Refine Level 1 Weapon
    		set .@price,50;
    		set .@material,1010;
    		set .@safe,8; 
    		break;
    	case 2: 	//Refine Level 2 Weapon
    		set .@price,200;
    		set .@material,1011;
    		set .@safe,7; 
    		break;
    	case 3: 	//Refine Level 3 Weapon
    		set .@price,5000;
    		set .@material,984;
    		set .@safe,6; 
    		break;
    	case 4: 	//Refine Level 4 Weapon
    		set .@price,20000;
    		set .@material,984;
    		set .@safe,5; 
    		break;
    	case 5: 	//Refine other stuff?
    		set .@price,2000;
    		set .@material,985;
    		set .@safe,5; 
    		break;
    	}
    	if(.@features != 1) {
    		mes "[" + getarg(0) + "]";
    		mes "To refine this I need";
    		mes "one ^003366"+getitemname(.@material)+"^000000 and";
    		mes "a service fee of " + .@price + " Zeny.";
    		mes "Do you really wish to continue?";
    		next;
    		if(select("Yes:No") == 2){
    			mes "[" + getarg(0) + "]";
    			mes "Yeah...";
    			mes "There's no need to";
    			mes "rush. Take your time.";
    			close;
    		}
    		if(getequippercentrefinery(.@part) < 100) {
    			mes "[" + getarg(0) + "]";
    			mes "Oh no! If I continue to";
    			mes "refine this, there's a risk it could";
    			switch(.@material) {
    			case 985:
    				mes "be destroyed! That means that ^FF0000this equipment^000000, and ^FF0000any cards^000000 or special properties added to this armor, ^FF0000will be gone^000000.";
    				break;
    			default:
    				mes "be destroyed, and you'd ^FF0000lose the weapon^000000, any ^FF0000cards in the weapon^000000,";
    				mes "or any added special properties.";
    				break;
    			}
    			next;
    			mes "["+getarg(0)+"]";
    			mes "I can't make it any clearer.";
    			mes "Once a weapon is destroyed,";	
    			mes "there's no getting it back.";
    			mes "You really have a chance to";
    			mes "^FF0000lose this weapon^000000 forever.";
    			mes "Do you still want to refine?";
    			next;
    			if(select("Yes:No") == 2){
    				mes "[" + getarg(0) + "]";
    				mes "I completely agree...";
    				mes "I might be a great refiner, but sometimes even I make mistakes.";
    				close;
    			}
    		}
    		if((countitem(.@material) < 1) || (Zeny < .@price)) {
    			mes "[" + getarg(0) + "]";
    			mes "You don't seem to have";
    			mes "enough Zeny or "+getitemname(.@material)+"...";
    			mes "Go get some more. I'll be";
    			mes "here all day if you need me.";
    			close;
    		}
    		set Zeny,Zeny-.@price;
    		delitem .@material,1;
    		if(getequipisequiped(.@part) == 0) { // hacker has removed the item (not changed, why?)
    			mes "[" + getarg(0) + "]";
    			mes "Look here... you don't have any Items on...";
    			close;
    		}
    		if(getequiprefinerycnt(.@part) != .@refinerycnt || getequipid(.@part) != .@refineitemid) { // hacker has changed the item
    			next;
    			mes "[" + getarg(0) + "]";
    			mes "You changed your equipment!";
    			mes "You filthy scum!!!";
    			next;
    			atcommand "@nuke "+strcharinfo(0);
    			end;
    		}
    		if(getequippercentrefinery(.@part) <= rand(100)) {
    			failedrefitem .@part;
    			mes "[" + getarg(0) + "]";
    			set .@emo,rand(1,5);
    			if (.@emo == 1) {
    				Emotion e_cash;
    			} else {
    				Emotion e_swt;
    			}
    			set .@lose,rand(1,3);
    			if (.@lose == 1) {
    				mes "OH! MY GOD!";
    				mes "Damn it! Not again!";
    				mes "I'm terribly sorry, but you know practice does make perfect.";
    				mes "Um, right? Heh heh...";
    			} else if(.@lose == 2) {
    				mes "Nooooooo!";
    				mes "It broke!";
    				mes "I-I'm sorry!";
    			} else {
    				mes "Crap!";
    				mes "It couldn't take";
    				mes "much more tempering!";
    				mes "Sorry about this...";
    			}
    			close;
    		}
    		mes "["+getarg(0)+"]";
    		successrefitem .@part;
    		Emotion e_heh;
    		set .@win,rand(1,3);
    		if (.@win == 1) {
    			mes "Perfect!";
    			mes "Heh heh!";
    			mes "Once again,";
    			mes "flawless work";
    			mes "from the master~";
    		} else if(.@win == 2) {
    			mes "Success...!";
    			mes "Yet again, my amazing";
    			mes "talent truly dazzles";
    			mes "and shines today.";
    		} else {
    			mes "Heh heh!";
    			mes "I'm all done.";
    			mes "No doubt, my work is";
    			mes "to your satisfaction.";
    			mes "Sheer, utter perfection~";
    		}
    		close;
    	}
    
    // New Refining Functions ========================
    	if(getequiprefinerycnt(.@part) < .@safe) {
    		mes "[" + getarg(0) + "]";
    		mes "Alright, would you like to refine to safe limit, or pick a number of refines?";
    		next;
    		set .@menu2,select("Safe Limit:Choose Number:Nevermind");
    	}
    	else set .@menu2, 2;
    	switch(.@menu2){
    	case 1: 
    		mes "["+strnpcinfo(1)+"]";
    		mes "Alright, I can do that for ALL ^0000FF"+getequipname(.@part)+"^000000 you have in your inventory, or just the one currently equipped.";
    		next;
    		if (select ("Currently Equipped:All Items in Inventory") == 2) set .@allinv, 1;
    		set .@refinecnt,.@safe - getequiprefinerycnt(.@part);
    		break;
    		
    	case 2:
    		next;
    		mes "[" + getarg(0) + "]";
    		mes "So how many times would you like me to refine your item?";
    		next;
    		input .@refinecnt;
    		set .@refinecheck,.@refinecnt + getequiprefinerycnt(.@part);
    		if (.@refinecnt < 1 || .@refinecheck > 10) {
    			mes "[" + getarg(0) + "]";
    			mes "I can't refine this item that many times.";
    			close;
    		}
    		mes "["+strnpcinfo(1)+"]";
    		mes "Alright, I can do it for only your currently equipped item, or ALL ^0000FF"+getequipname(.@part)+"^000000 you have in your inventory. What would you like to do?";
    		next;
    		if (select ("Currently Equipped:All Items in Inventory") == 2) set .@allinv, 1;
    		if (.@allinv)
    			set .@refinecnt, getequiprefinerycnt(.@part) + .@refinecnt;
    		if ( (!.@allinv) && (.@refinecheck < .@safe) )
    			break;
    		mes "[" + getarg(0) + "]";
    		if ( !.@allinv)
    			mes "This will try to refine the equipment " + (.@refinecheck - .@safe) + " times past the safe limit. Your equipment may be destroyed... is that ok?";
    		else
    			mes "Remember this will attempt to refine to ^009933+"+.@refinecnt+"^000000 ^FF0000ALL^000000 the ^0000FF"+getequipname(.@part)+"^000000 items you have in your inventory!!";
    		next;
    		if(select("Accept","Reject") == 2){
    			mes "[" + getarg(0) + "]";
    			mes "Smart kid....";
    			close;
    		}
    		break;
    		
    	case 3:
    		next;
    		mes "[" + getarg(0) + "]";
    		mes "You said so..Hmm so be it...";
    		close;
    		
    	}
    	if (.@allinv) {
    		deletearray @inventorylist_refine;
    		deletearray @inventorylist_id;
    		getinventorylist;
    		set .@i, 0;
    		for (set .@j, 0; .@j < @inventorylist_count; set .@j, .@j + 1) {
    			if ( @inventorylist_id[.@j] == getequipid(.@part) ) {
    				set .@temp[.@i], @inventorylist_refine[.@j];
    				set .@i, .@i + 1;
    			}
    		}
    		deletearray @inventorylist_refine;
    		deletearray @inventorylist_id;
    	}
    	set .@fullprice, 0;
    	if ( !.@allinv )
    		set .@fullprice,.@price * .@refinecnt;
    	else {
    		set .@j, 0;
    		for ( set .@k, 0; .@k < .@i ; set .@k, .@k + 1) {
    			if ( .@temp[.@k] < .@refinecnt ) {
    				set .@fullprice, .@fullprice + ( ( .@refinecnt - .@temp[.@k] ) * .@price );
    				set .@j, .@j + (.@refinecnt - .@temp[.@k]);
    			}
    		}
    		deletearray .@temp;
    	}
    	mes "[" + getarg(0) + "]";
    	if ( !.@allinv )
    		mes "That will cost you " + .@refinecnt + " " + getitemname(.@material) + " and " + .@fullprice + " Zeny. Is that ok?";
    	else
    		mes "That will cost you " + .@j + " " + getitemname(.@material) + " and " + .@fullprice + " Zeny. Is that ok?";
    	next;
    	if(select("Yes","No...") == 2){
    		mes "[" + getarg(0) + "]";
    		mes "You said so..Hmm so be it...";
    		close;
    	}
    		
    	if ( !.@allinv ) {
    		if(countitem(.@material) < .@refinecnt || Zeny < .@fullprice) {
    			mes "[" + getarg(0) + "]";
    			mes "Is that all you got? Unfortunately I can't work for you at a lower price. Try putting yourself in my shoes.";
    			close;
    		}
    		set Zeny,Zeny - .@fullprice;
    		delitem .@material,.@refinecnt;
    		while(.@refinecnt){
    			if (getequipisequiped(.@part) == 0) {
    				mes "[" + getarg(0) + "]";
    				mes "Look here... you don't have any Items on...";
    				close;
    			}
    			if (getequipid(.@part) != .@refineitemid || (.@menu2 == 1 && getequippercentrefinery(.@part) < 100)) {
    				next;
    				mes "[" + getarg(0) + "]";
    				mes "You changed your equipment!";
    				mes "You filthy scum!!!";
    				next;
    				atcommand "@nuke "+strcharinfo(0);
    				end;
    			}
    			mes "Clang, clang!!!";
    			if(.@menu2 == 2 && getequippercentrefinery(.@part) <= rand(100)) {
    				failedrefitem .@part;
    				emotion 23;
    				mes "[" + getarg(0) + "]";
    				mes "WAHHHH!!! I'm so sorry... I warned you this could happen...";
    				set .@refinecnt,.@refinecnt - 1;
    				if(.@refinecnt == 0) close;
    				mes "Here's the unused Zeny and Material back...";
    				getitem .@material,.@refinecnt;
    				set .@fullprice,.@refinecnt * .@price;
    				set Zeny,Zeny + .@fullprice;
    				close;
    			}
    			successrefitem .@part;
    			emotion 21;
    			set .@refinecnt,.@refinecnt - 1;
    			next;
    		}
    	}
    	else {
    	
    		if ( getbrokenid (.@refineitemid) ) {
    			mes "[" + getarg(0) + "]";
    			mes "Sorry but I can't work to refine an equipment if you have another of the same kind of item that's not repaired in your inventory.";
    			close;
    		}
    		if(countitem(.@material) < .@j || Zeny < .@fullprice) {
    			mes "[" + getarg(0) + "]";
    			mes "Is that all you got? Unfortunately I can't work for you at a lower price. Try putting yourself in my shoes.";
    			close;
    		}
    		
    		set .@breakme, 0;
    		
    		while(1){
    		
    			for (set .@c, 0; .@c < .@re; set .@c, .@c + 1)
    				deletearray getd(".@equip_inf"+.@c);
    			
    			if ( getequipisequiped(.@part) == 0 ) {
    				equip .@refineitemid;
    				set .@re, 0;
    				while ( getequiprefinerycnt(.@part) >= .@refinecnt ) {
    					for (set .@c, 0; .@c < 4; set .@c, .@c + 1)
    						if (getequipcardid(.@part,.@c) != 0)
    							setd ".@equip_inf"+.@re+"[.@c]", getequipcardid(.@part,.@c);
    					setd ".@equip_inf"+.@re+"[4]", getequiprefinerycnt(.@part);
    					unequip .@part;
    					delitem2 .@refineitemid,1,1,getd(".@equip_inf"+.@re+"[4]"),0,getd(".@equip_inf"+.@re+"[0]"),
    					getd(".@equip_inf"+.@re+"[1]"),getd(".@equip_inf"+.@re+"[2]"),getd(".@equip_inf"+.@re+"[3]");
    					equip .@refineitemid;
    					set .@re, .@re + 1;
    				}
    				if (.@re) {
    					for (set .@c, 0; .@c < .@re; set .@c, .@c + 1) {
    						getitem2 .@refineitemid,1,1,getd(".@equip_inf"+.@c+"[4]"),0,getd(".@equip_inf"+.@c+"[0]"),
    						getd(".@equip_inf"+.@c+"[1]"),getd(".@equip_inf"+.@c+"[2]"),getd(".@equip_inf"+.@c+"[3]");
    					}
    				}
    				for (set .@c, 0; .@c < .@re; set .@c, .@c + 1)
    					deletearray getd(".@equip_inf"+.@c);
    			}
    			
    			if ( (getequipid(.@part) != .@refineitemid) || (.@menu2 == 1 && getequippercentrefinery(.@part) < 100)) {
    				next;
    				mes "[" + getarg(0) + "]";
    				mes "You changed your equipment!";
    				mes "You filthy scum!!!";
    				next;
    				atcommand "@nuke "+strcharinfo(0);
    				end;
    			}
    			
    			if (getequiprefinerycnt(.@part) >= 10) {
    				next;
    				mes "[" + getarg(0) + "]";
    				mes "You changed your equipment!";
    				mes "You filthy scum!!!";
    				next;
    				atcommand "@nuke "+strcharinfo(0);
    				end;
    			}
    			
    			if (!M_quickref) {
    				set .@rand, rand(1,4);
    				if (.@rand == 1)
    					mes "cLanG, clang ClAng!";
    				else if (.@rand == 2)
    					mes "ClaNg ClAng claNg!";
    				else if (.@rand == 3)
    					mes "clANg Clang CLanG!";
    				else if (.@rand == 4)
    					mes "CLang cLanG cLANg!";
    			}
    			else if (!.@breakme) {
    				mes "ClAng ClanG ClanG Clangg CLAgn Cnaglnac CLnacnlnagCALNGa ClangaglnaCLAnagacalNCagaCLNAangalncalclanCLANGlancLANgacln!!!";
    				mes "^FF0000(Please do not Log-Off while in this process)^000000";
    				set .@breakme, 1;
    			}
    			set Zeny, Zeny - .@price;
    			delitem .@material, 1;
    			
    			if(getequippercentrefinery(.@part) <= rand(100)) {
    				set .@breakgap, .@refinecnt - getequiprefinerycnt(.@part) ;
    				set .@j, .@j - .@breakgap ;
    				failedrefitem .@part;
    				if(.@j <= 0) close;
    			}
    			else {
    				successrefitem .@part;
    				set .@j, .@j - 1;
    				if(.@j <= 0) close;
    				set .@re, 0;
    				while ( getequiprefinerycnt(.@part) >= .@refinecnt ) {
    					for (set .@c, 0; .@c < 4; set .@c, .@c + 1)
    						if (getequipcardid(.@part,.@c) != 0)
    							setd ".@equip_inf"+.@re+"[.@c]", getequipcardid(.@part,.@c);
    					setd ".@equip_inf"+.@re+"[4]", getequiprefinerycnt(.@part);
    					unequip .@part;
    					delitem2 .@refineitemid,1,1,getd(".@equip_inf"+.@re+"[4]"),0,getd(".@equip_inf"+.@re+"[0]"),
    					getd(".@equip_inf"+.@re+"[1]"),getd(".@equip_inf"+.@re+"[2]"),getd(".@equip_inf"+.@re+"[3]");
    					equip .@refineitemid;
    					set .@re, .@re + 1;
    				}
    				if (.@re) {
    					for (set .@c, 0; .@c < .@re; set .@c, .@c + 1) {
    						getitem2 .@refineitemid,1,1,getd(".@equip_inf"+.@c+"[4]"),0,getd(".@equip_inf"+.@c+"[0]"),
    						getd(".@equip_inf"+.@c+"[1]"),getd(".@equip_inf"+.@c+"[2]"),getd(".@equip_inf"+.@c+"[3]");
    					}
    				}
    			}
    			if (!M_quickref)
    				next;
    			else {
    				set .@clang, .@clang + 1;
    					sleep 300;
    			}
    		}
    	}
    	mes "[" + getarg(0) + "]";
    	mes "All finished... Come again soon.";
    	close;		
    }
    
    
    
    //==============================================================================
    // Material Salesmen
    //==============================================================================
    prt_in,56,69,4	script	Vurewell	86,{
    	callfunc "phramain","Vurewell";
    	end;
    }
    payon,145,178,4	script	Begnahd	88,{
    	callfunc "phramain","Begnahd";
    	end;
    }
    morocc_in,65,37,4	script	Sade	99,{
    	callfunc "phramain","Sade";
    	end;
    }
    alberta_in,18,59,5	script	Kahlamanlith	86,{
    	callfunc "phramain","Kahlamanlith";
    	end;
    }
    yuno_in01,171,26,6	script	Dillemat	88,{
    	callfunc "phramain","Dillemat";
    	end;
    }
    ein_in01,15,87,7	script	Tirehaus	86,{
    	callfunc "phramain","Tirehaus";
    	end;
    }
    lhz_in02,278,24,3	script	Krugg	86,{
    	callfunc "phramain","Krugg";
    	end;
    }
    
    //============================================================
    //= Material Salesmen Functions
    //============================================================
    function	script	phramain	{
    	if (checkweight(1201,1) == 0) {
    		mes "- Wait a minute !! -";
    		mes "- Currently you're carrying -";
    		mes "- too many items with you. -";
    		mes "- Please try again -";
    		mes "- after you loose some weight. -";
    		close;
    	}
    	mes "[" + getarg(0) + "]";
    	mes "I have ^777777Phracons^000000 and ^777777Emveretarcons^000000 for sale.";
    	mes "I can also trade some more unique materials such as ^0000FFBradiums^000000 and ^0000FFKaluniums^000000";
    	next;
    	switch(select("Phracon - 200 Zeny:Emveretarcon - 1000 Zeny:Trade Elunium->Kalunium:Trade Oridecon->Bradium:Trade Refined Bradium->Bradium:Trade Tiny Bradium->Bradium:Trade Bradium->Oridecon:Trade Kalunium->Elunium:Ask about other Metals")) {
    	case 1:
    		set .@material,1010;
    		set .@price,200;
    		set .@buying, 1;
    		break;
    	case 2:
    		set .@material,1011;
    		set .@price,1000;
    		set .@buying, 1;
    		break;
    	case 3: // Elunium -> Kalunium
    		set .@amount1, 3; // Material 1 Quantity Cost
    		set .@material1, 985; // Material 1 ID
    		set .@price, 50000; // Trade Cost
    		set .@material2, 6223; // Material 2 ID
    		set .@amount2, 1; // Material 2 Quantity Received
    		set .@buying, 0; // Leave this alone
    		break;
    	case 4: // Oridecon -> Bradium
    		set .@amount1, 3; // Material 1 Quantity Cost
    		set .@material1, 984; // Material 1 ID
    		set .@price, 80000; // Trade Cost
    		set .@material2, 6224; // Material 2 ID
    		set .@amount2, 1; // Material 2 Quantity Received
    		set .@buying, 0; // Leave this alone
    		break;
    	case 5: // Refined Bradium -> Bradium
    		set .@amount1, 1; // Material 1 Quantity Cost
    		set .@material1, 6090; // Material 1 ID
    		set .@price, 60000; // Trade Cost
    		set .@material2, 6224; // Material 2 ID
    		set .@amount2, 2; // Material 2 Quantity Received
    		set .@buying, 0; // Leave this alone
    		break;
    	case 6: // Tiny Bradium -> Bradium
    		set .@amount1, 10; // Material 1 Quantity Cost
    		set .@material1, 6319; // Material 1 ID
    		set .@price, 40000; // Trade Cost
    		set .@material2, 6224; // Material 2 ID
    		set .@amount2, 1; // Material 2 Quantity Received
    		set .@buying, 0; // Leave this alone
    		break;
    	case 7: // Bradium -> Oridecon
    		set .@amount1, 1; // Material 1 Quantity Cost
    		set .@material1, 6224; // Material 1 ID
    		set .@price, 20000; // Trade Cost
    		set .@material2, 984; // Material 2 ID
    		set .@amount2, 3; // Material 2 Quantity Received
    		set .@buying, 0; // Leave this alone
    		break;
    	case 8: // Kalunium -> Elunium
    		set .@amount1, 1; // Material 1 Quantity Cost
    		set .@material1, 6223; // Material 1 ID
    		set .@price, 30000; // Trade Cost
    		set .@material2, 985; // Material 2 ID
    		set .@amount2, 3; // Material 2 Quantity Received
    		set .@buying, 0; // Leave this alone
    		break;
    	default:
    		mes "[" + getarg(0) + "]";
    		mes "Other metals?";
    		mes "Have you heard about the ^009900Unique Power Stones^000000? They are pretty damn powerfull.";
    		mes "I heard if you get some of them together, you can have an outstanding magical power.";
    		mes "Other than that, I can't think of any other metal, except ^FF0000High Density Bradiums, Kaluniums, Oridecons ^000000and ^FF0000Eluniums^000000.";
    		mes "But I have no idea where to get those.";
    		close;
    		
    	}
    	if (.@buying) {
    		mes "[" + getarg(0) + "]";
    		mes "So how many do you wish to buy?";
    		mes "If you don't want any, please enter the number, '0.'";
    		next;
    		while(1) {
    			input .@input;
    			if (.@input == 0) {
    				mes "[" + getarg(0) + "]";
    				mes "The deal has";
    				mes "been cancelled.";
    				close;
    			}
    			else if (.@input < 0 || .@input > 500) {
    				mes "[" + getarg(0) + "]";
    				mes "Alright, you can";
    				mes "puchase up to 500.";
    				mes "No more than that,";
    				mes "got it? Good.";
    				next;
    			}
    			else {
    				break;
    			}
    		}
    		set .@sell,.@input * .@price;
    		if (Zeny < .@sell) {
    			mes "[" + getarg(0) + "]";
    			mes "Err...";
    			mes "You don't have";
    			mes "enough Zeny to buy";
    			mes ""+ .@input +" of them.";
    			close;
    		}
    		if (checkweight(.@material,.@input) == 0) {
    			mes "[" + getarg(0) + "]";
    			mes "Hmm...";
    			mes "I can't give you anything if you don't have enough room in your inventory. Why don't you put your extra things in Kafra Storage and try again?";
    			close;
    		}
    		getitem .@material,.@input;
    		set Zeny,Zeny-.@sell;
    		mes "[" + getarg(0) + "]";
    		mes "Here you are!";
    		mes "Thank you for";
    		mes "your patronage.";
    		close;
    	}
    	else {
    		mes "[" + getarg(0) + "]";
    			mes "It will cost you "+.@amount1+" ^0000FF"+getitemname(.@material1)+"^000000 and ^009933"+.@price+" Zeny^000000 per trade. In exchange, you will get "+.@amount2+" ^FF0000"+getitemname(.@material2)+"^000000. How many times would you like to trade? Input '0' to cancel.";
    			next;
    			while(1) {
    				input .@input;
    				if (.@input == 0) {
    					mes "[" + getarg(0) + "]";
    					mes "The deal has";
    					mes "been cancelled.";
    					close;
    				}
    				else if (.@input < 0 || .@input > 500) {
    					mes "[" + getarg(0) + "]";
    					mes "Alright, you can";
    					mes "trade up to 500.";
    					mes "No more than that,";
    					mes "got it? Good.";
    					next;
    				}
    				else {
    					break;
    				}
    			}
    			set .@sell,.@input * .@price;
    			if (Zeny < .@sell) {
    				mes "[" + getarg(0) + "]";
    				mes "Err...";
    				mes "You don't have";
    				mes "enough Zeny to trade";
    				mes ""+ .@input +" of them.";
    				close;
    			}
    			if (checkweight(.@material2,.@input * .@amount2) == 0) {
    				mes "[" + getarg(0) + "]";
    				mes "Hmm...";
    				mes "I can't give you anything if you don't have enough room in your inventory. Why don't you put your extra things in Kafra Storage and try again?";
    				close;
    			}
    			set .@mat1_amount, .@input * .@amount1;
    			if (countitem(.@material1) < .@mat1_amount ) {
    				mes "[" + getarg(0) + "]";
    				mes "You don't have enough ^0000FF"+getitemname(.@material1)+"^000000. Come back when you do.";
    				close;
    			}
    			getitem .@material2, .@input * .@amount2;
    			delitem .@material1, .@mat1_amount;
    			set Zeny,Zeny-.@sell;
    			mes "[" + getarg(0) + "]";
    			mes "Here you are!";
    			mes "Thank you for";
    			mes "your patronage.";
    			close;
    	}
    }
    
    
    
    //==============================================================================
    // Ori/Elu Refiners
    //==============================================================================
    prt_in,63,69,4	script	Dietrich	84,{
    	callfunc "orimain","Dietrich";
    	end;
    }
    payon,137,178,4	script	Hakhim	88,{
    	callfunc "orimain","Hakhim";
    	end;
    }
    morocc_in,72,32,4	script	Abdul	99,{
    	callfunc "orimain","Abdul";
    	end;
    }
    alberta_in,21,63,5	script	Xenophon	84,{
    	callfunc "orimain","Xenophon";
    	end;
    }
    yuno_in01,171,22,6	script	Delayt	88,{
    	callfunc "orimain","Delayt";
    	end;
    }
    ein_in01,18,82,6	script	Matestein	84,{
    	callfunc "orimain","Matestein";
    	end;
    }
    lhz_in02,281,24,5	script	Fruel	84,{
    	callfunc "orimain","Fruel";
    	end;
    }
    
    //============================================================
    //= Ori/Elu Functions
    //============================================================
    function	script	orimain	{
    	if (checkweight(1201,1) == 0) {
    		mes "- Wait a minute !! -";
    		mes "- Currently you're carrying -";
    		mes "- too many items with you. -";
    		mes "- Please try again -";
    		mes "- after you loose some weight. -";
    		close;
    	}
    	mes "[" + getarg(0) + "]";
    	mes "I can purify your";
    	mes "Rough Oridecons or";
    	mes "Rough Eluniums. I'll need";
    	mes "5 Rough Stones to make";
    	mes "1 pure one for you.";
    	next;
    	switch(select("Make Oridecon:Make Elunium:Ask about Enchanted Stones")) {
    	case 1:
    		if (countitem(756) > 4) {
    			delitem 756,5;  //Oridecon_Stone
    			getitem 984,1; // Oridecon
    			mes "[" + getarg(0) + "]";
    			mes "Here's your Oridecon.";
    			mes "You're welcome to come";
    			mes "back whenever you want.";
    			close;
    		}
    		else {
    			mes "[" + getarg(0) + "]";
    			mes "You're kidding me, right?";
    			mes "I just told you that I need 5 Rough Oridecons to make a pure Oridecon.";
    			close;
    		}
    	case 2:
    		if (countitem(757) > 4) {
    			delitem 757,5;  //Elunium_Stone
    			getitem 985,1; // Elunium
    			mes "[" + getarg(0) + "]";
    			mes "Here's your Elunium.";
    			mes "You're welcome to come";
    			mes "back whenever you want.";
    			close;
    		}
    		else {
    			mes "[" + getarg(0) + "]";
    			mes "You're kidding me, right?";
    			mes "I just told you that I need 5 Rough Eluniums to make a pure Elunium.";
    			close;
    		}
    	case 3:
    		mes "[" + getarg(0) + "]";
    		mes "Enchanted Stones...?";
    		mes "I've been a stonesmith for 20 years, so I've heard a lot about them. Supposedly, there are";
    		mes "four different kinds.";
    		next;
    		mes "[" + getarg(0) + "]";
    		mes "Each Enchanted Stone possesses one of the following elemental properties: Earth, Wind, Water and Fire.";
    		next;
    		mes "[" + getarg(0) + "]";
    		mes "If someone combines a Enchanted Stone with a weapon while smithing, that weapon will possess the same property as the Stone.";
    		next;
    		mes "[" + getarg(0) + "]";
    		mes "Needless to say, you need to have some smithing skill to produce this kind of elemental weapon.";
    		close;
    	}
    }
    
    
    
    //=====================================================================================
    // Equipment Repairmen
    //=====================================================================================
    alberta_in,31,65,4	script	Repairman#alb	86,{
    	callfunc "repairmain","Repairman";
    	end;
    }
    
    moc_ruins,107,94,5	script	Repairman#moc	99,{
    	callfunc "repairmain","Repairman";
    	end;
    }
    
    payon,143,165,4	script	Repairman#pay	88,{
    	callfunc "repairmain","Repairman";
    	end;
    }
    
    prt_in,63,54,2	script	Repairman#prt	86,{
    	callfunc "repairmain","Grendal";
    	end;
    }
    
    yuno_in01,175,28,3	script	Repairman#juno	86,{
    	callfunc "repairmain","Repairman";
    	end;
    }
    
    geffen_in,34,166,3	script	Repairman#gef	99,{
    	callfunc "repairmain","Repairman";
    	end;
    }
    
    aldeba_in,38,60,3	script	Repairman#alde	86,{
    	callfunc "repairmain","Repairman";
    	end;
    }
    
    lhz_in02,284,14,3	script	Repairman#lhz	86,{
    	callfunc "repairmain","Repairman";
    	end;
    }
    
    //============================================================
    //= Equipment Repair Function
    //============================================================
    function	script	repairmain	{
    	set .@repairprice,5000;
    	mes "["+getarg(0)+"]";
    	mes "Hey there!";
    	mes "Do you want me";
    	mes "to repair any items?";
    	mes "You can count on me";
    	mes "for item repairs!";
    	next;
    	switch(select("Actually, I do have some items...:None at the moment.")) {
    	case 1:
    		set .@checkitem,1;
    		while (1) {
    			if (getbrokenid(.@checkitem) == 0) {
    				break;
    			}
    			set .@checkitem,.@checkitem+1;
    		}
    		set .@checkitem,.@checkitem-1;
    		if (!.@checkitem) {
    			mes "["+getarg(0)+"]";
    			mes "Oh wow, this is incredible!";
    			mes "You must take very good care of your things. None of your items are damaged!";
    			next;
    			mes "["+getarg(0)+"]";
    			mes "If everyone is like you, I'm going to be unemployed!! Haha~!";
    			close;
    		}
    		mes "["+getarg(0)+"]";
    		mes "Hmm...";
    		mes "Let's see...";
    		mes "Out of all your items,";
    		mes "" + .@checkitem + " are damaged.";
    		mes "Would you like to repair?";
    		next;
    		set .@totalcost,.@repairprice*.@checkitem;
    		mes "["+getarg(0)+"]";
    		mes "Each repair costs " + .@repairprice + " Zeny. So to repair all your damaged items would cost " + .@totalcost + " Zeny! Would you like to repair the items?";
    		next;
    		switch(select("Yes:No")) {
    		case 1:
    			if (Zeny < .@totalcost) {
    				mes "["+getarg(0)+"]";
    				mes "Whoa whoa...";
    				mes "Check your wallet before you receive the repair bill! I can't repair anything because you don't have enough Zeny.";
    				close;
    			}
    			set .@checkitem2,1;
    			while (1) {
    				if (getbrokenid(.@checkitem2) == 0) {
    					break;
    				}
    				set .@checkitem2,.@checkitem2+1;
    			}
    			set .@checkitem2,.@checkitem2-1;
    			if (.@checkitem == .@checkitem2) {
    				set zeny,zeny-.@totalcost;
    				while (.@checkitem) {
    					repair(.@checkitem);
    					set .@checkitem,.@checkitem-1;
    				}
    				mes "["+getarg(0)+"]";
    				mes "Okay! All done. Now, try to be a little more careful. Items have lives too you know.";
    				close;
    			}
    			else {
    				mes "["+getarg(0)+"]";
    				mes "Mmm? Something's wrong. Wait... Equip the items you need to repair and then come back to me.";
    				close;
    			}
    		case 2:
    			mes "["+getarg(0)+"]";
    			mes "Well, it's no skin off my nose, but it's not good to leave items damaged. You should get them repaired as soon as possible!";
    			close;
    		}
    	case 2:
    		mes "["+getarg(0)+"]";
    		mes "Hohoho...";
    		mes "You don't have";
    		mes "any business with me";
    		mes "if you don't have any";
    		mes "items to repair.";
    		close;
    	}
    }

    Anyone help me to work this script on Latest Rathena

  6. sprintf(message + strlen(message), "Total profit: %s x %d", "Zeny", (mailprofit -= mailprofit * (battle_config.vending_tax / 10000.)));

    rathena\src\map\vending.cpp(395): warning C4244: '-=': conversion from 'double' to 'int', possible loss of data
     

  7. 18 hours ago, noxty said:
    
    Thanks for the help but now I have another mistake, I hope you can help me.
    
    Thank you
    
    
     
    
    
     
    
    
     
     
     
     

    error pk mode 2.jpg

    +			if( map_getmapflag(sd->bl.m, MF_PVP) && sd->state.pk_mode && flag&BCT_ENEMY && s_bl->type != BL_MOB )
    +				return 0;

     

    +				}else if (map_getmapflag(sd->bl.m, MF_PVP) && sd->state.pk_mode && t_bl->type != BL_MOB)
    +
  8. diff --git a/conf/battle/battle.conf b/conf/battle/battle.conf
    index 593d4e92f4..30251a4834 100644
    --- a/conf/battle/battle.conf
    +++ b/conf/battle/battle.conf
    @@ -158,3 +158,9 @@ warg_can_falcon: no
     // Should the target be able of dodging damage by snapping away to the edge of the screen?
     // Official behavior is "no"
     snap_dodge: no
    +
    +// ****************************************
    +// Reserved Costume ID's
    +// ****************************************
    +// Reserved Char ID for costume converted items.
    +reserved_costume_id: 999998
    \ No newline at end of file
    diff --git a/doc/script_commands.txt b/doc/script_commands.txt
    index 70113c4145..d769b4364d 100644
    --- a/doc/script_commands.txt
    +++ b/doc/script_commands.txt
    @@ -9633,6 +9633,25 @@ solution rather than sending the map and the monster_id.
     
     ---------------------------------------
     
    +*costume <equipment position>;
    +
    +Converts equipment in <equipment position> to costume version that has no stats.
    +
    +Applicable positions are:
    + EQI_HEAD_TOP - Top Headgear
    + EQI_HEAD_MID - Middle Headgear
    + EQI_HEAD_LOW - Lower Headgear
    + EQI_GARMENT - Garment
    + 
    +---------------------------------------
    +
    +*getcostumeitem <item id>;
    +*getcostumeitem <"item name">;
    +
    +Spawn a costume version of an <item id> or <"item name"> in attached player's inventory.
    +
    +---------------------------------------
    +
     *hateffect(<Hat Effect ID>,<State>);
     
     This will set a Hat Effect onto the player. The state field allows you to
    diff --git a/src/map/atcommand.cpp b/src/map/atcommand.cpp
    index 43d6ad4d7d..e2897a48b5 100644
    --- a/src/map/atcommand.cpp
    +++ b/src/map/atcommand.cpp
    @@ -1218,7 +1218,7 @@ ACMD_FUNC(heal)
     ACMD_FUNC(item)
     {
     	char item_name[100];
    -	int number = 0, bound = BOUND_NONE;
    +	int number = 0, bound = BOUND_NONE, costume = 0;
     	char flag = 0;
     	struct item item_tmp;
     	struct item_data *item_data[10];
    @@ -1267,6 +1267,27 @@ ACMD_FUNC(item)
     
     	for(j--; j>=0; j--){ //produce items in list
     		unsigned short item_id = item_data[j]->nameid;
    +		if (!strcmpi(command + 1, "costumeitem"))
    +		{
    +			if (!battle_config.reserved_costume_id)
    +			{
    +				clif_displaymessage(fd, "Costume convertion is disable. Set a value for reserved_cosutme_id on your battle.conf file.");
    +				return -1;
    +			}
    +			if (!(item_data[j]->equip&EQP_HEAD_LOW) &&
    +				!(item_data[j]->equip&EQP_HEAD_MID) &&
    +				!(item_data[j]->equip&EQP_HEAD_TOP) &&
    +				!(item_data[j]->equip&EQP_COSTUME_HEAD_LOW) &&
    +				!(item_data[j]->equip&EQP_COSTUME_HEAD_MID) &&
    +				!(item_data[j]->equip&EQP_COSTUME_HEAD_TOP) &&
    +				!(item_data[j]->equip&EQP_GARMENT) &&
    +				!(item_data[j]->equip&EQP_COSTUME_GARMENT))
    +			{
    +				clif_displaymessage(fd, "You cannot costume this item. Costume only work for headgears.");
    +				return -1;
    +			}
    +			costume = 1;
    +		}
     		//Check if it's stackable.
     		if (!itemdb_isstackable2(item_data[j]))
     			get_count = 1;
    @@ -1277,6 +1298,11 @@ ACMD_FUNC(item)
     				memset(&item_tmp, 0, sizeof(item_tmp));
     				item_tmp.nameid = item_id;
     				item_tmp.identify = 1;
    +				if (costume == 1) { // Costume item
    +					item_tmp.card[0] = CARD0_CREATE;
    +					item_tmp.card[2] = GetWord(battle_config.reserved_costume_id, 0);
    +					item_tmp.card[3] = GetWord(battle_config.reserved_costume_id, 1);
    +				}
     				item_tmp.bound = bound;
     				if ((flag = pc_additem(sd, &item_tmp, get_count, LOG_TYPE_COMMAND)))
     					clif_additem(sd, 0, 0, flag);
    @@ -10282,6 +10308,7 @@ void atcommand_basecommands(void) {
     		ACMD_DEF(clonestat),
     		ACMD_DEF(bodystyle),
     		ACMD_DEF(adopt),
    +		ACMD_DEF2("costumeitem", item),
     		ACMD_DEF(agitstart3),
     		ACMD_DEF(agitend3),
     	};
    diff --git a/src/map/battle.cpp b/src/map/battle.cpp
    index 839cfb5620..d28c5f0182 100644
    --- a/src/map/battle.cpp
    +++ b/src/map/battle.cpp
    @@ -8482,6 +8482,7 @@ static const struct _battle_data {
     	{ "exp_cost_inspiration",               &battle_config.exp_cost_inspiration,            1,      0,      100,            },
     	{ "mvp_exp_reward_message",             &battle_config.mvp_exp_reward_message,          0,      0,      1,              },
     	{ "can_damage_skill",                   &battle_config.can_damage_skill,                1,      0,      BL_ALL,         },
    +	{ "reserved_costume_id",				&battle_config.reserved_costume_id,				999998,	0,		INT_MAX,		},
     	{ "atcommand_levelup_events",			&battle_config.atcommand_levelup_events,		0,		0,		1,				},
     	{ "block_account_in_same_party",		&battle_config.block_account_in_same_party,		1,		0,		1,				},
     	{ "tarotcard_equal_chance",             &battle_config.tarotcard_equal_chance,          0,      0,      1,              },
    diff --git a/src/map/battle.hpp b/src/map/battle.hpp
    index ad13f69d53..b8f36aaf00 100644
    --- a/src/map/battle.hpp
    +++ b/src/map/battle.hpp
    @@ -618,6 +618,7 @@ struct Battle_Config
     	int exp_cost_inspiration;
     	int mvp_exp_reward_message;
     	int can_damage_skill; //Which BL types can damage traps
    +	int reserved_costume_id;
     	int atcommand_levelup_events;
     	int block_account_in_same_party;
     	int tarotcard_equal_chance; //Official or equal chance for each card
    diff --git a/src/map/map.cpp b/src/map/map.cpp
    index 8b70459939..3b06cd032c 100644
    --- a/src/map/map.cpp
    +++ b/src/map/map.cpp
    @@ -1865,6 +1865,12 @@ void map_reqnickdb(struct map_session_data * sd, int charid)
     
     	nullpo_retv(sd);
     
    +	if (battle_config.reserved_costume_id && battle_config.reserved_costume_id == charid)
    +	{
    +		clif_solved_charname(sd->fd, charid, "Costume");
    +		return;
    +	}
    +
     	tsd = map_charid2sd(charid);
     	if( tsd )
     	{
    diff --git a/src/map/pc.cpp b/src/map/pc.cpp
    index c0126b1597..015381e857 100755
    --- a/src/map/pc.cpp
    +++ b/src/map/pc.cpp
    @@ -746,6 +746,7 @@ int pc_equippoint_sub(struct map_session_data *sd,struct item_data* id){
     				return EQP_SHADOW_ARMS;
     		}
     	}
    +
     	return ep;
     }
     
    @@ -757,7 +758,18 @@ int pc_equippoint_sub(struct map_session_data *sd,struct item_data* id){
     int pc_equippoint(struct map_session_data *sd,int n){
     	nullpo_ret(sd);
     
    -	return pc_equippoint_sub(sd,sd->inventory_data[n]);
    +	int ep = pc_equippoint_sub(sd, sd->inventory_data[n]);
    +
    +	if (battle_config.reserved_costume_id &&
    +		sd->inventory.u.items_inventory[n].card[0] == CARD0_CREATE &&
    +		MakeDWord(sd->inventory.u.items_inventory[n].card[2], sd->inventory.u.items_inventory[n].card[3]) == battle_config.reserved_costume_id)
    +	{ // Costume Item - Converted
    +		if (ep&EQP_HEAD_TOP) { ep &= ~EQP_HEAD_TOP; ep |= EQP_COSTUME_HEAD_TOP; }
    +		if (ep&EQP_HEAD_LOW) { ep &= ~EQP_HEAD_LOW; ep |= EQP_COSTUME_HEAD_LOW; }
    +		if (ep&EQP_HEAD_MID) { ep &= ~EQP_HEAD_MID; ep |= EQP_COSTUME_HEAD_MID; }
    +		if (ep&EQP_GARMENT) { ep &= ~EQP_GARMENT; ep |= EQP_COSTUME_GARMENT; }
    +	}
    +	return ep;
     }
     
     /**
    diff --git a/src/map/script.cpp b/src/map/script.cpp
    index 0b2386c32d..70127734b0 100644
    --- a/src/map/script.cpp
    +++ b/src/map/script.cpp
    @@ -22601,6 +22601,114 @@ BUILDIN_FUNC(getexp2) {
     	return SCRIPT_CMD_SUCCESS;
     }
     
    +/*==========================================
    +* Costume Items
    +*------------------------------------------*/
    +BUILDIN_FUNC(costume)
    +{
    +	int i = -1, num, ep;
    +	TBL_PC *sd;
    +
    +	num = script_getnum(st, 2); // Equip Slot
    +
    +	if (!script_rid2sd(sd))
    +		return SCRIPT_CMD_FAILURE;
    +
    +	if (equip_index_check(num))
    +		i = pc_checkequip(sd, equip_bitmask[num]);
    +	if (i < 0)
    +		return SCRIPT_CMD_FAILURE;
    +
    +	ep = sd->inventory.u.items_inventory[i].equip;
    +	if (!(ep&EQP_HEAD_LOW) && !(ep&EQP_HEAD_MID) && !(ep&EQP_HEAD_TOP) && !(ep&EQP_GARMENT)) {
    +		ShowError("buildin_costume: Attempted to convert non-cosmetic item to costume.");
    +		return SCRIPT_CMD_FAILURE;
    +	}
    +	log_pick_pc(sd, LOG_TYPE_SCRIPT, -1, &sd->inventory.u.items_inventory[i]);
    +	pc_unequipitem(sd, i, 2);
    +	clif_delitem(sd, i, 1, 3);
    +	// --------------------------------------------------------------------
    +	sd->inventory.u.items_inventory[i].refine = 0;
    +	sd->inventory.u.items_inventory[i].attribute = 0;
    +	sd->inventory.u.items_inventory[i].card[0] = CARD0_CREATE;
    +	sd->inventory.u.items_inventory[i].card[1] = 0;
    +	sd->inventory.u.items_inventory[i].card[2] = GetWord(battle_config.reserved_costume_id, 0);
    +	sd->inventory.u.items_inventory[i].card[3] = GetWord(battle_config.reserved_costume_id, 1);
    +
    +	if (ep&EQP_HEAD_TOP) { ep &= ~EQP_HEAD_TOP; ep |= EQP_COSTUME_HEAD_TOP; }
    +	if (ep&EQP_HEAD_LOW) { ep &= ~EQP_HEAD_LOW; ep |= EQP_COSTUME_HEAD_LOW; }
    +	if (ep&EQP_HEAD_MID) { ep &= ~EQP_HEAD_MID; ep |= EQP_COSTUME_HEAD_MID; }
    +	if (ep&EQP_GARMENT) { ep &= EQP_GARMENT; ep |= EQP_COSTUME_GARMENT; }
    +	// --------------------------------------------------------------------
    +	log_pick_pc(sd, LOG_TYPE_SCRIPT, 1, &sd->inventory.u.items_inventory[i]);
    +
    +	clif_additem(sd, i, 1, 0);
    +	pc_equipitem(sd, i, ep);
    +	clif_misceffect(&sd->bl, 3);
    +
    +	return SCRIPT_CMD_SUCCESS;
    +}
    +
    +/*===============================
    + * getcostumeitem <item id>;
    + * getcostumeitem <"item name">;
    + *===============================*/
    +BUILDIN_FUNC(getcostumeitem)
    +{
    +	unsigned short nameid;
    +	struct item item_tmp;
    +	TBL_PC *sd;
    +	struct script_data *data;
    +
    +	if (!script_rid2sd(sd))
    +	{	// No player attached.
    +		script_pushint(st, 0);
    +		return SCRIPT_CMD_SUCCESS;
    +	}
    +
    +	data = script_getdata(st, 2);
    +	get_val(st, data);
    +	if (data_isstring(data)) {
    +		int ep;
    +		const char *name = conv_str(st, data);
    +		struct item_data *item_data = itemdb_searchname(name);
    +		if (item_data == NULL)
    +		{	//Failed
    +			script_pushint(st, 0);
    +			return SCRIPT_CMD_SUCCESS;
    +		}
    +		ep = item_data->equip;
    +		if (!(ep&EQP_HEAD_LOW) && !(ep&EQP_HEAD_MID) && !(ep&EQP_HEAD_TOP) && !(ep&EQP_GARMENT)){
    +			ShowError("buildin_getcostumeitem: Attempted to convert non-cosmetic item to costume.");
    +			return SCRIPT_CMD_FAILURE;
    +		}
    +		nameid = item_data->nameid;
    +	}
    +	else
    +		nameid = conv_num(st, data);
    +
    +	if (!itemdb_exists(nameid))
    +	{	// Item does not exist.
    +		script_pushint(st, 0);
    +		return SCRIPT_CMD_SUCCESS;
    +	}
    +
    +	memset(&item_tmp, 0, sizeof(item_tmp));
    +	item_tmp.nameid = nameid;
    +	item_tmp.amount = 1;
    +	item_tmp.identify = 1;
    +	item_tmp.card[0] = CARD0_CREATE;
    +	item_tmp.card[2] = GetWord(battle_config.reserved_costume_id, 0);
    +	item_tmp.card[3] = GetWord(battle_config.reserved_costume_id, 1);
    +	if (pc_additem(sd, &item_tmp, 1, LOG_TYPE_SCRIPT)) {
    +		script_pushint(st, 0);
    +		return SCRIPT_CMD_SUCCESS;	//Failed to add item, we will not drop if they don't fit
    +	}
    +
    +	script_pushint(st, 1);
    +	return SCRIPT_CMD_SUCCESS;
    +}
    +
     /**
     * Force stat recalculation of sd
     * recalculatestat;
    @@ -24343,6 +24451,8 @@ struct script_function buildin_func[] = {
     	BUILDIN_DEF(getguildalliance,"ii"),
     	BUILDIN_DEF(adopt,"vv"),
     	BUILDIN_DEF(getexp2,"ii?"),
    +	BUILDIN_DEF(costume, "i"),
    +	BUILDIN_DEF(getcostumeitem, "v"),
     	BUILDIN_DEF(recalculatestat,""),
     	BUILDIN_DEF(hateffect,"ii"),
     	BUILDIN_DEF(getrandomoptinfo, "i"),
    diff --git a/src/map/status.cpp b/src/map/status.cpp
    index af4c3afb00..a296f7b89e 100644
    --- a/src/map/status.cpp
    +++ b/src/map/status.cpp
    @@ -3492,6 +3492,8 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt)
     			continue;
     		if (!sd->inventory_data[index])
     			continue;
    +		if (sd->inventory.u.items_inventory[current_equip_item_index].card[0] == CARD0_CREATE && MakeDWord(sd->inventory.u.items_inventory[current_equip_item_index].card[2], sd->inventory.u.items_inventory[current_equip_item_index].card[3]) == battle_config.reserved_costume_id)
    +			continue;
     
     		base_status->def += sd->inventory_data[index]->def;

    From Secret Try this

    • Upvote 1
  9. 8 hours ago, noxty said:

    error pk mode.jpg

    -			if( map[m].flag.pvp && sd->state.pk_mode && flag&BCT_ENEMY && s_bl->type != BL_MOB )
    -				return 0;
    
    +			if( map_getmapflag(sd->bl.m, MF_PVP) && sd->state.pk_mode && flag&BCT_ENEMY && s_bl->type != BL_MOB )
    +				return 0;
    
    -				}else if( map[m].flag.pvp && sd->state.pk_mode && t_bl->type != BL_MOB )
    -					return 0;
    
    					return 0; // You can't target anything out of your duel
    
    +				}else if (map_getmapflag(sd->bl.m, MF_PVP) && sd->state.pk_mode && t_bl->type != BL_MOB)
    +					return 0;

    Try This

  10. #ifndef RENEWAL
    	case NJ_ISSEN:
    		status_change_end(src, SC_NEN, INVALID_TIMER);
    		status_change_end(src, SC_HIDING, INVALID_TIMER);
    #endif
    		// fall through
    	case MO_EXTREMITYFIST:
    		{
    			//short x, y, i = 2; // Move 2 cells for Issen(from target)
    			struct block_list *mbl = bl;
    			short dir = 0;
    			
    			skill_attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag);
    			
    			if( skill_id == MO_EXTREMITYFIST )
    			{
    				mbl = src;
    				status_set_sp(src, 0, 0);
    				status_change_end(src, SC_EXPLOSIONSPIRITS, INVALID_TIMER);
    				status_change_end(src, SC_BLADESTOP, INVALID_TIMER);
    #ifdef RENEWAL
    				sc_start(src,src,SC_EXTREMITYFIST2,100,skill_lv,skill_get_time(skill_id,skill_lv));
    #endif
    			}else
    				status_set_hp(src,
    #ifdef RENEWAL
    				max(status_get_max_hp(src)/100, 1)
    #else
    				1
    #endif
    				, 0);
    		}
    		//Client expects you to move to target regardless of distance
    		{				
    			struct unit_data *ud = unit_bl2ud(src);
    			short dx,dy;
    			int i,speed;
    			i = skill_id == MO_EXTREMITYFIST?1:2; //Move 2 cells for Issen, 1 for Asura
    			dx = bl->x - src->x;
    			dy = bl->y - src->y;
    			if (dx < 0) dx-=i;
    			else if (dx > 0) dx+=i;
    			if (dy < 0) dy-=i;
    			else if (dy > 0) dy+=i;
    			if (!dx && !dy) dy++;
    			if (map_getcell(src->m, src->x+dx, src->y+dy, CELL_CHKNOPASS))
    			{
    				dx = bl->x;
    				dy = bl->y;
    			} else {
    				dx = src->x + dx;
    				dy = src->y + dy;
    			}
    
    			if(unit_walktoxy(src, dx, dy, 2) && ud) {
    				//Increase can't walk delay to not alter your walk path
    				ud->canmove_tick = tick;
    				speed = status_get_speed(src);
    				for (i = 0; i < ud->walkpath.path_len; i ++)
    				{
    					if(ud->walkpath.path[i]&1)
    						ud->canmove_tick+=7*speed/5;
    					else
    						ud->canmove_tick+=speed;
    				}
    			}
    		}
    		break;

    but there will be problem this code has auto knockback

    Sample Vid: 

    PS : i can Spam my asura like on your sample video but on my server have 1 sec cooldown on my asura

     

     

     

  11. On 5/16/2019 at 12:29 PM, masterzeus said:

    Hi, I currently have this visual problem, when I use the WeaponRefine (Whitesmith) skill, the current weapon refine information does not appear, only the name.
    Is it possible to display the Name + the current refine?
    Thank you

    image.png

    			pc_delitem(sd, i, 1, 0, 0, LOG_TYPE_OTHER);
    			if (per > rnd() % 100) {
    				int ep=0;
    				log_pick_pc(sd, LOG_TYPE_OTHER, -1, item);
    				item->refine++;
    				log_pick_pc(sd, LOG_TYPE_OTHER,  1, item);
    				if(item->equip) {
    					ep = item->equip;
    					pc_unequipitem(sd,idx,3);
    				}
    				clif_delitem(sd,idx,1,3);
    +				clif_additem(sd,idx,1,0);
    				clif_upgrademessage(sd->fd, 0, item->nameid);
    				clif_inventorylist(sd);
    				clif_refine(sd->fd,0,idx,item->refine);
    				achievement_update_objective(sd, AG_REFINE_SUCCESS, 2, ditem->wlv, item->refine);
    				if (ep)

    Skill.c

×
×
  • Create New...