ivyblossom: (Default)
ivyblossom ([personal profile] ivyblossom) wrote2002-02-01 03:51 am

Charm code

Draco 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.

Post a comment in response:

(will be screened)
(will be screened if not validated)
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting