Index: npcs/Naja_Salaheem.lua
===================================================================
--- npcs/Naja_Salaheem.lua	(revision 3296)
+++ npcs/Naja_Salaheem.lua	(working copy)
@@ -1,45 +1,90 @@
------------------------------------
---  Area: Aht Urhgan Whitegate
---   NPC: Naja Salaheem
---  Type: Standard NPC
--- @zone: 50
---  @pos: 22.700 -8.804 -45.591
--- 
--- Auto-Script: Requires Verification (Verified by Brawndo)
------------------------------------
-package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil;
------------------------------------
-
------------------------------------
--- onTrade Action
------------------------------------
-
-function onTrade(player,npc,trade)
-end;
-
------------------------------------
--- onTrigger Action
------------------------------------
-
-function onTrigger(player,npc)
-	player:startEvent(0x13c3);
-end;
-
------------------------------------
--- onEventUpdate
------------------------------------
-
-function onEventUpdate(player,csid,option)
-	-- printf("CSID: %u",csid);
-	-- printf("RESULT: %u",option);
-end;
-
------------------------------------
--- onEventFinish
------------------------------------
-
-function onEventFinish(player,csid,option)
-	-- printf("CSID: %u",csid);
-	-- printf("RESULT: %u",option);
-end;
-
+-----------------------------------
+--  Area: Aht Urhgan Whitegate
+--   NPC: Naja Salaheem
+--  Type: Standard NPC
+-- @zone: 50
+--  @pos: 22.700 -8.804 -45.591
+-- 
+-- Auto-Script: Requires Verification (Verified by Brawndo)
+-----------------------------------
+package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil;
+require("scripts/globals/missions");
+require("scripts/zones/Aht_Urhgan_Whitegate/TextIDs");
+require("scripts/globals/titles");
+require("scripts/globals/keyitems");
+require("scripts/globals/settings");
+
+
+-----------------------------------
+
+-----------------------------------
+-- onTrade Action
+-----------------------------------
+
+function onTrade(player,npc,trade)
+end;
+
+-----------------------------------
+-- onTrigger Action
+-----------------------------------
+
+function onTrigger(player,npc)
+if(player:getCurrentMission(TOAU) == IMMORTAL_SENTRIES and player:getVar("TOAUM2") == 1) then
+player:startEvent(0x0BBA,0,0,0,0,0,0,0,0,0);
+
+elseif(player:getCurrentMission(TOAU) == PRESIDENT_SALAHEEM and player:getVar("TOAUM3") == 1)then
+player:startEvent(0x0049,0,0,0,0,0,0,0,0,0);
+player:setVar("TOAUM3",2);
+
+elseif(player:getCurrentMission(TOAU) == PRESIDENT_SALAHEEM and player:getVar("TOAUM3") == 2)then
+player:startEvent(0x0bcc,0,0,0,0,0,0,0,0,0);
+
+elseif(player:getCurrentMission(TOAU) == KNIGHT_OF_GOLD and player:getVar("TOAUM4") == 0)then
+player:startEvent(0x0Bcd,0,0,0,0,0,0,0,0,0);
+
+elseif(player:getCurrentMission(TOAU) == WESTERLY_WINDS and player:getVar("TOAUM7") == 1)then
+player:startEvent(0x0Bd4,0,0,0,0,0,0,0,0,0);
+elseif(player:getCurrentMission(TOAU) == UNDERSEA_SCOUTING)then
+player:startEvent(0x0beb,0,0,0,0,0,0,0,0,0);
+
+elseif(player:getCurrentMission(TOAU) == ASTRAL_WAVES)then
+player:startEvent(0x0bec,0,0,0,0,0,0,0,0,0);
+else
+player:startEvent(0x0bbb,1,0,0,0,0,0,0,1,0);
+end
+end;
+
+-----------------------------------
+-- onEventUpdate
+-----------------------------------
+
+function onEventUpdate(player,csid,option)
+	-- printf("CSID: %u",csid);
+	-- printf("RESULT: %u",option);
+end;
+
+-----------------------------------
+-- onEventFinish
+-----------------------------------
+
+function onEventFinish(player,csid,option)
+printf("CSID: %u",csid);
+printf("RESULT: %u",option);
+
+if(csid == 0x0BBA)then
+player:setVar("TOAUM2",0);
+player:completeMission(TOAU,IMMORTAL_SENTRIES);
+player:addMission(TOAU,PRESIDENT_SALAHEEM);
+elseif(csid == 0x0Bcc)then
+player:completeMission(TOAU,PRESIDENT_SALAHEEM);
+player:addMission(TOAU,KNIGHT_OF_GOLD);
+player:setVar("TOAUM3",0);
+elseif(csid == 0x0bd4)then
+player:setVar("TOAUM7",0);
+player:completeMission(TOAU,WESTERLY_WINDS);
+player:addItem(2185,1);
+player:messageSpecial(ITEM_OBTAINED,2185);
+player:addMission(TOAU,A_MERCENARY_LIFE);
+end
+end;
+
Index: Zone.lua
===================================================================
--- Zone.lua	(revision 3296)
+++ Zone.lua	(working copy)
@@ -7,6 +7,9 @@
 package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil;
 require("scripts/globals/settings");
 require("scripts/zones/Aht_Urhgan_Whitegate/TextIDs");
+require("scripts/globals/titles");
+require("scripts/globals/keyitems");
+require("scripts/globals/missions");
 
 -----------------------------------
 -- onInitialize
@@ -15,6 +18,10 @@
 function onInitialize(zone)
 	zone:registerRegion(1,57,-1,-70,62,1,-65); -- Sets Mark for "Got It All" Quest cutscene.
 	zone:registerRegion(2,-96,-7,121,-64,-5,137); -- Sets Mark for "Vanishing Act" Quest cutscene.
+
+	zone:registerRegion(3,14,-7,-65,37,-2,-41);
+	zone:registerRegion(4,75,-3,25,90,1,59);
+	zone:registerRegion(5,73,-7,-137,95,-3,-115);
 end;
 
 -----------------------------------		
@@ -58,6 +65,28 @@
 	    player:startEvent(0x002c);
 	end
 	end,
+	[3] = function (x) -- AH mission 
+	if(player:getCurrentMission(TOAU)== LAND_OF_SACRED_SERPENTS)	then	player:startEvent(0x0BB8,0,0,0,0,0,0,0,0,0);
+	elseif(player:getCurrentMission(TOAU) == A_MERCENARY_LIFE)	then
+		if(prevZone ~= 50)then
+		player:startEvent(0x0Bea,3,3,3,3,3,3,3,3,0);
+		end
+	end
+	end,
+
+	[4] = function (x) -- AH mission 
+	if(player:getCurrentMission(TOAU)== KNIGHT_OF_GOLD and player:getVar("TOAUM4") == 2)	then	player:startEvent(0x0Bd0,0,0,0,0,0,0,0,0,0);
+	end
+	end,
+
+	[5] = function (x) -- AH mission 
+	if(player:getCurrentMission(TOAU)== KNIGHT_OF_GOLD and player:getVar("TOAUM4") == 3)	then	player:startEvent(0x0Bd2,0,0,0,0,0,0,0,0,0);
+	elseif(player:getCurrentMission(TOAU) == WESTERLY_WINDS and player:getVar("TOAUM7") == 0)then
+	player:startEvent(0x0BD3,0,0,0,0,0,0,0,0,0);
+	end
+	end,
+
+
 	}
 end;	
 
@@ -85,8 +114,8 @@
 -----------------------------------	
 
 function onEventUpdate(player,csid,option)	
---printf("CSID: %u",csid);
---printf("RESULT: %u",option);
+printf("CSID: %u",csid);
+printf("RESULT: %u",option);
 end;	
 
 -----------------------------------	
@@ -94,21 +123,47 @@
 -----------------------------------	
 
 function onEventFinish(player,csid,option)	
---printf("CSID: %u",csid);
---printf("RESULT: %u",option);
-	if(csid == 0x00c9)then
+printf("CSID: %u",csid);
+printf("RESULT: %u",option);
+if(csid == 0x00c9)then
 		player:setPos(-11,2,-142,192);
-	elseif(csid == 0x00cc)then
+elseif(csid == 0x00cc)then
 		player:setPos(11,2,142,64);
-	elseif(csid == 0x00c8) then
+elseif(csid == 0x00c8) then
 		player:setPos(0,-2,0,0,47);
-	elseif(csid == 0x00cb) then
+elseif(csid == 0x00cb) then
 		player:setPos(0,-2,0,0,58);
-	elseif(csid == 0x002c)then
+elseif(csid == 0x002c)then
 		player:setVar("vanishingactCS",4);
 		player:setPos(-80,-6,122,5);
-	elseif(csid == 0x020e)then
+elseif(csid == 0x020e)then
 		player:setVar("gotitallCS",6);
 		player:setPos(60,0,-71,38);
-	end
+
+elseif(csid == 0x0bd0)then
+player:setVar("TOAUM4",3);
+
+elseif(csid == 0x0bd2)then
+player:setVar("TOAUM4",4);
+player:addKeyItem(RAILLEFALS_LETTER);
+player:messageSpecial(KEYITEM_OBTAINED,RAILLEFALS_LETTER);
+player:completeMission(TOAU,KNIGHT_OF_GOLD);
+player:addMission(TOAU,CONFESSIONS_OF_ROYALTY);
+
+elseif(csid == 0x0BB8) then
+player:completeMission(TOAU,LAND_OF_SACRED_SERPENTS);
+player:addMission(TOAU,IMMORTAL_SENTRIES);
+player:addKeyItem(SUPPLIES_PACKAGE);
+player:messageSpecial(KEYITEM_OBTAINED,SUPPLIES_PACKAGE);
+
+elseif(csid ==0x0BD3)then
+player:setVar("TOAUM7",1)
+player:addKeyItem(RAILLEFALS_NOTE);
+player:messageSpecial(KEYITEM_OBTAINED,RAILLEFALS_NOTE);
+player:addItem(2185,1);
+player:messageSpecial(ITEM_OBTAINED,2185);
+elseif(csid == 0x0bea)then
+player:completeMission(TOAU,A_MERCENARY_LIFE);
+player:addMission(TOAU,UNDERSEA_SCOUTING);
+end
 end;
