crzyone9584 Posted April 16, 2011 Share Posted April 16, 2011 there shouldn't be a conflict as log as you do what this tutorial says. all your doing is adding in a call to get the lvl of the player and displaying next to the name with a - between the lvl and players name. Link to comment Share on other sites More sharing options...
Robin Posted April 16, 2011 Share Posted April 16, 2011 @QWERTYUIoP:> Just asking. Better prepared than going into the unknown. ;\Better to explore and learn for yourself than having to rely on other people telling you what you can and can't do. Link to comment Share on other sites More sharing options...
Craselin Posted April 17, 2011 Share Posted April 17, 2011 @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.. =PSorry 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 More sharing options...
McCull96 Posted April 18, 2011 Author Share Posted April 18, 2011 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 More sharing options...
Craselin Posted April 18, 2011 Share Posted April 18, 2011 I knew that but i didnt know which bit to edit Link to comment Share on other sites More sharing options...
crzyone9584 Posted April 18, 2011 Share Posted April 18, 2011 Simplest way is to do something like this all in modText```Call DrawText(TexthDC, TextX, TextY, Name & " - Level - " & GetPlayerLevel(Index), color)```its all on one line and you don't have to worry about messing with the values. Link to comment Share on other sites More sharing options...
Craselin Posted April 18, 2011 Share Posted April 18, 2011 I used this code (slighly modified) but its offset, any way to fix it? Link to comment Share on other sites More sharing options...
crzyone9584 Posted April 18, 2011 Share Posted April 18, 2011 you keep the spaces like i had them? Link to comment Share on other sites More sharing options...
Craselin Posted April 18, 2011 Share Posted April 18, 2011 Even with those it was still off Link to comment Share on other sites More sharing options...
crzyone9584 Posted April 18, 2011 Share Posted April 18, 2011 Wierd. It worked fine when i tested that why with my title system. I'll go check my code. i may of changed something else to. Link to comment Share on other sites More sharing options...
dxxknight Posted April 19, 2011 Share Posted April 19, 2011 Yay still works for 2.0 :) Link to comment Share on other sites More sharing options...
Craselin Posted April 19, 2011 Share Posted April 19, 2011 @crzyone9584:> Wierd. It worked fine when i tested that why with my title system. I'll go check my code. i may of changed something else to.Thank you Link to comment Share on other sites More sharing options...
airdude2 Posted May 9, 2011 Share Posted May 9, 2011 Good Job :D Link to comment Share on other sites More sharing options...
BugSICK Posted June 11, 2011 Share Posted June 11, 2011 does this works in NPC? Link to comment Share on other sites More sharing options...
Carim123 Posted June 11, 2011 Share Posted June 11, 2011 @BugSICK:> does this works in NPC?Well, considering it's under DrawPlayerName, and it uses GetPlayerLevel, no. Link to comment Share on other sites More sharing options...
BugSICK Posted June 12, 2011 Share Posted June 12, 2011 @Hamster:> Well, considering it's under DrawPlayerName, and it uses GetPlayerLevel, no.i know that. what im mean is that can this be applicable to NPC changing from player to npc stuff. Link to comment Share on other sites More sharing options...
beckymegan Posted August 11, 2011 Share Posted August 11, 2011 This is easily my favorite code ever :) <3 Link to comment Share on other sites More sharing options...
xxXReichoXxx Posted December 8, 2011 Share Posted December 8, 2011 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 addDim TextA As LongDim Textb As LonginDrawNpcNameand paste that code above btw thanks alot it works for me its niice :) Link to comment Share on other sites More sharing options...
game_heaven Posted December 9, 2011 Share Posted December 9, 2011 um i got a prob now tha ti did this it says runtime error 53 when i lick on inv. or character Link to comment Share on other sites More sharing options...
vincent329 Posted January 20, 2012 Share Posted January 20, 2012 used this along with the snow npc code but the npc stoped showing lvl i seen reicho said how but i dont understand what they meant by the DrawNpcName and paste that code above where does the code go? Link to comment Share on other sites More sharing options...
Likestodraw Posted January 22, 2012 Share Posted January 22, 2012 This tut won't work for me <_> Link to comment Share on other sites More sharing options...
Justn Posted January 23, 2012 Share Posted January 23, 2012 What are you trying to make it look like ill try to make it easy for you? Link to comment Share on other sites More sharing options...
vincent329 Posted January 24, 2012 Share Posted January 24, 2012 does reicho mean to past the code above the drawnpc (i know it sounds stupid of me to ask im just making sure) or somewhere else within the drawnpc?if i got it right i ran into a problem where it says variable not defind how do i fix it? Link to comment Share on other sites More sharing options...
kahnival Posted April 1, 2012 Share Posted April 1, 2012 I used Reichos code and it did nothing? Link to comment Share on other sites More sharing options...
brodygs9630 Posted July 23, 2012 Share Posted July 23, 2012 @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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now