35 lines
761 B
Plaintext
35 lines
761 B
Plaintext
void main()
|
|
|
|
{
|
|
|
|
object oPC = GetLastUsedBy();
|
|
if (!GetIsPC(oPC)) return;
|
|
|
|
|
|
{
|
|
|
|
if (GetLocalInt(OBJECT_SELF, "BeingUsed")==1)
|
|
{
|
|
FloatingTextStringOnCreature("That is already being used! Wait a moment...", oPC);
|
|
DelayCommand(3.0,SetLocalInt(OBJECT_SELF,"BeingUsed",0));
|
|
}
|
|
else
|
|
{
|
|
object oTarget = OBJECT_SELF;
|
|
SetLocalInt(OBJECT_SELF,"BeingUsed",1);
|
|
|
|
{
|
|
object oNPC = OBJECT_SELF;
|
|
object oTarget = GetWaypointByTag(GetLocalString(oNPC, "WarpDestination1"));
|
|
|
|
AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_GET_MID, 0.0f, 3.0f));
|
|
DelayCommand(3.0, AssignCommand(oPC, JumpToObject(oTarget)));
|
|
oTarget = GetObjectByTag("Hammerings");
|
|
SoundObjectPlay(oTarget);
|
|
oTarget = GetObjectByTag("universalportal1");
|
|
SetLocalInt(oTarget,"BeingUsed",0);
|
|
}
|
|
}
|
|
}
|
|
}
|