Jump to content
  • 0

Refiner Omni-Oridecon and Mega-Eluniun


Tassadar

Question


  • Group:  Members
  • Topic Count:  52
  • Topics Per Day:  0.02
  • Content Count:  107
  • Reputation:   5
  • Joined:  07/21/16
  • Last Seen:  

Good evening ... I was searching the Forum and I did not find any npc that used items 6438 (Omni-Oridecon) and 6439 (Mega-Eluniun) correctly.

I even found some npc that exchange the refinameto for items. but how to implement the correct percentages of items?

If anyone knows of any npc that do this, please link me the same one for me to use. If such a npc does not exist let me know that I will hire some scripter to do for us.

Tks for all.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  22
  • Reputation:   11
  • Joined:  07/16/17
  • Last Seen:  

The actual percentage of refinement is on refine_db.yml right inside your database folder (.../db/re/refine_db.yml for example).

To do this (in database) without excluding other materials or replace it by another, you'll have to create a new "Type" of refinement (I did this to add this materials to my Refine UI without excluing anothers).

Try this code made by me:

function	script	omnirefine	{
	.@name$ = getarg(0);
	/// Custom chances 1 to 20.
	setarray .@refine_chances[1], 100, 100, 100, 100, 95, 80, 80, 50, 50, 35, 20, 20, 16, 16, 15, 15, 14, 14, 10, 10;
	/// Equipment position names (Don't edit that order).
	setarray .@equip_name$[1],"Head","Middle","Lower","Armor","Weapon","Shield","Garment","Shoes","Accessory 1","Accessory 2";
	/// Weapon material
	.@weapon_material = 6438; // Omni-Oridecon
	/// Armor material
	.@armor_material = 6439; // Mega-Elunium

	disable_items;
	mes "["+ .@name$ +"]";
	mes "I am the best Armsmith ever!";
	mes "I don't refine with normal, boring materials.";
	mes "I only refine items using ^003366" + getitemname(.@weapon_material) + "^000000 and ^003366" + getitemname(.@armor_material) + "^000000.";
	next;
	mes "["+ .@name$ +"]";
	mes "Anyway, you may use my services if you have any of that materials.";
	mes "What do you want me to refine?";
	next;

	setarray .@equip_pos[1],EQI_HEAD_TOP,EQI_HEAD_MID,EQI_HEAD_LOW,EQI_ARMOR,EQI_HAND_R,EQI_HAND_L,EQI_GARMENT,EQI_SHOES,EQI_ACC_R,EQI_ACC_L;
	for (.@i = 1; .@i <= getarraysize(.@equip_pos); ++.@i) {
		if (getequipisequiped(.@equip_pos[.@i]))
			.@menu$ += getequipname(.@equip_pos[.@i]);
		else
			.@menu$ += "^777777" + .@equip_name$[.@i] + " - " + "[Unavailable]" + "^000000";
		.@menu$ += ":";
	}
	.@part = .@equip_pos[select(.@menu$)];
	.@equip_id = getequipid(.@part);
	.@refinerycnt = getequiprefinerycnt(.@part);
	if (!getequipisequiped(.@part)) { //custom check
		mes "["+ .@name$ +"]";
		mes "You're not wearing";
		mes "anything there that";
		mes "I can refine.";
		emotion ET_FRET;
		close;
	}
	if (!getequipisenableref(.@part)) {
		mes "["+ .@name$ +"]";
		mes "I don't think I can";
		mes "refine this item at all...";
		close;
	}
	if (.@refinerycnt >= 20) { //custom check
		mes "["+ .@name$ +"]";
		mes "I can't refine this";
		mes "any more. This is as";
		mes "refined as it gets!";
		close;
	}
		 if (getiteminfo(.@equip_id,2) == 5) .@material = .@weapon_material;
	else if (getiteminfo(.@equip_id,2) == 4) .@material = .@armor_material;

	if ((getequipweaponlv(.@part) >= 1) && (getequipweaponlv(.@part) <= 4)) {
		.@article$ = "a";
		.@type$ = "weapon";
	} else {
		.@article$ = "an";
		.@type$ = "armor";
	}
	
	mes "["+ .@name$ +"]";
	mes "Hmm " + .@article$ + " " + .@type$ + ", is that ok?";
	mes "If you want to refine this " + .@type$ + ",";
	mes "I will need 1 ^003366" + getitemname(.@material) + "^000000.";
	mes "Are you sure you want to continue?";
	next;
	if(select("Yes:No") == 2){
		mes "["+ .@npc_name$ +"]";
		mes "Hm... if you mind... never mind...";
		close;
	}
	while (1) {
		.@refinerycnt = getequiprefinerycnt(.@part);
		if (countitem(.@material) < 1) {
			mes "["+ .@name$ +"]";
			mes "Hm. You don't seem to have enough  "+getitemname(.@material)+".";
			mes "Please come back when you have them.";
			close;
		}
		delitem .@material,1;
		// anti-hack
		if (callfunc("F_IsEquipIDHack", .@part, .@equip_id) ||
		    callfunc("F_IsEquipRefineHack", .@part, .@refinerycnt)) {
			mes "["+ .@name$ +"]";
			emotion ET_FRET;
			mes "Wait a second...";
			mes "Do you think I'm stupid?!";
			mes "You switched the item while I wasn't looking! Get out of here!";
			close;
		}
		if (.@refine_chances[.@refinerycnt+1] > rand(100)) {
			mes "["+ .@name$ +"]";
			mes "Clang! Clang! Clang! Clang!";
			successrefitem .@part;
			next;
			emotion ET_BEST;
			mes "["+ .@name$ +"]";
			mes "Good! Succes!!!";
			mes "I am the best Armsmith.";
			next;
		} else {
			if (rand(100) < 80) {
				mes "["+ .@name$ +"]";
				mes "Clang! Clang! Clang! Clang!";
				downrefitem .@part,0; // Only for the fail refinement animation
				next;
				emotion (!rand(5))?ET_MONEY:ET_HUK;
				mes "["+ .@name$ +"]";
				mes "Ahhh!!!";
				next;
				mes "["+ .@name$ +"]";
				mes "Oh my god!";
				mes "The upgrade level has dropped...";
			} else {
				mes "["+ .@name$ +"]";
				mes "Clang! Clang! Clang!";
				downrefitem .@part,0; // Only for the fail refinement animation
				next;
				emotion (!rand(5))?ET_MONEY:ET_HUK;
				mes "["+ .@name$ +"]";
				mes "Hmmm!";
				next;
				mes "["+ .@name$ +"]";
				mes "Oh my! I've failed to refine stuff...";
				mes "I didn't mean it!";
			}
			mes "I could have made a mistake even though I am the best Armsmith ever.";
			mes "It just wasn't meant to be.";
			next;
			mes "["+ .@name$ +"]";
			mes "I will do a better job next time! Don't worry!";
			next;
		}
		mes "["+ .@name$ +"]";
		mes "Do you want to refine again?";
		next;
		if(select("Yes:No") == 2){
			mes "["+ .@npc_name$ +"]";
			mes "Hm... if you mind... never mind...";
			close;
		}
	}

	return;
}

prt_in,56,54,3	script	Refiner#1	826,{
	callfunc "omnirefine","^0000FFBlessed Refiner^000000";
	end;
}

 

Edited by Sindit
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...