Openkore.com

OpenKore Forums
It is currently 31 Mar 2015, 18:00

All times are UTC - 5 hours [ DST ]





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

Joined: 17 Mar 2010, 11:52
Posts: 4
First you need to set your "items_control.txt" and "pickupitems.txt"
if you not set it bot will sell or drop your item :D

Ex: items_control.txt
Code:
+4 Maya Hat [Orc Hero] 1 0 0
+7 Orlean's Server [Maya] [1] 1 0 0
+8 Meteor Plate [Tao Gunka] [1] 1 0 0
+7 Ice Pick [Phreeoni] [1] 1 0 0

BROKEN +4 Maya Hat [Orc Hero] 1 0 0
BROKEN +7 Orlean's Server [Maya] [1] 1 0 0
BROKEN +8 Meteor Plate [Tao Gunka] [1] 1 0 0
BROKEN +7 Ice Pick [Phreeoni] [1] 1 0 0


Ex: pickupitems.txt
Code:
+4 Maya Hat [Orc Hero] 0
+7 Orlean's Server [Maya] [1] 0
+8 Meteor Plate [Tao Gunka] [1] 0
+7 Ice Pick [Phreeoni] [1] 0

BROKEN +4 Maya Hat [Orc Hero] 0
BROKEN +7 Orlean's Server [Maya] [1] 0
BROKEN +8 Meteor Plate [Tao Gunka] [1] 0
BROKEN +7 Ice Pick [Phreeoni] [1] 0


now you can use this macros for check your item when Striped
just fix location to your save map and $sItemName to your item ;)
Code:
automacro CheckHelm {
   location not <SaveMap>
   equipped topHead none
   status not Strip Helm
   exclusive 1
   run-once 1
   call {
      $sItemName = +4 Maya Hat [Orc Hero]

      $iGetNormal = @invamount ($sItemName)
      $iGetBroken = @invamount (BROKEN $sItemName)
      if ($iGetNormal > 0) goto wareeq
      if ($iGetBroken > 0) goto b2spawn
      release CheckHelm
      stop
      :wareeq
      $iItemNumber = @inventory ($sItemName)
      do eq $iItemNumber
      release CheckHelm
      stop
      :b2spawn
      do respawn
      release CheckHelm
   }
}
automacro CheckArmor {
   location not <SaveMap>
   equipped armor none
   status not Strip Armor
   exclusive 1
   run-once 1
   call {
      $sItemName = +8 Meteor Plate [Tao Gunka]

      $iGetNormal = @invamount ($sItemName)
      $iGetBroken = @invamount (BROKEN $sItemName)
      if ($iGetNormal > 0) goto wareeq
      if ($iGetBroken > 0) goto b2spawn
      release CheckArmor
      stop
      :wareeq
      $iItemNumber = @inventory ($sItemName)
      do eq $iItemNumber
      release CheckArmor
      stop
      :b2spawn
      do respawn
      release CheckArmor
   }
}
automacro CheckRightHand {
   location not <SaveMap>
   equipped rightHand none
   status not Strip Weapon
   exclusive 1
   run-once 1
   call {
      $sItemName = +7 Ice Pick [Phreeoni] [1]

      $iGetNormal = @invamount ($sItemName)
      $iGetBroken = @invamount (BROKEN $sItemName)
      if ($iGetNormal > 0) goto wareeq
      if ($iGetBroken > 0) goto b2spawn
      release CheckRightHand
      stop
      :wareeq
      $iItemNumber = @inventory ($sItemName)
      do eq $iItemNumber
      release CheckRightHand
      stop
      :b2spawn
      do respawn
      release CheckRightHand
   }
}
automacro CheckLeftHand {
   location not <SaveMap>
   equipped leftHand none
   status not Strip Shield
   exclusive 1
   call {
      $sItemName = +7 Orlean's Server [Maya] [1]

      $iGetNormal = @invamount ($sItemName)
      $iGetBroken = @invamount (BROKEN $sItemName)
      if ($iGetNormal > 0) goto wareeq
      if ($iGetBroken > 0) goto b2spawn
      release CheckLeftHand
      stop
      :wareeq
      $iItemNumber = @inventory ($sItemName)
      do eq $iItemNumber
      release CheckLeftHand
      stop
      :b2spawn
      do respawn
      release CheckLeftHand
   }
}


now your repair macros
Code:
automacro RepairHelm {
   location <SaveMap>
   equipped topHead none
   status not Strip Helm
   exclusive 1
   run-once 1
   call {
      $sItemName = +4 Maya Hat [Orc Hero]
      $sNpcTalk = 183 104 c r13 c r1 c r0 c c r0 n #Npc location and talk step
      $sUseMove = 0 #If you want to move set to 1
      $sMove = <SaveMap> x y

      $iGetNormal = @invamount ($sItemName)
      $iGetBroken = @invamount (BROKEN $sItemName)
      if ($iGetNormal > 0) goto wareeq
      if ($iGetBroken > 0) goto repair
      release RepairHelm
      stop
      :repair
      if ($sMove > 0) {do move $sMove}
      do talknpc $sNpcTalk
      $iGetNormal = @invamount ($sItemName)
      if ($iGetNormal > 0) goto wareeq
      release RepairHelm
      stop
      :wareeq
      $iItemNumber = @inventory ($sItemName)
      do eq $iItemNumber
      release RepairHelm
   }
}
automacro RepairArmor {
   location <SaveMap>
   equipped armor none
   status not Strip Armor
   exclusive 1
   run-once 1
   call {
      $sItemName = +8 Meteor Plate [Tao Gunka]
      $sNpcTalk = 183 104 c r13 c r1 c r0 c c r0 n #Npc location and talk step
      $sUseMove = 0 #If you want to move set to 1
      $sMove = <SaveMap> x y

      $iGetNormal = @invamount ($sItemName)
      $iGetBroken = @invamount (BROKEN $sItemName)
      if ($iGetNormal > 0) goto wareeq
      if ($iGetBroken > 0) goto repair
      release RepairArmor
      stop
      :repair
      if ($sMove > 0) {do move $sMove}
      do talknpc $sNpcTalk
      $iGetNormal = @invamount ($sItemName)
      if ($iGetNormal > 0) goto wareeq
      release RepairArmor
      stop
      :wareeq
      $iItemNumber = @inventory ($sItemName)
      do eq $iItemNumber
      release RepairArmor
   }
}
automacro RepairRightHand {
   location <SaveMap>
   equipped rightHand none
   status not Strip Weapon
   exclusive 1
   run-once 1
   call {
      $sItemName = +7 Ice Pick [Phreeoni] [1]
      $sNpcTalk = 183 104 c r13 c r1 c r0 c c r0 n #Npc location and talk step
      $sUseMove = 0 #If you want to move set to 1
      $sMove = <SaveMap> x y

      $iGetNormal = @invamount ($sItemName)
      $iGetBroken = @invamount (BROKEN $sItemName)
      if ($iGetNormal > 0) goto wareeq
      if ($iGetBroken > 0) goto repair
      release RepairRightHand
      stop
      :repair
      if ($sMove > 0) {do move $sMove}
      do talknpc $sNpcTalk
      $iGetNormal = @invamount ($sItemName)
      if ($iGetNormal > 0) goto wareeq
      release RepairRightHand
      stop
      :wareeq
      $iItemNumber = @inventory ($sItemName)
      do eq $iItemNumber
      release RepairRightHand
   }
}
automacro RepairLeftHand {
   location <SaveMap>
   equipped leftHand none
   status not Strip Shield
   exclusive 1
   run-once 1
   call {
      $sItemName = +7 Orlean's Server [Maya] [1]
      $sNpcTalk = 183 104 c r13 c r1 c r0 c c r0 n #Npc location and talk step
      $sUseMove = 0 #If you want to move set to 1
      $sMove = <SaveMap> x y

      $iGetNormal = @invamount ($sItemName)
      $iGetBroken = @invamount (BROKEN $sItemName)
      if ($iGetNormal > 0) goto wareeq
      if ($iGetBroken > 0) goto repair
      release RepairLeftHand
      stop
      :repair
      if ($sMove > 0) {do move $sMove}
      do talknpc $sNpcTalk
      $iGetNormal = @invamount ($sItemName)
      if ($iGetNormal > 0) goto wareeq
      release RepairLeftHand
      stop
      :wareeq
      $iItemNumber = @inventory ($sItemName)
      do eq $iItemNumber
      release RepairLeftHand
   }
}


and relog when Striped
Code:
automacro CheckStripHelm {
   status Strip Helm
   exclusive 1
   run-once 1
   call {
      do relog 5
      release CheckStripHelm
   }
}
automacro CheckStripArmor {
   status Strip Armor
   exclusive 1
   run-once 1
   call {
      do relog 5
      release CheckStripArmor
   }
}
automacro CheckStripWeapon {
   status Strip Weapon
   exclusive 1
   run-once 1
   call {
      do relog 5
      release CheckStripWeapon
   }
}
automacro CheckStripShield {
   status Strip Shield
   exclusive 1
   run-once 1
   call {
      do relog 5
      release CheckStripShield
   }
}


Last edited by fukki on 27 Feb 2015, 21:30, edited 4 times in total.

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: Google [Bot] 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 : 2.334s | 15 Queries | GZIP : On ]