Spawn items in inventory upon respawn from death?

Place for sharing your game modifications for Life is Feudal: Your Own

Everettham
Alpha Tester
 
Posts: 56
Joined: 22 Apr 2014, 02:16

Spawn items in inventory upon respawn from death?

Post by Everettham » 09 May 2016, 18:46

Anyway to modify spawning items in new players inventory additional-inventory-items-on-character-creation-t5094/ and spawn them after respawn from death as well?
I'm wondering if there is any way to make any one of these options work as a trigger?

Option 1- There is a certain amount of items that always spawn in there inventory upon death. Example: Bastard Sword and Backpack spawn in inventory upon death.

Option 2- They keep there current loot that was in the inventory before death.

Option 3-Certain items always spawn in there inventory upon Homecoming. Example: Bastard Sword and Backpack spawn in inventory upon homecoming

Modify this trigger perhaps? So instead of just spawning items on character creation upon respawn from death items are spawned?

Code: Select all
DELIMITER //
CREATE TRIGGER `character_after_insert` AFTER INSERT ON `character` FOR EACH ROW BEGIN
SET @backpack = f_createContainer(NEW.RootContainerID, 458, 0);
SET @temp = f_insertNewItemInventory(@backpack, 555, 50, 1, 50000, 50000, '', 0,0,0,0, 0,0);
END//

Return to Game mods