Yoko

All sides of Injection
It is currently 2025-10-15 11:34:53

All times are UTC+02:00




Post new topic  Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Drop Box
PostPosted: 2010-08-01 16:12:03 
Offline

Joined: 2009-06-18 10:23:46
Posts: 13
I need a script for make a trap dropping box around laststatus.
Something like this..
http://img12.imageshack.us/f/likethiso.jpg/
i thought it was with moveitem and something like getx, i've got macro for drop box under me. if it helps ill post.
Image


Top
   
 Post subject: Re: Drop Box
PostPosted: 2010-08-03 14:23:32 
Offline
Expert!
User avatar

Joined: 2005-04-23 10:19:43
Posts: 388
Code:
var boxType="0x1234"

sub dropBox()
    var enemy = UO.GetSerial('lasttarget')
    var x=UO.GetX(enemy)
    var y=UO.GetY(enemy)
    var z=UO.GetZ(enemy)

    #West
    UO.FindType(boxType,-1,'my')
    UO.Drop(1, x-1, y, z, 'finditem')
    UO.Ignore('finditem')
    #North
    UO.FindType(boxType,-1,'my')
    UO.Drop(1, x, y-1, z, 'finditem')
    UO.Ignore('finditem')
    #East
    UO.FindType(boxType,-1,'my')
    UO.Drop(1, x+1, y, z, 'finditem')
    UO.Ignore('finditem')
    #South
    UO.FindType(boxType,-1,'my')
    UO.Drop(1, x, y+1, z, 'finditem')
    UO.Ignore('finditem')

    UO.IgnoreReset();
endsub


Top
   
 Post subject: Re: Drop Box
PostPosted: 2010-08-03 18:09:59 
Offline

Joined: 2009-06-18 10:23:46
Posts: 13
At my shard we've 2 type at box..
How can i put both them?
Sometimes, it drops the box at the same spot :S
and when i pickup the last box i got crash


Top
   
 Post subject: Re: Drop Box
PostPosted: 2010-08-03 23:33:54 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
remove the UO.Ignore('finditem')

_________________
Image
YokoInjection CodeSweeper
Ошибка "Unhandled exception in parser"
Стрелялка для олдов.


Top
   
 Post subject: Re: Drop Box
PostPosted: 2010-08-04 16:56:44 
Offline

Joined: 2009-06-18 10:23:46
Posts: 13
still droping at same spot


Top
   
 Post subject: Re: Drop Box
PostPosted: 2010-08-04 16:56:44 
Offline

Joined: 2009-06-18 10:23:46
Posts: 13
still droping at same spot


Top
   
 Post subject: Re: Drop Box
PostPosted: 2010-08-05 15:08:30 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
править лень потому что обкладывалка зависит индивидуально от шарда на котором играешь. У нас работает вот так:

Code:
var item = '0x0E7F'

sub BlokStatus()
VAR bag
VAR X=UO.GetX("laststatus")
VAR Y=UO.GetY("laststatus")
VAR Z=UO.GetZ("laststatus")
var a
DIM n[4]
n[0]=0
n[1]=-1
n[2]=1
n[3]=0
DIM m[4]
m[0]=1
m[1]=0
m[2]=0
m[3]=-1
if UO.Count(item) >= 4 then
UO.FindType(item, -1, 'my')
for a = 0 to 3
UO.MoveItem('finditem','1','ground', X+n[a], Y+m[a], Z-4)
wait (100)
UO.FindType(item, -1, 'my')
next
else
  UO.Print('Мало предметов в паке.') 
return
endif
end sub

sub BlokSeltf()
VAR bag
VAR X=UO.GetX("self")
VAR Y=UO.GetY("self")
VAR Z=UO.GetZ("self")
var a
DIM n[4]
n[0]=0
n[1]=-1
n[2]=1
n[3]=0
DIM m[4]
m[0]=1
m[1]=0
m[2]=0
m[3]=-1
if UO.Count(item) >= 4 then
UO.FindType(item, -1, 'my')
for a = 0 to 3
UO.MoveItem('finditem','1','ground', X+n[a], Y+m[a], Z)
wait (100)
UO.FindType(item, -1, 'my')
next
else
  UO.Print('Мало предметов в паке.') 
return
endif
end sub

sub BlokSBOR()
UO.set('finddistance','3')
repeat
     UO.FindType(item,-1,'ground')
       UO.MoveItem('finditem','1','backpack')
        wait(100)
until not UO.FindCount()
end sub

_________________
Image
YokoInjection CodeSweeper
Ошибка "Unhandled exception in parser"
Стрелялка для олдов.


Top
   
 Post subject: Re: Drop Box
PostPosted: 2010-08-05 16:45:16 
Offline

Joined: 2009-06-18 10:23:46
Posts: 13
[quote="Dment"]At my shard we've 2 type at box..
How can i put both them?
/quote]
Could u help me with this please?


Top
   
 Post subject: Re: Drop Box
PostPosted: 2010-08-06 15:47:46 
Offline

Joined: 2010-08-05 11:49:53
Posts: 5
могу предложить сделать проверку на вес)

перед каждым следующим выкинутым предметом сделать контроль веса
потом попытку скинуть итем. если вес не изменился, значит ищем итем другого типа и скидываем его на землю

например)


Top
   
 Post subject: Re: Drop Box
PostPosted: 2010-08-08 18:31:20 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
да он просит чтобы в обкладывалке задействованы были 2 типа ящиков. На скрин посмотри. Причем тут вес? Кидаются то тони нормально. :lol:

_________________
Image
YokoInjection CodeSweeper
Ошибка "Unhandled exception in parser"
Стрелялка для олдов.


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 1 guest


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:  
Powered by phpBB® Forum Software © phpBB Limited