Growlith1223 Posted November 17, 2012 Author Share Posted November 17, 2012 This was a request by zzBrandon so yea lolOk so go into ModTypes and goto NpcRec and add```Speed As Byte```Also do that in the client as wellThen on frmEditor_NPC, add a scrollbar and a label..lblSpeedscrlSpeedOnce done add this to scrlSpeed_Change```lblSpeed.Caption = "Speed: " & scrlSpeed.ValueNpc(EditorIndex).Speed = scrlSpeed.Value```After that go into NPCEditorInit or whatever the sub is called to initialize everything and add```.scrlSpeed.Value = Npc(EditorIndex).Speed.lblSpeed.Caption = "Speed: " & Npc(EditorIndex).Speed```Then go into ModGameLogic, find ProcessNPCMovement and add this at the top```Dim WalkSpeed As Byte```After that, where it says If MapNpc(MapNpcNum).Moving = MOVING_WALKING Then, Add this below that line``` Select Case Npc(MapNpc(MapNpcNum).num).Speed Case Is >= 0 WalkSpeed = Npc(MapNpc(MapNpcNum).num).Speed Case Is <= 0 WalkSpeed = WALK_SPEED End Select```THENReplace the WALK_SPEED with WalkSpeed…only replace in ProcessNPCMovementIt should work then, if there's anything missing, lemme know! ![^_^](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/happy.png) Link to comment Share on other sites More sharing options...
Zzbrandon Posted November 17, 2012 Share Posted November 17, 2012 Bravo ![:D](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/biggrin.png) Link to comment Share on other sites More sharing options...
Matt Posted November 17, 2012 Share Posted November 17, 2012 I did this a while back, but decided not to post it as the npc's looked hilarious when they were chasing a player and their speed was increased. Regardless, good job! ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png) Link to comment Share on other sites More sharing options...
Growlith1223 Posted November 17, 2012 Author Share Posted November 17, 2012 lol yea when i tested it it was pretty funny xD Link to comment Share on other sites More sharing options...
Valentine90 Posted November 17, 2012 Share Posted November 17, 2012 This shows how vulnerable system the speed of player and NPC, any hacker can hack the game and change the speed you want, would be interesting to create something on the server that impessa high speeds …. Link to comment Share on other sites More sharing options...
BeNjO Posted November 17, 2012 Share Posted November 17, 2012 or simply check if 6 seconds goes by faster than 5, if so player is using a speed hack.. Link to comment Share on other sites More sharing options...
teamokell Posted November 28, 2012 Share Posted November 28, 2012 I found a bug. Speed change only for 1 npc..If i have more 1 same npc only 1 will be speed change Link to comment Share on other sites More sharing options...
Growlith1223 Posted November 28, 2012 Author Share Posted November 28, 2012 I've already fixed this Link to comment Share on other sites More sharing options...
abhi2011 Posted November 28, 2012 Share Posted November 28, 2012 Wait this wasn't in the Engine? Link to comment Share on other sites More sharing options...
tslusny Posted November 28, 2012 Share Posted November 28, 2012 > Wait this wasn't in the Engine?In EA yes, but otherwise no… Link to comment Share on other sites More sharing options...
abhi2011 Posted November 28, 2012 Share Posted November 28, 2012 Okay. Link to comment Share on other sites More sharing options...
Ganjika Posted November 28, 2012 Share Posted November 28, 2012 I'm getting a subscript out of range on "CopyMemory ByVal VarPtr(NPC(n)), ByVal VarPtr(NpcData(0)), NpcSize" in modHandleData (Client) On Dragon Eclipse (EO [3.0] Nightly Dx8) Link to comment Share on other sites More sharing options...
Growlith1223 Posted November 28, 2012 Author Share Posted November 28, 2012 you didn't delete you npcs Link to comment Share on other sites More sharing options...
Ganjika Posted November 28, 2012 Share Posted November 28, 2012 II am getting a variable not defined in the client on modLogic at```Sub ProcessNpcMovement(ByVal MapNpcNum As Long)``` Link to comment Share on other sites More sharing options...
Growlith1223 Posted November 28, 2012 Author Share Posted November 28, 2012 then you didn't follow the tutorial correctly ._. Link to comment Share on other sites More sharing options...
Ganjika Posted November 28, 2012 Share Posted November 28, 2012 > then you didn't follow the tutorial correctly ._.I figured I didn't, I will try again.Quick question : When you say Replace the```WALK_SPEED ```with```WalkSpeed```…only replace in ProcessNPCMovementAm i replacing every single "WALK_SPEED" in that sub or whatnotalsowhen you sayAfter that go into NPCEditorInit or whatever the sub is called to initialize everything and add```.scrlSpeed.Value = Npc(EditorIndex).Speed.lblSpeed.Caption = "Speed: " & Npc(EditorIndex).Speed```where exactly in that sub do i put this info? Link to comment Share on other sites More sharing options...
Growlith1223 Posted November 28, 2012 Author Share Posted November 28, 2012 read through the tutorial to see what you've missed. from what i think it is, you forgot to dim the walkspeed or forgot to add the .Speed line in the npcrecEDIT:1\. Yes.2\. In NpcEditorInit Link to comment Share on other sites More sharing options...
Ganjika Posted November 28, 2012 Share Posted November 28, 2012 I got it to turn on and it worked fine (althougnh i didnt hit send to know if it fully works yet on my version of eclipse) but when i tried setting the walkspeed up really high it crashed with an overflow error, what is the max walkspeed i should set this too so i can tell the scrollbar a max? I know its probably a noobish question and I'm thinking maybe like 255 or something but i wanted to ask first. thanks for reading and putting out this epic and simple system. =]```(highlighted area in error is `NPC(EditorIndex).Speed = scrlSpeed.Value```` Link to comment Share on other sites More sharing options...
Growlith1223 Posted November 28, 2012 Author Share Posted November 28, 2012 it's 255 Link to comment Share on other sites More sharing options...
Ganjika Posted December 5, 2012 Share Posted December 5, 2012 Is therea way to have an option for no movement (a shopkeeper type deal where the npc cant move but is still attack on site or whatever)? Link to comment Share on other sites More sharing options...
Growlith1223 Posted December 5, 2012 Author Share Posted December 5, 2012 that's a totally different system but isn't that hard, just add a boolean in the npcRec and if it's true, then add a check in the npc movement sub(server side), Link to comment Share on other sites More sharing options...
Wortel Angels Posted December 15, 2012 Share Posted December 15, 2012 Nice idea but for me is the npc not really faster hest just jumping from 2 tile to the other…Example:i make an NPCWalk Speed = 255and i can still just walk away from him and hes jumping behind me from tile to tile... Link to comment Share on other sites More sharing options...
Matt Posted December 16, 2012 Share Posted December 16, 2012 In reality, this changes the visual speed, not the actual speed of the NPC. That's why Link to comment Share on other sites More sharing options...
Wortel Angels Posted December 16, 2012 Share Posted December 16, 2012 Yes and thats not really an custom npc speed thats an custom npc animation speed = bad sry Link to comment Share on other sites More sharing options...
Ganjika Posted December 16, 2012 Share Posted December 16, 2012 So then is there any way to change the actual speed of the npc relative to a potentially similiar manner to the one shown here? I would absolutely love to see such a tutorial. 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