Did you define the item in itemdefs?
|
I just implemented the toxic blowpipe into my server. I searched 9185 through out the code and I basically copied the code of that and set it as my toxic blowpipe and of course I added a new method "properBlowDarts" instead of "properBolts". But in the end of doing all that I went into my server to check out how sick it was going to be but then I attack something it doesn't attack? My character stays in my place doing the animation but isn't doing any damage.
Here is an example of my code.
This code here is from CombatAssistant:
This code here is from ClickNpcCode:if ((c.playerEquipment[c.playerWeapon] == 12926) && c.playerEquipment[c.playerArrows] != 7684) { c.sendMessage("You must use blowpipe darts with a Toxic Blowpipe"); c.stopMovement(); c.freezeTimer = 1; resetPlayerAttack(); return; }
Classes I edited: CombatAssistant, AttackPlayer, ClickNpcCode:if ((c.playerEquipment[c.playerWeapon] == 12926) && c.playerEquipment[c.playerArrows] != 7684) { c.sendMessage("You must use blowpipe darts with a Toxic Blowpipe"); c.stopMovement(); c.getCombat().resetPlayerAttack(); return; }
Those 2 bits of code is repeated but I made sure to copy what the Rune C'bow code was before then I just changed up the weaponID and arrows.
Did you define the item in itemdefs?
Heres my ItemDef. It's always been defined
Code:case 12926: itemDef.modelID = 25000; itemDef.name = "Toxic blowpipe"; itemDef.description = "It's a Toxic blowpipe".getBytes(); itemDef.modelZoom = 1158; itemDef.modelRotationY = 768; itemDef.modelRotationX = 189; itemDef.modelOffset1 = -7; itemDef.modelOffset2 = 4; itemDef.anInt165 = 14403; itemDef.anInt200 = 14403; //itemDef.femaleEquipOffset = 6; itemDef.itemActions = new String[] { null, "Wield", null, null, "Destroy" }; itemDef.groundActions = new String[] { null, null, "Take", null, null }; break;
Make a copy of the rune crossbow code and change the ID, Anim, GFX etc.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |