kforce 5 Posted March 28, 2014 Share Posted March 28, 2014 (edited) With the function item.set_value() we can set a attr bonus to an item, but my question is if we can get what bonus are on that item, i know that exists a function called item.get_value() but this doesn't seem to return the attr bonus. Alto, the argument that we need to set on that function is limited to 5. quest test begin state start begin when 9003.take begin for i = 0,5 do say(i..": "..item.get_value(i)) end end end end I used this simple code to get all the values of a item, and thats what i got from a black steel armour+9 without any attr: Am i using it right? Or this function simply doesn't return the attr bonus? Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Denis 1474 Posted March 29, 2014 Share Posted March 29, 2014 Try this: quest test begin state start begin when 9003.take begin chat(i..": "..item.get_value(item.get_vnum())) end end end You do it wrong because you set on the function item.get_value the integer 'i' so the function takes the id's from 0-5. Regards. Link to comment Share on other sites More sharing options...
Premium Syreldar 1875 Posted March 30, 2014 Premium Share Posted March 30, 2014 quest test begin state start begin when 9003.take begin chat(i..": "..item.get_value(item.get_vnum())) end end end chat(i.." ??? you did not call that variable, how do you pretend to use it? quest test begin state start begin when 9003.take begin chat(item.get_value(item.get_vnum())) end end end try this. "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
Denis 1474 Posted March 30, 2014 Share Posted March 30, 2014 Yeap,sorry I forgot to remove it Link to comment Share on other sites More sharing options...
Yoshix3 8 Posted March 30, 2014 Share Posted March 30, 2014 I think he means the attr's of the item. But the function does only returns value0-value5, not the attr's in it. Link to comment Share on other sites More sharing options...
kforce 5 Posted March 30, 2014 Author Share Posted March 30, 2014 I think he means the attr's of the item. But the function does only returns value0-value5, not the attr's in it. Yep, thats the problem. There aren't a way to do it without modify the source right? Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now