![icon_wink.gif](http://www.purezc.com/forums/public/style_emoticons/default/icon_wink.gif)
CODE
// Stopwatch- Just a simple script that creates a Clock at Link's position when used. 3 uses ONLY.
// Changable Variables:
// ID- This is the Item ID for the item this script is attached to. Please look it up in std.zh. It can't
// be predefined because you might give this script to a different item than I did. Sorry.
import "std.zh"
item script Stopwatch
{
int ScrnItems = 0;
int ModItem = 0;
int Used = 0;
int ID = 0;
void run()
{
if (Used == 0)
{
Screen->CreateItem(4);
ScrnItems = Screen->NumItems();
item ModItem = Screen->LoadItem(ScrnItems);
ModItem->X = Link->X;
ModItem->Y = Link->Y;
Used = 1;
}
else if (Used == 1)
{
Screen->CreateItem(4);
ScrnItems = Screen->NumItems();
item ModItem = Screen->LoadItem(ScrnItems);
ModItem->X = Link->X;
ModItem->Y = Link->Y;
Used = 2;
}
else if (Used == 2)
{
Screen->CreateItem(4);
ScrnItems = Screen->NumItems();
item ModItem = Screen->LoadItem(ScrnItems);
ModItem->X = Link->X;
ModItem->Y = Link->Y;
Used = 0;
Link->Item[ID] = false;
}
}
}
// Changable Variables:
// ID- This is the Item ID for the item this script is attached to. Please look it up in std.zh. It can't
// be predefined because you might give this script to a different item than I did. Sorry.
import "std.zh"
item script Stopwatch
{
int ScrnItems = 0;
int ModItem = 0;
int Used = 0;
int ID = 0;
void run()
{
if (Used == 0)
{
Screen->CreateItem(4);
ScrnItems = Screen->NumItems();
item ModItem = Screen->LoadItem(ScrnItems);
ModItem->X = Link->X;
ModItem->Y = Link->Y;
Used = 1;
}
else if (Used == 1)
{
Screen->CreateItem(4);
ScrnItems = Screen->NumItems();
item ModItem = Screen->LoadItem(ScrnItems);
ModItem->X = Link->X;
ModItem->Y = Link->Y;
Used = 2;
}
else if (Used == 2)
{
Screen->CreateItem(4);
ScrnItems = Screen->NumItems();
item ModItem = Screen->LoadItem(ScrnItems);
ModItem->X = Link->X;
ModItem->Y = Link->Y;
Used = 0;
Link->Item[ID] = false;
}
}
}
Didn't take me that long at all. I only begun it just a few minutes ago, to tell you the truth.
![icon_razz.gif](http://www.purezc.com/forums/public/style_emoticons/default/icon_razz.gif)
![icon_razz.gif](http://www.purezc.com/forums/public/style_emoticons/default/icon_razz.gif)