Adding Ava’s accumulator to the game
This is a guide on adding working ava’s accumulator to your own server.
The ammo save rate is set to 80% and arrows never dropping, if ava equipped
This isn’t a tutorial on why everything is added
In short: we are checking for a cape slot, if ava is equipped it rolls for 80% chance of saving arrows.
225 revision compatible ava’s wear and ground models (ZIP)
https://mega.nz/file/ClQmRAZT#xupnD8htRP33usfpiykJ3rBIhnM6FR1_qemlofoCFeE
To add custom models, refer to this guide:
capes.obj
Add this to the bottom
[ava_accumulator]
cost=32
name=Ava's accumulator
desc=A superior bagged chicken ready to serve you, magnet in claw.
model=ava_ground
2dxof=-4
2dyof=-1
2dzoom=976
2dyan=1120
2dxan=567
iop2=Wear
wearpos=back
manwear=ava_man_wear,0
womanwear=ava_woman_wear,0
weight=1lb
param=rangeattack,4
param=slashdefence,1
param=magicdefence,4
player_ranged.rs2
ctrl+f anim(%com_attackanim, 0);
above add:
def_obj $back = inv_getobj(worn, ^wearpos_back);
few lines down find def_int $delay = ...
change to:
def_int $delay = add(~player_ranged_use_weapon($rhand, $ammo, $back), 30);
ctrl+f [proc,player_ranged_use_weapon]
change it to:
[proc,player_ranged_use_weapon](obj $rhand, obj $ammo, obj $back)(int)
switch_category(oc_category($rhand)) {
case weapon_bow, weapon_crossbow : return(~ranged_shoot_npc($ammo, $back));
case weapon_thrown, weapon_javelin : return(~ranged_throw_npc($ammo));
case default : return(30); // idk some random default delay just in case shouldnt happen tho
}
under that, [proc,ranged_shoot_npc]
change it to:
[proc,ranged_shoot_npc](obj $ammo, obj $back)(int)
if($ammo = ogre_arrow) spotanim_pl(oc_param($ammo, proj_launch), 50, 0);
else spotanim_pl(oc_param($ammo, proj_launch), 96, 0);
if($back ! ava_accumulator | random(5) = 0) {
inv_del(worn, $ammo, 1);
}
return(~npc_projectile(coord, npc_uid, oc_param($ammo, proj_travel), 40, 36, 41, 15, 5, 11, 5));
ctrl+f if ($ammo = holy_water)
above this add:
if($back ! ava_accumulator) {
~ranged_dropammo_npc($ammo, 5, sub(divide($delay, 30), 2));
}
Clean, Build, Run
Ava’s accumulator should be working now
get it with ::give ava_accumulator
Good luck with developing and happy scaping!