Venture Posted July 23, 2024 Group: Members Topic Count: 52 Topics Per Day: 0.01 Content Count: 179 Reputation: 2 Joined: 08/30/13 Last Seen: November 7, 2024 Share Posted July 23, 2024 (edited) Is there a way to check if signed item matches the character's? I need the NPC to only accept if the item is produced by themselves. Edited July 23, 2024 by Venture Quote Link to comment Share on other sites More sharing options...
0 Venture Posted July 23, 2024 Group: Members Topic Count: 52 Topics Per Day: 0.01 Content Count: 179 Reputation: 2 Joined: 08/30/13 Last Seen: November 7, 2024 Author Share Posted July 23, 2024 I managed to get this to work: function script HasOwnNamedItem { .@itemID = getarg(0); .@charID = getarg(1); .@card3 = .@charID & 65535; .@card4 = .@charID >> 16; getinventorylist .@charID; for( .@i = 0; .@i < @inventorylist_count; .@i++ ) { if(@inventorylist_id[.@i] == .@itemID && @inventorylist_card3[.@i] == .@card3 && @inventorylist_card4[.@i] == .@card4) { return true; } } return false; } Quote Link to comment Share on other sites More sharing options...
Question
Venture
Is there a way to check if signed item matches the character's?
I need the NPC to only accept if the item is produced by themselves.
Edited by VentureLink to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.