Author Topic: New Smith Script  (Read 3878 times)

0 Members and 1 Guest are viewing this topic.

Offline thekidnickTopic starter

  • Jr. Member
  • **
  • Posts: 24
  • Activity:
    0%
  • Reputation Power: 0
  • thekidnick has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
New Smith Script
« on: November 18, 2008, 09:34:23 AM »
0
I have been trying to find a script with no luck so I will be creating one soon unless someone can point me in the right directions.

Basically I am going to Create Royal Circlets over and over.

1.  Select a secure box (will have 100k iron ingots)
2.  Select Salvage bag.


What I want is to drag ingots into the salvage bag, then create about 75 circlets, salvage, drag the ingots from my bag back into my salvage bag, and loop.



I am new to UO scripting but I do not think it will be that hard.

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: New Smith Script
« Reply #1 on: November 18, 2008, 10:37:05 AM »
0
That's a great first script!  Best thing to do is to break down your idea into blocks.  Selecting your secure and the salvage bag is simple: (do for each container)

Code: [Select]
  display ok Please select your container
  set #TARGCURS 1
  repeat
  until #TARGCURS = 0
  set %container #LTARGETID

You'll want to open both of these containers, so you should do (2x)

Code: [Select]
  set #LOBJECTID %container
  event macro 17 ; use last object
  wait 20

After that, you need to find the #FINDTYPE for the tool, and the #FINDTYPE for the circlets. You "use" the tool like you did in the above snippet to open the crafting gump.  After that, you need to click some places.  I think for now I'll let you play a bit, but that'll get you started.

Things you'll need to read up on are:
finditem
exevent DRAG/DROP
click
#CONTNAME/#CONTSIZE for waiting for gumps you want.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline thekidnickTopic starter

  • Jr. Member
  • **
  • Posts: 24
  • Activity:
    0%
  • Reputation Power: 0
  • thekidnick has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: New Smith Script
« Reply #2 on: November 18, 2008, 10:43:33 AM »
0
another quick question.

Can I try scripts without being in UO.  I wanted to try this at work where I have no internet.

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: New Smith Script
« Reply #3 on: November 18, 2008, 11:33:42 AM »
0
Not really.  I do script testing all the time by setting up my own RunUO server on the computer I'm running the client on, so I just connect to my own server located at 127.0.0.1.  That's been my easiest way to test things, but sometimes setting up a RunUO server is a pain if you've never done it before.  They say it's easy, and they are correct but sometimes there are issues.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline OMGBurgers

  • Hero Member
  • *
  • Posts: 800
  • Activity:
    0%
  • Reputation Power: 7
  • OMGBurgers has no influence.
  • Respect: +44
  • Referrals: 0
    • View Profile
Re: New Smith Script
« Reply #4 on: November 18, 2008, 04:46:02 PM »
0
I always wondered when a new tailoring/blacksmith script that would use salvage bags would come out :P

If you're just making one simple like that it shouldn't be too tough at all.  Mostly just using finditem and the basic event drag/drop and a little math.  The only obstacle may be the usage of the context menu.

Offline thekidnickTopic starter

  • Jr. Member
  • **
  • Posts: 24
  • Activity:
    0%
  • Reputation Power: 0
  • thekidnick has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: New Smith Script
« Reply #5 on: November 18, 2008, 08:54:35 PM »
0
So since I dont know anything about scripting more coding this is the layout i came up with tell me what ya think.

SETUP:
1.  Target Secure with Ingots
2.  Target Salvage Bag

Script:
1.  Pull 2500 Ingots from Secure
2.  Place 2500 Ingots in Salvage Bag
3.  Check for Tinker Tool If <2 make 1
4.  Check for Smith Tool If <1 make 1
5.  Use Smith Tool
6.  Create Royal Circlet
7.  Check Salvage Bag item/weight  IF > 100/400 SALVAGE ALL
8.  Move Ingots from backpack to Salvage Bag
9.  If Ingots <1000 Pull 1500 from Secure place in SALVAGE
10. Check SKill if 1200 GO TO 12
11. GO TO 3
12. END

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: New Smith Script
« Reply #6 on: November 18, 2008, 09:19:58 PM »
0
I like how you think about your structure.  Great way to psudocode your script flow; I wish more people were this thoughtful. 

One thing you might want to do is to do a little math when you are looking at dragging ingots from your secure:

1. Note how many ingots you have in your salvage bag ->  %salvage_count
2. Drag 1500 - %salvage_count ingots ; to always give you a total of 1500 ingots.

If you don't do this, then the supply of ingots will explode in your salvage bag.

But if you can get this script working, you'll have a very popular script and can be incorporated into an overall skillgainer.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline thekidnickTopic starter

  • Jr. Member
  • **
  • Posts: 24
  • Activity:
    0%
  • Reputation Power: 0
  • thekidnick has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: New Smith Script
« Reply #7 on: November 18, 2008, 10:04:06 PM »
0
Thanks man.

I was going for 2500 ingots in salvage bag hence <1000 add 1500.

Offline thekidnickTopic starter

  • Jr. Member
  • **
  • Posts: 24
  • Activity:
    0%
  • Reputation Power: 0
  • thekidnick has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: New Smith Script
« Reply #8 on: November 19, 2008, 05:22:10 PM »
0
After reading for a few hours I jumped in head first.  This is what I have so far tell me what you think.

Also if you could point me in the right directions I have a couple of questions:

1.  How do I use tools?  Tinker and Smith
2.  How do I use my Salvage bag?

There are 1 attachment(s) in this post. You must register and post an acceptable introduction to download
smith.txt

Tags: