Skip to content

Commit

Permalink
Update special_moves.js
Browse files Browse the repository at this point in the history
script ID 2205 was already in use by something else, so changed it to 2206 in special_moves.js and in jse_fileassociations.scp
  • Loading branch information
Xoduz authored Jan 26, 2025
1 parent 276fae3 commit f809b4c
Showing 1 changed file with 37 additions and 37 deletions.
74 changes: 37 additions & 37 deletions data/js/combat/special_moves.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function onSpecialMove( pUser, abilityID )
if( restrictedAbilities.indexOf( abilityID ) != -1 )
{
pUser.SysMessage( "This ability is not yet available." );
TriggerEvent( 2205, "DeactivateSpecialMove", pUser, abilityID );
TriggerEvent( 2206, "DeactivateSpecialMove", pUser, abilityID );
return false;
}

Expand All @@ -32,7 +32,7 @@ function checkSkillRequirement( pUser, requiredSkillLevel, requiredSkill, skillM
{
pSock.SysMessage( GetDictionaryEntry( 19201, pSock.language), skillMessage); // You need %i weapon skill to perform that attack

TriggerEvent( 2205, "DeactivateSpecialMove", pUser, abilityID );
TriggerEvent( 2206, "DeactivateSpecialMove", pUser, abilityID );
return false;
}
return true;
Expand Down Expand Up @@ -289,7 +289,7 @@ function CheckMana( pUser, abilityID )
if( pUser.mana < requiredMana )
{
pSock.SysMessage( GetDictionaryEntry( 19202, pSock.language), requiredMana); // You need %i mana to perform that attack
TriggerEvent( 2205, "DeactivateSpecialMove", pUser, abilityID );
TriggerEvent( 2206, "DeactivateSpecialMove", pUser, abilityID );
return false;
}
else
Expand Down Expand Up @@ -415,7 +415,7 @@ function onAbility( pAttacker, pDefender, abilityID )
{
// Clear out any current ability the player is doing when he switches abilities
if( abilityID != 1 )
TriggerEvent( 2205, "DeactivateSpecialMove", pAttacker, abilityID );
TriggerEvent( 2206, "DeactivateSpecialMove", pAttacker, abilityID );

//checking mana
if( CheckMana( pAttacker, abilityID ))
Expand All @@ -430,13 +430,13 @@ function onAbility( pAttacker, pDefender, abilityID )
pDefender.SoundEffect( 0x0056, true );
pDefender.StaticEffect( 0x3728, 0x09, 0x06 );

TriggerEvent( 2205, "ClearSpecialMove", pAttacker, abilityID );// Clear the Ability after success
TriggerEvent( 2206, "ClearSpecialMove", pAttacker, abilityID );// Clear the Ability after success
}
else if( abilityID == 2 ) // bleedattack
{
// Clear out any current ability the player is doing when he switches abilities
if( abilityID != 2 )
TriggerEvent( 2205, "DeactivateSpecialMove", pAttacker, abilityID );
TriggerEvent( 2206, "DeactivateSpecialMove", pAttacker, abilityID );

//checking mana
if( CheckMana( pAttacker, abilityID ))
Expand All @@ -462,13 +462,13 @@ function onAbility( pAttacker, pDefender, abilityID )
pAttacker.SoundEffect( 0x133, true );
pDefender.StaticEffect( 0x377A, 0x09, 0x32 );

TriggerEvent( 2205, "ClearSpecialMove", pAttacker, abilityID );// Clear the Ability after success
TriggerEvent( 2206, "ClearSpecialMove", pAttacker, abilityID );// Clear the Ability after success
}
else if( abilityID == 3 ) // ConcussionBlow
{
// Clear out any current ability the player is doing when he switches abilities
if( abilityID != 3 )
TriggerEvent( 2205, "DeactivateSpecialMove", pAttacker, abilityID );
TriggerEvent( 2206, "DeactivateSpecialMove", pAttacker, abilityID );

//checking mana
if( CheckMana( pAttacker, abilityID ))
Expand All @@ -484,14 +484,14 @@ function onAbility( pAttacker, pDefender, abilityID )
pAttacker.SoundEffect( 0x213, true );
pDefender.StaticEffect( 0x377A, 0x09, 0x32 );

TriggerEvent( 2205, "ClearSpecialMove", pAttacker, abilityID );// Clear the Ability after success
TriggerEvent( 2206, "ClearSpecialMove", pAttacker, abilityID );// Clear the Ability after success
}
else if( abilityID == 4 ) // crushingblow
{

// Clear out any current ability the player is doing when he switches abilities
if( abilityID != 4 )
TriggerEvent( 2205, "DeactivateSpecialMove", pAttacker, abilityID );
TriggerEvent( 2206, "DeactivateSpecialMove", pAttacker, abilityID );

//checking mana
if( CheckMana( pAttacker, abilityID ))
Expand All @@ -504,7 +504,7 @@ function onAbility( pAttacker, pDefender, abilityID )
pSockDefender.SysMessage( GetDictionaryEntry( 19212, pSockDefender.language ));// You take extra damage from the crushing attack!

pAttacker.SoundEffect( 0x1E1, true );
TriggerEvent( 2205, "ClearSpecialMove", pAttacker, abilityID );// Clear the Ability after success
TriggerEvent( 2206, "ClearSpecialMove", pAttacker, abilityID );// Clear the Ability after success
}
else if( abilityID == 5 ) // Disarm
{
Expand All @@ -514,20 +514,20 @@ function onAbility( pAttacker, pDefender, abilityID )
if( pDefender.pack == null || itemLHand != null && itemLHand.movable >= 2 || itemRHand != null && itemRHand.movable >= 2 )
{
pSockAttacker.SysMessage( GetDictionaryEntry( 19213, pSockAttacker.language ));// You cannot disarm your opponent.
TriggerEvent( 2205, "DeactivateSpecialMove", pAttacker, abilityID );
TriggerEvent( 2206, "DeactivateSpecialMove", pAttacker, abilityID );
return false;
}

if( itemLHand != null && itemLHand.type == 9 || itemRHand != null && itemRHand.type == 9 )
{
pSockAttacker.SysMessage( GetDictionaryEntry( 19214, pSockAttacker.language ));// Your target is already unarmed!
TriggerEvent( 2205, "DeactivateSpecialMove", pAttacker, abilityID );
TriggerEvent( 2206, "DeactivateSpecialMove", pAttacker, abilityID );
return false;
}

// Clear out any current ability the player is doing when he switches abilities
if( abilityID != 5 )
TriggerEvent( 2205, "DeactivateSpecialMove", pAttacker, abilityID );
TriggerEvent( 2206, "DeactivateSpecialMove", pAttacker, abilityID );

//checking mana
if( CheckMana( pAttacker, abilityID ))
Expand Down Expand Up @@ -558,29 +558,29 @@ function onAbility( pAttacker, pDefender, abilityID )

TriggerEvent(50104, "AddBuff", pDefender, 0x3ea, 1075637, 0, 5, " " );

TriggerEvent( 2205, "ClearSpecialMove", pAttacker, abilityID );// Clear the Ability after success
TriggerEvent( 2206, "ClearSpecialMove", pAttacker, abilityID );// Clear the Ability after success
}
else if( abilityID == 6 ) // Dismount
{
// Check to see if player is mount or flying.
if( pAttacker.isonhorse || pAttacker.isflying )
{
pSockAttacker.SysMessage( GetDictionaryEntry( 19217, pSockAttacker.language ));// You cannot perform that attack while mounted or flying!
TriggerEvent( 2205, "DeactivateSpecialMove", pAttacker, abilityID );
TriggerEvent( 2206, "DeactivateSpecialMove", pAttacker, abilityID );
return true;
}

// Only Can work on players or npcs that is mounted
if( !pDefender.isonhorse || !pDefender.isflying )
{
pSockAttacker.SysMessage( GetDictionaryEntry( 19218, pSockAttacker.language ));// This attack only works on mounted or flying targets
TriggerEvent( 2205, "DeactivateSpecialMove", pAttacker, abilityID );
TriggerEvent( 2206, "DeactivateSpecialMove", pAttacker, abilityID );
return true;
}

// Clear out any current ability the player is doing when he switches abilities
if( abilityID != 6 )
TriggerEvent( 2205, "DeactivateSpecialMove", pAttacker, abilityID );
TriggerEvent( 2206, "DeactivateSpecialMove", pAttacker, abilityID );

//checking mana
if( CheckMana( pAttacker, abilityID ))
Expand All @@ -599,21 +599,21 @@ function onAbility( pAttacker, pDefender, abilityID )
if( pSockDefender != null )
pSockDefender.SysMessage( GetDictionaryEntry( 19220, pSockDefender.language ), pAttacker.name );// You have been knocked off of your mount by %i !

TriggerEvent( 2205, "ClearSpecialMove", pAttacker, abilityID );// Clear the Ability after success
TriggerEvent( 2206, "ClearSpecialMove", pAttacker, abilityID );// Clear the Ability after success
}
else if( abilityID == 7 ) // Double Strike
{
// Clear out any current ability the player is doing when he switches abilities
if( abilityID != 7 )
TriggerEvent( 2205, "DeactivateSpecialMove", pAttacker, abilityID );
TriggerEvent( 2206, "DeactivateSpecialMove", pAttacker, abilityID );

//checking mana
if( CheckMana( pAttacker, abilityID ))
{
DeductMana( pAttacker, abilityID );
}

TriggerEvent( 2205, "ClearSpecialMove", pAttacker, abilityID );// Clear the Ability after success
TriggerEvent( 2206, "ClearSpecialMove", pAttacker, abilityID );// Clear the Ability after success
}
else if( abilityID == 8 ) // Infectious Strike
{
Expand All @@ -623,13 +623,13 @@ function onAbility( pAttacker, pDefender, abilityID )
if( itemLHand != null && itemLHand.poison <= 0 || itemRHand != null && itemRHand.poison <= 0 )
{
pSockAttacker.SysMessage( GetDictionaryEntry( 19221, pSockAttacker.language ));// Your weapon must have a dose of poison to perform an infectious strike!
TriggerEvent( 2205, "DeactivateSpecialMove", pAttacker, abilityID );
TriggerEvent( 2206, "DeactivateSpecialMove", pAttacker, abilityID );
return;
}

// Clear out any current ability the player is doing when he switches abilities
if( abilityID != 8 )
TriggerEvent( 2205, "DeactivateSpecialMove", pAttacker, abilityID );
TriggerEvent( 2206, "DeactivateSpecialMove", pAttacker, abilityID );

//checking mana
if( CheckMana( pAttacker, abilityID ))
Expand Down Expand Up @@ -681,14 +681,14 @@ function onAbility( pAttacker, pDefender, abilityID )

pAttacker.SoundEffect( 0xDD, true );
pDefender.StaticEffect( 0x3728, 0x09, 0x32 );
TriggerEvent( 2205, "ClearSpecialMove", pAttacker, abilityID );// Clear the Ability after success
TriggerEvent( 2206, "ClearSpecialMove", pAttacker, abilityID );// Clear the Ability after success
}
else if( abilityID == 9 ) // Mortal Strike
{

// Clear out any current ability the player is doing when he switches abilities
if( abilityID != 9 )
TriggerEvent( 2205, "DeactivateSpecialMove", pAttacker, abilityID );
TriggerEvent( 2206, "DeactivateSpecialMove", pAttacker, abilityID );

//checking mana
if( CheckMana( pAttacker, abilityID ))
Expand Down Expand Up @@ -716,27 +716,27 @@ function onAbility( pAttacker, pDefender, abilityID )
if( pDefender.socket )
TriggerEvent( 50104, "AddBuff", pDefender, 1027, 1075810, 1075811, 6, " " );

TriggerEvent( 2205, "ClearSpecialMove", pAttacker, abilityID );// Clear the Ability after success
TriggerEvent( 2206, "ClearSpecialMove", pAttacker, abilityID );// Clear the Ability after success
}
else if( abilityID == 10 ) // Moving Shot
{
// Clear out any current ability the player is doing when he switches abilities
if( abilityID != 10 )
TriggerEvent( 2205, "DeactivateSpecialMove", pAttacker, abilityID );
TriggerEvent( 2206, "DeactivateSpecialMove", pAttacker, abilityID );

//checking mana
if( CheckMana( pAttacker, abilityID ))
{
DeductMana( pAttacker, abilityID );
}

TriggerEvent( 2205, "ClearSpecialMove", pAttacker, abilityID );// Clear the Ability after success
TriggerEvent( 2206, "ClearSpecialMove", pAttacker, abilityID );// Clear the Ability after success
}
else if( abilityID == 11 ) // ParalyzingBlow
{
// Clear out any current ability the player is doing when he switches abilities
if( abilityID != 11 )
TriggerEvent( 2205, "DeactivateSpecialMove", pAttacker, abilityID );
TriggerEvent( 2206, "DeactivateSpecialMove", pAttacker, abilityID );

//checking mana
if( CheckMana( pAttacker, abilityID ))
Expand Down Expand Up @@ -775,20 +775,20 @@ function onAbility( pAttacker, pDefender, abilityID )
{
pSockAttacker.SysMessage( GetDictionaryEntry( 17702, pAttacker.socket.language), false, 0x3b2, 0, pAttacker.serial );// You deliver a paralyzing blow!
}
TriggerEvent( 2205, "ClearSpecialMove", pAttacker, abilityID );// Clear the Ability after success
TriggerEvent( 2206, "ClearSpecialMove", pAttacker, abilityID );// Clear the Ability after success
}
else if( abilityID == 12 ) // shadowstrike
{
if( pAttacker.skills[47] < 800 ) // Stealth
{
pSockAttacker.SysMessage( GetDictionaryEntry( 19231, pSockAttacker.language ));// "You lack the required stealth to perform that attack
TriggerEvent( 2205, "DeactivateSpecialMove", pAttacker, abilityID );
TriggerEvent( 2206, "DeactivateSpecialMove", pAttacker, abilityID );
return true;
}

// Clear out any current ability the player is doing when he switches abilities
if( abilityID != 12 )
TriggerEvent( 2205, "DeactivateSpecialMove", pAttacker, abilityID );
TriggerEvent( 2206, "DeactivateSpecialMove", pAttacker, abilityID );

//checking mana
if( CheckMana( pAttacker, abilityID ))
Expand All @@ -809,21 +809,21 @@ function onAbility( pAttacker, pDefender, abilityID )
pDefender.atWar = false;
pAttacker.visible = 1;

TriggerEvent( 2205, "ClearSpecialMove", pAttacker, abilityID );
TriggerEvent( 2206, "ClearSpecialMove", pAttacker, abilityID );
}
else if( abilityID == 13 ) // Whirlwind Attack
{
// Clear out any current ability the player is doing when he switches abilities
if( abilityID != 13 )
TriggerEvent(2205, "DeactivateSpecialMove", pAttacker, abilityID);
TriggerEvent(2206, "DeactivateSpecialMove", pAttacker, abilityID);

//checking mana
if( CheckMana(pAttacker, abilityID ))
{
DeductMana( pAttacker, abilityID );
}

TriggerEvent( 2205, "ClearSpecialMove", pAttacker, abilityID );// Clear the Ability after success
TriggerEvent( 2206, "ClearSpecialMove", pAttacker, abilityID );// Clear the Ability after success
}
}

Expand All @@ -842,7 +842,7 @@ function onTimer( timerObj, timerID )
timerObj.SetTempTag( "blockHeal", null );
timerObj.KillJSTimer( 9400, 7001 );
timerObj.SetTempTag( "doBleed", null );
TriggerEvent( 2205, "ClearSpecialMove", timerObj, abilityID );
TriggerEvent( 2206, "ClearSpecialMove", timerObj, abilityID );
return;
}
else if( timerID == 8000 )
Expand Down Expand Up @@ -880,4 +880,4 @@ function onTimer( timerObj, timerID )
if( socket != null )
socket.SysMessage( GetDictionaryEntry( 19236, socket.language ));// The bleeding wounds have healed, you are no longer bleeding!
}
}
}

0 comments on commit f809b4c

Please sign in to comment.