ScriptUO
Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: HalfMercy on January 12, 2016, 05:57:20 AM
-
This is just a general question because I'm lost. I chopped up the Blaz'n Skinner script and used only the part of it I wanted, which was the beginning. So all it does for me now is asks me to target my blade when I first start the script, then searches for corpses within 2 tiles and cuts them up. However, it tries to cut any and every corpse which is wasting time and loot and slowing my whirlwind attacks down sometimes because it's too busy trying to cut corpses that don't produce anything. So here's the question: is there a way to find an ID for certain types of corpses so that I can create an ignore list? I did some research and I think I'd be able to do it if I could find a generic ID (for example) for "wisp corpse" or "elemental corpse". When I examined corpses within EUO I was only able to find two IDs - YFM which signifies ANY corpse, and the CONTID/LOBJECTID which is unique to that specific corpse and does me no good. Any help would be appreciated and if/when I get this dialed in, I'll be more than happy to share the final result.
-
Let me try asking this another way... and if this post is bad form/breach of etiquette, please let me know. I don't want to be rude, even unintentionally.
I figured out how to get the script to be selective about corpses. I picked up nilmer's Everything property Sub 2.2 that reads the property of the corpse, so I can set as many exclusions as I like. This is the part of the overall script that I modified:
sub find
findLoop:
finditem YFM G_ , 2
if #findKind >= 1
gosub property #findid yesno wisp
if %return = yes
goto findLoop
gosub property #findid yesno elemental
if %return = yes
goto findLoop
{
ignoreitem #findid
gosub skin
}
goto findLoop
But what this does is it keeps saying over and over "target cannot be seen". I tried this:
gosub property #findid yesno wisp
if %return = yes
ignoreitem #findid
goto findLoop
but that makes the script stop altogether. I really don't know how to move past this. Any help would be appreciated.
-
You need to post the contents of the sub property and sub skin ..
Or alternatively we can just use new code. (but still might fail depending on what is in skin.) I made this a never ending loop as that was what your posted code was.. it will never exit the find sub just continually search
sub find
repeat
finditem YFM G_ , 2
if #findcnt > 0
{
set #Findindex 0 ; initialize finditem counter
repeat
set #findindex #findindex + 1 ; itterate thourght found items one at a time
event property #findid ; read the description on the corpse
if wisp notin #property && elemental notin #property
{
gosub skin
set #findindex #findcnt + 1 ; restart search by making counter higher that total found
}
ignoreitem #findid
until #Findindex >= #findcnt
until #true = #false ; the end of time
Return
-
Thank you EN. The comments on each line are very helpful. I realize I've been trying to half-ass my way through this scripting and learn only enough to make something work + now I've hit the wall where I can't make something work without having a greater understanding of it. I have a corpse cutting script that works just fine but no matter how I try to get it to read the description on the corpse, whether I do it with the property sub or the event property #findid you used, it breaks it. But that's my problem because I don't know enough and instead of asking for the fix I'm going to keep at it until I figure it out. Again, I really appreciate the short lesson you posted. :)
-
your welcome good luck on getting it working...