Yoko

All sides of Injection
It is currently 2025-11-23 14:38:37

All times are UTC+02:00




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
PostPosted: 2004-10-23 16:51:34 
Offline

Joined: 2004-08-30 02:29:19
Posts: 11
Code:
#============================================================== 
# Alchemy(reagent, min_reg, choice) - main alchemi script
#
# reagent - type of reagent
# min_reg - min count reagets to make potion
# choice - menu choice after using reagents
#
# Journal has been deleted!!!
#--------------------------------------------------------------
sub Alchemy(reagent, min_reg, choice)
while UO.Count('0x0F0E','0x0000')>0 AND UO.Count(reagent)>=min_reg
UO.DeleteJournal()
UO.Exec("waitmenu 'What sort of potion do you want to' "+choice)
UO.UseType(reagent)
while NOT UO.InJournal("You put") AND NOT UO.InJournal("You toss the failed")
wait(300)
wend
wend
end sub

#==============================================================
# makega() - toss greater agility potion
#--------------------------------------------------------------
sub makega()
alchemy('0x0F7B', 3, "'Greater Agility'")
end sub


#==============================================================
# makedp() - toss deadly poison potion
#--------------------------------------------------------------
sub makedp()
alchemy('0x0F88', 8, "'Deadly Poison'")
end sub


#==============================================================
# makegp() - toss greater poison potion
#--------------------------------------------------------------
sub makegp()
alchemy('0x0F88', 4, "'Greater Poison'")
end sub


#==============================================================
# makeinvis() - toss invisibility potion
#--------------------------------------------------------------
sub makeinvis()
alchemy('0x0F91', 4, "'Invisibility'")
end sub


#==============================================================
# maketm() - toss total mana potion
#--------------------------------------------------------------
sub maketm()
alchemy('0x0F87', 6, "'Total Mana'")
end sub


#==============================================================
# makegh() - toss total mana potion
#--------------------------------------------------------------
sub makegh()
alchemy('0x0F85', 7, "'Greater Heal'")
end sub


#==============================================================
# makegc() - toss Greater Cure potion
#--------------------------------------------------------------
sub makegc()
alchemy('0x0F84', 6, "'Greater Cure'")
end sub


#==============================================================
# makess() - toss stoneskin potion
#--------------------------------------------------------------
sub makess()
alchemy('0x0F85', 1, "'Stoneskin'")
end sub


#==============================================================
# makens() - toss Night Sight potion
#--------------------------------------------------------------
sub makens()
alchemy('0x0F8D', 2, "'Nightsight'")
end sub


#==============================================================
# makeh() - toss Heal potion
#--------------------------------------------------------------
sub makeh()
alchemy('0x0F85', 5, "'(2)'")
end sub


#==============================================================
# maketr() - toss total refresh potion
#--------------------------------------------------------------
sub maketr()
alchemy('0x0F7A', 6, "'Total Refresh'")
end sub


#==============================================================
# makegs() - toss total refresh potion
#--------------------------------------------------------------
sub makegs()
alchemy('0x0F86', 5, "'Greater Strength'")
end sub


#==============================================================
# makege() - toss total mana potion
#--------------------------------------------------------------
sub makege()
alchemy('0x0F8C', 10, "'Greater Explosion'")
end sub


Трабл такой, взял в пак реги, бутылки, пестик со ступкой, по отдельности каждая функция пашет, но когда запускаю главную функцию - Alchemy - пишет "Invalid number of arguments - alchemy"
Что это за еррор и как от него избавиться? ПОМОГИТЕ ПЛЗЗ!!
ЗЫ: Заранее спасибо :)


Top
   
 Post subject:
PostPosted: 2004-10-24 02:40:04 
Offline
User avatar

Joined: 2004-09-24 22:31:28
Posts: 24
Location: Riga
sub alchemy()
# BETEPa„? #
VAR Exit=0, LastTimer
uo.print('C‘C?C­C¤C?CR C± C°C?C?C C¬CO CO C?C?C?C»C«CRC C¬CO')
uo.exec('addobject Bag')
while uo.targeting()
wait(100)
wend
uo.print('C‘C?C­C¤C?CR CRC?C¤C C?C?C?C»C«CRCO C?C°C®C±C C?C?')
uo.exec('addobject Bag2')
while uo.targeting()
wait(100)
wend
while Exit<>1
UO.DeleteJournal()

UO.FindType('0x0F0E','0x09BB','backpack')
If UO.GetQuantity('finditem')>0 Then
UO.SetReceivingContainer('Bag2')
wait(100)
UO.Grab('all','finditem')
wait(100)
UO.UnSetReceivingContainer()
Endif


UO.FindType('0x0F85','0x0000','backpack') ; Gs
If UO.GetQuantity('finditem')<20 then
UO.FindType('0x0F85','0x0000','0x400515AA'); Gs, container
wait(100)
UO.Grab('700','finditem')
wait(500)
Endif
LastTimer=UO.Timer()
UO.WaitMenu('What','(last)') ; menu
UO.UseType(0x0F85) ; Ginseng

UO.FindType('0x0F0E',-1,'backpack')
If UO.GetQuantity('finditem')<10 then
UO.FindType('0x0F0E','0x0000','Bag')
wait(100)
UO.Grab('100','finditem')
wait(500)
Endif


while NOT UO.InJournal("You put") AND NOT UO.InJournal("You toss the failed")
wait(500)
wend

If UO.InJournal("You toss the failed") then
repeat
wait(100)
until UO.Timer()>=LastTimer+100
Else
EndIf
wend
end sub


ja igo peredelal na greater heal.


Top
   
PostPosted: 2004-10-24 08:52:16 
Offline
Expert!
User avatar

Joined: 2004-04-04 21:40:09
Posts: 1007
Manyak wrote:
Трабл такой, взял в пак реги, бутылки, пестик со ступкой, по отдельности каждая функция пашет, но когда запускаю главную функцию - Alchemy - пишет "Invalid number of arguments - alchemy"
Что это за еррор и как от него избавиться? ПОМОГИТЕ ПЛЗЗ!!
ЗЫ: Заранее спасибо :)


А зачем запускать Alchemy? Это вспомогательная процедура. База для всех остальных.


Top
   
 Post subject:
PostPosted: 2004-10-25 03:50:57 
Offline

Joined: 2004-08-30 02:29:19
Posts: 11
Чтобы на ночь ставить, чтоб он последовательно делал из всех регов которые есть в бекпаке. Если же в этом скрипте это не предусмотрено - тогда пофик :(


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 2 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