--------------------------------------------
--һκⶼԷǵĴ
------------ǻһʱ㴦----------
--------------------------------------------

--************ʹô˽ű************
--****Լ()ڲֿȻü****
--سǶ-ù() ù 2 Աͼ
--Ʒ2 -ڿҪʹõ-д(:ħ)  
--Ʒ-ɸѡ:-еĿʯ()-() ҲҪ  ҲҪ
--************ʹô˽ű************

--****************ܼƷ÷****************
--Ʒ-ҪܵĿʯóɼƷ-ƷԳ־
--(:ʯ,Ʒд[ʯ],ĳ־üҪ15ϵĲűܾд15)
--****************÷****************
--ڵĿҪҪ8ϵĲűڰûȥ,8ľͶ.
--Ʒ-һ-ҪĿʯд-ĳ־дҪٴϵ
--(:ͭ,Ʒд[ͭ],ĳ־üڵĿ󴿶8Ͷôд8)
--ͬʱҪ-Ʒ-ȡƷ-ӵ-ǰ湳

ϵͳ.óű()

жϵͼ
.л״̬Ϊ('')
if ϵͳ.ǰͼ('D401') then ϵͳ.ת('Ͽ') end
if ϵͳ.ǰͼ('D413') then ϵͳ.ת('Aһ') end
if ϵͳ.ǰͼ('D411') then ϵͳ.ת('Bһ') end
if ϵͳ.ǰͼ('0103') then ϵͳ.ת('̵') end
if ϵͳ.ǰͼ('0106') then ϵͳ.ת('װ') end
if ϵͳ.ǰͼ('0105') then ϵͳ.ת('ε') end
.л״̬Ϊ('Ϣ')
if ϵͳ.ǰͼ('0') then ϵͳ.ת('س') end
if ϵͳ.ǰͼ('GA0') then ϵͳ.ת('ׯ԰') end
if ϵͳ.ǰͼ('2') then ϵͳ.ת('ɽ') end
if ϵͳ.ǰͼ('3') then ϵͳ.ת('ʡ') end
if ϵͳ.ǰͼ('5') then ϵͳ.ת('µ') end
if ϵͳ.ǰͼ('4') then ϵͳ.ת('ħ') end
if ϵͳ.ǰͼ('11') then ϵͳ.ת('') end
ϵͳ.ת('ûԶس')

س
.л״̬Ϊ('Ϣ')
if .Ʒ('') > 50000 then ϵͳ.ת('ׯ԰') end
if .ƷҪ('1') then ϵͳ.ת('ׯ԰') end
if .ƷҪ('Ǯ') then ϵͳ.ת('ׯ԰') end
if .ƷҪ('Ʒ') then ϵͳ.ת('ׯ԰') end
if .ƷҪ('') then ϵͳ.ת('ׯ԰') end
if .ƷҪ('װ') then ϵͳ.ת('ׯ԰') end
if .ƷҪ('') then ϵͳ.ת('ׯ԰') end
if .ƷҪ('') then ϵͳ.ת('ׯ԰') end
if .ƷҪ('ָ') then ϵͳ.ת('ׯ԰') end
if .ƷҪ('鼮') then ϵͳ.ת('ׯ԰') end
if .ƷҪ('ҩƷ') then ϵͳ.ת('ׯ԰') end
if .ƷҪ('ӻ') then ϵͳ.ת('ׯ԰') end
if .ƷҪ('') then ϵͳ.ת('ׯ԰') end
if .ƷҪ('') then ϵͳ.ת('ׯ԰') end
if .ƷҪ('') then ϵͳ.ת('ׯ԰') end
if .ƷҪ('ҩƷ') then ϵͳ.ñ('ҩ') end
if .ƷҪ('') then ϵͳ.ת('ȥ') end
if .װҪ('') then ϵͳ.ת('ȥ') end
if .ƷҪ('װ') then ϵͳ.ת('ȥ·') end
if .ƷҪ('ͷ') then ϵͳ.ת('ȥ·') end
if .װҪ('·') then ϵͳ.ת('ȥ·') end
if .װҪ('ͷ') then ϵͳ.ת('ȥ·') end
if .װҪ('') then ϵͳ.ת('ȥ·') end
if .װҪ('ѥ') then ϵͳ.ת('ȥ·') end
if .ƷҪ('') then ϵͳ.ת('ȥε') end
if .ƷҪ('') then ϵͳ.ת('ȥε') end
if .ƷҪ('ָ') then ϵͳ.ת('ȥε') end
if .װҪ('') then ϵͳ.ת('ȥε') end
if .װҪ('') then ϵͳ.ת('ȥε') end
if .װҪ('') then ϵͳ.ת('ȥε') end
if .װҪ('ָ') then ϵͳ.ת('ȥε') end
if .װҪ('ҽָ') then ϵͳ.ת('ȥε') end
if .ƷҪ('鼮') then ϵͳ.ñ('鼮') end
if .ƷҪ('ҩ') then ϵͳ.ñ('ҩ') end
if .ƷҪ('ӻ') then ϵͳ.ñ('ӻ') end
if .ƷҪ('ӻ') then ϵͳ.ñ('ӻ') end


.ܵ(663, 214, true)
.߽ŵ㵽ͼ(664,213,'D401')
ϵͳ.sleep(1000)
if ϵͳ.ǰͼ('0') then ϵͳ.ת('') end

Ͽڣ
.ʹƷ(';')
.л״̬Ϊ('')
.ߴڵ(20,150,50)
.ߴڵ(83,15,50)
.ߴڵ(87,56,50)
.ߴڵ(36,28,50)
.ߴڵ(99,97,50)
.ߴڵ(174,26,50)
.ߴڵ(154,155,50)
ϵͳ.ת('жϵͼ')

Aһߣ
.ܵ(10, 8)
.߽ŵ㵽ͼ(10,7,'D401')
ϵͳ.sleep(1000)
if ϵͳ.ǰͼ('D413') then ϵͳ.ת('Aһ') end
ϵͳ.ת('жϵͼ')

Bһߣ
.ܵ(60, 8)
.߽ŵ㵽ͼ(60,7,'D401')
ϵͳ.sleep(1000)
if ϵͳ.ǰͼ('D411') then ϵͳ.ת('Bһ') end
ϵͳ.ת('жϵͼ')

ûԶس:
if .Ʒ('سǾ*') > 0 then ϵͳ.ת('ʹûسǾ') end
if .Ʒ('Ѿ') < 1 then ϵͳ.ת('߻ر') end
.ʹƷ('Ѿ')
ϵͳ.sleep(1000)
ϵͳ.ת('жϵͼ')

ʹûسǾ:
if .Ʒ('سǾ') < 1 then ϵͳ.ñ('سǾ') end
.ʹƷ('سǾ')
ϵͳ.sleep(1000)
ϵͳ.ת('жϵͼ')

߻ر棺
if ϵͳ.ǰͼ('D401') then ϵͳ.ת('Ͽ߻') end
if ϵͳ.ǰͼ('D413') then ϵͳ.ת('Aһ߻') end
if ϵͳ.ǰͼ('D402') then ϵͳ.ת('Ͽ߻') end
if ϵͳ.ǰͼ('D414') then ϵͳ.ת('Cһ߻') end
if ϵͳ.ǰͼ('D403') then ϵͳ.ת('һ߻') end
if ϵͳ.ǰͼ('D412') then ϵͳ.ת('߻') end

B߻أ
.ܵ(130, 42)
.߽ŵ㵽ͼ(129,42,'D412')
ϵͳ.sleep(1000)
if ϵͳ.ǰͼ('D404') then ϵͳ.ת('B') end

߻أ
.ܵ(54, 24)
.߽ŵ㵽ͼ(54,23,'D403')
ϵͳ.sleep(1000)
if ϵͳ.ǰͼ('D412') then ϵͳ.ת('߻') end

һ߻أ
.ܵ(11, 105)
.߽ŵ㵽ͼ(10,106,'D414')
ϵͳ.sleep(1000)
if ϵͳ.ǰͼ('D403') then ϵͳ.ת('һ߻') end

Cһ߻أ
.ܵ(15, 78)
.߽ŵ㵽ͼ(14,79,'D402')
ϵͳ.sleep(1000)
if ϵͳ.ǰͼ('D414') then ϵͳ.ת('Cһ߻') end

Ͽ߻أ
.ܵ(9, 146)
.߽ŵ㵽ͼ(8,147,'D413')
ϵͳ.sleep(1000)
if ϵͳ.ǰͼ('D402') then ϵͳ.ת('Ͽ߻') end

Aһ߻أ
.ܵ(10, 8)
.߽ŵ㵽ͼ(10,7,'D401')
ϵͳ.sleep(1000)
if ϵͳ.ǰͼ('D413') then ϵͳ.ת('Aһ߻') end

Ͽ߻أ
.ܵ(25, 181)
.߽ŵ㵽ͼ(24,182,'N0')
ϵͳ.sleep(1000)
if ϵͳ.ǰͼ('D401') then ϵͳ.ת('Ͽ߻') end
ϵͳ.ת('жϵͼ')

ȥ꣺
--<Ѿ>С<1>ôñ<׼1>
.ܵ(326, 272)
.NPCԻ('ϱ')
.ѡ('˲ƶ','@talkwith')
.ѡ('̵','@move0')
.ѡ('','@move02')
ϵͳ.sleep(1000)
if ϵͳ.ǰͼ('0') then ϵͳ.ת('ȥ') end

̵꣺
if .ƷҪ('') then ϵͳ.ñ('') end
if .װҪ('') then ϵͳ.ñ('') end
if .Ʒ('') > 0 then ϵͳ.ñ('޺') end
_ʱ = os.clock()

꣺
.ܵ(14, 16)
.ܵ(15, 17)
.NPCԻ('ҵ')
.ѡ('','@goback')
if os.clock() - _ʱ > 60 then ϵͳ.ת('ûԶس') end
if ϵͳ.ǰͼ('0103') then ϵͳ.ת('') end
if .ְҵ() == 'ʿ' then ϵͳ.ñ('氲ȫ') end
if ϵͳ.ǰͼ('0') then ϵͳ.ת('س') end

ȥ·꣺
.ܵ(330, 275)
.NPCԻ('ϱ')
.ѡ('˲ƶ','@talkwith')
.ѡ('̵','@move0')
.ѡ('װ','@move01')
ϵͳ.sleep(1000)
if ϵͳ.ǰͼ('0') then ϵͳ.ת('ȥ·') end

װ꣺
if .ƷҪ('װ') then ϵͳ.ñ('·') end
if .ƷҪ('ͷ') then ϵͳ.ñ('·') end
if .װҪ('·') then ϵͳ.ñ('·') end
if .װҪ('ͷ') then ϵͳ.ñ('ͷ') end
if .װҪ('') then ϵͳ.ñ('') end
if .װҪ('ѥ') then ϵͳ.ñ('ѥ') end

װ꣺
.ܵ(20, 12)
.߽ŵ㵽ͼ(21,13,'0')
ϵͳ.sleep(1000)
if ϵͳ.ǰͼ('0106') then ϵͳ.ת('װ') end
if .ְҵ() == 'ʿ' then ϵͳ.ñ('氲ȫ') end
ϵͳ.ת('жϵͼ')

ȥε꣺
--<Ѿ>С<1>ôñ<׼1>
.ܵ(330, 275)
.NPCԻ('ϱ')
.ѡ('˲ƶ','@talkwith')
.ѡ('̵','@move0')
.ѡ('ε','@move03')
ϵͳ.sleep(1000)
if ϵͳ.ǰͼ('0') then ϵͳ.ת('ȥε') end

ε꣺
if .ƷҪ('') then ϵͳ.ñ('') end
if .ƷҪ('') then ϵͳ.ñ('') end
if .ƷҪ('ָ') then ϵͳ.ñ('ָ') end
if .װҪ('') then ϵͳ.ñ('') end
if .װҪ('') then ϵͳ.ñ('') end
if .װҪ('') then ϵͳ.ñ('') end
if .װҪ('ָ') then ϵͳ.ñ('ָ') end
if .װҪ('ҽָ') then ϵͳ.ñ('ҽָ') end
_ʱ = os.clock()

ε꣺
if .ָľ(12,12) < 6 then ϵͳ.ת('ϰ崫') end
if .ָľ(18,6) < 6 then ϵͳ.ת('ָϰ崫') end
if .ָľ(7,18) < 6 then ϵͳ.ת('ϰ崫') end
if .ָľ(19,15) >= 100000 then ϵͳ.ת('ͳε1') end
.ܵ(19, 15)
ϰ崫:
.NPCԻ('ϰ')
.ѡ('','@goback')
ϵͳ.sleep(1000)
ϵͳ.ת('жϵͼ')

ͳε1:
if .ָľ(12,22) >= 100000 then ϵͳ.ת('ͳε2') end
.ܵ(12, 22)
ϰ崫:
.NPCԻ('ϰ')
.ѡ('','@goback')
ϵͳ.sleep(1000)
ϵͳ.ת('жϵͼ')

ͳε2:
if .ָľ(19,9) >= 100000 then ϵͳ.ת('ͳε') end
.ܵ(19, 9)
ָϰ崫:
.NPCԻ('ָϰ')
.ѡ('','@goback')
ϵͳ.sleep(1000)
ϵͳ.ת('жϵͼ')
if os.clock() - _ʱ > 60 then ϵͳ.ת('ûԶس') end
if ϵͳ.ǰͼ('0105') then ϵͳ.ת('ε') end
if .ְҵ() == 'ʿ' then ϵͳ.ñ('氲ȫ') end
ϵͳ.ת('жϵͼ')

ָ
.ܵ(18, 10)
.NPCԻ('ָϰ')
ϵͳ.sleep(1000)
if ϵͳ.NPC˵():find('ȫ') then ϵͳ.ת('ȫ') end
.ѡ('','@s_repair')
.װ('ָ')


ҽָ
.ܵ(18, 10)
.NPCԻ('ָϰ')
ϵͳ.sleep(1000)
if ϵͳ.NPC˵():find('ȫ') then ϵͳ.ת('ȫ') end
.ѡ('','@s_repair')
.װ('ҽָ')



.ܵ(13, 17)
.NPCԻ('ϰ')
ϵͳ.sleep(1000)
if ϵͳ.NPC˵():find('ȫ') then ϵͳ.ת('ȫ') end
.ѡ('','@s_repair')
.װ('')



.ܵ(13, 17)
.NPCԻ('ϰ')
ϵͳ.sleep(1000)
if ϵͳ.NPC˵():find('ȫ') then ϵͳ.ת('ȫ') end
.ѡ('','@s_repair')
.װ('')



.ܵ(13, 17)
.NPCԻ('ϰ')
.ѡ('','@sell')
.('')


ָ
.ܵ(13, 17)
.NPCԻ('ָϰ')
.ѡ('','@sell')
.('ָ')



.ܵ(13, 17)
.NPCԻ('ϰ')
.ѡ('','@sell')
.('')



.ܵ(13, 17)
.NPCԻ('ϰ')
ϵͳ.sleep(1000)
if ϵͳ.NPC˵():find('ȫ') then ϵͳ.ת('ȫ') end
.ѡ('','@s_repair')
.װ('')


ͷ
.ܵ(18, 11)
.NPCԻ('Ҳ')
ϵͳ.sleep(1000)
if ϵͳ.NPC˵():find('ȫ') then ϵͳ.ת('ȫ') end
.ѡ('','@s_repair')
.װ('ͷ')


·
.ܵ(18, 11)
.NPCԻ('Ҳ')
ϵͳ.sleep(1000)
if ϵͳ.NPC˵():find('ȫ') then ϵͳ.ת('ȫ') end
.ѡ('','@s_repair')
.װ('·')



.ܵ(18, 11)
.NPCԻ('Ҳ')
ϵͳ.sleep(1000)
if ϵͳ.NPC˵():find('ȫ') then ϵͳ.ת('ȫ') end
.ѡ('','@s_repair')
.װ('')


ѥ
.ܵ(18, 11)
.NPCԻ('Ҳ')
ϵͳ.sleep(1000)
if ϵͳ.NPC˵():find('ȫ') then ϵͳ.ת('ȫ') end
.ѡ('','@s_repair')
.װ('ѥ')


·
.ܵ(18, 11)
.NPCԻ('Ҳ')
.ѡ('','@sell')
ϵͳ.sleep(1000)
.('װ')
.('ͷ')



.ܵ(14, 20)
.NPCԻ('ҵ')
.ѡ('','@sell')
.('')



.ܵ(14, 20)
.NPCԻ('ҵ')
ϵͳ.sleep(1000)
if ϵͳ.NPC˵():find('ȫ') then ϵͳ.ת('ȫ') end
.ѡ('','@s_repair')
.װ('')


޺:
.ܵ(14, 20)
ϵͳ.sleep(1000)
.Ʒָλ('','')
.NPCԻ('ҵ')
ϵͳ.sleep(1000)
if ϵͳ.NPC˵():find('ȫ') then ϵͳ.ת('ȫ') end
.ѡ('','@s_repair')
.װ('')


ҩ
.ܵ(323, 282)
.NPCԻ('ļҵϰ')
.ѡ('','@sell')
ϵͳ.sleep(1000)
.('ҩƷ')


ҩ
.ܵ(323, 282)
.Ʒ('ļҵϰ','ҩ') 


ӻ
.ܵ(374, 300)
.NPCԻ('ӻϰ')
.ѡ('','@sell')
ϵͳ.sleep(1000)
.('ӻ')


ӻ
.ܵ(374, 300)
.Ʒ('ӻϰ','ӻ') 


鼮
.ܵ(325, 263)
.ܵ(325, 261)
ϵͳ.sleep(1000)
.NPCԻ('ϰ')
.ѡ('','@sell')
ϵͳ.sleep(1000)
.('鼮')


ׯ԰
.ܵ(325, 271)
.NPCԻ('ϱ')
.ѡ('ׯ԰','@baodian')
.ѡ('ǰׯ԰','@zhuangyuan')
ϵͳ.sleep(1000)
if ϵͳ.ǰͼ('0') then ϵͳ.ת('ׯ԰') end

ׯ԰
if .Ʒ('') > 50000 then ϵͳ.ת('ׯ԰׽') end
if .ƷҪ('1') then ϵͳ.ת('ׯ԰1') end
if .Ʒ('') > 1300000 then ϵͳ.ñ('') end
if .Ʒ('') > 4 then ϵͳ.ñ('ש') end
if .ƷҪ('Ǯ') then ϵͳ.ñ('Ʒ') end
if .ƷҪ('Ʒ') then ϵͳ.ñ('Ʒ') end
if .ƷҪ('') then ϵͳ.ñ('Ʒ') end
if .ƷҪ('װ') then ϵͳ.ñ('Ʒ') end
if .ƷҪ('') then ϵͳ.ñ('Ʒ') end
if .ƷҪ('') then ϵͳ.ñ('Ʒ') end
if .ƷҪ('ָ') then ϵͳ.ñ('Ʒ') end
if .ƷҪ('鼮') then ϵͳ.ñ('Ʒ') end
if .ƷҪ('ҩƷ') then ϵͳ.ñ('Ʒ') end
if .ƷҪ('ӻ') then ϵͳ.ñ('Ʒ') end
if .ƷҪ('') then ϵͳ.ñ('Ʒ') end
if .ƷҪ('') then ϵͳ.ñ('Ʒ') end
if .ƷҪ('') then ϵͳ.ñ('ֿȡ') end

ر棺
.ܵ(71, 71)
.NPCԻ('ֿԱ')
.ѡ('','@goback')
ϵͳ.sleep(1000)
if ϵͳ.ǰͼ('GA0') then ϵͳ.ת('жϵͼ') end
.NPCԻ('Ա')
.ѡ('귨½','@gomafa')
ϵͳ.sleep(1000)
if ϵͳ.ǰͼ('GA0') then ϵͳ.ת('ر') end
if ϵͳ.ǰͼ('0') then ϵͳ.ת('س') end
ϵͳ.ת('жϵͼ')


.ܵ(71, 71)
.NPCԻ('ֿԱ')
.ѡ('','@mbind')
ϵͳ.sleep(1000)
.ѡ('һ.','@chgtobar')
.ѡ('һ.','@chgtobar')
.ѡ('һ.','@chgtobar')
.ѡ('һ.','@chgtobar')


ש
.ܵ(71, 71)
.NPCԻ('ֿԱ')
.ѡ('','@mbind')
ϵͳ.sleep(1000)
.ѡ('ש.','@chgtobrick')
.ѡ('ש.','@chgtobrick')
.ѡ('ש.','@chgtobrick')
.ѡ('ש.','@chgtobrick')


ֿȡ:
.ܵ(71, 71)
.NPCԻ('ֿԱ')
.ѡ('һ','@getback')
.һ('')


ׯ԰׽ң
.õн('ｻ׽')
ϵͳ.sleep(1000)
ϵͳ.ת('жϵͼ')

ׯ԰1:
.õн('ｻ1')
ϵͳ.sleep(1000)
ϵͳ.ת('жϵͼ')

Ʒ
.ܵ(71, 71)
.NPCԻ('ֿԱ')
.ѡ('','@storage')
ϵͳ.sleep(1000)
.('Ǯ')
.('Ʒ')
.('װ')
.('ͷ')
.('')
.('')
.('')
.('ָ')
.('鼮')
.('ҩƷ')
.('ӻ')
.('')
.('')


µ
.ܵ(139, 328)
.NPCԻ('ϱ')
.ѡ('ȥ','@move3')
ϵͳ.sleep(1000)
if ϵͳ.ǰͼ('5') then ϵͳ.ת('µ') end

ʡ
.ܵ(513, 776)
.߽ŵ㵽ͼ(512,777,'2')
ϵͳ.sleep(1000)
if ϵͳ.ǰͼ('3') then ϵͳ.ת('ʡ') end

ɽȣ
.ܵ(416, 566)
.߽ŵ㵽ͼ(415,567,'0')
ϵͳ.sleep(1000)
if ϵͳ.ǰͼ('2') then ϵͳ.ת('ɽ') end
.ܵ(326, 272)
ϵͳ.ת('жϵͼ')

ħǣ
.ܵ(139, 328)
.NPCԻ('ħϱ')
.ѡ('ȥ','@leave')
.ѡ('ƶ','@pay1')
ϵͳ.sleep(1000)
if ϵͳ.ǰͼ('4') then ϵͳ.ת('ħ') end
ϵͳ.ת('жϵͼ')

ţ
.ܵ(139, 328)
.NPCԻ('')
.ѡ('ȥ','@talkwith')
.ѡ('ص','@move1')
.ѡ('ƶ','@pay1')
ϵͳ.sleep(1000)
if ϵͳ.ǰͼ('11') then ϵͳ.ת('') end
ϵͳ.ת('жϵͼ')

سǾ:
.ʹƷ('سǾ')
ϵͳ.sleep(1000)


氲ȫ:
.ܵ(327, 276)
ϵͳ.sleep(200)


׼1Σ
.ܵ(374, 300)
.NPCԻ('ӻϰ')
.ѡ('','@buy')
ϵͳ.sleep(1000)
.('Ѿ', 1)
ϵͳ.sleep(1000)
if .Ʒ('Ѿ') < 1 then ϵͳ.ת('׼1') end


ȫ:
.ѡ('ȫ','@t_repair')
ϵͳ.sleep(1000)



if ϵͳ.ǰͼ('0') then ϵͳ.ת('س') ϵͳ.д־('ǰͼ0תûԶس') ϵͳ.ӡ('ǰͼ0תûԶس') return true end

