ljlklkljlkj

View previous topic View next topic Go down

ljlklkljlkj

Post by user45 on Thu Mar 19, 2015 5:23 pm

{
class ScriptBase
{
int timeLapsed = 0;

List<ScriptEvent> events = new List<ScriptEvent>();


}

/// <summary>
/// Sample action text.
/// 5 spawn peasant pos1 ?? това не е достатъчно няма waypoint
/// 10 spawn peasant wp2 - на десетата секунда да направи peasant и да му даде waypointpath2
/// 15 spawn peasant wp2 - на 15-тата сек нов peasant на waypointPath 2
/// </summary>
class ScriptEvent
{
public int Second = 0;
public string ActionText = "";
// <second> <cmd> <subcmd> <pos>

// <pos: pos1|pos2>
// <second: integer коя секунда да се извика този мап евент
// spawn <creature> <pos> - създава нов creature на pos1 със waypoint1 - default
// spawn <creature> wp1 - създава нов creature на избрания waypointPath1, веднага се поставя на waypointStart
// spawn <creature> <faction>


}
}

user45

Posts : 324
Points : 738
Reputation : 0
Join date : 2014-09-11

View user profile

Back to top Go down

Re: ljlklkljlkj

Post by user45 on Thu Mar 19, 2015 5:33 pm

CommandMgr

string prefix = string.Empty;
int ipos = -1;

// get first the second to fire
ipos = cmd.Indexof(' ');
prefix = cmd.SubString(0, ipos-1);
cmd = cmd.Remove(0,ipos);
switch(prefix)
{
case "spawn":

break;
case "announce":
string messageToAnnounce = cmd;
break;


}

user45

Posts : 324
Points : 738
Reputation : 0
Join date : 2014-09-11

View user profile

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum