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

Guild Conquer a Castle? (EFF)


NiceLoki
 Share

Recommended Posts

Hi, Sorry for my bad english >.> ok, here I go….

I want to create a Castle in my game, but, when a Guild Reach the last level of the castle and one of the members of the guild talk with an Npcs or something a Global Msg appears saying e.j: "Lost Legacy has conquer the north Castle" and every member of the guild recive an item.... And.. OMG e.e  XD a Picture or frm wich says... the current conquer of the castle e.e 

I know this is too much.... But... can anybody help me? T.T

I'm Using Eclipse Final Frontier

I Edited the code of Party Only Map:

[http://www.eclipseorigins.com/community/index.php?/topic/128919-party-only-maps/?hl=+party%20+only](http://www.eclipseorigins.com/community/index.php?/topic/128919-party-only-maps/?hl=+party%20+only)

Server Side

U add this in ModPlayer/Sub PlayerWarp

Below

> ' Save old map to send erase player data to
>
>     OldMap = GetPlayerMap(index)

add

> 'Check if the map is a castle
>
> If Map(mapnum).Moral = MAP_MORAL_GUILD_MAP And GetPlayerAccess(index) = 0 Then
> If Player(index).GuildFileId = 0 Then
> Call PlayerMsg(index, "U need to be part of a clan for enter", Red)
> With Map(GetPlayerMap(index))
>         ' to the bootmap if it is set
>        If .BootMap > 0 Then
>            PlayerWarp index, .BootMap, .BootX, .BootY
>         Else
>         PlayerWarp index, START_MAP, START_X, START_Y
>        End If
>       End With
> Exit Sub
>
> End If
> End If

Now in modConstats and find

> Public Const MAP_MORAL_SAFE As Byte = 1

After that add:

> Public Const MAP_MORAL_GUILD_MAP As Byte = 2

And that´s the only thing I´ve done for this system u.u
Link to comment
Share on other sites

> What kind of systems do you have to hook into for this?

Didn´t understand what u mean D: I just want to Put a map moral  "Guild Map" or "Castle" so… just guilds can be on it, but this is the easy part, I´m doing it editing the "Only party map" code... ... the difficult its: Making A npc or something who can make your guild the "conquer of the castle" and a global mensage says : "Guild name Has conquer Castle name" and a reward for all the guilds members... 

(Sorry, My english suks t.t)
Link to comment
Share on other sites

You could add a variable to the Map rec called CapturedBy or something like that. Then, if you have a conversation system, make an event triggered by the conversation that changes the map variable CapturedBy. Then, make a packet that sends and updates this information to the rest of the players online. Rather simple.
Link to comment
Share on other sites

> You could add a variable to the Map rec called CapturedBy or something like that. Then, if you have a conversation system, make an event triggered by the conversation that changes the map variable CapturedBy. Then, make a packet that sends and updates this information to the rest of the players online. Rather simple.

That´s the part I have no Idea how to do T.T
Link to comment
Share on other sites

Okay, so basically, many of the variables that the features in your engine run on are in User Defined Types. If you have a source file called modTypes, open it and you'll see what I mean.

Now, you want the conversation with the NPC to trigger the capture of the castle. So, go to the sub in the code where you want this to happen. Say, a sub that handles talking to an NPC or selecting a response. Add code that will change the variable to whatever you need it to be.

As for the packets, I'll find you a tutorial on that. It's here somewhere…

EDIT:

Here's the tut.

[http://www.eclipseorigins.com/community/index.php?/topic/112479-eo-tutorial-how-to-use-packets-serverclient/](http://www.eclipseorigins.com/community/index.php?/topic/112479-eo-tutorial-how-to-use-packets-serverclient/)
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...