SphereCommunity
Durability - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere X (/Forum-Sphere-X)
+--- Forum: Script Submissions (/Forum-Script-Submissions--61)
+--- Thread: Durability (/Thread-Durability)



Durability - ISOcol - 08-28-2022 07:20 AM

All the methods from discord on Durability removing.

//////////////////////////////////////////////////////////////
// DURABILITY DISABLE //////////////////////////////////
// Add these events to your Sphere.ini Events /////////
// Events related to all npc
// EventsPet=e_DURABILITY_FIX_NPC
//
// Events related to all players
// EventsPlayer=e_DURABILITY_FIX_PLAYER


[EVENTS e_DURABILITY_FIX_NPC]
ON=@Hit
local.ItemDamageChance = 0
ON=@GetHit
local.ItemDamageChance = 0
ON=@HITPARRY
LOCAL.ITEMPARRYDAMAGECHANCE= 0 // 0 % chance for shield to take damage when parry

[EVENTS e_DURABILITY_FIX_PLAYER]
ON=@HIT
local.ItemDamageChance= 0 // 0 % chance to take damage when hitting
ON=@GETHIT
local.ItemDamageChance= 0 // 0 % chance to take damage when hit
ON=@HITPARRY
LOCAL.ITEMPARRYDAMAGECHANCE= 0 // 0 % chance for shield to take damage when parry

// DIDNT WORK //
//ON=@Damage
//Shield is considered an armor
//if ((<isweapon>) || ( <isarmor>) )
// argn1 -= (( <argn1> * 100) / 100 ) //Reduce damage by 100% // only change the first 100 on the left
//endif
//
//ON=@ItemDamage // the character damaged something
// IF (<ACT.TYPE> == T_SHIELD) //that something is a shield
// RETURN 1 //prevent the damage
// ENDIF