MMORPG
Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.
Últimos assuntos
» Eclipse naruto V1.0,1.1
Comando /afk (Ausente). I_icon_minitimeTer Out 28, 2014 8:44 am por Kaue

» { Equipemanto }
Comando /afk (Ausente). I_icon_minitimeQua Mar 26, 2014 8:24 pm por Emanuelb2

» Ajuda :D plis
Comando /afk (Ausente). I_icon_minitimeTer Mar 11, 2014 9:00 pm por jamethon

» [Deleta por favo esse topico]
Comando /afk (Ausente). I_icon_minitimeSeg Mar 10, 2014 10:55 pm por Emanuelb2

» [PERGUNTA] Como Por sistemas de reset automático e diminuir os mapas? [ EEB ]
Comando /afk (Ausente). I_icon_minitimeSeg Mar 10, 2014 10:25 pm por Kaue

» [Recrutamento] PA ( para quem sabe manusear Pixel Art )
Comando /afk (Ausente). I_icon_minitimeDom Mar 09, 2014 8:41 pm por Kaue

» Eclipse Origins 2.0 DOWLOAD(ATT)
Comando /afk (Ausente). I_icon_minitimeDom Mar 09, 2014 6:10 pm por Emanuelb2

» Ganhar Item ao Matar Player
Comando /afk (Ausente). I_icon_minitimeDom Mar 09, 2014 6:15 am por Kaue

» Oque acontece com o administrador do forum!
Comando /afk (Ausente). I_icon_minitimeSex Mar 07, 2014 3:21 pm por Kaue

Parceiros
Fórum grátis


Comando /afk (Ausente).

Ir para baixo

Comando /afk (Ausente). Empty Comando /afk (Ausente).

Mensagem por *Star* Qua Dez 19, 2012 6:58 pm

Bom vamos la:Server>Script>"Principal ou Main"

Procure por:

Código:

If LCase(Trim(TextSay)) = "/admin" Then
        If GetPlayerAccess(index) > 0 Then
            Call PlayerMsg(index, "Comandos Sociais:", 15)
            Call PlayerMsg(index, ";mensagem = Mensagem Global", 15)
            Call PlayerMsg(index, "@mensagem = Mensagem Administrativa", 15)
            Call PlayerMsg(index, "Para mais comandos digite: /admincmd", 15)
        End If
    Exit Sub
    End If

Abaixo adicione:

Código:

Select Case LCase(Trim(TextSay))   
Case "/afk"
'If GetPlayerAccess(index) >= 1 Then[/color]
[b]If GetVar("Contas" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Status") = 0 Then
Call GlobalMsg(GetPlayerName(index) & " está ausente.", 14)
Call PutVar("Contas" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Status", 1)
Call PutVar("Contas" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "TempPlayerName", GetPlayerName(index))
Call SetPlayerName(index, GetPlayerName(index) & " (AFK)")
Call SendPlayerData(index)
Exit Sub
ElseIf GetVar("Contas" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Status") = 1 Then
Call SetPlayerName(index, GetVar("Contas" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "TempPlayerName"))
Call GlobalMsg(GetPlayerName(index) & " retornou.", 14)
Call PutVar("Contas" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Status", 0)
Call SendPlayerData(index)
Exit Sub
End If

Testado e Aprovado!

Explicação:

Código:

Select Case LCase(Trim(TextSay))
Case "/afk"'O Comando
'If GetPlayerAccess(index) >= 1 Then 'aki quer dizer que apenas acesso 1 ou superior poderam usar.
If GetVar("Contas\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Status") = 0 Then 'manda para o servidor.
Call GlobalMsg(GetPlayerName(index) & " está AFK.", 14)'mensagem que aparecera quando usado o Comando
Call PutVar("Contas\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Status", 1)
Call PutVar("Contas\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "TempPlayerName", GetPlayerName(index))
Call SetPlayerName(index, GetPlayerName(index) & " (AFK)")' ficara do lado do seu nome
Call SendPlayerData(index)
Exit Sub
ElseIf GetVar("Contas\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Status") = 1 Then
Call SetPlayerName(index, GetVar("Contas\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "TempPlayerName"))
Call GlobalMsg(GetPlayerName(index) & " retornou.", 14)aki mostra q vc "Voltou" retorno
Call PutVar("Contas\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Status", 0)
Call SendPlayerData(index)
Exit Sub
End If
*Star*
*Star*

Mensagens : 9
Pontos : 28
Reputação : 1
Data de inscrição : 19/12/2012
Idade : 28

Ir para o topo Ir para baixo

Ir para o topo


 
Permissões neste sub-fórum
Não podes responder a tópicos