hacker0023
27-09-12, 08:10 PM
Trong Scripts đó cậu :):)
:):):):):):):):):):):):):):)
của Gà
using System;
using System.Collections.Generic;
using System.Text;
using Game.Logic.AI;
using Game.Logic;
using Game.Logic.Phy.Object;
using Game.Logic.Actions;
using System.Drawing;
using Bussiness;
namespace GameServerScript.AI.NPC
{
public class TerrorKingSecond : ABrain
{
private int m_attackTurn = 0;
private int m_turn = 0;
private PhysicalObj m_wallLeft = null;
private PhysicalObj m_wallRight = null;
private int isEixt = 0;
private int npcID = 1310;
private int isSay = 0;
private Point[] BrithPoint = { new Point(682, 673), new Point(1092, 673) };
#region NPC 说话内容
private static string[] AllAttackChat = new string[] {
LanguageMgr.GetTranslation("GameServerScript.AI.NPC.TerrorKingSecond.msg1"),
LanguageMgr.GetTranslation("GameServerScript.AI.NPC.TerrorKingSecond.msg2"),
LanguageMgr.GetTranslation("GameServerScript.AI.NPC.TerrorKingSecond.msg3")
};
private static string[] ShootChat = new string[]{
LanguageMgr.GetTranslation("GameServerScript.AI.NPC.TerrorKingSecond.msg4"),
LanguageMgr.GetTranslation("GameServerScript.AI.NPC.TerrorKingSecond.msg5"),
LanguageMgr.GetTranslation("GameServerScript.AI.NPC.TerrorKingSecond.msg6")
};
private static string[] AddBooldChat = new string[]{
LanguageMgr.GetTranslation("GameServerScript.AI.NPC.TerrorKingSecond.msg7"),
LanguageMgr.GetTranslation("GameServerScript.AI.NPC.TerrorKingSecond.msg8"),
LanguageMgr.GetTranslation("GameServerScript.AI.NPC.TerrorKingSecond.msg9")
};
private static string[] KillAttackChat = new string[]{
LanguageMgr.GetTranslation("GameServerScript.AI.NPC.TerrorKingSecond.msg10")
};
private static string[] FrostChat = new string[]{
LanguageMgr.GetTranslation("GameServerScript.AI.NPC.TerrorKingSecond.msg11"),
LanguageMgr.GetTranslation("GameServerScript.AI.NPC.TerrorKingSecond.msg12"),
LanguageMgr.GetTranslation("GameServerScript.AI.NPC.TerrorKingSecond.msg13")
};
private static string[] WallChat = new string[]{
LanguageMgr.GetTranslation("GameServerScript.AI.NPC.TerrorKingSecond.msg14"),
LanguageMgr.GetTranslation("GameServerScript.AI.NPC.TerrorKingSecond.msg15")
};
private static string[] KillPlayerChat = new string[]{
LanguageMgr.GetTranslation("GameServerScript.AI.NPC.TerrorKingSecond.msg16"),
LanguageMgr.GetTranslation("GameServerScript.AI.NPC.TerrorKingSecond.msg17"),
LanguageMgr.GetTranslation("GameServerScript.AI.NPC.TerrorKingSecond.msg18")
};
private static string[] ShootedChat = new string[]{
LanguageMgr.GetTranslation("GameServerScript.AI.NPC.TerrorKingSecond.msg19"),
LanguageMgr.GetTranslation("GameServerScript.AI.NPC.TerrorKingSecond.msg20")
};
private static string[] DiedChat = new string[]{
LanguageMgr.GetTranslation("GameServerScript.AI.NPC.TerrorKingSecond.msg21")
};
#endregion
public override void OnBeginSelfTurn()
{
base.OnBeginSelfTurn();
}
public override void OnBeginNewTurn()
{
base.OnBeginNewTurn();
m_body.CurrentDamagePlus = 1;
m_body.CurrentShootMinus = 1;
isSay = 0;
}
public override void OnCreated()
{
base.OnCreated();
}
public override void OnStartAttacking()
{
base.OnStartAttacking();
bool result = false;
int maxdis = 0;
foreach (Player player in Game.GetAllFightPlayers())
{
if (player.IsLiving && player.X > 620 && player.X < 1194)
{
int dis = (int)Body.Distance(player.X, player.Y);
if (dis > maxdis)
{
maxdis = dis;
}
result = true;
}
}
if (result && Body.State != 1)
{
KillAttack(620, 1194);
return;
}
if (m_attackTurn == 0)
{
AllAttack();
if (isEixt == 1)
{
m_wallLeft.CanPenetrate = true;
m_wallRight.CanPenetrate = true;
Game.RemovePhysicalObj(m_wallLeft, true);
Game.RemovePhysicalObj(m_wallRight, true);
isEixt = 0;
}
m_attackTurn++;
}
else if (m_attackTurn == 1)
{
FrostAttack();
m_attackTurn++;
}
else if (m_attackTurn == 2)
{
ProtectingWall();
m_attackTurn++;
}
else
{
CriticalStrikes();
m_attackTurn = 0;
}
}
private void CriticalStrikes()
{
Player target = Game.GetFrostPlayerRadom();
List<Player> players = Game.GetAllFightPlayers();
List<Player> NotFrostPlayers = new List<Player>();
foreach (Player player in players)
{
if (player.IsFrost == false)
{
NotFrostPlayers.Add(player);
}
}
((SimpleBoss)Body).CurrentDamagePlus = 30;
if (NotFrostPlayers.Count != players.Count)
{
if (NotFrostPlayers.Count != 0)
{
Body.PlayMovie("beat1", 0, 0);
Body.RangeAttacking(Body.X - 1000, Body.X + 1000, "beat1", 1500, NotFrostPlayers);
}
else
{
Body.PlayMovie("beat1", 0, 0);
Body.RangeAttacking(Body.X - 1000, Body.X + 1000, "beat1", 1500, null);
}
}
else
{
Body.Say(LanguageMgr.GetTranslation("GameServerScript.AI.NPC.TerrorKingSecond.msg22"), 1, 3300);
Body.PlayMovie("renew", 3500, 0);
Body.CallFuction(new LivingCallBack(CreateChild), 6000);
}
}
private void FrostAttack()
{
int mtX = Game.Random.Next(800, 980);
Body.MoveTo(mtX, Body.Y, "walk", 0, new LivingCallBack(NextAttack));
}
private void AllAttack()
{
Body.CurrentDamagePlus = 0.7f;
if (m_turn == 0)
{
int index = Game.Random.Next(0, AllAttackChat.Length);
Body.Say(AllAttackChat[index], 1, 10000);
Body.PlayMovie("beat1", 12000, 0);
Body.RangeAttacking(-1, Game.Map.Info.ForegroundWidth + 1, "cry", 14000, null);
m_turn++;
}
else
{
int index = Game.Random.Next(0, AllAttackChat.Length);
Body.Say(AllAttackChat[index], 1, 0);
Body.PlayMovie("beat1", 1000, 0);
Body.RangeAttacking(-1, Game.Map.Info.ForegroundWidth + 1, "cry", 3000, null);
}
}
private void KillAttack(int fx, int tx)
{
int index = Game.Random.Next(0, KillAttackChat.Length);
if (m_turn == 0)
{
Body.CurrentDamagePlus = 10;
Body.Say(KillAttackChat[index], 1, 10000);
Body.PlayMovie("beat1", 12000, 0);
Body.RangeAttacking(fx, tx, "cry", 14000, null);
m_turn++;
}
else
{
Body.CurrentDamagePlus = 10;
Body.Say(KillAttackChat[index], 1, 0);
Body.PlayMovie("beat1", 2000, 0);
Body.RangeAttacking(fx, tx, "cry", 4000, null);
}
}
private void ProtectingWall()
{
if (isEixt == 0)
{
m_wallLeft = ((PVEGame)Game).CreatePhysicalObj(Body.X - 15, 620, "wallLeft", "com.mapobject.asset.WaveAsset_01_left", "1", 1, 1, 0);
m_wallRight = ((PVEGame)Game).CreatePhysicalObj(Body.X + 15, 620, "wallRight", "com.mapobject.asset.WaveAsset_01_right", "1", 1, 1, 0);
m_wallLeft.SetRect(-165, -169, 43, 330);
m_wallRight.SetRect(128, -165, 41, 330);
isEixt = 1;
}
int index = Game.Random.Next(0, WallChat.Length);
Body.Say(WallChat[index], 1, 0);
}
public void CreateChild()
{
Body.PlayMovie("renew", 100, 2000);
((SimpleBoss)Body).CreateChild(npcID, BrithPoint, 8, 2, 1);
}
private void NextAttack()
{
int count = Game.Random.Next(1, 2);
for (int i = 0; i < count; i++)
{
Player target = Game.FindRandomPlayer();
if (target != null && target.IsFrost == false)
{
int index = Game.Random.Next(0, ShootChat.Length);
Body.Say(ShootChat[index], 1, 0);
if (target.X > Body.X)
{
Body.ChangeDirection(1, 500);
}
else
{
Body.ChangeDirection(-1, 500);
}
if (Body.ShootPoint(target.X, target.Y, 1, 1000, 10000, 1, 1.5f, 2000))
{
Body.PlayMovie("beat2", 1500, 0);
}
}
}
}
public override void OnStopAttacking()
{
base.OnStopAttacking();
}
public override void OnKillPlayerSay()
{
base.OnKillPlayerSay();
int index = Game.Random.Next(0, KillPlayerChat.Length);
Body.Say(KillPlayerChat[index], 1, 0, 2000);
}
public override void OnDiedSay()
{
//int index = Game.Random.Next(0, DiedChat.Length);
//Body.Say(DiedChat[index], 1, 0, 1500);
}
public override void OnShootedSay(int delay)
{
int index = Game.Random.Next(0, ShootedChat.Length);
if (isSay == 0 && Body.IsLiving == true)
{
Body.Say(ShootedChat[index], 1, delay, 0);
isSay = 1;
}
if (!Body.IsLiving)
{
index = Game.Random.Next(0, DiedChat.Length);
Body.Say(DiedChat[index], 1, delay - 800, 2000);
}
}
}
}
Gà 2
using System;
using System.Collections.Generic;
using System.Text;
using Game.Logic.AI;
using Game.Logic.Phy.Object;
using Game.Logic.Actions;
using Bussiness;
namespace GameServerScript.AI.NPC
{
public class TerrorKingFirst : ABrain
{
private int m_attackTurn = 0;
private int isSay = 0;
#region NPC 说话内容
private static string[] AllAttackChat = new string[] {
LanguageMgr.GetTranslation("GameServerScript.AI.NPC.TerrorKingFirst.msg1"),
LanguageMgr.GetTranslation("GameServerScript.AI.NPC.TerrorKingFirst.msg2"),
LanguageMgr.GetTranslation("GameServerScript.AI.NPC.TerrorKingFirst.msg3")
};
private static string[] ShootChat = new string[]{
LanguageMgr.GetTranslation("GameServerScript.AI.NPC.TerrorKingFirst.msg4"),
LanguageMgr.GetTranslation("GameServerScript.AI.NPC.TerrorKingFirst.msg5"),
LanguageMgr.GetTranslation("GameServerScript.AI.NPC.TerrorKingFirst.msg6")
};
private static string[] AddBooldChat = new string[]{
LanguageMgr.GetTranslation("GameServerScript.AI.NPC.TerrorKingFirst.msg7"),
LanguageMgr.GetTranslation("GameServerScript.AI.NPC.TerrorKingFirst.msg8"),
LanguageMgr.GetTranslation("GameServerScript.AI.NPC.TerrorKingFirst.msg9")
};
private static string[] KillAttackChat = new string[]{
LanguageMgr.GetTranslation("GameServerScript.AI.NPC.TerrorKingFirst.msg10")
};
private static string[] KillPlayerChat = new string[]{
LanguageMgr.GetTranslation("GameServerScript.AI.NPC.TerrorKingFirst.msg11"),
LanguageMgr.GetTranslation("GameServerScript.AI.NPC.TerrorKingFirst.msg12"),
LanguageMgr.GetTranslation("GameServerScript.AI.NPC.TerrorKingFirst.msg13")
};
private static string[] ShootedChat = new string[]{
LanguageMgr.GetTranslation("GameServerScript.AI.NPC.TerrorKingFirst.msg14"),
LanguageMgr.GetTranslation("GameServerScript.AI.NPC.TerrorKingFirst.msg15")
};
private static string[] DiedChat = new string[]{
LanguageMgr.GetTranslation("GameServerScript.AI.NPC.TerrorKingFirst.msg16")
};
#endregion
public override void OnBeginSelfTurn()
{
base.OnBeginSelfTurn();
}
public override void OnBeginNewTurn()
{
base.OnBeginNewTurn();
m_body.CurrentDamagePlus = 1;
m_body.CurrentShootMinus = 1;
isSay = 0;
}
public override void OnCreated()
{
base.OnCreated();
}
public override void OnStartAttacking()
{
base.OnStartAttacking();
Body.Direction = Game.FindlivingbyDir(Body);
bool result = false;
int maxdis = 0;
foreach (Player player in Game.GetAllFightPlayers())
{
if (player.IsLiving && player.X > 620 && player.X < 1194)
{
int dis = (int)Body.Distance(player.X, player.Y);
if (dis > maxdis)
{
maxdis = dis;
}
result = true;
}
}
if (result)
{
KillAttack(620, 1194);
return;
}
if (m_attackTurn == 0)
{
AllAttack();
m_attackTurn++;
}
else if (m_attackTurn == 1)
{
PersonalAttack();
m_attackTurn++;
}
else
{
Healing();
m_attackTurn = 0;
}
}
private void KillAttack(int fx, int tx)
{
Body.CurrentDamagePlus = 10;
int index = Game.Random.Next(0, KillAttackChat.Length);
Body.Say(KillAttackChat[index], 1, 1000);
Body.PlayMovie("beat", 3000, 0);
Body.RangeAttacking(fx, tx, "cry", 4000, null);
}
private void AllAttack()
{
Body.CurrentDamagePlus = 0.5f;
int index = Game.Random.Next(0, AllAttackChat.Length);
Body.Say(AllAttackChat[index], 1, 0);
Body.PlayMovie("beat", 1000, 0);
Body.RangeAttacking(-1, Game.Map.Info.ForegroundWidth + 1, "cry", 3000, null);
}
private void PersonalAttack()
{
int dis = Game.Random.Next(800, 980);
Body.MoveTo(dis, Body.Y, "walk", 1000, new LivingCallBack(NextAttack));
}
private void Healing()
{
int index = Game.Random.Next(0, AddBooldChat.Length);
Body.Say(AddBooldChat[index], 1, 0);
Body.SyncAtTime = true;
Body.AddBlood(10000);
Body.PlayMovie("", 1000, 4500);
}
private void NextAttack()
{
Player target = Game.FindRandomPlayer();
if (target != null)
{
if (target.X > Body.Y)
{
Body.ChangeDirection(1, 800);
}
else
{
Body.ChangeDirection(-1, 800);
}
Body.CurrentDamagePlus = 1.0f;
int index = Game.Random.Next(0, ShootChat.Length);
Body.Say(ShootChat[index], 1, 0);
int mtX = Game.Random.Next(target.X - 30, target.X + 30);
if (Body.ShootPoint(mtX, target.Y, 61, 1000, 10000, 3, 1.5f, 2300))
{
Body.PlayMovie("beat2", 1500, 0);
}
}
}
public override void OnStopAttacking()
{
base.OnStopAttacking();
}
public override void OnKillPlayerSay()
{
base.OnKillPlayerSay();
int index = Game.Random.Next(0, KillPlayerChat.Length);
Body.Say(KillPlayerChat[index], 1, 0, 2000);
}
public override void OnDiedSay()
{
base.OnDiedSay();
}
public override void OnShootedSay(int delay)
{
if (isSay == 0 && Body.IsLiving == true)
{
int index = Game.Random.Next(0, ShootedChat.Length);
Body.Say(ShootedChat[index], 1, delay);
isSay = 1;
}
}
}
}
Tui không thấy cái nào để thay file blastout
Ai bk để lại cho xin cái yahoo :((:((:((:((:((:((
trungqbbn
29-09-12, 09:53 AM
đây nhé vào Road\scripts\AI\NPC tìm cái file NPC của boss bạn cần chỉnh = cách vào sql ---> dbo.NPC_info ----> tìm ID BOSS ---> di thanh cuốn ngang sang bên phải đến khi nào thấy scripts ấn vào rùi sẽ đc ( vd của kiến( dễ ): dòng scripts của nó là : GameServerScript.AI.NPC.SimpleQueenAntAi thì ta đã có scripts của NPC rùi là : SimpleQueenAntAi) vào Road\scripts\AI\NPC tìm file đó.
bật lên.
Bước tiếp là ấn Ctrl+F paste dòng này vào if (Body.ShootPoint( Rùi Enter.
Tiếp đó ta nhìn sang thấy cả dòng đó là if (Body.ShootPoint(target.X, target.Y, 51, 1000, 10000, 1, 3.0f, 2550))
Ok nhìn kìa 51 kia kìa chỉnh đi chỉnh đi.
Good luck!!!
Lưu ý: chỉnh 51 đúng với blas đã thay ở mession.
đang nghiên cứu dev gunny II và cũng gần xong!!!
Chỉnh thành if (Body.ShootPoint(target.X, target.Y, 481, 1000, 10000, 1, 3.0f, 2550))
[481] là hiệu ứng của thương cổ nhưng vẫn bắn ko thấy hiêuh ứng
Game.AddLoadingFile(1, "bombs/481.swf", "tank.resource.bombs.Bomb481");
Powered by vBulletin® Version 4.2.0 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.