close_btn
로그인, 회원가입후 더 많은 혜택을 누리세요 로그인 회원가입 닫기

공지사항 소스 자동발송

2016.04.02 18:24

으으럇차차 조회 수:175

#include <process.h>
#include "stdafx.h"
#include "Utilidades.h"
#include "NewsSystem.h"
#define NewFile "..\\MuData\\Mu_News.txt"

void NewsSystemClass__InsideTrigger(void * lpParam)
{
 FILE *fp;
 fp=fopen("..\\MuData\\Mu_News.txt","rb");
 if(!fp)
 {
  MessageBoxA(NULL,"Mu_News.txt not found!","Error!",MB_OK);
  ::ExitProcess(0);
 }

 while(true)
 {
  char MSG01[58];
  char MSG02[58];
  char MSG03[58];
  int IsNews = GetPrivateProfileIntA("General","MuIsNewsSystem",0,NewFile);
  int Sections = GetPrivateProfileIntA("General","MuNewsSections",0,NewFile);
  long time = GetPrivateProfileIntA("General","MuTimeBtwEachNew",0,NewFile) * 60000;
  if(Sections > 5 || Sections <= 0 || IsNews == 0)
  {
   _endthread();
  }
  Sleep(time);
  GetPrivateProfileStringA("News","MuNew01","This server uses MuTeam Server Files!",MSG01,58,NewFile);
  GetPrivateProfileStringA("News","MuNew02","This server uses MuTeam Server Files!",MSG02,58,NewFile);
  GetPrivateProfileStringA("News","MuNew03","This server uses MuTeam Server Files!",MSG03,58,NewFile);
  StringSendAll(MSG01,0);
  StringSendAll(MSG02,0);
  StringSendAll(MSG03,0);
  if(Sections >= 2)
  {
   Sleep(time);
   GetPrivateProfileStringA("News","MuNew04","This server uses MuTeam Server Files!",MSG01,58,NewFile);
   GetPrivateProfileStringA("News","MuNew05","This server uses MuTeam Server Files!",MSG02,58,NewFile);
   GetPrivateProfileStringA("News","MuNew06","This server uses MuTeam Server Files!",MSG03,58,NewFile);
   StringSendAll(MSG01,0);
   StringSendAll(MSG02,0);
   StringSendAll(MSG03,0);
  }
  if(Sections >= 3)
  {
   Sleep(time);
   GetPrivateProfileStringA("News","MuNew07","This server uses MuTeam Server Files!",MSG01,58,NewFile);
   GetPrivateProfileStringA("News","MuNew08","This server uses MuTeam Server Files!",MSG02,58,NewFile);
   GetPrivateProfileStringA("News","MuNew09","This server uses MuTeam Server Files!",MSG03,58,NewFile);
   StringSendAll(MSG01,0);
   StringSendAll(MSG02,0);
   StringSendAll(MSG03,0);
  }
  if(Sections >= 4)
  {
   Sleep(time);
   GetPrivateProfileStringA("News","MuNew10","This server uses MuTeam Server Files!",MSG01,58,NewFile);
   GetPrivateProfileStringA("News","MuNew11","This server uses MuTeam Server Files!",MSG02,58,NewFile);
   GetPrivateProfileStringA("News","MuNew12","This server uses MuTeam Server Files!",MSG03,58,NewFile);
   StringSendAll(MSG01,0);
   StringSendAll(MSG02,0);
   StringSendAll(MSG03,0);
  }
  if(Sections == 5)
  {
   Sleep(time);
   GetPrivateProfileStringA("News","MuNew13","This server uses MuTeam Server Files!",MSG01,58,NewFile);
   GetPrivateProfileStringA("News","MuNew14","This server uses MuTeam Server Files!",MSG02,58,NewFile);
   GetPrivateProfileStringA("News","MuNew15","This server uses MuTeam Server Files!",MSG03,58,NewFile);
   StringSendAll(MSG01,0);
   StringSendAll(MSG02,0);
   StringSendAll(MSG03,0);
  }
 }
 _endthread();
}

번호 제목 글쓴이 날짜 조회 수
공지 소스자료는 직접 올려주세요 게임존 2017.06.06 582
26 열혈강호 9.0-10.0 ybi.cfg 100% 올 한글화 file 로이로이1 2016.04.25 279
25 [라그나로크] 전장 시스템 file 로이로이1 2016.04.24 36
24 레드문 새로운DB 설명서참조★★ file 향수의추억 2016.04.18 221
23 레드문 한글DB 파일 file 향수의추억 2016.04.18 174
22 ZTeam 시즌 6 클라(dll) 소스 file 이호성 2016.04.18 184
21 뮤 RC웹 시즌1 부터 3까지 file 초아 2016.04.18 85
20 Loader 소스 이호성 2016.04.18 115
19 뮤 메이커 소스 이호성 2016.04.17 165
18 zterm mu soruce 파일 공유 [2] file 날아라비바쇼 2016.04.14 52
17 런유오 - 머니트리 file 늘도도 2016.04.13 31
16 런유오 - 게이트 키퍼 file 늘도도 2016.04.13 36
» 공지사항 소스 자동발송 으으럇차차 2016.04.02 175
14 뮤 핵체크 오프셋값 코드 [1] 으으럇차차 2016.04.02 223
13 게임서버 클레스값 으으럇차차 2016.04.02 171
12 몬스터 및 아이템 오프셋 으으럇차차 2016.04.02 142
11 맵 소스 rc로 변경가능 file 으으럇차차 2016.04.02 102
10 상점 엑템판매 함수 file 으으럇차차 2016.04.02 133
9 오프셋값 1.00.87 file 으으럇차차 2016.04.02 66
8 뮤 시즌5 한국프로토콜 값 소스 입니다. file 으으럇차차 2016.04.02 172
7 뮤 아이템 드랍 및 세트아이템 드랍 소스 입니다. [2] file 으으럇차차 2016.04.02 415
6 네이버 접속기 만드는 소스라네요 ~ file 힙도그 2016.03.24 201
5 리니지2 Ertheia -- Epic tale of Aden precompiled server source [1] file 돌맨 2016.03.21 178
4 4.8 ac-core 팩 소스 입니다 [2] file 초연1 2016.03.11 400
3 서버팩 교체, 업데이트 방법입니다. [1] 쿄뉴 2016.03.10 640
2 던파 보조장비 필요퀘스트아이템 붉은눈 2016.02.15 560
1 비교분석. 레벨업권. 뭐가 다를까요 [1] 붉은눈 2016.02.12 144