Page 1 of 1

Healing + Meditation

Posted: 2009-01-25 21:31:58
by Franpk
hello, DragonWorld Player, that is my firts script and i want u guys check it for change to better, it works really good but i need to know if i need to change anything, here is the script:

Code: Select all

sub hea()
var bloody="0x0E20" #Type de las vendas sucias
var wash="0x401FC5F0" #ID donde limpiar las vendas
var item="0x1F7B" #Type de la ropa con curse
var eat="0x098c"  #Type de la comida
var i=1
 
  empezar:
   repeat
   while uo.b > 0 && uo.life > 141  #mientras la vida sea mayor de.. y vendas mayor d 1
   
     if uo.b > 0 then    #mientras tengas tantas vendas...
     CheckLag()      #checkea si hay lag o esta salvando el server
    uo.undress()      #se kita la ropa
    uo.UseSkill('Meditation')       #Hacer meditation
      wait (1000)
    uo.bandageself()   #Se cura a si mismo
      wait (1200)
    uo.FindType(item,"-1","backpack")      #busca la ropa cursed
    uo.useobject("finditem")         #ahora usa el objeto que estaba buscando
      wait(2300)
      i= i + 1       #le suma +1 a la variable para...
   
     if i==10 then      #... que cuando llegue a 10 haga empezar Comer..
     checklag()
    uo.findtype(eat,"-1","backpack")   #... buscar comida en el inventario
    uo.useobject ("finditem")      #y ahora usa el objeto que buscaba.. la comida
     i=1            #ahora pone la variable al valor del principio
       wait (500)
    endif            #fin de Comer.
   
    else
    checklag()
     uo.FindType(bloody,"-1","backpack")
     uo.print ("Buscamos vendas para lavar y..")
     uo.waittargetobject (wash)
     uo.useobject ("finditem")
       wait (500)
     uo.print ("Las lavamos, Y ahora continuamos...")
   
    wend
   
     if uo.b == 0 then
    uo.print ("SIN VENDAS!!")
    uo.print ("Buscando vendas que limpiar!")
      wait (500)
      goto Limpiarvenda
    else
     while not uo.life > 141
     uo.print ("LLAMAR A LOS GUARDIAS!")
     uo.say ("GUARDS")
     uo.bandageself()
     uo.warmode(0)
       wait (5000)
    wend
   endif
   endif
    until false
   
   cerrar:
   uo.print ("COMPRA MAS VENDAS!!")
   uo.print ("Finito la macro")
    uo.exec('terminate all')
   
   limpiarvenda:
   checklag()
     uo.FindType(bloody,"-1","backpack")
     if uo.findcount() then
     uo.print ("Buscamos vendas para lavar y..")
     uo.waittargetobject (wash)
     uo.useobject ("finditem")
       wait (3000)
     uo.print ("Las lavamos, Y ahora continuamos...")
     goto empezar
     else
     uo.print ("NO SE ENCONTRARON VENDAS!!")
     goto cerrar
     endif

endsub

sub CheckLag()
   UO.DeleteJournal()
   UO.Click('backpack')

   repeat
      wait(500)
   until UO.InJournal('backpack')
end sub

Posted: 2009-01-27 18:55:15
by Franpk
i have changed some things to the script. that script is for DRAGONWORLD. please put any comment...........

google translator:
Здравствуйте, я говорю по-испански и Английский и русский слова jaja, P, вы могли бы сделать какие-либо замечания по сценарию ..

Code: Select all

sub heal()
var bloody="0x0E20", tela="0x175D", tijeras="0x0F9E"
var item, wash, eat
var i=1


message ("AHORA UNAS PREGUNTAS el orden de respuesta es 1=WASH, 2=ROPA, 3=COMIDA")
message("PRESIONA ACEPTAR PARA RESPONDER! si no tienes comida dale a escape")
  uo.Exec('addobject wash')
  while uo.Targeting()
     wait(100)
  wend
  uo.Exec('addobject item')
  while uo.Targeting()
     wait(100)
  wend
  uo.Exec('addobject eat')
  while uo.Targeting()
     wait(100)
  wend

WHILE NOT UO.DEAD()
  empezar:
   repeat
   while uo.b > 0 && uo.life > 120
     if uo.b > 0 then
   uo.findtype (tela,"-1","backpack")
   if uo.findcount() then
     uo.waittargetobject ("finditem")
     uo.usetype (tijeras)
     wait (500)
     else
     CheckLag()
    uo.undress()
    uo.bandageself()
      wait (1200)
    uo.UseSkill('Meditation')
      wait (1000)
    uo.useobject("item")
      wait(2300)
      i= i + 1
   if i==10 then
     checklag()
    uo.useobject ("eat")
     i=1
    uo.print ("Hmmm... QUE BUENO!!")
       wait (300)
    endif
   
    else
    checklag()
     uo.FindType(bloody,"-1","backpack")
     uo.print ("Buscamos vendas para lavar y..")
     uo.waittargetobject ("wash")
     uo.useobject ("finditem")
       wait (500)
     uo.print ("Las lavamos, Y ahora continuamos...")
   
    wend
   
     if uo.b == 0 then
    uo.print ("Buscando vendas para limpiar!")
      wait (500)
      goto Limpiarvenda
    else
     while not uo.life > 120
     uo.say ("GUARDS")
     uo.bandageself()
     uo.warmode(0)
       wait (5000)
    wend
   endif
   endif
   endif
    until false
   
   fin:                           ################## EMPEZAR ANATOMY #####################
uo.print ("COMPRA MAS VENDAS!! mientras tanto a macrear Anatomy.")
repeat
while not uo.b > 0
 if uo.life > 120 then
 if i==30 then
    uo.useobject ("eat")
   i=1
   else
 checklag()
 wait (300)
   uo.waittargetself()
   uo.useskill ("Anatomy")
   wait (4000)
   i=i+1
   endif
   else
   uo.say ("Guards Acudid ami!")
   wait (5000)
   uo.warmode(0)
endif
wend
goto empezar
until false
   


   
   limpiarvenda:                     ############### LIMPIAR VENDA ####################
   checklag()
     uo.FindType(bloody,"-1","backpack")
     if uo.findcount() then
     uo.print ("Buscamos vendas para lavar y las lavamos.")
     uo.waittargetobject ("wash")
     uo.useobject ("finditem")
       wait (1000)
     uo.print ("Y ahora continuamos...")
     goto empezar
     else
     uo.print ("NO SE ENCONTRARON VENDAS!!")
     goto fin
     endif
WEND
uo.print ("ESTAS MUERTO!!")
uo.print ("ESTAS MUERTO!!")
uo.print ("TERMINAR SCRIPT!!")
uo.exec ("terminate all")
endsub

sub CheckLag()
   UO.DeleteJournal()
   UO.Click('backpack')

   repeat
      wait(500)
   until UO.InJournal('backpack')
end sub