I'm trying to restrict which weapons players can wield in my MUD by restricting them to only be able to wield weapons in which they have trained their type in.
Here is what i've tried so far which doesnt seem to be working...
The following into the wear_obj function under the ITEM_WIELD case.
Here is what i've tried so far which doesnt seem to be working...
The following into the wear_obj function under the ITEM_WIELD case.
switch ( obj->value[4] )
{
default:
gsn_wep = -1;
break;
case WEP_BAREHAND:
gsn_wep = gsn_pugilism;
break;
case WEP_SWORD:
gsn_wep = gsn_swords;
break;
case WEP_DAGGER:
gsn_wep = gsn_daggers;
break;
case WEP_WHIP:
gsn_wep = gsn_whips;
break;
case WEP_TALON:
gsn_wep = gsn_talonous_arms;
break;
case WEP_MACE:
gsn_wep = gsn_maces_hammers;
break;
case WEP_ARCHERY:
gsn_wep = gsn_archery;
break;
case WEP_BLOWGUN:
gsn_wep = gsn_blowguns;
break;
case WEP_SLING:
gsn_wep = gsn_slings;
break;
case WEP_AXE:
gsn_wep = gsn_axes;
break;
case WEP_SPEAR:
gsn_wep = gsn_spears;
break;
case WEP_STAFF:
gsn_wep = gsn_staves;
break;
}
if( !LEARNED( ch, gsn_wep ) )
{
send_to_char( "You have not trained in this form of weaponry.\r\n", ch );
return;
}