| 原創:Adie YCT49B
 聲明:
 看不懂? => 沒關係! => 關鍵是想不想學 ↓
 
 推薦
 (聯合國外掛研究學院)Seraph討論區:http://bbs.seraph.com.tw/index.php
 
 期待你的加入喔^ ^
 YCT65B
 -
 -
 -
 一、功能說明:
 分享一下我目前練功的版本
 也希望大家都一起研究寫腳本
 而不是伸手牌
 ---------------------------------------------------------------------------------
 功能:
 1、後台作業
 2、支援多開
 3、不搶怪
 4、可打指定怪
 5、感謝xevis 的討伐腳本
 6、需要範圍練功,可以參考討論區 hteng 的腳本
 7、選怪模式說明:
 我寫成2個模式
 choice(1) //選怪模式1:不搶怪
 choice(2) //選怪模式2:只打指定怪+不搶怪
 8、指定怪設定方式:只要打上怪物名字的關鍵字就可以
 提供10組名稱,請玩家自行設定,這樣可以淢少打到領主怪的機率。
 例:我要打xxxx魚,只要填上『魚』就行了。
 沒設定的請保留Null,要不然會出錯。
 need[1]="食人花"
 need[2]="探險"
 need[3]="魚"
 need[4]="者"
 need[5]="豬"
 need[6]="Null"
 need[7]="Null"
 need[8]="Null"
 need[9]="Null"
 need[10]="Null"
 
 ![]() 
 
 
 二、雙開模式說明:
 1、神鬼奇兵開2個
 2、seraph開2個,把我的腳本再另存一個,另設熱鍵。
 3、第一個SP腳本,熱鍵設F9,第二個SP,熱鍵設F10。
 4、開第一隻神鬼畫面,按F9。
 5、開第二隻神鬼畫面,按F10。
 6、完成雙開雙掛。
 
 
 
 三、安裝程式和套用腳本:
 1、安裝Seraph7.40。
 程式下載地址:http://www.seraph.com.tw/down/Seraph7.40.exe
 
 2、下載【神鬼奇兵腳本】
 解壓出來 => 神鬼奇兵(練功專用腳本)demo
 腳本下載地址:http://fhd.iwgun.net/downfile.php?action=public&file_id=2006&file_key=9EjuGNZ8
 
 3、找到并運行Seraph.exe。
 
 ![]() 
 4、點擊[文件] / 打開。
 
 ![]() 
 5、選中並開啟腳本...神鬼奇兵輔助-內存版腳本.ser。
 
 ![]() 
 6、腳本參數設置。
 參考參數說明,雙擊【參數值】,進行設置。
 
 7、開啟腳本后,下方會有提示按哪個[熱鍵]啟動腳本。
 
 ![]() -
 -
 -
 源代碼:
 複製代碼#[HOTKEY]F9
dim sum=1,hp,hp1,hp2,mp,mp1,mp2,xp,pet,pet1,pet2,pmp2,IDname,can1,can2,winx0,winy0,winid,cons
function main
        SetInputMode(4)
        GetActiveWindowXY(WinX0, WinY0)
        SetTimer("skill1", 600000, true)  //施放技能1,每10分鐘
        SetTimer("skill2", 1800000, true)  //揓技技能2,每30分鐘
while true
        GO()
wend
end function
function GO
        KSP_ReadMemory(&H1C0F27C,2,find)
        //check2()     //討伐腳本
        //check3()    //檢查esc
        if find=0 then
                KeyPress("`")
                choice(1) //選怪模式1:不搶怪  ;選怪模式2:只打指定怪+不搶怪
        else
                while find>0 
                        choice(1) //選怪模式1:不搶怪  ;選怪模式2:只打指定怪+不搶怪
                        KeyPress("1")
                        wait(500)
                        check()    //邊打邊檢查hp、mp、寵hp
                        
                   KSP_ReadMemory(&H1C0F27C,2,find)
                wend
                check()   //打完再檢查一下hp、mp、寵hp
                
                print("第" & sum &"隻怪–" & IDname & " |討伐:" & cons & "/60")
        print("HP:" & hp2 & "%|MP:" & mp2 & "%|XP:" & xp & "|寵HP:" & pet2 & "%" &"|寵MP:" & pmp2 & "%")        
        sum=sum+1
        end if
end function
function Check  //檢查hp、mp、xp、寵血
        ResetMemBuffer()
        KSP_ReadMemory(&H16398A4,2,hp)
        KSP_ReadMemory(&H16398C0,2,hp1)
        KSP_ReadMemory(&H16398A8,2,mp)
        KSP_ReadMemory(&H16398C4,2,mp1)
        KSP_ReadMemory(&H1A4E4B0,2,xp)
        KSP_ReadMemory(&H1675E28,2,pet)
        KSP_ReadMemory(&H1675E2C,2,pet1)
        KSP_ReadMemory(&H1676FB8,2,pmp)
        KSP_ReadMemory(&H1676FBC,2,pmp1)
        KSP_ReadMemory(&H1C13EEC,5,20,IDname)
        hp2=int(hp/hp1*100)
        mp2=int(mp/mp1*100)
        pet2=int(pet/pet1*100)
        pmp2=int(pmp/pmp1*100)
        if hp2<80 then   //hp低於80%,按補血鍵
                KeyPress("F1")
        end if
        if mp2<50 then  //hp低於50%,按補mp鍵
                KeyPress("F2")
        end if
        if pet2<70 then //寵的血低於80%,按吃藥鍵
                KeyPress("F3")//寵的魔低於80%,按吃藥鍵
        end if
        if pmp2<70 then
                               KeyPress("F3")//寵的魔低於80%,按吃藥鍵
        end if
        if xp=1001 then //xp滿,自動放
                KeyPress("0")
        end if
end function
function skill1  //技能1按鍵
        KeyPress("8")
end function
function skill2  //技能2按鍵
        KeyPress("9")
end function
        
function choice(mode) //選怪模式1:不搶怪  ;選怪模式2:只打指定怪+不搶怪
        can1=1
        can2=1
        if mode=1 then //模式1,不搶怪
                do
                        can_hit()  //不搶怪 
                loop until can1=0        
        end if
        if mode=2 then //模式2,只打指定怪+不搶怪
           do
                 need_hit() //只打指定怪
                 can_hit()  //不搶怪
           loop until can1=0 and can2=0
        end if
end function
function can_hit
KSP_ReadMemory(&H1C3CAE0,2,can1)
        if can1>0 then
                KeyPress("`")
        end if
end function
function need_hit        
        need=Array(10)
        need[1]="食人花"
        need[2]="探險" 
        need[3]="魚" 
        need[4]="者"
        need[5]="Null"
        need[6]="Null"
        need[7]="Null"
        need[8]="Null"
        need[9]="Null"
        need[10]="Null"
        ResetMemBuffer()
        KSP_ReadMemory(&H1C13EEC,5,20,need1)        
        for i=1 to 10                    
                Pos = Instr(need1, need) 
                if pos>0 then
                        exit for
                end if
        next
        if pos=0 then
                KeyPress("`")
        else
                can2=0
        end if
end function
function check2  //討伐怪
        //book=&H9C384D0   //每個人都不同,請自行尋找。
        KSP_ReadMemory(book,2,cons)//選擇討伐怪類型 (這行是討伐怪數量所在的記憶體位址,但每個人會不同,重開遊戲後也會不同)
        KSP_ReadMemory(&H1CDBB68,2,itemtab)
        while cons=60        //當未接任務時,其值會是0,因此在直接啟動腳本時並不會自動開道具欄接任務,所以需要自己先接一次討伐卷                
                while itemtab=0   //判斷道具欄是否開啟,如果沒開啟,則開啟
                        Keypress("A")
                        wait(400)
                        KSP_ReadMemory(&H1CDBB68,2,itemtab)
                        
                wend
                wait(1000)
                mousemove(785, 214) //這兩行座標是我把道具欄移到最左上的第一格座標
                wait(200)
                MouseRightClick()//這兩行座標是我把道具欄移到最左上的第一格座標
                wait(200)
                KSP_ReadMemory(book,2,cons)//選擇討伐怪類型
                wait(400)
        wend
        
        if itemtab=1 then    //判斷道具欄是否開啟,如果為是,則關閉道具欄
                Keypress("A")                
        end if
        
end function
function check3  //檢查esc
        KSP_ReadMemory(&H3296e01,2,chkesc)
        if chkesc=1 then
                Keypress("Esc")                
        end if
end function
 |