OnScrollbuffs:
//ensure that these indices are consistent!
setarray .@items[0], 12219, 12220, 14520, 14518, 14519, 14517, 12351 ;
setarray .@status[0], SC_WINDWALK, SC_ADRENALINE, SC_CP_WEAPON, SC_CP_SHIELD, SC_CP_ARMOR, SC_CP_HELM, SC_LOUD ;
setarray .@skill[0], 383, 111, 234, 235, 236, 237, 155 ;
setarray .@level[0], 10, 5, 5, 5, 5, 5, 1 ;
setarray .@onself[0], 0, 0, 0, 0, 0, 0, 1 ;
for(set .@i, 0; .@i < getarraysize(.@items); set .@i, .@i + 1)
{
if(countitem(.@items[.@i]) > 0 && sc_check(.@status[.@i]) == 0)
{
if(.@status[.@i] == SC_ADRENALINE) // to ensure that adrenaline scrolls are only consumed with mace/1h/2axes equipped
{
set .@weapontype, getiteminfo(getequipid(EQI_HAND_R),11);
if(.@weapontype < 6 || .@weapontype > 8)
continue;
}
//dispbottom .@npcgid + " sk: " + .@skill$[.@i] + " lv: " + .@level[.@i] + " cid: " + .@chargid;
if( .@onself[.@i] == 0)
unitskilluseid .@npcgid, .@skill[.@i], .@level[.@i], .@chargid;
else
unitskilluseid .@chargid, .@skill[.@i], .@level[.@i];
delitem .@items[.@i], 1;
}
}