Advertisement
Brownies

qm1 timer

Dec 12th, 2014
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.38 KB | None | 0 0
  1. -----------------------------------    
  2. -- onGameHour      
  3. -----------------------------------      
  4.  
  5. function onGameHour(npc, mob, player)
  6.      
  7.     local VanadielHour = VanadielHour();
  8.     local npc = GetNPCByID(16921027);
  9.     local qm1p = GetServerVariable("[POSI]Fortitude"); -- start in spawn pos 1.
  10.           print(qm1p)
  11.     local s = 1 -- wait time till change to next spawn pos, set to 15 mins.
  12.     if(VanadielHour % s == 0) then -- Change ??? position every 6 hours Vana'diel time (~15 mins)
  13.        SetServerVariable("[POSI]Fortitude", qm1p + 1);
  14.         printf("Qm1 will now change to spawn point.");
  15.                 if (qm1p == 1) then
  16.                         npc:setPos(-420,0.00,755); -- spawn point 1 "Hume"
  17.                         printf("Qm1 is at pos 1");
  18.                 elseif (qm1p == 2) then
  19.                         npc:setPos(-43,0.00,460); -- spawn point 2 "Elvaan"
  20.                         printf("Qm1 is at pos 2");
  21.                 elseif (qm1p == 3) then
  22.                         npc:setPos(-260,0.00,44.821); -- spawn point 3 "Galka"
  23.                         printf("Qm1 is at pos 2");
  24.                 elseif (qm1p == 4) then
  25.                         npc:setPos(-580,0.00,43); -- spawn point 4 "Taru"
  26.                         printf("Qm1 is at pos 4");
  27.                 elseif (qm1p == 5) then
  28.                         npc:setPos(-796,0.00,460); -- spawn point 5 "Mithra"
  29.                         SetServerVariable("[POSI]Fortitude",1);
  30.                         printf("Qm1 is at pos 1");
  31.                 end
  32.         end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement