黃易群俠傳M脫機外掛應用程式黃易神行
1394
0

[發問] OP做鹽酸瓶 巨集 都說沒開倉庫這段 有大大幫我看一下 我哪錯嗎?

yvonne1123 發表於 2011-3-24 11:16:03 | 只看該作者 回帖獎勵 |倒序瀏覽 |
###########################################################
# 1. 倉庫備妥藥缽、空瓶、不死心臟,至少各100個
# 2. 把帶在身上鹽酸瓶製作說明書
# 3. 決定存倉用卡普拉NPC的座標,並將座標填入初始變數 $npcLocation 後面
# 4. 移動至看得到卡普拉NPC的任何一點上 automake on
# 5. 身上物品儘量清空
# 6. 組隊
# 7. 執行程式,待出現"設定值初始化完畢"訊息後鍵入指令 "macro start"

automacro initiate {
        run-once 1
        call {
                # 以下設定卡普拉所在座標,可根據不同的卡普拉 NPC 座標作更改
                $npcLocation = 290 224
                # 其他想要初始化設定什麼的可以在下面新增
                do conf storageAuto 0
                do conf sellAuto 0
                do conf autoTalkCont 0
                do conf logPartyChat 1
                do conf sitAuto_sp_lower 0
                do conf sitAuto_sp_upper 0
                do conf sitAuto_over_50 0
                # 一組材料重 10
                do eval $::Macro::Data::varStack{controlAmount} = int(($::char->{'weight_max'} * 0.5 - $::char->{'weight'}) / 12)
                # $controlAmount = @eval(int(($.maxweight * 0.5 - $.weight) / 12))
                log 最大可攜帶 $controlAmount 組材料而不負重
                if ($controlAmount > 0) goto jump1
                        log ***** 注意!未攜帶材料前已負重,可能導致巨集執行錯誤! *****
                :jump1
                if (@invamount(鹽酸瓶製作說明書) != 0) goto jump2
                        log ***** 注意!鹽酸瓶製作說明書尚未帶在身上 *****
                :jump2
                log 設定值初始化完畢
        }
}
# 補貨判斷
automacro refillCheck {
        sp > 95%
        inventory "鹽酸瓶製作說明書" = 1
        inventory "藥缽" = 0
        inventory "空瓶" >= 0
        inventory "不死心臟" >= 0
        # 以下為倉庫物品存量判斷
        var medicineBowls > 150
        var emptyBOTtles > 150
        var poisonSpores > 150
        run-once 1
        call start
}
# 補貨
macro start {
        lock pharmacy
        do talk @npc ($npcLocation)
        do talk cont
        do talk resp 1

        # 若身上有上次做出來的鹽酸瓶,則存入倉庫
        if (@invamount(鹽酸瓶) = 0) goto jump
                $usedMedicineBowls = @eval($tempMedicineBowls - @invamount(藥缽))
                $finishedAmount = @invamount(鹽酸瓶))
                do storage add @inventory(鹽酸瓶) @invamount(鹽酸瓶))
        # 本 if 為計算成功率用
        if ($usedMedicineBowls <= 0) goto jump
                $rateOfSuccess = @eval($finishedAmount / $usedMedicineBowls)
                do eval $::Macro::Data::varStack{rateOfSuccess} = sprintf("%.2f",$::Macro::Data::varStack{rateOfSuccess} * 100) . '%';
                do p 上批製造 $usedMedicineBowls 個鹽酸瓶成功率 $rateOfSuccess
        :jump
        # 由倉庫取出材料
        do storage get @storage(藥缽) @eval(150 - @invamount(藥缽))
        do storage get @storage(空瓶) @eval(150 - @invamount(空瓶))
        do storage get @storage(不死心臟) @eval(150 - @invamount(不死心臟))
        [
        $medicineBowls = @storamount(藥缽)
        $emptyBottles = @storamount(空瓶)
        $poisonSpores = @storamount(不死心臟)
        $tempMedicineBowls = @invamount(藥缽)
        ]
        # 由隊頻顯示並記錄倉庫材料剩餘量與成品數量
        do p 藥缽尚餘 $medicineBowls 個
        do p 空瓶尚餘 $emptyBottles 個
        do p 不死心臟尚餘 $poisonSpores 個
        do p 鹽酸瓶 @storamount(鹽酸瓶) 個

        do storage close
        release refillCheck
        release pharmacy
}
# 製藥判斷
automacro pharmacy {
        sp > 20
        inventory "鹽酸瓶製作說明書" == 1
        inventory "藥缽" >= 1
        inventory "空瓶" >= 1
        inventory "不死心臟" >= 1
        exclusive 1
        run-once
        call {
                do ss 228 10
                do send 8E 01 E0 1B 00 00 00 00 00 00
                release pharmacy
        }
}
收藏收藏 分享分享 讚 幹 分享分享 FB分享
回覆

使用道具 舉報


您需要登錄後才可以回帖 登錄 | 註冊


手機版 | Archiver | 外掛聯合國

GMT+8, 2024-4-27 22:48 , Processed in 0.051803 second(s), 19 queries , Memcache On.

版權說明:
  本站不會製作、經銷、代理外掛程式。僅免費提供外掛程式下載前之掃毒及掃木馬等安全檢測驗證,協助會員遠離盜號危險程式。本站所有資料均來自網際網路收集整理,說明文字暨下載連結轉載自原程 式開發站。站上出現之公司名稱、遊戲名稱、程式等,商標及著作權,均歸各公司及程式原創所有,本站程式所有權歸外掛聯合國所有。本程式所有權歸外掛聯合國所有.......

回頂部
第二步?
第三步?