Advertisement
Guest User

Untitled

a guest
Jul 31st, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.69 KB | None | 0 0
  1. sub latka_1ks_zvedni()
  2.  
  3. UO.exec("exec gain")
  4. UO.exec("exec AFK_Kontrola")
  5.  
  6. UO.deletejournal()
  7.  
  8. UO.print("Na jakem stroji budem pracovat?")
  9. UO.addobject("stroj")
  10. while UO.targeting()
  11. wait(100)
  12. wend
  13.  
  14. UO.print("Odkud budes brat material?")
  15. UO.addobject("bagl_zdroj")
  16. while UO.targeting()
  17. wait(100)
  18. wend
  19.  
  20. UO.print("S jakym materialem budem pracovat?")
  21. UO.addobject("material")
  22. while UO.targeting()
  23. wait(100)
  24. wend
  25.  
  26. UO.print("Ukaz vyrobek, ktery budeme vyrabet.")
  27. UO.addobject("vyrobek")
  28. while UO.targeting()
  29. wait(100)
  30. wend
  31.  
  32. var typ,typ2,n
  33. typ = UO.getgraphic("vyrobek")
  34. typ2 = UO.getgraphic("material")
  35.  
  36. repeat
  37. if (UO.getdistance("stroj") > 0) then
  38.  
  39. UO.findtype(typ2, -1, "bagl_zdroj")
  40. if UO.findcount() then
  41. UO.moveitem("finditem","1","backpack")
  42. end if
  43.  
  44. if UO.injournal("Save imminent") then
  45. UO.deletejournal()
  46. repeat
  47. wait(1000)
  48. UO.print("CEKAM!")
  49. until UO.injournal("Next scheduled")
  50. UO.deletejournal()
  51. else
  52. wait(500)
  53. endif
  54.  
  55. UO.Waittargetobject("stroj")
  56. UO.usetype(typ2)
  57.  
  58. for n=1 to 100
  59. if UO.injournal("Save imminent") then
  60. UO.deletejournal()
  61. repeat
  62. wait(1000)
  63. UO.print("CEKAM!")
  64. until UO.injournal("Next scheduled")
  65. UO.deletejournal()
  66. else
  67. wait(50)
  68. endif
  69. next
  70.  
  71. UO.FindType(typ,-1,"backpack")
  72. if (UO.findcount()>0) then
  73. UO.moveitem("finditem",-1,"bagl_zdroj")
  74. endif
  75.  
  76. if UO.injournal("Save imminent") then
  77. UO.deletejournal()
  78. repeat
  79. wait(1000)
  80. UO.print("CEKAM!")
  81. until UO.injournal("Next scheduled")
  82. UO.deletejournal()
  83. else
  84. wait(500)
  85. endif
  86.  
  87. #UO.moveitem("bagl_zdroj",-1,"backpack") # zvedani baglu ze zeme
  88. else
  89. wait(150)
  90. endif
  91.  
  92. if ((UO.count(typ2))==0) then
  93. UO.findtype(typ2, -1, "bagl_zdroj")
  94. if not UO.findcount() then
  95. UO.print("Dosel Material nebo nebyl zadny nalezen. Ukoncuji Script.")
  96. UO.Playwav("c:\UO\Wavs\Oyessir4.wav")
  97. UO.exec("terminate all")
  98. endif
  99. endif
  100. until UO.dead()
  101.  
  102. end sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement