![]() |
[Guide\Release]Guards attack mobs
Guards attack Blue-Name players on just about every server, but other than my server I have only seen one or two where the guards attack other mobs. So Here is what you have to do to make guards attack mobs:
Note: if you cannot find part of what I have you search for, you are probably using a suckier and much more out-of-date source... or you are using a newer "better" source like Future\Reloaded.. My original source was ShadowCo, though it is much more updated now, and I suggest starting with this. It is very stable, and once you get used to it, easy to navigate. First go into your Entities.cs file and find Code:
public void TimerElapsed(object source, ElapsedEventArgs e)Code:
if (Target != null)Here in this release\guide I would like to note: this is not the best way to do this, I split it up and made it longer and less efficient to make it simpler for idiots to do. Now we continue: replace the afformentioned code with: Code:
if (Target != null)Code:
public class SingleMobCode:
Character Target = null;Code:
Character Target = null;and add this function Code:
public void Move2()Next, go to Packets.cs and find Code:
public byte[] MobSkillUse(SingleMob Mob, Character Attacked, uint DMG, ushort SkillId, byte SkillLevel)Code:
public byte[] MobSkillUse2(SingleMob Mob, SingleMob Attacked, uint DMG, ushort SkillId, byte SkillLevel)Code:
public static Character CharNearest(uint X, uint Y, uint Map, bool Blue)add: Code:
public static SingleMob MobNearest(uint X, uint Y, uint Map)And that's it! Recompile and restart your server and attract some Mobs to your gaurd! optional: if you add a value to SingleMob.GetDamage() for enabling\disabling drops you can make guard-killed Mobs not drop items. P.S: at the end of your public bool GetDamage(uint Damage) { block for your single mobs you may want to change Code:
return true;Code:
this.Death = DateTime.Now; |
Er.. Nice job..
|
ty dude i was workingon it but now ty :)
:handsdown::handsdown::handsdown::handsdown: :handsdown::handsdown::handsdown::handsdown: :handsdown::handsdown::handsdown::handsdown: :handsdown::handsdown::handsdown::handsdown: :handsdown::handsdown::handsdown: :handsdown::handsdown::handsdown::handsdown: :handsdown::handsdown::handsdown::handsdown: :handsdown::handsdown::handsdown::handsdown: :handsdown::handsdown::handsdown::handsdown: :handsdown::handsdown::handsdown: |
Uh.. This takes up a lot of memory lawl
|
Quote:
Quote:
|
I sed lawl not lol >_<
|
Quote:
|
@Rechocto: Pls add me at MSN: [Only registered and activated users can see links. Click Here To Register...]
|
Quote:
|
special fred... momma dropped him, on his head.. now he's not so, bright--instead, he's just a little bit special
okay enough singing :p |
Quote:
LAWLZ KAI. |
Dang-it Tao, you used to be cool =o
|
:handsdown::handsdown::handsdown:Thanks :handsdown::handsdown::handsdown:
:handsdown::handsdown: Thanks Thanks:handsdown::handsdown: :handsdown: Thanks Thanks Thanks:handsdown::handsdown: --Thanks Thanks Thanks Thanks-- :handsdown: Thanks Thanks Thanks:handsdown::handsdown: :handsdown::handsdown: Thanks Thanks:handsdown::handsdown: :handsdown::handsdown::handsdown: Thanks :handsdown::handsdown::handsdown: |
Cool ! Thank you very much, ... Btw.. .You know how to let an Guard move back to his Spawning place? Like when you are blue name and Out of range, They will folow you...
|
you could either disable following, or add to Move() "If(Target == null && MType == 1 && (PosX != StartX || PosY != StartY)) { PosX = StartX; PosY = StartY; World.SurroundMobs(this); World.SpawnMobForPlayers(this, true); }"
or something :) |
Quote:
|
don't just say thanks, use the *thanks button -.-
|
error items disappear
to make the guards kill the mods this error occurs, pulled the item not disappear.
The error was found in Entities.cs go Quote:
|
what items disapear?
|
added to [Only registered and activated users can see links. Click Here To Register...] (after request from the threadstarter)
|
When I'm not using this code the process of the Server will be 0-9 randomly. But when i try to use this one the process of the server should be like 45-55 :o , it takes too much.
|
ToT donīt func for mi ToT i make it all and my guards donīt kill mobs XD
sorry for my bad inglish xD |
wrong section man but nice release
|
# Moved
|
Help....
Code:
(if you have a server with moving mobs, if not.. You'll need to write in a Move() Function, CharNearest() function, and a MobUseSkill() Function.. Come back when you have done this. (You can write some of that based on what you'll be adding) |
Quote:
|
| All times are GMT +2. The time now is 11:04. |
Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.