PDA

View Full Version : [317] Adding NPC block emotes



Kingdomkey01
July 14th, 2010, 02:37
Base/Deob: Delta 317
Level of difficulty: 1/10
Why I'm doing this:
To properly add and modify/clean some of Delta's existing and current codes that just don't cut it.

So first I need you to simply add this piece of code in your NPC class



public int GetBlockEmote() {
switch (npcType) {
case 2745:
return -1;
}
return npcType != 1613 ? 424 : 65;
}


I'll show you how to add more NPC's.

Next, in your client class find this:



if (server.npcHandler.npcs[attacknpc].npcType != 0) {


Directly under that, add this:



if (server.npcHandler.npcs[attacknpc].npcType != 2745) {
server.npcHandler.npcs[attacknpc].animNumber = server.npcHandler.npcs[attacknpc]
.GetBlockEmote();
server.npcHandler.npcs[attacknpc].animUpdateRequired = true;
}


Finished!

How to add more npc's

I've added a ternary so the default emote is a human block emote.

Simply just do this.



public int GetBlockEmote() {
switch (npcType) {
case 2745:
return -1;
case XXXX:
return X;
}
return npcType != 1613 ? 424 : 65;
}


Any cases above a single return statement will result into that integer being returned.

case - NPC ID
return statement - Emote

CREDITS TO OWNER BLADE FOR THE LAST PART :D

Mark11271127
July 14th, 2010, 02:38
Very nice tutorial keep up the good work!

Kingdomkey01
July 14th, 2010, 06:00
Thanks mate.

Hoodlum_
July 14th, 2010, 06:01
Kay Sean, see you're still loving the Delta's. Great, time to move on IMO but personal choice is always best.

Kingdomkey01
July 14th, 2010, 06:04
Don't worry, I've been using shard and starting to use hyperion with my mate ryan. I'm only posting these tutorials because of the popularity of Delta. I don't use Delta, I create new methods for delta for optimization and features. I don't use it to host. (Not anymore :P)

Hoodlum_
July 14th, 2010, 06:05
Sean, PM me I'll give you my new MSN.

andrewert
July 17th, 2010, 21:34
are you shoopdawhoop on r-s? lol and start making perfected skills for delta :D

CRAIZYBART
June 27th, 2011, 06:40
good work ;)

Jon
June 27th, 2011, 07:11
good work ;)

You just bumped a year old thread. nice one