Created
November 3, 2019 01:12
-
-
Save LaughingLeader/fb3acce65b57517a73b26f4024580a66 to your computer and use it in GitHub Desktop.
Checks for equipped weapon types and sends out a corresponding character event when one is found (for Divinity: Original Sin 2 - Definitive Edition).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INIT | |
EVENTS | |
EVENT MyMod_CheckWeaponTypes | |
VARS | |
CHARACTER:_Char | |
INT:_FoundType | |
ON | |
OnCharacterEvent(_Char, "MyMod_CheckWeaponType") | |
ACTIONS | |
Set(_FoundType, 0) | |
IF "c1" | |
CharacterHasWeaponType(_Char, Axe, 1) | |
THEN | |
CharacterEvent(_Char, "MyMod_WeaponTypeFound_Axe") | |
Set(_FoundType, 1) | |
ENDIF | |
IF "c1" | |
CharacterHasWeaponType(_Char, Bow, 1) | |
THEN | |
CharacterEvent(_Char, "MyMod_WeaponTypeFound_Bow") | |
Set(_FoundType, 1) | |
ENDIF | |
IF "c1" | |
CharacterHasWeaponType(_Char, Club, 1) | |
THEN | |
CharacterEvent(_Char, "MyMod_WeaponTypeFound_Club") | |
Set(_FoundType, 1) | |
ENDIF | |
IF "c1" | |
CharacterHasWeaponType(_Char, Crossbow, 1) | |
THEN | |
CharacterEvent(_Char, "MyMod_WeaponTypeFound_Crossbow") | |
Set(_FoundType, 1) | |
ENDIF | |
IF "c1" | |
CharacterHasWeaponType(_Char, Knife, 1) | |
THEN | |
CharacterEvent(_Char, "MyMod_WeaponTypeFound_Knife") | |
Set(_FoundType, 1) | |
ENDIF | |
IF "c1" | |
CharacterHasWeaponType(_Char, Spear, 1) | |
THEN | |
CharacterEvent(_Char, "MyMod_WeaponTypeFound_Spear") | |
Set(_FoundType, 1) | |
ENDIF | |
IF "c1" | |
CharacterHasWeaponType(_Char, Staff, 1) | |
THEN | |
CharacterEvent(_Char, "MyMod_WeaponTypeFound_Staff") | |
Set(_FoundType, 1) | |
ENDIF | |
IF "c1" | |
CharacterHasWeaponType(_Char, Sword, 1) | |
THEN | |
CharacterEvent(_Char, "MyMod_WeaponTypeFound_Sword") | |
Set(_FoundType, 1) | |
ENDIF | |
IF "c1" | |
CharacterHasWeaponType(_Char, Wand, 1) | |
THEN | |
CharacterEvent(_Char, "MyMod_WeaponTypeFound_Wand") | |
Set(_FoundType, 1) | |
ENDIF | |
IF "c1" | |
CharacterHasWeaponType(_Char, Arrow, 1) // ?? | |
THEN | |
CharacterEvent(_Char, "MyMod_WeaponTypeFound_Arrow") | |
Set(_FoundType, 1) | |
ENDIF | |
IF "c1" | |
CharacterHasWeaponType(_Char, Sentinel, 1) // Wtf is this? | |
THEN | |
CharacterEvent(_Char, "MyMod_WeaponTypeFound_Sentinel") | |
Set(_FoundType, 1) | |
ENDIF | |
IF "c1" | |
IsEqual(_FoundType, 0) | |
THEN | |
CharacterEvent(_Char, "MyMod_WeaponTypeFound_Unarmed") | |
ENDIF | |
CharacterEvent(_Char, "MyMod_CheckWeaponType_Done") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment