nuna 2 Posted July 2, 2014 So here it is. i want an refiner that if the item is already +4 and the player wants to upgrade it, it will cost 5 proof of donation for +5 with a 100% chance if the item is already +5 and the player wants to upgrade it, it will cost 10 proof of donation for +6 with a 100% chance if the item is already +6 and the player wants to upgrade it, it will cost 15 proof of donation for +7 with a 80% chance( will announce "player name" has upgrade +7 "item") if the item is already +7 and the player wants to upgrade it, it will cost 16 proof of donation for +8 with a 70% chance ( will announce "player name" has upgrade +8 "item") if the item is already +8 and the player wants to upgrade it, it will cost 18 proof of donation for +9 with a 60% chance ( will announce "player name" has upgrade +9 "item") if the item is already +9 and the player wants to upgrade it, it will cost 20 proof of donation for +10 with a 50% chance ( will announce "player name" has upgrade +10 "item") Quote Share this post Link to post Share on other sites
0 Alexandria 53 Posted July 15, 2014 any help? thank you. Quote Share this post Link to post Share on other sites
0 Guest Posted July 23, 2014 I already posted it in rAthena: function script refinemain { disable_items; 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 .@equipped,1; } set .@menu$, .@menu$ + ":"; } if (.@equipped == 0) { mes "[" + getarg(0) + "]"; mes "I don't think I can refine any items you have..."; close; } set .@part, select(.@menu$); if(!getequipisequiped(.@part)) { //custom check mes "[" + getarg(0) + "]"; mes "You're not wearing"; mes "anything there that"; mes "I can refine."; emotion e_an; 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 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; //Elunium set .@safe,4; break; case 1: //Refine Level 1 Weapon set .@price,50; set .@material,1010; //Phracon set .@safe,7; break; case 2: //Refine Level 2 Weapon set .@price,200; set .@material,1011; //Emveretarcon set .@safe,6; break; case 3: //Refine Level 3 Weapon set .@price,5000; set .@material,984; //Oridecon set .@safe,5; break; case 4: //Refine Level 4 Weapon set .@price,20000; set .@material,984; //Oridecon set .@safe,4; break; case 5: //Refine other stuff? set .@price,2000; set .@material,985; //Elunium set .@safe,4; break; } // If the VIP system is enabled, the prices for non-VIP players are considerably higher. if (VIP_SCRIPT && !vip_status(1)) { switch(getequipweaponlv(.@part)) { 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; case 5: set .@price, .@price * 10; 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; } .@g = getequippercentrefinery(.@part); //dispbottom "getequ .@g : " + .@g; if(.@safe == 4){ //dispbottom .@refinerycnt; if(.@refinerycnt >= 4){ mes "Do you want to use Donation-Refiner?"; if(select("Yes:No") == 1){ next; //dispbottom "Check: mit Item"; if(.@refinerycnt == 4){ .@w = 100; .@z = 5; //dispbottom .@w; }else if(.@refinerycnt == 5 ){ .@w = 100; .@z = 10; //dispbottom .@w; }else if(.@refinerycnt == 6 ){ .@w = 80; .@z = 15; //dispbottom .@w; }else if(.@refinerycnt == 7 ){ .@w = 70; .@z = 16; //dispbottom .@w; }else if(.@refinerycnt == 8 ){ .@w = 60; .@z = 18; //dispbottom .@w; }else if(.@refinerycnt == 9 ){ .@w = 50; .@z = 20; //dispbottom .@w; } mes "[" + getarg(0) + "]"; mes "You need: "+ .@z + " " + getitemname( 7179 ); next; if(select("Yes:No") == 1 && ( countitem( 7179 ) > .@z )){ delitem 7179,.@z; .@g = .@w; }else{ mes "[" + getarg(0) + "]"; mes "Not enought " + getitemname( 7179 ); close; } }else{ .@g = .@w; next; } } } if(.@g < 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; //custom checks if(.@g == 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 mes "[" + getarg(0) + "]"; emotion e_an; 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; } //dispbottom getequippercentrefinery(.@part); wieviel % auf succes! //dispbottom .@refinerycnt; UPGRADELVL! //dispbottom "Check: Versuch zu Upgraden"; if(.@g <= rand(100)) { //dispbottom getequippercentrefinery(.@part); failedrefitem .@part; mes "[" + getarg(0) + "]"; emotion (!rand(5))?e_cash:e_omg; 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; } Quote Share this post Link to post Share on other sites
So here it is. i want an refiner that if the item is already +4 and the player wants to upgrade it, it will cost
5 proof of donation for +5 with a 100% chance
if the item is already +5 and the player wants to upgrade it, it will cost
10 proof of donation for +6 with a 100% chance
if the item is already +6 and the player wants to upgrade it, it will cost
15 proof of donation for +7 with a 80% chance( will announce "player name" has upgrade +7 "item")
if the item is already +7 and the player wants to upgrade it, it will cost
16 proof of donation for +8 with a 70% chance ( will announce "player name" has upgrade +8 "item")
if the item is already +8 and the player wants to upgrade it, it will cost
18 proof of donation for +9 with a 60% chance ( will announce "player name" has upgrade +9 "item")
if the item is already +9 and the player wants to upgrade it, it will cost
20 proof of donation for +10 with a 50% chance ( will announce "player name" has upgrade +10 "item")
Share this post
Link to post
Share on other sites