FOnline Development > Questions and Answers

Fonline 2238 SDK Looting in areas

<< < (2/3) > >>

JovankaB:
You can simply comment _CritSetMode lines by adding // in front of them:


--- Quote ---
void critter_init(Critter& guard, bool firstTime)
{
    // _CritSetMode(guard, MODE_NO_LOOT);
    // _CritSetMode(guard, MODE_NO_STEAL);
    // _CritSetMode(guard, MODE_NO_DROP);
}

--- End quote ---

Also check this Polish AngelScript tutorial: http://forum.newfmc.pl/index.php?board=13.0

Peter86A:
Obviously! thx

And one more thing, no drop armors by guards issue, any idea with it? :)

JovankaB:
no idea how it works, maybe they don't have armors at all just armor skin?

Peter86A:
Awerness perk says they have armors and helmets.

JovankaB:
There is one more piece of code you need to change, in critter_dead function, main.fos module:


--- Quote ---    // move all armor items to inventory of npc. delete it if no drop.
    if(cr.Stat[ST_REPLICATION_TIME] < 0 && cr.IsNpc())
    {
        for(uint i = 0, j = items.length(); i < j; i++)
            if(items.GetType() == ITEM_TYPE_ARMOR && items.CritSlot != SLOT_INV)
            {
                if(FLAG(items.Flags, ITEM_NO_STEAL) || FLAG(items.Flags, ITEM_NO_LOOT))
                    DeleteItem(items);
                else
                    cr.MoveItem(items.Id, 1, SLOT_INV);
            }
    }

--- End quote ---

Delete red parts.

I'm not sure if the NoLoot/NoSteal flags have any effect beside the code above, it may be the case that you will have to turn them off in some armor protos like Power Armor. Use Object Editor to do it.



The item dropping is quite a mess as you can see, there are flags in item protos that can influence it, critter parameters, messy scripts in main and replication modules...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version