ScriptUO
Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: KuhlKy on May 12, 2011, 08:19:39 AM
-
Was wondering if there was a way to get the weight of a keg for when you are making potions or a even a way to read what is written in the gump would be even better
any help would be appreciated.... thanks
-
Check out event property this will give you weight and other info for items.
-
Was wondering if there was a way to get the weight of a keg for when you are making potions or a even a way to read what is written in the gump would be even better
any help would be appreciated.... thanks
Hi,
maybe this little test script gives you a few ideas (Target an Item and it will read out the stuff),
check out the STR Commands in the Docs and I am sure you can get what you like !
Basic idea is to read out the text, narrow it down with the STR command
to your needs eg. cut out name or weight numbers and put this into a var to check on it
or calculate ...
; SUB Cut down Item Properties and Display
; This SUB will cut down Item Properties in single Lines
; and gives you the option to Display Lines you want
; and ignore Lines by setting up keywords
;
; Grab the ITEMID
Set #targcurs 1
Target
While #targcurs = 1
wait 0
; Check out the Property of the Item
FindItem #ltargetID
Event Property #FindID
; #Property hold the full String now, store it for later use
Set %FullProperty #Property
; Get the Number of Lines we have
STR COUNT %FullProperty $
; Setup StartParameters for Line Selection
Set %LineCounterMax #strRES
Set %CutLeftPos 1
Set %DisplayOK #TRUE
Set %LineCounter 1
; Check out what to Display and what to Ignore
Repeat
{
; Get the most right poition of our Line
STR POS %FullProperty $ %LineCounter
Set %CutRightPos #strRES
; to Cut it out we need the Length of the Line
Set %CutLength %CutRightPos - %CutLeftPos
; Cut out our Line from the Full Property
STR MID %FullProperty %CutLeftPos %CutLength
; We got one Line out of the Property
Set %DisplayLine #strRES
; Set %DisplayOK to #FALSE when something we don't want is in Line
; excludes: lines with weight or insured or requirement
if weight in %DisplayLine || insured in %DisplayLine || requirement in %DisplayLine || Weapon , #SPC , Speed in %DisplayLine || Durability in %DisplayLine
Set %DisplayOK #FALSE
; Display Line and prevent from SPAM Alert
if %DisplayOK = #TRUE
{
Msg %DisplayLine $
STR LEN %DisplayLine
Set %WaitDelay #strRES * 5
Wait %WaitDelay ; #strRES
}
; Prepair for next Line
Set %DisplayOK #TRUE
Set %CutLeftPos %CutRightPos + 1
Set %LineCounter %LineCounter + 1
}
Until %LineCounter > %LineCounterMax
halt
-
error here .. otherwise nice looking code
Set %DisplayOK = #FALSE
-
error here .. otherwise nice looking code
Set %DisplayOK = #FALSE
I think I got the hint ....
and fixed it
thx
cu
-
thanks for help I appreciate it
-
Why would you worry about kegs when pots stack and you can stack more than 100 at a time? Kegs are kind of obsolete now.
-
Why would you worry about kegs when pots stack and you can stack more than 100 at a time? Kegs are kind of obsolete now.
Why does someone have to ask this question every time the word "keg" makes it into a post? ;)
I don't use strictly bottles for either. Better profit margin when selling kegs of a potion.
X
-
Why would you worry about kegs when pots stack and you can stack more than 100 at a time? Kegs are kind of obsolete now.
Why does someone have to ask this question every time the word "keg" makes it into a post? ;)
I don't use strictly bottles for either. Better profit margin when selling kegs of a potion.
X
This question gets asked because it's pointless and annoying to buy pots in kegs... :)
-
because it's pointless and annoying to buy pots in kegs... :)
Hehe, about as pointless and annoying to the seller as buying bottles to sell pots!!
;D
-
I prefer to have potions in a keg for my use. It may not be your way Twinkle McNugget but that is what I prefer.
-
I partly agree with Twinkle McNugget but on seige I can not afford bottles yet.