FOnline Development > Questions and Answers
Hello, i am curious about some stuff.
(1/1)
			Voiddweller:
			
			How to make player characters keep their equipment after death?
How to make npc weapons generate bonus stats?
Come on, i do not asking for a solution, just a hint where to look.
Thanks.
		
			Dagnir:
			
			
--- Quote from: Voiddweller on May 20, 2014, 08:47:12 am ---How to make player characters keep their equipment after death?
--- End quote ---
replication.fos, ReplicateCritter function.
Remove:
--- Code:  ---if( _CritCanDropItemsOnDead( cr ) )
        {
            Map@ dropMap = cr.GetMap();
            Item@[] items;
            cr.GetItems( -1, items );
            // Disable drop of hidden items and delete gag items (sandbags)
            for( uint i = 0, j = items.length(); i < j; i++ )
            {
                if( FLAG( items[ i ].Flags, ITEM_GAG ) )
                {
                    DeleteItem( items[ i ] );
                    @items[ i ] = null;
                }
                else if( FLAG( items[ i ].Flags, ITEM_HIDDEN ) )
                {
                    @items[ i ] = null;
                }
            }
            // Drop
            if( valid( dropMap ) )
                MoveItems( items, dropMap, cr.HexX, cr.HexY );
            else
                DeleteItems( items );
        }
--- End code ---
This will keep items on a character when he replicates. You also need to make players non-lootable.
For this add MODE_NO_LOOT attribute to all players in main.fos, critter_init function.
		
			Voiddweller:
			
			Thanks  ;) I thought i can't just remove that XD
		
Navigation
[0] Message Index
Go to full version