Yoko

All sides of Injection
It is currently 2025-11-10 19:28:48

All times are UTC+02:00




Post new topic  Reply to topic  [ 16 posts ] 
Author Message
PostPosted: 2006-04-16 07:31:02 
Offline

Joined: 2006-04-16 07:26:09
Posts: 19
Hey guys! I am new to injection because I just started playing free shards from OSI. I am used to UOA so I know how to set easy macros in UOA, but now when I try to use that logic in injection it does not work.

For example I'm wanting to be able to setup a macro to cast recall, and click the rune in my backpack that I choose automatically with the hit of a key.

In UOA it looks like:
use skill/cast spell
target

How would I set this up? Is there a better document about setting these types of macros and an extensive command list other than the one on the origional site meaning this one: http://yoko.netroof.net/eng/old_injecti ... ml#command

I see yoko's but i can't read the descriptions only the command. I'll keep messing with it and if I figure out a lot before someone responds I'll delete this topic.

If it is better that I just ask questions here then I will do so but I'm sure someone has a document out there, or if someone is just feeling in a helpful mood my AIM: jason1nk and MSN: vumpler@gmail.com

thanks guys!


Top
   
 Post subject:
PostPosted: 2006-04-16 08:34:53 
Offline
Junior Expert
User avatar

Joined: 2004-06-24 22:08:56
Posts: 3220
For recall by rune you need set target trap and only after cast the spell.

Script for example:
Code:
sub RuneRecall()
uo.waittargetobject("Rune ID")
uo.cast("Recall")
endsub


If you carefully read help about cast command, then you understand, that you can use:
Code:
,cast 'Recall' 'Rune ID'


I correctly understand you problem?

Sorry for my clumsy English.


Top
   
 Post subject:
PostPosted: 2006-04-16 08:40:30 
Offline

Joined: 2006-04-16 07:26:09
Posts: 19
No you did excellent! Thanks a ton. I also read and found out how to set it to a key as well.

Another question is with looting bags and cutting corpses for hides with the click of a button.

I am trying to GM alchemy and on the shard I am playing to make a keg you have to drag the individual potions onto the keg to fill it. How do I write a script to drag greater heal potions onto a keg?

Also how do I have it to where when I hit a button it takes all items from one bag or corpse? and also cutting the nearest body/corpse for hides?

I tried this script and it doesn't work
Code:
sub cut()
if uo.InJournal('Body') then
    wait(waiting)
    UO.waittargetobject('lastcorpse')
    UO.usetype('cleaver')                    ;Type - cleaver
    wait(500)
end if
end sub


and this one:
Code:
sub cut()

    UO.waittargetobject('lastcorpse')
    UO.usetype('cleaver')                    ;Type - cleaver
    wait(500)

end sub


I get several errors.

Thanks for all of your help!


Top
   
 Post subject:
PostPosted: 2006-04-16 08:43:12 
Offline

Joined: 2006-04-16 07:26:09
Posts: 19
When I try to attempt cut it says "function not found - UO.INJOURNAL" and with the loot i get "Function not found - UO.GETDISTANCE" even though I am standing right next to the body


Top
   
 Post subject:
PostPosted: 2006-04-16 08:48:43 
Offline
Junior Expert
User avatar

Joined: 2004-06-24 22:08:56
Posts: 3220
fourtytwo wrote:
When I try to attempt cut it says "function not found - UO.INJOURNAL" and with the loot i get "Function not found - UO.GETDISTANCE" even though I am standing right next to the body

Update injection.dll to latest version.


Top
   
 Post subject:
PostPosted: 2006-04-16 08:58:47 
Offline

Joined: 2006-04-16 07:26:09
Posts: 19
ok that was definitely part of the problem. Now the loot script will sort of work. It took the gold from one of the creatures but nothing else... And then it just said it could find zero items.. And with the cut script it says "auto target canceled no item found"

The current script is:

Code:
sub cut()

    UO.waittargetobject('lastcorpse')
    UO.usetype('cleaver')                    ;Type - cleaver
    wait(500)


And I am wanting to use my newbied dagger as what cuts the corpse.


Top
   
 Post subject:
PostPosted: 2006-04-16 09:01:49 
Offline
Junior Expert
User avatar

Joined: 2004-06-24 22:08:56
Posts: 3220
try it:
Code:
sub cut() 
    uo.textprint(uo.getserial("lastcorpse"))
    UO.waittargetobject('lastcorpse')
    UO.usetype('cleaver')                    ;Type - cleaver
    wait(500)


And see, that script 'll write to text window.


Top
   
 Post subject:
PostPosted: 2006-04-16 09:04:49 
Offline

Joined: 2006-04-16 07:26:09
Posts: 19
"Auto targeting canceled
no item found"

is there anything I need to do before this will work? like target the dagger and name it a cleaver under objects?


Top
   
 Post subject:
PostPosted: 2006-04-16 09:18:50 
Offline

Joined: 2006-04-16 07:26:09
Posts: 19
Ok I fixed it. This is what I changed it to:

Code:
sub cut()
    uo.textprint(uo.getserial("lastcorpse"))
    UO.waittargetobject('lastcorpse')
    UO.useobject('dagger')                    ;Type - dagger
    wait(500)
end sub


Top
   
 Post subject:
PostPosted: 2006-04-16 09:19:52 
Offline

Joined: 2006-04-16 07:26:09
Posts: 19
The only questions I have left is how would I set it to take every item out of a corpse and how do i set a macro to take greater heal potions from my backpack and place them in another bag.


Top
   
 Post subject:
PostPosted: 2006-04-16 18:10:22 
Offline
Junior Expert
User avatar

Joined: 2004-06-24 22:08:56
Posts: 3220
If i correctly understand you problems, you need two scripts:
1. Script for loot all items from corpse.
2. Script for move GreaterHeal from backpack to any bag.

1.
Code:
sub AutoLoot()
var corpse = uo.getSerial('lastcorpse') ; corpse for looting
uo.useobject(corpse) ; open corpse
checklag() ; wait while corpse opening
uo.findtype("-1","-1",corpse) ; find all items in corpse
; cicle - while having items in corpse
while uo.findcount()
uo.moveitem("finditem","0","backpack") ; move find item to backpack
wait(300) ; fastloot pause
uo.findtype("-1","-1",corpse) ; find all items in corpse
wend
endsub


2.
Code:
sub MoveGH()
var gh = "0x0000000" ; gh for moving
var bag = "0x0000000" ; new gh container
uo.moveitem(gh,"1",bag)
endsub


Top
   
 Post subject:
PostPosted: 2006-04-16 19:38:30 
Offline
Expert!
User avatar

Joined: 2004-08-11 23:56:17
Posts: 746
Location: The Citadel
I guess that he has many unstacking potions that he needs to move to the keg, so I advise this:

Code:
sub MoveGH() 
var gh = "0x0000; Write GH bottle type here
var bag = "0x0000000" ; Keg ID here
    uo.findtype( gh, '-1', 'my' )
      while uo.findcount()
        uo.moveitem( 'finditem', 'all', bag )
        wait(600)
        uo.findtype( gh, '-1', 'my' )
     wend   
endsub


Top
   
 Post subject:
PostPosted: 2006-04-16 20:39:12 
Offline

Joined: 2006-04-16 07:26:09
Posts: 19
You guys are awesome... They actually changed the way we do kegs now though and it consists of double clicking the keg then click on the potion.

So the code would look something like:

double click keg
click potion type.

So what I need to do is use the command ,addtype gh then click on the potion.

that's a very simple script I'm sure.[/code]


Top
   
 Post subject:
PostPosted: 2006-04-16 21:00:56 
Offline
Junior Expert
User avatar

Joined: 2004-06-24 22:08:56
Posts: 3220
Code:
sub MoveGH()
uo.print("Select keg") ; print message
uo.addObject("keg") ; add object from target
while uo.targeting() ; while cursor is targeting
wait(100) ; delay
wend ; end while
uo.print("Select GH") ; print message
uo.addObject("GH") ; add object from target
while uo.targeting() ; while cursor is targeting
wait(100) ; delay
wend ; end while
var GH = uo.getGraphic("GH") ; add variable GH, from graphic type of GH object.
var keg = uo.getSerial("keg") ; add variable keg, from ID of keg object.
var cnt = uo.containerOf("GH") ; add variable cnt, from containter which contains GH object
uo.findtype(GH,-1,cnt) ; find `GH` in `cnt`
while uo.findcount() ; cicle - while found more zero item
uo.waittargetobject("finditem") ; set target trap to find item
uo.useobject(keg) ; use object - keg
checklag() ; checklag - run internal function. You can find her on this forum.
uo.findtype(GH,-1,cnt) ; find `GH` in `cnt`
wend ; end while
endsub


Top
   
 Post subject:
PostPosted: 2006-04-16 22:04:47 
Offline

Joined: 2006-04-16 07:26:09
Posts: 19
You guys are awesome they work great! And if you ever need any health advice just ask I'm a doctor :D


Top
   
 Post subject:
PostPosted: 2006-04-16 22:07:46 
Offline
Junior Expert
User avatar

Joined: 2004-06-24 22:08:56
Posts: 3220
fourtytwo wrote:
You guys are awesome they work great! And if you ever need any health advice just ask I'm a doctor :D

Okay. I remember it.


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 2 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:  
Powered by phpBB® Forum Software © phpBB Limited