Don't like ads? PRO users don't see any ads ;-)
Guest

Slime Trainer Perfect

By: a guest on May 8th, 2012  |  syntax: Rails  |  size: 4.10 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # SETTINGS #
  2. strong_weapon = "knight axe"                # name of strong weapon to use #
  3. weak_weapon = "sickle"                      # name of weak weapon to use #
  4. trainname = "Slime"                         # name of monster you want to train #
  5. distance = 1                                # distance to attack monster if you are paladin you can set this to 3 or 4 #
  6. hittime = 25                                # time in seconds to change to strong weapon if havent damage blood on creature #
  7. trainpos = [32607, 31969, 7]                # posx posy and posz to return if someone moves you #
  8. getbacktotrainpos = true                    # if you want to go back to position of train #
  9. alarm = true                                # will alarm if cannot got the slime id #
  10. killmother = true                           # kill the mother when options down are meeted #
  11. hppctokill = 50                             # when you reaches 50 percent of health you kill the mother #
  12. foodtokill = 2                              # if you ran out of X food it will kill the mother #
  13. dmgtokill = "50"                            # if mother do 50 or more of damage it will kill mother #
  14. logout = false                              # logout if mother is killed #
  15. mother = $attacked.id                       # dont change this #
  16. # SETTINGS #
  17.  
  18. # DONT CHANGE NOTHING DOWN HERE #
  19. unwalkable = [2471, 2523, 2535, 2025, 2029, 2030, 2043, 2044, 2045, 2046, 2047, 2048, 2059, 2060, 2061, 2445, 2446, 2447, 2448, 2449, 2450, 2451, 2452, 2453, 2454, 2465, 2466, 2467, 2468, 2524, 2904, 2959, 2960, 2961, 2962, 2963, 2964, 2975, 2976, 2979, 2982, 2986, 2997, 2998, 2999, 3000, 3484, 3485, 3486, 3487, 3510, 3511, 3512, 3513, 5046, 5055, 5056, 6109, 6110, 6111, 6112, 6367, 6368, 6369, 6370, 7860, 7861, 7862, 7863, 9132, 9141, 10208, 10210, 10211, 10212, 10213, 10214, 10215]
  20. eattable_items = [3577, 3578, 3579, 3580, 3581, 3582, 3583, 3584, 3585, 3586, 3587, 3588, 3589, 3590, 3591, 3592, 3593, 3594, 3595, 3596, 3597, 3598, 3599, 3600, 3601, 3602, 3606, 3607, 3723, 3724, 3725, 3726, 3727, 3728, 3729, 3730, 3731, 3732, 3910]
  21.  
  22. while($attacked.nil?)
  23.  if alarm
  24.   playalarm()
  25.  end
  26. end
  27.  
  28. while true
  29. monsters_array = []
  30. creature("ms").each do |monst|
  31. if monst.dist < distance
  32.  monsters_array.push(monst)
  33.  end
  34.  
  35. if monst.dist < distance and monst.id != mother
  36.  attackcreatureat(monst.posx, monst.posy, monst.posz)
  37.  wait(500, 600)
  38.  end
  39. end
  40.  
  41. if getbacktotrainpos
  42.  if not islocation(trainpos[1], trainpos[2], trainpos[3])
  43.   setwalking(true)
  44.   waitping()
  45.  elsif islocation(trainpos[1], trainpos[2], trainpos[3])
  46.   setwalking(false)
  47.  end
  48. end
  49.  
  50. if killmother
  51.  if $hppc <= hppctokill
  52.   attackcreatureat(mother.posx, mother.posy, mother.posz)
  53.  end
  54.  backpack.each do |bp|
  55.   bp.item.each do |i|
  56.    if i.itemid.include?(eattable_items) && itemcount(i.itemid) <= foodtokill
  57.     attackcreatureat(mother.posx, mother.posy, mother.posz)
  58.    end
  59.   end
  60.  end
  61.  if m.message.include?("You lose") and m.message.include?(dmgtokill) and m.message.include?("hitpoints due to an attack by a slime")
  62.   attackcreatureat(mother.posx, mother.posy, mother.posz)
  63.  end
  64.  if $attacked.id == mother and $attacked.hppc == 0
  65.   if logout
  66.    closetibia()
  67.    waitping()
  68.    closebot()
  69.   end
  70.  end
  71.  backpack.each do |bp|
  72.  bp.item.each do |i|
  73.  if i.itemid.include?(eattable_items) and itemcount(i.itemid) <= foodtokill
  74.   attackcreatureat(mother.posx, mother.posy, mother.posz)
  75.   if logout && $attacked.id == mother && $attacked.hppc == 0
  76.    closetibia()
  77.    waitping()
  78.    closebot()
  79.   end
  80.  end
  81.  end
  82.  end
  83. end
  84.  
  85. tile = gettile(trainpos[1], trainpos[2], trainpos[3])
  86. tile.items.each do |tileitem|
  87. if tileitem.id.include?(unwalkable)
  88.  useitemfrombpon(getid(strong_weapon), trainpos[1], trainpos[2], trainpos[3]) or useitemfrombpon(getid(weak_weapon), trainpos[1], trainpos[2], trainpos[3])
  89. end
  90. end
  91.  
  92. if monst.length > 2 && monsteraround() > 2
  93.  setattack("Offensive")
  94.  setchase("Chase")
  95.  waitping()
  96.  equipitem(getid(strong_weapon), getname($back.id), "Left Hand")
  97. else
  98.  setattack("Defensive")
  99.  setchase("Stand")
  100.  equipitem(getid(weak_weapon), getname($back.id), "Left Hand")
  101. end
  102. end