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
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