Jump to content

String comparison

Recommended Posts

I'm patching items with names that contain "silver," "gold" and other precious words, like "flamedance," to include flamedance rings. For this I'm using a series of conditions of this kind: ((~%name%~ STRING_CONTAINS_REGEXP ~gold~) == 0) | | ((~%name%~ STRING_CONTAINS_REGEXP ~flamedance~) == 0), and so on. But the results are strange. Silver rings don't get patched, and neither do gold ones, but golden pantaloons do. I don't mind that, but with jewelry I can only guess that letter case gets taken into account, even though it shouldn't, according to Weidu's documentation for that command. I'll try adding conditions for ~Silver~ and ~Gold~ and see what that does, but it's more confusing with ~flamedance~. Here the standard "Flamedance Ring" does not become patched, but "Joia's Flamedance Ring" does. Other than for the name, they are identical. And no, I didn't slip a space into my condition that would make the first condition not return true. Any explanation?

Link to comment
Just now, kjeron said:

Are you reading the identified name or unidentified name?

UNID name of most rings is just "Ring", whereas Joia's Flamedance Ring is both the ID and UNID name.

That's it! I should have read identified. Thanks! That explains all of them.

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...