I'm having a lot of trouble making these 2 scripts..

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
Haist
Posts: 5
Joined: 2004-07-14 21:12:29

I'm having a lot of trouble making these 2 scripts..

Post by Haist »

Can somone please help me make 2 scripts.. One that loots everything, and another that automatically heals me with bandages when i am missing hp? Thanks!!
Haist
Posts: 5
Joined: 2004-07-14 21:12:29

Post by Haist »

Only need the autoloot one now.. anyone?
Kazoo
Posts: 173
Joined: 2004-04-03 18:39:28
Contact:

Post by Kazoo »

Code: Select all

#==============================================================
#  Loot() - looting corpse and from ground
#--------------------------------------------------------------
sub Loot()
	VAR WaitTime=500
	VAR Exit=0, i
	DIM Loot[30]
	

	Loot[0]=0x19B9 ; ore
	Loot[1]=0x0EED ; gp
	Loot[2]=0x0F7B ; BM
	Loot[3]=0x0F7A ; BP
	Loot[4]=0x0F84 ; GA
	Loot[5]=0x0F85 ; GI
	Loot[6]=0x0F86 ; MR
	Loot[7]=0x0F88 ; NS
	Loot[8]=0x0F8C ; SA
	Loot[9]=0x0F8D ; SS
	Loot[10]=0x0F90 ; Dead Woods
	Loot[11]=0x0F7E ; Sceleton Bones
	Loot[12]=0x0F87 ; Eyes of newt
	Loot[13]=0x0E76 ; Bag
	Loot[14]=0x09B0 ; Pounch
	Loot[15]=0x1BDD ; Logs
	Loot[16]=0x1078 ; Hides
	Loot[17]=0x1BFB ; Bolts
	Loot[18]=0x0E34 ; Blanc Scroll
	Loot[19]=0x0F25 ; Pieces of Amber
	Loot[20]=0x0F16 ; Ametist
	Loot[21]=0x0F20 ; Tourmaline
	Loot[22]=0x0F26 ; Diamond
	Loot[23]=0x0F30 ; Diamond
	Loot[24]=0x0F8E ; Serpent Scales
	Loot[25]=0x14EB ; Treassure Map
	Loot[26]=0x0F79 ; Blackmoor
	Loot[27]=0x0F3F ; Arrow
	Loot[28]=0x0F79 ; Blackmoor
	Loot[29]=0x0F79 ; Blackmoor
	
	UO.UseObject('lastcorpse')

	if UO.GetQuantity('lastcorpse') then
		UO.SetArm('temp')
		UO.WaitTargetObject('lastcorpse')
		UO.UseType('0x0F51') ;dagger
		wait(1000)
		UO.Arm('temp')
		wait(1500)
	endif
	
;	UO.SetReceivingContainer('0x400935D4') ; loot store bag

	For i=0 to 27
		UO.FindType(Loot[i],-1,'ground')
		if UO.GetQuantity('finditem') then 
			UO.Grab(STR(0),'finditem')
			wait(WaitTime)
		endif

		if UO.GetQuantity('lastcorpse') then
			UO.FindType(Loot[i],-1,'lastcorpse')
			if UO.GetQuantity('finditem') then 
				if Loot[i]==0x1078 then
					UO.WaitTargetObject('finditem')
					UO.UseType('0x0F9E')
				else
					UO.Grab(STR(0),'finditem')
				endif				
				wait(WaitTime)
			endif
		endif
	next

;	UO.UnSetReceivingContainer()
end sub
Thdin
Posts: 51
Joined: 2004-07-22 07:37:37

Post by Thdin »

For i=0 to 27
I'm not too sure about that...Why not make a simple Repeat Until ?

Repeat
#Get items
i = i + 1
Until (i==27)
Edred
Expert!
Posts: 2544
Joined: 2004-04-03 17:36:29
Location: Saint-Petersburg

Post by Edred »

Nidht wrote:
For i=0 to 27
I'm not too sure about that...Why not make a simple Repeat Until ?

Repeat
#Get items
i = i + 1
Until (i==27)
I think what you need in correct to:
For i=0 to 29
;)

'For' is simplest cycle in any language. Why you not use it?
Thdin
Posts: 51
Joined: 2004-07-22 07:37:37

Post by Thdin »

Didn't know that For i = 0 to 29 worked :P I was thinking C++, so the injection script didn't make sense :P
BETEPAH
Expert!
Posts: 838
Joined: 2004-05-31 09:31:51
Contact:

Post by BETEPAH »

Here i= number of massive

DIM Loot[30]
Loot[0]=0x19B9 ; ore
Loot[1]=0x0EED ; gp
Loot[2]=0x0F7B ; BM
Loot[3]=0x0F7A ; BP
Loot[4]=0x0F84 ; GA
Loot[5]=0x0F85 ; GI
Loot[6]=0x0F86 ; MR
Loot[7]=0x0F88 ; NS

IF i=1 to 29
Then inject find one of numbers in ground and grab it ))))
Все просто.
BETEPAH ™
Drakull
Posts: 36
Joined: 2004-07-01 06:02:22

Re: I'm having a lot of trouble making these 2 scripts..

Post by Drakull »

Haist wrote:Can somone please help me make 2 scripts.. One that loots everything, and another that automatically heals me with bandages when i am missing hp? Thanks!!
Well i see it as easy as:

sub lootall()
var mycontainer = 'yourcontainerId'

uo.setreceivingcontainer(mycontainer)
uo.emptycontainer (560)
end sub
Post Reply