Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ SMAUG coding
➜ Anyone finished throw?
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Zeno
USA (2,871 posts) Bio
|
| Date
| Sat 28 Aug 2004 02:56 AM (UTC) |
| Message
|
/* -- working on --
* Syntaxes: throw object (assumed already fighting)
* throw object direction target (all needed args for distance
* throwing)
* throw object (assumed same room throw)
void do_throw( CHAR_DATA *ch, char *argument )
{
ROOM_INDEX_DATA *was_in_room;
CHAR_DATA *victim;
OBJ_DATA *throw_obj;
EXIT_DATA *pexit;
sh_int dir;
sh_int dist;
sh_int max_dist = 3;
char arg[MAX_INPUT_LENGTH];
char arg1[MAX_INPUT_LENGTH];
char arg2[MAX_INPUT_LENGTH];
argument = one_argument( argument, arg );
argument = one_argument( argument, arg1 );
argument = one_argument( argument, arg2 );
for ( throw_obj = ch->last_carrying; throw_obj;
throw_obj = throw_obj=>prev_content )
{
--- if ( can_see_obj( ch, throw_obj )
&& ( throw_obj->wear_loc == WEAR_HELD || throw_obj->wear_loc ==
WEAR_WIELDED || throw_obj->wear_loc == WEAR_DUAL_WIELDED )
&& nifty_is_name( arg, throw_obj->name ) )
break;
----
if ( can_see_obj( ch, throw_obj ) && nifty_is_name( arg, throw_obj->name )
break;
}
if ( !throw_obj )
{
send_to_char( "You aren't holding or wielding anything like that.\n\r", ch );
return;
}
----
if ( ( throw_obj->item_type != ITEM_WEAPON)
{
send_to_char("You can only throw weapons.\n\r", ch );
return;
}
----
if (get_obj_weight( throw_obj ) - ( 3 * (get_curr_str(ch) - 15) ) > 0)
{
send_to_char("That is too heavy for you to throw.\n\r", ch);
if (!number_range(0,10))
learn_from_failure( ch, gsn_throw );
return;
}
if ( ch->fighting )
victim = ch->fighting;
else
{
if ( ( ( victim = get_char_room( ch, arg1 ) ) == NULL )
&& ( arg2[0] == '\0' ) )
{
act( AT_GREY, "Throw $t at whom?", ch, obj->short_descr, NULL,
TO_CHAR );
return;
}
}
}*/
Was wondering if anyone finished this function. Its better than starting my own. Time wise, at least. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | | Top |
|
| Posted by
| Spike
(27 posts) Bio
|
| Date
| Reply #1 on Thu 02 Sep 2004 07:11 AM (UTC) |
| Message
| Ahh...I have a finished version but you wouldnt be able to use it, because it's custom coded for my muds targeting system. That wouldnt be hard at all to finish thou if you really dont want to just port swrs.
Spike | | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
11,017 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top