Smelting Script

Ask for help

Moderators: Murderator+, Murderator

Post Reply
ozcaN
Posts: 34
Joined: 2004-06-18 17:21:40

Smelting Script

Post by ozcaN »

The smelting script in the scripts section is giving me some problems.
http://yoko.calpha.com/en_index.html
When i run it, I get the message:
Items Fond 0:
Items Fond 0:
Items Fond 0:
Items Fond 0:
No more ores for semlt.....
Can anyone tell me why? Do i need to configure it first?
Yoko
Site Admin
Posts: 1964
Joined: 2004-04-03 16:49:38
Contact:

Post by Yoko »

at truth i thought calpha.com is dead :)
write script here
ozcaN
Posts: 34
Joined: 2004-06-18 17:21:40

Post by ozcaN »

O sorry it was this :

Code: Select all

#####################################################################
; Training of Mining, ver 1.03, (c) Edred
sub Smelt()
VAR Ruda1 = '0x19B9'            ; Тип руды
VAR Ruda2 = '0x19B8'            ; Тип руды - 3 шт.
VAR Ruda3 = '0x19BA'            ; Тип руды - 2 шт.
VAR Ruda4 = '0x19B7'            ; Тип руды - 1 шт.
VAR Ing1 = '0x1BEF'               ; Тип ингов металлов
VAR Ing2 = '0x1BF2'               ; Тип ингов строймата
VAR MaxVes = 500               ; Максимальный вес пака
repeat   
   UO.Findtype( Ruda1, -1, 1 )      ; Ищем руду на земле
   If UO.Findcount() == 0 Then
      UO.Findtype( Ruda2, -1, 1 )
      If UO.Findcount() == 0 Then
         UO.Findtype( Ruda3, -1, 1 )
         If UO.Findcount() == 0 Then
            UO.Findtype( Ruda4, -1, 1 )
            If UO.Findcount() == 0 Then
               UO.Print( "No more ore for smelt..." )
               Return
            Endif
         Endif
      Endif
   Endif
   UO.Exec( "moveitem finditem 1" )   ; Тащим 1 в пак
   Wait( 1000 )
   UO.Useobject( 'finditem' )      ; переплавляем
   Wait( 1000 )
   If UO.Weight > MaxVes Then
      ; Максимальный вес пака превышен - разгружаемся
      UO.Findtype( Ing1, -1, -1 )
      If UO.Findcount() > 0 Then
         UO.Drophere( 'finditem' )
         Wait( 1000 )
      Endif
      UO.Findtype( Ing2, -1, -1 )
      If UO.Findcount() > 0 Then
         UO.Drophere( 'finditem' )
         Wait( 1000 )
      Endif
   Endif
until NOT Uo.CountGround( Ruda1 ) AND NOT UO.CountGround( Ruda2 ) AND NOT UO.CountGround( Ruda3 ) AND NOT UO.CountGround( Ruda4 )
UO.Print( "No more ore for smelt..." )
endsub
Edred
Expert!
Posts: 2544
Joined: 2004-04-03 17:36:29
Location: Saint-Petersburg

Post by Edred »

check types of ore:
Ruda1 is type of many ore
Ruda2 is type of 3 ore
Ruda3 is type of 2 ore
Ruda4 is type of one ore
Also check types of:
Ing1 is type of iron (any metal) ingots
Ing2 is type of plaster ingots

MaxVes is maximum weight of your char

You need in stand about forge and place any ore to GROUND (no backpack!). Script will get one ore and smelt it to ingot. If weight of char greater MaxVes - all ingots will drop to ground.

Sorry for my bad english
ozcaN
Posts: 34
Joined: 2004-06-18 17:21:40

Post by ozcaN »

Ok works thankyou didnt know they must be on floor
Post Reply