well guys... i'm here again... well... i have a little problem here... I need to do a method to remove a sobnpc when it have no Hitpoints... I have tryed alot of times and do some tests and don't got sucess...
My method to create a sobnpc working fine...
Creating a SobNPC...
Code:
SobNpcSpawn agility = new SobNpcSpawn
{
Name = "FlagTeste",
UID = 10105,
MapID = 1002,
X = 449,
Y = 449,
MaxHitpoints = 100000,
Hitpoints = 100000,
Mesh = 11150,
Type = Enums.NpcType.Stake
};
Kernel.Maps[(ushort)1002].AddNpc(agility);
if ((buffer.UID == 10105) && Crystals.AgilityCrystal == false)
{
foreach (IMapObject obj3 in this.Objects)
{
if ((obj3 != null) && (obj3.MapObjType == MapObjectType.Player))
{
(obj3 as Entity).Owner.Send(buffer);
(obj3 as Entity).Owner.Screen.Remove(buffer);
}
}
this.Owner.Map.Floor[buffer.X, buffer.Y, MapObjectType.SobNpc, null] = true;
list.Add(buffer);
}
it do a partial remove... can't attack the npc, and the npc disappears... But when i walk i can see the npc appearing and disappearing... so... the npc does not disappear completely.
#1: Send any packets relating to the npc (damage packets, etc)
#2: Remove/move the npc in your map code (so new users don't have it added to their screen)
#3: Remove it from users currently on the screen
You're obviously not doing #2 if it shows up again when you leave and come back. The ONLY way that can happen is if you're re sending the spawn packet to the client. That would be handled by your map code.
If it's going then coming back you're not removing it from somewhere...
The NPC is being removed from the dictionary of NPC ... That's right ... most of the screen, it refuses to leave ... I tested many things ... I'm already discouraged x.x
you have no idea what can be added for this to work?
That looks fine, but I bet you there's a dictionary that still contains it and therefor your screen system read that and throw it back into your screen.
--Also I noticed that method is a bool, Tried doing if (Remove(obh)) { Console.Write("removed"); else { console.write("yoo no work"); }
hm?
Also... Breakpointing will solve your ENTIRE issue, it's not coding so you have no excuse such as "I don't know how to use it..." It's literally a few clicks ...
Everything you need to know, figure it out (should take a good 30 minutes to learn the basics and solve ur issue)... As I said it's no coding so you have no excuse to come back and say help i dont know how.
PASSWORD CHANGE METODE 03/19/2012 - Combat Arms Trading - 2 Replies Hi leute
weiss ein password change metod unfixed
Ih braucht nur id und pw dann mach ich fur euch
add on skype: script-taha
SSP +9 server 25 zahl metode psc bis 150 euro 12/25/2011 - Metin2 Trading - 0 Replies Hallo ich suche ein ssp +9 auf server 25 zahle mit psc 150 euro oder 175 kommt drauf an welche bonis
pn me auf skype : metin2acc2
Suche nohide metode 09/27/2010 - Diablo 2 - 2 Replies Möchte ladder rest 2 cahrs spielen mit sandy box und brauche ne möglich kein das sich das fenster sich nicht immer minimiert :D
! ! ! One Realy ''Working'' Metode To Login No Dc 03/11/2008 - SRO Private Server - 17 Replies Hi,I have metode to login Pserver :
Download Sockscap v.2 40
Link : SocksCap 2.38 - PCHome.de | Download (Kostenlos runterladen)
IP : 202.134.80.34
Port : 1010