Setting Simple Macro's etc.
Moderators: Murderator+, Murderator
Setting Simple Macro's etc.
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!
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!
-
- Junior Expert
- Posts: 3221
- Joined: 2004-06-24 22:08:56
For recall by rune you need set target trap and only after cast the spell.
Script for example:
If you carefully read help about cast command, then you understand, that you can use:
I correctly understand you problem?
Sorry for my clumsy English.
Script for example:
Code: Select all
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: Select all
,cast 'Recall' 'Rune ID'
I correctly understand you problem?
Sorry for my clumsy English.
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
and this one:
I get several errors.
Thanks for all of your help!
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: Select all
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: Select all
sub cut()
UO.waittargetobject('lastcorpse')
UO.usetype('cleaver') ;Type - cleaver
wait(500)
end sub
I get several errors.
Thanks for all of your help!
-
- Junior Expert
- Posts: 3221
- Joined: 2004-06-24 22:08:56
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:
And I am wanting to use my newbied dagger as what cuts the corpse.
The current script is:
Code: Select all
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.
-
- Junior Expert
- Posts: 3221
- Joined: 2004-06-24 22:08:56
try it:
And see, that script 'll write to text window.
Code: Select all
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.
Ok I fixed it. This is what I changed it to:
Code: Select all
sub cut()
uo.textprint(uo.getserial("lastcorpse"))
UO.waittargetobject('lastcorpse')
UO.useobject('dagger') ;Type - dagger
wait(500)
end sub
-
- Junior Expert
- Posts: 3221
- Joined: 2004-06-24 22:08:56
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.
2.
1. Script for loot all items from corpse.
2. Script for move GreaterHeal from backpack to any bag.
1.
Code: Select all
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: Select all
sub MoveGH()
var gh = "0x0000000" ; gh for moving
var bag = "0x0000000" ; new gh container
uo.moveitem(gh,"1",bag)
endsub
I guess that he has many unstacking potions that he needs to move to the keg, so I advise this:
Code: Select all
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
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]
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]
-
- Junior Expert
- Posts: 3221
- Joined: 2004-06-24 22:08:56
Code: Select all
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
-
- Junior Expert
- Posts: 3221
- Joined: 2004-06-24 22:08:56