Yoko

All sides of Injection
It is currently 2025-12-10 13:14:54

All times are UTC+02:00




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
 Post subject: script connection
PostPosted: 2007-12-19 22:36:47 
Offline

Joined: 2007-11-13 00:39:14
Posts: 125
I wanted to connect these scripts OR
if one of them ends finish another too.

Code:
sub minround()
VAR Kirka = '0x0E85'  ; pickaxe
VAR MaxVes = 430  ; weight +- 15
VAR TileNum = '-1'  ; DONT KNOW
VAR x, y, t, k
VAR MaxTime = 100   
VAR ms1 = "There is no ore"
VAR ms2 = "You can't use"
VAR ms3 = "You put "
VAR ms4 = "You loosen some rocks"
VAR ms5 = "location"
VAR ms6 = "Try mining"
VAR ms7 = "You can't see that"
VAR ms8 = "No item"
for y=-2 to 2
for x=-2 to 2
while not UO.Hidden()
UO.Warmode("0")
uo.print("Hiding")
UO.UseSkill("Hiding")
wait(4000)
wend
 k = 0
     repeat
        UO.DeleteJournal()
        t = UO.Timer()
        k = k + 1
        wait(300)
        UO.WaitTargetTile( TileNum, STR( UO.GetX() + x ), STR( UO.GetY() + y ), 0)
            uo.findtype( Kirka )
            if uo.findcount('finditem') or uo.objAtLayer( "Lhand" , Kirka ) or uo.objAtLayer( "Rhand" , Kirka ) then
               uo.usetype( Kirka )
            else
               uo.print( "No pickaxe in backpack." )
               return false
            end if
        repeat
           wait(100)
        until UO.InJournal(ms1) OR UO.InJournal(ms2) OR UO.InJournal(ms3) OR UO.InJournal(ms4) OR UO.InJournal(ms5) OR UO.InJournal(ms6) OR UO.InJournal(ms7) OR ((t +MaxTime) < UO.Timer())
        If UO.Weight > MaxVes Then
           UO.Print(" owerweight" )
           return
        Endif
     until ( NOT UO.InJournal(ms4) AND NOT UO.InJournal(ms3) OR (k > 10) )
  next
next
 uo.Print('End')
endsub


Code:
sub CheckingPlayers()
VAR a, b
uo.ignorereset()
uo.ignore('self')
DIM Chars[3]
Chars[0] = '0x0190' #boba
Chars[1] = '0x0191' #ciuvas
Chars[2] = '0x000E' #elements
while not uo.dead()
  for a = 0 to 2
    while val(uo.getglobal('find')) == 1
      wait(50)
    wend
    uo.set('finddistance', '20')
    uo.findtype(Chars[a], '-1', 'ground')
    if uo.findcount('finditem')>0 then
      uo.exec('exec recnamo')
      return
    else
      wait(400)
    endif
  next
wend
end sub


Top
   
 Post subject:
PostPosted: 2007-12-20 00:42:28 
Offline
Expert!
User avatar

Joined: 2005-05-20 20:30:10
Posts: 548
to stop one of scripts U can use

Code:
uo.exec('terminate minround') or uo.exec('terminate CheckingPlayers')


or U can terminate all

Code:
uo.exec('terminate all')

_________________
"плагины" для инжекта


Top
   
 Post subject:
PostPosted: 2007-12-20 03:23:18 
Offline
User avatar

Joined: 2007-11-01 19:09:30
Posts: 287
Location: Moscow
in order to make good get-away system y have to launch parrallel scripts, one is mining, another always searching for intruders.
If there are some - terminate mining script and do not forget to save needed variables in global (as current point of mining, or current cave), make some operations by another script (like teleporting to another cave) and continue mining.. there SO MUCH same scripts and themes about so i see no meaning to repeat them

_________________
**Выставляем отступы в скриптах*** ©Destruction
Feel the Power of Dark Side


Top
   
 Post subject:
PostPosted: 2007-12-20 07:55:09 
Offline

Joined: 2007-11-13 00:39:14
Posts: 125
CuHTpoH > my script works like this : i have about ~40 runes in bank.. and one to house
1. i start at house :) take regents ~3 BM BP MR
2. i take pickaxe
3. script recals to 1 mine
4. mine`s around and sercher for peaople..
5. if it found people or element it recalls home and finish mining script there :) then it recals again home :) (thats bad :) ) and drops all mined ores to box then takes regent takes pickaxe if my is broken.. and recalls to mine 2 never backs to last mine until script finished..


SO one thing what is bad that script dont finish mining if it detects player.. it mines ant my house until Titles around reached max 10 .. thats all..

By the way i maked skript like

sub afk()
recalmine1()
mining()
home()
dropores()
takepickaxeandregents()
end sub

then i run ,exec afk and i cant terminate only mining() or Home()
i can terminate only afk() but that wont help me..
so terminate is not desission. Thank you :)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 4 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited