Beanie93 Posted September 6, 2011 Author Share Posted September 6, 2011 Been a while since I don't post a tutorial. By the end of this tutorial, your NPCs will have their level displayed at their side. It's really a simple edit, all client-side.Go to modText, we will do all of our edits there.In **Sub DrawNpcName**, look for:``` Name = Trim$(Npc(npcNum).Name)```Delete it. We don't need that.Now, just above, look for:``` Select Case Npc(npcNum).Behaviour Case NPC_BEHAVIOUR_ATTACKONSIGHT color = QBColor(BrightRed) Case NPC_BEHAVIOUR_ATTACKWHENATTACKED color = QBColor(Yellow) Case NPC_BEHAVIOUR_GUARD color = QBColor(Grey) Case Else color = QBColor(BrightGreen) End Select```And replace it with:``` Select Case Npc(npcNum).Behaviour Case NPC_BEHAVIOUR_ATTACKONSIGHT color = QBColor(BrightRed) Name = Trim$(Npc(npcNum).Name) & " [" & Npc(npcNum).Level & "]" Case NPC_BEHAVIOUR_ATTACKWHENATTACKED color = QBColor(Yellow) Name = Trim$(Npc(npcNum).Name) & " [" & Npc(npcNum).Level & "]" Case NPC_BEHAVIOUR_GUARD color = QBColor(Grey) Name = Trim$(Npc(npcNum).Name) & " [" & Npc(npcNum).Level & "]" Case Else color = QBColor(BrightGreen) Name = Trim$(Npc(npcNum).Name) End Select```This code will show their levels only if they are attack on sight, attack when attacked, or guards. We don't want a friendly/shopkeeper NPC's level to be visible if we can't attack it… right?That's pretty much it. Hope it helps. Link to comment Share on other sites More sharing options...
Techos Posted November 24, 2011 Share Posted November 24, 2011 Thanks.! Link to comment Share on other sites More sharing options...
achap89 Posted January 14, 2012 Share Posted January 14, 2012 instead of using text how can I show an img? Link to comment Share on other sites More sharing options...
totidarmala Posted May 10, 2013 Share Posted May 10, 2013 hey can you help me for showing level for player ? Link to comment Share on other sites More sharing options...
Zeno Posted May 10, 2013 Share Posted May 10, 2013 Simple and great, 8\. Thanks for sharing.> hey can you help me for showing level for player ?Put this in modText, drawplayername```Name = Trim$(Player(index).Name) & " [" & GetPlayerLevel(index) & "]"```Same formatting as above.> instead of using text how can I show an img?I understand that your question is relevant in theme. In terms of the actual code required, a separate topic in Q&A would be more appropriate than in thus tutorial, because of both the scope of the request and since the methods have practically nothing to do with each other. All the same… a lot of people have asked for this in the past and I don't think a tutorial exists. So I've just uploaded one. [Here's the link](http://www.touchofdeathforums.com/community/index.php?/topic/133157-eo-images-by-player-names-base-for-further-specific-coding/). 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