PDA

View Full Version : [DELTA] Fixing NPC Fighting Glitch



girofsilgar
June 29th, 2010, 04:54
in delta if you attack a monster, it start retaliate instantly, instead of waiting for you to hit it


this is the fix

its a simple fix

find:

if ((attacknpc >= 0)
&& (attacknpc < server.npcHandler.maxNPCSpawns)) {
IsAttackingNPC = true;

if (server.npcHandler.npcs[attacknpc].StartKilling == 0) {
server.npcHandler.npcs[attacknpc].StartKilling = playerId;
}
server.npcHandler.npcs[attacknpc].RandomWalk = false;
server.npcHandler.npcs[attacknpc].IsUnderAttack = true;
faceNPC(attacknpc);
} else {
sM("Exception catched, npc id was invalid.");
ResetAttackNPC();
}
}

comment out this line

server.npcHandler.npcs[attacknpc].StartKilling = playerId;

fixed :)

iMPeX
June 29th, 2010, 06:23
Wow t-rav, this is Exiled from sg. Nice, tut, I guess...

bloodpk3r
June 29th, 2010, 12:19
give credits to the person who actually made this unless you are him but this was released before on runelocus and on other similar themed forums i know this because i added it into my delta source
but im not allowed to give links to the other forums so your just going to have to trust me that this already exists

this was released by silabgarza on r-s you need to give credits to him because this is a leech :\
he made his on the 17/4/2010 you made yours today.? + you have copied the entire guide from him word for word except the top line which you have changed a couple of words.. :\


okay, you know how on delta servers, when u click attack, the npc will start attacking you, even though u havn't hit it yet?

its a simple fix

find:

if ((attacknpc >= 0)
&& (attacknpc < server.npcHandler.maxNPCSpawns)) {
IsAttackingNPC = true;

if (server.npcHandler.npcs[attacknpc].StartKilling == 0) {
server.npcHandler.npcs[attacknpc].StartKilling = playerId;
}
server.npcHandler.npcs[attacknpc].RandomWalk = false;
server.npcHandler.npcs[attacknpc].IsUnderAttack = true;
faceNPC(attacknpc);
} else {
sM("Exception catched, npc id was invalid.");
ResetAttackNPC();
}
}

comment out this line

server.npcHandler.npcs[attacknpc].StartKilling = playerId;

fixed :)


that is quoted from r-s where he posted it.. this isnt yours

girofsilgar
June 30th, 2010, 06:58
give credits to the person who actually made this unless you are him but this was released before on runelocus and on other similar themed forums i know this because i added it into my delta source
but im not allowed to give links to the other forums so your just going to have to trust me that this already exists

this was released by silabgarza on r-s you need to give credits to him because this is a leech :\
he made his on the 17/4/2010 you made yours today.? + you have copied the entire guide from him word for word except the top line which you have changed a couple of words.. :\




that is quoted from r-s where he posted it.. this isnt yours

i am silabgarza, genious

4markie
September 22nd, 2010, 04:36
Thanks so much needed this

rsnerd
November 20th, 2010, 20:01
i am silabgarza, genious

nice and i l0led so hard cuz that was fail...