ScriptUO

Official ScriptUO EasyUO Scripts => Script Debug => Topic started by: azmanomer on September 29, 2012, 06:51:59 AM

Title: Hotkey issue
Post by: azmanomer on September 29, 2012, 06:51:59 AM
Code: [Select]
set %loot F9
set %pet1 F10
set %pet2 F11
set %kapi F12
set %runebook e
set %dismount f

Event SysMessage Script Aktif
loop:
OnHotKey %loot
gosub loot
OnHotKey %pet1
gosub pet1
OnHotKey %pet2
gosub pet2
OnHotKey %kapi
gosub kapi
OnHotKey %runebook
gosub runebook
OnHotkey %dismount
gosub dismount
goto loop


sub loot
finditem YFM G_2
if #findcnt > 0
{
set #lobjectid #findid
set %ceset #findid
event macro 17 0
wait 10
ignoreitem #findid
finditem POF C_ , %ceset  
find:
finditem * C_ , %ceset
if #findstack > 2
{
ignoreitem #findid
goto find
}
if #findcnt > 0
{
set %object #findid
gosub Check
event sysmessage %name %value
if %value > 70
{
exevent drag #findid #findstack
wait 15
exevent dropc #backpackID
wait 5
}
set %value 0
ignoreitem #findid
goto find
}
}
goto loop

sub runebook
set #lobjectid %runebook
wait 5
event macro 17 0
wait 5
goto loop

sub dismount
finditem %mount
if #findkind = 1
{
set #lobjectid #findid
wait 5
event macro 17 0
}
else
{
set #lobjectid #charid
wait 5
event macro 17 0
}
goto loop

sub pet1
event macro 1 0 [band
wait 2
set #ltargetid *pet1
wait 5
event macro 22 0
wait 10
return

sub pet2
event macro 1 0 [band
wait 2
set #ltargetid *pet2
wait 5
event macro 22 0
wait 10
return

sub kapi
finditem %kapi G_2
if #findcnt > 0
wait 5
set #lobjectid #findid
event macro 17 0
wait 5
goto loop


i tried to use these hotkeys with JUOM (Jorman's Ultima Online Macrotor) but when i started it nothing happened. It seems these hotkeys didnt focused for just ultima client. Is there anyway to fix it? i tried it with razor too but razor cant identify loot section :( sorry for my english.
Title: Re: Hotkey issue
Post by: azmanomer on September 29, 2012, 09:49:23 AM
i did alot of research for last 5 hours it seems its not possible to focus hotkey to windows for easyuo so i change my request can you help me to change loot section for done these thing automaticly? im new at scripting so i cant handle it by myself :(
Title: Re: Hotkey issue
Post by: Cerveza on October 01, 2012, 07:39:52 AM
Two things.

I modified your post to place code tags around the code... making it much easier to read.

Second - when writing a script it really helps to write down exactly what you want to accomplish. Don't leave anything out, or assume anything. Write down exactly what you are trying to do as if you are manually doing it online.

That will help you to understand where you may be missing something, and will really help anyone who wants to relay some assistance to you.
Title: Re: Hotkey issue
Post by: Endless Night on October 04, 2012, 08:50:38 PM
One thing i would recommend is to replace all the "goto loop" commands you have at the end of every sub with "Return" instead


I would help more but im not really understanding what your asking.