Author Topic: Tramstone's Leather Imbue Picker  (Read 5293 times)

0 Members and 1 Guest are viewing this topic.

Offline TramMoonstoneTopic starter

  • Newbie
  • *
  • Posts: 5
  • Activity:
    0%
  • Reputation Power: 0
  • TramMoonstone has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Tramstone's Leather Imbue Picker
« on: June 18, 2011, 01:14:18 AM »
0
This is my 1st real script!

Now i am not sure how it will handle different screen resolutions and if you have moved any of your crafting gumps but it should work just fine. Let me know if you find any bugs or if you would like to see some nicety's as this script is the basics only.

It is working flawlessly for me but it has only been tested on one other machine and I need feedback to find any "other machine" issues.
 
 
Code: [Select]
Tramstone's Leather Imbue Picker
; Author: Tramoonstone
; Version: 1,0
; This script will find NPC value resists on tailor made leather armor for imbueing
 ;What you need:
 ;1 secure to save possible imbueables
 ;1 secure with leather "Note the script will currently use ALL leather types"
 ;So be sure you dont have horned or barbed in the resource secure or main pack!
 ;1 salvage bag in your main pack
 ;Have sewing kits in your pack as the script does not make more!
 ;Make one of the items you want the script to make so it is the make last item
 ;BE SURE that there are NO armor pices in you pack when you start(including the one you used to set make last)
 
 ;What it does:
 ;makes one leather armor piece at a time and evaluates it for NPC values
 ;If it has an NPC value or one really high it will drop it to a keep secure if not to a salvage bag
 ;when out of leather will restock from the secure
 ;when getting overloaded will use salvage bag
 set %sewingkit HAG
 set %itemtomake KDZ_LDZ_YGY_AHY_JKH_KKH_HKH_QKH_NJL_VKH_ZIQ_LJQ_JJQ_GJQ_MJQ_LLH_ALH_XKH_MLH_YKH_XGY_NGY_UGY_TGY_ZGY_WGY
 set %material JJG

 gosub setup

 loop:
 gosub weightcheck
 gosub resourcechck
 gosub makeone
 wait 10
 gosub checkone
 goto loop
 sub setup
 event macro 31
 wait 20
 event macro 8 2
 contpos 700 400
 wait 20
 set #nextcposx 400
 set #nextcposy 0
 wait 20
 event macro 8 7
 wait 20
 set %backpackID #contid
 wait 20
 msg open keep secure ID now $
 set #nextcposx 625
 set #nextcposy 0
 wait 100
 set %keeppack #lObjectID
 wait 20
 msg open salvage bag ID now $
 set #nextcposx 850
 set #nextcposy 0
 wait 100
 set %cutpack #lObjectID
 wait 20
 msg open resource secure now $
 set #nextcposx 850
 set #nextcposy 200
 wait 100
 set %resourceid #lObjectID
 wait 20
 event macro 13 21
 wait 200
 return

 sub makeone
 finditem %sewingkit C_ , %backpackID
 event property #findid
 set #lobjectid #findid
 wait 20
 event macro 17
 wait 50
 click 335 505
 return
 sub checkone
finditem %itemtomake C_ , %backpackID
event property #findid
if exceptional notin #property
        {
          finditem %itemtomake C_ , %backpackID
          exevent drag #findid
          wait 6
          exevent dropc %cutpack
          wait 6
          return
          }
if 14% in #property || 2% in #property || 3% in #property || 4% in #property
 {
          finditem %itemtomake C_ , %backpackID
          exevent drag #findid
          wait 6
          exevent dropc %keeppack
          wait 6
          return
          }

else
          {
          finditem %itemtomake C_ , %backpackID
          exevent drag #findid
          wait 6
          exevent dropc %cutpack
          wait 6
          return
          }
 sub resourcechck
 finditem %material C_ , %backpackID
 if #findstack < 15 || #findkind = -1
 {
 wait 20
 set #nextcposx 400
 set #nextcposy 0
 event macro 8 7
 wait 30
 finditem %cutpack C_ , %backpackID
 set #lobjectid #findid
 set #nextcposx 850
 set #nextcposy 0
 event macro 17
 finditem %material C_ , %resourceid
 wait 10
 event drag #findid
 wait 20
 msg 100 $
 wait 20
 click 565 785
 wait 10
 return
 }
 else
 return
 sub weightcheck
 if #weight > 300
 {
 wait 20
 event macro 8 7
 wait 30
 click 470 75
 wait 30
 click 500 100
 wait 30
 finditem %cutpack C_ , %backpackID
 set #lobjectid #findid
 set #nextcposx 850
 set #nextcposy 0
 event macro 17
 return
 }
 else
 return
« Last Edit: June 18, 2011, 03:14:18 AM by TramMoonstone »

Offline 12TimesOver

  • Another Day, Another Vendetta
  • Global Moderator
  • *
  • *
  • Posts: 3694
  • Activity:
    0%
  • Reputation Power: 41
  • 12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.
  • Gender: Male
  • Respect: +321
  • Referrals: 2
    • View Profile
Re: Tramstone's Leather Imbue Picker
« Reply #1 on: June 18, 2011, 02:19:30 AM »
0
Trammoonstone -

Thanks for the submission. I have not had a chance to test it for you, I'm about to head out to play some basketball, but after a quick first glance and your comments I have some quick feedback.

First, you need to add a header to your submission, take a look at some of the other approved scripts to see what I mean. There is not yet a standard way that you MUST do it but you should at least start the script with the pertinent info. Here is an example from one of mine:

Code: [Select]
;=======================================
; Script Name: XIIxOveR's Cartography Trainer
; Author: XIIxOveR
; Version: 3.0
; Revision: 04/27/11
; Purpose: Train Cartography
;=======================================

Next, you should make your clickx and clicky locations relative to the x/y position of the open Gump (sewing menu), this will take way the need for anyone else running the script to have their menu in the exact same location on their screen as you do. For example:

Code: [Select]
set %clickx #contposx + 335
set %clicky #contposy + 505
click %clickx %clicky

You'll find that many of us have our own standard click and gump wait subs in our arsenals, you can take a look at my script library for some examples in my sub thread. A click sub will typically be as simple as taking your click values and doing the above but with a sub you don't need to rewrite the click routine over and over in scripts that may have more than one click. Alot of us do other things in our subs to make them more flexible and stable but even a basic one that simply handles the click lines above would be a great thing for you to get used to using ;)

The same goes for a Gump Wait sub, this way you don't need to manually wait 20 every time you open a menu or container. But at least start with setting up the #contposx and y based clicks, sub or no sub.

That will be a good start, if I have time a little later today I'll give 'er a whirl!

X
When they come for me I'll be sitting at my desk
     with a gun in my hand wearing a bulletproof vest
My, my, my how the time does fly
     when you know you're gonna die by the end of the night

Offline Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +393
  • Referrals: 1
    • View Profile
Re: Tramstone's Leather Imbue Picker
« Reply #2 on: November 03, 2011, 09:04:58 AM »
0
Script moved to inactive scripts. (If you disagree with the move please pm me.)
Thank you for the script submission and we look forward to your return and this scripts finalization.
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Tags: