
/*

Alacn
alacn.uhahaa@gmail.com
http://alacn.dnsalias.org:8080/

*/

#define SCRIPT_VERSION		12
#define NO_COMMANDS			27


#define TOKEN_OFFSET										(1000)

#define TOKEN_IF											( 0+TOKEN_OFFSET)
#define TOKEN_ELSE											( 1+TOKEN_OFFSET)
#define TOKEN_ENDIF											( 2+TOKEN_OFFSET)
#define TOKEN_BEGIN											( 3+TOKEN_OFFSET)
#define TOKEN_END											( 4+TOKEN_OFFSET)
#define TOKEN_EVERY											( 5+TOKEN_OFFSET)
#define TOKEN_DO											( 6+TOKEN_OFFSET)
#define TOKEN_SET											( 7+TOKEN_OFFSET)
#define TOKEN_INCREMENT										( 8+TOKEN_OFFSET)
#define TOKEN_DECREMENT										( 9+TOKEN_OFFSET)
#define TOKEN_EXP_START										(10+TOKEN_OFFSET)
#define TOKEN_EXP_END										(11+TOKEN_OFFSET)
#define TOKEN_GREATER_THAN									(12+TOKEN_OFFSET)
#define TOKEN_LESS_THAN										(13+TOKEN_OFFSET)
#define TOKEN_EQUAL_TO										(14+TOKEN_OFFSET)
#define TOKEN_NOT_EQUAL_TO									(15+TOKEN_OFFSET)
#define TOKEN_GREATER_THAN_EQUAL_TO							(16+TOKEN_OFFSET)
#define TOKEN_LESS_THAN_EQUAL_TO							(17+TOKEN_OFFSET)
#define TOKEN_SCRIPT_END									(19+TOKEN_OFFSET)
#define TOKEN_AND											(20+TOKEN_OFFSET)
#define TOKEN_OR											(21+TOKEN_OFFSET)
#define TOKEN_ON											(22+TOKEN_OFFSET)
#define TOKEN_OFF											(23+TOKEN_OFFSET)
#define TOKEN_COMPUTER_PLAYER								(24+TOKEN_OFFSET)
#define TOKEN_MULTIPLY										(25+TOKEN_OFFSET)
#define TOKEN_DIVIDE										(26+TOKEN_OFFSET)
//#define TOKEN_COMMENT										(27+TOKEN_OFFSET)	// This token is never written
#define SZ_TOKEN_IF											"IF"
#define SZ_TOKEN_ELSE										"ELSE"
#define SZ_TOKEN_ENDIF										"ENDIF"
#define SZ_TOKEN_BEGIN										"{"
#define SZ_TOKEN_END										"}"
#define SZ_TOKEN_EVERY										"EVERY"
#define SZ_TOKEN_DO											"DO"
#define SZ_TOKEN_SET										"SET"
#define SZ_TOKEN_INCREMENT									"INCREMENT"
#define SZ_TOKEN_DECREMENT									"DECREMENT"
//#define SZ_TOKEN_EXP_START								"EXP_START"
//#define SZ_TOKEN_EXP_END									"EXP_END"
#define SZ_TOKEN_GREATER_THAN								">"
#define SZ_TOKEN_LESS_THAN									"<"
#define SZ_TOKEN_EQUAL_TO									"=="
#define SZ_TOKEN_NOT_EQUAL_TO								"!="
#define SZ_TOKEN_GREATER_THAN_EQUAL_TO						">="
#define SZ_TOKEN_LESS_THAN_EQUAL_TO							"<="
#define SZ_TOKEN_SCRIPT_END									"SCRIPT_END"
#define SZ_TOKEN_AND										"&&"
#define SZ_TOKEN_OR											"||"
#define SZ_TOKEN_ON											"ON"
#define SZ_TOKEN_OFF										"OFF"
#define SZ_TOKEN_COMPUTER_PLAYER							"COMPUTER_PLAYER"
#define SZ_TOKEN_MULTIPLY									"MULTIPLY"
#define SZ_TOKEN_DIVIDE										"DIVIDE"
//#define SZ_TOKEN_COMMENT									"COMMENT"

// 1 parameter - TOKEN_ON or TOKEN_OFF

// need state tokens in same order as state defines
#define TOKEN_CONSTRUCT_BUILDING							( 1+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_FETCH_WOOD									( 2+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SHAMAN_GET_WILDS								( 3+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_HOUSE_A_PERSON								( 4+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SEND_GHOSTS									( 5+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_BRING_NEW_PEOPLE_BACK							( 6+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_TRAIN_PEOPLE									( 7+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_POPULATE_DRUM_TOWER							( 8+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_DEFEND										( 9+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_DEFEND_BASE									(10+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SPELL_DEFENCE									(11+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_PREACH										(12+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_BUILD_WALLS									(13+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SABOTAGE										(14+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SPELL_OFFENSIVE								(15+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_FIREWARRIOR_DEFEND							(16+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_BUILD_VEHICLE									(17+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_FETCH_LOST_PEOPLE								(18+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_FETCH_LOST_VEHICLE							(19+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_FETCH_FAR_VEHICLE								(20+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_AUTO_ATTACK									(21+NO_COMMANDS+TOKEN_OFFSET)
#define SZ_TOKEN_CONSTRUCT_BUILDING							"STATE_CONSTRUCT_BUILDING"
#define SZ_TOKEN_FETCH_WOOD									"STATE_FETCH_WOOD"
#define SZ_TOKEN_SHAMAN_GET_WILDS							"STATE_SHAMAN_GET_WILDS"
#define SZ_TOKEN_HOUSE_A_PERSON								"STATE_HOUSE_A_PERSON"
#define SZ_TOKEN_SEND_GHOSTS								"STATE_SEND_GHOSTS"
#define SZ_TOKEN_BRING_NEW_PEOPLE_BACK						"STATE_STATE_BRING_NEW_PEOPLE_BACK"
#define SZ_TOKEN_TRAIN_PEOPLE								"STATE_TRAIN_PEOPLE"
#define SZ_TOKEN_POPULATE_DRUM_TOWER						"STATE_POPULATE_DRUM_TOWER"
#define SZ_TOKEN_DEFEND										"STATE_DEFEND"
#define SZ_TOKEN_DEFEND_BASE								"STATE_DEFEND_BASE"
#define SZ_TOKEN_SPELL_DEFENCE								"STATE_SPELL_DEFENCE"
#define SZ_TOKEN_PREACH										"STATE_PREACH"
#define SZ_TOKEN_BUILD_WALLS								"STATE_BUILD_WALLS"
#define SZ_TOKEN_SABOTAGE									"STATE_SABOTAGE"
#define SZ_TOKEN_SPELL_OFFENSIVE							"STATE_SPELL_OFFENSIVE"
#define SZ_TOKEN_FIREWARRIOR_DEFEND							"STATE_FIREWARRIOR_DEFEND"
#define SZ_TOKEN_BUILD_VEHICLE								"STATE_BUILD_VEHICLE"
#define SZ_TOKEN_FETCH_LOST_PEOPLE							"STATE_FETCH_LOST_PEOPLE"
#define SZ_TOKEN_FETCH_LOST_VEHICLE							"STATE_FETCH_LOST_VEHICLE"
#define SZ_TOKEN_FETCH_FAR_VEHICLE							"STATE_FETCH_FAR_VEHICLE"
#define SZ_TOKEN_AUTO_ATTACK								"STATE_AUTO_ATTACK"

#define TOKEN_SHAMAN_DEFEND									(22+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_FLATTEN_BASE									(23+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_BUILD_OUTER_DEFENCES							(24+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SPARE5										(25+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SPARE6										(26+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SPARE7										(27+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SPARE8										(28+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SPARE9										(29+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SPARE10										(30+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_COUNT_WILD									(31+NO_COMMANDS+TOKEN_OFFSET)
#define SZ_TOKEN_SHAMAN_DEFEND								"STATE_SHAMAN_DEFEND"
#define SZ_TOKEN_FLATTEN_BASE								"STATE_FLATTEN_BASE"
#define SZ_TOKEN_BUILD_OUTER_DEFENCES						"STATE_BUILD_OUTER_DEFENCES"
#define SZ_TOKEN_SPARE5										"SPARE5"
#define SZ_TOKEN_SPARE6										"SPARE6"
#define SZ_TOKEN_SPARE7										"SPARE7"
#define SZ_TOKEN_SPARE8										"SPARE8"
#define SZ_TOKEN_SPARE9										"SPARE9"
#define SZ_TOKEN_SPARE10									"SPARE10"
#define SZ_TOKEN_COUNT_WILD									"COUNT_WILD"

#define TOKEN_ATTACK										(32+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_ATTACK_BLUE									(33+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_ATTACK_RED									(34+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_ATTACK_YELLOW									(35+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_ATTACK_GREEN									(36+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SPELL_ATTACK									(37+NO_COMMANDS+TOKEN_OFFSET)
#define SZ_TOKEN_ATTACK										"ATTACK"
#define SZ_TOKEN_ATTACK_BLUE								"ATTACK_BLUE"
#define SZ_TOKEN_ATTACK_RED									"ATTACK_RED"
#define SZ_TOKEN_ATTACK_YELLOW								"ATTACK_YELLOW"
#define SZ_TOKEN_ATTACK_GREEN								"ATTACK_GREEN"
#define SZ_TOKEN_SPELL_ATTACK								"SPELL_ATTACK"

#define TOKEN_RESET_BASE_MARKER								(38+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SET_BASE_MARKER								(39+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SET_BASE_RADIUS								(40+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_COUNT_PEOPLE_IN_MARKER						(41+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SET_DRUM_TOWER_POS							(42+NO_COMMANDS+TOKEN_OFFSET)
#define SZ_TOKEN_RESET_BASE_MARKER							"RESET_BASE_MARKER"
#define SZ_TOKEN_SET_BASE_MARKER							"SET_BASE_MARKER"
#define SZ_TOKEN_SET_BASE_RADIUS							"SET_BASE_RADIUS"
#define SZ_TOKEN_COUNT_PEOPLE_IN_MARKER						"COUNT_PEOPLE_IN_MARKER"
#define SZ_TOKEN_SET_DRUM_TOWER_POS							"SET_DRUM_TOWER_POS"

#define TOKEN_ATTACK_MARKER									(43+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_ATTACK_BUILDING								(44+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_ATTACK_PERSON									(45+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_CONVERT_AT_MARKER								(46+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_PREACH_AT_MARKER								(47+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SEND_GHOST_PEOPLE								(48+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_GET_SPELLS_CAST								(49+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_GET_NUM_ONE_OFF_SPELLS						(50+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_ATTACK_NORMAL									(51+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_ATTACK_BY_BOAT								(52+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_ATTACK_BY_BALLOON								(53+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SET_ATTACK_VARIABLE							(54+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_BUILD_DRUM_TOWER								(55+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_GUARD_AT_MARKER								(56+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_GUARD_BETWEEN_MARKERS							(57+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_GET_HEIGHT_AT_POS								(58+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SEND_ALL_PEOPLE_TO_MARKER						(59+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_GUARD_NORMAL									(60+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_GUARD_WITH_GHOSTS								(61+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_RESET_CONVERT_MARKER							(62+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SET_CONVERT_MARKER							(63+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SET_MARKER_ENTRY								(64+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_MARKER_ENTRIES								(65+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_CLEAR_GUARDING_FROM							(66+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SET_BUILDING_DIRECTION						(67+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_TRAIN_PEOPLE_NOW								(68+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_PRAY_AT_HEAD									(69+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_PUT_PERSON_IN_DT								(70+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_I_HAVE_ONE_SHOT								(71+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SPELL_TYPE									(72+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_BUILDING_TYPE									(73+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_BOAT_PATROL									(74+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_DEFEND_SHAMEN									(75+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SEND_SHAMEN_DEFENDERS_HOME					(76+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_BOAT_TYPE										(77+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_BALLOON_TYPE									(78+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_IS_BUILDING_NEAR								(79+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_BUILD_AT										(80+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SET_SPELL_ENTRY								(81+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_DELAY_MAIN_DRUM_TOWER							(82+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_BUILD_MAIN_DRUM_TOWER							(83+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_ZOOM_TO										(84+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_DISABLE_USER_INPUTS							(85+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_ENABLE_USER_INPUTS							(86+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_OPEN_DIALOG									(87+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_GIVE_ONE_SHOT									(88+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_CLEAR_STANDING_PEOPLE							(89+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_ONLY_STAND_AT_MARKERS							(90+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_BLUE											(91+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_RED											(92+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_YELLOW										(93+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_GREEN											(94+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_NAV_CHECK										(95+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_TARGET_S_WARRIORS								(96+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_DONT_TARGET_S_WARRIORS						(97+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_TARGET_BLUE_SHAMAN							(98+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_DONT_TARGET_BLUE_SHAMAN						(99+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_TARGET_BLUE_DRUM_TOWERS						(100+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_DONT_TARGET_BLUE_DRUM_TOWERS					(101+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_HAS_BLUE_KILLED_A_GHOST						(102+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_COUNT_GUARD_FIRES								(103+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_GET_HEAD_TRIGGER_COUNT						(104+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_MOVE_SHAMAN_TO_MARKER							(105+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_TRACK_SHAMAN_TO_ANGLE							(106+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_TRACK_SHAMAN_EXTRA_BOLLOCKS					(107+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_IS_SHAMAN_AVAILABLE_FOR_ATTACK				(108+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_PARTIAL_BUILDING_COUNT						(109+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SEND_BLUE_PEOPLE_TO_MARKER					(110+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_GIVE_MANA_TO_PLAYER							(111+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_IS_PLAYER_IN_WORLD_VIEW						(112+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SET_AUTO_BUILD								(113+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_DESELECT_ALL_BLUE_PEOPLE						(114+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_FLASH_BUTTON									(115+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_TURN_PANEL_ON									(116+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_GIVE_PLAYER_SPELL								(117+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_HAS_PLAYER_BEEN_IN_ENCYC						(118+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_IS_BLUE_SHAMAN_SELECTED						(119+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_CLEAR_SHAMAN_LEFT_CLICK						(120+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_CLEAR_SHAMAN_RIGHT_CLICK						(121+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_IS_SHAMAN_ICON_LEFT_CLICKED					(122+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_IS_SHAMAN_ICON_RIGHT_CLICKED					(123+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_TRIGGER_THING									(124+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_TRACK_TO_MARKER								(125+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_CAMERA_ROTATION								(126+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_STOP_CAMERA_ROTATION							(127+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_COUNT_BLUE_SHAPES								(128+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_COUNT_BLUE_IN_HOUSES							(129+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_HAS_HOUSE_INFO_BEEN_SHOWN						(130+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_CLEAR_HOUSE_INFO_FLAG							(131+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SET_AUTO_HOUSE								(132+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_COUNT_BLUE_WITH_BUILD_COMMAND					(133+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_DONT_HOUSE_SPECIALISTS						(134+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_TARGET_PLAYER_DT_AND_S						(135+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_REMOVE_PLAYER_THING							(136+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SET_REINCARNATION								(137+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_EXTRA_WOOD_COLLECTION							(138+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SET_WOOD_COLLECTION_RADII						(139+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_GET_NUM_PEOPLE_CONVERTED						(140+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_GET_NUM_PEOPLE_BEING_PREACHED					(141+NO_COMMANDS+TOKEN_OFFSET)
#define SZ_TOKEN_ATTACK_MARKER								"ATTACK_MARKER"
#define SZ_TOKEN_ATTACK_BUILDING							"ATTACK_BUILDING"
#define SZ_TOKEN_ATTACK_PERSON								"ATTACK_PERSON"
#define SZ_TOKEN_CONVERT_AT_MARKER							"CONVERT_AT_MARKER"
#define SZ_TOKEN_PREACH_AT_MARKER							"PREACH_AT_MARKER"
#define SZ_TOKEN_SEND_GHOST_PEOPLE							"SEND_GHOST_PEOPLE"
#define SZ_TOKEN_GET_SPELLS_CAST							"GET_SPELLS_CAST"
#define SZ_TOKEN_GET_NUM_ONE_OFF_SPELLS						"GET_NUM_ONE_OFF_SPELLS"
#define SZ_TOKEN_ATTACK_NORMAL								"ATTACK_NORMAL"
#define SZ_TOKEN_ATTACK_BY_BOAT								"ATTACK_BY_BOAT"
#define SZ_TOKEN_ATTACK_BY_BALLOON							"ATTACK_BY_BALLOON"
#define SZ_TOKEN_SET_ATTACK_VARIABLE						"SET_ATTACK_VARIABLE"
#define SZ_TOKEN_BUILD_DRUM_TOWER							"BUILD_DRUM_TOWER"
#define SZ_TOKEN_GUARD_AT_MARKER							"GUARD_AT_MARKER"
#define SZ_TOKEN_GUARD_BETWEEN_MARKERS						"GUARD_BETWEEN_MARKERS"
#define SZ_TOKEN_GET_HEIGHT_AT_POS							"GET_HEIGHT_AT_POS"
#define SZ_TOKEN_SEND_ALL_PEOPLE_TO_MARKER					"SEND_ALL_PEOPLE_TO_MARKER"
#define SZ_TOKEN_GUARD_NORMAL								"GUARD_NORMAL"
#define SZ_TOKEN_GUARD_WITH_GHOSTS							"GUARD_WITH_GHOSTS"
#define SZ_TOKEN_RESET_CONVERT_MARKER						"RESET_CONVERT_MARKER"
#define SZ_TOKEN_SET_CONVERT_MARKER							"SET_CONVERT_MARKER"
#define SZ_TOKEN_SET_MARKER_ENTRY							"SET_MARKER_ENTRY"
#define SZ_TOKEN_MARKER_ENTRIES								"MARKER_ENTRIES"
#define SZ_TOKEN_CLEAR_GUARDING_FROM						"CLEAR_GUARDING_FROM"
#define SZ_TOKEN_SET_BUILDING_DIRECTION						"SET_BUILDING_DIRECTION"
#define SZ_TOKEN_TRAIN_PEOPLE_NOW							"TRAIN_PEOPLE_NOW"
#define SZ_TOKEN_PRAY_AT_HEAD								"PRAY_AT_HEAD"
#define SZ_TOKEN_PUT_PERSON_IN_DT							"PUT_PERSON_IN_DT"
#define SZ_TOKEN_I_HAVE_ONE_SHOT							"I_HAVE_ONE_SHOT"
#define SZ_TOKEN_SPELL_TYPE									"SPELL_TYPE"
#define SZ_TOKEN_BUILDING_TYPE								"BUILDING_TYPE"
#define SZ_TOKEN_BOAT_PATROL								"VEHICLE_PATROL"
#define SZ_TOKEN_DEFEND_SHAMEN								"DEFEND_SHAMEN"
#define SZ_TOKEN_SEND_SHAMEN_DEFENDERS_HOME					"SEND_SHAMEN_DEFENDERS_HOME"
#define SZ_TOKEN_BOAT_TYPE									"BOAT_TYPE"
#define SZ_TOKEN_BALLOON_TYPE								"BALLOON_TYPE"
#define SZ_TOKEN_IS_BUILDING_NEAR							"IS_BUILDING_NEAR"
#define SZ_TOKEN_BUILD_AT									"BUILD_AT"
#define SZ_TOKEN_SET_SPELL_ENTRY							"SET_SPELL_ENTRY"
#define SZ_TOKEN_DELAY_MAIN_DRUM_TOWER						"DELAY_MAIN_DRUM_TOWER"
#define SZ_TOKEN_BUILD_MAIN_DRUM_TOWER						"BUILD_MAIN_DRUM_TOWER"
#define SZ_TOKEN_ZOOM_TO									"ZOOM_TO"
#define SZ_TOKEN_DISABLE_USER_INPUTS						"DISABLE_USER_INPUTS"
#define SZ_TOKEN_ENABLE_USER_INPUTS							"ENABLE_USER_INPUTS"
#define SZ_TOKEN_OPEN_DIALOG								"OPEN_DIALOG"
#define SZ_TOKEN_GIVE_ONE_SHOT								"GIVE_ONE_SHOT"
#define SZ_TOKEN_CLEAR_STANDING_PEOPLE						"CLEAR_STANDING_PEOPLE"
#define SZ_TOKEN_ONLY_STAND_AT_MARKERS						"ONLY_STAND_AT_MARKERS"
#define SZ_TOKEN_BLUE										"BLUE"
#define SZ_TOKEN_RED										"RED"
#define SZ_TOKEN_YELLOW										"YELLOW"
#define SZ_TOKEN_GREEN										"GREEN"
#define SZ_TOKEN_NAV_CHECK									"NAV_CHECK"
#define SZ_TOKEN_TARGET_S_WARRIORS							"TARGET_FIREWARRIORS"
#define SZ_TOKEN_DONT_TARGET_S_WARRIORS						"DONT_TARGET_FIREWARRIORS"
#define SZ_TOKEN_TARGET_BLUE_SHAMAN							"TARGET_BLUE_SHAMAN"
#define SZ_TOKEN_DONT_TARGET_BLUE_SHAMAN					"DONT_TARGET_BLUE_SHAMAN"
#define SZ_TOKEN_TARGET_BLUE_DRUM_TOWERS					"TARGET_BLUE_DRUM_TOWERS"
#define SZ_TOKEN_DONT_TARGET_BLUE_DRUM_TOWERS				"DONT_TARGET_BLUE_DRUM_TOWERS"
#define SZ_TOKEN_HAS_BLUE_KILLED_A_GHOST					"HAS_BLUE_KILLED_A_GHOST"
#define SZ_TOKEN_COUNT_GUARD_FIRES							"COUNT_GUARD_FIRES"
#define SZ_TOKEN_GET_HEAD_TRIGGER_COUNT						"GET_HEAD_TRIGGER_COUNT"
#define SZ_TOKEN_MOVE_SHAMAN_TO_MARKER						"MOVE_SHAMAN_TO_MARKER"
#define SZ_TOKEN_TRACK_SHAMAN_TO_ANGLE						"TRACK_SHAMAN_TO_ANGLE"
#define SZ_TOKEN_TRACK_SHAMAN_EXTRA_BOLLOCKS				"TRACK_SHAMAN_EXTRA_BOLLOCKS"
#define SZ_TOKEN_IS_SHAMAN_AVAILABLE_FOR_ATTACK				"IS_SHAMAN_AVAILABLE_FOR_ATTACK"
#define SZ_TOKEN_PARTIAL_BUILDING_COUNT						"PARTIAL_BUILDING_COUNT"
#define SZ_TOKEN_SEND_BLUE_PEOPLE_TO_MARKER					"SEND_BLUE_PEOPLE_TO_MARKER"
#define SZ_TOKEN_GIVE_MANA_TO_PLAYER						"GIVE_MANA_TO_PLAYER"
#define SZ_TOKEN_IS_PLAYER_IN_WORLD_VIEW					"IS_PLAYER_IN_WORLD_VIEW"
#define SZ_TOKEN_SET_AUTO_BUILD								"SET_AUTO_BUILD"
#define SZ_TOKEN_DESELECT_ALL_BLUE_PEOPLE					"DESELECT_ALL_BLUE_PEOPLE"
#define SZ_TOKEN_FLASH_BUTTON								"FLASH_BUTTON"
#define SZ_TOKEN_TURN_PANEL_ON								"TURN_PANEL_ON"
#define SZ_TOKEN_GIVE_PLAYER_SPELL							"GIVE_PLAYER_SPELL"
#define SZ_TOKEN_HAS_PLAYER_BEEN_IN_ENCYC					"HAS_PLAYER_BEEN_IN_ENCYC"
#define SZ_TOKEN_IS_BLUE_SHAMAN_SELECTED					"IS_BLUE_SHAMAN_SELECTED"
#define SZ_TOKEN_CLEAR_SHAMAN_LEFT_CLICK					"CLEAR_SHAMAN_LEFT_CLICK"
#define SZ_TOKEN_CLEAR_SHAMAN_RIGHT_CLICK					"CLEAR_SHAMAN_RIGHT_CLICK"
#define SZ_TOKEN_IS_SHAMAN_ICON_LEFT_CLICKED				"IS_SHAMAN_ICON_LEFT_CLICKED"
#define SZ_TOKEN_IS_SHAMAN_ICON_RIGHT_CLICKED				"IS_SHAMAN_ICON_RIGHT_CLICKED"
#define SZ_TOKEN_TRIGGER_THING								"TRIGGER_THING"
#define SZ_TOKEN_TRACK_TO_MARKER							"TRACK_TO_MARKER"
#define SZ_TOKEN_CAMERA_ROTATION							"CAMERA_ROTATION"
#define SZ_TOKEN_STOP_CAMERA_ROTATION						"STOP_CAMERA_ROTATION"
#define SZ_TOKEN_COUNT_BLUE_SHAPES							"COUNT_BLUE_SHAPES"
#define SZ_TOKEN_COUNT_BLUE_IN_HOUSES						"COUNT_BLUE_IN_HOUSES"
#define SZ_TOKEN_HAS_HOUSE_INFO_BEEN_SHOWN					"HAS_HOUSE_INFO_BEEN_SHOWN"
#define SZ_TOKEN_CLEAR_HOUSE_INFO_FLAG						"CLEAR_HOUSE_INFO_FLAG"
#define SZ_TOKEN_SET_AUTO_HOUSE								"SET_AUTO_HOUSE"
#define SZ_TOKEN_COUNT_BLUE_WITH_BUILD_COMMAND				"COUNT_BLUE_WITH_BUILD_COMMAND"
#define SZ_TOKEN_DONT_HOUSE_SPECIALISTS						"DONT_HOUSE_SPECIALISTS"
#define SZ_TOKEN_TARGET_PLAYER_DT_AND_S						"TARGET_PLAYER_DT_AND_S"
#define SZ_TOKEN_REMOVE_PLAYER_THING						"REMOVE_PLAYER_THING"
#define SZ_TOKEN_SET_REINCARNATION							"SET_REINCARNATION"
#define SZ_TOKEN_EXTRA_WOOD_COLLECTION						"EXTRA_WOOD_COLLECTION"
#define SZ_TOKEN_SET_WOOD_COLLECTION_RADII					"SET_WOOD_COLLECTION_RADII"
#define SZ_TOKEN_GET_NUM_PEOPLE_CONVERTED					"GET_NUM_PEOPLE_CONVERTED"
#define SZ_TOKEN_GET_NUM_PEOPLE_BEING_PREACHED				"GET_NUM_PEOPLE_BEING_PREACHED"

#define TOKEN_TRIGGER_LEVEL_LOST							(142+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_TRIGGER_LEVEL_WON								(143+NO_COMMANDS+TOKEN_OFFSET)
#define SZ_TOKEN_TRIGGER_LEVEL_LOST							"TRIGGER_LEVEL_LOST"
#define SZ_TOKEN_TRIGGER_LEVEL_WON							"TRIGGER_LEVEL_WON"



#define CONSTANT_VAL										(0)
#define USER_VAL											(1)
#define INTERNAL_VAL										(2)

#define ID_TYPE_ULONG										(0)
#define ID_TYPE_SLONG										(1)
#define ID_TYPE_UWORD										(2)
#define ID_TYPE_SWORD										(3)
#define ID_TYPE_UBYTE										(4)
#define ID_TYPE_SBYTE										(5)
#define ID_TYPE_DUMMY										(99)



#define INT_GAME_TURN										(0)
#define INT_MY_NUM_PEOPLE									(1)		// uses next 4 slots
#define INT_BLUE_PEOPLE										(2)
#define INT_RED_PEOPLE										(3)
#define INT_YELLOW_PEOPLE									(4)
#define INT_GREEN_PEOPLE									(5)
#define INT_MY_NUM_KILLED_BY_HUMAN							(6)		// uses next 3 slots
#define INT_RED_KILLED_BY_HUMAN								(7)
#define INT_YELLOW_KILLED_BY_HUMAN							(8)
#define INT_GREEN_KILLED_BY_HUMAN							(9)
#define INT_WILD_PEOPLE										(10)
#define INT_BLUE_MANA										(11)
#define INT_RED_MANA										(12)
#define INT_YELLOW_MANA										(13)
#define INT_GREEN_MANA										(14)
#define SZ_INT_GAME_TURN									"INT_GAME_TURN"
#define SZ_INT_MY_NUM_PEOPLE								"INT_MY_NUM_PEOPLE"
#define SZ_INT_BLUE_PEOPLE									"INT_BLUE_PEOPLE"
#define SZ_INT_RED_PEOPLE									"INT_RED_PEOPLE"
#define SZ_INT_YELLOW_PEOPLE								"INT_YELLOW_PEOPLE"
#define SZ_INT_GREEN_PEOPLE									"INT_GREEN_PEOPLE"
#define SZ_INT_MY_NUM_KILLED_BY_HUMAN						"INT_MY_NUM_KILLED_BY_HUMAN"
#define SZ_INT_RED_KILLED_BY_HUMAN							"INT_RED_KILLED_BY_HUMAN"
#define SZ_INT_YELLOW_KILLED_BY_HUMAN						"INT_YELLOW_KILLED_BY_HUMAN"
#define SZ_INT_GREEN_KILLED_BY_HUMAN						"INT_GREEN_KILLED_BY_HUMAN"
#define SZ_INT_WILD_PEOPLE									"INT_WILD_PEOPLE"
#define SZ_INT_BLUE_MANA									"INT_BLUE_MANA"
#define SZ_INT_RED_MANA										"INT_RED_MANA"
#define SZ_INT_YELLOW_MANA									"INT_YELLOW_MANA"
#define SZ_INT_GREEN_MANA									"INT_GREEN_MANA"





#define		MAX_INT_OFFSET										(1000)

#define INT_ATTR_EXPANSION									(0+MAX_INT_OFFSET)
#define INT_ATTR_PREF_SPY_TRAINS							(1+MAX_INT_OFFSET)
#define INT_ATTR_PREF_RELIGIOUS_TRAINS						(2+MAX_INT_OFFSET)
#define INT_ATTR_PREF_WARRIOR_TRAINS						(3+MAX_INT_OFFSET)
#define INT_ATTR_PREF_FIREWARRIOR_TRAINS					(4+MAX_INT_OFFSET)
#define INT_ATTR_PREF_SPY_PEOPLE							(5+MAX_INT_OFFSET)
#define INT_ATTR_PREF_RELIGIOUS_PEOPLE						(6+MAX_INT_OFFSET)
#define INT_ATTR_PREF_WARRIOR_PEOPLE						(7+MAX_INT_OFFSET)
#define INT_ATTR_PREF_FIREWARRIOR_PEOPLE					(8+MAX_INT_OFFSET)
#define INT_ATTR_MAX_BUILDINGS_ON_GO						(9+MAX_INT_OFFSET)
#define INT_ATTR_HOUSE_PERCENTAGE							(10+MAX_INT_OFFSET)
#define INT_ATTR_AWAY_BRAVE									(11+MAX_INT_OFFSET)
#define INT_ATTR_AWAY_WARRIOR								(12+MAX_INT_OFFSET)
#define INT_ATTR_AWAY_RELIGIOUS								(13+MAX_INT_OFFSET)
#define INT_ATTR_DEFENSE_RAD_INCR							(14+MAX_INT_OFFSET)
#define INT_ATTR_MAX_DEFENSIVE_ACTIONS						(15+MAX_INT_OFFSET)
#define INT_ATTR_AWAY_SPY									(16+MAX_INT_OFFSET)
#define INT_ATTR_AWAY_FIREWARRIOR							(17+MAX_INT_OFFSET)
#define INT_ATTR_ATTACK_PERCENTAGE							(18+MAX_INT_OFFSET)
#define INT_ATTR_AWAY_SHAMAN								(19+MAX_INT_OFFSET)
#define INT_ATTR_PEOPLE_PER_BOAT							(20+MAX_INT_OFFSET)
#define INT_ATTR_PEOPLE_PER_BALLOON							(21+MAX_INT_OFFSET)
#define INT_ATTR_DONT_USE_BOATS								(22+MAX_INT_OFFSET)
#define INT_ATTR_MAX_SPY_ATTACKS							(23+MAX_INT_OFFSET)
#define INT_ATTR_ENEMY_SPY_MAX_STAND						(24+MAX_INT_OFFSET)
#define INT_ATTR_MAX_ATTACKS								(25+MAX_INT_OFFSET)
#define INT_ATTR_EMPTY_AT_WAYPOINT							(26+MAX_INT_OFFSET)
#define INT_ATTR_SPY_CHECK_FREQUENCY						(27+MAX_INT_OFFSET)
#define INT_ATTR_RETREAT_VALUE								(28+MAX_INT_OFFSET)
#define INT_ATTR_BASE_UNDER_ATTACK_RETREAT					(29+MAX_INT_OFFSET)
#define INT_ATTR_RANDOM_BUILD_SIDE							(30+MAX_INT_OFFSET)
#define INT_ATTR_USE_PREACHER_FOR_DEFENCE					(31+MAX_INT_OFFSET)
#define INT_ATTR_SHAMEN_BLAST								(32+MAX_INT_OFFSET)
#define INT_ATTR_MAX_TRAIN_AT_ONCE							(33+MAX_INT_OFFSET)
#define INT_ATTR_GROUP_OPTION								(34+MAX_INT_OFFSET)
#define INT_ATTR_PREF_BOAT_HUTS								(35+MAX_INT_OFFSET)
#define INT_ATTR_PREF_BALLOON_HUTS							(36+MAX_INT_OFFSET)
#define INT_ATTR_PREF_BOAT_DRIVERS							(37+MAX_INT_OFFSET)
#define INT_ATTR_PREF_BALLOON_DRIVERS						(38+MAX_INT_OFFSET)
#define INT_ATTR_FIGHT_STOP_DISTANCE						(39+MAX_INT_OFFSET)
#define INT_ATTR_SPY_DISCOVER_CHANCE						(40+MAX_INT_OFFSET)
#define INT_ATTR_COUNT_PREACH_DAMAGE						(41+MAX_INT_OFFSET)
#define INT_ATTR_DONT_GROUP_AT_DT							(42+MAX_INT_OFFSET)
#define INT_ATTR_SPELL_DELAY								(43+MAX_INT_OFFSET)
#define INT_ATTR_DONT_DELETE_USELESS_BOAT_HOUSE				(44+MAX_INT_OFFSET)
#define INT_ATTR_BOAT_HOUSE_BROKEN							(45+MAX_INT_OFFSET)
#define INT_ATTR_DONT_AUTO_TRAIN_PREACHERS					(46+MAX_INT_OFFSET)
#define INT_ATTR_SPARE_6									(47+MAX_INT_OFFSET)
#define SZ_INT_ATTR_EXPANSION								"INT_ATTR_EXPANSION"
#define SZ_INT_ATTR_PREF_SPY_TRAINS							"INT_ATTR_PREF_SPY_TRAINS"
#define SZ_INT_ATTR_PREF_RELIGIOUS_TRAINS					"INT_ATTR_PREF_RELIGIOUS_TRAINS"
#define SZ_INT_ATTR_PREF_WARRIOR_TRAINS						"INT_ATTR_PREF_WARRIOR_TRAINS"
#define SZ_INT_ATTR_PREF_FIREWARRIOR_TRAINS					"INT_ATTR_PREF_FIREWARRIOR_TRAINS"
#define SZ_INT_ATTR_PREF_SPY_PEOPLE							"INT_ATTR_PREF_SPY_PEOPLE"
#define SZ_INT_ATTR_PREF_RELIGIOUS_PEOPLE					"INT_ATTR_PREF_RELIGIOUS_PEOPLE"
#define SZ_INT_ATTR_PREF_WARRIOR_PEOPLE						"INT_ATTR_PREF_WARRIOR_PEOPLE"
#define SZ_INT_ATTR_PREF_FIREWARRIOR_PEOPLE					"INT_ATTR_PREF_FIREWARRIOR_PEOPLE"
#define SZ_INT_ATTR_MAX_BUILDINGS_ON_GO						"INT_ATTR_MAX_BUILDINGS_ON_GO"
#define SZ_INT_ATTR_HOUSE_PERCENTAGE						"INT_ATTR_HOUSE_PERCENTAGE"
#define SZ_INT_ATTR_AWAY_BRAVE								"INT_ATTR_AWAY_BRAVE"
#define SZ_INT_ATTR_AWAY_WARRIOR							"INT_ATTR_AWAY_WARRIOR"
#define SZ_INT_ATTR_AWAY_RELIGIOUS							"INT_ATTR_AWAY_RELIGIOUS"
#define SZ_INT_ATTR_DEFENSE_RAD_INCR						"INT_ATTR_DEFENSE_RAD_INCR"
#define SZ_INT_ATTR_MAX_DEFENSIVE_ACTIONS					"INT_ATTR_MAX_DEFENSIVE_ACTIONS"
#define SZ_INT_ATTR_AWAY_SPY								"INT_ATTR_AWAY_SPY"
#define SZ_INT_ATTR_AWAY_FIREWARRIOR						"INT_ATTR_AWAY_FIREWARRIOR"
#define SZ_INT_ATTR_ATTACK_PERCENTAGE						"INT_ATTR_ATTACK_PERCENTAGE"
#define SZ_INT_ATTR_AWAY_SHAMAN								"INT_ATTR_AWAY_SHAMAN"
#define SZ_INT_ATTR_PEOPLE_PER_BOAT							"INT_ATTR_PEOPLE_PER_BOAT"
#define SZ_INT_ATTR_PEOPLE_PER_BALLOON						"INT_ATTR_PEOPLE_PER_BALLOON"
#define SZ_INT_ATTR_DONT_USE_BOATS							"INT_ATTR_DONT_USE_BOATS"
#define SZ_INT_ATTR_MAX_SPY_ATTACKS							"INT_ATTR_MAX_SPY_ATTACKS"
#define SZ_INT_ATTR_ENEMY_SPY_MAX_STAND						"INT_ATTR_ENEMY_SPY_MAX_STAND"
#define SZ_INT_ATTR_MAX_ATTACKS								"INT_ATTR_MAX_ATTACKS"
#define SZ_INT_ATTR_EMPTY_AT_WAYPOINT						"INT_ATTR_EMPTY_AT_WAYPOINT"
#define SZ_INT_ATTR_SPY_CHECK_FREQUENCY						"INT_ATTR_SPY_CHECK_FREQUENCY"
#define SZ_INT_ATTR_RETREAT_VALUE							"INT_ATTR_RETREAT_VALUE"
#define SZ_INT_ATTR_BASE_UNDER_ATTACK_RETREAT				"INT_ATTR_BASE_UNDER_ATTACK_RETREAT"
#define SZ_INT_ATTR_RANDOM_BUILD_SIDE						"INT_ATTR_RANDOM_BUILD_SIDE"
#define SZ_INT_ATTR_USE_PREACHER_FOR_DEFENCE				"INT_ATTR_USE_PREACHER_FOR_DEFENCE"
#define SZ_INT_ATTR_SHAMEN_BLAST							"INT_ATTR_SHAMEN_BLAST"
#define SZ_INT_ATTR_MAX_TRAIN_AT_ONCE						"INT_ATTR_MAX_TRAIN_AT_ONCE"
#define SZ_INT_ATTR_GROUP_OPTION							"INT_ATTR_GROUP_OPTION"
#define SZ_INT_ATTR_PREF_BOAT_HUTS							"INT_ATTR_PREF_BOAT_HUTS"
#define SZ_INT_ATTR_PREF_BALLOON_HUTS						"INT_ATTR_PREF_BALLOON_HUTS"
#define SZ_INT_ATTR_PREF_BOAT_DRIVERS						"INT_ATTR_PREF_BOAT_DRIVERS"
#define SZ_INT_ATTR_PREF_BALLOON_DRIVERS					"INT_ATTR_PREF_BALLOON_DRIVERS"
#define SZ_INT_ATTR_FIGHT_STOP_DISTANCE						"INT_ATTR_FIGHT_STOP_DISTANCE"
#define SZ_INT_ATTR_SPY_DISCOVER_CHANCE						"INT_ATTR_SPY_DISCOVER_CHANCE"
#define SZ_INT_ATTR_COUNT_PREACH_DAMAGE						"INT_ATTR_COUNT_PREACH_DAMAGE"
#define SZ_INT_ATTR_DONT_GROUP_AT_DT						"INT_ATTR_DONT_GROUP_AT_DT"
#define SZ_INT_ATTR_SPELL_DELAY								"INT_ATTR_SPELL_DELAY"
#define SZ_INT_ATTR_DONT_DELETE_USELESS_BOAT_HOUSE			"INT_ATTR_DONT_DELETE_USELESS_BOAT_HOUSE"
#define SZ_INT_ATTR_BOAT_HOUSE_BROKEN						"INT_ATTR_BOAT_HOUSE_BROKEN"
#define SZ_INT_ATTR_DONT_AUTO_TRAIN_PREACHERS				"INT_ATTR_DONT_AUTO_TRAIN_PREACHERS"
#define SZ_INT_ATTR_SPARE_6									"INT_ATTR_SPARE"

#define INT_MY_MANA											(48+MAX_INT_OFFSET)
#define SZ_INT_MY_MANA										"INT_MY_MANA"

#define INT_M_SPELL_BURN_COST								(49+MAX_INT_OFFSET)
#define INT_M_SPELL_BLAST_COST								(50+MAX_INT_OFFSET)
#define INT_M_SPELL_LIGHTNING_BOLT_COST						(51+MAX_INT_OFFSET)
#define INT_M_SPELL_WHIRLWIND_COST							(52+MAX_INT_OFFSET)
#define INT_M_SPELL_INSECT_PLAGUE_COST						(53+MAX_INT_OFFSET)
#define INT_M_SPELL_INVISIBILITY_COST						(54+MAX_INT_OFFSET)
#define INT_M_SPELL_HYPNOTISM_COST							(55+MAX_INT_OFFSET)
#define INT_M_SPELL_FIRESTORM_COST							(56+MAX_INT_OFFSET)
#define INT_M_SPELL_GHOST_ARMY_COST							(57+MAX_INT_OFFSET)
#define INT_M_SPELL_EROSION_COST							(58+MAX_INT_OFFSET)
#define INT_M_SPELL_SWAMP_COST								(59+MAX_INT_OFFSET)
#define INT_M_SPELL_LAND_BRIDGE_COST						(60+MAX_INT_OFFSET)
#define INT_M_SPELL_ANGEL_OF_DEATH_COST						(61+MAX_INT_OFFSET)
#define INT_M_SPELL_EARTHQUAKE_COST							(62+MAX_INT_OFFSET)
#define INT_M_SPELL_FLATTEN_COST							(63+MAX_INT_OFFSET)
#define INT_M_SPELL_VOLCANO_COST							(64+MAX_INT_OFFSET)
#define INT_M_SPELL_WRATH_OF_GOD_COST						(65+MAX_INT_OFFSET)
#define SZ_INT_M_SPELL_BURN_COST							"INT_M_SPELL_BURN_COST"
#define SZ_INT_M_SPELL_BLAST_COST							"INT_M_SPELL_BLAST_COST"
#define SZ_INT_M_SPELL_LIGHTNING_BOLT_COST					"INT_M_SPELL_LIGHTNING_COST"
#define SZ_INT_M_SPELL_WHIRLWIND_COST						"INT_M_SPELL_TORNADO_COST"
#define SZ_INT_M_SPELL_INSECT_PLAGUE_COST					"INT_M_SPELL_SWARM_COST"
#define SZ_INT_M_SPELL_INVISIBILITY_COST					"INT_M_SPELL_INVISIBILITY_COST"
#define SZ_INT_M_SPELL_HYPNOTISM_COST						"INT_M_SPELL_HYPNOTISM_COST"
#define SZ_INT_M_SPELL_FIRESTORM_COST						"INT_M_SPELL_FIRESTORM_COST"
#define SZ_INT_M_SPELL_GHOST_ARMY_COST						"INT_M_SPELL_GHOST_ARMY_COST"
#define SZ_INT_M_SPELL_EROSION_COST							"INT_M_SPELL_EROSION_COST"
#define SZ_INT_M_SPELL_SWAMP_COST							"INT_M_SPELL_SWAMP_COST"
#define SZ_INT_M_SPELL_LAND_BRIDGE_COST						"INT_M_SPELL_LAND_BRIDGE_COST"
#define SZ_INT_M_SPELL_ANGEL_OF_DEATH_COST					"INT_M_SPELL_ANGEL_OF_DEATH_COST"
#define SZ_INT_M_SPELL_EARTHQUAKE_COST						"INT_M_SPELL_EARTHQUAKE_COST"
#define SZ_INT_M_SPELL_FLATTEN_COST							"INT_M_SPELL_FLATTEN_COST"
#define SZ_INT_M_SPELL_VOLCANO_COST							"INT_M_SPELL_VOLCANO_COST"
#define SZ_INT_M_SPELL_WRATH_OF_GOD_COST					"INT_M_SPELL_WRATH_OF_GOD_COST"

#define INT_M_BUILDING_TEPEE								(66+MAX_INT_OFFSET)
#define INT_M_BUILDING_HUT									(67+MAX_INT_OFFSET)
#define INT_M_BUILDING_FARM									(68+MAX_INT_OFFSET)
#define INT_M_BUILDING_DRUM_TOWER							(69+MAX_INT_OFFSET)
#define INT_M_BUILDING_TEMPLE								(70+MAX_INT_OFFSET)
#define INT_M_BUILDING_SPY_TRAIN							(71+MAX_INT_OFFSET)
#define INT_M_BUILDING_WARRIOR_TRAIN						(72+MAX_INT_OFFSET)
#define INT_M_BUILDING_FIREWARRIOR_TRAIN					(73+MAX_INT_OFFSET)
#define INT_M_BUILDING_RECONVERSION							(74+MAX_INT_OFFSET)
#define INT_M_BUILDING_WALL_PIECE							(75+MAX_INT_OFFSET)
#define INT_M_BUILDING_GATE									(76+MAX_INT_OFFSET)
#define INT_M_BUILDING_CURR_OE_SLOT							(77+MAX_INT_OFFSET)
#define INT_M_BUILDING_BOAT_HUT_1							(78+MAX_INT_OFFSET)
#define INT_M_BUILDING_BOAT_HUT_2							(79+MAX_INT_OFFSET)
#define INT_M_BUILDING_AIRSHIP_HUT_1						(80+MAX_INT_OFFSET)
#define INT_M_BUILDING_AIRSHIP_HUT_2						(81+MAX_INT_OFFSET)
#define SZ_INT_M_BUILDING_TEPEE								"INT_M_BUILDING_SMALL_HUT"
#define SZ_INT_M_BUILDING_HUT								"INT_M_BUILDING_MEDIUM_HUT"
#define SZ_INT_M_BUILDING_FARM								"INT_M_BUILDING_LARGE_HUT"
#define SZ_INT_M_BUILDING_DRUM_TOWER						"INT_M_BUILDING_DRUM_TOWER"
#define SZ_INT_M_BUILDING_TEMPLE							"INT_M_BUILDING_TEMPLE"
#define SZ_INT_M_BUILDING_SPY_TRAIN							"INT_M_BUILDING_SPY_TRAIN"
#define SZ_INT_M_BUILDING_WARRIOR_TRAIN						"INT_M_BUILDING_WARRIOR_TRAIN"
#define SZ_INT_M_BUILDING_FIREWARRIOR_TRAIN					"INT_M_BUILDING_FIREWARRIOR_TRAIN"
#define SZ_INT_M_BUILDING_RECONVERSION						"INT_M_BUILDING_RECONVERSION"
#define SZ_INT_M_BUILDING_WALL_PIECE						"INT_M_BUILDING_WALL_PIECE"
#define SZ_INT_M_BUILDING_GATE								"INT_M_BUILDING_GATE"
#define SZ_INT_M_BUILDING_CURR_OE_SLOT						"INT_M_BUILDING_CURR_OE_SLOT"
#define SZ_INT_M_BUILDING_BOAT_HUT_1						"INT_M_BUILDING_BOAT_HUT"
#define SZ_INT_M_BUILDING_BOAT_HUT_2						"INT_M_BUILDING_BOAT_HUT_2"
#define SZ_INT_M_BUILDING_AIRSHIP_HUT_1						"INT_M_BUILDING_AIRSHIP_HUT"
#define SZ_INT_M_BUILDING_AIRSHIP_HUT_2						"INT_M_BUILDING_AIRSHIP_HUT_2"

#define INT_B_BUILDING_TEPEE								(82+MAX_INT_OFFSET)
#define INT_B_BUILDING_HUT									(83+MAX_INT_OFFSET)
#define INT_B_BUILDING_FARM									(84+MAX_INT_OFFSET)
#define INT_B_BUILDING_DRUM_TOWER							(85+MAX_INT_OFFSET)
#define INT_B_BUILDING_TEMPLE								(86+MAX_INT_OFFSET)
#define INT_B_BUILDING_SPY_TRAIN							(87+MAX_INT_OFFSET)
#define INT_B_BUILDING_WARRIOR_TRAIN						(88+MAX_INT_OFFSET)
#define INT_B_BUILDING_FIREWARRIOR_TRAIN					(89+MAX_INT_OFFSET)
#define INT_B_BUILDING_RECONVERSION							(90+MAX_INT_OFFSET)
#define INT_B_BUILDING_WALL_PIECE							(91+MAX_INT_OFFSET)
#define INT_B_BUILDING_GATE									(92+MAX_INT_OFFSET)
#define INT_B_BUILDING_CURR_OE_SLOT							(93+MAX_INT_OFFSET)
#define INT_B_BUILDING_BOAT_HUT_1							(94+MAX_INT_OFFSET)
#define INT_B_BUILDING_BOAT_HUT_2							(95+MAX_INT_OFFSET)
#define INT_B_BUILDING_AIRSHIP_HUT_1						(96+MAX_INT_OFFSET)
#define INT_B_BUILDING_AIRSHIP_HUT_2						(97+MAX_INT_OFFSET)
#define SZ_INT_B_BUILDING_TEPEE								"INT_B_BUILDING_SMALL_HUT"
#define SZ_INT_B_BUILDING_HUT								"INT_B_BUILDING_MEDIUM_HUT"
#define SZ_INT_B_BUILDING_FARM								"INT_B_BUILDING_LARGE_HUT"
#define SZ_INT_B_BUILDING_DRUM_TOWER						"INT_B_BUILDING_DRUM_TOWER"
#define SZ_INT_B_BUILDING_TEMPLE							"INT_B_BUILDING_TEMPLE"
#define SZ_INT_B_BUILDING_SPY_TRAIN							"INT_B_BUILDING_SPY_TRAIN"
#define SZ_INT_B_BUILDING_WARRIOR_TRAIN						"INT_B_BUILDING_WARRIOR_TRAIN"
#define SZ_INT_B_BUILDING_FIREWARRIOR_TRAIN					"INT_B_BUILDING_FIREWARRIOR_TRAIN"
#define SZ_INT_B_BUILDING_RECONVERSION						"INT_B_BUILDING_RECONVERSION"
#define SZ_INT_B_BUILDING_WALL_PIECE						"INT_B_BUILDING_WALL_PIECE"
#define SZ_INT_B_BUILDING_GATE								"INT_B_BUILDING_GATE"
#define SZ_INT_B_BUILDING_CURR_OE_SLOT						"INT_B_BUILDING_CURR_OE_SLOT"
#define SZ_INT_B_BUILDING_BOAT_HUT_1						"INT_B_BUILDING_BOAT_HUT"
#define SZ_INT_B_BUILDING_BOAT_HUT_2						"INT_B_BUILDING_BOAT_HUT_2"
#define SZ_INT_B_BUILDING_AIRSHIP_HUT_1						"INT_B_BUILDING_AIRSHIP_HUT"
#define SZ_INT_B_BUILDING_AIRSHIP_HUT_2						"INT_B_BUILDING_AIRSHIP_HUT_2"

#define INT_R_BUILDING_TEPEE								(98+MAX_INT_OFFSET)
#define INT_R_BUILDING_HUT									(99+MAX_INT_OFFSET)
#define INT_R_BUILDING_FARM									(100+MAX_INT_OFFSET)
#define INT_R_BUILDING_DRUM_TOWER							(101+MAX_INT_OFFSET)
#define INT_R_BUILDING_TEMPLE								(102+MAX_INT_OFFSET)
#define INT_R_BUILDING_SPY_TRAIN							(103+MAX_INT_OFFSET)
#define INT_R_BUILDING_WARRIOR_TRAIN						(104+MAX_INT_OFFSET)
#define INT_R_BUILDING_FIREWARRIOR_TRAIN					(105+MAX_INT_OFFSET)
#define INT_R_BUILDING_RECONVERSION							(106+MAX_INT_OFFSET)
#define INT_R_BUILDING_WALL_PIECE							(107+MAX_INT_OFFSET)
#define INT_R_BUILDING_GATE									(108+MAX_INT_OFFSET)
#define INT_R_BUILDING_CURR_OE_SLOT							(109+MAX_INT_OFFSET)
#define INT_R_BUILDING_BOAT_HUT_1							(110+MAX_INT_OFFSET)
#define INT_R_BUILDING_BOAT_HUT_2							(111+MAX_INT_OFFSET)
#define INT_R_BUILDING_AIRSHIP_HUT_1						(112+MAX_INT_OFFSET)
#define INT_R_BUILDING_AIRSHIP_HUT_2						(113+MAX_INT_OFFSET)
#define SZ_INT_R_BUILDING_TEPEE								"INT_R_BUILDING_SMALL_HUT"
#define SZ_INT_R_BUILDING_HUT								"INT_R_BUILDING_MEDIUM_HUT"
#define SZ_INT_R_BUILDING_FARM								"INT_R_BUILDING_LARGE_HUT"
#define SZ_INT_R_BUILDING_DRUM_TOWER						"INT_R_BUILDING_DRUM_TOWER"
#define SZ_INT_R_BUILDING_TEMPLE							"INT_R_BUILDING_TEMPLE"
#define SZ_INT_R_BUILDING_SPY_TRAIN							"INT_R_BUILDING_SPY_TRAIN"
#define SZ_INT_R_BUILDING_WARRIOR_TRAIN						"INT_R_BUILDING_WARRIOR_TRAIN"
#define SZ_INT_R_BUILDING_FIREWARRIOR_TRAIN					"INT_R_BUILDING_FIREWARRIOR_TRAIN"
#define SZ_INT_R_BUILDING_RECONVERSION						"INT_R_BUILDING_RECONVERSION"
#define SZ_INT_R_BUILDING_WALL_PIECE						"INT_M_BUILDING_WALL_PIECE"
#define SZ_INT_R_BUILDING_GATE								"INT_R_BUILDING_GATE"
#define SZ_INT_R_BUILDING_CURR_OE_SLOT						"INT_R_BUILDING_CURR_OE_SLOT"
#define SZ_INT_R_BUILDING_BOAT_HUT_1						"INT_R_BUILDING_BOAT_HUT"
#define SZ_INT_R_BUILDING_BOAT_HUT_2						"INT_R_BUILDING_BOAT_HUT_2"
#define SZ_INT_R_BUILDING_AIRSHIP_HUT_1						"INT_R_BUILDING_AIRSHIP_HUT"
#define SZ_INT_R_BUILDING_AIRSHIP_HUT_2						"INT_R_BUILDING_AIRSHIP_HUT_2"

#define INT_Y_BUILDING_TEPEE								(114+MAX_INT_OFFSET)
#define INT_Y_BUILDING_HUT									(115+MAX_INT_OFFSET)
#define INT_Y_BUILDING_FARM									(116+MAX_INT_OFFSET)
#define INT_Y_BUILDING_DRUM_TOWER							(117+MAX_INT_OFFSET)
#define INT_Y_BUILDING_TEMPLE								(118+MAX_INT_OFFSET)
#define INT_Y_BUILDING_SPY_TRAIN							(119+MAX_INT_OFFSET)
#define INT_Y_BUILDING_WARRIOR_TRAIN						(120+MAX_INT_OFFSET)
#define INT_Y_BUILDING_FIREWARRIOR_TRAIN					(121+MAX_INT_OFFSET)
#define INT_Y_BUILDING_RECONVERSION							(122+MAX_INT_OFFSET)
#define INT_Y_BUILDING_WALL_PIECE							(123+MAX_INT_OFFSET)
#define INT_Y_BUILDING_GATE									(124+MAX_INT_OFFSET)
#define INT_Y_BUILDING_CURR_OE_SLOT							(125+MAX_INT_OFFSET)
#define INT_Y_BUILDING_BOAT_HUT_1							(126+MAX_INT_OFFSET)
#define INT_Y_BUILDING_BOAT_HUT_2							(127+MAX_INT_OFFSET)
#define INT_Y_BUILDING_AIRSHIP_HUT_1						(128+MAX_INT_OFFSET)
#define INT_Y_BUILDING_AIRSHIP_HUT_2						(129+MAX_INT_OFFSET)
#define SZ_INT_Y_BUILDING_TEPEE								"INT_Y_BUILDING_SMALL_HUT"
#define SZ_INT_Y_BUILDING_HUT								"INT_Y_BUILDING_MEDIUM_HUT"
#define SZ_INT_Y_BUILDING_FARM								"INT_Y_BUILDING_LARGE_HUT"
#define SZ_INT_Y_BUILDING_DRUM_TOWER						"INT_Y_BUILDING_DRUM_TOWER"
#define SZ_INT_Y_BUILDING_TEMPLE							"INT_Y_BUILDING_TEMPLE"
#define SZ_INT_Y_BUILDING_SPY_TRAIN							"INT_Y_BUILDING_SPY_TRAIN"
#define SZ_INT_Y_BUILDING_WARRIOR_TRAIN						"INT_Y_BUILDING_WARRIOR_TRAIN"
#define SZ_INT_Y_BUILDING_FIREWARRIOR_TRAIN					"INT_Y_BUILDING_FIREWARRIOR_TRAIN"
#define SZ_INT_Y_BUILDING_RECONVERSION						"INT_Y_BUILDING_RECONVERSION"
#define SZ_INT_Y_BUILDING_WALL_PIECE						"INT_Y_BUILDING_WALL_PIECE"
#define SZ_INT_Y_BUILDING_GATE								"INT_Y_BUILDING_GATE"
#define SZ_INT_Y_BUILDING_CURR_OE_SLOT						"INT_Y_BUILDING_CURR_OE_SLOT"
#define SZ_INT_Y_BUILDING_BOAT_HUT_1						"INT_Y_BUILDING_BOAT_HUT"
#define SZ_INT_Y_BUILDING_BOAT_HUT_2						"INT_Y_BUILDING_BOAT_HUT_2"
#define SZ_INT_Y_BUILDING_AIRSHIP_HUT_1						"INT_Y_BUILDING_AIRSHIP_HUT"
#define SZ_INT_Y_BUILDING_AIRSHIP_HUT_2						"INT_Y_BUILDING_AIRSHIP_HUT_2"

#define INT_G_BUILDING_TEPEE								(130+MAX_INT_OFFSET)
#define INT_G_BUILDING_HUT									(131+MAX_INT_OFFSET)
#define INT_G_BUILDING_FARM									(132+MAX_INT_OFFSET)
#define INT_G_BUILDING_DRUM_TOWER							(133+MAX_INT_OFFSET)
#define INT_G_BUILDING_TEMPLE								(134+MAX_INT_OFFSET)
#define INT_G_BUILDING_SPY_TRAIN							(135+MAX_INT_OFFSET)
#define INT_G_BUILDING_WARRIOR_TRAIN						(136+MAX_INT_OFFSET)
#define INT_G_BUILDING_FIREWARRIOR_TRAIN					(137+MAX_INT_OFFSET)
#define INT_G_BUILDING_RECONVERSION							(138+MAX_INT_OFFSET)
#define INT_G_BUILDING_WALL_PIECE							(139+MAX_INT_OFFSET)
#define INT_G_BUILDING_GATE									(140+MAX_INT_OFFSET)
#define INT_G_BUILDING_CURR_OE_SLOT							(141+MAX_INT_OFFSET)
#define INT_G_BUILDING_BOAT_HUT_1							(142+MAX_INT_OFFSET)
#define INT_G_BUILDING_BOAT_HUT_2							(143+MAX_INT_OFFSET)
#define INT_G_BUILDING_AIRSHIP_HUT_1						(144+MAX_INT_OFFSET)
#define INT_G_BUILDING_AIRSHIP_HUT_2						(145+MAX_INT_OFFSET)
#define SZ_INT_G_BUILDING_TEPEE								"INT_G_BUILDING_SMALL_HUT"
#define SZ_INT_G_BUILDING_HUT								"INT_G_BUILDING_MEDIUM_HUT"
#define SZ_INT_G_BUILDING_FARM								"INT_G_BUILDING_LARGE_HUT"
#define SZ_INT_G_BUILDING_DRUM_TOWER						"INT_G_BUILDING_DRUM_TOWER"
#define SZ_INT_G_BUILDING_TEMPLE							"INT_G_BUILDING_TEMPLE"
#define SZ_INT_G_BUILDING_SPY_TRAIN							"INT_G_BUILDING_SPY_TRAIN"
#define SZ_INT_G_BUILDING_WARRIOR_TRAIN						"INT_G_BUILDING_WARRIOR_TRAIN"
#define SZ_INT_G_BUILDING_FIREWARRIOR_TRAIN					"INT_G_BUILDING_FIREWARRIOR_TRAIN"
#define SZ_INT_G_BUILDING_RECONVERSION						"INT_G_BUILDING_RECONVERSION"
#define SZ_INT_G_BUILDING_WALL_PIECE						"INT_G_BUILDING_WALL_PIECE"
#define SZ_INT_G_BUILDING_GATE								"INT_G_BUILDING_GATE"
#define SZ_INT_G_BUILDING_CURR_OE_SLOT						"INT_G_BUILDING_CURR_OE_SLOT"
#define SZ_INT_G_BUILDING_BOAT_HUT_1						"INT_G_BUILDING_BOAT_HUT"
#define SZ_INT_G_BUILDING_BOAT_HUT_2						"INT_G_BUILDING_BOAT_HUT_2"
#define SZ_INT_G_BUILDING_AIRSHIP_HUT_1						"INT_G_BUILDING_AIRSHIP_HUT"
#define SZ_INT_G_BUILDING_AIRSHIP_HUT_2						"INT_G_BUILDING_AIRSHIP_HUT_2"


#define INT_M_PERSON_BRAVE									(146+MAX_INT_OFFSET)
#define INT_M_PERSON_WARRIOR								(147+MAX_INT_OFFSET)
#define INT_M_PERSON_RELIGIOUS								(148+MAX_INT_OFFSET)
#define INT_M_PERSON_SPY									(149+MAX_INT_OFFSET)
#define INT_M_PERSON_FIREWARRIOR							(150+MAX_INT_OFFSET)
#define INT_M_PERSON_SHAMAN									(151+MAX_INT_OFFSET)
#define SZ_INT_M_PERSON_BRAVE								"INT_M_PERSON_BRAVE"
#define SZ_INT_M_PERSON_WARRIOR								"INT_M_PERSON_WARRIOR"
#define SZ_INT_M_PERSON_RELIGIOUS							"INT_M_PERSON_RELIGIOUS"
#define SZ_INT_M_PERSON_SPY									"INT_M_PERSON_SPY"
#define SZ_INT_M_PERSON_FIREWARRIOR							"INT_M_PERSON_FIREWARRIOR"
#define SZ_INT_M_PERSON_SHAMAN								"INT_M_PERSON_SHAMAN"

#define INT_B_PERSON_BRAVE									(152+MAX_INT_OFFSET)
#define INT_B_PERSON_WARRIOR								(153+MAX_INT_OFFSET)
#define INT_B_PERSON_RELIGIOUS								(154+MAX_INT_OFFSET)
#define INT_B_PERSON_SPY									(155+MAX_INT_OFFSET)
#define INT_B_PERSON_FIREWARRIOR							(156+MAX_INT_OFFSET)
#define INT_B_PERSON_SHAMAN									(157+MAX_INT_OFFSET)
#define SZ_INT_B_PERSON_BRAVE								"INT_B_PERSON_BRAVE"
#define SZ_INT_B_PERSON_WARRIOR								"INT_B_PERSON_WARRIOR"
#define SZ_INT_B_PERSON_RELIGIOUS							"INT_B_PERSON_RELIGIOUS"
#define SZ_INT_B_PERSON_SPY									"INT_B_PERSON_SPY"
#define SZ_INT_B_PERSON_FIREWARRIOR							"INT_B_PERSON_FIREWARRIOR"
#define SZ_INT_B_PERSON_SHAMAN								"INT_B_PERSON_SHAMAN"

#define INT_R_PERSON_BRAVE									(158+MAX_INT_OFFSET)
#define INT_R_PERSON_WARRIOR								(159+MAX_INT_OFFSET)
#define INT_R_PERSON_RELIGIOUS								(160+MAX_INT_OFFSET)
#define INT_R_PERSON_SPY									(161+MAX_INT_OFFSET)
#define INT_R_PERSON_FIREWARRIOR							(162+MAX_INT_OFFSET)
#define INT_R_PERSON_SHAMAN									(163+MAX_INT_OFFSET)
#define SZ_INT_R_PERSON_BRAVE								"INT_R_PERSON_BRAVE"
#define SZ_INT_R_PERSON_WARRIOR								"INT_R_PERSON_WARRIOR"
#define SZ_INT_R_PERSON_RELIGIOUS							"INT_R_PERSON_RELIGIOUS"
#define SZ_INT_R_PERSON_SPY									"INT_R_PERSON_SPY"
#define SZ_INT_R_PERSON_FIREWARRIOR							"INT_R_PERSON_FIREWARRIOR"
#define SZ_INT_R_PERSON_SHAMAN								"INT_R_PERSON_SHAMAN"

#define INT_Y_PERSON_BRAVE									(164+MAX_INT_OFFSET)
#define INT_Y_PERSON_WARRIOR								(165+MAX_INT_OFFSET)
#define INT_Y_PERSON_RELIGIOUS								(166+MAX_INT_OFFSET)
#define INT_Y_PERSON_SPY									(167+MAX_INT_OFFSET)
#define INT_Y_PERSON_FIREWARRIOR							(168+MAX_INT_OFFSET)
#define INT_Y_PERSON_SHAMAN									(169+MAX_INT_OFFSET)
#define SZ_INT_Y_PERSON_BRAVE								"INT_Y_PERSON_BRAVE"
#define SZ_INT_Y_PERSON_WARRIOR								"INT_Y_PERSON_WARRIOR"
#define SZ_INT_Y_PERSON_RELIGIOUS							"INT_Y_PERSON_RELIGIOUS"
#define SZ_INT_Y_PERSON_SPY									"INT_Y_PERSON_SPY"
#define SZ_INT_Y_PERSON_FIREWARRIOR							"INT_Y_PERSON_FIREWARRIOR"
#define SZ_INT_Y_PERSON_SHAMAN								"INT_Y_PERSON_SHAMAN"

#define INT_G_PERSON_BRAVE									(170+MAX_INT_OFFSET)
#define INT_G_PERSON_WARRIOR								(171+MAX_INT_OFFSET)
#define INT_G_PERSON_RELIGIOUS								(172+MAX_INT_OFFSET)
#define INT_G_PERSON_SPY									(173+MAX_INT_OFFSET)
#define INT_G_PERSON_FIREWARRIOR							(174+MAX_INT_OFFSET)
#define INT_G_PERSON_SHAMAN									(175+MAX_INT_OFFSET)
#define SZ_INT_G_PERSON_BRAVE								"INT_G_PERSON_BRAVE"
#define SZ_INT_G_PERSON_WARRIOR								"INT_G_PERSON_WARRIOR"
#define SZ_INT_G_PERSON_RELIGIOUS							"INT_G_PERSON_RELIGIOUS"
#define SZ_INT_G_PERSON_SPY									"INT_G_PERSON_SPY"
#define SZ_INT_G_PERSON_FIREWARRIOR							"INT_G_PERSON_FIREWARRIOR"
#define SZ_INT_G_PERSON_SHAMAN								"INT_G_PERSON_SHAMAN"

#define INT_BLUE_KILLED_BY_ME								(176+MAX_INT_OFFSET)
#define INT_RED_KILLED_BY_ME								(177+MAX_INT_OFFSET)
#define INT_YELLOW_KILLED_BY_ME								(178+MAX_INT_OFFSET)
#define INT_GREEN_KILLED_BY_ME								(179+MAX_INT_OFFSET)
#define SZ_INT_BLUE_KILLED_BY_ME							"INT_BLUE_KILLED_BY_ME"
#define SZ_INT_RED_KILLED_BY_ME								"INT_RED_KILLED_BY_ME"
#define SZ_INT_YELLOW_KILLED_BY_ME							"INT_YELLOW_KILLED_BY_ME"
#define SZ_INT_GREEN_KILLED_BY_ME							"INT_GREEN_KILLED_BY_ME"

#define INT_MY_NUM_KILLED_BY_BLUE							(180+MAX_INT_OFFSET)
#define INT_MY_NUM_KILLED_BY_RED							(181+MAX_INT_OFFSET)
#define INT_MY_NUM_KILLED_BY_YELLOW							(182+MAX_INT_OFFSET)
#define INT_MY_NUM_KILLED_BY_GREEN							(183+MAX_INT_OFFSET)
#define SZ_INT_MY_NUM_KILLED_BY_BLUE						"INT_MY_NUM_KILLED_BY_BLUE"
#define SZ_INT_MY_NUM_KILLED_BY_RED							"INT_MY_NUM_KILLED_BY_RED"
#define SZ_INT_MY_NUM_KILLED_BY_YELLOW						"INT_MY_NUM_KILLED_BY_YELLOW"
#define SZ_INT_MY_NUM_KILLED_BY_GREEN						"INT_MY_NUM_KILLED_BY_GREEN"

#define INT_BURN											(184+MAX_INT_OFFSET)
#define INT_BLAST											(185+MAX_INT_OFFSET)
#define INT_LIGHTNING_BOLT									(186+MAX_INT_OFFSET)
#define INT_WHIRLWIND										(187+MAX_INT_OFFSET)
#define INT_INSECT_PLAGUE									(188+MAX_INT_OFFSET)
#define INT_INVISIBILITY									(189+MAX_INT_OFFSET)
#define INT_HYPNOTISM										(190+MAX_INT_OFFSET)
#define INT_FIRESTORM										(191+MAX_INT_OFFSET)
#define INT_GHOST_ARMY										(192+MAX_INT_OFFSET)
#define INT_EROSION											(193+MAX_INT_OFFSET)
#define INT_SWAMP											(194+MAX_INT_OFFSET)
#define INT_LAND_BRIDGE										(195+MAX_INT_OFFSET)
#define INT_ANGEL_OF_DEATH									(196+MAX_INT_OFFSET)
#define INT_EARTHQUAKE										(197+MAX_INT_OFFSET)
#define INT_FLATTEN											(198+MAX_INT_OFFSET)
#define INT_VOLCANO											(199+MAX_INT_OFFSET)
#define INT_WRATH_OF_GOD									(200+MAX_INT_OFFSET)
#define SZ_INT_BURN											"INT_BURN"
#define SZ_INT_BLAST										"INT_BLAST"
#define SZ_INT_LIGHTNING_BOLT								"INT_LIGHTNING"
#define SZ_INT_WHIRLWIND									"INT_TORNADO"
#define SZ_INT_INSECT_PLAGUE								"INT_SWARM"
#define SZ_INT_INVISIBILITY									"INT_INVISIBILITY"
#define SZ_INT_HYPNOTISM									"INT_HYPNOTISM"
#define SZ_INT_FIRESTORM									"INT_FIRESTORM"
#define SZ_INT_GHOST_ARMY									"INT_GHOST_ARMY"
#define SZ_INT_EROSION										"INT_EROSION"
#define SZ_INT_SWAMP										"INT_SWAMP"
#define SZ_INT_LAND_BRIDGE									"INT_LAND_BRIDGE"
#define SZ_INT_ANGEL_OF_DEATH								"INT_ANGEL_OF_DEATH"
#define SZ_INT_EARTHQUAKE									"INT_EARTHQUAKE"
#define SZ_INT_FLATTEN										"INT_FLATTEN"
#define SZ_INT_VOLCANO										"INT_VOLCANO"
#define SZ_INT_WRATH_OF_GOD									"INT_WRATH_OF_GOD"

#define INT_BRAVE											(201+MAX_INT_OFFSET)
#define INT_WARRIOR											(202+MAX_INT_OFFSET)
#define INT_RELIGIOUS										(203+MAX_INT_OFFSET)
#define INT_SPY												(204+MAX_INT_OFFSET)
#define INT_FIREWARRIOR										(205+MAX_INT_OFFSET)
#define INT_SHAMAN											(206+MAX_INT_OFFSET)
#define SZ_INT_BRAVE										"INT_BRAVE"
#define SZ_INT_WARRIOR										"INT_WARRIOR"
#define SZ_INT_RELIGIOUS									"INT_RELIGIOUS"
#define SZ_INT_SPY											"INT_SPY"
#define SZ_INT_FIREWARRIOR									"INT_FIREWARRIOR"
#define SZ_INT_SHAMAN										"INT_SHAMAN"

#define INT_TEPEE											(207+MAX_INT_OFFSET)
#define INT_HUT												(208+MAX_INT_OFFSET)
#define INT_FARM											(209+MAX_INT_OFFSET)
#define INT_DRUM_TOWER										(210+MAX_INT_OFFSET)
#define INT_TEMPLE											(211+MAX_INT_OFFSET)
#define INT_SPY_TRAIN										(212+MAX_INT_OFFSET)
#define INT_WARRIOR_TRAIN									(213+MAX_INT_OFFSET)
#define INT_FIREWARRIOR_TRAIN								(214+MAX_INT_OFFSET)
#define INT_RECONVERSION									(215+MAX_INT_OFFSET)
#define INT_WALL_PIECE										(216+MAX_INT_OFFSET)
#define INT_GATE											(217+MAX_INT_OFFSET)
#define INT_BOAT_HUT_1										(218+MAX_INT_OFFSET)
#define INT_BOAT_HUT_2										(219+MAX_INT_OFFSET)
#define INT_AIRSHIP_HUT_1									(220+MAX_INT_OFFSET)
#define INT_AIRSHIP_HUT_2									(221+MAX_INT_OFFSET)
#define SZ_INT_TEPEE										"INT_SMALL_HUT"
#define SZ_INT_HUT											"INT_MEDIUM_HUT"
#define SZ_INT_FARM											"INT_LARGE_HUT"
#define SZ_INT_DRUM_TOWER									"INT_DRUM_TOWER"
#define SZ_INT_TEMPLE										"INT_TEMPLE"
#define SZ_INT_SPY_TRAIN									"INT_SPY_TRAIN"
#define SZ_INT_WARRIOR_TRAIN								"INT_WARRIOR_TRAIN"
#define SZ_INT_FIREWARRIOR_TRAIN							"INT_FIREWARRIOR_TRAIN"
#define SZ_INT_RECONVERSION									"INT_RECONVERSION"
#define SZ_INT_WALL_PIECE									"INT_WALL_PIECE"
#define SZ_INT_GATE											"INT_GATE"
#define SZ_INT_BOAT_HUT_1									"INT_BOAT_HUT"
#define SZ_INT_BOAT_HUT_2									"INT_BOAT_HUT_2"
#define SZ_INT_AIRSHIP_HUT_1								"INT_AIRSHIP_HUT"
#define SZ_INT_AIRSHIP_HUT_2								"INT_AIRSHIP_HUT_2"

#define INT_NO_SPECIFIC_PERSON								(222+MAX_INT_OFFSET)
#define INT_NO_SPECIFIC_BUILDING							(223+MAX_INT_OFFSET)
#define INT_NO_SPECIFIC_SPELL								(224+MAX_INT_OFFSET)
#define SZ_INT_NO_SPECIFIC_PERSON							"INT_NO_SPECIFIC_PERSON"
#define SZ_INT_NO_SPECIFIC_BUILDING							"INT_NO_SPECIFIC_BUILDING"
#define SZ_INT_NO_SPECIFIC_SPELL							"INT_NO_SPECIFIC_SPELL"

#define INT_TARGET_SHAMAN									(225+MAX_INT_OFFSET)
#define SZ_INT_TARGET_SHAMAN								"INT_TARGET_SHAMAN"

#define INT_M_VEHICLE_BOAT_1								(226+MAX_INT_OFFSET)
#define INT_M_VEHICLE_AIRSHIP_1								(227+MAX_INT_OFFSET)
#define SZ_INT_M_VEHICLE_BOAT_1								"INT_M_VEHICLE_BOAT"
#define SZ_INT_M_VEHICLE_AIRSHIP_1							"INT_M_VEHICLE_AIRSHIP"

#define INT_B_VEHICLE_BOAT_1								(228+MAX_INT_OFFSET)
#define INT_B_VEHICLE_AIRSHIP_1								(229+MAX_INT_OFFSET)
#define SZ_INT_B_VEHICLE_BOAT_1								"INT_B_VEHICLE_BOAT"
#define SZ_INT_B_VEHICLE_AIRSHIP_1							"INT_B_VEHICLE_AIRSHIP"

#define INT_R_VEHICLE_BOAT_1								(230+MAX_INT_OFFSET)
#define INT_R_VEHICLE_AIRSHIP_1								(231+MAX_INT_OFFSET)
#define SZ_INT_R_VEHICLE_BOAT_1								"INT_R_VEHICLE_BOAT"
#define SZ_INT_R_VEHICLE_AIRSHIP_1							"INT_R_VEHICLE_AIRSHIP"

#define INT_Y_VEHICLE_BOAT_1								(232+MAX_INT_OFFSET)
#define INT_Y_VEHICLE_AIRSHIP_1								(233+MAX_INT_OFFSET)
#define SZ_INT_Y_VEHICLE_BOAT_1								"INT_Y_VEHICLE_BOAT"
#define SZ_INT_Y_VEHICLE_AIRSHIP_1							"INT_Y_VEHICLE_AIRSHIP"

#define INT_G_VEHICLE_BOAT_1								(234+MAX_INT_OFFSET)
#define INT_G_VEHICLE_AIRSHIP_1								(235+MAX_INT_OFFSET)
#define SZ_INT_G_VEHICLE_BOAT_1								"INT_G_VEHICLE_BOAT"
#define SZ_INT_G_VEHICLE_AIRSHIP_1							"INT_G_VEHICLE_AIRSHIP"

#define INT_CP_FREE_ENTRIES									(236+MAX_INT_OFFSET)
#define INT_RANDOM_100										(237+MAX_INT_OFFSET)
#define SZ_INT_CP_FREE_ENTRIES								"INT_CP_FREE_ENTRIES"
#define SZ_INT_RANDOM_100									"INT_RANDOM_100"

#define INT_NUM_SHAMEN_DEFENDERS							(238+MAX_INT_OFFSET)
#define SZ_INT_NUM_SHAMEN_DEFENDERS							"INT_NUM_SHAMEN_DEFENDERS"

#define INT_CAMERA_ANGLE									(239+MAX_INT_OFFSET)
#define INT_CAMERA_X										(240+MAX_INT_OFFSET)
#define INT_CAMERA_Z										(241+MAX_INT_OFFSET)
#define SZ_INT_CAMERA_ANGLE									"INT_CAMERA_ANGLE"
#define SZ_INT_CAMERA_X										"INT_CAMERA_X"
#define SZ_INT_CAMERA_Z										"INT_CAMERA_Z"

#define INT_M_SPELL_SHIELD_COST								(242+MAX_INT_OFFSET)
#define INT_SHIELD											(243+MAX_INT_OFFSET)
#define INT_CONVERT											(244+MAX_INT_OFFSET)
#define INT_TELEPORT										(245+MAX_INT_OFFSET)
#define INT_BLOODLUST										(246+MAX_INT_OFFSET)
#define SZ_INT_M_SPELL_SHIELD_COST							"INT_M_SPELL_SHIELD_COST"
#define SZ_INT_SHIELD										"INT_SHIELD"
#define SZ_INT_CONVERT										"INT_CONVERT"
#define SZ_INT_TELEPORT										"INT_TELEPORT"
#define SZ_INT_BLOODLUST									"INT_BLOODLUST"


#define ATTACK_MARKER										(0)
#define ATTACK_BUILDING										(1)
#define ATTACK_PERSON										(2)
#define SZ_ATTACK_MARKER									"ATTACK_MARKER"
#define SZ_ATTACK_BUILDING									"ATTACK_BUILDING"
#define SZ_ATTACK_PERSON									"ATTACK_PERSON"

#define ATTACK_NORMAL										(0)
#define ATTACK_BY_BOAT										(1)
#define ATTACK_BY_BALLOON									(2)
#define SZ_ATTACK_NORMAL									"ATTACK_NORMAL"
#define SZ_ATTACK_BY_BOAT									"ATTACK_BY_BOAT"
#define SZ_ATTACK_BY_BALLOON								"ATTACK_BY_BALLOON"

#define GUARD_NORMAL										(0)
#define GUARD_WITH_GHOSTS									(1)
#define SZ_GUARD_NORMAL										"GUARD_NORMAL"
#define SZ_GUARD_WITH_GHOSTS								"GUARD_WITH_GHOSTS"




#define TOKEN_REMOVE_HEAD_AT_POS							(144+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SET_BUCKET_USAGE								(145+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SET_BUCKET_COUNT_FOR_SPELL					(146+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_CREATE_MSG_NARRATIVE							(147+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_CREATE_MSG_OBJECTIVE							(148+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_CREATE_MSG_INFORMATION						(149+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_CREATE_MSG_INFORMATION_ZOOM					(150+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SET_MSG_ZOOM									(151+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SET_MSG_TIMEOUT								(152+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SET_MSG_DELETE_ON_OK							(153+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SET_MSG_RETURN_ON_OK							(154+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SET_MSG_DELETE_ON_RMB_ZOOM					(155+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SET_MSG_OPEN_DLG_ON_RMB_ZOOM					(156+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SET_MSG_CREATE_RETURN_MSG_ON_RMB_ZOOM			(157+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SET_MSG_OPEN_DLG_ON_RMB_DELETE				(158+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SET_MSG_ZOOM_ON_LMB_OPEN_DLG					(159+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SET_MSG_AUTO_OPEN_DLG							(160+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SET_SPECIAL_NO_BLDG_PANEL						(161+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SET_MSG_OK_SAVE_EXIT_DLG						(162+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_FIX_WILD_IN_AREA								(163+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_CHECK_IF_PERSON_PREACHED_TO					(164+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_COUNT_ANGELS									(165+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SET_NO_BLUE_REINC								(166+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_IS_SHAMAN_IN_AREA								(167+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_FORCE_TOOLTIP									(168+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SET_DEFENCE_RADIUS							(169+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_MARVELLOUS_HOUSE_DEATH						(170+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_CALL_TO_ARMS									(171+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_DELETE_SMOKE_STUFF							(172+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SET_TIMER_GOING								(173+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_REMOVE_TIMER									(174+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_HAS_TIMER_REACHED_ZERO						(175+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_START_REINC_NOW								(176+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_TURN_PUSH										(177+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_FLYBY_CREATE_NEW								(178+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_FLYBY_START									(179+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_FLYBY_STOP									(180+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_FLYBY_ALLOW_INTERRUPT							(181+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_FLYBY_SET_EVENT_POS							(182+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_FLYBY_SET_EVENT_ANGLE							(183+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_FLYBY_SET_EVENT_ZOOM							(184+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_FLYBY_SET_EVENT_INT_POINT						(185+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_FLYBY_SET_EVENT_TOOLTIP						(186+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_FLYBY_SET_END_TARGET							(187+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_FLYBY_SET_MESSAGE								(188+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_KILL_TEAM_IN_AREA								(189+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_CLEAR_ALL_MSG									(190+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_SET_MSG_ID									(191+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_GET_MSG_ID									(192+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_KILL_ALL_MSG_ID								(193+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_GIVE_UP_AND_SULK								(194+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_AUTO_MESSAGES									(195+NO_COMMANDS+TOKEN_OFFSET)
#define TOKEN_IS_PRISON_ON_LEVEL							(196+NO_COMMANDS+TOKEN_OFFSET)

#define SZ_TOKEN_REMOVE_HEAD_AT_POS							"REMOVE_HEAD_AT_POS"
#define SZ_TOKEN_SET_BUCKET_USAGE							"SET_BUCKET_USAGE"
#define SZ_TOKEN_SET_BUCKET_COUNT_FOR_SPELL					"SET_BUCKET_COUNT_FOR_SPELL"
#define SZ_TOKEN_CREATE_MSG_NARRATIVE						"CREATE_MSG_NARRATIVE"
#define SZ_TOKEN_CREATE_MSG_OBJECTIVE						"CREATE_MSG_OBJECTIVE"
#define SZ_TOKEN_CREATE_MSG_INFORMATION						"CREATE_MSG_INFORMATION"
#define SZ_TOKEN_CREATE_MSG_INFORMATION_ZOOM				"CREATE_MSG_INFORMATION_ZOOM"
#define SZ_TOKEN_SET_MSG_ZOOM								"SET_MSG_ZOOM"
#define SZ_TOKEN_SET_MSG_TIMEOUT							"SET_MSG_TIMEOUT"
#define SZ_TOKEN_SET_MSG_DELETE_ON_OK						"SET_MSG_DELETE_ON_OK"
#define SZ_TOKEN_SET_MSG_RETURN_ON_OK						"SET_MSG_RETURN_ON_OK"
#define SZ_TOKEN_SET_MSG_DELETE_ON_RMB_ZOOM					"SET_MSG_DELETE_ON_RMB_ZOOM"
#define SZ_TOKEN_SET_MSG_OPEN_DLG_ON_RMB_ZOOM				"SET_MSG_OPEN_DLG_ON_RMB_ZOOM"
#define SZ_TOKEN_SET_MSG_CREATE_RETURN_MSG_ON_RMB_ZOOM		"SET_MSG_CREATE_RETURN_MSG_ON_RMB_ZOOM"
#define SZ_TOKEN_SET_MSG_OPEN_DLG_ON_RMB_DELETE				"SET_MSG_OPEN_DLG_ON_RMB_DELETE"
#define SZ_TOKEN_SET_MSG_ZOOM_ON_LMB_OPEN_DLG				"SET_MSG_ZOOM_ON_LMB_OPEN_DLG"
#define SZ_TOKEN_SET_MSG_AUTO_OPEN_DLG						"SET_MSG_AUTO_OPEN_DLG"
#define SZ_TOKEN_SET_SPECIAL_NO_BLDG_PANEL					"SET_SPECIAL_NO_BLDG_PANEL"
#define SZ_TOKEN_SET_MSG_OK_SAVE_EXIT_DLG					"SET_MSG_OK_SAVE_EXIT_DLG"
#define SZ_TOKEN_FIX_WILD_IN_AREA							"FIX_WILD_IN_AREA"
#define SZ_TOKEN_CHECK_IF_PERSON_PREACHED_TO				"CHECK_IF_PERSON_PREACHED_TO"
#define SZ_TOKEN_COUNT_ANGELS								"COUNT_ANGELS"
#define SZ_TOKEN_SET_NO_BLUE_REINC							"SET_NO_BLUE_REINC"
#define SZ_TOKEN_IS_SHAMAN_IN_AREA							"IS_SHAMAN_IN_AREA"
#define SZ_TOKEN_FORCE_TOOLTIP								"FORCE_TOOLTIP"
#define SZ_TOKEN_SET_DEFENCE_RADIUS							"SET_DEFENCE_RADIUS"
#define SZ_TOKEN_MARVELLOUS_HOUSE_DEATH						"MARVELLOUS_HOUSE_DEATH"
#define SZ_TOKEN_CALL_TO_ARMS								"CALL_TO_ARMS"
#define SZ_TOKEN_DELETE_SMOKE_STUFF							"DELETE_SMOKE_STUFF"
#define SZ_TOKEN_SET_TIMER_GOING							"SET_TIMER_GOING"
#define SZ_TOKEN_REMOVE_TIMER								"REMOVE_TIMER"
#define SZ_TOKEN_HAS_TIMER_REACHED_ZERO						"HAS_TIMER_REACHED_ZERO"
#define SZ_TOKEN_START_REINC_NOW							"START_REINC_NOW"
#define SZ_TOKEN_TURN_PUSH									"TURN_PUSH"
#define SZ_TOKEN_FLYBY_CREATE_NEW							"FLYBY_CREATE_NEW"
#define SZ_TOKEN_FLYBY_START								"FLYBY_START"
#define SZ_TOKEN_FLYBY_STOP									"FLYBY_STOP"
#define SZ_TOKEN_FLYBY_ALLOW_INTERRUPT						"FLYBY_ALLOW_INTERRUPT"
#define SZ_TOKEN_FLYBY_SET_EVENT_POS						"FLYBY_SET_EVENT_POS"
#define SZ_TOKEN_FLYBY_SET_EVENT_ANGLE						"FLYBY_SET_EVENT_ANGLE"
#define SZ_TOKEN_FLYBY_SET_EVENT_ZOOM						"FLYBY_SET_EVENT_ZOOM"
#define SZ_TOKEN_FLYBY_SET_EVENT_INT_POINT					"FLYBY_SET_EVENT_INT_POINT"
#define SZ_TOKEN_FLYBY_SET_EVENT_TOOLTIP					"FLYBY_SET_EVENT_TOOLTIP"
#define SZ_TOKEN_FLYBY_SET_END_TARGET						"FLYBY_SET_END_TARGET"
#define SZ_TOKEN_FLYBY_SET_MESSAGE							"FLYBY_SET_MESSAGE"
#define SZ_TOKEN_KILL_TEAM_IN_AREA							"KILL_TEAM_IN_AREA"
#define SZ_TOKEN_CLEAR_ALL_MSG								"CLEAR_ALL_MSG"
#define SZ_TOKEN_SET_MSG_ID									"SET_MSG_ID"
#define SZ_TOKEN_GET_MSG_ID									"GET_MSG_ID"
#define SZ_TOKEN_KILL_ALL_MSG_ID							"KILL_ALL_MSG_ID"
#define SZ_TOKEN_GIVE_UP_AND_SULK							"GIVE_UP_AND_SULK"
#define SZ_TOKEN_AUTO_MESSAGES								"AUTO_MESSAGES"
#define SZ_TOKEN_IS_PRISON_ON_LEVEL							"IS_PRISON_ON_LEVEL"




// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-


#define RES_OK					0
#define RES_FATAL				-1
#define RES_ERROR				-2



#define VAR_PREFIX									"$"
#define VAR_PREFIX_LENGTH							1
#define VAR_MAX_NAME_LENGTH							33
#define MAX_CODES									4096
#define MAX_FIELDS									512
#define MAX_VARS									64



#define SZ_SCRIPT_ERR_WRONG_VERSION					"** Wrong Script Version: '%.4X'"
#define SZ_SCRIPT_ERR_PREMATURE_END					"** Script Premature End"
#define SZ_SCRIPT_ERR_UNKNOW_COMMAND				"** Unknow Command '%.4X'"
#define SZ_SCRIPT_ERR_UNKNOW_DO						"** Unknow DO '%.4X'"
#define SZ_SCRIPT_ERR_EXPECTED_BUT_FOUND			"** '%s (%.4X)' expected but '%.4X' found"
#define SZ_SCRIPT_ERR_ON_OFF_EXPECTED				"** ON/OFF Expected but '%.4X' found"
#define SZ_SCRIPT_ERR_TARGET_TYPE_EXPECTED			"** Marker/Person/Building Expected but '%.4X' found"
#define SZ_SCRIPT_ERR_ATTACK_TYPE_EXPECTED			"** Normal/byBoat/byBallon Expected but '%.4X' found"
#define SZ_SCRIPT_ERR_GUARD_TYPE_EXPECTED			"** Normal/WithGhosts Expected but '%.4X' found"
#define SZ_SCRIPT_ERR_SET_INC_DEC_EXPECTED			"** Set/Inc/Dec Expected but '%.4X' found"
#define SZ_SCRIPT_ERR_MULTIPLY_DIVIDE_EXPECTED		"** Multiply/Divide Expected but '%.4X' found"
#define SZ_SCRIPT_ERR_AND_OR_EXPECTED				"** and/or Expected but '%.4X' found"
#define SZ_SCRIPT_ERR_CONST_EXPECTED				"** constant Expected but '%.4X' found"
#define SZ_SCRIPT_ERR_SPELL_BUILDING_EXPECTED		"** Spell/Building Expected but '%.4X' found"
#define SZ_SCRIPT_ERR_BOAT_BALLON_EXPECTED			"** Boat/Ballon Expected but '%.4X' found"
#define SZ_SCRIPT_ERR_CODE_EOF						"** Code Overflow (max 4096)"
#define SZ_SCRIPT_ERR_FIELD_OVERFLOW				"** Field Overflow (range 0 - 511) '%d'"
#define SZ_SCRIPT_ERR_USERVAL_OVERFLOW				"** UserVal Overflow (range 0 - 63) '%d'"
#define SZ_SCRIPT_ERR_UNKNOW_INT_VAR				"** Unknow Internal Var '%.4X'"
#define SZ_SCRIPT_ERR_UNKNOW_VAR_TYPE				"** Unknow Var Type '%.4X'"
#define SZ_SCRIPT_ERR_UNKNOW_OPERATOR				"** Unknow Operator '%.4X'"
#define SZ_SCRIPT_ERR_MISSING_BLOCK_COMMEND_END		"** Missing Block Comment End - line: %d"

#define SZ_SCRIPT_ERR_UNKNOW_COMMAND_LINE			"** Unknow Command or Used Wrong '%s' - line %d\r\n%s\r\n"
#define SZ_SCRIPT_ERR_EXPECTED_BUT_FOUND_LINE		"** '%s' expected but '%s' found - line %d\r\n%s\r\n"
#define SZ_SCRIPT_ERR_NO_PARAMS_EXPECTED			"** No Params Expected - line %d\r\n%s\r\n"
#define SZ_SCRIPT_ERR_NO_PARAMS_EXPECTED_AFTER_END	"** No Params Expected After ')' - line %d\r\n%s\r\n"
#define SZ_SCRIPT_ERR_NO_MORE_PARAMS_EXPECTED		"** No More Params Expected - line %d\r\n%s\r\n"
#define SZ_SCRIPT_ERR_MISSING_PARAMS				"** Missing Params - line %d\r\n%s\r\n"
#define SZ_SCRIPT_ERR_MAX_FIELDS_REACHED			"** Max Fields Reached (512) - line %d\r\n%s\r\n"
#define SZ_SCRIPT_ERR_MAX_VARS_REACHED				"** Max Vars Reached (64) - line %d\r\n%s\r\n"
#define SZ_SCRIPT_ERR_VAR_NAME_LENGTH				"** Max Var Name Length is 16 - line %d\r\n%s\r\n"
#define SZ_SCRIPT_ERR_FIELD							"** Field Error '%s' - line %d\r\n%s\r\n"
#define SZ_SCRIPT_ERR_OPER_EXPECTED					"** Operator Expected but '%s' found - line %d\r\n%s\r\n"
#define SZ_SCRIPT_ERR_LOGIC_OPER_OR_END_EXEPECTED	"** Logic Operator or End Expected but '%s' found - line: %d\r\n%s\r\n"
#define SZ_SCRIPT_ERR_PARAM_NEED_BE_VAR				"** need be Var '%s' - line %d\r\n%s\r\n"
#define SZ_SCRIPT_ERR_PARAM_NEED_BE_CONST			"** need be Const '%s' - line %d\r\n%s\r\n"
#define SZ_SCRIPT_ERR_PARAM_NEED_BE_POWER2			"** need be Power of 2 - '%s' - line: %d\r\n%s\r\n"
#define SZ_SCRIPT_ERR_ON_OFF_EXPECTED_LINE			"** ON/OFF Expected but '%s' found - line: %d\r\n%s\r\n"
#define SZ_SCRIPT_ERR_TARGET_TYPE_EXPECTED_LINE		"** Marker/Person/Building Expected but '%s' found - line: %d\r\n%s\r\n"
#define SZ_SCRIPT_ERR_ATTACK_TYPE_EXPECTED_LINE		"** Normal/byBoat/byBallon Expected but '%s' found - line: %d\r\n%s\r\n"
#define SZ_SCRIPT_ERR_GUARD_TYPE_EXPECTED_LINE		"** Normal/WithGhosts Expected but '%s' found - line: %d\r\n%s\r\n"
#define SZ_SCRIPT_ERR_SPELL_BUILDING_EXPECTED_LINE	"** Spell/Building Expected but '%s' found - line: %d\r\n%s\r\n"
#define SZ_SCRIPT_ERR_BOAT_BALLON_EXPECTED_LINE		"** Boat/Ballon Expected but '%s' found - line: %d\r\n%s\r\n"
#define SZ_SCRIPT_ERR_SCRIPTEND_EXPECTED			"** Script_End Expected but '%s' found - line: %d\r\n%s\r\n"


#pragma pack(push, 1)

struct COMPUTERPLAYERFILE
{
	UBYTE							Attribs[48];		// starting attributes of this computer player
	char							Name[32];			// name for cp
	PLAYERTHINGS					StartingThings;		// things that he starts with
	ULONG							Spare1;				//Index;
	ULONG							Spare2;
};


struct FIELDINFO
{
	ULONG				Type;		// type of value (CONSTANT_VAL, USER_VAL, INTERNAL_VAL)
	union
	{
		SLONG			Index;		// index to the actual value - (USER_VAL or INTERNAL_VAL)
		SLONG			Value;		// actual value				 - (CONSTANT_VAL)
	};
};


struct SCRIPTINFO
{
	UWORD				Codes[4096];		// codes for this script
	FIELDINFO			Fields[512];		// fields for this script
	SLONG				UserVars[64];		// user variables in this script
	FIELDINFO			*FieldList;			// pointer to where fields in this script start
	UWORD				*CurrentCode;		// pointer into current position in script
};

#pragma pack(pop)




extern char	*script_szf, script_lockchar;
extern bool	script_fail;
extern int script_begin;
extern DWORD script_linep, script_line, script_size, script_lock, script_p, script_p2, script_indent;
extern WORD	script_code, script_fields, script_vars;
extern HANDLE script_h;
extern SCRIPTINFO *script_si;


void strcata(char *str1, char *str2, int align = 45);
void TrimLeft(char *sz);
bool Script_inc_si();
int  ScriptWriteSz(char *sz);
int  ScriptWriteToken(char *token);
bool ScriptSkipToReturn();
bool ScriptSkipToCmd();
bool ScriptSkipToParam();
void ScriptWordLock();
void ScriptWordUnlock();
void ScriptWordRead(char *sz);
void ScriptLineLock();
void ScriptLineUnlock();
void ScriptLineRead(char *sz);



bool ScriptCompile(SCRIPTINFO *scriptinfo, char *szf, HANDLE hlog);
bool ScriptDecompile(SCRIPTINFO *scriptinfo, HANDLE hfile);

