Spawn Items

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

loonetik
Zealous Believer
 
Posts: 10
Joined: 03 Dec 2016, 22:41

Spawn Items

Post by loonetik » 09 Dec 2017, 21:58

Nullam dolor turpis, euismod at porta blandit, venenatis vitae urna. Aenean dapibus diam mi, id rutrum sapien aliquet eget. Praesent scelerisque urna eu erat rutrum, vitae elementum nisi eleifend. Nunc mollis congue sapien, a viverra mauris blandit at. Nulla lacinia nunc dolor, nec varius urna scelerisque in. Quisque porta volutpat nibh, sit amet imperdiet ante tempus id. Cras felis dolor, vehicula id ligula at, auctor volutpat arcu.
Last edited by loonetik on 05 Jan 2020, 20:48, edited 1 time in total.

User avatar
S1l3N7671
 
Posts: 10
Joined: 14 Jun 2015, 11:43

Re: Spawn Items

Post by S1l3N7671 » 10 Dec 2017, 07:18

For new character equipment, it's easier to add them to the cm_createchar.xml file in your server data folder.
All the default items you spawn with when you make a new character are in there.
Image
Server Website: https://gglif.enjin.com


loonetik
Zealous Believer
 
Posts: 10
Joined: 03 Dec 2016, 22:41

Re: Spawn Items

Post by loonetik » 10 Dec 2017, 07:30

Nullam dolor turpis, euismod at porta blandit, venenatis vitae urna. Aenean dapibus diam mi, id rutrum sapien aliquet eget. Praesent scelerisque urna eu erat rutrum, vitae elementum nisi eleifend. Nunc mollis congue sapien, a viverra mauris blandit at. Nulla lacinia nunc dolor, nec varius urna scelerisque in. Quisque porta volutpat nibh, sit amet imperdiet ante tempus id. Cras felis dolor, vehicula id ligula at, auctor volutpat arcu.
Last edited by loonetik on 05 Jan 2020, 20:48, edited 1 time in total.

User avatar
Nyuton
Mod Developer
 
Posts: 51
Joined: 01 Feb 2017, 10:51
Location: Berlin

Re: Spawn Items

Post by Nyuton » 10 Dec 2017, 13:37

If you want them to be available immediately you have to use server console instead of database functions to insert them.

Syntax is:
Code: Select all
ch_<CharID>.player.inventoryAddItem(<ItemID>, <Quantity>, <Quality>, <Durability>, <CreatedDurability>);


So if you want to add one beef steak with quality 100 to character ID 27:
Code: Select all
ch_27.player.inventoryAddItem(951, 1, 100, 0, 0);


Works only if character is online. Otherwise use database.
My Blog | Custom Maps & Tools for LiF:YO server owners on FeudalTools


loonetik
Zealous Believer
 
Posts: 10
Joined: 03 Dec 2016, 22:41

Re: Spawn Items

Post by loonetik » 10 Dec 2017, 22:41

Nullam dolor turpis, euismod at porta blandit, venenatis vitae urna. Aenean dapibus diam mi, id rutrum sapien aliquet eget. Praesent scelerisque urna eu erat rutrum, vitae elementum nisi eleifend. Nunc mollis congue sapien, a viverra mauris blandit at. Nulla lacinia nunc dolor, nec varius urna scelerisque in. Quisque porta volutpat nibh, sit amet imperdiet ante tempus id. Cras felis dolor, vehicula id ligula at, auctor volutpat arcu.
Last edited by loonetik on 05 Jan 2020, 20:49, edited 2 times in total.

User avatar
Nyuton
Mod Developer
 
Posts: 51
Joined: 01 Feb 2017, 10:51
Location: Berlin

Re: Spawn Items

Post by Nyuton » 10 Dec 2017, 23:21

There's not really a "list" of all available commands since that list would be endless. LiF is using a modified Torque3D Engine, so most of the TorqueScript syntax documented at GarageGames will work. But you can find a lot of basic stuff here in forums too.

This thread has some of it. Not sure why it's in the MMO forums.

Like for example, how to get the player id.


If you mean character ID, it's the ID column in the `character` table in database.
My Blog | Custom Maps & Tools for LiF:YO server owners on FeudalTools

Return to Game mods