Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.


Você não está conectado. Conecte-se ou registre-se

Ver o tópico anterior Ver o tópico seguinte Ir para baixo Mensagem [Página 1 de 1]

1Sistema de Guild Empty Sistema de Guild Seg Jun 04, 2012 8:46 pm

Strike
Strike
Membro
Membro

Features:
Invites- Quando um jogador envia um convite para outro jogador, que terá 2 minutos para aceitar / rejeitar ou ele irá automaticamente diminuir os jogadores só podem ter um convite de uma vez.

Founder- Só pode haver um fundador de uma vez em uma guilda que não pode ser expulso e não pode ter privilégios restritos (pode fazer período de nada). Você pode transferir o status de fundador para outro jogador com o /founder (nome) comando.

Guild Ranks- Cada guild pode ter suas fileiras guilda próprios (nomes personalizados), cada guild também tem seu próprio conjunto de permissão guild (veja abaixo).

Guild Permission- Os líderes da guilda pode definir o que cada categoria pode fazer, que incluem: Kickar membros, dar acessos, recrutar úsuarios, editar opções de úsuarios e ranks... etc.
Nome da Guild sobre a cabeça do player.

Comandos da Guild:
Criar Guild: /guild make
Para transferir o acesso de fundador, use /guild founder (nome)
Invitar para Guild: /guild invite (name)
Sair da Guild: /guild leave
Abrir Painel de Adm da Guild: /guild admin
Kickar da Guild: /guild kick (name)
Deletar a Guild: /guild disband yes
Ver Úsuarios Online da Guild: /guild view (online/all/offline)
Você também pode falar com o chat da guild com o comando: ( ;mensagem )




Baixe os Download dos arquivos para por nas pastas,para que você possa instalar com sucesso o sistema de guild em sua engine.!

Server
1.Coloque o modGuild.bas na pasta de onde fica as sourcers.
2.No VB6, arraste as mods do server pra dentro do projeto.
3.Certifique-se de colocar os arquivos .bas na pasta "src", e depois arrastalos para dentro do vb6 do projeto.

Client
- Faça o mesmo processo que no Server, coloque os arquivos da guild na pasta src, e depois arraste para dentro do projeto


Faça um backup antes de adicionar o sistema, para previnir-se

******************************************************************************

SERVER

Procure por:

Código:
    Call SetStatus("Clearing animations...")
    Call ClearAnimations

Abaixo add:

Código:

    Call SetStatus("Clearing guilds...")
    Call ClearGuilds

--------------------------------------------------------------

Procure por:

Código:

    HandleDataSub(CPartyLeave) = GetAddress(AddressOf HandlePartyLeave)

Abaixo Add:

Código:

    HandleDataSub(CSayGuild) = GetAddress(AddressOf HandleGuildMsg)
    HandleDataSub(CGuildCommand) = GetAddress(AddressOf HandleGuildCommands)
    HandleDataSub(CSaveGuild) = GetAddress(AddressOf HandleGuildSave)

--------------------------------------------------------------
Procure por:(Function PlayerData):

Código:
    Buffer.WriteLong GetPlayerX(index)
    Buffer.WriteLong GetPlayerY(index)
    Buffer.WriteLong GetPlayerDir(index)
    Buffer.WriteLong GetPlayerAccess(index)
    Buffer.WriteLong GetPlayerPK(index)
   
    For i = 1 To Stats.Stat_Count - 1
        Buffer.WriteLong GetPlayerStat(index, i)
    Next

Abaixo Add:

Código:
    If Player(index).GuildFileId > 0 Then
        If TempPlayer(index).tmpGuildSlot > 0 Then
            Buffer.WriteByte 1
            Buffer.WriteString GuildData(TempPlayer(index).tmpGuildSlot).Guild_Name
        End If
    Else
        Buffer.WriteByte 0
    End If

--------------------------------------------------------------

Procure por:

Código:
    ' General
    Name As String * ACCOUNT_LENGTH
    Sex As Byte
    Class As Long
    Sprite As Long
    Level As Byte
    exp As Long
    Access As Byte
    PK As Byte
Abaixo Add:

Código:
    GuildFileId As Long
    GuildMemberId As Long

-------------------------------------------------------------

Procure por:
Código:

Public Type TempPlayerRec

Abaixo add
Código:

    tmpGuildSlot As Long
    tmpGuildInviteSlot As Long
    tmpGuildInviteTimer As Long

--------------------------------------------------------------

Procure por:

Código:
        ' Checks to save players every 5 minutes - Can be tweaked
        If Tick > LastUpdateSavePlayers Then
            UpdateSavePlayers
            LastUpdateSavePlayers = GetTickCount  300000
        End If

Abaixo Add:
Código:

        'Handles Guild Invites
        For i = 1 To Player_HighIndex
            If IsPlaying(i) Then
                If TempPlayer(i).tmpGuildInviteSlot > 0 Then
                    If Tick > TempPlayer(i).tmpGuildInviteTimer Then
                        If GuildData(TempPlayer(i).tmpGuildInviteSlot).In_Use = True Then
                            PlayerMsg i, "Time ran out to join " & GuildData(TempPlayer(i).tmpGuildInviteSlot).Guild_Name & ".", BrightRed
                            TempPlayer(i).tmpGuildInviteSlot = 0
                            TempPlayer(i).tmpGuildInviteTimer = 0
                        Else
                            'Just remove this guild has been unloaded
                            TempPlayer(i).tmpGuildInviteSlot = 0
                            TempPlayer(i).tmpGuildInviteTimer = 0
                        End If
                    End If
                End If
            End If
        Next i

--------------------------------------------------------------

Procure por:(modEnumerations):

Código:
    SPartyInvite
    SPartyUpdate
    SPartyVitals

Abaixo add:

Código:
    SSendGuild
    SAdminGuild
    SGuildAdminSwitchTab

--------------------------------------------------------------

Procure por:(modEnumerations):

Código:
    CDeclineParty
    CPartyLeave

Abaixo Add:

Código:
    CGuildCommand
    CSayGuild
    CSaveGuild
    CRequestGuildAdminTabSwitch

--------------------------------------------------------------

Procure por:

Código:
    ' Send welcome messages
    Call SendWelcome(index)

Abaixo Add
Código:
    'Do all the guild start up checks
    Call GuildLoginCheck(index)

--------------------------------------------------------------

Procure por:(sub LeftGame):

Código:
        ' leave party.
        Party_PlayerLeave index

Abaixo Add:

Código:
        If Player(index).GuildFileId > 0 Then
            'Set player online flag off
            GuildData(TempPlayer(index).tmpGuildSlot).Guild_Members(Player(index).GuildMemberId).Online = False
            Call CheckUnloadGuild(TempPlayer(index).tmpGuildSlot)
        End If

--------------------------------------------------------------

Procure por:
Código:

    ' Check if the master charlist file exists for checking duplicate names, and if it doesnt make it
    If Not FileExist("data\accounts\charlist.txt") Then
        F = FreeFile
        Open App.Path & "\data\accounts\charlist.txt" For Output As #F
        Close #F
    End If

Abaixo Add:

Código:
    Call Set_Default_Guild_Ranks

---------------------------------------------------------------

Procure por:

Código:
    ChkDir App.Path & "\Data", "spells"

Abaixo Add:
Código:

    ChkDir App.Path & "\Data", "guilds"


CLIENT

Procure por:

Código:
Public Sub DrawPlayerName(ByVal Index As Long)
Dim TextX As Long
Dim TextY As Long
Dim color As Long
Dim Name As String

Abaixo Add:

Código:
Dim Text2X As Long
Dim Text2Y As Long
Dim GuildString As String

--------------------------------------------------------------

Procure por:

Código:
    Name = Trim$(Player(Index).Name)
    ' calc pos
    TextX = ConvertMapX(GetPlayerX(Index) * PIC_X)  Player(Index).XOffset  (PIC_X \ 2) - getWidth(TexthDC, (Trim$(Name)))

Abaixo Add:
Código:
    GuildString = Player(Index).GuildName
    Text2X = ConvertMapX(GetPlayerX(Index) * PIC_X)  Player(Index).XOffset  (PIC_X \ 2) - getWidth(TexthDC, (Trim$(GuildString)))

--------------------------------------------------------------

Procure por:
Código:

    If GetPlayerSprite(Index) < 1 Or GetPlayerSprite(Index) > NumCharacters Then
        TextY = ConvertMapY(GetPlayerY(Index) * PIC_Y)  Player(Index).YOffset - 16
    Else
        ' Determine location for text
        TextY = ConvertMapY(GetPlayerY(Index) * PIC_Y)  Player(Index).YOffset - (DDSD_Character(GetPlayerSprite(Index)).lHeight / 4)  16
    End If

Substitua por:

Código:
    If GetPlayerSprite(Index) < 1 Or GetPlayerSprite(Index) > NumCharacters Then
        TextY = ConvertMapY(GetPlayerY(Index) * PIC_Y)  Player(Index).YOffset - 16
        'Guild TUT
        Text2Y = ConvertMapY(GetPlayerY(Index) * PIC_Y)  Player(Index).YOffset
    Else
        ' Determine location for text
        TextY = ConvertMapY(GetPlayerY(Index) * PIC_Y)  Player(Index).YOffset - (DDSD_Character(GetPlayerSprite(Index)).lHeight / 4)  16
        'Guild TUT
        Text2Y = ConvertMapY(GetPlayerY(Index) * PIC_Y)  Player(Index).YOffset - (DDSD_Character(GetPlayerSprite(Index)).lHeight / 4)  4
    End If

--------------------------------------------------------------

Procure por:
Código:

    ' Draw name
    Call DrawText(TexthDC, TextX, TextY, Name, color)

Abaixo Add:
Código:

    If Not Player(Index).GuildName = vbNullString Then
        Call DrawText(TexthDC, Text2X, Text2Y, GuildString, color)
    End If

--------------------------------------------------------------

Procure por:

Código:
    ' Vitals
    Vital(1 To Vitals.Vital_Count - 1) As Long
    MaxVital(1 To Vitals.Vital_Count - 1) As Long
    ' Stats
    Stat(1 To Stats.Stat_Count - 1) As Byte
    POINTS As Long
    ' Worn equipment
    Equipment(1 To Equipment.Equipment_Count - 1) As Long
    ' Position
    Map As Long
    x As Byte
    y As Byte
    Dir As Byte
    ' Client use only
    XOffset As Integer
    YOffset As Integer
    Moving As Byte
    Attacking As Byte
    AttackTimer As Long
    MapGetTimer As Long
    Step As Byte

Abaixo Add:

Código:
    GuildName As String

--------------------------------------------------------------

Procure por:(modEnumerations):

Código:
    STradeRequest
    SPartyInvite
    SPartyUpdate
    SPartyVitals

Abaixo Add:

Código:
    SSendGuild
    SAdminGuild
    SGuildAdminSwitchTab

--------------------------------------------------------------

Procure por:(modEnumerations):

Código:
    CPartyRequest
    CAcceptParty
    CDeclineParty
    CPartyLeave
Abaixo Add:

Código:
    CGuildCommand
    CSayGuild
    CSaveGuild
    CRequestGuildAdminTabSwitch

--------------------------------------------------------------

Procure por:

Código:
    HandleDataSub(SPartyUpdate) = GetAddress(AddressOf HandlePartyUpdate)
    HandleDataSub(SPartyVitals) = GetAddress(AddressOf HandlePartyVitals)

Abaixo Add:
Código:

    HandleDataSub(SSendGuild) = GetAddress(AddressOf HandleSendGuild)
    HandleDataSub(SAdminGuild) = GetAddress(AddressOf HandleAdminGuild)

--------------------------------------------------------------

Procure por:
Código:

    Call SetPlayerDir(i, Buffer.ReadLong)
    Call SetPlayerAccess(i, Buffer.ReadLong)
    Call SetPlayerPK(i, Buffer.ReadLong)
   
    For x = 1 To Stats.Stat_Count - 1
        SetPlayerStat i, x, Buffer.ReadLong
    Next

Abaixo Add:

Código:
    If Buffer.ReadByte = 1 Then
        Player(i).GuildName = Buffer.ReadString
    Else
        Player(i).GuildName = vbNullString
    End If

--------------------------------------------------------------

Procure por:

Código:
    If LenB(ChatText) = 0 Then Exit Sub
    MyText = LCase$(ChatText)

    ' Handle when the player presses the return key
    If KeyAscii = vbKeyReturn Then

Abaixo Add:
Código:

        'Guild Message
        If Left$(ChatText, 1) = ";" Then
            ChatText = Mid$(ChatText, 2, Len(ChatText) - 1)

            If Len(ChatText) > 0 Then
                Call GuildMsg(ChatText)
            End If

            MyText = vbNullString
            frmMain.txtMyChat.text = vbNullString
            Exit Sub
        End If

--------------------------------------------------------------

Procure por:

Código:
                Case "/help"
                    Call AddText("Social Commands:", HelpColor)
                    Call AddText("'msghere = Broadcast Message", HelpColor)
                    Call AddText("-msghere = Emote Message", HelpColor)
                    Call AddText("!namehere msghere = Player Message", HelpColor)
                    Call AddText("Available Commands: /info, /who, /fps, /fpslock", HelpColor)

Abaixo Add:

Código:

                Case "/guild"
                    If UBound(Command) < 1 Then
                        Call AddText("Guild Commands:", HelpColor)
                        Call AddText("Make Guild: /guild make (GuildName)", HelpColor)
                        Call AddText("To transfer founder status use /guild founder (name)", HelpColor)
                        Call AddText("Invite to Guild: /guild invite (name)", HelpColor)
                        Call AddText("Leave Guild: /guild leave", HelpColor)
                        Call AddText("Open Guild Admin: /guild admin", HelpColor)
                        Call AddText("Guild kick: /guild kick (name)", HelpColor)
                        Call AddText("Guild disband: /guild disband yes", HelpColor)
                        Call AddText("View Guild: /guild view (online/all/offline)", HelpColor)
                        Call AddText("^Default is online, example: /guild view would display all online users.", HelpColor)
                        Call AddText("You can talk in guild chat with:  ;Message ", HelpColor)
                        GoTo Continue
                    End If
                     
                     
                   
                    Select Case Command(1)
                        Case "make"
                            If UBound(Command) = 2 Then
                                Call GuildCommand(1, Command(2))
                            Else
                                Call AddText("Must have a name, use format /guild make (name)", BrightRed)
                            End If
                           
                        Case "invite"
                            If UBound(Command) = 2 Then
                                Call GuildCommand(2, Command(2))
                            Else
                                Call AddText("Must select user, use format /guild invite (name)", BrightRed)
                            End If
                           
                        Case "leave"
                            Call GuildCommand(3, "")
                           
                        Case "admin"
                            Call GuildCommand(4, "")
                           
                        Case "view"
                            If UBound(Command) = 2 Then
                                Call GuildCommand(5, Command(2))
                            Else
                                Call GuildCommand(5, "")
                            End If
                           
                        Case "accept"
                                Call GuildCommand(6, "")
                           
                        Case "decline"
                                Call GuildCommand(7, "")
                               
                        Case "founder"
                            If UBound(Command) = 2 Then
                                Call GuildCommand(8, Command(2))
                            Else
                                Call AddText("Must select user, use format /guild founder (name)", BrightRed)
                            End If
                        Case "kick"
                            If UBound(Command) = 2 Then
                                Call GuildCommand(9, Command(2))
                            Else
                                Call AddText("Must select user, use format /guild kick (name)", BrightRed)
                            End If
                        Case "disband"
                            If UBound(Command) = 2 Then
                                If LCase(Command(2)) = LCase("yes") Then
                                    Call GuildCommand(10, "")
                                Else
                                    Call AddText("Type like  /guild disband yes    (This is to help prevent an accident!)", BrightRed)
                                End If
                            Else
                                Call AddText("Type like  /guild disband yes    (This is to help prevent an accident!)", BrightRed)
                            End If
                           
                    End Select

Download dos arquivos para por nas pastas:
Clique Aqui
Download do sistema já adicionado em um Eclipse Origins vazio:
Clique Aqui

Delete as contas após instalar o sistema.

Créditos:
- Scott por fazer
- Strike por postar

2Sistema de Guild Empty Re: Sistema de Guild Ter Jun 05, 2012 7:25 am

Storm
Storm
Designer
Designer

oO otimo tutor vou usar ele +1 merece ^^

3Sistema de Guild Empty Re: Sistema de Guild Ter Jun 05, 2012 11:35 am

Kyun
Kyun
Administrador
Administrador

nossa sempre quis um sistema de guild para meu jogo, mais como não mecho com eo e dificil fazer sistemas bom levou +1, continue assim ^^

4Sistema de Guild Empty Re: Sistema de Guild Ter Jun 05, 2012 9:58 pm

Destroyt
Destroyt
Membro
Membro

hum ótimo +1 cred XD (se o sistema tiver algun bug na hora de mandar o convite para a guild avise para colocarmos a solução ^^(mas pq vc nao ve isso ai?pq eu tenho um sistema de guild na minha engine ja :p))

5Sistema de Guild Empty Re: Sistema de Guild Qua Jul 25, 2012 12:00 pm

tidus
tidus
Novato
Novato

Desculpa reviver o topico, mas como que faz para a pessoa ter que gastar um certo dinheiro para criar a guild?


Conteúdo patrocinado

Ver o tópico anterior Ver o tópico seguinte Ir para o topo Mensagem [Página 1 de 1]

Tópicos semelhantes

-

» Sistema de Climas
» Sistema de Titulos

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