Register for your free account! | Forgot your password?

You last visited: Today at 11:31

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Small Release] Fix Move()

Discussion on [Small Release] Fix Move() within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Nov 2007
Posts: 306
Received Thanks: 75
[Small Release] Fix Move()

I'm sure a lot of you have noticed, but on most servers where the mobs actually do move, you can stand directly south (thats.. down.. for you slow people) of the monster, they stop. here is how to fix:

go to your Move() function, and find byte ToDir = (blah blah blah) and replace it with a much more correct calculation:
Code:
                    byte ToDir = (byte)((7 - MyMath.PointDirecton(PosX, PosY, Target.LocX, Target.LocY) / 45 % 8));
next change:
Code:
                    if (!Other.PlaceFree(PosX, PosY, ToDir))
                        return;
to
Code:
                    if (!Other.PlaceFree(PosX, PosY, ToDir, (uint)Map))
                        return;
rightclick on PlaceFree and click "Go To Definition"

and replace the code for PlaceFree with:

Code:
        public static bool PlaceFree(short X, short Y, byte MoveDir, uint map)
        {
            bool Ret = true;

            switch (MoveDir)
            {
                case 0: Y += 1; break;
                case 1: X -= 1; Y += 1; break;
                case 2: X -= 1; break;
                case 3: X -= 1;Y -= 1; break;
                case 4: Y -= 1; break;
                case 5: X += 1; Y -= 1; break;
                case 6: X += 1; break;
                case 7: Y += 1; X += 1;break;
            }

            foreach (DictionaryEntry DE in Mobs.AllMobs)
            {
                SingleMob Mob = (SingleMob)DE.Value;
                if(Mob.Map == map)
                    if (Mob.Alive)
                        if (Mob.PosX == X)
                            if (Mob.PosY == Y)
                                Ret = false;
            }
            return Ret;
        }
    }
Finally, back in Entities.cs, under what you just changed you have:
Code:
                    short AddX = 0;
                    short AddY = 0;
change it to:

Code:
                    short AddX = 0;
                    short AddY = 1;
and now mobs wont just STOP, they will go a bit southwest (thats down and left) then continue chasing you.
Rechocto is offline  
Thanks
6 Users
Old 09/18/2008, 17:08   #2
 
taguro's Avatar
 
elite*gold: 0
Join Date: Jun 2007
Posts: 387
Received Thanks: 64
thanks for the post, keep up the good work.
taguro is offline  
Old 09/18/2008, 18:28   #3
 
glupkotrup's Avatar
 
elite*gold: 0
Join Date: May 2007
Posts: 1,195
Received Thanks: 457
Nice...
glupkotrup is offline  
Old 09/18/2008, 18:34   #4
 
elite*gold: 0
Join Date: Feb 2008
Posts: 668
Received Thanks: 160
For what is thix an Fix? , I don't really understand it...
YukiXian is offline  
Old 09/18/2008, 18:52   #5
 
elite*gold: 0
Join Date: Nov 2007
Posts: 306
Received Thanks: 75
the first 2 lines of the first post, yukixian
Rechocto is offline  
Old 09/18/2008, 19:08   #6
 
elite*gold: 0
Join Date: Feb 2008
Posts: 668
Received Thanks: 160
Quote:
Originally Posted by Rechocto View Post
the first 2 lines of the first post, yukixian
And I don't understand the first two lines,....
YukiXian is offline  
Old 09/18/2008, 19:37   #7
 
THE BAT's Avatar
 
elite*gold: 0
Join Date: Aug 2006
Posts: 63
Received Thanks: 28
Thanks alot of the fix

but i have only a comment for the overload of PlaceFree Function
Code:
if (!Other.PlaceFree(PosX, PosY, ToDir, (uint)Map))
                        return;
i think that its not required to include the map in the PlaceFree Function, because actually the mob will get the target from the their current map.
THE BAT is offline  
Old 09/18/2008, 21:19   #8
 
elite*gold: 0
Join Date: Nov 2007
Posts: 306
Received Thanks: 75
place free checks if X and Y are filled by another mob, mobs sometimes stop randomly because another map has a mob in that place (happens rarely, I have noticed it.. but it actually baffles me why it doesn't happen more often without Map in the vars..)
Rechocto is offline  
Old 09/18/2008, 21:31   #9
 
elite*gold: 0
Join Date: Aug 2008
Posts: 77
Received Thanks: 63
Thanks
konkizta is offline  
Old 09/18/2008, 21:51   #10
 
THE BAT's Avatar
 
elite*gold: 0
Join Date: Aug 2006
Posts: 63
Received Thanks: 28
Quote:
Originally Posted by Rechocto View Post
place free checks if X and Y are filled by another mob, mobs sometimes stop randomly because another map has a mob in that place (happens rarely, I have noticed it.. but it actually baffles me why it doesn't happen more often without Map in the vars..)
Nice, Thanks
THE BAT is offline  
Old 09/19/2008, 08:25   #11
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,338
Received Thanks: 490
Thx its helpful^^
~Yuki~ is offline  
Reply


Similar Threads Similar Threads
[Release] Defense Bot v1.0
10/03/2010 - Mabinogi Hacks, Bots, Cheats & Exploits - 25 Replies
http://i42.tinypic.com/2hcoj75.png DEFENSE BOT v1.0 by Fool and RedJoker5 A defense bot I made while training for mastery of defense. Releasing hoping it can help someone else like it helped me. The defense bot was made by me and my cousin when I obtained Rank 1 Defense and tried to get the mastery. On a human it requieres 5k hits with defense which I found to be rather annoying. This bot is made to continously use defense while restoring stamina and hp at intervals, which makes this a...
[Release]Grotto mobs that move
06/19/2010 - CO2 PServer Guides & Releases - 9 Replies
First let me say that I take no credit in coding Grotto, im just releaseing a way to make your mobs inside Grotto to move like they are supposed to. And i'm probably not the first person to figure this out. May even be an easier way of doing it, but this is how I done it. Before we get started, you should go follow pringles guide on loading DMaps if you have not yet done so. After that goto NPCDialog.cs and find this under your Grotto NPC: if (Control == 1) ...
[Release] Elf-Lag Fix.
02/13/2010 - Mabinogi Hacks, Bots, Cheats & Exploits - 44 Replies
This'll fix the lag on elf range, basically; It fixes the animation to be that of AR, thus making you more accurate because you aren't lagging due to an animation glitch. It's just a small edit in the .dll, I won't release the information on what I changed for personal reasons. Link: Standard.dll http://www.youtube.com/watch?v=QPHeeZRA9wM Here's the video of how it should look
[RELEASE] Insta-Move!
10/22/2009 - Shaiya Hacks, Bots, Cheats & Exploits - 5 Replies
Heres a fun hack to play with on the us client. After changing it click anywhere to move. Just be careful not to move to far or you'll reset. Change the code at address: 43c651 Change the D80D to D805 Basically changing FMUL to FADD. Have Fun.
A Small Release
06/30/2008 - EO PServer Guides & Releases - 11 Replies
ok guys, this is an excel file to help you with your database, so that you can stop using sql dumps (which are retarded as hell) or your notepad program. I did not include all of the tables just the most important ones. Nicest thing about this is you can just copy the rows and then paste them directly into your database. Keeps all your stuff nice and neat. THIS ORGINALLY WAS NOT MY IDEA. FUNHACKER IS THE ONE THAT TOLD ME ABOUT IT(unlike some i dont steal peoples stuff and then claim it as my...



All times are GMT +1. The time now is 11:33.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.