Where to change the movement speed of mobs?
So my question how to make player when attack guard gona die? or guard hitting the attacker <-- its epic ^^i try using Life = 0 and its not good, its only removing a player Life, now i have this like that:Quote:
if ((this as Monster).BaseMonster.ID == 900)//Guard
{
var attacker = Map.Search<Player>(_attacker);
if (attacker != null)
attacker.AddEffect(ClientEffect.Blue, 3000);
}
And now player when attack guard make hp 0 and transform to ghost, but player cannot revive :D please help me !!Quote:
if ((this as Monster).BaseMonster.ID == 900)//Guard
{
var attacker = Map.Search<Player>(_attacker);
if (attacker != null)
attacker.AddEffect(ClientEffect.Blue, 3000);
Life = 0;
attacker.Transformation = (ushort)((attacker.Lookface % 10 > 2) ? 98 : 99);
}
when you find it replace this code:Quote:
if ((this as Monster).BaseMonster.ID == 900)//Guard
To my code:Quote:
if ((this as Monster).BaseMonster.ID == 900)//Guard
{
var attacker = Map.Search<Player>(_attacker);
if (attacker != null)
attacker.AddEffect(ClientEffect.Blue, 3000);
}
later scroll to the top of the file and paste this:Quote:
if ((this as Monster).BaseMonster.ID == 900)//Guard
{
var attacker = Map.Search<Player>(_attacker);
if (attacker != null)
attacker.AddEffect(ClientEffect.Blue, 3000);
var target = attacker;
this.target = target;
target.Kill(1, _attacker);
Life = 0;
}
Now your guard attack player.Quote:
public Entity target;
Later go to space/map.cs and find this:Quote:
/*
* User: mejo
* Date: 7/20/2013
* Time: 11:42 AM
*/
using System;
using Redux.Enum;
using Redux.Game_Server;
using Redux.Structures;
using System.Linq;
using System.Linq.Expressions;
namespace Redux.Items
{
/// <summary>
/// Handles item usage for [723727] PenitenceAmulet
/// </summary>
public class Item_723727 : IItem
{
public override void Run(Player _client, ConquerItem _item)
{
if (_client.Map.IsPrisonMap)
{
_client.SendMessage("You cannot use this item in Jail.", ChatType.System);
}
else
{
if (_client.PK >= 30)
{
_client.PK -= 30;
_client.DeleteItem(_item);
_client.Save();
}
else
{
_client.SendMessage("You cannot use this item below your PK Points 30.", ChatType.System);
}
}
}
}
}
and add under this line:Quote:
public bool IsGuildMap { get { return MapInfo.Type.HasFlag(Enum.MapTypeFlags.GuildMap); } }
Thats all :)Quote:
public bool IsPrisonMap { get { return MapInfo.Type.HasFlag(Enum.MapTypeFlags.PrisonMap); } }
Are you just trying to make guards attack blue name players?Quote:
Ok i fix this problem, here code for everybody like this guard attack players.
First go to Objects/Enity.cs and search for:
when you find it replace this code:
To my code:
later scroll to the top of the file and paste this:
Now your guard attack player.
++THANKS for this code ^^
Here a code for PenitenceAmulet:
Add new file in items and paste this code:
Later go to space/map.cs and find this:
and add under this line:
Thats all :)
Well I encourage you to learn and progress forward.Quote:
Well, this has been 128 pages of enlightenment. I started with thread one and got my server up and running off of chri's youtube video before getting around thread 30 and finding it in a post. I'd like to thank everyone involved in this project as it has kindled in me a desire to learn program language(s) as my friends have often told me I have the mind / capabilities.
I did seriously read everything.
Looking at this with newbie eyes but I'm proud of myself for getting this far ( my own pserver up and running, testing things, learning what is where and tweaking variables and seeing the in game effect; basic basics)
Again thanks to all involved in making this experience.
As some of you have noted this may no longer be the best "base" for a p server but it worked quite dandy in introducing me to the aspect.
I am interested in learning more and finding a decent source or pushing a team of you guys involved here forward to a release - live.
The benefit is after 8 years of game play - I know just about exactly what I want from a server. Needless to say - 1.0 as F.
If any of you see this message and are HEAVILY capable in helping me achieve this goal - lets talk. My intentions are to operate donation splits for each of the key staff members.
(i earlier mentioned 1.0 as fuck, so when i say donations I'm not expecting to make a ton of cash off the server but supply the community with what I believe its been begging for for over 6 years; there will be enough to keep us all happy I believe, yet not support our lives.)
also I want to pay everyone involved for their contritubtions and build more of a staff than a group of disorganized egos; i would hate to fall like most servers built off the unpaid sweat and desires of the programmers to partake in the server who eventually lose their interest because they feel un-awarded.
I have a music production company, we have this joke it goes like this. we call up a promoter friend and say "hey can you possibly promote my party? its a free party, we need 5 really good djs but we cant pay them. We want them to play to spread their name and have a good time, plus im broke. Know anyone who wants to play a show to strengthen their brand? oh by the way, all djs have to take requests from our 15 yr old crowd."
Yeah, no.
Edited* To mention that reading the thread through and through took roughly 14 hours with inbetween time of "hey i have my own server lets check shit out" when I come across a bug - I would come back to forum reading making sure it hadn't been visited.
Thanks. I'd love to help you if there is any way I can as well. If you need someone to login and test a function I'm capable and willing.Quote:
Well I encourage you to learn and progress forward.
As far as the stability of this base goes, personally I believe majority of the problems to be multi threading issues, however I cannot prove it as I have not put my server under a huge load yet. Hopefully soon :)
As far as bugs go in this source, I will gladly help to resolve any bugs that are found.