Scripteri help PLEASE

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
SomeOne
Posts: 26
Joined: 2005-03-03 13:03:44

Scripteri help PLEASE

Post by SomeOne »

sub main()
DIM rune[6]
DIM ven[6]
var i, n
rune[1]='0x401FD465' ;
rune[2]='0x40075D27' ; 6
rune[3]='0x401FD45B' ;
rune[4]='0x401FD45C' ;
rune[5]='0x401FD458' ;
rune[6]='0x40080128' ;

ven[1]='0x001D11A7' ;
ven[2]='0x0019628F' ;
ven[3]='0x00304D77' ;
ven[4]='0x003802B3'
ven[5]='0x001C324C'
ven[6]='0x001A411E'

repeat
for i=1 to 6
recall(i,rune)
WalkN(0,0,ven[i])
UO.buy('sp','vendor')
wait(500)
UO.Say("bye")
UO.DeleteJournal()
UO.Click(rune[i])
repeat
wait(500)
until UO.InJournal('jumps left')
takenum()
if res < 10 then ; ??????? ??????? ?? ????
Mark(i,rune)
endif
med()
next
until UO.Dead()
end sub
#####################################
sub takenum()
var ns, j, i, n
var str, num
num=''
ns=0
n=uo.InJournal('jumps left')-1
str=uo.Journal(n)
UO.Print(str)
j = len( str ) - 1
for i = 0 to j

if ns==1 and str[i]<>' ' then
num=num+str[i]
else
ns=0
endif
if str[i] =='(' then
ns=1
endif
next
res = val(num)
UO.Print(str(res))
end sub
#####################################
sub Recall(i,rune)
var b
uo.print('Recoll Rune '+str(i))
for b=1 to 10
uo.deletejournal()
uo.waittargetobject(rune[i])
uo.cast('Recall',rune[i])
if WaitForRecall()==1 then
return 1
end if
next
return 0
end sub
#####################################
sub Mark(i,rune)
uo.waittargetobject(rune[i])
uo.cast('Mark',rune[i])
end sub
#####################################
sub WaitForRecall()
var Text1=uo.getname()+": The spell fizzles."
var mess='',lastX=uo.getX(),lastY=uo.getY()
for var v=0 to 200
mess=uo.journal(0)
if uo.Journal(0)==Text1 then
return 0
end if
if uo.getX()<>lastX OR uo.getY()<>LastY then
return 1
end if
wait(50)
next
return 0
end sub
######################################
sub med()
VAR LastTimer
while UO.Mana<UO.Int
LastTimer=UO.Timer()
UO.UseSkill('Meditation')
repeat
wait(100)
until UO.InJournal("You are") OR UO.InJournal("You lose") OR UO.Timer()>LastTimer+200
UO.DeleteJournal()
wait(200)
wend
end sub
##############################
# WalkN(X,Y,Serial) - char is walking by dX and dY step
# sub using Home, End, PgUp, PgDown keys
# d'not rebind this key from default action!
# serial - Serial of target or "" - string
# walkwait - delay after keypress
# Example:
# WalkN(2080,2113,'') - go to coordinates
# WalkN(0,0,'0x12345678') - go to target position
#--------------------------------------------------------------
sub WalkN(x,y,Target)
VAR i,StepSucess
VAR dx,dy,Exit=0
While Exit<>1
If Target<>"" Then
dx=UO.GetX(Target)-UO.GetX()
dy=UO.GetY(Target)-UO.GetY()
If UO.GetDistance(Target)<2 Then
Exit=1
Endif
Else
dx=x-UO.GetX()
dy=y-UO.GetY()
If dx==0 AND dy==0 Then
Exit=1
Endif
Endif
If dx<>0 AND dy<>0 Then
If dx>0 AND dy>0 Then
StepSucess=Go(3,40,300) ;SE - DownArrow
If StepSucess==-1 Then
StepSucess=Go(7,38,300) ;WN - UpArrow
StepSucess=Go(1,39,300) ;NE - RightArrow
If StepSucess==-1 Then
StepSucess=Go(5,37,300) ;SW - LeftArrow
Endif
Endif
Endif
If dx>0 AND dy<0 Then
StepSucess=Go(1,39,300) ;NE - RightArrow
If StepSucess==-1 Then
StepSucess=Go(5,37,300) ;SW - LeftArrow
StepSucess=Go(3,40,300) ;SE - DownArrow
If StepSucess==-1 Then
StepSucess=Go(7,38,300) ;WN - UpArrow
Endif
Endif
Endif
If dx<0 AND dy>0 Then
StepSucess=Go(5,37,300) ;SW - LeftArrow
If StepSucess==-1 Then
StepSucess=Go(1,39,300) ;NE - RightArrow
StepSucess=Go(7,38,300) ;WN - UpArrow
If StepSucess==-1 Then
StepSucess=Go(3,40,300) ;SE - DownArrow
Endif
Endif
Endif
If dx<0 AND dy<0 Then
StepSucess=Go(7,38,300) ;WN - UpArrow
If StepSucess==-1 Then
StepSucess=Go(3,40,300) ;SE - DownArrow
StepSucess=Go(5,37,300) ;SW - LeftArrow
If StepSucess==-1 Then
StepSucess=Go(1,39,300) ;NE - RightArrow
Endif
Endif
Endif
Endif
If dx<>0 AND dy==0 Then
If dx>0 Then
StepSucess=Go(2,34,300) ;E - PgDown
If StepSucess==-1 Then
StepSucess=Go(3,40,300) ;SE - DownArrow
If StepSucess==-1 Then
StepSucess=Go(1,39,300) ;NE - RightArrow
Endif
StepSucess=Go(2,34,300) ;E - PgDown
Endif
Endif
If dx<0 Then
StepSucess=Go(6,36,300) ;W - Home
If StepSucess==-1 Then
StepSucess=Go(7,38,300) ;WN - UpArrow
If StepSucess==-1 Then
StepSucess=Go(5,37,300) ;SW - LeftArrow
Endif
StepSucess=Go(6,36,300) ;W - Home
Endif
Endif
Endif
If dx==0 AND dy<>0 Then
If dy>0 Then
StepSucess=Go(4,35,300) ;S - End
If StepSucess==-1 Then
StepSucess=Go(3,40,300) ;SE - DownArrow
If StepSucess==-1 Then
StepSucess=Go(5,37,300) ;SW - LeftArrow
Endif
StepSucess=Go(4,35,300) ;S - End
Endif
Endif
If dy<0 Then
StepSucess=Go(0,33,300) ;N - PgUp
If StepSucess==-1 Then
StepSucess=Go(1,39,300) ;NE - RightArrow
If StepSucess==-1 Then
StepSucess=Go(7,38,300) ;WN - UpArrow
Endif
StepSucess=Go(0,33,300) ;N - PgUp
Endif
Endif
Endif
Wend
end sub
sub Go(dir,key,walkwait)
VAR x,y, OldDir
x=UO.GetX()
y=UO.GetY()
OldDir=UO.GetDir()
If UO.GetDir()<>dir Then
UO.Press(key)
wait(walkwait)
If UO.GetDir()<>dir Then
CheckLag()
Endif
Endif
UO.Press(key)
wait(walkwait)
If x==UO.GetX() AND y==UO.GetY() Then
CheckLag()
Endif
If x==UO.GetX() AND y==UO.GetY() AND OldDir<>UO.GetDir() Then
UO.Press(key)
wait(walkwait)
Endif
If x==UO.GetX() AND y==UO.GetY() Then
CheckLag()
Endif
If x==UO.GetX() AND y==UO.GetY() Then
UO.Print("Zasada!")
return -1
Else
return 1
Endif
end sub
#########################################
sub CheckLag()
UO.DeleteJournal()
UO.Click('backpack')
repeat
wait(500)
until UO.InJournal('Backpack')
end sub

Vzjal ja etot scriptik u vas tut na forume no ja vot nepoimu
repeat
for i=1 to 6
recall(i,rune)
WalkN(0,0,ven[i])
UO.buy('sp','vendor')
wait(500)
UO.Say("bye")
UO.DeleteJournal()
UO.Click(rune[i])
repeat
wait(500)
until UO.InJournal('jumps left')
takenum()
if res < 10 then ; ??????? ??????? ?? ????
Mark(i,rune)
endif
med()
next
until UO.Dead()
end sub

UO.buy('sp','vendor')
Kak mne tut napisatj jesle ja ho4u prosto Nightshade i blank scrolli pokupatj so vsem drugim ja rozabralsja no eto nemagu ponatj sorry za crazy 6rift
Image
Sfagnum
Expert!
Posts: 1284
Joined: 2004-07-04 00:14:58
Contact:

Post by Sfagnum »

до 1го кила вендора будет работать... а потом - селяви ;)
SomeOne
Posts: 26
Joined: 2005-03-03 13:03:44

Post by SomeOne »

Sfagnum wrote:до 1го кила вендора будет работать... а потом - селяви ;)


Nu da ja ponemaju potamu6to vse identi sbjutca ti mne nemog skozatj gde mne stavitj i 4to pisatj 6tobe on pokupal regi nightshade i blank scrolls
??
Image
Sfagnum
Expert!
Posts: 1284
Joined: 2004-07-04 00:14:58
Contact:

Post by Sfagnum »

а чо за шард то?
SomeOne
Posts: 26
Joined: 2005-03-03 13:03:44

Post by SomeOne »

Sfagnum wrote:а чо за шард то?


Dragon World :)
Image
Sfagnum
Expert!
Posts: 1284
Joined: 2004-07-04 00:14:58
Contact:

Post by Sfagnum »

тодыть сорь мне конкурентов не надо ;)

ЗЫ эта инфа на форуме есть, причём как на ДРВ так и тут...
SomeOne
Posts: 26
Joined: 2005-03-03 13:03:44

Post by SomeOne »

Sfagnum togda pomagi pozhalusto kak s etim buy/sell rozabratca ja beru peshu 6to mne nado no nepoimu 6to mne pisatj tam gde vendor name ?? jesle ja peshu vendor togda kogda on letit tak i pishet vendor buy pomagi ja tebja umalaju
Image
Sfagnum
Expert!
Posts: 1284
Joined: 2004-07-04 00:14:58
Contact:

Post by Sfagnum »

посмотри мой скрипт на продажу там этот момент есть ;)
SomeOne
Posts: 26
Joined: 2005-03-03 13:03:44

Post by SomeOne »

Sfagnum wrote:посмотри мой скрипт на продажу там этот момент есть ;)
Pomagi mne obesni mne vsjo budu o4enj blogadaren dabazarim vremja kogda ti pokupaji6 a kogda ja :wink:
Image
SomeOne
Posts: 26
Joined: 2005-03-03 13:03:44

Post by SomeOne »

Sfagnum wrote:посмотри мой скрипт на продажу там этот момент есть ;)
ili dai silku na tvoj scriptik :)
Image
Sfagnum
Expert!
Posts: 1284
Joined: 2004-07-04 00:14:58
Contact:

Post by Sfagnum »

лентяй ёпт
SomeOne
Posts: 26
Joined: 2005-03-03 13:03:44

Post by SomeOne »

U menja vse identi jest na runki i na vendori vot odna trabla toka s tem kak zdelatj 6tobe on u kazdoj drugoj runke pisal be name normalnij i gde postavitj 6tobe regi pokupal? Ti mne skozhi obesnitj mozhesh ili net. Naskoko ja ponemaju mozhesh tak skozhi v premuju obesnish ili net? Vitj dla tago zhe forum zdelan 6tobe drug drugu pomagali obshalisj i.t.d :shock:
Image
Sfagnum
Expert!
Posts: 1284
Joined: 2004-07-04 00:14:58
Contact:

Post by Sfagnum »

хех... не дочитал... не смогла(с)
из того что понял...
присмотрись к строке:

Code: Select all

uo.sell(sellListName,UO.GetName('vend')) 
и сделай по аналогии...
SomeOne
Posts: 26
Joined: 2005-03-03 13:03:44

Post by SomeOne »

Sfagnum wrote:хех... не дочитал... не смогла(с)
из того что понял...
присмотрись к строке:

Code: Select all

uo.sell(sellListName,UO.GetName('vend')) 
и сделай по аналогии...


Nepoimu vot script
sub main()
DIM rune[6]
DIM ven[6]
var i, n
rune[1]='0x401FD45B' ;
rune[2]='0x401FD45C' ;
rune[3]='0x40080128' ;
rune[4]='0x401FD465' ;
rune[5]='0x40075D27' ;
rune[6]='0x401FD458' ;

ven[1]='0x00304D77' ; ven[2]='0x003802B3' ;
ven[3]='0x001A411E' ;
ven[4]='0x001D11A7'
ven[5]='0x0019628F'
ven[6]='0x001C324C'

repeat
for i=1 to 6
recall(i,rune)
WalkN(0,0,ven[i])
UO.buy('0x0E34','Bernice') <---- Kak mne tut vsjo zdelatj jesle name naprimer 1vendor:a 2vend:b 3vend:c 4vend:b 5vend:d 6vendr:f ????
wait(500)
UO.Say("bye")
UO.DeleteJournal()
UO.Click(rune[i])
repeat
wait(500)
until UO.InJournal('jumps left')
takenum()
if res < 10 then ;
Mark(i,rune)
endif
med()
next
until UO.Dead()
end sub
#####################################
sub takenum()
var ns, j, i, n
var str, num
num=''
ns=0
n=uo.InJournal('jumps left')-1
str=uo.Journal(n)
UO.Print(str)
j = len( str ) - 1
for i = 0 to j

if ns==1 and str[i]<>' ' then
num=num+str[i]
else
ns=0
endif
if str[i] =='(' then
ns=1
endif
next
res = val(num)
UO.Print(str(res))
end sub
#####################################
sub Recall(i,rune)
var b
uo.print('Recoll Rune '+str(i))
for b=1 to 10
uo.deletejournal()
uo.waittargetobject(rune[i])
uo.cast('Recall',rune[i])
if WaitForRecall()==1 then
return 1
end if
next
return 0
end sub
#####################################
sub Mark(i,rune)
uo.waittargetobject(rune[i])
uo.cast('Mark',rune[i])
end sub
#####################################
sub WaitForRecall()
var Text1=uo.getname()+": The spell fizzles."
var mess='',lastX=uo.getX(),lastY=uo.getY()
for var v=0 to 200
mess=uo.journal(0)
if uo.Journal(0)==Text1 then
return 0
end if
if uo.getX()<>lastX OR uo.getY()<>LastY then
return 1
end if
wait(50)
next
return 0
end sub
######################################
sub med()
VAR LastTimer
while UO.Mana<UO.Int
LastTimer=UO.Timer()
UO.UseSkill('Meditation')
repeat
wait(100)
until UO.InJournal("You are") OR UO.InJournal("You lose") OR UO.Timer()>LastTimer+200
UO.DeleteJournal()
wait(200)
wend
end sub
##############################
# WalkN(X,Y,Serial) - char is walking by dX and dY step
# sub using Home, End, PgUp, PgDown keys
# d'not rebind this key from default action!
# serial - Serial of target or "" - string
# walkwait - delay after keypress
# Example:
# WalkN(2080,2113,'') - go to coordinates
# WalkN(0,0,'0x12345678') - go to target position
#--------------------------------------------------------------
sub WalkN(x,y,Target)
VAR i,StepSucess
VAR dx,dy,Exit=0
While Exit<>1
If Target<>"" Then
dx=UO.GetX(Target)-UO.GetX()
dy=UO.GetY(Target)-UO.GetY()
If UO.GetDistance(Target)<2 Then
Exit=1
Endif
Else
dx=x-UO.GetX()
dy=y-UO.GetY()
If dx==0 AND dy==0 Then
Exit=1
Endif
Endif
If dx<>0 AND dy<>0 Then
If dx>0 AND dy>0 Then
StepSucess=Go(3,40,300) ;SE - DownArrow
If StepSucess==-1 Then
StepSucess=Go(7,38,300) ;WN - UpArrow
StepSucess=Go(1,39,300) ;NE - RightArrow
If StepSucess==-1 Then
StepSucess=Go(5,37,300) ;SW - LeftArrow
Endif
Endif
Endif
If dx>0 AND dy<0 Then
StepSucess=Go(1,39,300) ;NE - RightArrow
If StepSucess==-1 Then
StepSucess=Go(5,37,300) ;SW - LeftArrow
StepSucess=Go(3,40,300) ;SE - DownArrow
If StepSucess==-1 Then
StepSucess=Go(7,38,300) ;WN - UpArrow
Endif
Endif
Endif
If dx<0 AND dy>0 Then
StepSucess=Go(5,37,300) ;SW - LeftArrow
If StepSucess==-1 Then
StepSucess=Go(1,39,300) ;NE - RightArrow
StepSucess=Go(7,38,300) ;WN - UpArrow
If StepSucess==-1 Then
StepSucess=Go(3,40,300) ;SE - DownArrow
Endif
Endif
Endif
If dx<0 AND dy<0 Then
StepSucess=Go(7,38,300) ;WN - UpArrow
If StepSucess==-1 Then
StepSucess=Go(3,40,300) ;SE - DownArrow
StepSucess=Go(5,37,300) ;SW - LeftArrow
If StepSucess==-1 Then
StepSucess=Go(1,39,300) ;NE - RightArrow
Endif
Endif
Endif
Endif
If dx<>0 AND dy==0 Then
If dx>0 Then
StepSucess=Go(2,34,300) ;E - PgDown
If StepSucess==-1 Then
StepSucess=Go(3,40,300) ;SE - DownArrow
If StepSucess==-1 Then
StepSucess=Go(1,39,300) ;NE - RightArrow
Endif
StepSucess=Go(2,34,300) ;E - PgDown
Endif
Endif
If dx<0 Then
StepSucess=Go(6,36,300) ;W - Home
If StepSucess==-1 Then
StepSucess=Go(7,38,300) ;WN - UpArrow
If StepSucess==-1 Then
StepSucess=Go(5,37,300) ;SW - LeftArrow
Endif
StepSucess=Go(6,36,300) ;W - Home
Endif
Endif
Endif
If dx==0 AND dy<>0 Then
If dy>0 Then
StepSucess=Go(4,35,300) ;S - End
If StepSucess==-1 Then
StepSucess=Go(3,40,300) ;SE - DownArrow
If StepSucess==-1 Then
StepSucess=Go(5,37,300) ;SW - LeftArrow
Endif
StepSucess=Go(4,35,300) ;S - End
Endif
Endif
If dy<0 Then
StepSucess=Go(0,33,300) ;N - PgUp
If StepSucess==-1 Then
StepSucess=Go(1,39,300) ;NE - RightArrow
If StepSucess==-1 Then
StepSucess=Go(7,38,300) ;WN - UpArrow
Endif
StepSucess=Go(0,33,300) ;N - PgUp
Endif
Endif
Endif
Wend
end sub
sub Go(dir,key,walkwait)
VAR x,y, OldDir
x=UO.GetX()
y=UO.GetY()
OldDir=UO.GetDir()
If UO.GetDir()<>dir Then
UO.Press(key)
wait(walkwait)
If UO.GetDir()<>dir Then
CheckLag()
Endif
Endif
UO.Press(key)
wait(walkwait)
If x==UO.GetX() AND y==UO.GetY() Then
CheckLag()
Endif
If x==UO.GetX() AND y==UO.GetY() AND OldDir<>UO.GetDir() Then
UO.Press(key)
wait(walkwait)
Endif
If x==UO.GetX() AND y==UO.GetY() Then
CheckLag()
Endif
If x==UO.GetX() AND y==UO.GetY() Then
UO.Print("Zasada!")
return -1
Else
return 1
Endif
end sub
#########################################
sub CheckLag()
UO.DeleteJournal()
UO.Click('backpack')
repeat
wait(500)
until UO.InJournal('Backpack')
end sub

Pomagi mne pozhalusto
Image
SomeOne
Posts: 26
Joined: 2005-03-03 13:03:44

Post by SomeOne »

oi tam 2 rune po oshibke shas nepravelno skapiraval eto ne eta trabla ti mne obesni s etimi vendorami pozhalusto
Image
Sfagnum
Expert!
Posts: 1284
Joined: 2004-07-04 00:14:58
Contact:

Post by Sfagnum »

для начала в хелп сходи и посмотри как юзать команду buy првильно, потом посмотри что есть объекты, и наконец посмотри про массивы немного...

ЗЫ не издеваюсь просто готовое решение тебе только повредит как скриптеру
Post Reply