Esempio n. 1
0
//Clock para retirar jogadores da sala
void Pista0_clock()
{
	if(clock() >= tempo)
	{
		if(pista0 == FALSE)
		{
			return;
		}
		tempo = clock() + 900 * CLOCKS_PER_SEC;
		for(int i=1;i<99;i++)
		{
			int rid = i * 0x0410;
			int cX = PInt(rid + 0x015C6CEC);
			int cY = PInt(rid + 0x015C6CF0);
			if(cX >= 3321 && cY >= 1599 && cX <= 3461 && cY <= 1664)
			{
				DoTeleport(i,3284,1686);
			}
		}

		int itemslot1 = GetFirstSlotSADD(Lider1,0,64);
		int itemslot2 = GetFirstSlotSADD(Lider2,0,64);
		MOB *lider1 = (MOB*)GetMobFromIndex(Lider1);
		MOB *lider2 = (MOB*)GetMobFromIndex(Lider2);
	
		lider1->Inventory[itemslot1].Index = 5134;	
		lider1->Inventory[itemslot1].EF1 = 43;
		lider1->Inventory[itemslot1].EFV1 = 1;
		lider2->Inventory[itemslot2].Index = 5134;
		lider2->Inventory[itemslot2].EF1 = 43;
		lider2->Inventory[itemslot2].EFV1 = 1;

		for(int i=1000;i<32000;i++)
		{
			int rid = i * 0x0410;
			int cX = PInt(rid + 0x015C6CEC);
			int cY = PInt(rid + 0x015C6CF0);
			if(cX >= 3321 && cY >= 1599 && cX <= 3461 && cY <= 1664)
			{
				DeleteMob(i,5);
			}
		}
		PartyCount = 0;
		pista0 = FALSE;
		Lider1 = 0;
		Lider2 = 0;
		Spot1 = 0;
		Spot2 = 0;
		Spot3 = 0;
		Spot4 = 0;
		Spot5 = 0;
		Spot6 = 0;
		Spot7 = 0;
		Spot8 = 0;
		Spot9 = 0;
		Spot10 = 0;
	}
}
Esempio n. 2
0
void CWarTower::GuildProcess(tm *timeinfo)
{
	if (NewbieEventServer == 1 && timeinfo->tm_wday != 0 && timeinfo->tm_wday != 6 && timeinfo->tm_hour == GTorreHour)
	{
		if (GTorreState == 0 && timeinfo->tm_min <= 5)
		{
			sprintf(temp, g_pMessageStringTable[_DN_CHANNELWAR_BEGIN], 5);
			SendNotice(temp);
			GTorreState = 1;
			GTorreGuild = 0;
		}

		if (GTorreState == 1 && timeinfo->tm_min >= 6)
		{
			ClearArea(2445, 1850, 2546, 1920);

			GenerateMob(GTORRE, 0, 0);

			SendNotice(g_pMessageStringTable[_DN_BASEWORSTART]);
			GTorreState = 2;
		}

		//A Guerra acabou a guilda que está defendendo a torre recebe 50 de fama.
		if (GTorreState == 2 && timeinfo->tm_min == 59)
		{
			ClearArea(2445, 1850, 2546, 1920);

			for (int i = MAX_USER; i < MAX_MOB; i++)
			{
				if (pMob[i].GenerateIndex == GTORRE)
				{
					if (pMob[i].MOB.Guild)
					{
						int Group = ServerGroup;
						int Server = pMob[i].MOB.Guild / MAX_GUILD;
						int usGuild = pMob[i].MOB.Guild;

						char guildname[256];

						BASE_GetGuildName(Group, usGuild, guildname);

						MSG_GuildInfo sm;

						sm.Type = _MSG_GuildInfo;
						sm.Size = sizeof(MSG_GuildInfo);
						sm.ID = 0;

						sm.Guild = usGuild;
						GuildInfo[usGuild].Fame += 100;

						sm.GuildInfo = GuildInfo[usGuild];

						DBServerSocket.SendOneMessage((char*)&sm, sizeof(MSG_GuildInfo));

						sprintf(temp, "etc,war_tower1 guild:%d guild_fame:%d", usGuild, GuildInfo[usGuild].Fame);
						Log(temp, "-system", 0);
					}

					DeleteMob(i, 1);
				}
			}

			GTorreState = 0;
			GTorreGuild = 0;
		}
	}
}
Esempio n. 3
0
//Criação dos Lich's
void Pista0_2(int clientid, char *MobName)
{
	if(!pista0)
	{
		SendClientMsg(clientid,"Um erro ocorreu na pista #1");
		return;
	}
	if(strcmp(MobName,"PLich") == 0)//Lich correto.
	{
		lich1 = 2;
		SendNoticeArea(3384,1646,3343,1611,"O Lich foi derrotado.");
		for(int i=1000;i<32000;i++)
		{
			int rid = i * 0x0410;
			int cX = PInt(rid + 0x015C6CEC);
			int cY = PInt(rid + 0x015C6CF0);
			if(cX >= 3343 && cY >= 1611 && cX <= 3384 && cY <= 1646)
			{
				DeleteMob(i,5);
			}
		}
		for(int i = 0;i < 10;i++)
		{
			CreateMOB("PLugefer1",3364,1628,"pista");
			CreateMOB("PLugefer2",3372,1638,"pista");
			CreateMOB("PLugefer3",3353,1633,"pista");
			CreateMOB("PLugefer4",3352,1618,"pista");
			CreateMOB("PLugefer5",3373,1620,"pista");
		}
		Spot1 = 0;
		Spot2 = 0;
		Spot3 = 0;
		Spot4 = 0;
		Spot5 = 0;
	}
	else if(strcmp(MobName,"PLich1") == 0)//Lich correto.
	{
		lich2 = 2;
		SendNoticeArea(3438,1646,3397,1611,"O Lich foi derrotado.");
		for(int i=1000;i<32000;i++)
		{
			int rid = i * 0x0410;
			int cX = PInt(rid + 0x015C6CEC);
			int cY = PInt(rid + 0x015C6CF0);
			if(cX >= 3397 && cY >= 1611 && cX <= 3438 && cY <= 1646)
			{
				DeleteMob(i,5);
			}
		}
		for(int i = 0;i < 10;i++)
		{
			CreateMOB("PLugefer6",3416,1628,"pista");
			CreateMOB("PLugefer7",3404,1638,"pista");
			CreateMOB("PLugefer8",3425,1638,"pista");
			CreateMOB("PLugefer9",3426,1620,"pista");
			CreateMOB("PLugefer10",3407,1617,"pista");
		}
		Spot6 = 0;
		Spot7 = 0;
		Spot8 = 0;
		Spot9 = 0;
		Spot10 = 0;
	}
	else if(strcmp(MobName,"PLich_") == 0)//Lich Errado
	{
		lich1 = 1;
		GreenTimeMap(3384,1646,3343,1611,90);
		tempolich1 = clock() + 90 * CLOCKS_PER_SEC;
		SendNoticeArea(3384,1646,3343,1611,"O Lich ERRADO foi derrotado.");
		spotlich1 ++;
		if(spotlich1 >= 2) CreateMOB("PLich_",3364,1628,"pista"), spotlich1 = 0;
	}
	else if(strcmp(MobName,"PLich__") == 0)//Lich Errado
	{
		lich1 = 1;
		GreenTimeMap(3438,1646,3397,1611,90);
		tempolich2 = clock() + 90 * CLOCKS_PER_SEC;
		SendNoticeArea(3438,1646,3397,1611,"O Lich ERRADO foi derrotado.");
		spotlich2 ++;
		if(spotlich2 >= 2) CreateMOB("_PLich",3416,1628,"pista"), spotlich2 = 0;
	}
	else
	{
		SendClientMsg(clientid,"Um erro ocorreu na pista #2");
	}
}