Page 1 of 1

HELP PLZ

Posted: 2012-04-24 07:26:03
by leandroatx
sub MyScript()

While UO.Mana > 0
If UO.Mana < 22 Then
Uo.useskill('Meditation')
wait(40000)
Else
Uo.useskill('Spirit Speak')
wait(5000)
If uo.injournal("you fail to communicate with the netherworld.") then
wait(5000)
Uo.useskill('Spirit Speak')
wait(2000)
repeat
If Uo.Injournal("You Contact The Netherworld") Then
UO.WaitTargetObject('self')
UO.Cast('Dispel')
wait(5000)
Uo.DeleteJournal()
If Uo.Injournal("You Are Already In Contact With The Netherworld") Then
UO.WaitTargetObject('self')
UO.Cast('Dispel')
wait(5000)
Uo.DeleteJournal()
repeat
Endif
Endif
Endif
Endif
Wend
endsub


its not going the way i want to :(
when i contact, it does not dispel...
keep looping on Uo.useskill spirit speak

Re: HELP PLZ

Posted: 2012-04-24 09:53:49
by Mirage
Several errors in cycles.
Use my signature for indenting.

Re: HELP PLZ

Posted: 2012-04-24 19:57:23
by leandroatx
how do i use, this codesweeper?

Re: HELP PLZ

Posted: 2012-04-24 20:31:03
by Mirage

Code: Select all

sub MyScript()
   While UO.Mana > 0
      If UO.Mana < 22 Then ; <---
         Uo.useskill('Meditation')
         wait(40000)
      Else
         Uo.useskill('Spirit Speak')
         wait(5000)
         If uo.injournal("you fail to communicate with the netherworld.") then
            wait(5000)
            Uo.useskill('Spirit Speak')
            wait(2000)
            repeat ; <---
               If Uo.Injournal("You Contact The Netherworld") Then
                  UO.WaitTargetObject('self')
                  UO.Cast('Dispel')
                  wait(5000)
                  Uo.DeleteJournal()
                  If Uo.Injournal("You Are Already In Contact With The Netherworld") Then
                     UO.WaitTargetObject('self')
                     UO.Cast('Dispel')
                     wait(5000)
                     Uo.DeleteJournal()
                     repeat ; <---
                     Endif
                  Endif
               Endif
            Endif
         Wend
      endsub


Almost all the cycles are written not correctly.


Indentation should match.

Code: Select all

sub Magery()
   Var LastTimer, i
   DIM Fruits[4]
   Fruits[1]  = '0x09D0'
   Fruits[2]  = '0x171F'
   Fruits[3]  = '0x0994'
   Fruits[4]  = '0x0EED'
   WHILE NOT UO.Dead()
      UO.DeleteJournal()
      If UO.Mana<100 Then
         While UO.Mana<UO.Int
            UO.DeleteJournal()
            wait(100)
            Uo.WarMode('0')
            UO.Useskill('Meditation')
            If  UO.InJournal("must wait") Then
               Wait(500)
            End If
            Repeat
               wait(100)
            until UO.InJournal("You are|You lose|must wait")
         Wend
      Endif
      
      While  UO.Mana==UO.Int AND UO.GA>0 AND UO.GS>0 AND UO.MR>0
         UO.DeleteJournal()
         LastTimer=UO.Timer()
         UO.WaitTargetTile('400', STR( UO.GetX( 'self' )), STR( UO.GetY( 'self' )), STR( UO.GetZ( 'self' )))
         UO.Cast('Create Food')
         repeat
            wait(100)
         until UO.InJournal("fizzles") or UO.Mana<UO.Int or UO.Timer()>LastTimer+30
         For i=1 To 4
            UO.FindType( Fruits[i], -1, 'ground' )
            If UO.FindCount() > 0 Then
               uo.moveitem('finditem',-1,'0x401F21EF')
               Wait( 200 )
            Endif
         Next
      Wend
   WEND
end sub

Re: HELP PLZ

Posted: 2012-04-26 07:33:00
by leandroatx
:evil: :evil: :evil: :evil: NOT WORRKING HEEEEEEELP PLZ TELL ME WHAT TO DO ?
i dunno how to script i dont even know how i did that script LOL
plzzzzzzzzzzzzz :S

Re: HELP PLZ

Posted: 2012-04-26 07:51:21
by Mirage

Re: HELP PLZ

Posted: 2012-04-26 08:28:30
by leandroatx
Ok, i`ll read it all, but russian, LOL, i`ll google translate it =P