Angel
June 21st, 2010, 16:31
[508] Slayer
Modified Files: NPCAttack.java
Tested On: Palidino Source
|| Introduction ||
PART I
By using he Monster Attack Packet you can add Slayer or other monster requirements that can be expanded to include some range bug fixes and attack fixes (I'll explain at the bottom)
If you are missing the packet for any reason please post so that I can give you the code for the packet.
NOTE TO ALL PEOPLE WHO THINKS THIS LOOKS "GROSS" I HAVE TRIED EVERYTHING TO MAKE THIS LOOK BETTER BUT STRANGELY THIS IS THE ONLY THING THAT WORKS. IF YOU DONT LIKE IT GO MAKE IT BETTER FOR YOURSELF, JUST REMEMBER WHO GAVE YOU THE START.
|| Explanation ||
if(n.npcType == 6221) { //Spiritual Mage
(npcType) = int npcId = p.stream.readUnsignedWord();
Or when you click the attack option of a NPC the client sends a the NPC ID#.
The NPC# for every NPC is different.
if(p.skillLvl[18] >= 82) {
p.attackingNPC = true;
Checks if your Slayer Level is grater then or equal to the requirment to attack them.
Resets your AttackNPC int and stops you from attacking the npc.
} else {
p.frames.sendMessage(p, "You need 5 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
Resets your AttackNPC int and stops you from attacking the NPC.
Now to clarify why this is different from the actual combat is that this is the Pre-Combat step to attacking. Not the actual combat where next tutorial I will explain how to set up slayer tasks on a system where on my server I have ALL slayer tasks + the gem.
Now Here's The Full Code :)
Insert Into NPCAttack.java
/**
/*Slayer Level Requirements Created By Angel
*/
if(n.npcType == 1648 || n.npcType == 1650 || n.npcType == 1652) { //Crawling Hand
if(p.skillLvl[18] >= 5) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 5 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 1832) { //Cave bug
if(p.skillLvl[18] >= 7) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 7 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 7787) { //Cave Crawler
if(p.skillLvl[18] >= 10) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 10 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 1612) { //Banshee
if(p.skillLvl[18] >= 15) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 15 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 1831) { //Cave slime
if(p.skillLvl[18] >= 17) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 17 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 1632) { //Rockslug
if(p.skillLvl[18] >= 20) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 20 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 2804 || n.npcType == 2803 || n.npcType == 2805 || n.npcType == 2806) { //Desert Lizard
if(p.skillLvl[18] >= 22){
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 22 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 4227) { //Cockatrice
if(p.skillLvl[18] >= 25) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 25 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 1633 || n.npcType == 1634 || n.npcType == 1635 || n.npcType == 1636) { //Pyrefiend
if(p.skillLvl[18] >= 30) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 30 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 114) { //Mogre
if(p.skillLvl[18] >= 32) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 32 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 3153) { //Harpie Bug Swarm
if(p.skillLvl[18] >= 33) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 33 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 7823) { //Wall Beast
if(p.skillLvl[18] >= 35) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 35 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 3201 || n.npcType == 3202) { //Killerwatt
if(p.skillLvl[18] >= 37) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 37 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 5751) { //Molanisk
if(p.skillLvl[18] >= 39) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 39 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 7813) { //Basilisk
if(p.skillLvl[18] >= 40) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 40 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 5417 || n.npcType == 5418) { //Terror Dog
if(p.skillLvl[18] >= 40) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 40 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 2850) { //Fever Spider
if(p.skillLvl[18] >= 42) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 42 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 1643 || n.npcType == 1644 || n.npcType == 1645 || n.npcType == 1646 || n.npcType == 1647) { //Infernal Mage
if(p.skillLvl[18] >= 45) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 45 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 3707) { //Brine Rat
if(p.skillLvl[18] >= 47) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 47 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 6218 || n.npcType == 6219) { //Bloodveld
if(p.skillLvl[18] >= 50) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 50 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 1637 || n.npcType == 1638 || n.npcType == 1639 || n.npcType == 1641 || n.npcType == 1642
||n.npcType == 1640) { //Jelly
if(p.skillLvl[18] >= 52) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 52 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 1622) { //Turoth
if(p.skillLvl[18] >= 55) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 55 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 3346) { //Zygomite
if(p.skillLvl[18] >= 57) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 57 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 4353) { //Cave Horror
if(p.skillLvl[18] >= 58) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 58 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 7801) { //Aberrant Spectre
if(p.skillLvl[18] >= 60) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 60 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 6220) { //Spiritual Ranger
if(p.skillLvl[18] >= 63) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 63 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 1624) { //Dust Devil
if(p.skillLvl[18] >= 65) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 65 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 6219) { //Spiritual Warrior
if(p.skillLvl[18] >= 68) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 68 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 7811) { //Kurask
if(p.skillLvl[18] >= 70) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 70 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 3068) { //Skeletal Wyvern
if(p.skillLvl[18] >= 72) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 72 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 6389) { //Gargoyle
if(p.skillLvl[18] >= 75) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 75 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 1613) { //Nechryael
if(p.skillLvl[18] >= 80) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 80 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 6221) { //Spiritual Mage
if(p.skillLvl[18] >= 83) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 83 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 1615) { //Abyssal Demon
if(p.skillLvl[18] >= 85) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 85 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 2783) { //Dark Beast
if(p.skillLvl[18] >= 90) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 90 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
About Some Combat Fixes:
When you use range have you ever just ran up to the NPC? Well if you can create a Boolean that loops through a item array of lets say, Bows and sets it to true if the player equipment [3] = one of the ints in the array then you can tell the server when ever a attack is going to happen to stop the movement ;)
I found that this could be done with the Player on Player combat 2.
Credits: Me
YOU MUST ASK ME PERMISSION TO POST THIS ON ANOTHER FORUM/USE MY DIRECT SOURCE CODE
Modified Files: NPCAttack.java
Tested On: Palidino Source
|| Introduction ||
PART I
By using he Monster Attack Packet you can add Slayer or other monster requirements that can be expanded to include some range bug fixes and attack fixes (I'll explain at the bottom)
If you are missing the packet for any reason please post so that I can give you the code for the packet.
NOTE TO ALL PEOPLE WHO THINKS THIS LOOKS "GROSS" I HAVE TRIED EVERYTHING TO MAKE THIS LOOK BETTER BUT STRANGELY THIS IS THE ONLY THING THAT WORKS. IF YOU DONT LIKE IT GO MAKE IT BETTER FOR YOURSELF, JUST REMEMBER WHO GAVE YOU THE START.
|| Explanation ||
if(n.npcType == 6221) { //Spiritual Mage
(npcType) = int npcId = p.stream.readUnsignedWord();
Or when you click the attack option of a NPC the client sends a the NPC ID#.
The NPC# for every NPC is different.
if(p.skillLvl[18] >= 82) {
p.attackingNPC = true;
Checks if your Slayer Level is grater then or equal to the requirment to attack them.
Resets your AttackNPC int and stops you from attacking the npc.
} else {
p.frames.sendMessage(p, "You need 5 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
Resets your AttackNPC int and stops you from attacking the NPC.
Now to clarify why this is different from the actual combat is that this is the Pre-Combat step to attacking. Not the actual combat where next tutorial I will explain how to set up slayer tasks on a system where on my server I have ALL slayer tasks + the gem.
Now Here's The Full Code :)
Insert Into NPCAttack.java
/**
/*Slayer Level Requirements Created By Angel
*/
if(n.npcType == 1648 || n.npcType == 1650 || n.npcType == 1652) { //Crawling Hand
if(p.skillLvl[18] >= 5) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 5 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 1832) { //Cave bug
if(p.skillLvl[18] >= 7) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 7 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 7787) { //Cave Crawler
if(p.skillLvl[18] >= 10) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 10 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 1612) { //Banshee
if(p.skillLvl[18] >= 15) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 15 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 1831) { //Cave slime
if(p.skillLvl[18] >= 17) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 17 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 1632) { //Rockslug
if(p.skillLvl[18] >= 20) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 20 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 2804 || n.npcType == 2803 || n.npcType == 2805 || n.npcType == 2806) { //Desert Lizard
if(p.skillLvl[18] >= 22){
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 22 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 4227) { //Cockatrice
if(p.skillLvl[18] >= 25) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 25 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 1633 || n.npcType == 1634 || n.npcType == 1635 || n.npcType == 1636) { //Pyrefiend
if(p.skillLvl[18] >= 30) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 30 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 114) { //Mogre
if(p.skillLvl[18] >= 32) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 32 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 3153) { //Harpie Bug Swarm
if(p.skillLvl[18] >= 33) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 33 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 7823) { //Wall Beast
if(p.skillLvl[18] >= 35) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 35 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 3201 || n.npcType == 3202) { //Killerwatt
if(p.skillLvl[18] >= 37) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 37 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 5751) { //Molanisk
if(p.skillLvl[18] >= 39) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 39 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 7813) { //Basilisk
if(p.skillLvl[18] >= 40) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 40 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 5417 || n.npcType == 5418) { //Terror Dog
if(p.skillLvl[18] >= 40) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 40 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 2850) { //Fever Spider
if(p.skillLvl[18] >= 42) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 42 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 1643 || n.npcType == 1644 || n.npcType == 1645 || n.npcType == 1646 || n.npcType == 1647) { //Infernal Mage
if(p.skillLvl[18] >= 45) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 45 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 3707) { //Brine Rat
if(p.skillLvl[18] >= 47) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 47 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 6218 || n.npcType == 6219) { //Bloodveld
if(p.skillLvl[18] >= 50) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 50 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 1637 || n.npcType == 1638 || n.npcType == 1639 || n.npcType == 1641 || n.npcType == 1642
||n.npcType == 1640) { //Jelly
if(p.skillLvl[18] >= 52) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 52 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 1622) { //Turoth
if(p.skillLvl[18] >= 55) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 55 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 3346) { //Zygomite
if(p.skillLvl[18] >= 57) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 57 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 4353) { //Cave Horror
if(p.skillLvl[18] >= 58) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 58 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 7801) { //Aberrant Spectre
if(p.skillLvl[18] >= 60) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 60 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 6220) { //Spiritual Ranger
if(p.skillLvl[18] >= 63) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 63 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 1624) { //Dust Devil
if(p.skillLvl[18] >= 65) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 65 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 6219) { //Spiritual Warrior
if(p.skillLvl[18] >= 68) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 68 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 7811) { //Kurask
if(p.skillLvl[18] >= 70) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 70 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 3068) { //Skeletal Wyvern
if(p.skillLvl[18] >= 72) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 72 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 6389) { //Gargoyle
if(p.skillLvl[18] >= 75) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 75 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 1613) { //Nechryael
if(p.skillLvl[18] >= 80) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 80 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 6221) { //Spiritual Mage
if(p.skillLvl[18] >= 83) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 83 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 1615) { //Abyssal Demon
if(p.skillLvl[18] >= 85) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 85 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
if(n.npcType == 2783) { //Dark Beast
if(p.skillLvl[18] >= 90) {
p.attackingNPC = true;
} else {
p.frames.sendMessage(p, "You need 90 Slayer to attack this monster.");
p.attackNPC = 0;
p.attackingNPC = false;
}
}
About Some Combat Fixes:
When you use range have you ever just ran up to the NPC? Well if you can create a Boolean that loops through a item array of lets say, Bows and sets it to true if the player equipment [3] = one of the ints in the array then you can tell the server when ever a attack is going to happen to stop the movement ;)
I found that this could be done with the Player on Player combat 2.
Credits: Me
YOU MUST ASK ME PERMISSION TO POST THIS ON ANOTHER FORUM/USE MY DIRECT SOURCE CODE