Use on items that dont decrement item count, bug, "feature", or using it wrong?

notthinking

New member
Use on items that dont decrement item count, bug, "feature", or using it wrong?

Hey

So im writeing a small script that iterates over all my items, and uses them if they contain (used), (crumpled) etc for the recent skillbook update. In testing I discovered using use(1, item) would use the item but "remove" it from my inventory (get_inventory() wouldnt return it, but it was visible in the relay browser). So which is it? Im using a couple week old nightly build.

On a side note is there a function that checks the ending of a string (im using contains_text currently), actually thinking about it item isnt a string so how is that working some sort of polymorphisim? function overloading?

Is there any form of reflection to get the type of a object?
 

notthinking

New member
@Winterbay
O, why didnt I think to search for a wiki

@slyz
Ok, thats cool was a tad confusing at first :) So essentially cacheing related?

On a different note is there a hook I can use to run the script when freeing the king?
 

Winterbay

Active member
@Winterbay
O, why didnt I think to search for a wiki

@slyz
Ok, thats cool was a tad confusing at first :) So essentially cacheing related?

On a different note is there a hook I can use to run the script when freeing the king?

Well, the problem is that Mafia didn't know about the books being reusable and so removed them. If you had typed "refresh inv" (or cli_execute("refresh inv") if you do it in the script) they would've come back.

Also, no not yet.
 
Top