Openkore.com

OpenKore Forums
It is currently 23 Oct 2014, 17:27

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Macros: Repair item and relog on strip
PostPosted: 13 Dec 2010, 07:57 
Offline
Noob
Noob

Joined: 17 Mar 2010, 11:52
Posts: 1
How to use?
Fix "location not <SaveMap>" and "location <SaveMap>" in macros.
Fix and set config.

in.../items_control.txt
Set your item normal name and item BROKEN name.
EX.
+7 Book of Dead [Necromancer*4] 1 1 0
BROKEN +7 Book of Dead [Necromancer*4] 1 1 0

in.../pickupitems.txt
Set your item normal name and item BROKEN name.
EX.
+7 Book of Dead [Necromancer*4] 1
BROKEN +7 Book of Dead [Necromancer*4] 1

How to set config and Ex.
Quote:
#0 = off / 1 = use warp to back
Repair_UseSpawn 1

#Npc map
Repair_NpcMap = alberta

#Move near npc. 0 = off / 1 = on
Repair_UseMove 0

#If "UseMove = 1" move to near npc X.
Repair_MoveTo_X 0

#If "UseMove = 1" move to near npc Y.
Repair_MoveTo_Y 0

#Npc point X.
Repair_NpcPoint_X 117

#Npc point Y.
Repair_NpcPoint_Y 60

#Talk to npc step.
Repair_TalkNpcStep c n

#WeaponType 0 = One-hand weapon / 1 = Two-hand weapon
Repair_WeaponType 0

#Helm name
Repair_Equipped-Helm Fairyhat [Kiel-D-01]

#Armor name
Repair_Equipped-Armor +7 Greenarmor [Tao Gunka]

#RightHand name
Repair_Equipped-RightHand +7 Book of Dead [Necromancer*4]

#LeftHand name
Repair_Equipped-LeftHand +10 Valkyrja's Shield [Alice] [1]


in ...\control\config.txt
Code:
#Repiar Config
Repair_UseSpawn 1
Repair_NpcMap
Repair_UseMove 0
Repair_MoveTo_X
Repair_MoveTo_Y
Repair_NpcPoint_X
Repair_NpcPoint_Y
Repair_TalkNpcStep
Repair_WeaponType 0
Repair_Equipped-Helm
Repair_Equipped-Armor
Repair_Equipped-RightHand
Repair_Equipped-LeftHand


in ...\control\macos.txt
Code:
automacro CheckHelm {
    location not <SaveMap>
    equipped topHead none
    status not Strip Helm
    exclusive 1
    run-once 1
    call {
    pause 0.1
    $reh = @eval($::config{Repair_Equipped_Helm})
    $rus = @eval($::config{Repair_UseSpawn})
    $rehab = @invamount (BROKEN $reh)
    if ($rehab = 1) goto check
    stop
    :check
    if ($rus = 0) goto lockspawn
    if ($rus = 1) goto spawn
    stop
    :lockspawn
    lock CheckHelm
    stop
    :spawn
    do respawn
    release all
    stop
    }
}
automacro CheckArmor {
    location not <SaveMap>
    equipped armor none
    status not Strip Armor
    exclusive 1
    run-once 1
    call {
    pause 0.1
    $rea = @eval($::config{Repair_Equipped_Armor})
    $rus = @eval($::config{Repair_UseSpawn})
    $reaab = @invamount (BROKEN $rea)
    if ($reaab = 1) goto check
    stop
    :check
    if ($rus = 0) goto lockspawn
    if ($rus = 1) goto spawn
    stop
    :lockspawn
    lock CheckArmor
    stop
    :spawn
    do respawn
    release all
    stop
    }
}
automacro CheckRightHand {
    location not <SaveMap>
    equipped rightHand none
    status not Strip Weapon
    exclusive 1
    run-once 1
    call {
    pause 0.1
    $rerh = @eval($::config{Repair_Equipped_RightHand})
    $rus = @eval($::config{Repair_UseSpawn})
    $rerhab = @invamount (BROKEN $rerh)
    if ($rerhab = 1) goto check
    stop
    :check
    if ($rus = 0) goto lockspawn
    if ($rus = 1) goto spawn
    stop
    :lockspawn
    lock CheckRightHand
    stop
    :spawn
    do respawn
    release all
    stop
    }
}
automacro CheckLeftHand {
    location not <SaveMap>
    equipped leftHand none
    status not Strip Shield
    exclusive 1
    run-once 1
    call {
    pause 0.1
    $rwt = @eval($::config{Repair_WeaponType})
    $relh = @eval($::config{Repair_Equipped_Helm})
    $rus = @eval($::config{Repair_UseSpawn})
    $relhab = @invamount (BROKEN $relh)
    if ($rwt = 1) goto lockspawn
    if ($relhab = 1) goto check
    stop
    :check
    if ($rus = 0) goto lockspawn
    if ($rus = 1) goto spawn
    stop
    :lockspawn
    lock CheckLeftHand
    stop
    :spawn
    do respawn
    release all
    stop
    }
}


automacro RepairHelm {
    location <SaveMap>
    equipped topHead none
    status not Strip Helm
    exclusive 1
    run-once 1
    call {
    pause 0.1
    $rnpc = @eval($::config{Repair_NpcMap})
    $rum = @eval($::config{Repair_UseMove})
    $rnpcx = @eval($::config{Repair_MoveTo_X})
    $rnpcy = @eval($::config{Repair_MoveTo_Y})
    $rnpcpx = @eval($::config{Repair_NpcPoint_X})
    $rnpcpy = @eval($::config{Repair_NpcPoint_Y})
    $rtns = @eval($::config{Repair_TalkNpcStep})
    $reh = @eval($::config{Repair_Equipped_Helm})
    $rehn = @inventory ($reh)
    $rehan = @invamount ($reh)
    $rehab = @invamount (BROKEN $reh)
    if ($rehan = 1) goto wareeq
    if ($rehab = 1) goto Repair
    stop
    :Repair
    if ($rum = 0) goto Repair1
    if ($rum = 1) goto Repair2
    stop
    :Repair1
    do talknpc $rnpcpx $rnpcpy $rtns
    if ($rehan = 1) goto wareeq
    stop
    :Repair2
    do move $rnpcx $rnpcy $rnpc
    do talknpc $rnpcpx $rnpcpy $rtns
    if ($rehan = 1) goto wareeq
    stop
    :wareeq
    do eq $rehn
    release all
    stop
    }
}

automacro RepairArmor {
    location <SaveMap>
    equipped armor none
    status not Strip Armor
    exclusive 1
    run-once 1
    call {
    pause 0.1
    $rnpc = @eval($::config{Repair_NpcMap})
    $rum = @eval($::config{Repair_UseMove})
    $rnpcx = @eval($::config{Repair_MoveTo_X})
    $rnpcy = @eval($::config{Repair_MoveTo_Y})
    $rnpcpx = @eval($::config{Repair_NpcPoint_X})
    $rnpcpy = @eval($::config{Repair_NpcPoint_Y})
    $rtns = @eval($::config{Repair_TalkNpcStep})
    $rea = @eval($::config{Repair_Equipped_Armor})
    $rean = @inventory ($rea)
    $reaan = @invamount ($rea)
    $reaab = @invamount (BROKEN $rea)
    if ($reaan = 1) goto wareeq
    if ($reaab = 1) goto Repair
    stop
    :Repair
    if ($rum = 0) goto Repair1
    if ($rum = 1) goto Repair2
    stop
    :Repair1
    do talknpc $rnpcpx $rnpcpy $rtns
    if ($reaan = 1) goto wareeq
    stop
    :Repair2
    do move $rnpcx $rnpcy $rnpc
    do talknpc $rnpcpx $rnpcpy $rtns
    if ($reaan = 1) goto wareeq
    stop
    :wareeq
    do eq $rean
    release all
    stop
    }
}

automacro RepairRightHand {
    location <SaveMap>
    equipped rightHand none
    status not Strip Weapon
    exclusive 1
    run-once 1
    call {
    pause 0.1
    $rnpc = @eval($::config{Repair_NpcMap})
    $rum = @eval($::config{Repair_UseMove})
    $rnpcx = @eval($::config{Repair_MoveTo_X})
    $rnpcy = @eval($::config{Repair_MoveTo_Y})
    $rnpcpx = @eval($::config{Repair_NpcPoint_X})
    $rnpcpy = @eval($::config{Repair_NpcPoint_Y})
    $rtns = @eval($::config{Repair_TalkNpcStep})
    $rerh = @eval($::config{Repair_Equipped_RightHand})
    $rerhn = @inventory ($rerh)
    $rerhan = @invamount ($rerh)
    $rerhab = @invamount (BROKEN $rerh)
    if ($rerhan = 1) goto wareeq
    if ($rerhab = 1) goto Repair
    stop
    :Repair
    if ($rum = 0) goto Repair1
    if ($rum = 1) goto Repair2
    stop
    :Repair1
    do talknpc $rnpcpx $rnpcpy $rtns
    if ($rerhan = 1) goto wareeq
    stop
    :Repair2
    do move $rnpcx $rnpcy $rnpc
    do talknpc $rnpcpx $rnpcpy $rtns
    if ($rerhan = 1) goto wareeq
    stop
    :wareeq
    do eq $rerhn
    release all
    stop
    }
}

automacro RepairLeftHand {
    location <SaveMap>
    equipped leftHand none
    status not Strip Shield
    exclusive 1
    run-once 1
    call {
    pause 0.1
    $rwt = @eval($::config{Repair_WeaponType})
    $rnpc = @eval($::config{Repair_NpcMap})
    $rum = @eval($::config{Repair_UseMove})
    $rnpcx = @eval($::config{Repair_MoveTo_X})
    $rnpcy = @eval($::config{Repair_MoveTo_Y})
    $rnpcpx = @eval($::config{Repair_NpcPoint_X})
    $rnpcpy = @eval($::config{Repair_NpcPoint_Y})
    $rtns = @eval($::config{Repair_TalkNpcStep})
    $relh = @eval($::config{Repair_Equipped_LeftHand})
    $rerhn = @inventory ($relh)
    $relhan = @invamount ($relh)
    $relhab = @invamount (BROKEN $relh)
    if ($rwt = 1) goto lockrepair
    if ($relhan = 1) goto wareeq
    if ($relhab = 1) goto Repair
    stop
    :Repair
    if ($rum = 0) goto Repair1
    if ($rum = 1) goto Repair2
    stop
    :Repair1
    do talknpc $rnpcpx $rnpcpy $rtns
    if ($relhan = 1) goto wareeq
    stop
    :Repair2
    do move $rnpcx $rnpcy $rnpc
    do talknpc $rnpcpx $rnpcpy $rtns
    if ($relhan = 1) goto wareeq
    stop
    :wareeq
    do eq $relhn
    release all
    stop
    :lockrepair
    lock Repair_LeftHand
    stop
    }
}
automacro CheckStripHelm {
    status Strip Helm
    exclusive 1
    run-once 1
    call {
    pause 0.1
    do relog
    release all
}
}
automacro CheckStripArmor {
    status Strip Armor
    exclusive 1
    run-once 1
    call {
    pause 0.1
    do relog
    release all
}
}
automacro CheckStripWeapon {
    status Strip Weapon
    exclusive 1
    run-once 1
    call {
    pause 0.1
    do relog
    release all
}
}
automacro CheckStripShield {
    status Strip Shield
    exclusive 1
    run-once 1
    call {
    pause 0.1
    do relog
    release all
}
}


You can download this macos in link:
http://www.mediafire.com/

I am sorry but my English bad.
It's first macros write to use config.
I will attempt to resolve wrong in "macros repair item".
If you have a problem or error. Please tell me.
I hope that it would be helpful for everyone.


Top
 Profile  
 
 Post subject: Re: Macros: Repair item and relog on strip
PostPosted: 30 Mar 2012, 20:11 
Offline
Noob
Noob

Joined: 30 Mar 2012, 19:57
Posts: 2
Hi, I have a problem with this macro setup
# Config Repiar
Repair_UseSpawn 1
Repair_NpcMap prt_in 63 54 Restaurador
Repair_UseMove 1
Repair_MoveTo_X 1
Repair_MoveTo_Y 1
Repair_NpcPoint_X 63
Repair_NpcPoint_Y 54
Repair_TalkNpcStep c n
Repair_WeaponType 0
Repair_Equipped-Helm
Repair_Equipped-Armor +4 Armadura Metálica [1]
Repair_Equipped-right hand +4 Lança de Caça [1]
Repair_Equipped-LeftHand +4 Escudo Redondo [Carta Guerreiro Orc] [1]
And it is not working to help me thank


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
[ Time : 0.042s | 14 Queries | GZIP : On ]