tslusny
Members-
Posts
1878 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Calendar
Everything posted by tslusny
-
> Deathbeam, in future, why don't you make sure the tutorial is working before you post it? > > All you need do is take a blank copy of EO or whatever engine this is for and try to implement it then fix any problems. It'd be a much better tutorial than doing a half-arsed job and having to update it ~8 times before it actually works; you can also make it much harder for people who use it before any fixes. Becouse i forgot that i changed names of listing constants and i thought it will 100% work ![:D](http://www.touchofdeathforums.com/community/public/style_emoticons//biggrin.png)
-
Why moderner? They are very sexy now ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons//smile.png)
-
![](http://www.toptenz.net/wp-content/uploads/2010/08/what_are_you_doing.jpg)
-
honored.me ![:D](http://www.touchofdeathforums.com/community/public/style_emoticons//biggrin.png)
-
> Yes :-) > > I know how to do an Tutorial haha but still walking not much or most just wait till i get in the way of them This is pathfinding, not new NPC AI ![:D](http://www.touchofdeathforums.com/community/public/style_emoticons//biggrin.png) They will be smart only when they will try to kill you, and not when they are hanging around
-
http://replygif.net/1049
-
Quick! Admins are asleep! Count as high as possible!
tslusny replied to emblem's topic in Forum Games
28? ![:D](http://www.touchofdeathforums.com/community/public/style_emoticons//biggrin.png) -
No ![:D](http://www.touchofdeathforums.com/community/public/style_emoticons//biggrin.png) Marshy Dearest? ![:D](http://www.touchofdeathforums.com/community/public/style_emoticons//biggrin.png)
-
Nice and simple tut ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons//smile.png) Good work
-
Great tut for begginers ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons//smile.png) But what´s that tags? ![:D](http://www.touchofdeathforums.com/community/public/style_emoticons//biggrin.png)
-
> For me its working but the NPC most just stand and wait what makes easy to run away xD And do you deleted this? > This delete? srry for my noob question ; d > > ``` > > i = Int(Rnd * 5) > > ' Lets move the npc > > Select Case i > > Case 0 > > ' Up > > If MapNpc(mapnum).Npc(X).y > TargetY And Not DidWalk Then > > If CanNpcMove(mapnum, X, DIR_UP) Then > > Call NpcMove(mapnum, X, DIR_UP, MOVING_WALKING) > > DidWalk = True > > End If > > End If > > ' Down > > If MapNpc(mapnum).Npc(X).y < TargetY And Not DidWalk Then > > If CanNpcMove(mapnum, X, DIR_DOWN) Then > > Call NpcMove(mapnum, X, DIR_DOWN, MOVING_WALKING) > > DidWalk = True > > End If > > End If > > ' Left > > If MapNpc(mapnum).Npc(X).X > TargetX And Not DidWalk Then > > If CanNpcMove(mapnum, X, DIR_LEFT) Then > > Call NpcMove(mapnum, X, DIR_LEFT, MOVING_WALKING) > > DidWalk = True > > End If > > End If > > ' Right > > If MapNpc(mapnum).Npc(X).X < TargetX And Not DidWalk Then > > If CanNpcMove(mapnum, X, DIR_RIGHT) Then > > Call NpcMove(mapnum, X, DIR_RIGHT, MOVING_WALKING) > > DidWalk = True > > End If > > End If > > Case 1 > > ' Right > > If MapNpc(mapnum).Npc(X).X < TargetX And Not DidWalk Then > > If CanNpcMove(mapnum, X, DIR_RIGHT) Then > > Call NpcMove(mapnum, X, DIR_RIGHT, MOVING_WALKING) > > DidWalk = True > > End If > > End If > > ' Left > > If MapNpc(mapnum).Npc(X).X > TargetX And Not DidWalk Then > > If CanNpcMove(mapnum, X, DIR_LEFT) Then > > Call NpcMove(mapnum, X, DIR_LEFT, MOVING_WALKING) > > DidWalk = True > > End If > > End If > > ' Down > > If MapNpc(mapnum).Npc(X).y < TargetY And Not DidWalk Then > > If CanNpcMove(mapnum, X, DIR_DOWN) Then > > Call NpcMove(mapnum, X, DIR_DOWN, MOVING_WALKING) > > DidWalk = True > > End If > > End If > > ' Up > > If MapNpc(mapnum).Npc(X).y > TargetY And Not DidWalk Then > > If CanNpcMove(mapnum, X, DIR_UP) Then > > Call NpcMove(mapnum, X, DIR_UP, MOVING_WALKING) > > DidWalk = True > > End If > > End If > > Case 2 > > ' Down > > If MapNpc(mapnum).Npc(X).y < TargetY And Not DidWalk Then > > If CanNpcMove(mapnum, X, DIR_DOWN) Then > > Call NpcMove(mapnum, X, DIR_DOWN, MOVING_WALKING) > > DidWalk = True > > End If > > End If > > ' Up > > If MapNpc(mapnum).Npc(X).y > TargetY And Not DidWalk Then > > If CanNpcMove(mapnum, X, DIR_UP) Then > > Call NpcMove(mapnum, X, DIR_UP, MOVING_WALKING) > > DidWalk = True > > End If > > End If > > ' Right > > If MapNpc(mapnum).Npc(X).X < TargetX And Not DidWalk Then > > If CanNpcMove(mapnum, X, DIR_RIGHT) Then > > Call NpcMove(mapnum, X, DIR_RIGHT, MOVING_WALKING) > > DidWalk = True > > End If > > End If > > ' Left > > If MapNpc(mapnum).Npc(X).X > TargetX And Not DidWalk Then > > If CanNpcMove(mapnum, X, DIR_LEFT) Then > > Call NpcMove(mapnum, X, DIR_LEFT, MOVING_WALKING) > > DidWalk = True > > End If > > End If > > Case 3 > > ' Left > > If MapNpc(mapnum).Npc(X).X > TargetX And Not DidWalk Then > > If CanNpcMove(mapnum, X, DIR_LEFT) Then > > Call NpcMove(mapnum, X, DIR_LEFT, MOVING_WALKING) > > DidWalk = True > > End If > > End If > > ' Right > > If MapNpc(mapnum).Npc(X).X < TargetX And Not DidWalk Then > > If CanNpcMove(mapnum, X, DIR_RIGHT) Then > > Call NpcMove(mapnum, X, DIR_RIGHT, MOVING_WALKING) > > DidWalk = True > > End If > > End If > > ' Up > > If MapNpc(mapnum).Npc(X).y > TargetY And Not DidWalk Then > > If CanNpcMove(mapnum, X, DIR_UP) Then > > Call NpcMove(mapnum, X, DIR_UP, MOVING_WALKING) > > DidWalk = True > > End If > > End If > > ' Down > > If MapNpc(mapnum).Npc(X).y < TargetY And Not DidWalk Then > > If CanNpcMove(mapnum, X, DIR_DOWN) Then > > Call NpcMove(mapnum, X, DIR_DOWN, MOVING_WALKING) > > DidWalk = True > > End If > > End If > > End Select > > ```
-
I think all bugs are fixed (thx to Adiif for reporting them) so i hope everything is working ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons//smile.png)
-
> share yes pls Sorry but no ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons//smile.png) It´s my system, i sold copy of my source with it to Bug, but without my permission he can´t share it. Maybe i will decide to share it sometimes, but not now ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons//tongue.png)
-
He wanna aura system (Bug, don´t share it pls ![;)](http://www.touchofdeathforums.com/community/public/style_emoticons//wink.png) )
-
> Good? > > ``` > > Public mapMatrix() As mapMatrixRec > > ``` > > Variable not defined > > ``` > > PlayerWalking > > ``` > > Please Fix this all Pathfinding Uploaded new modPathfinding That your 1 to MAX_MAPS issue are still here, so just repeat what you did, becouse you have older MC so you do not have MAX_MAPS constant
-
> Constant expression required > > ``` > > Public mapMatrix(1 To MAX_MAPS) As mapMatrixRec > > ``` > > ….. Remove that 1 to MAX_MAPS
-
Updated post, now there are 2 versions of modPathfinding, one for latest Miracle Classic and one for other engines. Adiif use that for other engines .
-
Ok i have here some things left from Miracle Classic, gonna update tut ![;)](http://www.touchofdeathforums.com/community/public/style_emoticons//wink.png)
-
> This delete? srry for my noob question ; d > > ``` > > i = Int(Rnd * 5) > > ' Lets move the npc > > Select Case i > > Case 0 > > ' Up > > If MapNpc(mapnum).Npc(X).y > TargetY And Not DidWalk Then > > If CanNpcMove(mapnum, X, DIR_UP) Then > > Call NpcMove(mapnum, X, DIR_UP, MOVING_WALKING) > > DidWalk = True > > End If > > End If > > ' Down > > If MapNpc(mapnum).Npc(X).y < TargetY And Not DidWalk Then > > If CanNpcMove(mapnum, X, DIR_DOWN) Then > > Call NpcMove(mapnum, X, DIR_DOWN, MOVING_WALKING) > > DidWalk = True > > End If > > End If > > ' Left > > If MapNpc(mapnum).Npc(X).X > TargetX And Not DidWalk Then > > If CanNpcMove(mapnum, X, DIR_LEFT) Then > > Call NpcMove(mapnum, X, DIR_LEFT, MOVING_WALKING) > > DidWalk = True > > End If > > End If > > ' Right > > If MapNpc(mapnum).Npc(X).X < TargetX And Not DidWalk Then > > If CanNpcMove(mapnum, X, DIR_RIGHT) Then > > Call NpcMove(mapnum, X, DIR_RIGHT, MOVING_WALKING) > > DidWalk = True > > End If > > End If > > Case 1 > > ' Right > > If MapNpc(mapnum).Npc(X).X < TargetX And Not DidWalk Then > > If CanNpcMove(mapnum, X, DIR_RIGHT) Then > > Call NpcMove(mapnum, X, DIR_RIGHT, MOVING_WALKING) > > DidWalk = True > > End If > > End If > > ' Left > > If MapNpc(mapnum).Npc(X).X > TargetX And Not DidWalk Then > > If CanNpcMove(mapnum, X, DIR_LEFT) Then > > Call NpcMove(mapnum, X, DIR_LEFT, MOVING_WALKING) > > DidWalk = True > > End If > > End If > > ' Down > > If MapNpc(mapnum).Npc(X).y < TargetY And Not DidWalk Then > > If CanNpcMove(mapnum, X, DIR_DOWN) Then > > Call NpcMove(mapnum, X, DIR_DOWN, MOVING_WALKING) > > DidWalk = True > > End If > > End If > > ' Up > > If MapNpc(mapnum).Npc(X).y > TargetY And Not DidWalk Then > > If CanNpcMove(mapnum, X, DIR_UP) Then > > Call NpcMove(mapnum, X, DIR_UP, MOVING_WALKING) > > DidWalk = True > > End If > > End If > > Case 2 > > ' Down > > If MapNpc(mapnum).Npc(X).y < TargetY And Not DidWalk Then > > If CanNpcMove(mapnum, X, DIR_DOWN) Then > > Call NpcMove(mapnum, X, DIR_DOWN, MOVING_WALKING) > > DidWalk = True > > End If > > End If > > ' Up > > If MapNpc(mapnum).Npc(X).y > TargetY And Not DidWalk Then > > If CanNpcMove(mapnum, X, DIR_UP) Then > > Call NpcMove(mapnum, X, DIR_UP, MOVING_WALKING) > > DidWalk = True > > End If > > End If > > ' Right > > If MapNpc(mapnum).Npc(X).X < TargetX And Not DidWalk Then > > If CanNpcMove(mapnum, X, DIR_RIGHT) Then > > Call NpcMove(mapnum, X, DIR_RIGHT, MOVING_WALKING) > > DidWalk = True > > End If > > End If > > ' Left > > If MapNpc(mapnum).Npc(X).X > TargetX And Not DidWalk Then > > If CanNpcMove(mapnum, X, DIR_LEFT) Then > > Call NpcMove(mapnum, X, DIR_LEFT, MOVING_WALKING) > > DidWalk = True > > End If > > End If > > Case 3 > > ' Left > > If MapNpc(mapnum).Npc(X).X > TargetX And Not DidWalk Then > > If CanNpcMove(mapnum, X, DIR_LEFT) Then > > Call NpcMove(mapnum, X, DIR_LEFT, MOVING_WALKING) > > DidWalk = True > > End If > > End If > > ' Right > > If MapNpc(mapnum).Npc(X).X < TargetX And Not DidWalk Then > > If CanNpcMove(mapnum, X, DIR_RIGHT) Then > > Call NpcMove(mapnum, X, DIR_RIGHT, MOVING_WALKING) > > DidWalk = True > > End If > > End If > > ' Up > > If MapNpc(mapnum).Npc(X).y > TargetY And Not DidWalk Then > > If CanNpcMove(mapnum, X, DIR_UP) Then > > Call NpcMove(mapnum, X, DIR_UP, MOVING_WALKING) > > DidWalk = True > > End If > > End If > > ' Down > > If MapNpc(mapnum).Npc(X).y < TargetY And Not DidWalk Then > > If CanNpcMove(mapnum, X, DIR_DOWN) Then > > Call NpcMove(mapnum, X, DIR_DOWN, MOVING_WALKING) > > DidWalk = True > > End If > > End If > > End Select > > ``` Yea ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons//smile.png) Gonna add it to tut to help other people ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons//smile.png) Thx Adiif, i already deleted this thing in my source, so i wasn´t able to post what to delete ![:D](http://www.touchofdeathforums.com/community/public/style_emoticons//biggrin.png)
-
> Delete this? > > ``` > > ' Check if we can't move and if Target is behind something and if we can just switch dirs > > If Not DidWalk Then > > If MapNpc(mapnum).Npc(X).X - 1 = TargetX And MapNpc(mapnum).Npc(X).y = TargetY Then > > If MapNpc(mapnum).Npc(X).Dir DIR_LEFT Then > > Call NpcDir(mapnum, X, DIR_LEFT) > > End If > > ``` No, that thing what has to do with NPC movement above it (with rand 1 to 5 number and select case). Updated post, if forgot to attach modPathfinding ![:D](http://www.touchofdeathforums.com/community/public/style_emoticons//biggrin.png)
-
When using this, you MUST include credits to: Herbert Glarner and if you are nice enought, then to me also ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons//smile.png) Hello my little female dogs ![;)](http://www.touchofdeathforums.com/community/public/style_emoticons//wink.png) Guess what? This is epic thing. Why? Why not ![:D](http://www.touchofdeathforums.com/community/public/style_emoticons//biggrin.png) So let´s begin… **NOTE:** This is only server side edit First add attached modPathfinding to your server. Now search for this: ``` Call SetStatus("Creating map cache...") Call CreateFullMapCache ``` And add this under it: ``` For i = 1 To MAX_MAPS CreatePathMatrix i Next ``` **NOTE TO MIRACLE CLASSIC USERS** Add this at bottom of Sub Redimall ``` ReDim mapMatrix(1 To MAX_MAPS) As mapMatrixRec ``` **END NOTE** Now add this at bottom of Type MapNpcRec ``` ' pathfinding arPath() As tPoint hasPath As Boolean TargetX As Long TargetY As Long pathLoc As Long ``` Now search for this in Sub UpdateMapLogic: ``` If target_verify Then ``` And now add this under it: ``` ' if map has a working matrix, use a* pathfinding If mapMatrix(MapNum).created Then If GetPlayerX(target) MapNpc(MapNum).Npc(x).TargetX Or GetPlayerY(target) MapNpc(MapNum).Npc(x).TargetY Then ' player has moved, re-find the path MapNpc(MapNum).Npc(x).hasPath = APlus(MapNum, CLng(MapNpc(MapNum).Npc(x).x), CLng(MapNpc(MapNum).Npc(x).y), CLng(GetPlayerX(target)), CLng(GetPlayerY(target)), Void, MapNpc(MapNum).Npc(x).arPath) ' set the npc's cur path location If MapNpc(MapNum).Npc(x).hasPath Then MapNpc(MapNum).Npc(x).pathLoc = UBound(MapNpc(MapNum).Npc(x).arPath) End If ' if has path, follow it If MapNpc(MapNum).Npc(x).hasPath Then ' follow path NpcMoveAlongPath MapNum, x didwalk = True End If End If ``` And now **remove** this code below it: ``` i = Int(Rnd * 5) ' Lets move the npc Select Case i Case 0 ' Up If MapNpc(mapnum).Npc(X).y > TargetY And Not DidWalk Then If CanNpcMove(mapnum, X, DIR_UP) Then Call NpcMove(mapnum, X, DIR_UP, MOVING_WALKING) DidWalk = True End If End If ' Down If MapNpc(mapnum).Npc(X).y < TargetY And Not DidWalk Then If CanNpcMove(mapnum, X, DIR_DOWN) Then Call NpcMove(mapnum, X, DIR_DOWN, MOVING_WALKING) DidWalk = True End If End If ' Left If MapNpc(mapnum).Npc(X).X > TargetX And Not DidWalk Then If CanNpcMove(mapnum, X, DIR_LEFT) Then Call NpcMove(mapnum, X, DIR_LEFT, MOVING_WALKING) DidWalk = True End If End If ' Right If MapNpc(mapnum).Npc(X).X < TargetX And Not DidWalk Then If CanNpcMove(mapnum, X, DIR_RIGHT) Then Call NpcMove(mapnum, X, DIR_RIGHT, MOVING_WALKING) DidWalk = True End If End If Case 1 ' Right If MapNpc(mapnum).Npc(X).X < TargetX And Not DidWalk Then If CanNpcMove(mapnum, X, DIR_RIGHT) Then Call NpcMove(mapnum, X, DIR_RIGHT, MOVING_WALKING) DidWalk = True End If End If ' Left If MapNpc(mapnum).Npc(X).X > TargetX And Not DidWalk Then If CanNpcMove(mapnum, X, DIR_LEFT) Then Call NpcMove(mapnum, X, DIR_LEFT, MOVING_WALKING) DidWalk = True End If End If ' Down If MapNpc(mapnum).Npc(X).y < TargetY And Not DidWalk Then If CanNpcMove(mapnum, X, DIR_DOWN) Then Call NpcMove(mapnum, X, DIR_DOWN, MOVING_WALKING) DidWalk = True End If End If ' Up If MapNpc(mapnum).Npc(X).y > TargetY And Not DidWalk Then If CanNpcMove(mapnum, X, DIR_UP) Then Call NpcMove(mapnum, X, DIR_UP, MOVING_WALKING) DidWalk = True End If End If Case 2 ' Down If MapNpc(mapnum).Npc(X).y < TargetY And Not DidWalk Then If CanNpcMove(mapnum, X, DIR_DOWN) Then Call NpcMove(mapnum, X, DIR_DOWN, MOVING_WALKING) DidWalk = True End If End If ' Up If MapNpc(mapnum).Npc(X).y > TargetY And Not DidWalk Then If CanNpcMove(mapnum, X, DIR_UP) Then Call NpcMove(mapnum, X, DIR_UP, MOVING_WALKING) DidWalk = True End If End If ' Right If MapNpc(mapnum).Npc(X).X < TargetX And Not DidWalk Then If CanNpcMove(mapnum, X, DIR_RIGHT) Then Call NpcMove(mapnum, X, DIR_RIGHT, MOVING_WALKING) DidWalk = True End If End If ' Left If MapNpc(mapnum).Npc(X).X > TargetX And Not DidWalk Then If CanNpcMove(mapnum, X, DIR_LEFT) Then Call NpcMove(mapnum, X, DIR_LEFT, MOVING_WALKING) DidWalk = True End If End If Case 3 ' Left If MapNpc(mapnum).Npc(X).X > TargetX And Not DidWalk Then If CanNpcMove(mapnum, X, DIR_LEFT) Then Call NpcMove(mapnum, X, DIR_LEFT, MOVING_WALKING) DidWalk = True End If End If ' Right If MapNpc(mapnum).Npc(X).X < TargetX And Not DidWalk Then If CanNpcMove(mapnum, X, DIR_RIGHT) Then Call NpcMove(mapnum, X, DIR_RIGHT, MOVING_WALKING) DidWalk = True End If End If ' Up If MapNpc(mapnum).Npc(X).y > TargetY And Not DidWalk Then If CanNpcMove(mapnum, X, DIR_UP) Then Call NpcMove(mapnum, X, DIR_UP, MOVING_WALKING) DidWalk = True End If End If ' Down If MapNpc(mapnum).Npc(X).y < TargetY And Not DidWalk Then If CanNpcMove(mapnum, X, DIR_DOWN) Then Call NpcMove(mapnum, X, DIR_DOWN, MOVING_WALKING) DidWalk = True End If End If End Select ```And that´s all my friends. Easy tut for that complex thing ![:D](http://www.touchofdeathforums.com/community/public/style_emoticons//biggrin.png)
-
Btw this friend system needs redone finnally ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons//smile.png) I am working on RTF version for my game, so mabe i will share it also. What is RTF bonuses? You can have for example offfline user - red color, and online - green ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons//smile.png) Or even you can add images before player names.
-
So use Joyce's one, its bassically Yami's, but fixed.