PDA

View Full Version : |Source| PostVIP



LorenStudio
27/10/2020, 04:48 PM
Bom como eu ando fazendo 2 projetos quase solo as vezes a cabeça esquenta e vou brincar um pouco na source de mu tals.. no meio dessa brincadeira eu acabei fazendo um sistema antigo de post vip.

OBS: ESSA NÃO É A MELHOR FORMA DE SE FAZER ISSO, USE ESSA BASE PARA APRIMORAR O MESMO.


CommandManager.cpp

bool CCommandManager::CommandPost(LPOBJ lpObj,char* arg) // OK{


gFilter.CheckSyntax(arg);


if (gServerInfo.m_CommandPostVIP[lpObj->AccountLevel] == 0)
{
GDGlobalPostSend(gMapServerManager.GetMapServerGro up(),0,lpObj->Name,arg);

}


if (gServerInfo.m_CommandPostVIP[lpObj->AccountLevel] == 1)
{
PostMessage2(lpObj->Name,gMessage.GetMessage(1534),arg);

}
if(gServerInfo.m_CommandPostVIP[lpObj->AccountLevel] == 2)
{
PostMessage3(lpObj->Name,gMessage.GetMessage(1535),arg);

}


if(gServerInfo.m_CommandPostVIP[lpObj->AccountLevel] == 3)
{
PostMessage4(lpObj->Name,gMessage.GetMessage(1536),arg);

}


gLog.Output(LOG_COMMAND,"[CommandPost][%s][%s] - (Message: %s)",lpObj->Account,lpObj->Name,arg);


return 1;

}


ServerInfo.H

int m_CommandPostVIP[MAX_ACCOUNT_LEVEL];

ServerInfo.CPP

this->m_CommandPostVIP[0] = GetPrivateProfileInt(section,"CommandPostVIP_AL0",0,path);

this->m_CommandPostVIP[1] = GetPrivateProfileInt(section,"CommandPostVIP_AL1",1,path);


this->m_CommandPostVIP[2] = GetPrivateProfileInt(section,"CommandPostVIP_AL2",2,path);



this->m_CommandPostVIP[3] = GetPrivateProfileInt(section,"CommandPostVIP_AL3",3,path);


Message.txt


1534 "[FREE] %s"
1535 "[VIP1] %s"
1536 "[VIP2] %s"


LEMBRANDO USE ISSO COMO BASE PARA FAZER ALGO MELHOR!!

Denis Alves
27/10/2020, 07:18 PM
Isso é muito bom cara, alguns sistemas eu acredito que merecem modificações mas nunca pensei nesse sistema.

Parabéns!!!

Ravoc
27/10/2020, 08:36 PM
Perfeito, obrigado pela colaboração.

[Only registered and activated users can see links]

antoniodel
27/10/2020, 10:42 PM
Legal, eu fiz algo parecido no meu S8, criei um certo tipo de post com a fonte diferenciada das normais, mudei a cor e deixei como um suporte poste para ambas as salas.
Gostei do seu ficou legal, parabens.

Ada
18/01/2021, 09:27 PM
Olá,

Deixa eu vê se eu entendi.
Ao utilizar o comando Post esse sistema exibe ao lado do nick o Level VIP do usuário?

Abraço.

cri0
18/01/2021, 09:49 PM
Olá,

Deixa eu vê se eu entendi.
Ao utilizar o comando Post esse sistema exibe ao lado do nick o Level VIP do usuário?

Abraço.

Isso mesmo.

robsonsoares
19/01/2021, 08:40 PM
Bom como eu ando fazendo 2 projetos quase solo as vezes a cabeça esquenta e vou brincar um pouco na source de mu tals.. no meio dessa brincadeira eu acabei fazendo um sistema antigo de post vip.

OBS: ESSA NÃO É A MELHOR FORMA DE SE FAZER ISSO, USE ESSA BASE PARA APRIMORAR O MESMO.


CommandManager.cpp

bool CCommandManager::CommandPost(LPOBJ lpObj,char* arg) // OK{


gFilter.CheckSyntax(arg);


if (gServerInfo.m_CommandPostVIP[lpObj->AccountLevel] == 0)
{
GDGlobalPostSend(gMapServerManager.GetMapServerGro up(),0,lpObj->Name,arg);

}


if (gServerInfo.m_CommandPostVIP[lpObj->AccountLevel] == 1)
{
PostMessage2(lpObj->Name,gMessage.GetMessage(1534),arg);

}
if(gServerInfo.m_CommandPostVIP[lpObj->AccountLevel] == 2)
{
PostMessage3(lpObj->Name,gMessage.GetMessage(1535),arg);

}


if(gServerInfo.m_CommandPostVIP[lpObj->AccountLevel] == 3)
{
PostMessage4(lpObj->Name,gMessage.GetMessage(1536),arg);

}


gLog.Output(LOG_COMMAND,"[CommandPost][%s][%s] - (Message: %s)",lpObj->Account,lpObj->Name,arg);


return 1;

}


ServerInfo.H

int m_CommandPostVIP[MAX_ACCOUNT_LEVEL];

ServerInfo.CPP

this->m_CommandPostVIP[0] = GetPrivateProfileInt(section,"CommandPostVIP_AL0",0,path);

this->m_CommandPostVIP[1] = GetPrivateProfileInt(section,"CommandPostVIP_AL1",1,path);


this->m_CommandPostVIP[2] = GetPrivateProfileInt(section,"CommandPostVIP_AL2",2,path);



this->m_CommandPostVIP[3] = GetPrivateProfileInt(section,"CommandPostVIP_AL3",3,path);


Message.txt


1534 "[FREE] %s"
1535 "[VIP1] %s"
1536 "[VIP2] %s"


LEMBRANDO USE ISSO COMO BASE PARA FAZER ALGO MELHOR!!



opa blz??

o meu esta com esses erros

[Only registered and activated users can see links]

Ada
20/01/2021, 12:01 AM
Olá, robsonsoares tudo bem?

Estou mexendo em Source de MU Online tem apenas alguns dias, caso eu esteja errado peço por gentileza que alguém mais experiente em Programação de MU Online me corrija.

Acredito que seja variáveis não declaradas, o nome delas variam de Source para Source.
Exemplo a coluna AccountLevel aonde fica armazenado o tipo de Vip, em alguns MuServer o nome é apenas Vip.
Dê uma estudada no seu código fonte, assim fica mais fácil você adaptar esse sistema em seu Release.
Espero ter ajudado.

Abraço.

LorenStudio
20/01/2021, 07:50 AM
opa blz??

o meu esta com esses erros

[Only registered and activated users can see links]
Você substituiu o padrão?

robsonsoares
20/01/2021, 06:41 PM
Você substituiu o padrão?



nao apenas adicionei


Olá, robsonsoares tudo bem?

Estou mexendo em Source de MU Online tem apenas alguns dias, caso eu esteja errado peço por gentileza que alguém mais experiente em Programação de MU Online me corrija.

Acredito que seja variáveis não declaradas, o nome delas variam de Source para Source.
Exemplo a coluna AccountLevel aonde fica armazenado o tipo de Vip, em alguns MuServer o nome é apenas Vip.
Dê uma estudada no seu código fonte, assim fica mais fácil você adaptar esse sistema em seu Release.
Espero ter ajudado.

Abraço.


entendi...
so que nao entendo muito desta area estou querendo aprender sew vc tiver alguns videos para aprendizado e poder fornecer agradeceria de coração

Ada
21/01/2021, 02:13 PM
Olá, robsonsoares boa tarde.

Infelizmente eu não possuo nenhum vídeo referente a desenvolvimento de MU Online.
Mais te indico estudar Lógica de Programação, pra você ter uma base de como funciona uma estrutura de um código C++, não apenas desta Linguagem, mais de tantas outras.

Abraço.

robsonsoares
21/01/2021, 04:18 PM
Olá, robsonsoares boa tarde.

Infelizmente eu não possuo nenhum vídeo referente a desenvolvimento de MU Online.
Mais te indico estudar Lógica de Programação, pra você ter uma base de como funciona uma estrutura de um código C++, não apenas desta Linguagem, mais de tantas outras.

Abraço.


obrigado pela atenção

10 Dias 19 Horas:------- Atualizado -------

As minhas mensagens fica assim

sendo a ja add elas em Messagens,txt


[Only registered and activated users can see links]

2 minutes:------- Atualizado -------


Bom como eu ando fazendo 2 projetos quase solo as vezes a cabeça esquenta e vou brincar um pouco na source de mu tals.. no meio dessa brincadeira eu acabei fazendo um sistema antigo de post vip.

OBS: ESSA NÃO É A MELHOR FORMA DE SE FAZER ISSO, USE ESSA BASE PARA APRIMORAR O MESMO.


CommandManager.cpp

bool CCommandManager::CommandPost(LPOBJ lpObj,char* arg) // OK{


gFilter.CheckSyntax(arg);


if (gServerInfo.m_CommandPostVIP[lpObj->AccountLevel] == 0)
{
GDGlobalPostSend(gMapServerManager.GetMapServerGro up(),0,lpObj->Name,arg);

}


if (gServerInfo.m_CommandPostVIP[lpObj->AccountLevel] == 1)
{
PostMessage2(lpObj->Name,gMessage.GetMessage(1534),arg);

}
if(gServerInfo.m_CommandPostVIP[lpObj->AccountLevel] == 2)
{
PostMessage3(lpObj->Name,gMessage.GetMessage(1535),arg);

}


if(gServerInfo.m_CommandPostVIP[lpObj->AccountLevel] == 3)
{
PostMessage4(lpObj->Name,gMessage.GetMessage(1536),arg);

}


gLog.Output(LOG_COMMAND,"[CommandPost][%s][%s] - (Message: %s)",lpObj->Account,lpObj->Name,arg);


return 1;

}


ServerInfo.H

int m_CommandPostVIP[MAX_ACCOUNT_LEVEL];

ServerInfo.CPP

this->m_CommandPostVIP[0] = GetPrivateProfileInt(section,"CommandPostVIP_AL0",0,path);

this->m_CommandPostVIP[1] = GetPrivateProfileInt(section,"CommandPostVIP_AL1",1,path);


this->m_CommandPostVIP[2] = GetPrivateProfileInt(section,"CommandPostVIP_AL2",2,path);



this->m_CommandPostVIP[3] = GetPrivateProfileInt(section,"CommandPostVIP_AL3",3,path);


Message.txt


1534 "[FREE] %s"
1535 "[VIP1] %s"
1536 "[VIP2] %s"


LEMBRANDO USE ISSO COMO BASE PARA FAZER ALGO MELHOR!![/


Meus Post ficam assim

ja add no Messagen.txt

[Only registered and activated users can see links]

5 Horas 24 minutes:------- Atualizado -------

[quote=luciferlgs;51637]bom como eu ando fazendo 2 projetos quase solo as vezes a cabeça esquenta e vou brincar um pouco na source de mu tals.. No meio dessa brincadeira eu acabei fazendo um sistema antigo de post vip.

Obs: Essa não é a melhor forma de se fazer isso, use essa base para aprimorar o mesmo.


Commandmanager.cpp

bool ccommandmanager::commandpost(lpobj lpobj,char* arg) // ok{


gfilter.checksyntax(arg);


if (gserverinfo.m_commandpostvip[lpobj->accountlevel] == 0)
{
gdglobalpostsend(gmapservermanager.getmapservergro up(),0,lpobj->name,arg);

}


if (gserverinfo.m_commandpostvip[lpobj->accountlevel] == 1)
{
postmessage2(lpobj->name,gmessage.getmessage(1534),arg);

}
if(gserverinfo.m_commandpostvip[lpobj->accountlevel] == 2)
{
postmessage3(lpobj->name,gmessage.getmessage(1535),arg);

}


if(gserverinfo.m_commandpostvip[lpobj->accountlevel] == 3)
{
postmessage4(lpobj->name,gmessage.getmessage(1536),arg);

}


glog.output(log_command,"[commandpost][%s][%s] - (message: %s)",lpobj->account,lpobj->name,arg);


return 1;

}


serverinfo.h

int m_commandpostvip[max_account_level];

serverinfo.cpp

this->m_commandpostvip[0] = getprivateprofileint(section,"commandpostvip_al0",0,path);

this->m_commandpostvip[1] = getprivateprofileint(section,"commandpostvip_al1",1,path);


this->m_commandpostvip[2] = getprivateprofileint(section,"commandpostvip_al2",2,path);



this->m_commandpostvip[3] = getprivateprofileint(section,"commandpostvip_al3",3,path);


message.txt


1534 "[free] %s"
1535 "[vip1] %s"
1536 "[vip2] %s"


lembrando use isso como base para fazer algo melhor!!




pode dar um help??

LorenStudio
01/02/2021, 05:34 PM
obrigado pela atenção

10 Dias 19 Horas:------- Atualizado -------

As minhas mensagens fica assim

sendo a ja add elas em Messagens,txt


[Only registered and activated users can see links]

2 minutes:------- Atualizado -------

[QUOTE=LuciferLGS;51637]Bom como eu ando fazendo 2 projetos quase solo as vezes a cabeça esquenta e vou brincar um pouco na source de mu tals.. no meio dessa brincadeira eu acabei fazendo um sistema antigo de post vip.

OBS: ESSA NÃO É A MELHOR FORMA DE SE FAZER ISSO, USE ESSA BASE PARA APRIMORAR O MESMO.


CommandManager.cpp

bool CCommandManager::CommandPost(LPOBJ lpObj,char* arg) // OK{


gFilter.CheckSyntax(arg);


if (gServerInfo.m_CommandPostVIP[lpObj->AccountLevel] == 0)
{
GDGlobalPostSend(gMapServerManager.GetMapServerGro up(),0,lpObj->Name,arg);

}


if (gServerInfo.m_CommandPostVIP[lpObj->AccountLevel] == 1)
{
PostMessage2(lpObj->Name,gMessage.GetMessage(1534),arg);

}
if(gServerInfo.m_CommandPostVIP[lpObj->AccountLevel] == 2)
{
PostMessage3(lpObj->Name,gMessage.GetMessage(1535),arg);

}


if(gServerInfo.m_CommandPostVIP[lpObj->AccountLevel] == 3)
{
PostMessage4(lpObj->Name,gMessage.GetMessage(1536),arg);

}


gLog.Output(LOG_COMMAND,"[CommandPost][%s][%s] - (Message: %s)",lpObj->Account,lpObj->Name,arg);


return 1;

}


ServerInfo.H

int m_CommandPostVIP[MAX_ACCOUNT_LEVEL];

ServerInfo.CPP

this->m_CommandPostVIP[0] = GetPrivateProfileInt(section,"CommandPostVIP_AL0",0,path);

this->m_CommandPostVIP[1] = GetPrivateProfileInt(section,"CommandPostVIP_AL1",1,path);


this->m_CommandPostVIP[2] = GetPrivateProfileInt(section,"CommandPostVIP_AL2",2,path);



this->m_CommandPostVIP[3] = GetPrivateProfileInt(section,"CommandPostVIP_AL3",3,path);


Message.txt


1534 "[FREE] %s"
1535 "[VIP1] %s"
1536 "[VIP2] %s"


LEMBRANDO USE ISSO COMO BASE PARA FAZER ALGO MELHOR!![/


Meus Post ficam assim

ja add no Messagen.txt

[Only registered and activated users can see links]

5 Horas 24 minutes:------- Atualizado -------






pode dar um help??
Me mande pm com alguma forma de contato rapida assim posso lhe ajudar

robsonsoares
01/02/2021, 06:08 PM
[QUOTE=robsonsoares;53405]obrigado pela atenção

10 Dias 19 Horas:------- Atualizado -------

As minhas mensagens fica assim

sendo a ja add elas em Messagens,txt


[Only registered and activated users can see links]

2 minutes:------- Atualizado -------


Me mande pm com alguma forma de contato rapida assim posso lhe ajudar


MANDEI la no seu pm

deu isso



LuciferLGS excedeu sua cota de mensagens privadas armazenadas e não pode aceitar mais mensagens até que liberem algum espaço.


OBRIGADO

@LuciferLGS

PELA AJUDA SISTEMA TA 100% LISO NO MEU PC!!

OBRIGADO MESMO