Weapon to not a weapon
Weapon to not a weapon
Is it possible to code a weapon that alters to an non weapon object when something is taken out of it and then back again into a weapon when that part is added again? For example, let's say you have a weapon that is also a sheath, if you draw the weapon from this weapon is it possible that the original weapon can turn into a sheath of sorts until the original weapon is reinseted? Would the code allow for that?
Justice is not neccesarily honourable, it is a tolerable business, in essence you tolerate honour until it impedes justice, then you do what is right.
Spelling is not necessarily correct
Spelling is not necessarily correct
-
- Sword Grand Master
- Posts: 4708
- Joined: Tue Jul 15, 2003 9:26 pm
- Location: House of Wonder, Waterdeep
That might be possible to change the type of an object with a program, yes.
For example:
and
For example:
Code: Select all
>intercept_prog draw~
if wear_loc($o) == -1
mpechoat $n You should first wear Y before you can do that.
else
if objval5($o) == 0
mpechoat $n You draw X from your Y.
mpechoaround $n $N draws X from $s Y.
mpoload vnumX
mpgive iX $n
mposet on $n $o type sheath
mposet on $n $o value1 1
(can also change Y's name/description here)
else
mpechoat $n You have already drawn X from your Y!
endif
endif
~
Code: Select all
>intercept_prog sheathe~
if wear_loc($o) == -1
mpechoat You should first hold/wear your Y before you can do that.
else
if actorhasobjnum(X)
if objval5($o) == 1
mpechoat $n You sheathe your X in your Y
mposet on $n $o value5 0
mposet on $n $o type (other type)
mposet on $n $o (can also change name/description here)
mpjunk iX $n
else
mpechoat $n There is already an X in your Y!
endif
else
mpechoat $n You have no X to sheathe in your Y!
endif
endif
~