SphereCommunity
SERV.LOG debugging help - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere X (/Forum-Sphere-X)
+--- Forum: Script Submissions (/Forum-Script-Submissions--61)
+--- Thread: SERV.LOG debugging help (/Thread-SERV-LOG-debugging-help)



SERV.LOG debugging help - ISOcol - 08-28-2022 07:43 AM

// Gathered from Discord
// Add these events to your Sphere.ini Events /////////
// EventsPlayer=e_combat_stuff

[EVENTS e_combat_stuff]
ON=@Hit
SERV.LOG <NAME> HAVE JUST HIT <SRC.NAME>
IF (<WEAPON>)
SERV.LOG A WEAPON WAS USED: <WEAPON.NAME>
SERV.LOG <WEAPON.NAME>'S DAMAGE IS <WEAPON.DAM.LO> - <WEAPON.DAM.HI>
ELSE
SERV.LOG NO WEAPON WAS USED.
SERV.LOG <NAME>'S DAMAGE IS <DAM>
ENDIF

SERV.LOG DAMAGE STARTED AS <ARGN1>

SERV.LOG THE SKILL USED IN THIS ATTACK IS <ACTION>
IF (<ACTION> == WRESTLING) || (<ACTION> == MACEFIGHTING)
ARGN1 = <EVAL <ARGN1> + (<STR>/8)> //APPLY YOUR FORMULA HERE

ELIF (<ACTION> == ARCHERY) || (<ACTION> == FENCING)
ARGN1 = <EVAL <ARGN1> + (<DEX>/8)>

ELIF (<ACTION> == SWORDSMANSHIP)
ARGN1 = <EVAL <ARGN1> + (<DEX>/16) + (<STR>/16)>

ENDIF

SERV.LOG DAMAGE AFTER STATS BONUS ACCORDING TO THE SKILL IS <ARGN1>

IF (<SRC.ISPLAYER>) //PLAYER HITS ANOTHER PLAYER
SERV.LOG THE ARMOR OF THE DEFENDANT IS <SRC.ARMOR>
LOCAL.DAMAGE_REDUCTION = <EVAL <SRC.ARMOR>/20> //APPLY YOUR FORMULA HERE

ELSE //PLAYER HITS A NPC
SERV.LOG THE ARMOR OF THE DEFENDANT IS <SRC.AC>
LOCAL.DAMAGE_REDUCTION = <EVAL <SRC.AC>/20> //APPLY YOUR FORMULA HERE

ENDIF
ARGN1 -= <LOCAL.DAMAGE_REDUCTION>
SERV.LOG AFTER DAMAGE REDUCTION OF <LOCAL.DAMAGE_REDUCTION>, DAMAGE IS <ARGN1>


RE: SERV.LOG debugging help - Aris - 10-14-2022 04:37 PM

Thanks


RE: SERV.LOG debugging help - VIision - 11-27-2024 02:06 AM

thanks