Welcome to the Builder Academy

Question obj flag

More
08 Dec 2016 21:05 - 08 Dec 2016 21:08 #6384 by JTP
Replied by JTP on topic obj flag
It Works, though it breaks line after 0


Which object extra flag do you want to list?
0-GLOW
1-HUM 2-NO_RENT 3-NO_DONATE 4-NO_INVIS
5-INVISIBLE 6-MAGIC 7-NO_DROP 8-BLESS



Also
Any suggestions to why my olist type, shows all it should, but if i pick olist type followed by the number of one of the new types that i have made, then it says:

Not a valid item type see pic alittle further up in this thread.

Anything i need to do to get olist to show the new types ?
Last edit: 08 Dec 2016 21:08 by JTP.

Please Log in or Create an account to join the conversation.

More
08 Dec 2016 22:17 #6385 by WhiskyTest
Replied by WhiskyTest on topic obj flag
Ah OK.. so you will need to add your new item types into this function:
perform_obj_type_list()

Here is an example:
Code:
/* The 'normal' items - don't provide extra info */ + case ITEM_FISHING_POLE + case ITEM_HERB_TOOL + case all your other custom item types here case ITEM_TREASURE: case ITEM_TRASH: case ITEM_OTHER: case ITEM_WORN: case ITEM_NOTE: case ITEM_PEN: case ITEM_BOAT: case ITEM_KEY: tmp_len = snprintf(buf+len, sizeof(buf)-len,"%s%3d%s) %s[%s%8d%s] %s%s\r\n", QGRN, ++found, QNRM, QCYN, QYEL, ov, QCYN, obj_proto[r_num].short_description, QNRM); break; default: send_to_char(ch, "Not a valid item type"); return;

This will fix that line break at 0:
Code:
for (i = 0; i < NUM_ITEM_FLAGS; i++) { send_to_char(ch, "%s%2d%s-%s%-14s%s", QNRM, i, QNRM, QYEL, extra_bits[i], QNRM); - if (!(i%4)) send_to_char(ch, "\r\n"); + if (!((i+1)%4)) send_to_char(ch, "\r\n");

Please Log in or Create an account to join the conversation.

More
08 Dec 2016 22:30 #6386 by JTP
Replied by JTP on topic obj flag
Thanks alot, much apreciated. Works perfect, nice update to olist.

Please Log in or Create an account to join the conversation.

Time to create page: 0.219 seconds