Jump to content

  •  

frenzmu06

Member Since 01 Mar 2013
Offline Last Active Feb 25 2017 03:17 AM
-----

Topics I've Started

Request:Refine ticket trader

02 September 2016 - 08:35 PM

Requesting a script that trades refine tickets for weapon or armor with upgrade
 
the npc will trade Weapon (listed in weaponarray) with the specified refine for
+12 Weapon =Guarantee_Weapon_11Up
+10 Weapon =Guarantee_Weapon_9Up
+9 Weapon =Guarantee_Weapon_8Up
+8 Weapon =Guarantee_Weapon_7Up
+7 Weapon =Guarantee_Weapon_6Up
 
and Armor (listed in armorarray) with the specified refine for
+12 Armor =Guarantee_Armor_11Up
+10 Armor =Guarantee_Armor_9Up
+9 Armor =Guarantee_Armor_8Up
+8 Armor =Guarantee_Armor_7Up
+7 Armor =Guarantee_Armor_6Up
 
 
- script Ticket Trader FAKE_NPC{
 
mes "I trade weapons and armors with specific refines for Refine Tickets";
menu (Trade Weapon, Trade Armor)
show available items from inventory including eqquiped item
trade the item
 
//configs
weaponticketarray,6238,6228,6229,6230,6231;
//6238 Guarantee_Weapon_11Up
//6228 Guarantee_Weapon_9Up
//6229 Guarantee_Weapon_8Up
//6230 Guarantee_Weapon_7Up
//6231 Guarantee_Weapon_6Up
 
weaponarray,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112; //you can add more or modify
//1101 Sword
//1102 Sword_
//1103 Sword__
//1104 Falchion
//1105 Falchion_
//1106 Falchion__
//1107 Blade
//1108 Blade_
//1109 Blade__
//1110 Lapier
//1111 Lapier_
//1112 Lapier__
 
armorticketarray,6239,6232,6233,6234,6235
//6239 Guarantee_Armor_11Up
//6232 Guarantee_Armor_9Up
//6233 Guarantee_Armor_8Up
//6234 Guarantee_Armor_7Up
//6235 Guarantee_Armor_6Up
 
armorarray,2302,2304,2306,2308,2310,2311,2313,2315,2317,2318,2319; //you can add more
//2302 Cotton_Shirt_
//2304 Leather_Jacket_
//2306 Adventurere's_Suit_
//2308 Mantle_
//2310 Coat_
//2311 Mink_Coat
//2313 Padded_Armor_
//2315 Chain_Mail_
//2317 Plate_Armor_
//2318 Clothes_Of_The_Lord
//2319 Glittering_Clothes
 
tnx if anyone helps

Request:

20 August 2016 - 01:48 PM

//===== rAthena Script ============================================
//= High Quick Refinement System
//===== By: =======================================================
//= Kenedos
//===== Current Version: ==========================================
//= 1.0
//===== Compatible With: ==========================================
//= rAthena SQL/TXT
//===== Description: ==============================================
//= Allows players to quickly refine their gear
//===== Topic =====================================================
//= Unknown
//===== Additional Comments: ======================================
//= Warning : If your server lags too much, you have to look for
//= the "sleep2" command and increase the delay past 300.
//=
//= Make sure you disable the normal refine.txt from eAthena before
//= enabling this one (else it will conflict with existing one)
//=================================================================

prt_in,59,55,3	script	Great Balthazar	813,{
	callfunc "highrefinemain","Balthazar";
	end;
}

morocc_in,73,35,3	script	Great Galadrel	813,{
	callfunc "highrefinemain","Galadrel";
	end;
}

payon,147,173,3	script	Great Adramelech	813,{
	callfunc "highrefinemain","Adramelech";
	end;
}

alberta_in,25,63,3	script	Great Azrael	813,{
	callfunc "highrefinemain","Azrael";
	end;
}

yuno_in01,167,23,3	script	Great Lannor	813,{
	callfunc "highrefinemain","Lannor";
	end;
}

ein_in01,23,82,3	script	Great Baulfor	813,{
	callfunc "highrefinemain","Baulfor";
	end;
}

lhz_in02,278,20,3	script	Great Kandror	813,{
	callfunc "highrefinemain","Kandror";
	end;
}

function	script	highrefinemain	{

	mes "[" + getarg(0) + "]";
	mes "Looking for more power, eh? I can high refine your equipments.";
	mes "That is, attempt to refine them past +10 refine rates.";
	mes "^0000FFJust have equipped your +10 gear, and they will be shown in the list.^000000";
	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) && (getequiprefinerycnt(.@i) >= 10) )
			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 "Hey, you must have equipped +10 or above gears so that they can be highly refined.";
		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 are bellow +10 (Double check?)
	if(getequiprefinerycnt(.@part) < 10) {
		mes "[" + getarg(0) + "]";
		mes "I can't refine this.";
		mes "Talk to the normal blacksmith to";
		mes "refine this up to +10 first.";
		close;
	}
	set .@refineitemid, getequipid(.@part); // save id of the item
	set .@refinerycnt, getequiprefinerycnt(.@part); //save refinery count
	switch(getequipweaponlv(.@part)){
	
	// ----------- Refine Prices, Materials and Safe Refines ---------- //
	
	case 0: 	//Refine Armor
		set .@price,50000;
		set .@material,6223;
		break;
	case 1: 	//Refine Level 1 Weapon
		set .@price,10000;
		set .@material,6224;
		break;
	case 2: 	//Refine Level 2 Weapon
		set .@price,20000;
		set .@material,6224;
		break;
	case 3: 	//Refine Level 3 Weapon
		set .@price,60000;
		set .@material,6224;
		break;
	case 4: 	//Refine Level 4 Weapon
		set .@price,120000;
		set .@material,6224;
		break;
	case 5: 	//Refine other stuff?
		set .@price,50000;
		set .@material,6223;
		break;
		
	// ------------------------------------------------------------------ //
		
	}

	next;
	mes "[" + getarg(0) + "]";
	mes "So how many times would you like me to high refine your item?";
	next;
	input .@refinecnt;
	set .@refinecheck,.@refinecnt + getequiprefinerycnt(.@part);
	if (.@refinecnt < 1 || .@refinecheck > 20) {
		mes "[" + getarg(0) + "]";
		mes "I can't high 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;
	mes "[" + getarg(0) + "]";
	if ( !.@allinv)
		mes "This will try to high refine the equipment " + (.@refinecheck - getequiprefinerycnt(.@part)) + " times. If it fails, your equipment will be pulverized.";
	else
		mes "Remember this will attempt to high 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 "Ha, just as I thought!";
		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) ) && (@inventorylist_refine[.@j] >= 10)) {
				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 "I only work with ^0000FFBradiums^000000, ^009933Kaluniums^000000 and ^FF0000Zeny^000000, pal.";
			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) {
				mes "[" + getarg(0) + "]";
				mes "What, you changed your equipment!?!";
				mes "You moron!";
				next;
				atcommand "@nuke "+strcharinfo(0);
				end;
			}
			mes "Clang, clang!!!";
			if(getequippercentrefinery(.@part) <= rand(100)) {
				failedrefitem .@part;
				emotion 23;
				mes "[" + getarg(0) + "]";
				mes "Hey, it broke, but don't blame me. Your item sucked.";
				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 high 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 "You have no zeny or materials. Get lost.";
			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 (checkweight(.@refineitemid,1) == 0 ) {
				next;
				mes "[" + getarg(0) + "]";
				mes "Hey you are overweight, try storing some items first.";
				close;
			}
			
			if (getequipid(.@part) != .@refineitemid) {
				mes "[" + getarg(0) + "]";
				mes "What, you changed your equipment!?!";
				mes "You moron!";
				next;
				atcommand "@nuke "+strcharinfo(0);
				end;
			}
			
			if (getequiprefinerycnt(.@part) < 10) {
				next;
				mes "[" + getarg(0) + "]";
				mes "You changed your equipment!";
				mes "You douchebag!!";
				next;
				atcommand "@nuke "+strcharinfo(0);
				end;
			}
			
			if (!M_quickref) {
				set .@rand, rand(1,4);
				if (.@rand == 1)
					mes "WaCLANG clang CLANG!";
				else if (.@rand == 2)
					mes "Crack clang CLaNG ClAnG!";
				else if (.@rand == 3)
					mes "CRaCk ClAnG ClANg!";
				else if (.@rand == 4)
					mes "CraCK CrAck CLaNG!!";
			}
			else if (!.@breakme) {
				mes "ClAng ClanG ^FF0000CRACK^000000 ClanG Clangg CLAgn ^FF0000CRACK^000000 Cnaglnac CLnacnlnagCALNGa ClangaglnaCLAnagacalNCagaCLNAangCRACKalncalclanCLANGlancLANgacln!!!";
				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;
					sleep2 300;
			}
		}
	}
	mes "[" + getarg(0) + "]";
	mes "All finished... Come again soon.";
	close;		
}


can someone make a +1~10 refine for this script, (it currently can refine 11~20 only)

requesting also for a configuration for success rate for every refine level (1~4 = safe, 5~10 configs)

tnx


Request: extra monster drop

03 August 2016 - 11:35 AM

Hello good day, can anyone with good scripting knowledge help finish this script. so what the script does is it's triggered by killing a monster from the list and it'll give the specified zeny and cash point to the killer (100%), there is also a 10% chance that the killer gets the listed items (if there are).
i copied the array format from Stolao's DailyReward. 
 
-	script	ExtraDrop	-1,{
OnNPCKillEvent:
	if (killedrid == <monster id>)	{
			#CASHPOINTS += <cash points>;
			Zeny += <zeny amount>;
		}
		if ()rand(1000) < 10 ) 			//Chance: 100 = 10%, 10 = 1%, etc.
				getitem <item ids>, <item amounts>;
	end;
OnInit:
	//		Monster & Drop List:
	//		"<Monster ID>|<Zeny>|<Cash Points>|<itemID-1>|<amount-1>|<itemID-2>|<amount-2>...etc",
	setarray .mvpmonsterdrop$[1],
		"1112,5000,2,504,10",			//	Drake: 5000 Zeny + 2 Cash Points +10 White Potion
		"1115,3000,1,504,10,506,10",		//	Eddga: 3000 Zeny + 1 Cash Points +10 White Potion + 10 Green Potion
		"2098,4000,0,504,10,506,10,505,10",	//	Doppelganger: 4000 Zeny + 1 Cash Points +10 White Potion + 10 Green Potion + 10 Blue Potion
		"1120,1000";				// 	Ghostring:	1000 Zeny
	end;
}