Charm code
Feb. 1st, 2002 03:51 amDraco is actually a hacker, so I wrote out his code. This is before Belong 16 starts.
charm:release any from/out of this
key_recognized = 0;
key = (string_utils:bloodprint_rec());
for o in (wizard:contents())
if ($object_utils:isa(o, key))
key_recognized = 1;
break;
endif
endfor
if (!$object_utils:has_property(this, wizard.name))
add_property(this, wizard.name, {}, {Draco Malfoy, "rc"});
endif
sequence = length(this.(wizard.name));
if (sequence == 0)
this.in_use = 0;
wizard:tell("You attempt to unlock the charm.");
this.(wizard.name) = setadd(this.(wizard.name));
suspend(5);
if (key_recognized)
wizard.location:announce($string_utils:pronoun_sub("Smoke begins to drift out of %d as %n calls %i out.");
this:release(wizard);
else
wizard:tell("Nothing happens. You don't have a key for this charm.");
endif
Last edited by Draco Malfoy, 05/05/02
If I post the changed code, it will ruin the suspense.
charm:release any from/out of this
key_recognized = 0;
key = (string_utils:bloodprint_rec());
for o in (wizard:contents())
if ($object_utils:isa(o, key))
key_recognized = 1;
break;
endif
endfor
if (!$object_utils:has_property(this, wizard.name))
add_property(this, wizard.name, {}, {Draco Malfoy, "rc"});
endif
sequence = length(this.(wizard.name));
if (sequence == 0)
this.in_use = 0;
wizard:tell("You attempt to unlock the charm.");
this.(wizard.name) = setadd(this.(wizard.name));
suspend(5);
if (key_recognized)
wizard.location:announce($string_utils:pronoun_sub("Smoke begins to drift out of %d as %n calls %i out.");
this:release(wizard);
else
wizard:tell("Nothing happens. You don't have a key for this charm.");
endif
Last edited by Draco Malfoy, 05/05/02
If I post the changed code, it will ruin the suspense.