Jump to content
  • 0

Advance Refiner ( Announce +9 +10 )


awesomazingxed

Question


  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  95
  • Reputation:   0
  • Joined:  10/24/14
  • Last Seen:  

Hello there. Can someone remake this script. This is an Advance Refiner script. 

Basically I want is to broadcast ( server-wide ) whenever a player successfully refined his/her weapon/armor to +9 and +10 so other players will notify. Thank you in advance. Ciao /no1  

//===== rAthena Script =======================================
//= Advanced Refiner
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
//= 1.6
//===== Compatible With: =====================================
//= rAthena Project
//===== Description: =========================================
//= [Official Conversion]
//= Refiner that uses Enriched ores to increase upgrade success.
//= After a conversation with Doddler, it's been established that
//= the advanced refiner works similar the the "Bubble Gum" item.
//= The success percentage is not "increased" however, if it fails
//= You get a second try. This tries twice at the same time,
//= effectively giving you a re-roll on your attempt.
//= - Dialog is only partly official to iRO.
//= - Uses the iRO position for this NPC.
//===== Additional Comments: =================================
//= 1.0 First Version. [L0ne_W0lf]
//= 1.1 Fixed a weird carriage return. o_o [L0ne_W0lf]
//= 1.2 Optimizing refine method [Zephyrus]
//= 1.3 Typo fixes [Yommy]
//= 1.4 Removed unnecessary dialogs [Zephyrus]
//= 1.4a Added 'disable_items' command. [Euphy]
//= 1.4b Fixed coordinates. [Euphy]
//= 1.5 Some official script updates. [Euphy]
//= 1.6 Added VIP features. [Euphy]
//============================================================

turbo_room,64,91,5	script	Advanced Refiner	681,{
	disable_items;
	mes "[Suhnbi]";
	mes "I am the Armsmith";
	mes "I can refine all kinds of weapons,";
	mes "armor and equipment, so let me";
	mes "know what you want 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 .@equipped,1;
		}
		set .@menu$, .@menu$ + ":";
	}
	if (.@equipped == 0) {
		mes "[Suhnbi]";
		mes "I don't think I can refine any items you have...";
		close;
	}
	set .@part, select(.@menu$);

	if (!getequipisequiped(.@part)) //custom check
		close;
	if (!getequipisenableref(.@part)) {
		mes "[Suhnbi]";
		mes "Go find another Blacksmith. You can't refine this thing.";
		close;
	}
	if (getequiprefinerycnt(.@part) >= 10) {
		mes "[Suhnbi]";
		mes "Hmm... someone perfected this already. I don't think I can work on it further.";
		close;
	}

	// Make sure you have the neccessary items and Zeny to refine your items
	// Determines chance of failure and verifies that you want to continue.
	switch(getequipweaponlv(.@part)) {
		case 1: callsub S_RefineValidate,1,7620,1,.@part; break;
		case 2: callsub S_RefineValidate,2,7620,1,.@part; break;
		case 3: callsub S_RefineValidate,3,7620,1,.@part; break;
		case 4: callsub S_RefineValidate,4,7620,1,.@part; break;
		default: callsub S_RefineValidate,0,7619,1,.@part; break;
	}

	mes "[Suhnbi]";
	mes "Clang! Clang! Clang!";
	if (getequippercentrefinery(.@part) > rand(100) || getequippercentrefinery(.@part) > rand(100)) {
		successrefitem .@part;
		next;
		emotion e_no1;
		mes "[Suhnbi]";
		mes "There you go! It's done.";
		mes "It's been a while since I've made such a fine "+((getequipweaponlv(.@part))?"weapon":"armor")+". You must be happy because it has become stronger!";
		close;
	}
	failedrefitem .@part;
	next;
	emotion (!rand(5))?e_cash:e_omg;
	mes "[Suhnbi]";
	mes "Uuuuuuuuuummmmmph!!!";
	next;
	mes "[Suhnbi]";
	mes "...";
	mes ".....";
	mes ".......Huhuhuhuhu~";
	mes "........It was your choice and my ability, no regret.";
	close;

S_RefineValidate:
	set .@price, getarg(2);

	// If the VIP system is enabled, the prices for non-VIP players are considerably higher.
	if (VIP_SCRIPT && !vip_status(1)) {
		switch(getarg(0)){
			case 0: set .@price, .@price * 10; break;
			case 1: set .@price, .@price * 40; break;
			case 2: set .@price, .@price * 50; break;
			case 3: set .@price, .@price * 2; break;
			case 4: set .@price, .@price * 2; break;
		}
	}

	mes "[Suhnbi]";
	if (getarg(0))
		mes "You want to refine a level " + getarg(0) + " weapon?";
	mes "To refine that, you'll need to have one ^ff9999" + getitemname(getarg(1)) + "^000000 and " + .@price + " zeny.";
	mes "Would you like to continue?";
	next;
	if(select("Yes:No") == 1) {
		if (getequippercentrefinery(getarg(3)) < 100) {
			if (getarg(0)) {
				mes "[Suhnbi]";
				mes "Wow!!";
				mes "This weapon probably";
				mes "looks like it's been refined...";
				mes "many times...";
				mes "It may break if";
				mes "you refine it again.";
				next;
				mes "And if it breaks,";
				mes "you can't use it anymore!";
				mes "All the cards in it and the properties ^ff0000will be lost^000000!";
				mes "^ff0000Besides, the equipment will break!^000000";
				mes "Are you sure you still want to continue?";
				next;
				if(select("Yes:No") == 2) {
					mes "[Suhnbi]";
					mes "Good.";
					mes "Because if the weapon breaks from unreasonable refining, then I get a bad mood, too.";
					close;
				}
			} else {
				mes "[Suhnbi]";
				mes "Giggle. Giggle. Oh, you have guts, daring to refine this.";
				mes "You know it's pretty risky, don't you?";
				next;
				mes "If your defensive equipment is broken, you'll never be able to use it again.";
				mes "Even your cards and your modifications will ^ff0000completely disappear^000000.";
				//mes "Everything will disappear. As in... GONE!";
				mes "Do you really wish to continue?";
				next;
				if(select("Yes:No") == 2) {
					mes "[Suhnbi]";
					mes "What nonsense. You waste my precious time.";
					mes "Get lost, punk.";
					close;
				}
			}
		}
		if (countitem(getarg(1)) > 0 && Zeny > .@price) {
			delitem getarg(1),1;
			set Zeny, Zeny - .@price;
			return;
		}
		mes "[Suhnbi]";
		mes "Are these all you have?";
		mes "I'm very sorry, but I can't do anything without all the materials. Besides, I deserve some payments for my work, don't I?";
		close;
	}
	mes "[Suhnbi]";
	mes "I can't help it even if you're not happy about it...";
	close;
}

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  


if ( getequiprefinerycnt( .@part ) > 8 ) announce strcharinfo( 0 ) + " got +" + getequiprefinerycnt( .@part ) + " now!", 0;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  52
  • Reputation:   7
  • Joined:  01/02/12
  • Last Seen:  

switch(getequiprefinerycnt(.@part)) {
case 9: announce strcharinfo(0) + " refine hes/her item for +9",bc_all; break;
case 10: announce strcharinfo(0) + " refine hes/her item for +10",bc_all; break;
}

i think some like this. i didn't test. put it after.

successrefitem .@part;

Edited by ocelote
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   0
  • Joined:  12/14/14
  • Last Seen:  

@patskie
i want this script too. but its can work in normal refine.
where must i put the this ?
if ( getequiprefinerycnt( .@part ) > 8 ) announce strcharinfo( 0 ) + " got +" + getequiprefinerycnt( .@part ) + " now!", 0;

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...