Show the most recent posts.
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Click the
to give a poster a reputation bump!
Home
Help
Search
Posts
Recents
Tags
Calendar
Links
Discord
Dantes Inferno
Login
Register
ScriptUO
»
Scripting Resources & Utilities
»
Stealth Client
»
Stealth scripts
(Moderators:
Newb
,
Boydon
,
Crome969
) »
[py] weapons, jewelry, armor libraries
Add to Reputation:
What do you think of this post?
I agree
I disagree
Comment:
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: [py] weapons, jewelry, armor libraries (Read 8262 times)
0 Members and 1 Guest are viewing this topic.
unisharp
Elite
Posts: 199
Activity:
0%
Reputation Power: 4
Gender:
Respect:
+143
Referrals: 0
[py] weapons, jewelry, armor libraries
«
on:
October 22, 2020, 05:43:23 AM »
0
https://github.com/unisharpUO/StealthUO-Scripts/blob/master/lib/armor.py
https://github.com/unisharpUO/StealthUO-Scripts/blob/master/lib/jewelry.py
https://github.com/unisharpUO/StealthUO-Scripts/blob/master/lib/weapon.py
WHAT IS IT:
These objects make parsing item properties extremely quick and easy. I haven't made anything to determine what an item is yet (ie, cast to weapon if item is of type weapon)
HOW TO USE:
Say you had a box of armor that you wanted to go through and find all pieces with 10 LMC 25 LRC...
We make a script using the armor library, target the container holding our armor, cast each item to type armor and we can then compare object properties
# target container with armor
_target = RequestTarget()
UseObject(_target)
Wait(250)
# find all types of items of all colors in container
if FindTypesArrayEx([0xFFFF], [0xFFFF], [_target], True):
_foundList = GetFindedList()
for _found in _foundList:
# for each item found, create new armor object with the found item
_armor = Armor(_found)
# if LMC is 10 and LRC is 25, move to backpack
if _armor.LMC == 10 and _armor.LRC == 25:
MoveItem(_armor.ID, 1, Backpack(), 0, 0, 0)
Logged
daymorn
Jr. Member
Posts: 21
Activity:
0%
Reputation Power: 1
Respect:
+20
Referrals: 0
Re: [py] weapons, jewelry, armor libraries
«
Reply #1 on:
October 26, 2020, 12:41:04 PM »
+2
This is going to come in handy. Thanks for all the work.
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
Tags:
ScriptUO
»
Scripting Resources & Utilities
»
Stealth Client
»
Stealth scripts
(Moderators:
Newb
,
Boydon
,
Crome969
) »
[py] weapons, jewelry, armor libraries