永发信息网

谁玩《神话时代》?我的文件坏了,需要复制一个,在目录下ai\scn04p5.xs

答案:3  悬赏:80  手机版
解决时间 2021-03-23 05:05
  • 提问者网友:兔牙战士
  • 2021-03-22 09:14
谢谢,本人邮箱iloveqby@sina.com

我用文本复制了之后保存为原文件名和扩展名~还是不行~是不是和系统有关?我是VISTA HOME BASIC的~系统
最佳答案
  • 五星知识达人网友:洎扰庸人
  • 2021-03-22 09:59
//==============================================================================
// Scn04p5: AI Scenario Script for scenario 4 player 5
//==============================================================================

//==============================================================================
// Set Town Location
//==============================================================================
void setTownLocation(void)
{
//Look for the "Town Location" marker.
kbSetTownLocation(kbGetBlockPosition("3539"));
}

//==============================================================================
// miscStartup
//==============================================================================
void miscStartup(void)
{
// Difficulty Level check.
int difflevel=-1;
difflevel=aiGetWorldDifficulty();

//Startup message(s).
aiEcho("");
aiEcho("");
aiEcho("Scn04P2 AI Start, filename='"+cFilename+"'.");
aiEcho("Difficulty Level="+difflevel+".");
//Spit out the map size.
aiEcho(" Map size is ("+kbGetMapXSize()+", "+kbGetMapZSize()+").");
//Cheat like a bastard. Once only, though.
kbLookAtAllUnitsOnMap();
//Calculate some areas.
kbAreaCalculate(1200.0);
//Set our town location.
setTownLocation();
//Reset random seed
aiRandSetSeed();
//Allocate all resources to the root escrow.
kbEscrowAllocateCurrentResources();
}

//==============================================================================
//==============================================================================
// Attack stuff.
//==============================================================================
//==============================================================================
//Shared variables.

int attackerUnitTypeIDSoldier=cUnitTypeAxeman;
int attackerUnitTypeIDTransport=cUnitTypePirateShip;

//=========================================================================================
// Kidd's cool configQuery function: used to create attack routes, etc. Oooh, lovin' that!
//=========================================================================================
bool configQuery( int queryID = -1, int unitType = -1, int action = -1, int state = -1, int player = -1, vector center = vector(-1,-1,-1), bool sort = false, float radius = -1 )
{
if ( queryID == -1)
{
return(false);
}

if (player != -1)
kbUnitQuerySetPlayerID(queryID, player);

if (unitType != -1)
kbUnitQuerySetUnitType(queryID, unitType);

if (action != -1)
kbUnitQuerySetActionType(queryID, action);

if (state != -1)
kbUnitQuerySetState(queryID, state);

if (center != vector(-1,-1,-1))
{
kbUnitQuerySetPosition(queryID, center);
if (sort == true)
kbUnitQuerySetAscendingSort(queryID, true);
if (radius != -1)
kbUnitQuerySetMaximumDistance(queryID, radius);
}
return(true);
}

//=====================================================================================
// finalAttack. This is called from the scenario with an AI Func effect
//=====================================================================================
void finalAttack(int whichAttack = -1)
{
int transportPlanID=aiPlanCreate("Transport Group", cPlanTransport);
// "whichTransport" adds a specific transport to the plans. Victory conditions, chats, etc.
// are tied to the concept of the main transport getting whacked.
int whichTransport=-1;

// Difficulty Level check.
int difflevel=-1;
difflevel=aiGetWorldDifficulty();

vector gatherPoint=kbGetBlockPosition("3535");
vector targetPoint=kbGetBlockPosition("2642");
vector initialPosition=kbGetBlockPosition("3539");

int baseID = kbBaseCreate( 5, "mainBase", initialPosition, 50.0);

// Same unit types in each transport.
aiPlanAddUnitType(transportPlanID, cUnitTypePirateShip, 1, 1, 1);
aiPlanAddUnitType(transportPlanID, cUnitTypeSpearman, 8, 8, 8);
aiPlanAddUnitType(transportPlanID, cUnitTypeAnubite, 2, 2, 2);

if (transportPlanID >= 0)
{
aiEcho("*** BOAT FROM FINAL ATTACK EN ROUTE ***");
switch(whichAttack)
{
case 0:
{
gatherPoint=kbGetBlockPosition("3535");
targetPoint=kbGetBlockPosition("3541");

whichTransport = kbGetBlockID("3531");

aiPlanSetVariableInt(transportPlanID, cTransportPlanTransportTypeID, 0, cUnitTypePirateShip);
aiPlanSetVariableInt(transportPlanID, cTransportPlanTransportID, 0, whichTransport);
break;
}

case 1:
{

gatherPoint=kbGetBlockPosition("3536");
targetPoint=kbGetBlockPosition("3540");

whichTransport = kbGetBlockID("3532");

aiPlanSetVariableInt(transportPlanID, cTransportPlanTransportTypeID, 0, cUnitTypePirateShip);
aiPlanSetVariableInt(transportPlanID, cTransportPlanTransportID, 0, whichTransport);
break;
}

case 2:
{
gatherPoint=kbGetBlockPosition("3537");
targetPoint=kbGetBlockPosition("3542");

whichTransport = kbGetBlockID("3533");

aiPlanSetVariableInt(transportPlanID, cTransportPlanTransportTypeID, 0, cUnitTypePirateShip);
aiPlanSetVariableInt(transportPlanID, cTransportPlanTransportID, 0, whichTransport);
break;
}

case 3:
{
gatherPoint=kbGetBlockPosition("3538");
targetPoint=kbGetBlockPosition("3543");

whichTransport = kbGetBlockID("3534");

aiPlanSetVariableInt(transportPlanID, cTransportPlanTransportTypeID, 0, cUnitTypePirateShip);
aiPlanSetVariableInt(transportPlanID, cTransportPlanTransportID, 0, whichTransport);
break;
}
}

aiPlanSetVariableBool(transportPlanID, cTransportPlanMaximizeXportMovement, 0, true);
aiPlanSetVariableVector(transportPlanID, cTransportPlanGatherPoint, 0, gatherPoint);
aiPlanSetVariableVector(transportPlanID, cTransportPlanTargetPoint, 0, targetPoint);

// Setting the base.
aiPlanSetBaseID( transportPlanID, baseID );

// Don't return when finished.
aiPlanSetVariableBool(transportPlanID, cTransportPlanReturnWhenDone, 0, false);

// Initial Position
aiPlanSetInitialPosition( transportPlanID, initialPosition );

aiPlanAddUnit(transportPlanID, whichTransport);
aiPlanSetActive(transportPlanID);
}
}

//=====================================================================================
// responseRangeSet
//=====================================================================================
void responseRangeSet(int parameter = -1)
{
// Drop the AI attack response distance to hopefully get guys running
// away bett4r.
aiSetAttackResponseDistance(0.0);
}

//==============================================================================
// MAIN.
//==============================================================================
void main(void)
{
//Startup.
miscStartup();
}

不会没看懂吧,保存成原来的文件名就好了.
全部回答
  • 1楼网友:佘樂
  • 2021-03-22 11:00
不能用文本文档的,还是直接给你发一个吧
  • 2楼网友:舍身薄凉客
  • 2021-03-22 10:35
我发过去了 再看看别人怎么说的。
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯