Advertisement
Brownies

Fortitude on death

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