1. ВКонтакте
  2. Facebook

AX2 ChatKommando !airstrike

Супер Админ
  1. Оффлайн
  2. VIP
  3. 117 сообщений
  4. Сообщение
  5. Личные данные
Полезность: 0 | сообщение № 1 отправлено 13:09, 01.08.2011
!airstrike
php code:
  1. AX.ChatCommand.airstrike = {};
  2. function AX.ChatCommand.airstrike:func(player, chatMsg)
  3. --==============================================================================
  4. =====
  5. -- your Config.
  6. --==============================================================================
  7. =====
  8. local airstrikeDelay  = 6;  -- Delay in Minutes
  9. local airstrikeRank  = 6;  -- Rank needed to use !airstrike (numerical, 1=PVT, 8=GEN)
  10. local airstrikeCost   = 1000;    -- Cost in PP to use !airstrike
  11. local airstrikeBombs  = 60;  -- Number of bombs to drop.
  12. local airstrikeFrequency = 500;  -- Time between each bomb drop. 1000 = 1 second.
  13. local airstrikeRadius  = 150;    -- Outward spread of bombs from HQ
  14. local airstrikeDamage  = 350;    -- Damage of each explosion
  15. local airstrikeBombRadius = 20;  -- Bomb/damage containment area. Killzone size.
  16. local airstrikeAngle   = 45;  -- Don't change this, I have no idea what it does.
  17. local airstrikePressure = 2000;    -- Explosion "force". For lots of physics interactions, try 10000 <img src="http://s28.ucoz.net/sm/24/wink.gif" border="0" align="absmiddle" alt="wink">
  18. local airstrikeHolesize = 0;   -- Again, don't change this, no idea what it really does.
  19. local airstrikeScale  = 0.8;  -- Size of particle effects. 1 is full-size.
  20. local airstrikeExplosions = {
  21. "Alien_Weapons.singularity.Warrior_Singularity_Impact",
  22. "explosions.grenade_air.explosion","explosions.jet_explosion.one_sho
  23. t",
  24. "explos ions.tank_explosion.chinese_tank",
  25. "explosions.he licopter_explosion.a"
  26. };   -- Particle effects for the explosion. Keep it to FIVE explosions!
  27. --==============================================================================
  28. =====
  29. local mustWait = DelayControl(airstrikeDelay, player.CommandAirstrike);
  30. if (Main.CurrentMap.Rules~="PowerStruggle") then
  31. XMessageChatToPlayer( player, "[ERROR] You can use !prices only in POWERSTRUGGLE games!");
  32. elseif (player.actor:GetSpectatorMode()~=0) then
  33. XMessageChatToPlayer( player, "[ERROR] You must in Game to use!");
  34. elseif (mustWait) then
  35. XMessageChatToPlayer( player, "[ERROR] You can only use !airstrike every "..airstrikeDelay.." Minutes (Remaining Time: "..mustWait.." Minutes)!");
  36. elseif (not player:IsDead()) then
  37. local RankName = {[2] = "CORPORAL"; [3] = "SERGEANT"; [4] = "LIEUTENANT"; [5] = "CAPTAIN"; [6] = "MAJOR"; [7] = "COLONEL"; [8] = "GENERAL";};
  38. local Rank = g_gameRules:GetPlayerRank(player.id);
  39. local Points = g_gameRules:GetPlayerPP(player.id);
  40. if (Rank < airstrikeRank) then
  41. XMessageChatToPlayer(player, "AIR-SUPPORT ::: Rank must be "..RankName[airstrikeRank].." or above to command an airstrike!");
  42. elseif (Points < airstrikeCost) then
  43. XMessageChatToPlayer( player, '[ERROR] Chat Command "!airstrike" Costs: '..airstrikeCost..'PP!');
  44. else
  45. player.CommandAirstrike = _time;
  46. g_gameRules:AwardPPCount(player.id, -airstrikeCost);
  47.  
  48. local US_Adress = "HQ_US";
  49. local NK_Adress = "HQ_NK";
  50.  
  51. if (Main.CurrentMap.Name=="multiplayer/ps/shore") then
  52. US_Adress = "HQ12";
  53. elseif (Main.CurrentMap.Name=="multiplayer/ps/beach") then
  54. US_Adress = "HQ_US1";
  55. elseif (Main.CurrentMap.Name=="multiplayer/ps/crossroads") then
  56. NK_Adress = "HQ_US1";
  57. end
  58.  
  59. local HQ = {[2] = System.GetEntityByName(NK_Adress); [1] = System.GetEntityByName(US_Adress);};
  60. local TeamId = g_gameRules.game:GetTeam(player.id);
  61. local EnemyHQ = HQ[TeamId];
  62. local Base = {[1] = "US";[2] = "NK";};
  63. local HQPos = EnemyHQ:GetWorldPos();
  64.  
  65. local beaconpos = {x = HQPos.x + 50, y = HQPos.y + 50, z = HQPos.z + 7.5,};
  66. local Count = 5;
  67.  
  68. g_gameRules:CreateExplosion(player.id,SIGNAL,0,beaconpos,g_Vectors.up,1,
  69. 1,1,1,"explosions.flare.night_time_selfillum",1, 1, 1, 1);
  70. XMessageChatToAll("AIR-SUPPORT // TARGET SIGNAL LOCATED [ "..Base[TeamId].." BASE ] ::: LOCKED ON!");
  71.  
  72. for i = 1, 6, 1 do
  73. Script.SetTimer(i * 1000,function()
  74. XMessageBigCenterToAll("<font color=\"#FFFFFF\">[ </font><font color=\"#FF0000\">AIR-STRIKE</font><font colo r=\"#FFFFFF\"> ] : : INBOUND : : [ <font color=\"#FF0000\">"..Count.."</font> ]<font color=\"#FFFFFF\"> SECONDS TO TARGET</font>");
  75. if (Count==0) then
  76. Script.SetTimer(1000, function()
  77. Count = airstrikeBombs;
  78. XMessageBigCenterToAll(" ");
  79. for i = 1, airstrikeBombs, 1 do
  80. Script.SetTimer(i * airstrikeFrequency, function()
  81. local effect = airstrikeExplosions[math.random(1, #airstrikeExplosions)];
  82. Count = Count - 1;
  83. g_gameRules:CreateExplosion(player.id,BOMB,airstrikeDamage,{x = (HQPos.x + math.random(airstrikeRadius)), y = (HQPos.y + math.random(airstrikeRadius)), z = HQPos.z}, g_Vectors.up, airstrikeBombRadius, airstrikeAngle, airstrikePressure, airstrikeHolesize, effect, airstrikeScale, airstrikeScale, airstrikeScale, airstrikeScale);
  84. XMessageBigCenterToPlayer(player,"<font color=\"#FFFFFF\">[ </font><font color=\"#FF0000\">AIR-STRIKE</font><font colo r=\"#FFFFFF\"> ] : : ACTIVE : : [ <font color=\"#FF0000\">"..tostring(Count).."</f
  85. ont> ]<font color=\"#FFFFFF\"> BOMBS REMAINING</font>");
  86. if (i==airstrikeBombs) then
  87. XMessageBigCenterToPlayer(player," ");
  88. XMessageChatToPlayer(player, "AIR-SUPPORT ::: MISSION COMPLETE SIR!");
  89. end
  90. end);
  91. end
  92. end);
  93. end
  94. Count = Count - 1;
  95. end);
  96. end
  97. end
  98. end
  99. end


------------------------------------------
DDR3 8G (4*2G), 1600МГц Это мало?
 
Поделиться темой:
Перейти

Доступ закрыт.

  1. Вам запрещено отвечать в темах данного форума.

Последние темы

  1. Настройка серверного мода Crysis
    Автор: dimas824 18:04, 12.01.2013
  2. Crysis 2 обсуждение
    Автор: PGJA44 23:01, 07.01.2013
  3. Crysis 2 Настройка Servera (Вопросы)
    Автор: seregas 13:18, 29.12.2012
  4. Crysis Wars обсуждение
    Автор: coody55 12:22, 21.11.2012
  5. AEGISX Как убрать бесконечные (40) патро...
    Автор: coody55 12:10, 21.11.2012
  6. Pioneer
    Автор: coody55 18:05, 08.11.2012

Изменения статуса

  1. профиль Воин будущего 20:35, 10.12.2012
  2. профиль ИЩЮ КЛЮЧЬ НА CRYSIS 2 ЕСЛИ ЕСТЬ ТО ДАЙ 23:39, 04.05.2012
  3. профиль как делать серийный номер ключ 23:56, 24.02.2012
  4. профиль ыца! 11:04, 30.01.2012
  5. профиль DDR3 8G (4*2G), 1600МГц Это мало? 22:56, 29.01.2012
  6. профиль i5-2500k gigabyte z68x GTX 580 msi 8 гб оперативной памят... 23:14, 21.12.2011

За последние 10 минут эту тему посетило 1 человек (0 пользователей, 1 гостей, 0 скрытых пользователей)
Полный список по: последнему действию или именам пользователей