Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function DistanceChecks( byref a_info, byref d_info)
- // Core handles distance checks before starting the hook.
- print ( "a_info: "+a_info+", d_info: "+d_info );
- var cur_range := Distance(a_info.mobile, d_info.mobile);
- var max_range := GetConfigInt(a_info.cfginfo, a_info.prefix+"MaxRange");
- if ( max_range == error )
- max_range := 1;
- endif
- if ( cur_range > max_range )
- CombatMsg(a_info.mobile, "Opponent is too far away. ["+max_range+"]", "Dist");
- return 0;
- elseif ( cur_range < CInt(GetConfigInt(a_info.cfginfo, a_info.prefix+"MinRange")) )
- CombatMsg(a_info.mobile, "Attack.", "Dist");
- return 0;
- else
- return 1;
- endif
- endfunction
Add Comment
Please, Sign In to add comment