(ti_on_weapon_attack,1,0,[
(multiplayer_is_server),
(store_trigger_param_1, ":agent_no"),
(gt,":agent_no",0),
(agent_is_alive,":agent_no"),
(agent_get_horse,":horse_agent_no",":agent_no"),
(ge,":horse_agent_no",0), #Trying to minimise CPU time ASAP, by limiting to cav quickly
(agent_get_wielded_item,":item_id",":agent_no"),
(item_get_type,":item_type",":item_id"),
(eq,":item_type",itp_type_bow), #Now limiting to bow users
(agent_set_horse_speed_factor,":agent_no",90), #Horse speed reduction to 90%
],
[
(multiplayer_is_server),
(store_trigger_param_1, ":agent_no"),
(gt,":agent_no",0),
(agent_is_alive,":agent_no"),
(agent_get_horse,":horse_agent_no",":agent_no"),
(ge,":horse_agent_no",0),
(agent_set_horse_speed_factor,":agent_no",100), #Restored to 100% 1 second later
]),
This should work, but I'm not sure if it's triggered on arrow release, or as soon as you press LMB.
Could always swap the trigger for a LMB check, but that would require client side stuff, then passed onto serverside.
Example is all serverside. (would add some load to the CPU :/, may not be the best way to nerf HA.)
Would probably have some bugs, like if you/horse died between firing the arrow and the restore part happening. Next horse you get on could be stuck at 90%, regardless of weapon etc.
Could be fixed by removing the mounted checks, but I'm not sure if the horse speed factor would complain if you weren't on a horse. (bug testing!)
All assuming my code works... :p