Yoko

All sides of Injection
It is currently 2024-04-18 03:58:41

All times are UTC+02:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
 Post subject: script help
PostPosted: 2007-12-29 12:57:21 
Offline
User avatar

Joined: 2007-12-25 10:28:11
Posts: 10
Помогоите, как добавить в скрипт проверку на не нужную руду , чтобы копал один раз а которая нужа до конца!:?

sub Mining()
var xc,yc,zc
var s
xc=UO.GetX("self")
yc=UO.GetY("self")
zc=UO.GetZ("self")
var i,j,k
For i=-2 to 2
For j=-2 to 2
Repeat
while not UO.Hidden()
UO.Warmode("0")
uo.print("hiding...")
UO.UseSkill("Hiding")
wait(4000)
wend
UO.DeleteJournal()
s="0 "+STR(xc+i)+" "+STR(yc+j)+" 0" #+STR(zc)
UO.Exec("waittargettile "+s+") #; usetype 0x0e85")
wait(2000)
k=0
Repeat
wait(500)
k=k+1
Until UO.InJournal("You put") or UO.InJournal("There is no ore here to mine.") or UO.InJournal("Vous etes trop loin") or UO.InJournal("You loosen some rocks") or UO.InJournal("That is too far") or UO.InJournal("thoughts of battle") or k>14
if UO.InJournal("destroy") and UO.Count("0x0e85") then
UO.Usetype("0x0e85")
endif
wait(500)
Until UO.InJournal("You have no line of sight") or UO.InJournal("There is no ore here to mine.") or UO.InJournal("That is too far") or UO.InJournal("thoughts of battle") or UO.InJournal("You put the Copper") or UO.InJournal("You put the Bronze") or UO.InJournal("You put the Gold") or UO.InJournal("You put the Rose") or UO.InJournal("There is nothing here") or UO.InJournal("That is too far") or UO.InJournal("elsewhere") or UO.InJournal("of sight to that location")
Next
Next
UO.print("Ana!!!")
end sub


Top
   
 Post subject:
PostPosted: 2007-12-30 09:51:31 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
Забиваешь массив цветов той руды которая не нужна, и в случае сообщения "Вы положили к себе в бекпек руду", ищешь руду с цветом из массива-если она была найдена то ты выкопал не нужную, и выкидываешь её,- если нет то продолжаешь копать эту же точку.

2Забиваешь массив сообщений с именами руд которые тебе не нужны, и в каждом 'You put' делает вырез имени руды которая была выкопана в последний момент, а затем в цикле сравнение с каждым элементов массива сообщений.

'Iron'
'Copper'
'Rusty'

'You put 4 Iron ore in your backpack.'

Вырезаешь из сообщения всё до и после слова Iron и сравниваешь,-а дальше я написал что делать.


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 24 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