Advertisement
Guest User

Untitled

a guest
Feb 5th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.53 KB | None | 0 0
  1. sub a()
  2. var maxhp = uo.getmaxhp('self')
  3. var hp = uo.gethp('self')
  4. var proc = hp/maxhp*100
  5.  
  6. dim a[1]
  7.  
  8. a[1]=hp/maxhp*100
  9. uo.print(str(a[1]))
  10. end sub
  11.  
  12.  
  13. SUB banda()
  14. uo.setglobal('h','0')
  15. uo.setglobal('s','0')
  16. var i, j, k, x, y, z, w, HpSelf, MaxHpSelf=uo.getmaxhp('self')
  17.  
  18. var n = 2
  19. var m = 2
  20. var t = 50
  21.  
  22. dim hp[6]
  23. dim name[6]
  24.  
  25. while not uo.dead()
  26. if uo.getglobal('h') == '0' and uo.getglobal('s') == '0' then
  27. for i = 1 to n
  28. if uo.getdistance('heal'+str(i)) < 6 then
  29. if uo.getserial('self') == uo.getserial('heal1') then
  30. HpSelf=uo.gethp('self')
  31. hp[i]=HpSelf/MaxHpSelf*100
  32. name[i]=str(i)
  33. else
  34. hp[i]=uo.gethp('heal'+str(i))
  35. name[i]=str(i)
  36. uo.print(str(hp[i]))
  37. end if
  38. else
  39. hp[i]=100
  40. name[i]='0'
  41. end if
  42. next
  43.  
  44. for j = 1 to m
  45. for i = 1 to n-1
  46. x = hp[i]
  47. z = name[i]
  48. y = hp[i+1]
  49. w = name[i+1]
  50. if x < y then
  51. hp[i] = x
  52. name[i] = z
  53. hp[i+1] = y
  54. name[i+1] = w
  55. else
  56. hp[i] = y
  57. name[i]= w
  58. hp[i+1] = x
  59. name[i+1]= z
  60. end if
  61. next
  62. next
  63. end if
  64.  
  65.  
  66. for i = 1 to n
  67. if hp[i] < 100 and hp[i] > 0 and uo.getdistance('heal'+str(i)) < 6 then
  68. lecim:
  69. DeleteJournalLine('Nevidis cil.')
  70. DeleteJournalLine('Pokousis se vylecit')
  71. DeleteJournalLine('cil je moc daleko')
  72. DeleteJournalLine('neni zranen.')
  73. DeleteJournalLine('byl uspesne osetren')
  74. DeleteJournalLine('Lecis rychleji!')
  75. uo.msg('.heal'+name[i])
  76. repeat
  77. wait(50)
  78. until uo.injournal('Nevidis cil.|Pokousis se vylecit|cil je moc daleko|neni zranen.')
  79.  
  80. if not uo.injournal('Nevidis cil.|cil je moc daleko|neni zranen.') then
  81. k=0
  82. repeat
  83. wait(50)
  84. k=k+1
  85. until uo.injournal('Lecis rychleji!') or k == 20
  86. if not uo.injournal('Lecis rychleji!') then
  87. goto lecim
  88. end if
  89. repeat
  90. wait(50)
  91. until uo.injournal('byl uspesne osetren')
  92. end if
  93. end if
  94. next
  95. wait(t)
  96. wend
  97. END SUB
  98.  
  99. SUB DeleteJournalLine(text)
  100. While UO.InJournal(text)
  101. UO.SetJournalLine(UO.InJournal(text)-1, " ")
  102. Wend
  103. END SUB
  104.  
  105. sub setHeal1()
  106. UO.exec('addobject heal1')
  107. while UO.Targeting()
  108. wait(99)
  109. wend
  110. uo.waittargetobject('heal1')
  111. uo.msg('.setequip1')
  112. END SUB
  113.  
  114. sub setHeal2()
  115. UO.exec('addobject heal2')
  116. while UO.Targeting()
  117. wait(99)
  118. wend
  119. uo.waittargetobject('heal2')
  120. uo.msg('.setequip2')
  121. END SUB
  122.  
  123. sub setHeal3()
  124. UO.exec('addobject heal3')
  125. while UO.Targeting()
  126. wait(99)
  127. wend
  128. uo.waittargetobject('heal3')
  129. uo.msg('.setequip3')
  130. END SUB
  131.  
  132. sub setHeal4()
  133. UO.exec('addobject heal4')
  134. while UO.Targeting()
  135. wait(99)
  136. wend
  137. uo.waittargetobject('heal4')
  138. uo.msg('.setequip4')
  139. END SUB
  140.  
  141. sub setHeal5()
  142. UO.exec('addobject heal5')
  143. while UO.Targeting()
  144. wait(99)
  145. wend
  146. uo.waittargetobject('heal5')
  147. uo.msg('.setequip5')
  148. END SUB
  149.  
  150. sub setHeal6()
  151. UO.exec('addobject heal6')
  152. while UO.Targeting()
  153. wait(99)
  154. wend
  155. uo.waittargetobject('heal6')
  156. uo.msg('.setequip6')
  157. END SUB
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement