by
Koiecks
» 09 Feb 2015, 14:40
This is the code I placed in the query, it ran with no errors but still only gave me the practice sword and backpack.
After trying to remove the END// I can't get the query to work at all.
DELIMITER //
CREATE TRIGGER `character_after_insert` AFTER INSERT ON `character` FOR EACH ROW BEGIN
SET @backpack line to SET @backpack = NEW.RootContainerID;
SET @temp = f_insertNewItemInventory(@backpack, 555, 50, 1, 50000, 50000, '', 0,0,0,0, 0,0);
END//
SET @backpack line to SET @backpack = NEW.RootContainerID;
SET @temp = f_insertNewItemInventory(@backpack, 555, 100, 1, 50000, 50000, '', 0,0,0,0, 0,0); /* practice sword */
SET @temp = f_insertNewItemInventory(@backpack, 40, 100, 1, 50000, 50000, '', 0,0,0,0, 0,0); /* shovel */
SET @temp = f_insertNewItemInventory(@backpack, 48, 100, 1, 50000, 50000, '', 0,0,0,0, 0,0); /* pickaxe */
SET @temp = f_insertNewItemInventory(@backpack, 46, 100, 1, 50000, 50000, '', 0,0,0,0, 0,0); /* hatchet */
SET @temp = f_insertNewItemInventory(@backpack, 51, 100, 1, 50000, 50000, '', 0,0,0,0, 0,0); /* saw */
SET @temp = f_insertNewItemInventory(@backpack, 33, 100, 1, 50000, 50000, '', 0,0,0,0, 0,0); /* sickle */
SET @temp = f_insertNewItemInventory(@backpack, 974, 50, 25, 50000, 50000, '', 0,0,0,0, 0,0); /* 25x q50 Apple Buns */
SET @temp = f_insertNewItemInventory(@backpack, 885, 50, 1, 15000, 15000, '', 0,0,0,0, 0,0); /* padded helm */
SET @temp = f_insertNewItemInventory(@backpack, 886, 50, 1, 15000, 15000, '', 0,0,0,0, 0,0); /* padded chest */
SET @temp = f_insertNewItemInventory(@backpack, 887, 50, 1, 15000, 15000, '', 0,0,0,0, 0,0); /* padded arms */
SET @temp = f_insertNewItemInventory(@backpack, 888, 50, 1, 15000, 15000, '', 0,0,0,0, 0,0); /* padded gauntlets */
SET @temp = f_insertNewItemInventory(@backpack, 889, 50, 1, 15000, 15000, '', 0,0,0,0, 0,0); /* padded leggings */
SET @temp = f_insertNewItemInventory(@backpack, 890, 50, 1, 15000, 15000, '', 0,0,0,0, 0,0); /* padded boots */