Advertisement
zildjiean

Killsteal openkore

Aug 27th, 2013
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 2.53 KB | None | 0 0
  1. Openkore/control/config.txt
  2. from your config.txt add this line
  3.  
  4. killSteal 1
  5.  
  6. -------------------------------------
  7. =====================================
  8. -------------------------------------
  9.  
  10. openkore/control/timeouts.txt
  11. from your timeouts.txt change this ai_attack_waitAfterKill 0.7 to ai_attack_waitAfterKill 0.1
  12.  
  13. -------------------------------------
  14. =====================================
  15. -------------------------------------
  16.  
  17. openkore/src/Misc.pm
  18. edit your MIsc.pm
  19.  
  20. add this line
  21. "return 0 if ($config{'rabidDog'} || $config{'killSteal'});"
  22.  
  23.  
  24. the line must look like
  25.  
  26. sub objectInsideSpell {
  27. return 0 if ($config{'rabidDog'} || $config{'killSteal'});
  28. my $object = shift;
  29. my ($x, $y) = ($object->{pos_to}{x}, $object->{pos_to}{y});
  30. foreach (@spellsID) {
  31. my $spell = $spells{$_};
  32. if ($spell->{sourceID} ne $accountID && $spell->{pos}{x} == $x && $spell->{pos}{y} == $y) {
  33. return 1;
  34. }
  35. }
  36.  
  37. ====================================
  38.  
  39. sub objectIsMovingTowardsPlayer {
  40. return 0 if ($config{'rabidDog'} || $config{'killSteal'});
  41. my $obj = shift;
  42. my $ignore_party_members = shift;
  43. $ignore_party_members = 1 if (!defined $ignore_party_members);
  44.  
  45. if (!timeOut($obj->{time_move}, $obj->{time_move_calc}) && @playersID) {
  46. # Monster is still moving, and there are players on screen
  47. my %vec;
  48. getVector(\%vec, $obj->{pos_to}, $obj->{pos});
  49.  
  50. foreach (@playersID) {
  51. next if (!$_ || ($ignore_party_members &&
  52. ($char->{party} && $char->{party}{users}{$_}) ||
  53. (existsInList($config{tankersList}, $players{$_}{name}) &&
  54. $players{$_}{name} ne 'Unknown')) ||
  55. $players{$_}{statuses}{"GM Perfect Hide"});
  56. if (checkMovementDirection($obj->{pos}, \%vec, $players{$_}{pos}, 15)) {
  57. return 1;
  58. }
  59. }
  60. }
  61.  
  62. ====================================
  63. sub checkMonsterCleanness {
  64. return 1 if ($config{'rabidDog'} || $config{'killSteal'});
  65. return 1 if (!$config{attackAuto});
  66. my $ID = shift;
  67. return 1 if ($players{$ID});
  68. my $monster = $monsters{$ID};
  69.  
  70. # If party attacked monster, or if monster attacked/missed party
  71. if ($monster->{'dmgFromParty'} > 0 || $monster->{'dmgToParty'} > 0 || $monster->{'missedToParty'} > 0) {
  72. return 1;
  73. }
  74.  
  75. ====================================
  76.  
  77. sub positionNearPlayer {
  78. return 0 if ($config{'rabidDog'} || $config{'killSteal'});
  79. my $r_hash = shift;
  80. my $dist = shift;
  81.  
  82. foreach (@playersID) {
  83. next unless defined $_;
  84. next if $char->{party} && $char->{party}{users} &&
  85. $char->{party}{users}{$_};
  86. next if existsInList($config{tankersList}, $players{$_}{name});
  87. return 1 if (distance($r_hash, $players{$_}{pos_to}) <= $dist);
  88. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement