Zopto Posted December 3, 2012 Author Share Posted December 3, 2012 so i want to make when player answer one some questions from event to he join in some guild like thisif Player(index).GuildFileId = 0 thenPlayer(index).GuildFileId = 1so to he auto join in guild when he answer on question(event) if any one can help me how to i make that tnx! Link to comment Share on other sites More sharing options...
tslusny Posted December 3, 2012 Share Posted December 3, 2012 What event system are you using? Link to comment Share on other sites More sharing options...
Zopto Posted December 3, 2012 Author Share Posted December 3, 2012 eclipse event 2.3 Link to comment Share on other sites More sharing options...
tslusny Posted December 3, 2012 Share Posted December 3, 2012 Hmm so it will be harder… Use scriptedevent then, in modcustom. Not best method, but it should work Link to comment Share on other sites More sharing options...
Zopto Posted December 3, 2012 Author Share Posted December 3, 2012 yea i tryed that but i keep getting error whit guild slots etc…... Link to comment Share on other sites More sharing options...
Ertzel Posted December 3, 2012 Share Posted December 3, 2012 Well then it sounds more like you have a problem with your guild system or are just ducking up the part of adding a player to a guild.Which guild system are you using so we have something to base any help off of. Link to comment Share on other sites More sharing options...
Zopto Posted December 3, 2012 Author Share Posted December 3, 2012 scott guild system i got error on custom script so idk if i put all that right Link to comment Share on other sites More sharing options...
Zopto Posted December 4, 2012 Author Share Posted December 4, 2012 so here is all sub```Public Sub CustomScript(Index As Long, caseID As Long)Dim OpenSlot As LongDim GuildSlot As LongDim i As IntegerSelect Case caseIDCase 1 If IsPlaying(Index) = False Then Exit SubFor i = 1 To MAX_GUILD_MEMBERS If GuildData(GuildSlot).Guild_Members(i).Used = False Then FindOpenGuildMemberSlot = i Exit Sub End IfNext i'Guild is full sorry bubFindOpenGuildMemberSlot = 0 If OpenSlot > 0 Then 'Set guild data GuildData(GuildSlot).Guild_Members(OpenSlot).Used = True GuildData(GuildSlot).Guild_Members(OpenSlot).User_Login = Player(Index).Login GuildData(GuildSlot).Guild_Members(OpenSlot).User_Name = Player(Index).Char(TempPlayer(Index).CurChar).Name GuildData(GuildSlot).Guild_Members(OpenSlot).Rank = GuildData(GuildSlot).Guild_RecruitRank GuildData(GuildSlot).Guild_Members(OpenSlot).Comment = "Joined: " & DateValue(Now) GuildData(GuildSlot).Guild_Members(OpenSlot).Online = True 'Set player data Player(Index).Char(TempPlayer(Index).CurChar).GuildFileId = GuildData(1).Guild_Fileid Player(Index).Char(TempPlayer(Index).CurChar).GuildMemberId = OpenSlot TempPlayer(Index).tmpGuildSlot = GuildSlot 'Save Call SaveGuild(GuildSlot) Call SavePlayer(Index) 'Send player guild data and display welcome Call SendGuild(False, Index, GuildSlot) PlayerMsg Index, "Welcome to " & GuildData(GuildSlot).Guild_Name & ".", BrightGreen PlayerMsg Index, "You can talk in guild chat with: ;Message", BrightGreen 'Update player to display guild name Call SendPlayerData(Index) Else 'Guild full display msg PlayerMsg Index, "Guild is full sorry!", BrightRed End If Case Else PlayerMsg Index, "You just activated custom script " & caseID & ". This script is not yet programmed.", BrightRedEnd SelectEnd Sub```Error on FindOpenGuildMemberSlot = iso when i talk to event and chose Join to that guild i got error Link to comment Share on other sites More sharing options...
Ertzel Posted December 4, 2012 Share Posted December 4, 2012 Dunno if this will fix it, but shouldn't i be declared as a Long as thats what FindOpenGuildMemerSlot is.Wouldn't it be a fuckload easier just to do this though:```Public Sub CustomScript(Index As Long, caseID As Long)Select Case caseID Case 1 // Add player to guild // Replace 1 with whatever guild number you want them added to Join_Guild(Index, 1)End SelectEnd Sub``` Link to comment Share on other sites More sharing options...
Zopto Posted December 4, 2012 Author Share Posted December 4, 2012 LOL that works tnx! Link to comment Share on other sites More sharing options...
Zopto Posted December 4, 2012 Author Share Posted December 4, 2012 edit: it works but when i shutdown my server save all and next time i try to join to guild it join me to noting…... Link to comment Share on other sites More sharing options...
Ertzel Posted December 4, 2012 Share Posted December 4, 2012 Are you trying to make the player **join** an **existing** guild or **create** a **new** guild? The code I showed would add them to an already existing guild based on the number you put into the Join_Guild call.If you want them to create a totally new guild, then thats gunna require a different code to do. Link to comment Share on other sites More sharing options...
Wortel Angels Posted December 4, 2012 Share Posted December 4, 2012 He want to join it.What is working but after restart the server its not working anymore untill the guild owner klick the event then is the guildowner 2 times in the guild and the other can apply again >.< 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