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

[EO]2.0 Show level


McCull96
 Share

Recommended Posts

@RyokuHasu:

> I tried it and it worked perfectly, please share your error or discribe how it didnt work…
>
> O.o and I've modded mine up the Wazu and it still worked.. =P

Sorry about that, it works fine, that was a post i made when i was a complete newb and didn't know you had to compile the client after src edits XD.

Also, quick question, is there any way to make it so the level is shown next to your name e.g: Character (10)
Link to comment
Share on other sites

Obviously you'll need to edit this to your likings

>! ' calc pos
    TextA = ConvertMapX(GetPlayerX(Index) * PIC_X) + Player(Index).XOffset + (PIC_X \ 2) - getWidth(TexthDC, (Trim$("Level " & GetPlayerLevel(Index))))
    If GetPlayerSprite(Index) < 1 Or GetPlayerSprite(Index) > NumCharacters Then
        TextB = ConvertMapY(GetPlayerY(Index) * PIC_Y) + Player(Index).YOffset - 5
    Else
        ' Determine location for text
        TextB = ConvertMapY(GetPlayerY(Index) * PIC_Y) + Player(Index).YOffset - (DDSD_Character(GetPlayerSprite(Index)).lHeight / 4) + 5
    End If

    'Draw level
    Call DrawText(TexthDC, TextA, TextB, "Level " & GetPlayerLevel(Index), color)
Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...
  • 1 month later...
  • 3 months later...
for those ones who are wondering u do same thing for npc …. 
```
' calc pos

    TextA = ConvertMapX(MapNpc(Index).x * PIC_X) + MapNpc(Index).XOffset + (PIC_X \ 2) - getWidth(TexthDC, (Trim$("" & Npc(npcNum).Level)))
    If Npc(npcNum).Sprite < 1 Or Npc(npcNum).Sprite > NumCharacters Then
        Textb = ConvertMapY(MapNpc(Index).y * PIC_Y) + MapNpc(Index).YOffset - 5
    Else
        ' Determine location for text
        Textb = ConvertMapY(MapNpc(Index).y * PIC_Y) + MapNpc(Index).YOffset - (DDSD_Character(Npc(npcNum).Sprite).lHeight / 4) + 5
    End If

    ' Draw name
```
like tut says add
Dim TextA As Long
Dim Textb As Long
in
DrawNpcName
and paste that code above btw thanks alot it works for me its niice :)
Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...
  • 3 months later...
@xxXReichoXxx:

> for those ones who are wondering u do same thing for npc …. 
> ```
> ' calc pos
>
>     TextA = ConvertMapX(MapNpc(Index).x * PIC_X) + MapNpc(Index).XOffset + (PIC_X \ 2) - getWidth(TexthDC, (Trim$("" & Npc(npcNum).Level)))
>     If Npc(npcNum).Sprite < 1 Or Npc(npcNum).Sprite > NumCharacters Then
>         Textb = ConvertMapY(MapNpc(Index).y * PIC_Y) + MapNpc(Index).YOffset - 5
>     Else
>         ' Determine location for text
>         Textb = ConvertMapY(MapNpc(Index).y * PIC_Y) + MapNpc(Index).YOffset - (DDSD_Character(Npc(npcNum).Sprite).lHeight / 4) + 5
>     End If
>    
>     ' Draw name
> ```
> like tut says add
> Dim TextA As Long
> Dim Textb As Long
> in
> DrawNpcName
> and paste that code above btw thanks alot it works for me its niice :)

Found a few problems, although it almost works.  Just had to change

```
("" & Npc(npcNum).Level)
```
to:

```
("Level" & Npc(npcNum).Level)
```
And

```
'Draw name
```
to:

```
'Draw level
    Call DrawText(TexthDC, TextA, TextB, "Level" & Npc(npcNum).Level, color)
```
This should display NPC levels properly.  Add the above variables like Reicho said.
Sorry if this is a necropost, not sure as to what the EO considers necro or not, I'm guessing that because I don't receive that red warning I'm fine.  Just wanted to point this out.
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...