리콜마이닝 > 클래식어시스트 매크로

본문 바로가기

사이트 내 전체검색

뒤로가기 클래식어시스트 매크로

 

리콜마이닝

페이지 정보

작성자 LastEnvoy 작성일 24-02-14 22:19 조회 449 댓글 6

본문

from ClassicAssist.UO.Data import Statics, MapInfo
from ClassicAssist.UO import UOMath
from Assistant import Engine
from System import Convert
import clr
clr.AddReference('System.Core')
    
recallbuttons = list(range(10,26)) 
minetile = [0xef, 0x22e, 0x23c, 0x239, 0xfe, 0x21f, 0x224, 0x225]
miningresources = [0x19b8, 0x19b7, 0x19b9, 0x19ba, 0x3197, 0x3192, 0x3194, 0x3195, 0x3193, 0x3198, 0xf28]
gemresources = [0xf10, 0xf11, 0xf25, 0xf26, 0xf13, 0xf15, 0xf16, 0xf18, 0x3190, 0x3191, 0xf0f, 0x5732]
oreTypes = [0x19b7, 0x19b8, 0x19b9, 0x19ba]
craftGumpId = 0x38920abd
runebooks = [0x4022274f, 0x40222751] #Replace this with your own runebooks 0x40206e11,0x40222750,
homebook = 0x40206e10 #Replace this with your own runebook with dropoff location
resChest = 0x41175410 #Replace this with your resource container
forge = 0x4023bfb7 #Replace this with your forge


def GetRunebookEntries(serial):
    entries = []
    SysMessage(str(serial))
    UseObject(serial)
    if WaitForGump(0x59, 5000):
        res,gump = Engine.Gumps.GetGump(0x59)
        y = 60
        
        while y <= 165:
            element = gump.Pages[1].GetElementByXY(145, y)
            if element != None and element.Hue != 0:
                entries.append(element.Text)

            y = y + 15
            
        y = 60

        while y <= 165:
            element = gump.Pages[1].GetElementByXY(305, y)
            if element != None and element.Hue != 0:
                entries.append(element.Text)
                
            y = y + 15
            
    return entries
    
def Tinker(category, button):
    count = CountType(0x1bf2, "backpack", 0)
    countcont = CountType(0x1bf2, resChest, 0)
    
    if countcont == 0:
        SysMessage("Out of iron ingots!", 33)
        Stop()
    if count < 50:
        MoveType(0x1bf2, resChest, "backpack", 0, 0, 0, 0, 50)
        Pause(1000)
    if FindType(0x1eb8, 0, "backpack"):
        UseObject("found")  
        ReplyGump(craftGumpId, category)
        WaitForGump(craftGumpId, 5000)
        ReplyGump(craftGumpId, button)
        WaitForGump(craftGumpId, 5000)
    else:
        SysMessage("Out of tinker tools!", 33)
        Stop()

def GetNearestMine():
    rocks = []
    for x in range(Engine.Player.X-2, Engine.Player.X+3):
        for y in range(Engine.Player.Y-2, Engine.Player.Y+3):
            mapinfo = MapInfo.GetLandTile(Convert.ChangeType(Engine.Player.Map, int), x, y)
            #SysMessage("found[{0}]".format(mapinfo.ID))
            if mapinfo.ID in minetile: # == 0xef: #
                rocks.append({'X': (mapinfo.X - Engine.Player.X), 'Y': (mapinfo.Y - Engine.Player.Y), 'Z': mapinfo.Z})
    return rocks

def Mine():
    if not FindType(0xf39, -1, "backpack") and not FindType(0xe86, -1, "backpack"):
        SysMessage("Out of mining tools!", 33)
        DropResources(homebook)
        UseObject(resChest)
        Pause(2000)
        toolsnumber = CountType(0xf39, "backpack",0)
        tinkernumber = CountType(0x1eb8, "backpack", 0)
        if tinkernumber < 2:
            while CountType(0x1eb8, "backpack",0) < 5:
                Tinker(15, 23)
            ReplyGump(0x38920abd, 0)
        if toolsnumber < 2:
            while CountType(0xf39, "backpack",0) < 5:
                Tinker(15, 72)
            ReplyGump(0x38920abd, 0)
    tool = GetAlias("found")
    UseObject(tool)
    WaitForTarget(1000)
    TargetByResource('found', 'Ore')
    Pause(1000)

def DropResources(runebook):
    while not FindObject(resChest):
        UseObject(runebook)
        WaitForGump(0x59, 5000)
        ReplyGump(0x59, 10)
        Pause(3000)
    Pause(3000)
    UseObject(resChest)
    for item in gemresources:
        while FindType(item, -1, "backpack"):
            Pause(500)
            MoveItem("found", resChest)
            Pause(500)
            if not FindType(resChest):
                break

def SmeltOre(container, object):
    ClearIgnoreList()
    UseObject(resChest)
    WaitForContents(container, 2000)
    for ore in oreTypes:
        while FindType(ore, -1, container):
            if Graphic('found') == 0x19b7:
                item = Engine.Items.GetItem(GetAlias('found'))
                if item is None:
                    break
                elif item.Count <= 1:
                    IgnoreObject('found')
                    continue
            UseObject('found')
            WaitForTarget(5000)
            Target(object)
            Pause(1000)
            while FindType(0x1bf2, 3):
                MoveItem('found', resChest)
                Pause(1000)
                IgnoreObject('found')
            while FindType(0x1bf2, -1, 'backpack'):
                MoveItem('found', resChest)
                Pause(1000)
                IgnoreObject('found')   
    for item in miningresources:
        while FindType(item, -1, "backpack"):
            Pause(500)
            MoveItem("found", resChest)
            Pause(500)
            if not FindType(resChest):
                break

while True:
    for currentbook in runebooks:
        entries = GetRunebookEntries(currentbook)
        for x in range(len(entries)): 
            UseObject(currentbook)
            WaitForGump(0x59, 5000)
            ReplyGump(0x59, recallbuttons[x])
            Pause(5000)
            ClearJournal()
            while not InJournal("metal here to mine", "system"):
                Mine()
                if InJournal("Target cannot be seen", "system"):
                    break
                elif InJournal("You can't mine there", "system"):
                    break
                elif InJournal("You can't mine that", "system"):
                    break                        
                elif Weight() >= MaxWeight() - 80:
                    DropResources(homebook)
                    SmeltOre('backpack', forge)
                    toolsnumber = CountType(0xf39, "backpack",0)
                    tinkernumber = CountType(0x1eb8, "backpack", 0)
                    if tinkernumber < 2:
                        while CountType(0x1eb8, "backpack",0) < 5:
                            Tinker(15, 23)
                        ReplyGump(0x38920abd, 0)
                    if toolsnumber < 2:
                        while CountType(0xf39, "backpack",0) < 5:
                            Tinker(15, 72)
                        ReplyGump(0x38920abd, 0)
                    UseObject(currentbook)
                    WaitForGump(0x59, 5000)
                    ReplyGump(0x59, recallbuttons[x])
                    Pause(5000)
            Resync()

댓글목록 6

BONGGOON님의 댓글

BONGGOON 작성일

와아..고생하십니다..  하얀건 바탕이요 색색은 글씨니..

마스터골드님의 댓글

마스터골드 작성일

좋은자료 감사합니다!

어질현님의 댓글

어질현 작성일

오.... 혹시 취발에도 작동하려나요?

마스터골드님의 댓글의 댓글

마스터골드 작성일

취발은 안되는걸로 보이네요

그녀석님의 댓글

그녀석 작성일

감사합니다.

Pensive님의 댓글

Pensive 작성일

if FindType(0x1eb8, 0, "backpack"):
        UseObject("found") 
        ReplyGump(craftGumpId, category)
        WaitForGump(craftGumpId, 5000)
        ReplyGump(craftGumpId, button)
        WaitForGump(craftGumpId, 5000)
이부분을

 if FindType(0x1eb8, 0, "backpack"):
        UseObject("found") 
        WaitForGump(0x38920abd, 5000)
        ReplyGump(0x38920abd, 15)
        WaitForGump(0x38920abd, 5000)
        ReplyGump(0x38920abd, 73)
        WaitForGump(0x1220462e, 5000)
        ReplyGump(0x1220462e, 1)
        WaitForGump(0x38920abd, 5000)

이런식으로 고쳐주면 삽을 만듭니다.

다만 팅커툴을 좀 넉넉하게 백팩에 넣어 두어야 합니다.
4개 이상이면 정상으로 돌아가는데
작아지면 삽을 이빠이 만들고 멈춥니다.

전체 134건 4 페이지
게시물 검색

 

회사소개 개인정보처리방침 서비스이용약관

사이트 정보

회사명 : 회사명 / 대표 : 대표자명
주소 : OO도 OO시 OO구 OO동 123-45
사업자 등록번호 : 123-45-67890
전화 : 02-123-4567 팩스 : 02-123-4568
통신판매업신고번호 : 제 OO구 - 123호
개인정보관리책임자 : 정보책임자명

Copyright © 소유하신 도메인. All rights reserved.
PC 버전으로 보기