ranslsad Posted April 10, 2013 Author Share Posted April 10, 2013 First of all, this is my first release Topic… i want to thanks you all for the work you do with this engine...Im member of this forum since 2010 and i started a game just a pair weeks ago...I will start to release some of my sources...Sry for bad english... Lets Start!**Required Tutorial: [[EO 2.0/3.0] Guilds](http://www.touchofdeathforums.com/community/index.php?/topic/124848-eo-2030-guilds/)****What This code Do?**Screen will explain it 100%.[![](http://www.elrinconperdido.com/Archivos/ImgUpload/archivos/TutGuildInvDialog.JPG)](http://www.elrinconperdido.com/Archivos/ImgUpload/archivos/TutGuildInvDialog.JPG)**Note:**Maybe i dont do the tut as well.. i can forget any code, i will try to do it as well i can…If you got error, please tell me where and ill try to resolve!**Server Side:**Find SGuildAdminSwitchTab on Public Enum ServerPackets - modEnumerations and add after:```SGuildInvite 'Guild```Find in modServerTCP```Sub SendTrade(ByVal index As Long, ByVal tradeTarget As Long)Dim Buffer As clsBufferSet Buffer = New clsBufferBuffer.WriteLong STradeBuffer.WriteLong tradeTargetBuffer.WriteString Trim$(GetPlayerName(tradeTarget))SendDataTo index, Buffer.ToArray()Set Buffer = NothingEnd Sub```add after:```Sub SendGuildInvite(ByVal GName As String, ByVal GInviterName As String, ByVal guildTarget As Long)Dim Buffer As clsBufferSet Buffer = New clsBufferBuffer.WriteLong SGuildInviteBuffer.WriteString GNameBuffer.WriteString GInviterNameSendDataTo guildTarget, Buffer.ToArray()Set Buffer = NothingEnd Sub```In modGuild find:```PlayerMsg index, Player(Inviter_Index).Name & " has invited you to join the guild " & GuildData(GuildSlot).Guild_Name & "!", GreenPlayerMsg index, "Type /guild accept within the next 2 Minutes to join.", GreenPlayerMsg index, "Type /guild decline to remove the offer.", Green```and replace with:```SendGuildInvite GuildData(GuildSlot).Guild_Name, Player(Inviter_Index).Name, index```**Client Side:**Find SGuildAdminSwitchTab on Public Enum ServerPackets - modEnumerations and add after:```SGuildInvite 'Guild```Find in modHandleData```HandleDataSub(SAdminGuild) = GetAddress(AddressOf HandleAdminGuild) 'Guild```Add after:```HandleDataSub(SGuildInvite) = GetAddress(AddressOf HandleGuildInvite) 'Guild```In modGuild add at the bottom or elsewhere you want:```Public Sub HandleGuildInvite(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)Dim Buffer As clsBufferDim GName As StringDim GInvName As String' If debug mode, handle error then exit outIf Options.Debug = 1 Then On Error GoTo errorhandlerSet Buffer = New clsBufferBuffer.WriteBytes Data()GName = Buffer.ReadStringGInvName = Buffer.ReadStringDialogue "Invitacion al Guild", GInvName & " te ha invitado a su clan." & vbNewLine & "Nombre del Clan: " & GName & vbNewLine & _ " Deseas unirte?", DIALOGUE_TYPE_GUILDINVITE, True' Error handlerExit Suberrorhandler:HandleError "HandleAdminGuild", "modGuild", Err.Number, Err.Description, Err.Source, Err.HelpContextErr.ClearEnd Sub```Find in modConstants:```Public Const DIALOGUE_TYPE_PARTY As Byte = 3```Add after:```Public Const DIALOGUE_TYPE_GUILDINVITE As Byte = 4```Find in modGameLogic:```Case DIALOGUE_TYPE_PARTY SendAcceptParty```Add after:```Case DIALOGUE_TYPE_GUILDINVITE SendAcceptGuildInvite```in Same sub a few lines down find:```Case DIALOGUE_TYPE_PARTY SendDeclineParty```and add after:```Case DIALOGUE_TYPE_GUILDINVITE SendDeclineGuildInvite```in modClientTCP add at botton or where you prefer:```Sub SendAcceptGuildInvite()Call GuildCommand(6, "")End SubSub SendDeclineGuildInvite()Call GuildCommand(7, "")End Sub```**¡DONE!**Thanks you all for read and add the script!!If you can optimize, do better code, modify it for get a better function, do it and show us all!Was it useful for you? - Like This!**Working on: Buff Icons**Show Buff Icon by Type: 100%Show Buff TimeLeft: 100%GUI: -Draw the max 10 Buff on screen: 100%Ideas?**Screen:** [Click Here](http://www.elrinconperdido.com/Archivos/ImgUpload/archivos/ShowcaseBuffIconsSystem.JPG)–---GreetingsRanslsad Link to comment Share on other sites More sharing options...
abhi2011 Posted April 10, 2013 Share Posted April 10, 2013 Nice. Also it would be a good thing if the guild invite message was changed back to english. Link to comment Share on other sites More sharing options...
ranslsad Posted April 10, 2013 Author Share Posted April 10, 2013 Thanks… here you got the message on english:**Client Side:**Find:```Dialogue "Invitacion al Guild", GInvName & " te ha invitado a su clan." & vbNewLine & "Nombre del Clan: " & GName & vbNewLine & _ " Deseas unirte?", DIALOGUE_TYPE_GUILDINVITE, True```Replace with:```Dialogue "Guild Invitation", GInvName & " has invited you to his guild." & vbNewLine & "Guild Name: " & GName & vbNewLine & _ " want to Join?", DIALOGUE_TYPE_GUILDINVITE, True```Did you tested the code?GreetingsRanslsad Link to comment Share on other sites More sharing options...
abhi2011 Posted April 11, 2013 Share Posted April 11, 2013 I didn't try it out. Just whiffed through it quickly. But I don't see why anything has to go wrong. And for the translation of the message, many ppl will most probs ask for it. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now