Home Wiki Codex Forum Donations Portal

Working on a looter

Discussion about the technical aspects of scripting. Ask about all issues involving your freelance projects here.

Working on a looter

Postby [Glyph] on Wed Jun 14, 2017 1:30 pm

So in trying to adapt Blazes skinner I find that the following could be adapted to find any stacks of items.

sub loot
set #lObjectID #findID
lootAgain:
event macro 17
gosub scanner
if pathFind in #result
{
event pathFind #findX #findY
wait 1
goto lootAgain
}
wait 7
gumpLoop:
if #contSize <> 144_212
goto gumpLoop
findItem %stuff C_ , %corpse
if #findKind = -1
return
if #findType = OFF || #findType = VLK
goto dragDrop
set %hides #findID
findItem JAG C_ , #backpackID
if #findKind = -1
return
set #lTargetID %hides
set #lObjectID #findID
event macro 17
target
event macro 22
wait 7
findItem JJG C_ , %corpse
dragDrop:
exEvent drag #findID #findStack
exEvent dropC #backpackID
return


This works fine for the hides. My question is could the set#targetID %hides be changed to something like


set %gems uvf_vuf_gvf_evf_hvf_ovf_fvf_bvf_rvf_
set %regs KUF_JUF_KZF_JZF_MZF_WZF_RZF_SZF_IUF_DUF_TZF_UZF_YZF_
set %bones OJK_XIK_SJK_IJK_TJK_BJK_UJK_DJK_MJK_AJK_LJK
+_FJK_RJK_EJK_ZIK_YIK_JJK_GJK_KJK_HJK_OZF

to find gems, regs, and bones? I think OZF is daemon bones, the others can be removed. I found this online for easyuo but am not sure if this will work on Excelsior or with Blazes script. I have no prior experience coding other than a few videos I have watched and very limited time spent playing with the Learn Java app on my phone. Any and all help and advice is greatly appreciated.
User avatar
[Glyph]
Elder Scribe
 
Posts: 128
Joined: Mon Sep 14, 2015 12:04 am

Re: Working on a looter

Postby Superduke on Thu Jun 15, 2017 3:38 pm

No, because you do not want to use #ltargetid as you are not going to target those items with an object.

So in trying to adapt Blazes skinner I find that the following could be adapted to find any stacks of items.


If you want to find stacks of items and drop them into your pack you just need these commands:

findItem
exEvent drag #findID #findStack
exEvent dropC #backpackID

Basically only the last lines of the script you posted are usable. The rest is for finding and cutting hides.

I would suggest to find a simple looter from easyuo and work from there.
Superduke
Grandmaster Scribe
 
Posts: 83
Joined: Fri May 27, 2011 2:28 am

Re: Working on a looter

Postby [Glyph] on Thu Jun 15, 2017 10:42 pm

I have been looking on our forums and in the easyuo website. I did download one from Anarchy on our forums but cant get it to start.

Will the script you provided find any stacks that are on a corpse? Or does there need to be a list of things to look for?

viewtopic.php?f=25&t=6255. This is the forum link for the Anarchy looter.
User avatar
[Glyph]
Elder Scribe
 
Posts: 128
Joined: Mon Sep 14, 2015 12:04 am

Re: Working on a looter

Postby [Glyph] on Wed Jun 21, 2017 6:57 am

Well, I tried again with a very limited script to just move any stacks of items on a corpse to my pack and it failed miserably. :lool: Got a huge spam of You can't pick that up" and it seemed to be trying to move a stack of gold one piece at a time. :verymad: Any advice on moving stacks all at once? All help is greatly appreciated.
User avatar
[Glyph]
Elder Scribe
 
Posts: 128
Joined: Mon Sep 14, 2015 12:04 am

Re: Working on a looter

Postby Opopanax on Wed Jun 21, 2017 10:41 am

So I'm by no means an expert at the whole coding thing, but I did once write a script from scratch that looted chests, to get an entire stack I used this sub to move gold from a target chest into my backpack.

;;;;;;;;;;;;;;;;;;;;;;;;;;;
sub lootgold
wait 4
finditem %gold C_ , %currchest
if #FINDCNT > 0
{
Exevent drag #findid #findstack
wait 4
Exevent Dropc #backpackid
wait 4
return
}
event exMsg #charID 3 0 + no gold+
return
;;;;;;;;;;;;;;;;;;;;;;;;;;;

I have no idea if it's the best or most efficient way to do it, but it worked for me! You will need to define your %gold which is always POF I think, I'm not sure why I have it as a variable here, and %currchest was the container that I was looting from, so here it will be your corpse container. I hope this helps, really sorry if it's wrong. If someone corrects what I've written here, it will be a lesson for me as well :)
In game name: Abarai
Opopanax
Elder Scribe
 
Posts: 150
Joined: Sun Jun 30, 2013 10:25 am

Re: Working on a looter

Postby [Glyph] on Wed Jun 21, 2017 7:46 pm

Thanks. I will see if I can get it to work.
User avatar
[Glyph]
Elder Scribe
 
Posts: 128
Joined: Mon Sep 14, 2015 12:04 am

Re: Working on a looter

Postby Superduke on Thu Jun 22, 2017 5:09 am

Have you looked into uosteam already?
Superduke
Grandmaster Scribe
 
Posts: 83
Joined: Fri May 27, 2011 2:28 am

Re: Working on a looter

Postby [Glyph] on Thu Jun 22, 2017 9:34 am

I have. I get a cant find the name of the Intel ICD driver error. Perhaps someone knows how to get around this issue? Again, all help is appreciated.
User avatar
[Glyph]
Elder Scribe
 
Posts: 128
Joined: Mon Sep 14, 2015 12:04 am

Re: Working on a looter

Postby Superduke on Thu Jun 22, 2017 1:22 pm

Superduke
Grandmaster Scribe
 
Posts: 83
Joined: Fri May 27, 2011 2:28 am


Return to Coding talk

Who is online

Users browsing this forum: No registered users and 1 guest