realRO Posted April 27, 2014 Group: Members Topic Count: 29 Topics Per Day: 0.01 Content Count: 84 Reputation: 0 Joined: 12/24/13 Last Seen: June 13, 2017 Share Posted April 27, 2014 Case: I have a custom box Cannot be opened if you are overweight, 40%++ Cannot be opened if you have no slot on your inventory(because you can put many pet items and not make you overweight) Will have a message or dispbottom saying that "You need to have space on your inventory to open this box" What to put in the item script? Thanks. Quote Link to comment Share on other sites More sharing options...
Capuche Posted April 27, 2014 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted April 27, 2014 Use a function function script F_openmyboxplease { .@item_id = 601;// id box if ( Weight * 100 >= 40 * MaxWeight ) { getitem .@item_id, 1; dispbottom "you are overweight"; end; } getinventorylist; if ( @inventorylist_count >= 100 ) { getitem .@item_id, 1; dispbottom "You need to have space on your inventory to open this box"; end; } getitem 501,1;// item gift return; } Quote Link to comment Share on other sites More sharing options...
Question
realRO
Case:
I have a custom box
What to put in the item script?
Thanks.
Link 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.