Replace
getequippercentrefinery(.@part) > rand(100)
by
getequippercentrefinery(.@part) >= 0
case 1: callsub S_RefineValidate,1,7620,50,.@part; break;
case 2: callsub S_RefineValidate,2,7620,200,.@part; break;
case 3: callsub S_RefineValidate,3,7620,5000,.@part; break;
case 4: callsub S_RefineValidate,4,7620,20000,.@part; break;
default: callsub S_RefineValidate,0,7619,2000,.@part; break;
The column before .@part is the cost in zeny (ie 50 in the 1st line, 200 in the second..)
prontera,157,181,5 script Soul L 992,9,9,{
deltimer strnpcinfo(0) +"::OnTwenty";
addtimer 20000, strnpcinfo(0) +"::OnTwenty";
end;
OnTwenty:
getmapxy .@map$, .@x, .@y, 0;
if( distance( .@x, .@y, .x_npc, .y_npc ) > 9 ) end;
addtimer 20000, strnpcinfo(0) +"::OnTwenty";
switch ( basejob ) {
case Job_Alchemist: set .@spirit, 445; break;
case Job_Monk: set .@spirit, 447; break;
case Job_Star_Gladiator: set .@spirit, 448; break;
case Job_Sage: set .@spirit, 449; break;
case Job_Crusader: set .@spirit, 450; break;
case Job_SuperNovice: set .@spirit, 451; break;
case Job_Knight: set .@spirit, 452; break;
case Job_Wizard: set .@spirit, 453; break;
case Job_Priest: set .@spirit, 454; break;
case Job_Bard: case Job_Dancer: set .@spirit, 455; break;
case Job_Rogue: set .@spirit, 456; break;
case Job_Assassin: set .@spirit, 457; break;
case Job_Blacksmith: set .@spirit, 458; break;
case Job_Hunter: set .@spirit, 460; break;
case Job_Soul_Linker: set .@spirit, 461; break;
default:
if ( upper == 1 && baselevel < 70 )
set .@spirit, 494;
}
if ( .@spirit ) {
sc_start4 sc_spirit, 360000, 5, .@spirit,0,0;
skilleffect .@spirit, 5;
}
end;
OnInit:
getmapxy .map_npc$, .x_npc, .y_npc, 1;
end;
}
Credit to Emistry for the Soul link
prontera,148,188,5 script Breaker Ladder 790,{
query_sql "SELECT `char`.char_id,`char`.`name`,global_reg_value.`value` "+
"FROM global_reg_value LEFT JOIN `char` ON global_reg_value.char_id=`char`.char_id WHERE global_reg_value.str='brokeemp' "+
"ORDER BY CAST(`global_reg_value`.`value` AS UNSIGNED) DESC LIMIT 10", .@char_id, .@name$, .@count;
mes "[ ^00FF00 Kaspersky ^000000 ]";
mes "Hello there "+strcharinfo(0)+", what do you want to do?";
menu "Check Emperium Break Points",-,"View Breaker Ladder",Llad,"Exchange Points",Lex, ( getgmlevel() > 98 ? "Reset Breaker" : "" ), L_reset, "Nothing",Lno;
next;
mes "[ ^00FF00 Kaspersky ^000000 ]";
mes "Hmm, wait a second, i'll go check my records..";
next;
mes strcharinfo(0)+"'s Emperium Break Points is ^FF0000"+brokeemp+"^000000 Point(s)";
close;
L_reset:
next;
mes "you really want to reset the breaker ?";
next;
if ( select( "yes","no" ) -1 ) close;
query_sql "DELETE FROM global_reg_value WHERE global_reg_value.`str` = 'brokeemp'";
mes "it's done ! you must log out/log in to see the change";
close;
Lno:
next;
mes "[ ^00FF00 Kaspersky ^000000 ]";
mes "Suit yourself..";
close;
Lex:
next;
mes "[ ^00FF00 Kaspersky ^000000 ]";
mes "What points would you like to exchange?";
mes "^FF0000Note: Check your inventory and weight before exchanging with me!";
menu "Emperium Break Points",-,"Nothing",Lno;
next;
mes "[ ^00FF00 Kaspersky ^000000 ]";
mes "What do you want to exchange with?";
menu "Billow",-,"Emblem of Solar God",Lesg,"Ripple",Lrip,"Silver Ornament",Lsil,"Wrath of Valkyrie",Lval;
next;
mes "[ ^00FF00 Kaspersky ^000000 ]";
mes "You need 75 Breaker Points for this..";
mes "Do you still want Billow?";
menu "Yes",-,"No",Lno;
if(brokeemp < 75) goto Lnep;
if(brokeemp >= 75)
next;
mes "Here you go!";
getitem 7091,1;
set brokeemp,brokeemp-75;
close;
Lnep:
next;
mes "[ ^00FF00 Kaspersky ^000000 ]";
mes "Not enough points!";
close;
Lesg:
next;
mes "[ ^00FF00 Kaspersky ^000000 ]";
mes "You need 75 Breaker Points for this..";
mes "Do you still want Emblem of Solar God?";
menu "Yes",-,"No",Lno;
next;
if(brokeemp < 75) goto Lnep;
if(brokeemp >= 75)
mes "[ ^00FF00 Kaspersky ^000000 ]";
mes "Here you go!";
getitem 7086,1;
set brokeemp,brokeemp-75;
close;
Lrip:
mes "[ ^00FF00 Kaspersky ^000000 ]";
mes "You need 75 Breaker Points for this..";
mes "Do you still want Ripple?";
menu "Yes",-,"No",Lno;
if(brokeemp < 75) goto Lnep;
if(brokeemp >= 75)
next;
mes "Here you go!";
getitem 7090,1;
set brokeemp,brokeemp-75;
close;
Lval:
mes "[ ^00FF00 Kaspersky ^000000 ]";
mes "You need 75 Breaker Points for this..";
mes "Do you still want Wrath of Valkyrie?";
menu "Yes",-,"No",Lno;
if(brokeemp < 75) goto Lnep;
if(brokeemp >= 75)
next;
mes "Here you go!";
getitem 7078,1;
set brokeemp,brokeemp-75;
close;
Lsil:
mes "[ ^00FF00 Kaspersky ^000000 ]";
mes "You need 75 Breaker Points for this..";
mes "Do you still want Silver Ornament?";
menu "Yes",-,"No",Lno;
if(brokeemp < 75) goto Lnep;
if(brokeemp >= 75)
next;
mes "Here you go!";
getitem 7077,1;
set brokeemp,brokeemp-75;
close;
Llad:
next;
for( set .@x,0; .@x<=9; set .@x,.@x+1 )
mes "^0000FF"+(.@x+1)+".^000000 "+.@name$[.@x]+" - ^FF0000"+.@count[.@x]+"^000000 Point(s)";
// .@x starts at 0, but you want to start with '1st', so use (.@x+1)
close;
}
If you make a duplicate of the npc (the npc for up the healer or the healer), they wouldn't have to re-up the skill... you wanted the guildmaster have to re-up the skill if you had another duplicate npc in another place ?
New sql part
alter table guild add column buff varchar(255) NOT NULL default '' after emblem_data, add index (buff);
NPC for up :
- script flop -1,{
if( !getcharid(2) ) {
mes "you are not in a guild !";
close;
}
else if( getguildmaster( getcharid(2) ) != strcharinfo(0) ) {
mes "I only talk to your guildmaster, go away !";
close;
}
query_sql "SELECT buff FROM guild WHERE guild_id = "+ getcharid(2), .@buff_type$;
if( getstrlen( .@buff_type$ ) )
explode( .@b$, .@buff_type$, "|" );
else {
for( .@i = 0; .@i < .size_buff; .@i++ )
.@b$[.@i] = "0";
}
mes "hello "+ strcharinfo(0) +", what do you want to up the skill in the guild healer today ?";
next;
.@s = select( .menu$ ) -1;
if( atoi(.@b$[.@s]) + .min_Levels == .max_Levels ) {
mes "Your current "+ .skills_$[.@s] +" skill's guild healer has already reached the max level.";
close;
}
mes "Your current "+ .skills_$[.@s] +" skill's healer is level ^0000ff("+ ( .min_Levels + atoi( .@b$[.@s] ) ) +")^000000.";
mes "It will cost ^0000ff"+ ( .cost_[atoi(.@b$[.@s]) +1] * .rate_buff_zeny[.@s] ) +"^000000 zeny to up this skill for your guild.";
next;
if( select( "Paid to up "+ .skills_$[.@s], "Leave" ) -1 ) close;
else if( Zeny < .cost_[atoi(.@b$[.@s]) +1] * .rate_buff_zeny[.@s] ) {
mes "You're kidding me? you don't have enough zeny.";
close;
}
Zeny = Zeny - .cost_[atoi(.@b$[.@s]) +1] * .rate_buff_zeny[.@s];
.@b$[.@s] = atoi( .@b$[.@s] ) +1;
.@a$ = implode( .@b$, "|" );
query_sql "update guild set buff = '"+ .@a$ +"' where guild_id = "+ getcharid(2);
mes "Your "+ .skills_$[.@s] +" skill's healer is now level ^0000ff("+ ( .min_Levels + atoi( .@b$[.@s] ) ) +")^000000. Congratulation !";
close;
OnInit:
deletearray .cost_;
deletearray .skills_$;
deletearray .skill_$;
deletearray .min_Levels;
deletearray .max_Levels;
deletearray .rate_buff_zeny;
setarray .skills_$, "agi", "bless", "Kyrie Eleison"; // add more skill here - think to add them also in the healer
setarray .min_Levels, 5, 5, 0; // min level of the skill boost in the healer
setarray .max_Levels, 10, 10, 10; // max level of the skill you can up
setarray .rate_buff_zeny, 1, 1, 1; // rate for zeny - ex: 2 to kyrie -> cost *2 ; 2/5 -> cost *2/5
setarray .cost_[1], 10000, 20000, 30000, 40000, 50000, 60000, 70000, 80000, 90000, 100000; // cost zeny to up the healer
.size_buff = getarraysize( .skills_$ );
.menu$ = implode( .skills_$, ":" );
end;
}
prontera,160,185,6 duplicate(flop) flop#1 909
Healer
- script Healer -1,{
if( getcharid(2) ) {
query_sql "SELECT buff FROM guild WHERE guild_id = "+ getcharid(2), .@buff_type$;
if( getstrlen( .@buff_type$ ) ) explode( .@b$, .@buff_type$, "|" );
}
set .@Price,0; // Zeny required for heal
set .@Buffs,1; // Also buff players? (1: yes / 0: no)
set .@Delay,0; // Heal delay, in seconds
callfunc "F_ClearGarbage",0;
if (@HD > gettimetick(2)) end;
if (.@Price) {
message strcharinfo(0),"Healing costs "+.@Price+" Zeny.";
if (Zeny < .@Price) end;
if(select("^0055FFHeal^000000:^777777Cancel^000000") == 2) close;
set Zeny, Zeny-.@Price;
}
specialeffect2 EF_HEAL2; percentheal 100,100;
if (.@Buffs) {
for( .@i = 0; .@i < .size_buff; .@i++ ) {
.@sum = atoi(.@b$[.@i]) + .min_Levels[.@i];
.@j = .Buffs$[.@i];
if( .@sum )
sc_start .@j,240000,.@sum;
}
}
if (.@Delay) set @HD, gettimetick(2)+.@Delay;
close;
OnInit:
deletearray .Buffs$;
deletearray .min_Levels;
setarray .Buffs$, SC_INCREASEAGI, SC_BLESSING, SC_KYRIE; // in the same order than .skills_$ in guild up healer
setarray .min_Levels, 5, 5, 0;// min level of the skill boost - default: agi (5), bless (5), kyrie (0)
.size_buff = getarraysize( .Buffs$ );
end;
}
prontera,163,185,6 duplicate(Healer) Healer#alb 909
This setting is at the end of the script
OnInit:
setarray .Rebirth[0],99,50; // Minimum base level, job level to rebirth OR change to third class
setarray .JobReq[0],10,40; // Minimum job level to turn into 1st class, 2nd class
set .ThirdClass,1; // Enable third classes? (1: yes / 0: no)