Public feed #603137

Mine

public text v1 · immutable
Raw Edit
·published 2007-07-04 15:38 UTC
rendered paste body
// ****************************************************************************
// *
// * StandState scripts
// * Copyright (c) 2007 AceIndy
// *
// * This file may be distributed under the terms of the Q Public License
// * as defined by Trolltech ASA of Norway and appearing in the file
// * COPYING included in the packaging of this file.
// *
// * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
// *
// *

global STANDSTATE_STAND     = function(npc) {.SetStandState(0);};
global STANDSTATE_SIT       = function(npc) {.SetStandState(1);};
global STANDSTATE_SIT_CHAIR  = function(npc) {.SetStandState(2);};
global STANDSTATE_SLEEP     = function(npc) {.SetStandState(3);};
global STANDSTATE_SIT_LOW_CHAIR = function(npc) {.SetStandState(4);};
global STANDSTATE_SIT_MEDIUM_CHAIR = function(npc) {.SetStandState(5);};
global STANDSTATE_SIT_HIGH_CHAIR = function(npc) {.SetStandState(6);};
global STANDSTATE_DEAD      = function(npc) {.SetStandState(7);};
global STANDSTATE_KNEEL     = function(npc) {.SetStandState(8);};


// RegisterUnitEvents 
index = 0;
CREATURE_EVENT_ON_SPAWN = 6;

_SIT = table(413, 1414, 1415, 1457, 4451, 5738, 8403, 10599, 10600, 10721, 15171, 15367, 16554, 17520,20407);
foreach( keyVar and valVar in _SIT)
{
    .RegisterUnitEvent(valVar, CREATURE_EVENT_ON_SPAWN, STANDSTATE_SIT);   
    index = index + 1;
};

//sitchair = table();

_SLEEP = table(2107, 2486, 2852, 3888, 4052, 4996, 5736, 5915, 7903, 7904, 9999, 10556, 15190, 16971, 17117,17263,17508, 17849, 18812);
foreach( keyVar and valVar in _SLEEP)
{
    .RegisterUnitEvent(valVar, CREATURE_EVENT_ON_SPAWN, STANDSTATE_SLEEP); 
    index = index + 1;
};

//sitlchair = table();
//sitmchair = table();
//sithchair = table();
//dead = table();

_KNEEL = table(3140, 3644, 3650, 5042, 8396, 12427, 12429, 12430, 16546, 16723, 16807, 3140, 3644, 3650, 5042, 8396, 12427, 12429, 12430, 16546, 16723, 16807, 17073, 17515, 17519, 18813, 17515, 17519, 18813);
foreach( keyVar and valVar in _KNEEL)
{
    .RegisterUnitEvent(valVar, CREATURE_EVENT_ON_SPAWN, STANDSTATE_KNEEL);   
    index = index + 1;
};

print( "StandState Registered OnSpawn events for ", index, " NPC");