ScriptUO
Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: Paulonius on April 05, 2010, 09:42:23 PM
-
I have not figured out a good way to pull this out of the #property. Can anyone help me out?
-
First figure out what type of bod it is. 10-15-20
then do a
string Count %String (number)
if that count = 2
then its full
-
I figured that Bizatch out
;==========================================================
; Sub will check a SBOD for Item Count
; Returns #True if it is full or #False if it's not
; Sets %SBODItemCount to the number of items in the sBod
; Returns #False for LBODs and sets %BODStatus to Large
; Will return status for SBODs as Full# or Partial# where #
; is the number required to fill the SBOD
;----------------------------------------------------------
; Dependency: This Sub requires the included Sub Large_Check
Sub SBOD_Check
Set %BOD %1
Set %BODStatus N/A
Set %SBODItemCnt N/A
Set %Ones N/A
Set %Tens N/A
Set %BODFillStatusSubString N/A
Event Property %BOD
Set %BODFillStatusString #Property
Str Len %BODFillStatusString
Set %BODFillStatusStringLength #strRes - 3
Str Left %BODFillStatusString %BODFillStatusStringLength
Set %BODFillStatusStringRemainder #StrRes
If Large in #Property
{
Gosub Large_Check %BOD
event exmsg #charid 3 4 TEST MESSAGE Back From Large Check
If #Result = #True
{
Set %BODStatus Large
Return #False
}
}
str Right %BODFillStatusString 3
Set %BODFillStatusSubString #strRes
Str Left %BODFillStatusSubString 2
Set %BODFillStatusSubString2 #strRes
Str Left %BODFillStatusSubString2 1
Set %Tens #StrRes
Str Right %BODFillStatusSubString2 1
Set %Ones #StrRes
If %tens > 0
{
Set %sBODItemCnt %Tens , %Ones
}
If %tens < 1
Set %sBODItemCnt %Ones
If %sBODItemCnt = 20
{
Set %BODStatus Full20
Return #True
}
If %sBODItemCnt = 15
{
If 15 in %BODFillStatusStringRemainder
{
Set %BODStatus Full15
Return #True
}
Set %BODStatus Partial20
Return #False
}
If %sBODItemCnt = 10
{
If 10 in %BODFillStatusStringRemainder
{
Set %BODStatus Full10
Return #True
}
If 15 in %BODFillStatusStringRemainder
{
Set %BODStatus Partial15
Return #False
}
If 20 in %BODFillStatusStringRemainder
{
Set %BODStatus Partial20
Return #False
}
}
If 10 in %BODFillStatusStringRemainder
{
Set %BODStatus Parial10
Return #False
}
If 15 in %BODFillStatusStringRemainder
{
Set %BODStatus Partial15
Return #False
}
If 20 in %BODFillStatusStringRemainder
{
Set %BODStatus Partial20
Return #False
}
Set %BODStatus ERROR
Return #False
;----------------------------------------------------------
; Returns #True for LBOD
Sub Large_Check
Set %BODLargeCheck %1
Event Property %BODLargeCheck
Set %StringCheckLarge #Property
str Pos %StringCheckLarge Large
If #StrRes = 43
Return #TRUE
Return #False
-
I wish you guys would get in the habit of coding like SUO does it. :) So much easier to read for those of us who use it. hehe
-
I wish you would LEARN TO CODE LIKE THE REST OF US!!!!
-
I wish you would LEARN TO CODE LIKE THE REST OF US!!!!
Hey, at least my followers don't stop following after 15 tiles... :)
-
The only situations that I want my followers more than 15 tiles away from me is when I Want them to HOLD STILL