//===== Hercules Script ======================================
//= Healer
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
//= 1.2
//===== Description: =========================================
//= Basic healer script.
//===== Additional Comments: =================================
//= 1.0 Initial script.
//= 1.1 Aligned coordinates with @go.
//= 1.2 Fix variables and character stuck at healing
//============================================================
- script HealerZ FAKE_NPC,{
.@time = 3600000; // the buff last whole hour
.@Delay = 5; // Heal delay, in seconds
if (@HD > gettimetick(2))
if ( @heal_cooldown + .@cooldown > gettimetick(2) ) {
message(strcharinfo(0), "Power are cooling down do wait for " + ( @HD + .@Delay - gettimetick(2) ) + "seconds.");
end;
}
callfunc("F_Repairall");
callfunc("F_IdentifyUnidentified");
callfunc("F_ConvertStone");
// disable negative buffs
sc_end SC_STONE;
sc_end SC_FREEZE;
sc_end SC_STUN;
sc_end SC_SLEEP;
sc_end SC_POISON;
sc_end SC_CURSE;
sc_end SC_SILENCE;
sc_end SC_CONFUSION;
sc_end SC_BLIND;
sc_end SC_BLOODING;
sc_end SC_DPOISON;
sc_end SC_FEAR;
sc_end SC_COLD;
sc_end SC_BURNING;
sc_end SC_DEEP_SLEEP;
sc_end SC_DEC_AGI;
sc_end SC_BROKENARMOR;
sc_end SC_BROKENWEAPON;
sc_end SC_NOEQUIPWEAPON;
sc_end SC_NOEQUIPSHIELD;
sc_end SC_NOEQUIPARMOR;
sc_end SC_NOEQUIPHELM;
sc_end SC__STRIPACCESSARY;
sc_end SC_PROPERTYUNDEAD;
sc_end SC_ORCISH;
sc_end SC_BERSERK;
sc_end SC_SKE;
sc_end SC_SWOO;
sc_end SC_SKA;
sc_start SC_WINDWALK,.@time,5;
// sc_start SC_KAITE,.@time,7;
// sc_start SC_KAUPE,.@time,3;
// sc_start SC_KAAHI,.@time,7;
// sc_start SC_KAIZEL,.@time,7;
sc_start SC_ENDURE,.@time,10;
sc_start SC_ANGELUS,.@time,10;
sc_start SC_MAGNIFICAT,.@time,5;
sc_start SC_GLORIA,.@time,5;
sc_start SC_ADRENALINE2,.@time,1;
sc_start SC_IMPOSITIO,.@time,5;
sc_start SC_SUFFRAGIUM,.@time,3;
sc_start SC_KYRIE, .@time, 10;
sc_start SC_CONCENTRATION, .@time, 10;
sc_start SC_ANGELUS, .@time, 10;
sc_start SC_FOOD_STR,.@time, 1000;
sc_start SC_FOOD_AGI,.@time, 1000;
sc_start SC_FOOD_VIT,.@time, 1000;
sc_start SC_FOOD_INT,.@time, 1000;
sc_start SC_FOOD_DEX,.@time, 1000;
sc_start SC_FOOD_LUK,.@time, 1000;
sc_start SC_FOOD_BASICHIT,.@time,3600;
sc_start SC_FOOD_BASICAVOIDANCE,.@time,3600;
specialeffect(EF_HEAL2, AREA, playerattached()); percentheal 100,100;
specialeffect(EF_INCAGILITY, AREA, playerattached()); sc_start SC_INC_AGI,.@time,10;
specialeffect(EF_BLESSING, AREA, playerattached()); sc_start SC_BLESSING,.@time,10;
//xsa// sc_start SC_BLESSING,.@time,10;
//xsa// sc_start SC_INCAGI,.@time,10;
sc_start SC_INCASPDRATE,.@time,0;
// sc_start SC_SOULLINK,3000000,5;
specialeffect(EF_RECOVERY, AREA, playerattached());
// give player's soul link
if ( .@spirit = .spirit[BaseJob] );
else if ( Upper & 1 && BaseLevel < 70 )
.@spirit = SL_HIGH;
if ( .@spirit ) {
sc_start4 SC_SOULLINK, .@time, 1, .@spirit,0,0;
skilleffect .@spirit, 1;
}
if (.@Delay) @HD = gettimetick(2)+.@Delay;
end;
OnInit:
.spirit[Job_Alchemist] = SL_ALCHEMIST;
.spirit[Job_Monk] = SL_MONK;
.spirit[Job_Star_Gladiator] = SL_STAR;
.spirit[Job_Sage] = SL_SAGE;
.spirit[Job_Crusader] = SL_CRUSADER;
.spirit[Job_SuperNovice] = SL_SUPERNOVICE;
.spirit[Job_Knight] = SL_KNIGHT;
.spirit[Job_Wizard] = SL_WIZARD;
.spirit[Job_Priest] = SL_PRIEST;
.spirit[Job_Bard] = .spirit[Job_Dancer] = SL_BARDDANCER;
.spirit[Job_Rogue] = SL_ROGUE;
.spirit[Job_Assassin] = SL_ASSASIN;
.spirit[Job_Blacksmith] = SL_BLACKSMITH;
.spirit[Job_Hunter] = SL_HUNTER;
.spirit[Job_Soul_Linker] = SL_SOULLINKER;
end;
}
function script F_Repairall {
if( getbrokencount() > 0 ) {
repairall;
specialeffect(EF_REPAIRWEAPON, AREA, playerattached());
}
return;
}
function script F_IdentifyUnidentified {
//identify all player's equipments
getinventorylist();
for( .@i = 0; .@i < @inventorylist_count; .@i++ ) {
if ( @inventorylist_identify[.@i] == 1 ) {
continue;
} else if ( getskilllv("MC_IDENTIFY") == 1 && Sp >= 10 ) {
heal 0,0; // lol... this is supposed to reduce their SP by 10, whatever
npctalk("MC_IDENTIFY");
} else if ( countitem("Spectacles") ) {
delitem(Spectacles, 1);
npctalk("Spectacles deleted 1!"); //debuglines
} else if ( getskilllv("RG_COMPULSION") && Zeny >= ( 100 - ( 5 + 4 * getskilllv("RG_COMPULSION") ) )* 2/5 ) {
Zeny -= ( 100 - ( 5 + 4 * getskilllv("RG_COMPULSION") ) )* 2/5;
npctalk("RGCompulsion"); //debuglines
} else if ( getskilllv("MC_DISCOUNT") && Zeny >= ( 100 - ( 5 + 2 * getskilllv("MC_DISCOUNT") ) )* 2/5 ) {
Zeny -= ( 100 - ( 5 + 2 * getskilllv("MC_DISCOUNT") ) )* 2/5;
npctalk("MC_DISCOUNT"); //debuglines
} else if ( Zeny >= 40 ) {
Zeny -= 40;
npctalk("40z deducted."); //debuglines
} else if ( Zeny <= 39 ) {
npctalk("Zeny < 39."); //debuglines
return;
}
delitem2(@inventorylist_id[.@i], 1, 0, 0, 0, 0, 0, 0, 0);
getitem2(@inventorylist_id[.@i], 1, 1, 0, 0, 0, 0, 0, 0);
.@icount++;
}
if ( .@icount > 0 ) {
message(strcharinfo(0), "Identified "+ .@icount +" Items.");
}
return;
}
function script F_ConvertStone {
// automatically turn all oridecon and elunium stone into pure stone to reduce player's weight
.@ori = countitem(Oridecon_Stone);
if ( .@ori >= 5 ) {
delitem(Oridecon_Stone, .@ori / 5 * 5);
getitem(Oridecon, .@ori / 5);
message(strcharinfo(0), "Refined "+ ( .@ori / 5 * 5 ) +" Oridecon Stones, got "+ ( .@ori / 5 ) +" Oridecons.");
}
.@elu = countitem(Elunium_Stone);
if ( .@elu >= 5 ) {
delitem(Elunium_Stone, .@elu / 5 * 5);
getitem(Elunium, .@elu / 5);
message(strcharinfo(0), "Refined "+ ( .@elu / 5 * 5 ) +" Elunium Stones, got "+ ( .@elu / 5 ) +" Eluniums.");
}
return;
}
prontera,162,193,4 duplicate(HealerZ) Healer#prt 2_M_SAGE_B //4_PORING