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