Yoko

All sides of Injection
It is currently 2024-03-28 15:19:26

All times are UTC+02:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 2004-06-24 00:00:19 
Offline
Site Admin
User avatar

Joined: 2004-04-03 16:49:38
Posts: 1964
Discussion:______________
http://yoko.netroof.net/forum/viewtopic.php?p=2574#2574
Author or poster:_________
Edred, tercia@spb.lanck.net
Tested on:_______________
Цитадель http://ultima.e-burg.ru
Must work:_______________
Sphere emu
Customization required:____
unknown
Description:______________
Скрипт для прокачки мининга путем переплавки руды по одной штуке. Встать около форжи и сложить различные руды в любых количествах рядом с собой на земле. Если на вашем шарде необходимо - возьмите в руки кирку. Если максимальный вес, который может поднять ваш чар меньше 500 стоунов - исправьте значение переменной MaxVes в начале скрипта.

Чар будет брать с земли из кучек руду по 1 штуке и переплавлять ее в инготы. При превышении максимального веса инготы сбрасываются чару под ноги. После переплавки всех кучек руды скрипт остановится.
Yoko comment:___________
none
________________________
Code:
#####################################################################
; 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


Top
   
PostPosted: 2004-09-02 17:05:41 
Offline
Site Admin
User avatar

Joined: 2004-04-03 16:49:38
Posts: 1964
Discussion:______________
http://yoko.netroof.net/forum/viewtopic.php?p=5516
Author or poster:_________
evil_Gremlin, icq# 70997486
Tested on:_______________
UnderWorld shard http://ultima.sun-tel.net
Must work:_______________
Sphere emu
Customization required:____
Customization not required. But if your shere shard uses unusual weight calculation formula, change it or simply change it to your character's max weight. It is stored in variable "max"
Настройка не обязательна, но можно поменять формулу максвеса, либо просто вписать максимальный вес вручную, меняя переменную "max".
Description:______________
Script is searching for ore on the ground, takes 1, and smelts it :).
Скрипт берет с земли по 1 руде и плавит ее.
Works a lot faster than previous script posted here.
Работает гораздо быстрее предыдущего, выложенного сдесь.
Yoko comment:___________
none
________________________
Code:
####################################
#############Smelting by evil_Gremlin, v 1.1
sub smelt_ground()
var r
var i,k=0
var max =((UO.Str*4)+30) #Calculating of max weight based on character strenght
DIM ore[4]
ore[1]=0x19B8
ore[2]=0x19B9
ore[3]=0x19BA
ore[4]=0x19B7
while k==0
r=0
If UO.Weight>=max-30 then
clean()
endif

for i=1 to 4
UO.FindType(ore[i],-1,'ground')
   If UO.FindCount()>0 then
      r=0
      UO.Exec('moveitem finditem 1')
            repeat
               wait(50)
          until Uo.ContainerOf('finditem')==UO.Getserial('backpack')
          UO.Useobject('finditem')
   else
   #UO.Print('Not Found')
   r=r+1
   endif
next
if r==4 then
k=1
Uo.Print('No ore to smelt')
endif
wend
endsub
#############Ingots dropping sub
sub Clean()
var i,t,l,col
DIM type[5]
type[1]=0x1BEF
type[2]=0x1BF5
type[3]=0x1BE3
type[4]=0x1BE9
UO.Print('Overload. Cleaning')
col=0
repeat
col=0
for t=1 to 4
Uo.FindType(type[t],'-1','backpack')
   If UO.FindCount()>0 then
   UO.Print('Found')
   l=0
      Uo.Exec('drophere finditem')
         repeat
         wait(100)
         until Uo.ContainerOf('finditem')<>Uo.GetSerial('backpack')
   else
   col=col+1
   endif
next
until col>=4
UO.Print('Cleaned....')
end sub


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited