Welcome to the Builder Academy

Question Skill tan wont load objects

More
20 Nov 2017 22:39 - 20 Nov 2017 22:42 #7133 by JTP
Replied by JTP on topic Skill tan wont load objects
Ok, for a short moment i thought i had it fixed by changing the get_obj_in_list_vis itemname to "corpse" and change the otder of ifs:
Code:
corpse = get_obj_in_list_vis(ch, "corpse", NULL, world[IN_ROOM(ch)].contents); if (!corpse) { send_to_char(ch, "Where did that corpse go?\r\n"); return; } if (!*itemname) { send_to_char(ch, "Tan what?\r\n"); return; } if (!*itemtype) { send_to_char(ch, "I see that, but what do you wanna make?\r\n"); return; }

It worked as long as there was no corpse in the room.

But

if there was both a lets say shield and a corpse

tan shield boots, would turn the corpse into boots. Im sooo lost :/
Last edit: 20 Nov 2017 22:42 by JTP.

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

More
20 Nov 2017 23:49 #7134 by JTP
Replied by JTP on topic Skill tan wont load objects
Ok fixed with new ITEM_ flag, and alittle add on to do_tan....Looks like its done for now...but yea not all corpses should be able to be tanned...have mob races in, so maybe i can use that so undead cant be skinned in make_corpse() ?

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

More
21 Nov 2017 02:26 #7135 by WhiskyTest
Nice work.
Yeah put some conditions into make_corpse so only certain mobs corpses become tannable. Using race for this is a good way to do it.
The following user(s) said Thank You: JTP

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

More
23 Nov 2017 00:14 - 23 Nov 2017 00:15 #7144 by JTP
Replied by JTP on topic Skill tan wont load objects
Ok im trying this:
Code:
if (!(GET_CLASS(vict) == CLASS_NPC_UNDEAD)) SET_BIT_AR(GET_OBJ_EXTRA(corpse), ITEM_TANNABLE); But compiling it says: fight.c: In function ‘raw_kill’: fight.c:209: warning: ‘vict’ is used uninitialized in this function How do i get it to work ?
Last edit: 23 Nov 2017 00:15 by JTP.

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

More
23 Nov 2017 02:18 - 23 Nov 2017 02:19 #7145 by WhiskyTest
Change "vict" to "ch"
Ps: do this in make_corpse() not in raw_kill()
Last edit: 23 Nov 2017 02:19 by WhiskyTest.

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

More
23 Nov 2017 03:56 #7149 by JTP
Replied by JTP on topic Skill tan wont load objects
Wierd because it is under make_corpse hmmmm

Ok changed to ch it compiles and Will test now

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

Time to create page: 0.551 seconds