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

Party Only Maps


crzyone9584
 Share

Recommended Posts

This edit will allow you to limit certain maps to only allow people that are in parties. I made this quick small edit for Lolicat but thought it may be of some use to others. This small edit will work with EO 2.0 - EO 3.0 for they handle player warp and Map Morals all the same.

Server Side

In modPlayer find the```
Sub PlayerWarp
```

underneath

```

' Save old map to send erase player data to

OldMap = GetPlayerMap(index)

```

Add

```

' Check to see if its a Party Dungeon

If Map(mapnum).Moral = MAP_MORAL_PARTY_MAP Then

' Check to make sure the player is in a party. If not exit the sub so they dont change maps

If TempPlayer(index).inParty < 1 Then

Call PlayerMsg(index, "This is a party map. You have to be in a party to enter it.", Red)

Exit Sub

End If

End If
```

Now locate modConstats and find

```
Public Const MAP_MORAL_SAFE As Byte = 1
```

After that Add

```

Public Const MAP_MORAL_PARTY_MAP As Byte = 2

```

Save your changes and now open the client.

Open up frmEditor_MapProperties. Once there click on the cmbMoral combobox. Then in the Properties menu of that control scroll down till you see list. Click the down arrow and add a new line that says Party Map.

Save the editor and when you want a party map set the moral to Party map and save the map. No one that is not in a party will not be able to warp to that map.

Enjoy

Brought to you by your everday friend who is hated,

crzy the hated the hated
Link to comment
Share on other sites

Would it be possible for when you leave a party it runs a check on the map morality, since you aren't in a party anymore it would (kick you the last map you were in?) or just send you to spawn. Just a thought ![^_^](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/happy.png)
Link to comment
Share on other sites

were youd put it, i duno. but id think this should work yea?

```

If TempPlayer(index).inParty < 1 Then

Call PlayerWarp(index, START_MAP, GetPlayerX(index), GetPlayerY(index))

end if

```
Link to comment
Share on other sites

Why would you do that? And where would you put it? I put in the Playerwarp sub because its a place to put a check about the map moral and to see if a player is in a party. How you have it set up is just plain out wrong. Due to the START_MAP being map 1…. Please do not post garabe in my thread when you clearly have no clue on how I have it set up. Thank you very much.
Link to comment
Share on other sites

I like ponies, and bunnies and EVERYTHING that's fluffy! YIPPEE!

~~k asshat i wont even try help anyone anymore on here. ya hated hated hated asshat.~~

If you disagree with someone, or feel like you're being mistreated, don't go swearing because of it. You'll just get in trouble. ;]
Link to comment
Share on other sites

yes i am crzy the hated. You can help just make sure you have some what readable code and a sentence structure somewhat. And learn how to check for maps and not just use the starting map constant. Along with the I dunno how to use this code but im posting it anyway is just plain wrong.
Link to comment
Share on other sites

Wow, thanks, I'm gonna get Fernz to add this into our game, thanks!~ ![:lol:](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/laugh.png)
Link to comment
Share on other sites

@Everyone: In my own opinion, If you set this much more you might come up with a housing system without using a single map out.

@crzyone9584: Nice job with this! I really appreciated your work ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png)
Link to comment
Share on other sites

> How would I go about adding exceptions for GMs?

Change:

```

' Check to see if its a Party Dungeon

If Map(mapnum).Moral = MAP_MORAL_PARTY_MAP Then

' Check to make sure the player is in a party. If not exit the sub so they dont change maps

If TempPlayer(index).inParty < 1 Then

Call PlayerMsg(index, "This is a party map. You have to be in a party to enter it.", Red)

Exit Sub

End If

End If

```

to:

```

' Check to see if its a Party Dungeon

If Map(mapnum).Moral = MAP_MORAL_PARTY_MAP Then

' Check to make sure the player is in a party. If not exit the sub so they dont change maps

If TempPlayer(index).inParty < 1 And GetPlayerAccess(index) = 0 Then

Call PlayerMsg(index, "This is a party map. You have to be in a party to enter it.", Red)

Exit Sub

End If

End If

```

Note this line:

```

If TempPlayer(index).inParty < 1 And GetPlayerAccess(index) = 0 Then

```

That says, "If the player is not in a party (their party number is 0) and if the player is a regular user, then stop them from changing to a party map".
Link to comment
Share on other sites

> Change:
>
> ```
>
> ' Check to see if its a Party Dungeon
>
> If Map(mapnum).Moral = MAP_MORAL_PARTY_MAP Then
>
> ' Check to make sure the player is in a party. If not exit the sub so they dont change maps
>
> If TempPlayer(index).inParty < 1 Then
>
> Call PlayerMsg(index, "This is a party map. You have to be in a party to enter it.", Red)
>
> Exit Sub
>
> End If
>
> End If
>
> ```
>
> to:
>
> ```
>
> ' Check to see if its a Party Dungeon
>
> If Map(mapnum).Moral = MAP_MORAL_PARTY_MAP Then
>
> ' Check to make sure the player is in a party. If not exit the sub so they dont change maps
>
> If TempPlayer(index).inParty < 1 And GetPlayerAccess(index) = 0 Then
>
> Call PlayerMsg(index, "This is a party map. You have to be in a party to enter it.", Red)
>
> Exit Sub
>
> End If
>
> End If
>
> ```
>
> Note this line:
>
> ```
>
> If TempPlayer(index).inParty < 1 And GetPlayerAccess(index) = 0 Then
>
> ```
>
> That says, "If the player is not in a party (their party number is 0) and if the player is a regular user, then stop them from changing to a party map".

Thank you. I see what you did there.

Instead of, "Check to see if player is in party"

It now says, "Check to see if player with 0 access is in party.
Link to comment
Share on other sites

  • 3 weeks later...
> I like ponies, and bunnies and EVERYTHING that's fluffy! YIPPEE!
>
> ~~k asshat i wont even try help anyone anymore on here. ya hated hated hated asshat.~~
>
> If you disagree with someone, or feel like you're being mistreated, don't go swearing because of it. You'll just get in trouble. ;]

LOL, nice edit Joyce. ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/tongue.png)
Link to comment
Share on other sites

  • 11 months later...
maybe you want to add this to disable user from leaving party map…

maybe if u want to make a dungeon mode with party map :D

**CLIENT SIDE**

open **modGeneral**

below

```

Dim buffer As clsBuffer, I As Long

```

add

```

If Map.Moral = MAP_MORAL_PARTY_MAP And InGame = True Then

Call AddText("You must leave dungeon first to exit from game", BrightGreen)

Else
```

in same procedure below

```

'frmMenu.lblNews.Visible = False
```

add this

```

End If
```
then open **modConstants**

below

```

Public Const MAP_MORAL_SAFE As Byte = 1
```
add this

```

Public Const MAP_MORAL_PARTY_MAP As Byte = 2
```
sorry for bad english :P
Link to comment
Share on other sites

> is there check afther leaving party if player in party map?

i have one

open **modGameLogic**

add

```

Dim tmrPM As Long

```
before

```

Dim tmr25 As Long
```
then below

```

' * Check surface timers *
        ' Sprites
```

add

```

If tmrPM < tick Then
If Map.Moral = MAP_MORAL_PARTY_MAP And GetPlayerAccess(MyIndex) < ADMIN_MAPPER Then
If Party.Leader < 1 Then
'your command here
End If
End If
tmrPM = tick + 1000 'check every 1 seconds
End If

```
then open **modConstants**

below

```

Public Const MAP_MORAL_SAFE As Byte = 1

```
add

```

Public Const MAP_MORAL_PARTY_MAP As Byte = 2

```
done :D
Link to comment
Share on other sites

> arent you ruining fps by this?
>
> ```
> tmrPM = tick + 1000 'check every 1 seconds
>
> ```
> Just do check afther leaving party, if he leaves next what command comes is check in what map is he. ;)

in fact, i don't know exactly about vb :(

but when i used that function, and some modification in server, i can check player who leave party in party map and warp them to somewhere :D

but if u can make it's more effective, i want to know it too :lol:

(sorry for bad english :(  )
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...