61
General UO Chat / Re: UOA doesn't load
« on: March 25, 2012, 07:40:51 AM »
I did something similar this morning. Time to find out more about razor...
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
set %smeltingitems YVI_GZH_HZH_NJL_BWI_KWI_IWI_EWI_QJL_JWI_XVI_CZH_HWI_JJN_NZH_BZH_TDI_
+WVI_VVI_QSH_KZH_PZH_DZH_DSH_ASH_TSH_ESH_YPH_GSH_OSH_ZPH_ZRH_IWL_CSH_BSH_FSH_
+DPH_LKO_NWL_MKH_JKH_RJG_SJG_FJG_MWL_NSH_ALH_HKH_PKH_BQH_JSH_XLH_GLH_MSH_YLH_
+QPH_YKH_DLO_QKH_DLH_HSH_ULH_LLH_ZOH_IKH_VLH_KSH_WLH_WPH_PKO_PPH_RSK_ATK_ZSK_
+OSK_NSK_USK_SSK_MSK_TSK_LSK_KKH_SKH_WTO_VPH_ISH_AQH_BMH_USH_XKH_FLH_KMH_RKO_
+VKH_ELH_HMH_LSH_IMH_CQH_WSH_APH_MLH_RLH_NKH_XPH_NKO_QSK_YSK_PSK_OZH_VSH_
+FMH_GFF_EPH_LPH_BPH_CUO_TSF_LPO_JPH_ZTH_RMH_SOH_JOH_KSF_
+FUO_WSF_ATF_OMH_XPO_QPO_NMH_WOH_BNF_LTF_VPO_TOH_WTH_VRH_KTF_LMH_TLH_
+OLH_FFF_ZSF_YTH_BUO_ASF_ISF_BSF_QPF_KPH_CUH_NPO_MPH_UOH_TRH_XRH_CSF_
+KPO_POH_RRH_WPO_EMH_MSF_OPO_BUH_GUO_MMH_VTH_BFF_QMH_YSF_NSF_LSF_AQF_
+GMH_JTF_SRH_CNF_FBG_HNF_ZPF_GBG_OSF_INF_HSF_AUO_ZTO_FSF_WRH_MTF_JPO_
+RPF_HFF_XSF_YPO_JSF_DMH_XTH_PPO_QOH_URH_CQF_CFF_PMH_AUH_SPO_CPH_ZRF_
+MPO_YRH_USF_LIK_MIK_CLK_AIK_CIK_LYD_GIK_NIK_ZHK_HLK_BLK_FIK_BIK_OIK
event macro 8 7
wait 15
if #contkind = OHF
{
ContPos 570 12
}
wait 50
set %charpackid #contid
wait 15
finditem TBG C_ , #BACKPACKID ; <---- Added to look just in backpack #BACKPACKID should be the same as #CONTID
if #findkind = -1
{
event sysmessage Need more tongs!
halt
}
set #lobjectid #findid
event macro 17 0
gosub WaitForSmithGump
if ! #result 2
display All out of tongs!
halt
if #contkind = STM
{
ContPos 50 50
click 83 403
}
findItem %smeltingitems C_ , #BACKPACKID
if #FINDCNT < 0 ; <------------ Changed the if statement expression slightly
{
Display Can't find anything to smelt, halting...
halt
}
for #FINDINDEX 1 #FINDCNT
{
event property #FINDID
if excep in #property
{
ignoreitem #FINDID
}
else
{
set #LTARGETID #FINDID
event macro 22 0
gosub WaitForSmithGump
if #contkind = STM
{
ContPos 50 50
click 83 403
}
}
}
Display All Non-exceptional Items were smelted, halting...
halt
sub WaitForSmithGump
set %gumptimeout #scnt
_WaitForSmithGump:
if #contName <> generic_gump && #contsize <> 530_437
{
wait 1
if %gumptimeout + 5 < #scnt
return #false
goto _WaitForSmithGump
}
return #true
finditem %smeltingitems
if #FINDCNT > 0
{
event property #FINDID
display #PROPERTY
}
halt
pause
finditem %smeltingitems ; use F7 to step line by line through the code
if #FINDCNT > 0
{
event property #FINDID
;etc...
I have done as you said but still not having any luck. With what you mentioned added into my script, It attempts to click "something" but always says "that is too far away". There are none of the "smeltingitems" anywhere on my screen.
;snipped code above this
findItem %smeltingitems C_ , %charpackid
if #FINDCNT > 0
{
for #FINDINDEX 1 #FINDCNT
{
event property #FINDID
if excep in #property
{
ignoreitem #FINDID
}
else
{
set #LTARGETID #FINDID
event macro 22 0
gosub WaitForSmithGump
if #contkind = STM
{
ContPos 50 50
click 83 403
}
}
}
}
halt
finditem %smeltingitems C_ , %charpackid
.. Im not sure how to set it to find the item, search the properties, then click it if properties do not include exceptional.
Any help would be greatly appreciated!
findItem %smeltingitems
event property %smeltingitems
if excep in #property
{
ignoreitem #smeltingitems
}
findItem %smeltingitems
event property #FINDID ; <----- Changed %smeltingitems to #FINDID
if excep in #property
{
ignoreitem #FINDID ; <----- Changed #smeltingitems to #FINDID
}
else
{
set #LTARGETID #FINDID
event macro 22 0 ; last target
}
findItem %smeltingitems
for #FINDINDEX 1 #FINDCNT
{
event property #FINDID
if excep in #property
{
ignoreitem #FINDID
}
else
{
set #LTARGETID #FINDID
event macro 22 0 ; last target
; put the code to click the smelt button again here
gosub WaitForSmithGump
if #contkind = STM
{
ContPos 50 50
click 83 403
}
}
}
Alternatively, if your script users only intend to run it every 18 hours themselves, they can just search for the line:
gosub collectsmith
and add two duplicate lines below it. I just tested it myself and it works fine.
EDIT: What we really need is a Bribery script to scan a whole book of BODs and bribe NPCs to upgrade the ones that we want. Hmm....idea brewing...
You have to use a combination of the dot operator and the concatenation operator.Code: [Select]set %var1 10
set %var2 string
set % . %var1 , %var2 Worked
display %10string
halt
For what you are doing, you would need to use an intermediate step in order to Extract the Data from your Dynamic Variable.Code: [Select]set %Var1 10
set %Var2 String
set %Temp %Var1 , %Var2
set % , %Temp Worked
display % . %Temp
Halt
The Easiest way to get around this is just to Bypass the Var2.Code: [Select]set %Var1 10
set %String , %Var1 Worked
Display %String . %Var1
halt
Once you get the Hang of it, its not Tooo Bad.
set %var1 10
set %var2 string
set % , %var1 , %var2 XXXXX
display % , %var1 , %var2
halt
;==========================================================
; Script Name: Bulk Order Bribery
; Author: slyone
; Version: 1.1
; Public Release: 02/13/2011
; Revision Date: 5-23-2012
; Purpose: Upgrade BODs via bribery
; Instructions: -Fill up a BOD book with BODs you wish to
; upgrade, this is the 'Full Book'
; -Get another BOD book to put the upgraded
; BODS into, this is the 'Empty Book'
; -Have money in your bank
; -Stand within two tiles of an NPC you can
; bribe
; -Bribe away
;==========================================================
; Version 1.1 Updates: -Modified logic with waiting for
; gumps
; -Hopefully fixed bug where the
; script closed your backpack
; -Added Upgrade Loop button that will
; loop bribery until bod book is
; empty or until vendor can no longer
; be bribed
;==========================================================
; Unresolved Issues: -BOD ghosting
; -Getting message "You must wait to
; perform another action." when the
; script tries to drop a bod on the
; vendor
;==========================================================