Saturday, July 3, 2010

Looting script for ultima online

This is one of my favorite scripts I've written. You will get many types of feedback when using this script in a crowd such as...

I've only used this script on free shards. Also, I wrote this a while ago, so I'm sure some improvements can be made. Test it out and leave some comments. If you have some suggestions, questions or anything, let me know. Thanks!

This script is set to loot a corpse when you hit the "F6" key. You can change the key by editing the %lootkey variable.



;====================================
; Script Name: Anon J's Super Looter. :)
; Author: Anon J
; Version: 1.1
; Shard OSI / FS: FS
; Revision Date: 2008/03/11
; Purpose: Loot bodies faster than a human.
;=====================================
;**************Variables***************
set %priority POF
set %items EVF_HVF_VVF_ZVF_RVF_GVF_NVF_BVF_UVF_KUF_JUF_KZF_JZF_RZF_MZF_WZF_SZF
set %lootkey F6
set %hotbag #CHARID
;event macro 8 1
;gosub waitfor 262_324 3
;sleep 500
;contpos 583 -193
;sleep 500
;***********Main Loop**************
loop:
onhotkey %lootkey
gosub loot
goto loop

;==================Loot sup=================
sub loot
finditem YFM_VNF_LNF_WNF G_1
if #findcnt > 0
{
set %corpse #findid
set #lobjectid %corpse
set %looting 1
}
if #findcnt < 1
{
ignoreitem reset
finditem YFM_VNF_LNF_WNF
if #findcnt < 1
return
}
event macro 17 0 ;last object
gosub waitfor 144_212 3
sleep 100
while %looting = 1
{
onhotkey %lootkey
set %looting 0
;loot priority item first
finditem %priority C_ , %corpse
if #findcnt > 0
{
exevent drag #findid #findstack
sleep 100
exevent dropc %hotbag
sleep 100
}
finditem %items C_ , %corpse
if #findcnt > 0
{
exevent drag #findid #findstack
sleep 100
exevent dropc %hotbag
sleep 100
ignoreitem #findid
}
else
set %looting 0
}
ignoreitem %corpse
return


;**********wait for sub*************
sub waitfor
set %time #time + %2
while %time >= #time
{
if #contsize = %1
return #true
sleep 100
}
return #false

No comments:

Post a Comment