Official ScriptUO EasyUO Scripts > Scripting Chat

OSI tester Needed. Mining with Fire Beetle. ~5 minutes.

(1/3) > >>

lydaan:
I was wondering if someone with an OSI account with a miner and a fire beetle could try a little bit of test code for me? I was sort of asking about this a few years ago when I was working on my miner for my FS, and I am still curious. The whole test will take roughly 5 minutes if you have a miner and fire beetle ready to go. Let me know if there are any issues with script execution.

Test code:

--- Code: ---;just copy this code, grab a shovel and your fire beetle
;and head to the nearest cave.
;hit the dirt once, and if you pull up some ore, press play
set #lpc 100
set %oretypes TVJ_EWJ_DWJ_GWJ

finditem OHP * g
set %fireBeetleID #findid

set %shovel #lobjectid
set %mtile #ltargettile
set %mkind #ltargetkind
set %mx #ltargetx
set %my #ltargety
set %mz #ltargetz

finditem %oretypes * c_ , #backpackid
 if #findcnt > 0 6
   set #lobjectid #findid
   event macro 17
   set #ltargetid %fireBeetleID
   set #ltargetkind 1
   target
   event macro 22

wait 30
   
loop:
   set #lobjectid %shovel
   event macro 17
   set #ltargettile %mtile
   set #ltargetkind %mkind
   set #ltargetx %mx
   set #ltargety %my
   set #ltargetz %mz
   while #targcurs <> 1
      gosub scan journal
   event macro 22
   finditem %oretypes * c_ , #backpackid
   if #findcnt > 0 6
      set #lobjectid #findid
      event macro 17
      set #ltargetid %fireBeetleID
      set #ltargetkind 1
      while #targcurs <> 1
         gosub scanjournal
      event macro 22
   repeat
      gosub scanjournal
      finditem %oretypes * c_ , #backpackid
   until #findcnt > 0 || you_loosen in #journal
goto loop

sub scanjournal
   scanjournal #jindex
   if you_must in #journal 2
      display Test failed! you cannot dig>smelt>dig>smelt>... on OSI
      halt
   if there_is_no in #journal 2
      display Success! you can dig>smelt>dig>smelt>... on OSI
      halt
return
--- End code ---

Crisis:
I will test this out tomorrow and let you know.

Gaderian:
What does the * do in each of the finditem statements?

lydaan:
from EUO wiki:
--- Quote ---If * is used instead of an id or an index, all items of all types will be returned.
--- End quote ---

I really don't know. In my experience,

--- Code: ---finditem
--- End code ---

returns everything everywhere.

apparently

--- Code: ---finditem *
--- End code ---
does as well.

I just used the * when I first started writing scripts like 5 years ago, and have used

--- Code: ---finditem %string * c/g_ , %mod
--- End code ---
for thousands of continuous hours, so I just stopped worrying about it.
it might add the A modifier if you just use the star. I really don't know lol.

*edit: I guess it if you don't use [parameter 1].

--- Code: ---finditem * c/g_ , %mod
--- End code ---
I have used it like that, but I always use it unless I just use

--- Code: ---finditem
--- End code ---
alone


and thanks crisis. it's probably either going to fail in the wrong spot, or work as intended.

Crisis:
It failed :(

Navigation

[0] Message Index

[#] Next page

Go to full version