Modifying a looter for demon bones.

Discussion about the technical aspects of scripting. Ask about all issues involving your freelance projects here.
Locked
Sniffingood
Passer by
Posts: 1
Joined: Wed May 07, 2014 10:43 pm

Modifying a looter for demon bones.

Post by Sniffingood »

So, this is just Nilmer's gauntlet looter with my poor attempt at adding bones to the list of items. All I've done really, is added the checkbox for bones to the menu, added the "set bones..." line and the "menu get bones" lines. It's running perfect except for the additions I've made, any input would be awesome. :)

p.s. I stole the list of bones from a looter that many people on easyuo boards recommended for looting all types of bones (I'd run it but it requires the latest client for OSI shards.)

Code: Select all

	if sys notin #opts 2
	display ok enable system messages and hit play
	halt
	if dmc notin #opts 2
	display ok enable don't move cursor and hit play
	halt
	menu Clear
	menu Window Title Corpse looter
	menu Window Color maroon
	menu Window Size 193 215
	menu Font Transparent #true
	menu Font Align Right
	menu Shape EUOShape1 -4 4 93 200 3 2 1 Yellow 2 White
	menu Font Name MS Sans Serif
	menu Font Size 10
	menu Font Style
	menu Font Color Yellow
	menu Font Transparent #false
	menu Font Align Left
	menu Font BGColor Maroon
  menu Text EUOLabel1 4 8 What to Loot:
	menu Font Size 8
	menu Font Color Green
	menu Text EUOLabel2 92 104 Current Weight
	menu Font Color Background
	menu Text EUOLabel3 92 132 % of Max Weight
	menu Font Color WindowText
	menu Text weight 104 120 EUOLabel4
	menu Text per 104 144 EUOLabel5
	menu Check gold 4 28 77 25 #false Gold
	menu Check weapons 4 52 77 25 #false Weapons
	menu Check armor 4 72 77 25 #false Armor
	menu Check jewelery 4 100 77 25 #false Jewelery
	menu Check bags 4 122 77 25 #false Bags
 	menu Check gems 4 142 77 25 #false Gems
	menu Check regs 4 161 77 25 #false Regs
	menu Check bones 4 181 77 25 #false Bones
	menu Font BGColor Red
	menu Button cursor 92 0 103 25 Set Loot Location
	menu Button min 92 24 103 25 Min. Update Range
	menu Button norm 92 48 103 25 norm Update Range
	menu Button pause 92 72 103 25 Pause
	menu Show 421 270 halt
set %jewel cwl_ijg_lwl_ujg_
set %gold POF_
set %weapon fuo_atf_npo_jph_tsf_nmh_vrh_jtf_soh_bph
+_lsf_bsf_nsf_zrf_rmh_lph_uoh_hsf_zto_buo_xth_opo_cuo
+_xrh_guo_mtf_rrh_vth_ysf_buh_auo_trh_zth_woh_usf_lmh
+_qpo_ppo_
set %armor gsh_osh_fik_gik_cik_nik_aik_mik_hlk_clk
+_czh_jwi_gzh_ewi_bwi_jjn_vvi_wvi_xvi_yvi_iwi_hwi_kwi
+_xvl_vjn_fci_jkh_njl_kkh_hkh_vkh_qkh_alh_xkh_ykh_mlh
+_llh_qsk_ysk_atk_usk_osk_ssk_yph_vph_bqh_cqh_pph
+_
set %bag ckf_lkf_zjf_
set %gems uvf_vuf_gvf_evf_hvf_ovf_fvf_bvf_rvf_
set %regs KUF_JUF_KZF_JZF_MZF_WZF_RZF_SZF_IUF_DUF_TZF_UZF_YZF_
set %bones OJK_XIK_SJK_IJK_TJK_BJK_UJK_DJK_MJK_AJK_LJK
+_FJK_RJK_EJK_ZIK_YIK_JJK_GJK_KJK_HJK_
set #menubutton closed
gosub cursor
initevents
top:
set %loot ap_
menu get regs
if #menures = -1
set %loot %loot , %regs
menu get gems
if #menures = -1
set %loot %loot , %gems
menu get gold
if #menures = -1
set %loot %loot , %gold
menu get weapons
if #menures = -1
set %loot %loot , %weapon
menu get armor
if #menures = -1
set %loot %loot , %armor
menu get jewelery
if #menures = -1
set %loot %loot , %jewel
menu get bones
if #menures = -1
set %loot %loot , %bones
menu get bags
if #menures = -1
set %loot %loot , %bag
if #menubutton = min 2
event macro 42 0
set #menubutton closed
if #menubutton = norm 2
event macro 43 0
set #menubutton closed
if #menubutton = pause 2
set #menubutton closed
gosub pause
if #charghost = yes
gosub pause
if #menubutton = cursor
gosub cursor
if #weight <> %weight
{
set %weight #weight
menu delete weight
menu Text weight 104 120 #weight
set %perc #weight * 100 / #maxweight
menu delete per
menu Text per 104 144 %perc
}
finditem YFM G_1
if #findkind = -1
goto top
openbody:
set %body #findid
set #lobjectid #findid
nextCPos 10 10
event macro 17 0
set %nt2 #scnt2 + 10
OQ:
finditem %loot C_ . #contID
if #findkind = -1 && %nt2 < #scnt2
goto OQ
wait 13
set %bod #contid
findloot:

finditem %loot C_ . %bod
if #findkind = -1 || #findbagid = #charid || #findbagid = #backpackid
{
event SysMessage finished Corpse.
ignoreitem %body
wait 15
ignoreitem reset 2
goto top
}

loot:
event drag #findid
wait 4
msg $
key enter
wait 7
click %x %y p
ignoreitem #findid 2
goto findloot
sub cursor
set #menubutton closed
event SysMessage   move your cursor exactly over your lootbag then press f4
w:
onhotkey f4
goto t
menu Window Color blue
goto w
t:
set %x #cursorx
set %y #cursory
menu Window Color Maroon
return
sub pause
menu Button pause 92 72 103 25 Resume
c:
if #menubutton <> pause
goto c
menu Button pause 92 72 103 25 Pause
set #menubutton closed
return

Cyclone
Apprentice Scribe
Posts: 15
Joined: Sun Dec 01, 2013 6:40 am

Re: Modifying a looter for demon bones.

Post by Cyclone »

Think demonbones are OZF don't see them in your list

change %bone to
set %bones OJK_XIK_SJK_IJK_TJK_BJK_UJK_DJK_MJK_AJK_LJK
+_FJK_RJK_EJK_ZIK_YIK_JJK_GJK_KJK_HJK_OZF_

and it should work
User avatar
Devlin
Legendary Scribe
Posts: 652
Joined: Thu Mar 18, 2010 12:50 pm

Re: Modifying a looter for demon bones.

Post by Devlin »

aye, the ID's you got are all the skeleton bones I believe, jaw, legs, etc. You just need the one object type, which is indeed OZF.
Resident Wiki Editor/Village Idiot

EasyUO Scripts
ReArmer
ReArmer (Old Version)
ReReader
Separate Journal for Guild or Public Chat (Old)
---------------------------------------------
Combat Focus Guide (Godmode Formula)
Locked