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
➜ Furniture, Fountains etc.,
Furniture, Fountains etc.,
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Nystix
(19 posts) Bio
|
Date
| Tue 22 Oct 2002 09:51 PM (UTC) |
Message
| How might I go about either adding something which prevents players from getting items? Also, how can I add affects to fountains. (Ex: A Marble fountain contains the level 10 spell 'heal') One last thing, on weapons - besides editing the hard code is there any way to make a weapon randomly cast a spell during battle? Thanks for any help. | Top |
|
Posted by
| Typhon
USA (112 posts) Bio
|
Date
| Reply #1 on Wed 23 Oct 2002 01:17 AM (UTC) |
Message
| if you dont want a mortal picking up an item make sure there is no take flag in the wear location.. if there is a take there anyone can pick uit up if not only an imm can
im not to sure about adding affects to fountains.. you'd probly have to code another item type and in the do_drink function add it in there..
as for weapons casting spells.. thats built into the mud already. every time you weapon hits it casts a spell.. to add a spell to a weapon you have to slookup the spell so you know the spell number then oset weapon affect weaponspell <sn>
enojy
-typ | Top |
|
Posted by
| Nystix
(19 posts) Bio
|
Date
| Reply #2 on Wed 23 Oct 2002 09:00 PM (UTC) |
Message
| Thanks for your help... I should have checked it as a non-immortal. I was aware of weaponspell, but I was wondering if there was a way to cause it to not cast each time it hits? | Top |
|
Posted by
| Chris L
USA (57 posts) Bio
|
Date
| Reply #3 on Thu 24 Oct 2002 10:26 PM (UTC) |
Message
| typhons got most covered but u can add the affects to fountains with a use prog, since drinking from fountain is using it ;)
i.e.
use_prog 100
c heal $n
although im not sure if the objects level carries over for spells, probly not. Also you could make things little more complicated with things like after drinking it drops item(or mob) in a dummy room, and only able to get the spell if the object is in that current room and add a rand prog to occasionally purge the object.. you can manipulate progs a lot, but for random castings from weapon i would assume that would require minimum coding, here snippet i wrote just now for it
--in fight.c
--after
void show_condition args( ( CHAR_DATA *ch, CHAR_DATA *victim ) );
--add
void randweap args( ( CHAR_DATA *ch, CHAR_DATA *victim ) );
void randweap( CHAR_DATA *ch, CHAR_DATA *victim )
{
ch_ret retcode;
SKILLTYPE *skill;
OBJ_DATA *obj;
int sn;
obj = get_eq_char( ch, WEAR_WIELD );
if ( obj != NULL )
{
if ( obj->value[4] != 0 )
{
sn = obj->value[5];
if ( number_range( 1, obj->value[4] ) == 1 )
{
retcode = spell_smaug( sn, ch->level, ch, victim );
if ( retcode != rNONE || char_died(ch) || char_died(victim) )
return retcode;
}
}
}
}
--after
trip(ch, victim);
--add
randweap (ch,victim);
sets so that of a weapon has a value for v4 it will have a 1 through v4 chance of casting spell with sn of v5 on target.. probly wont work, not tested or anything but it may give a idea on how to do it.
or somewhere in fight.c you can add the oprog_fight_trigger( obj ); to use the objects fight prog.. not sure if they are used anywhere else tho.. probly would be easier but im masocistic and stupid
| 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.
15,558 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top