18 Oct, 2012, chanukah wrote in the 1st comment:
Votes: 0
Working on some new quest ideas and wanted to make two items, when both worn on different players it would give them their own talk channel. A good example I guess would be marriage code channels on some code bases. Along with trouble writing it out, I'm not sure if it would be easier to change settings in the oedit/olc section for future use, or just code it in as a specific item that I can load obj vnum later and just restring it to something else according to the quest/situation. Still amateur status coder so any help would be much appreciated. It's all c++ working with Diku/rom and dawn code bases.
-chan
18 Oct, 2012, Hades_Kane wrote in the 2nd comment:
Votes: 0
Easiest solution I see? You may consider adding a new item type for this purpose, and then you can do one of two things… you could have it where players could set a frequency on the items (such as radio channel, they could pick a straight up number or perhaps allow a password of sorts to use it to tune to the specific frequency) or, what may be simpler, is anyone holding an item of this type can/will broadcast to anyone holding an identical (by vnum) version of the item.

Either way, you are making a code change to make this possible, and it would only be a smaller amount of work to add a new item type to make this usable more than just once.
18 Oct, 2012, chanukah wrote in the 3rd comment:
Votes: 0
I think identifying it by vnum would be sufficient enough. Yet as good as I am with the knowledge of cpp I lack in creativity. I'm trying also not to change anything in the channels cpp. file also. Drawing a blank, this is where I'm at, still unsure how to make it check the vnum.
//ITEMNAME would be the name of the channel used when the two players were wearing the object (HELD ITEM)//

if ((obj = get_obj_wear(victim, arg1)) != NULL)
{
if ( IS_SET(obj->extra_flags, OBJEXTRA_ITEMNAME ))
{


i=channel_exact_lookup(OBJEXTRA_ITEMNAME);
if(i>-1){
return i;
}
for(i=0; !IS_NULLSTR(channels[i].name); i++){
if(!str_prefix(channel_name, channels[i].name)){
return i;
}

I know it's a mess, I feel like I'm finally stepping out into some creativity here and it's frustrating
0.0/3