precious stone quest in moving island

Moderator: Moderators

Message
Author
Cloudthers
Noob
Noob
Posts: 14
Joined: 20 Nov 2009, 06:47
Noob?: No

precious stone quest in moving island

#1 Post by Cloudthers »

Hi, here is another macro to get precious stone from a cat in moving island. all you have to do..first complete this quest to have access to moving island.
secondly, prepare some money to buy corn, you gonna need this item for the cat, and get precious stone in return.

I designed macro only for knight job with extra inventory, so it must be built up with huge STR.

this macro works with the latest openkore, enjoy it :)

Code: Select all


macro showall {

   [
   log === buyEXIT: $buyEXIT 
   log === hiddenISLAND: $hiddenISLAND 
   ]

}

macro addvar {

   [
   $relogON = 1
   ]

}

automacro starterON {

   hook in_game     

   set relogON 1   
   set beginON 1   
   
   exclusive 1
   run-once 1   

   call resetvar
   
}

automacro beginning {

   location mosk_fild01, mosk_fild02
   hook in_game
   
   var beginON == 1

   exclusive 1
   run-once 1
   
   call wait

}

macro wait {

   if ($.map == "moscovia") goto end0
      pause 3
      call resetvar
      goto end

   :end0
   call charMAXWEIGHTdec
   $itemACORN = @invamount(Acorn)
   if ($itemACORN < 20 && $charMAXWEIGHT >= 0.7) call reENTRY
      release backtoMOSKFILD01

   :end
   release beginning

}

macro resetvar {

   [
   $constMAXWEIGHT = 0.88
   $itemWEIGHT = 1
   $lowzeny = 2000
   $buyEXIT = 0
   $hiddenISLAND = 0
   ]
   
   log === everything is set ===

   :end
   release beginning

}

automacro itTALKS {

   console /seekor tupai/
   inventory "Acorn" >= 20   
   
   var beginON == 1

   set t 0.5
   set acorn 0

   exclusive 1
   run-once 1
   #delay 1 

   call talkITnow

}

macro talkITnow {

   do talk cont
   pause $t
   do talk cont
   pause $t

   do talk resp 0
   pause $t

   do talk cont
   pause $t
   do talk cont
   pause $t
   do talk cont
   pause $t

   release itTALKS

}

automacro setRELOG {

   location mosk_fild01 100 120 123 99
   inventory "Acorn" >= 20
   
   var relogON == 1
   var beginON == 1

   exclusive 1
   delay 1 

   call relogNOW
    
}

macro relogNOW {

   do relog    
   $relogON = 0

}

automacro acornFARMING {

   ### npc acorn (113, 108)
   location mosk_fild01 100 120 123 99
   inventory "Acorn" >= 20

   var relogON == 0   
   var beginON == 1

   set t 0.3
   set acorn 20
   set acornOLD 0
   set npc 1
   set tt 0

   exclusive 1
#   run-once 1
   delay 1 

   call talktoSQUIRREL 
    
}

macro talktoSQUIRREL {

   do conf autoTalkCont 1  
   
   do talk no
   
   while ($acorn >= 20) as acornLOOP
     
      do talk $npc
      pause 2.5
      do talk resp 0
      pause 1
     
      $acorn = @invamount(Acorn)

      if ($acornOLD == $acorn) goto varNPC
         $tt = 0
         goto contnpc

      :varNPC
      $tt++
      if ($tt != 3) goto contnpc         
         do relog
         log === relog now ===
         stop
          
      :contnpc
      $acornOLD = $acorn 

   end acornLOOP

}
   
automacro acornFARMINGcorrection {

   ### npc acorn (113, 108)
   location mosk_fild01 85 120 98 99
   inventory "Acorn" >= 20
   
   var beginON == 1

   delay 1 

   call setMOVE
    
}

macro setMOVE {

   do move 112 108 

}

automacro backtoMOSCOVIA {

   location mosk_fild01, mosk_fild02
   inventory "Acorn" < 20
   
   var beginON == 1

   set t 0.5

   exclusive 1
   run-once 1
   delay 4

   call talktoSTRANGE

}

macro talktoSTRANGE {

   if (@invamount(Acorn) < 20) goto contauto000
      [
      do move 110 110
      ]
      goto end   

   :contauto000
   if ($.map == "mosk_fild02") goto contauto  

   :start
   [
   do move @rand(83, 89) @rand(101, 107)
   ]

#   if (@npc(86 104) > 0) goto contTALK
#      goto start
      

   :contTALK
   do conf autoTalkCont 0
   pause 1 

   do talknpc 86 104 w$t c w$t c w$t r2 w$t c w$t c w$t c w$t r1 w$t c 

   pause 3
   if ($.map == "mosk_fild02") goto contauto
      goto end

   :contauto
   do ss 29
   [
   do autosell
   ]
   
   :end   
   release backtoMOSCOVIA
   release buyACORN

}

automacro buyACORN {

   location moscovia
   weight <= 88%
   #inventory "Acorn" < 20

   var beginON == 1 

   set t 0.5
   set acorn 0
   set buySTOP 0

   exclusive 1
   run-once 1

   call buyacornNOW
}

macro buyacornNOW {

   pause 3

   if (@invamount(Acorn) < 20) goto start
      goto end

   :start
   if ($buyEXIT == 0) goto nextMOVE
      do relog 1000000
      log === no more money ===
      stop

   :nextMOVE
   [
   do move @rand(205, 211) @rand(179, 185)
   ]

   if (@npc(208 182) >= 0) goto contTALK
      goto nextMOVE
     
   :contTALK
   pause 1
   call charMAXWEIGHTdec 

   while ($charMAXWEIGHT <= $constMAXWEIGHT) as acornLOOP
      call addITEMSUMint

      if ($addITEMSUM <= 500) goto contLOOP0
         $addITEMSUM = 500   
         goto contLOOP1
   
      :contLOOP0
      $buySTOP = 1
      goto contLOOP1 
      
      :contLOOP1
      [
      $moneyspend = @eval($addITEMSUM*100) 
      do eval $::Macro::Data::varStack{zeny} = $::char->{'zeny'}
      $zenyX = @eval($zeny-$lowzeny)
      ]

      if ($moneyspend < $zenyX) goto contLOOP2   
         [       
         $addITEMSUM = @eval($zenyX/100)
         $intVAR = $addITEMSUM
         call intVAR
         $addITEMSUM = $intVAR
  
         $buyEXIT = 1 
         ]
      :contLOOP2
      do talknpc 208 182 w$t c w$t r0 w$t c w$t d$addITEMSUM

      if ($buyEXIT == 1 || $buySTOP == 1) goto end

   end acornLOOP

   :end
   $hiddenISLAND = 1 
   do ss 29
   [
   do move 135 50
   ]

#   release buyACORN
    call gobackNOW

}

automacro backtoMOSKFILD01 {

   console /pulau ikan paus/
   location moscovia
   inventory "Acorn" >= 20
   
   var beginON == 1

   set t 0.5
   set acorn 0

   exclusive 1
   run-once 1

   call gobackNOW

}

macro gobackNOW {

   pause $t
   pause $t
   do talk cont
   pause $t
   do talk cont

   pause $t
   pause $t
   do talk resp 0

   pause $t
   do talk cont
   pause $t
   do talk cont
   pause $t
   do talk cont
   pause $t
   do talk cont

   pause 3

   if ($.map == "mosk_fild01") goto contGO
      goto end

   :contGO
   $hiddenISLAND = 0
   $relogON = 1

   [
   do move @rand(112, 116) @rand(104, 112)
   ]
   
   call posSPLIT 
   if ($posX < 112 && $posX > 116) goto contGO
   if ($posY < 104 && $posY > 112) goto contGO
      
   :end
   release backtoMOSKFILD01
   release reENTRYmoskfild01

}

automacro reENTRYmoskfild01 {

   #location moscovia 130 55 140 45

   var beginON == 1
   var hiddenISLAND == 1

   #exclusive 1
   run-once 1

   call reENTRY

}

macro reENTRY {

   [
   do move 140 70
   ]
   pause 3
   [
   do move 135 50
   ]

   call gobackNOW

   release reENTRYmoskfild01
   release backtoMOSKFILD01

}

###### ==============================================

# no variable
# $charMAXWEIGHT
macro charMAXWEIGHTdec {

   $charMAXWEIGHT = @eval(1-@eval(@eval($.maxweight-$.weight)/$.maxweight))
#   log this char max weight is $charMAXWEIGHT

}

# $itemWEIGHT, $constMAXWEIGHT 
# $addITEMSUM

macro addITEMSUMint {

   call charMAXWEIGHTdec
   #if ($charMAXWEIGHT > $itemWEIGHT) goto errorITEMSUM
   $addITEMSUM = @eval(@eval(@eval($.maxweight*$constMAXWEIGHT)-$.weight)/$itemWEIGHT)

   # int count
   $intVAR = $addITEMSUM
   call intVAR
   $addITEMSUM = $intVAR 

#   log sum of item can be added is $addITEMSUM
   stop
   
   :errorITEMSUM
   log ITEMSUMint cannot be calculated
   stop

} 


# $intVAR
# $intVAR
macro intVAR {

   do eval $::Macro::Data::varStack{intVAR} = int($intVAR)
#   log intVAR value is $intVAR

}

## no variable 
## $posX = "pos", $posY = "pos"
## position split
macro posSPLIT {

#  log char position now is $.pos

   $posX = @arg("$.pos", 1)
   $posY = @arg("$.pos", 2)

}

Last edited by Cloudthers on 28 Mar 2014, 03:57, edited 1 time in total.

Cloudthers
Noob
Noob
Posts: 14
Joined: 20 Nov 2009, 06:47
Noob?: No

Re: precious stone quest in moving island

#2 Post by Cloudthers »

sorry, I forgot to mention there are some "console" trigger in bahasa Indonesia. I guess you need to translate it into your own langguage.

Post Reply