Author Topic: Need help with two examples please. Craft item and...  (Read 1589 times)

0 Members and 1 Guest are viewing this topic.

Offline CoraginTopic starter

  • Wacko in Pajama's
  • Elite
  • *
  • *
  • Posts: 1641
  • Activity:
    0%
  • Reputation Power: 23
  • Coragin might someday be someone...Coragin might someday be someone...Coragin might someday be someone...Coragin might someday be someone...
  • Gender: Male
  • It Is What It Is.
  • Respect: +57
  • Referrals: 1
    • View Profile
Need help with two examples please. Craft item and...
« on: October 11, 2009, 03:28:23 AM »
0
I have been reading other scripts, too many have "set clickx" and "Clicky" in the main setup. 

I could really use an example (with an explaination)  of how to make a create item sub such as a tinker tool set, bow, anything. 

I would like to 'not' have set clickx and y in a setup, but rather it set in the sub itself.


Code: [Select]
  set %ttools JTL
Sub maketinker

finditem %ttools C_ , #BackpackID
  set #lObjectID %ttools
event macro 17 0

(okay now gump should be open, this is where I am lost, please help)

Now, if I can just get this example with how to navigate menus to make a set of tinker tools or any other tool, click make now ect, I can get the subs for all the tools.

Second example would be how to take resources out of a secure container and place in backpack.  Ingots, wood ect.

And how do I pick up different types of ingots and wood?  They all have the same name type.
Coragin

My Facebook
And now I'm better at doing what ever it is Wolverine does!

Offline rana70

  • Elite
  • *
  • *
  • Posts: 294
  • Activity:
    0%
  • Reputation Power: 5
  • rana70 has no influence.
  • Gender: Male
  • Respect: +37
  • Referrals: 2
    • View Profile
    • MyScripts
Re: Need help with two examples please. Craft item and...
« Reply #1 on: October 11, 2009, 04:22:07 AM »
0

Hi,

here is a nice Crafting SUB you can look into and I guess it does what you ask for

http://winuo.org/script-subs/1003-winuo-craft-library.html

About the move problem of same type Items like Ingots, Ore , Hides and Lumber
you need to check the color code to make sure you move the one you like.
here is an example how to figure out the color

Code: [Select]
; Check my Backpack for leather color

  Finditem JJG C_ , #BACKPACKID
  if #FindCnt > 0
    {
     Set #FindIndex 0
     Repeat
      Set #FindIndex #FindIndex + 1
     if #FindCol = 0 ; Regular Leather
      Set %Regular_Leather #FindStack
     if #FindCol = 2220 ; Spined Leather
      Set %Spind_Leather #FindStack
     if #FindCol = 2129 ; Barbed Leather
      Set %Barbed_Leather #FindStack
     if #FindCol = 2117 ; Horned Leather
      Set %Horned_Leather #FindStack
     Until #FindIndex = #FindCnt
    }
   
    Display You have $ %Regular_Leather Regular $ %Spind_Leather Spinded $ %Barbed_Leather Barbed $ %Horned_Leather Horned
    halt

This is my SUB to move stuff around,
I usually set the %Delay Vars in the script header to make
tweaking more easy.

Code: [Select]
; Drag Ore and Drop Ore to Backpack
;------------------------ Routine -----------------------------
SUB DragNDrop %1 %2 %3
 ; %1 %DragNDropID
 ; %2 %DragNDropAmount
 ; %3 %DropContainerID
 Set %DragNDropID %1
 Set %DragNDropAmount %2
 Set %DragNDropContainerID %3
 ; Move it
 ExEvent drag %DragNDropID %DragNDropAmount
  Wait %DelayDrag
 ExEvent dropc %DragNDropContainerID
  Wait %DelayDrop
RETURN
 

If you like to check my OSA smelter script you can see how I did
the move item stuff for all the differend colored Ore.
Actually it is just about looking for the correct color code ...
and just pass on the found stack data to the dragNdrop SUB

cu

Tags: