I don't know how to describe this bug.
It's ruining Zodiac's Stealth skill.
Before I explain the bug, it should be noted that this bug just was noticed after the previous Graal update. A similar bug also exists, however, which was there before the update.
When a player uses Stealth, they become unable to unequip/equip/attack with weapons. One weapon, WeaponControl, controls all of these functions.
However, if I update the script of WeaponControl with my RC, the bug will stop effecting players who are already online.
It's hard to explain the problem, like I said.
This is the block to check if the player is attacking, found in WeaponControl:
PHP Code:
function onKeyPressed() {
if (keydown(5) && !this.keys) {
this.keys = true;
setTimer(.05);
if (CanAttack()) {
onAttack();
}
}
}
The weapon doesn't catch the onKeyPressed function after Stealth has been used.
The weapon +System calls 'onEquip' and 'onUnEquip' on WeaponControl to equip/unequip weapons. After using stealth, the +System tries to call the functions in WeaponControl, but WeaponControl doesn't respond.
Yes, they are public.
However, I am able to call 'onEquip' and 'onUnEquip' from my debug NPC.
PHP Code:
findweapon(this.tokens[0]).(@this.tokens[1])(this.tokens[2],this.tokens[3],this.tokens[4])
When I call 'onEquip' through my debug NPC, the WeaponControl runs the function.
The +System calls them in the exact same way, but WeaponControl doesn't respond to it.
I find it really weird that WeaponControl isn't acknowledging built-in functions, like onKeyPressed(), though.
The similar, older, bug has to do with the Inventory. After using Stealth for a while, the Inventory stops responding to function calls (including built-in functions). I can't figure out the exact cause of the Inventory bug, though. It seems to just randomly happen.
I'd also like to note that the Stealth NPC has absolutely NO relation to the WeaponControl or Inventory. They have nothing in common, not even variables/flags they check for. Stealth has no relation to any other NPCs.