Simple smithing script

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
Thdin
Posts: 51
Joined: 2004-07-22 07:37:37

Simple smithing script

Post by Thdin »

Here's something to help you GM smithing. This will only work on Sphere servers, since it simply makes daggers to GM smithing, and on RunUO you cannot do this as 100% success rate means you won't gain skill....

Code: Select all


sub Smithing()
####
#This script will take 3 ingots from the floor at a time and smith a dagger
#Scripted by Nidht
####

#This next line defines the ingots type. Change it if your server uses a different type.
VAR Ingotz = '0x1bef'

Repeat

   ###Check for ingots###
   UO.Findtype( Ingotz, -1, 1 )
   If UO.Findcount() == 0 Then
      UO.Print( "No more ingots for smithing..." )
      Return
   Endif
   
   ###Move ingots to pack###
   UO.Exec( "moveitem finditem 3" )
   Wait( 1000 )
   
   ###Smith dagger###
   #As long as you don't mess around with the ingot pickup count, the waitmenu will work fine
   #Only allow 3 ingots to enter your pack at any time
   UO.Waitmenu('blacksmithing','weapons','swords','dagger')
   UO.Useobject( 'finditem' )
   Wait ( 7500 )
   
   #####Dropbag Section#####
   UO.Findtype( 0x0f51, -1, -1 )
   UO.Moveitem( 'finditem','0','dropbag' )
   Wait ( 1000 )
   UO.UseObject ("dropbag")
   
Until UO.InJournal("Warning") OR NOT UO.CountGround ( Ingotz )
UO.Print("Done smithing...")

endsub



The "dropbag" section can be taken out completely if you don't mind having the daggers clutter your pack or fall to the ground. The server I play on does not allow for items to fall from the pack to the ground while macroing, so my "dropbag" is a trashbin next to my forge and then I "use" it to clear it.

The script will stop when no ingots (3 is needed to smith a dagger) are left on the ground or you pick up less than 3.
BETEPAH
Expert!
Posts: 838
Joined: 2004-05-31 09:31:51
Contact:

Post by BETEPAH »

Has not understood, that you prevents to change trachcan for a chest ?? in which both to throw hand-made articles. And to take ingots from him if they will be ended.
Все просто.
BETEPAH ™
Drakull
Posts: 36
Joined: 2004-07-01 06:02:22

Post by Drakull »

BETEPAH wrote:Has not understood, that you prevents to change trachcan for a chest ?? in which both to throw hand-made articles. And to take ingots from him if they will be ended.


Because on sphere you're having a limit of 255 items per container (on runuo is about 100/120 per main container). I was having a script that had several containers where to put the crafted items and then was filling them with the production. On RunUo instead of trashing them you would smell the items.
Thdin
Posts: 51
Joined: 2004-07-22 07:37:37

Post by Thdin »

In Sphere you cannot always smelt the item you create. This one takes 3 ingots from "Container" and then after smithing it throws it out into "dropbag" so that you don't get filled up and start dropping items onto the ground.
Post Reply