Golf Posted May 10, 2013 Author Share Posted May 10, 2013 **Eclipse NPC Say System**I searched on forum and i can't find this system so i decided to make it ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png)NPC Say system allows you to see what is NPC saying every few seconds(adjustable)it looks like this ![:rolleyes:](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/rolleyes.gif)![](http://s18.postimg.org/j24bj4iat/image.png)So lets start**Client Side**Serach for this in modText```Public Sub DrawNpcName(ByVal Index As Long)```In this sub search for```'Draw NPC nameCall DrawText(TexthDC, TextX, TextY, Name, color)```Replace it with```Dim SAY As StringSAY = Trim$(Npc(npcNum).AttackSay)If Not SAY = vbNullString ThenIf GetTickCount Mod 8000 < 4000 ThenCall DrawText(TexthDC, TextX, TextY, SAY, color)ElseCall DrawText(TexthDC, TextX, TextY, Name, color)End IfElseCall DrawText(TexthDC, TextX, TextY, Name, color)End if```Now launch the game , go to admin panel , NPC and then type something you want to (NPC)say in say textboxSimple!>! Just replace If GetTickCount Mod 8000 < 4000 Then with>! If GetTickCount Mod 5000 < 2500 Then>! or other>! Problem 1>! NPC is saying |||||||||||||||||||||||||||||||||||||||||||||||||||>! Just type NPC name in say textbox>! Idea - Golf>! Made by Golf>! Thanks to>! Sherwin Link to comment Share on other sites More sharing options...
Zopto Posted May 10, 2013 Share Posted May 10, 2013 golf you getting better every day!!!!good job!!! Link to comment Share on other sites More sharing options...
Golf Posted May 10, 2013 Author Share Posted May 10, 2013 One Information!Every NPC need to say something (if not NPC will say |||||||||||||||||||||||||||||||||||||||||||||||||||||||||| something like that)I'm working on it ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png) Link to comment Share on other sites More sharing options...
Golf Posted May 10, 2013 Author Share Posted May 10, 2013 > golf you getting better every day!!!!good job!!!Thanks ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png) Link to comment Share on other sites More sharing options...
Golf Posted May 10, 2013 Author Share Posted May 10, 2013 Logical Solution very simple for this> One Information!> > Every NPC need to say something (if not NPC will say |||||||||||||||||||||||||||||||||||||||||||||||||||||||||| something like that)> > I'm working on it ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png)NPC name is PirateJust type Pirate in say textbox and nothing will be changed! Link to comment Share on other sites More sharing options...
hisherwin Posted May 11, 2013 Share Posted May 11, 2013 > One Information!> > Every NPC need to say something (if not NPC will say |||||||||||||||||||||||||||||||||||||||||||||||||||||||||| something like that)> > I'm working on it ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png)Easy Fixedreplace```' Show (Draw) name and NPC SayDim SAY As StringSAY = Trim$(Npc(npcNum).AttackSay)'You can change time (on Forum)If GetTickCount Mod 8000 < 4000 ThenCall DrawText(TexthDC, TextX, TextY, SAY, color)ElseCall DrawText(TexthDC, TextX, TextY, Name, color)End If```with```' Show (Draw) name and NPC SayDim SAY As StringIf Not Npc(npcNum).AttackSay = vbNullstring ThenSAY = Trim$(Npc(npcNum).AttackSay)ElseSAY = vbNullStringEnd If'You can change time (on Forum)If Not SAY = vbNullString ThenIf GetTickCount Mod 8000 < 4000 ThenCall DrawText(TexthDC, TextX, TextY, SAY, color)ElseCall DrawText(TexthDC, TextX, TextY, Name, color)End IfEnd If``` Link to comment Share on other sites More sharing options...
hisherwin Posted May 11, 2013 Share Posted May 11, 2013 And you should try to use Server Side Sometimes.. it's good..Than using Client Side. Link to comment Share on other sites More sharing options...
Golf Posted May 11, 2013 Author Share Posted May 11, 2013 > Easy Fixed> > replace> > ' Show (Draw) name and NPC Say> > Dim SAY As String> > SAY = Trim$(Npc(npcNum).AttackSay)> > 'You can change time (on Forum)> > If GetTickCount Mod 8000 < 4000 Then> > Call DrawText(TexthDC, TextX, TextY, SAY, color)> > Else> > Call DrawText(TexthDC, TextX, TextY, Name, color)> > End If> > with> > ' Show (Draw) name and NPC Say> > Dim SAY As String> > If Not Npc(npcNum).AttackSay = vbNullstring Then> > SAY = Trim$(Npc(npcNum).AttackSay)> > Else> > SAY = vbNullString> > End If> > 'You can change time (on Forum)> > If Not SAY = vbNullString Then> > If GetTickCount Mod 8000 < 4000 Then> > Call DrawText(TexthDC, TextX, TextY, SAY, color)> > Else> > Call DrawText(TexthDC, TextX, TextY, Name, color)> > End If> > End IfTested not working Link to comment Share on other sites More sharing options...
Golf Posted May 11, 2013 Author Share Posted May 11, 2013 > Logical Solution very simple for this> > **Quote**> > [background=rgb(247, 247, 247)]One Information!> > Every NPC need to say something (if not NPC will say |||||||||||||||||||||||||||||||||||||||||||||||||||||||||| something like that)> > I'm working on it ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png)[/background]> > NPC name is Pirate> > Just type Pirate in say textbox and nothing will be changed!Solution :/ Link to comment Share on other sites More sharing options...
hisherwin Posted May 11, 2013 Share Posted May 11, 2013 I can fix that.. easy fix too.. but .. am i creating this thing? you create it lol Link to comment Share on other sites More sharing options...
Golf Posted May 11, 2013 Author Share Posted May 11, 2013 LOL you dont need to fix it Link to comment Share on other sites More sharing options...
hisherwin Posted May 11, 2013 Share Posted May 11, 2013 replace your entire tutorial with thisSerach for this in modText```Public Sub DrawNpcName(ByVal Index As Long)```In this sub search for```'Draw NPC nameCall DrawText(TexthDC, TextX, TextY, Name, color)```Add Below```Dim SAY As StringSAY = Trim$(Npc(npcNum).AttackSay)If Not Say = vbNullString ThenIf GetTickCount Mod 8000 < 4000 ThenCall DrawText(TexthDC, TextX, TextY - 15, SAY, color)End IfEnd If``` Link to comment Share on other sites More sharing options...
zomb88 Posted May 11, 2013 Share Posted May 11, 2013 lol sherwin> replace your entire tutorial with this Link to comment Share on other sites More sharing options...
hisherwin Posted May 11, 2013 Share Posted May 11, 2013 > lol sherwinI knew someone would laugh at that.. but that code i've done on it will work 90% … will fail 10% Link to comment Share on other sites More sharing options...
Golf Posted May 11, 2013 Author Share Posted May 11, 2013 Sherwin thanks now it works great! Added to tut![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png) 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