goku1993
-
Posts
196 -
Joined
-
Last visited
Content Type
Profiles
Forums
Calendar
Posts posted by goku1993
-
-
Sorry only thing i can think of is something wrong with handledatasub…
-
thing is if you're getting you'r not in a guild doesn't necessarily mean client isn't sending anything something could be wrong with the create guild or anything so try adding a message somewhere to see if something is sent or not. for example in handle create guild could add an alert to see if the code gets there or not (just an example). and while there pause and put your mouse on the integer see if the values are sent…
-
Ok I'm not sure of this but since you'r adding something to the player shouldn't the create guild have
Saveplayer(userindex) cause if that's not saved it is going to say you're not in a guild… might be wrong too who knows -
no just wanted to make sure it was in the server.
i would add
```
sub sendcreateguild(byval guildname as string)
Dim n As Long
Dim Buffer As clsBuffer
tmpGuildName = guildname
Set Buffer = New clsBuffer
Buffer.WriteLong CSendCreateGuild
Buffer.WriteString tmpGuildName
SendData Buffer.ToArray()
Set Buffer = Nothing
End Sub
```or something like that in modclienttcp then call the sub from the form i have no idea if that's causing the problem but try
Otherwise i can't really see anything wrong with the code in front of me that could stop client from sending to server or might be and i just can't see it, but sorry can't help you more than that with the code i got in front of me. -
Ok you handled create guild how do you send back to the client that it has been created and all??
oh and i don't see
HandleDataSub(CSendCreateGuild) = GetAddress(AddressOf HandleCreateGuild) (if you didn't add it then well when you do everything should work unless something else is wrong) -
never seen Samugames's guild system but in order to help you i need to see the modservertcp for the screateguild code (which i don't see in the enumartion code so how could anything be sent or received? unless the invite will create the guild i don't know)
edit:oh and for the modenumarions would be simpler to call SSendClearGuildList SClearGuildList since S Stands for Server or Send not sure which one but writing send is useless (just saying you don't have to change them)… -
-
-
-
Thanks, that's what i did, everything has been going well untill just now.
Everything was working well when i realized that when i invited a player to the guild his name will take the caption of himself and all the players that are in the guild. For example imagine a person called john is in the guild if i invite someone called killer, a new caption is used for killed but he also takes john's caption and adds killer in it…
i think this is dumb but i really can't find anything wrong with
```
For i = 1 To MAX_GUILD_MEMBERS
Guild.Member(i) = Buffer.ReadLong
Guild.Level(i) = Buffer.ReadLong
If Guild.Member(i) > 0 Then
frmMain.lblGuildMember(i).Caption = Trim$(GetPlayerName(Guild.Member(i)))
Else
frmMain.lblGuildMember(i).Caption = vbNullString
End If
```
edit: I'm thinking there is some setting in the captions i have to change, going to check now… -
-
Hey everyone, i was just looking for advice wondering how i could create my guild system.
Had one that didn't really work well based on the party system but i decided to find a more efficient way to create it.
I don't really need any source code and all i just need some ideas on proficient ways to store the guild data, for example storing the guild name in the player's files then creating another file for the guild's data or?…
Help would be appreciated, Thank you. -
Nope didn't miss the second person everything is working fine with this guild system except the leave part for everyone…
-
In some parts i changed the code completely though anyway i guess I'll try to recreate something from scratch i think i might be able to do it while searching on the net for better ways.
-
Nothing's wrong with the strings and all that already checked, just couldn't really find a better way to create the guild system…
-
anyone??
-
Nvm delete this
-
What i do to see if the changes occur in the file and all is save it as a txt this way you can test and see for example if you have to delete everything or not then just revert them to bin when you're done…(hope that helps a bit even though you already got your answer)
-
it could work but you would have to remove some code because code says that for example read the pic in blabla and put it there and that overwrites the actual picture on the form.
-
just found out that the guild member's name will get deleted off the list but the other names don't if they quit the guild (guild leader and members have a different section where they leave the guild in the code but both are similar and can't find the error in the member part) anyway here is the leave sub, been trying to find something wrong in there but couldn't maybe someone on here can help:
```
Public Sub Guild_PlayerLeave(ByVal index As Long)
Dim guildNum As Long, i As Long, Name As String
guildNum = Player(index).guildNum
Name = Player(index).Guild
Call LoadGuild(guildNum, Name)
If guildNum > 0 Then
' find out how many members we have
Guild_CountMembers guildNum
' make sure there's more than 0 people
If Guild(guildNum).MemberCount > 0 Then
' check if leader
If Guild(guildNum).Founder = Trim$(Player(index).Name) Then
' set next person down as leader
For i = 1 To MAX_GUILD_MEMBERS
If Not Guild(guildNum).Member(i) = vbNullString And Guild(guildNum).Member(i) <> Player(index).Name Then
Guild(guildNum).Founder = Guild(guildNum).Member(i)
Guild(guildNum).Member(1) = Guild(guildNum).Member(i)
'GuildMsg guildNum, GetPlayerName(i) & " is now the guild leader.", BrightBlue
Call SavePlayer(index)
Call SaveGuild(guildNum)
Exit For
End If
Next
' leave guild
'GuildMsg guildNum, GetPlayerName(index) & " has left the guild.", BrightRed
' remove from array
For i = 1 To MAX_GUILD_MEMBERS
If Guild(guildNum).Member(i) = Trim$(Player(index).Name) Then
Guild(guildNum).Member(i) = vbNullString
Call SaveGuild(guildNum)
Exit For
End If
Next
'remove from player
Player(index).guildNum = 0
Player(index).Guild = vbNullString
' save player
Call SavePlayer(index)
' recount guild
Guild_CountMembers guildNum
' set update to all
SendGuildUpdate guildNum
' send clear to player
SendGuildUpdateTo index
Else
' not the leader, just leave
' GuildMsg guildNum, GetPlayerName(index) & " has left the guild.", BrightRed
' remove from array
For i = 1 To MAX_GUILD_MEMBERS
If Guild(guildNum).Member(i) = Trim$(Player(index).Name) Then
Guild(guildNum).Member(i) = vbNullString
'save guild
Call SaveGuild(guildNum)
Exit For
End If
Next
'remove from player
Player(index).guildNum = 0
Player(index).Guild = vbNullString
'save player
Call SavePlayer(index)
' recount guild
Guild_CountMembers guildNum
' set update to all
SendGuildUpdate guildNum
' send clear to player
SendGuildUpdateTo index
End If
Else
' find out how many members we have
Guild_CountMembers guildNum
' clear out everyone's guild
For i = 1 To MAX_GUILD_MEMBERS
index = Guild(guildNum).Member(i)
' player exist?
If Not index = vbNullString Then
'remove from player
Player(index).guildNum = 0
Player(index).Guild = vbNullString
' send clear to players
SendGuildUpdateTo index
'save player and guild
Call SavePlayer(index)
Call SaveGuild(guildNum)
End If
Next
' clear out the guild itself
ClearGuild guildNum
End If
End If
End Sub
```
I don't get it why does
```
For i = 1 To MAX_GUILD_MEMBERS
If Not Guild(guildNum).Member(i) = vbNullString And Guild(guildNum).Member(i) <> Player(index).Name Then
Guild(guildNum).Founder = Guild(guildNum).Member(i)
Guild(guildNum).Member(1) = Guild(guildNum).Member(i)
'GuildMsg partyNum, GetPlayerName(i) & " is now the party leader.", BrightBlue
Call SavePlayer(index)
Call SaveGuild(guildNum)
```
Only save the member(1) in the file and not the founder??? -
Hey guys i have created a guild system based of well the source kind of searched for stuff i needed in the actual source and changed many things, anyway almost everything works fine, i can invite people,summon them well you get the idea.The only thing that's not working is leaving the guild, i was wondering do you think this should work fine to delete the name from the file because it's not deleting it.
```
For i = 1 To MAX_GUILD_MEMBERS
If Guild(guildNum).Member(i) = Trim$(Player(index).Name) Then
Guild(guildNum).Member(i) = vbNullString
'save guild
Call SaveGuild(guildNum)
```
if you need my guild rec
```
Public Type GuildRec
Name As String
Founder As String
Member(1 To MAX_GUILD_MEMBERS) As String
MemberCount As Long
End Type
```
if you need the save sub(note:saved as txt right now to fix the problem after that i ll change it)
```
Sub SaveGuild(ByVal index As Long)
Dim filename As String
Dim F As Long
filename = App.Path & "\data\guilds\" & Trim$(Guild(index).Name) & ".txt"
F = FreeFile
Open filename For Binary As #F
Put #F, , Guild(index)
Close #F
End Sub
```
I know that the techniques i used to create the guild system could be wrong and if you have any pointers please go ahead and point me to the right direction criticism is welcome.
Oh almost forgot if you need me to post another sub because there's something in the code above you aren't really understanding go ahead and ask.
Thank you for your help. -
Search for PaperdollOrder(1) = Equipment.Armor client side and there are like numbers for the order that should work(btw you need vb6 and since this isn't in source not sure you have it)
-
you can teleport the player after talking to the npc?
Hope that helps -
you probably don't have flash installed on your pc
Graphics for Programming.
in Talent Center
Posted
(going to have to get a version of vb6… lol)
Actually would be better if you just send me an e-mail(hardly check this like 4times a year? ) [email protected]