Re: 【EasyUO】練鐵匠 打造匕首並賣掉匕首
發表於 : 週二 2月 25, 2014 10:32 pm
				
				
			這不是置頂的EasyUO中文說明書嗎?
代碼: 選擇全部
    ;==================================
    ; Script Name: Auto Make Last
    ; Author: Hartman
    ; Version: 1.1
    ; Client Tested with: 4.0.1b
    ; EUO version tested with: 1.41
    ; Shard OSI / FS:
    ; Revision Date:
    ; Public Release: 21/02/04
    ; Global Variables Used: none
    ; Purpose: Makes Last in any crafting menu
    ;==================================
    ; No need to edit anything. Just run script.
    ; By clicking more than one Make button you can set
    ; the number to make to whatever you wish.
    ; This script doesnt find your tools or anything like that,
    ; and remember to make the first by yourself.
    ; If you click Make Em and nothing happens, just click
    ; anywhere in your craftgump.
    ; Thanks to Quintok for helping out with detecting the
    ; craftgump.
    InitEvents
    set %makecount 0
    set %go 0
    gosub showEUOMenu1
    main:
      if #menubutton <> n/a
      {
        gosub #menubutton
        set #menubutton n/a
      }
      if %go = 1
      {
        if %makecount > 0
        {
          gosub checkforcraftmenu
          if #result
          {
            gosub makeone
          }
        }
      }
      ; wonder if this could save some cputime ?
      wait 5
    goto main
    sub checkforcraftmenu
      if #contSize = 530_437
      {
        return #true
      }
      return #false
    return
    sub makem
      set %go 1
    return
    sub makeone
      click 330 460
      set %makecount %makecount  - 1
      gosub update_l_remaining
      if %makecount = 0
      {
        set %go 0
      }
    return
    sub mk1
      set %makecount %makecount + 1
      gosub update_l_remaining
    return
    sub mk5
      set %makecount %makecount + 5
      gosub update_l_remaining
    return
    sub mk10
      set %makecount %makecount + 10
      gosub update_l_remaining
    return
    sub mk20
      set %makecount %makecount + 20
      gosub update_l_remaining
    return
    sub mk50
      set %makecount %makecount + 50
      gosub update_l_remaining
    return
    sub mk100
      set %makecount %makecount + 100
      gosub update_l_remaining
    return
    sub update_l_remaining
      menu delete l_remaining
      menu Text l_remaining 8 104 Remaining %makecount
    return
    sub stop
      set %makecount 0
      set %go 0
      gosub update_l_remaining
    return
    ;love the menu designer
    ;--------- EasyUO Menu Designer Code Begin ---------
    sub showEUOMenu1
            menu Clear
            menu Window Title Make Last by Hartman
            menu Window Color BtnFace
            menu Window Size 217 191
            menu Font Transparent #true
            menu Font Name MS Sans Serif
            menu Font Size 8
            menu Font Style
            menu Font Color WindowText
            menu Font BGColor BtnFace
            menu Text l_remaining 8 104 Remaining
            menu Font BGColor BtnFace
            menu Text l_info 8 120 If nothing happens, click your craft gump
            menu Button mk1 16 8 59 25 Make 1
            menu Button mk5 80 8 59 25 Make 5
            menu Button mk10 144 8 59 25 Make 10
            menu Button mk50 80 40 59 25 Make 50
            menu Button mk100 144 40 59 25 Make 100
            menu Button mk20 16 40 59 25 Make 20
            menu Button makem 8 72 203 25 Make Em
            menu Button stop 8 136 203 49 Reset and stop
            menu Show 421 270
    return
    ;--------- EasyUO Menu Designer Code End ---------代碼: 選擇全部
initevents
event macro 13 16
target 4s
while #targcurs = 1
{
 msg 請選擇放鐵磚的包包或容器 $
 wait 15
}
set %box #ltargetid
set #lobjectid %box
event macro 17
wait 1s
start:
finditem ENK C_ , #backpackid
if #findstack <= 2
{
finditem ENK C , %box
wait 10
exevent drag #findid 150
wait 15
exevent dropc #backpackid
}
gosub dagger
dagger:
finditem TLH C_ , #backpackid
if #findkind = -1
{
msg Vendor buy $
}
set #LOBJECTID #findid
event macro 17 0
{
if #contSize = 530_437
{
return #true
}
wait 3s
click 332 460
}
gosub sell dagger
sub selldagger:
finditem WSF C_ , #backpackid
if #findcnt >= 10
{
msg Vendor sell $
}
goto start