Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[EO 2.0/3.0] Guilds


Scott
 Share

Recommended Posts

To change the item slot the gold is in:

–-------------------------------------------------------

'Change 1 to item number

itemamount = HasItem(Founder_Index, _**1**_)

'Change 5000 to amount

If itemamount = 0 Or itemamount < _**5000**_ Then

PlayerMsg Founder_Index, "Not enough Gold.", BrightRed

Exit Sub

End If

'Change 1 to item number 5000 to amount

TakeInvItem Founder_Index, _**1**_, _**5000**_

–-------------------------------------------------------

Change the _**Red**_ text to the item slot, and the _**orange**_ text to the number needed.
Link to comment
Share on other sites

  • Replies 328
  • Created
  • Last Reply

Top Posters In This Topic

two errors

both rte 9 and seem related.

i have deathbeams menu in as well.

oks i just made guild "TEST" .

now when i click my button for guild menu i get rte 9 in Public Sub UpdateGuildData() at line

"If GuildData.Guild_Members(Player(MyIndex).GuildMemberId).Rank > 5 Then"

rank is out of range.

Guilddata is out of range.

–--

end the error of the first next rte 9 comes for server

in Sub LeftGame on line

" GuildData(TempPlayer(index).tmpGuildSlot).Guild_Members(Player(index).GuildMemberId).Online = False"

Guilddata out of range and so is online.

anyone with fix please.

yes if u relog its fine. But server can still crash, complied the first error disappeared but server can still crash. :/ ik its these 2 parts :/..
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
I'm using Dragon eclipse 2.0\. I have done the tutorial and read threw all the comments to see if anyone was having the same problem.

I am not getting a error when I'm running the server nor client, but every time I try to use a command I believe the server is not recognizing it. I've tried to make sure I didnt make a error in adding the code. I can't really check the other commands because I can't make the guild. But if I were to use the chat key it would say I'm not in a guild. Is there something else I have to add for this type of engine or what??? Thanks in advance!!
Link to comment
Share on other sites

  • 4 months later...
> How to fix the bug that Multiple Guilds can have the Same Exact Name

Not a bug just never added that functionality to the system, which seems kinda stupid lol sorry I'll see if I can throw it together in my free time.
Link to comment
Share on other sites

Ok made this real quick, prob not the best way to go about it but it will work.  Did not test it so let me know of any issues.

FIND:

```
ChkDir App.Path & "\Data\", "spells"

```
UNDER ADD:

```
ChkDir App.Path & "\Data\", "guildnames"

```
–--------------------------------------------

Put this at the bottom of modguild:

```
Function GuildNameExist(ByVal Name As String) As Boolean

    Dim filename As String

    filename = "data\guildnames\" & Trim(Name) & ".dat"

    If FileExist(filename) Then

        GuildNameExist = True

    End If

End Function

```
–--------------------------------------------

 FIND(Sub MakeGuild):

```
    If Player(Founder_Index).GuildFileId > 0 Then

        PlayerMsg Founder_Index, "You must leave your current guild before you make this one!", BrightRed

        Exit Sub

    End If

```
UNDER ADD:

```

    If GuildNameExist(Name) Then

        PlayerMsg Founder_Index, "Guild name taken!", BrightRed

        Exit Sub

    End If

```
–--------------------------------------------

Put this at the bottom of modguild:

```
Public Sub SaveGuildName(Name As String)

Dim filename As String

    filename = App.Path & "\data\guildnames\" & Name & ".dat"

    F = FreeFile

    Open filename For Binary As #F

        Put #F, , ""

    Close #F

End Sub

```
–--------------------------------------------

FIND(Sub makeguild):

```
    'Save

    Call SaveGuild(GuildSlot)

    Call SavePlayer(Founder_Index)

```
UNDER ADD:

```
    Call SaveGuildName(Name)

```
–--------------------------------------------

FIND(Sub disbandguild):

```

            'Unload Guild from memory

            Call UnloadGuildSlot(tmpGuildSlot)

```
**ABOVE ADD**(Don't duck this up above matters!):

```

            filename = App.Path & "\Data\guildnames\" & GuildData(tmpGuildSlot).Guild_Name & ".dat"

            Kill filename

```
Never tested as a whole I just threw this tut together quickly let me know if it works please.
Link to comment
Share on other sites

> Scott how i can put NPC for Make Guild?

just look at the code that normally makes a guild and put it at a custom script for events.

Or add it to an event as an extra option if you don't have the event system.

Actually i am bored of fixing my bug so i'll just post how to do it :P

€dit 1: I just took a look at the code and it is more complex then it thought at first :P

€dit 2: That's the code to make a guild:

```
Call MakeGuild(Playername, Name of guild, GuildTag)

```
€dit3:

Step 1: You will first need to make something that they give in a guild name and tag in 2 separate textboxes (or                 render it using dx8 if necessary) and then send it to the server and then let the server handle it                               trough The code above

Step 2: You can either handle it using events (i recommend custom event script)

             or you can use the npc stuff then you could look at alatar's quest system to see how he did it.
Link to comment
Share on other sites

> anyone using this on eclipse advance ? just want to know if it got some issues on that engine

It should, only thing you could really do to break it is if that source has more than 1 character per account in which you would need to make some small changes for it to work.  Other than that it should work fine, let me know if any issues come up and I'll be happy to try and work through them with you.
Link to comment
Share on other sites

So this is really weird. When trying to login i get "runtime error 9 subscript out of range" on my server. When debugging i found out the highlighted line to be the problem.

**In modServerLoop **

Public Sub UpdateMapBlock(mapnum, x, y, blocked As Boolean)

    If blocked Then
        MapBlocks(mapnum).Blocks(x, y) = 9
    Else
        **MapBlocks(mapnum).Blocks(x, y) = 0**
    End If
End Sub

Not sure if it has anything to do with the guild code but it wasn't happening before that.
Link to comment
Share on other sites

> So this is really weird. When trying to login i get "runtime error 9 subscript out of range" on my server. When debugging i found out the highlighted line to be the problem.
>
>  
>
> **In modServerLoop **
>
>  
>
> Public Sub UpdateMapBlock(mapnum, x, y, blocked As Boolean)
>
>     If blocked Then
>         MapBlocks(mapnum).Blocks(x, y) = 9
>     Else
>         **MapBlocks(mapnum).Blocks(x, y) = 0**
>     End If
> End Sub
>  
>
>  
>
> Not sure if it has anything to do with the guild code but it wasn't happening before that. 
>
>  
>
> The tut has nothing to do with that area, try re installing it and let me know if it's the same error.
Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...
By Check if Guild Name Exist you made a mistake:
[Post Link](http://www.eclipseorigins.com/community/index.php?/topic/124848-eo-2030-guilds/page-16#entry904482)

> –--------------------------------------------
>
>  
>
> Put this at the bottom of modguild:
>
> ```
> Function GuildNameExist(ByVal Name As String) As Boolean
>
>     Dim filename As String
>
>     filename = "data\guildnames\" & Trim(Name) & ".bin"
>
>     If FileExist(filename) Then
>
>         GuildNameExist = True
>
>     End If
>
> End Function
>
> ```
> –--------------------------------------------

```

filename = "data\guildnames\" & Trim(Name) & ".bin"

```
change to this:

```
filename = "data\guildnames\" & Trim(Name) & ".dat"

```
the ending ".bin" is wrong it must be ".dat"

I needet 3 hours to figure out why it still not work after i did all the things in your guide on the end i found it (=.=) for today i cant look at the vb6 code anymore or my brain explode xD

(Sry for my bad english im german :P )
Link to comment
Share on other sites

> By Check if Guild Name Exist you made a mistake:
> [Post Link](http://www.eclipseorigins.com/community/index.php?/topic/124848-eo-2030-guilds/page-16#entry904482)
>
> ```
>
> filename = "data\guildnames\" & Trim(Name) & ".bin"
>
> ```
> change to this:
>
> ```
> filename = "data\guildnames\" & Trim(Name) & ".dat"
>
> ```
> the ending ".bin" is wrong it must be ".dat"
>
>  
>
> I needet 3 hours to figure out why it still not work after i did all the things in your guide on the end i found it (=.=) for today i cant look at the vb6 code anymore or my brain explode xD
>
>  
>
> (Sry for my bad english im german :P )

Ya that's 100% my fault, Justn pointed that out to me a week ago and I forgot to correct it sorry.
Link to comment
Share on other sites

  • 1 year later...
hei.. im using eo3.0, and put your script on mine. what now? im still not understand. the script was done, but if i open my game, nothing happent! -_- where is the guild button, onh client and the server for edit guild?

here. i post my screenshoot! 

![](http://i.imgur.com/QH17NeG.png)

please, i want to make it have guild too!!

where is the button guild? and what should i do, to make it?
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share


×
×
  • Create New...