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

Paperdolls


Taegan
 Share

Recommended Posts

Is it possible to make a paperdoll make a part of the actual character transparent? For instance, I'd like to make a paperdoll that turns a large character into a small dog. Unless I find away to make the giant transparent and show only the dog sprites, the dog will just appear over the giant which obviously doesn't work very well.

Besides this, I'd still like to know how to change a character's class to a locked one for class advancement purposes, but the first question has priority.

Please do tell me anything you know and thank you.
Link to comment
Share on other sites

@aiden500:

> No there is not because eclipse has no scripting engine things like this are impossible.

But my second question, class advancements ARE possible, right? I mean, I've seen topics about it. None that explains how to do it beyond locking classes, but yeah.
Link to comment
Share on other sites

@SeeingBlue:

> Is it impossible to simply change the players sprite & forget about using paperdolls?? I'm not sure what you are asking in your second question, but I'm sure both of these are going to require source editing.

I suppose simply being able to change a player's sprite would work, do you know of any existing source edit that allows this? My VB6 skills are rather… unexisting.
Link to comment
Share on other sites

I dont have the time to look now but I may take a jab at it later. In the meantime take a look at how the admin panel does this. Look at the code within the button on picAdmin that changes a players sprite & use that as an example. If you are serious, then you must familiarize yourself with the code anyways.
Link to comment
Share on other sites

Ok, in the code under the cmdASprite button in the picAdmin on frmMain, I found this. SendSetSprite when you right click it & check out the definition, you find that it is send information to the server. Mainly CSetSprite which is how the server knows what to do with the packet & SpriteNum which tells the server which sprite to change to.

If you now go to the server & search for CSetSprite you will find what the server is doing with the data once it arrives. What you find is that it is calling 2 functions.  SetPlayerSprite & SendPlayerData. The SetPlayerSprite tells the server who changed to what sprite. Then the SendPlayerData tells everyone the changes.

Pretty simple once you break it down. Should be able to take this & do what you want.
Link to comment
Share on other sites

@SeeingBlue:

> Ok, in the code under the cmdASprite button in the picAdmin on frmMain, I found this. SendSetSprite when you right click it & check out the definition, you find that it is send information to the server. Mainly CSetSprite which is how the server knows what to do with the packet & SpriteNum which tells the server which sprite to change to.
>
> If you now go to the server & search for CSetSprite you will find what the server is doing with the data once it arrives. What you find is that it is calling 2 functions.  SetPlayerSprite & SendPlayerData. The SetPlayerSprite tells the server who changed to what sprite. Then the SendPlayerData tells everyone the changes.
>
> Pretty simple once you break it down. Should be able to take this & do what you want.

Thank you! I'm currently trying to add a section to the admin panel that allows me to change a player's sprite. It isn't going so well, partly because I don't know what I'm doing, but I'm persistent. ^^"
Link to comment
Share on other sites

You wouldn't want the client to change other players sprites, that would only be useful to admins, but wouldn't be used in actual gameplay. For that stuff you need to be working in the server. Like telling the server to change  a player's sprite when an item is used or something.
Link to comment
Share on other sites

@SeeingBlue:

> You wouldn't want the client to change other players sprites, that would only be useful to admins, but wouldn't be used in actual gameplay. For that stuff you need to be working in the server. Like telling the server to change  a player's sprite when an item is used or something.

Yeah, that'd be cool, but even if it's just a change that allows admins to change other players' sprites it'd already pretty much solve my problem.
Link to comment
Share on other sites

@Taegan:

> I've been trying to make it for two days, but it really isn't going well. ;-;
> Is there really no existing source edit to give an admin the power to alter a player's sprite?

My god, it's not difficult.

```
Sub HandleSetSprite(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddR As Long, ByVal ExtraVar As Long)
    Dim n As Long
    Dim Buffer As clsBuffer
    Set Buffer = New clsBuffer
    Buffer.WriteBytes Data()

    ' Prevent hacking
    If GetPlayerAccess(Index) < ADMIN_MAPPER Then
        Exit Sub
    End If

    ' The sprite
    n = Buffer.ReadLong 'CLng(Parse(1))
    Set Buffer = Nothing
    Call SetPlayerSprite(Index, n)
    Call SendPlayerData(Index)
    Exit Sub
End Sub
```
Now, let's look at SetPlayerSprite.

```
Sub SetPlayerSprite(ByVal Index As Long, ByVal Sprite As Long)
    Player(Index).Sprite = Sprite
End Sub
```
Clue enough? If you can't figure it out from here, you need to have a better look around EOs pretty helpful functions.
Link to comment
Share on other sites

In one place or another, the server already does everything you need. You just have to learn to read the code, understand what's happening & how to reuse it where you need.

Like I told you before, SendSetSprite in the client only sends the sprite number to change to. You need it to not only send the sprite number but also the player you want to change the sprite of. Then tell the server how to read that new information. You could add a new textbox to the picAdmin asking the players name to change, or maybe have the server just change the sprite of the person you have targeted. Which is probably TempPlayer(Index).Target, regardless you have a lot of learning to do if you want to make changes like this. I was probably as frustrated as you are about 4 months ago, but get a notepad & start understanding how the client & server communicate.

There are already other function that handle this, you just need to find those & reuse their code properly. I can't help you anymore without just giving you the answer.
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...