//-----------------------Omega Zu Macro v4.0b7------------------------- // // This macro not only plants seeds, loads seeds into bags and removes seeds // from bags, but you never have to manually equip a bag again. // When you run out of seeds in a bag, it automagically changes // to the next bag number in your inventory. // When it reaches your last bag and you run out of seeds, it switches to the // first bag, all without using an error prone scanner. There is no planting // delay either. This is the end of all kudzu macros. (Until I make it // load one if the current bag is full without using a scanner.) // // Here's a quick start for you: // by default: // f6: plants a seed from your bag // shift-f6: loads a seed into your bag // option-f6: removes a seed from your bag // type: "/setzu ?" for the following instructions: // type: "/setzu bag {number}" to set which bag you want to start pulling seeds from // type: "/setzu bag ?" to see which bag is to be selected // type: "/setzu maxbag {number}" to change the nmuber of kudzu bags you're carrying // type: "/setzu maxbag ?" to see what your maximum number of kudzu bags is set to. // "/get" is purely for diagnostic purposes should DT change the location // of the seed count. set bag_number 1 set max_bag 4 set zuInProgress 0 set zlBusy 0 set seedC 0 set seedCOld 1 set max_pass max_bag // max_pass and pass control how many times set pass 1 //Kudzu Macros. see "/set" command for more info F6 call zp zp { //Checks to make sure you have your bag equipped. if zuInProgress == 1 goto end end if setglobal zuInProgress 1 set myBag "bag of kudzu seedlings " set myBag + bag_number setglobal seedCOld @my.left_item.word[5].letter[0] if @my.left_item != myBag "/equip bag of kudzu seedlings " bag_number "\r" pause 1 "/useitem left\r" setglobal seedC @my.left_item.word[5].letter[0] else "/useitem left\r" setglobal seedC @my.left_item.word[5].letter[0] end if if seedCOld == 0 if bag_number == max_bag setglobal bag_number 1 else setglobal bag_number + 1 end if "/equip bag of kudzu seedlings " bag_number "\r" pause 1 "/useitem left\r" else if seedC == seedCOld //checks if a seed was planted "/equip kudzu seedling\r" pause 1 "/useitem left\r" else if seedC == 0 if bag_number == max_bag setglobal bag_number 1 else setglobal bag_number + 1 end if "/equip bag of kudzu seedlings " bag_number "\r" end if setglobal zuInProgress 0 label end } shift-f6 call zl zl { if zlBusy == 1 goto TerminateSilent // ensures only one Zu Loader works at a time. end if setglobal max_pass max_bag // max_pass and pass control how many times setglobal pass 1 // the bags will swap looking for empty bags. setglobal zlBusy 1 set thisBag "bag of kudzu seedlings " set thisBag + bag_number set ll 0 message "*zu loader started" label loadloop call bag_check //Check if the bag is full, if seedC == 10 // call bag_shuffle // if it is swap bags. end if if @my.left_item != thisBag "/equip " thisBag "\r" pause 1 end if "/usei left /add\r" set feedback @env.textLog if feedback < " * You don't have any kudzu seedlings." goto end else if feedback < "you bag is full" call bag_shuffle end if pause 80 set ll + 1 if ll < 61 goto loadloop else message "*zu loader stopped" end if label end message "*zu loader stopped" setglobal zlBusy 0 label TerminateSilent } bag_check //checks to see if your bag is full { setglobal seedC @my.left_item.word[5].letter[0] if @my.left_item.word[5].letter[1] != ">" //tests for a full bag setglobal seedC 10 end if } bag_shuffle { if pass >= max_pass //if we've been through all bags goto end // don't execute. else if bag_number != max_bag setglobal bag_number + 1 else setglobal bag_number 1 end if set pass + 1 label end set thisBag "bag of kudzu seedlings " set thisBag + bag_number } "/zutest" { set loop 0 label start if loop != 8 "/move east walk\r" pause 3 call zp set loop + 1 goto start end if } command-f6 call zuinit zuinit { set myBag "bag of kudzu seedlings " set myBag + bag_number if @my.left_item != myBag set myLeftItem @my.left_item "/equip bag of kudzu seedlings " bag_number "\r" pause 1 end if setglobal seedC @my.left_item.word[5].letter[0] if seedC == 0 if bag_number == max_bag setglobal bag_number 1 else setglobal bag_number + 1 end if end if "/equip " myLeftItem "\r" } option-f6 { set myBag "bag of kudzu seedlings " set myBag + bag_number if @my.left_item != myBag "/equip bag of kudzu seedlings " bag_number "\r" else message "ĽKudzu Ready" end if "/useitem left /remove \r" } //'/setzu' is used to set the bag and maximum number of bags you have on the fly. "/setzu" //non-optimized to add: messageVariable and call InstructionMessages { if @text.word[0] == "?" message "*The following variables are available to set using this command:" pause 4 message "bag [?|(number)], maxbag ?|(number)" else if @text.word[0] == "bag" if @text.word[1] == "?" message "*This variable is used to select a bag number to use for kudzu planting." message "the current bag is " bag_number "." end if if @text.word[1] > 0 setglobal bag_number @text.word[1] "/selectitem \"bag of kudzu seedlings <#" bag_number "\"\r" message "the current bag is " bag_number "." end if else if @text.word[0] == "maxbag" if @text.word[1] == "?" message "*This variable is used to set how many kudzu bags you have on you." message "the number of kudzu bags is " max_bag "." end if if @text.word[1] > 0 setglobal max_bag @text.word[1] message "you number of kudzu bags is set at " max_bag "." end if end if label end } "/zuwall" { set thisBag "bag of kudzu seedlings " set thisBag + bag_number if @text > 0 set zu_number @text else set zu_number 10 end if label ZuPlantStart if @my.left_item != thisBag "/equip " thisBag "\r" end if }