How to destroy all items in inventory of Player?

Discussion in 'Modding and Scripting Support' started by MackaN, Dec 30, 2005.

Remove all ads!
Support Terra-Arcanum:

GOG.com

PayPal - The safer, easier way to pay online!
  1. MackaN

    MackaN New Member

    Messages:
    105
    Likes Received:
    0
    Joined:
    Jun 27, 2005
    How to destroy all items in inventory of Player?

    Can you writte me example of this script?

    In my Mod, player must have got nothing on start... How do that?
     
  2. ville-v

    ville-v New Member

    Messages:
    81
    Likes Received:
    0
    Joined:
    Dec 29, 2005
    Edit rules/AutoEquip.mes

    There are all items that player is able to get in the beginning.


    PS. Tell more about your mod. So is player naked in the middle of nothing?
     
  3. MackaN

    MackaN New Member

    Messages:
    105
    Likes Received:
    0
    Joined:
    Jun 27, 2005
    Yes... Player start with nothing... He or she is in a prison... dungeon? :)

    Ok I will try to edit AutoEquip.mes

    But... How do that? To clear everything?
     
  4. ville-v

    ville-v New Member

    Messages:
    81
    Likes Received:
    0
    Joined:
    Dec 29, 2005
    Do not clear EVERYTHING! Just left the field after line number empty (and change to 0 in starting wealths).
     
  5. MackaN

    MackaN New Member

    Messages:
    105
    Likes Received:
    0
    Joined:
    Jun 27, 2005
    Hmmm it dosent work...

    //STARTING WEALTH
    {1}{0} Wealth for 1-10
    {2}{0} Wealth for 11-20
    {3}{0} Wealth for 21-30
    {4}{0} Wealth for 31-40
    {5}{0} Wealth for 41-50

    //EQUIPING ARMOURS

    //Medium Robes for magic users
    {101}{}common
    {102}{}
    {103}{}
    {104}{}
    {105}{}best

    //Small Robes for magic users
    {201}{}common
    {202}{}
    {203}{}
    {204}{}
    {205}{}best

    //Medium Armours
    {301}{}clothes
    {302}{}
    {303}{}
    {304}{}
    {305}{}Plate

    //Medium Armour Conditionals
    {311}{}clothes
    {312}{}
    {313}{}
    {314}{}
    {315}{}Plate

    //Small Armours
    {401}{}clothes
    {402}{}
    {403}{}
    {404}{}
    {405}{}Plate

    //Small Armour Conditionals
    {411}{}clothes
    {412}{}
    {413}{}
    {414}{}
    {415}{}Plate

    //Large Armours
    {501}{}clothes
    {502}{}
    {503}{}
    {504}{}
    {505}{}Plate

    //Large Armour Conditionals
    {511}{}clothes
    {512}{}
    {513}{}
    {514}{}
    {515}{}Plate



    //EQUIPING WEAPONS

    //Melee Weapons
    {601}{}common
    {602}{}
    {603}{}
    {604}{}
    {605}{}
    {606}{}
    {607}{}best

    //Melee Weapons Conditionals
    {611}{}common
    {612}{}
    {613}{}
    {614}{}
    {615}{}
    {616}{}
    {617}{best

    //Bows
    {700}{7038 7038 7038}
    {701}{}common
    {702}{}
    {703}{}
    {704}{}
    {705}{}
    {706}{}
    {707}{}best

    //Bows Conditionals
    {711}{}common
    {712}{}
    {713}{}
    {714}{}
    {715}{}
    {716}{}
    {717}{}best

    //Throwing
    {801}{}common
    {802}{}
    {803}{}
    {804}{}
    {805}{}
    {806}{}
    {807}{}best

    //Throwing Conditionals
    {811}{}common
    {812}{}
    {813}{}
    {814}{}
    {815}{}
    {816}{}
    {817}{}best

    //Firearms
    {900}{}
    {901}{}common
    {902}{}
    {903}{}
    {904}{}
    {905}{}
    {906}{}
    {907}{}best

    //Firearms Conditionals
    {911}{}common
    {912}{}
    {913}{}
    {914}{}
    {915}{}
    {916}{}
    {917}{}best

    Fail safe Weapon (If you didn't get an of the above)
    {1001}{}Dagger
    {1002}{}Mage's Staff
    {1003}{}Magic Dagger
    {1004}{}Mechanical Dagger
    {1005}{}Quality Dagger



    //EQUIPING EXTRA ITEMS

    //Lockpicks
    {1101}{}lowest grade
    {1102}{}
    {1103}{}best

    //Lockpicks Conditionals
    {1111}{}lowest grade
    {1112}{}
    {1113}{}best

    //Healing Aids
    {1201}{}lowest grade
    {1202}{}
    {1203}{}best

    //Backstabing Aids
    {1301}{}lowest grade
    {1302}{}
    {1303}{}best

    //Backstabing Aids Conditionals
    {1311}{}lowest grade
    {1312}{}
    {1313}{}best


    ...next idea?
     
  6. ville-v

    ville-v New Member

    Messages:
    81
    Likes Received:
    0
    Joined:
    Dec 29, 2005
    Try to change every fields to 0

    PS. Change also {700}{7038 7038 7038} to {700}{0}
     
  7. MackaN

    MackaN New Member

    Messages:
    105
    Likes Received:
    0
    Joined:
    Jun 27, 2005
    Still I have all in inventory...

    //STARTING WEALTH
    {1}{0} Wealth for 1-10
    {2}{0} Wealth for 11-20
    {3}{0} Wealth for 21-30
    {4}{0} Wealth for 31-40
    {5}{0} Wealth for 41-50

    //EQUIPING ARMOURS

    //Medium Robes for magic users
    {101}{0}common
    {102}{0}
    {103}{0}
    {104}{0}
    {105}{0}best

    //Small Robes for magic users
    {201}{0}common
    {202}{0}
    {203}{0}
    {204}{0}
    {205}{0}best

    //Medium Armours
    {301}{0}clothes
    {302}{0}
    {303}{0}
    {304}{0}
    {305}{0}Plate

    //Medium Armour Conditionals
    {311}{0}clothes
    {312}{0}
    {313}{0}
    {314}{0}
    {315}{0}Plate

    //Small Armours
    {401}{0}clothes
    {402}{0}
    {403}{0}
    {404}{0}
    {405}{0}Plate

    //Small Armour Conditionals
    {411}{0}clothes
    {412}{0}
    {413}{0}
    {414}{0}
    {415}{0}Plate

    //Large Armours
    {501}{0}clothes
    {502}{0}
    {503}{0}
    {504}{0}
    {505}{0}Plate

    //Large Armour Conditionals
    {511}{0}clothes
    {512}{0}
    {513}{0}
    {514}{0}
    {515}{0}Plate



    //EQUIPING WEAPONS

    //Melee Weapons
    {601}{0}common
    {602}{0}
    {603}{0}
    {604}{0}
    {605}{0}
    {606}{0}
    {607}{0}best

    //Melee Weapons Conditionals
    {611}{0}common
    {612}{0}
    {613}{0}
    {614}{0}
    {615}{0}
    {616}{0}
    {617}{best

    //Bows
    {700}{7038 7038 7038}
    {701}{0}common
    {702}{0}
    {703}{0}
    {704}{0}
    {705}{0}
    {706}{0}
    {707}{0}best

    //Bows Conditionals
    {711}{0}common
    {712}{0}
    {713}{0}
    {714}{0}
    {715}{0}
    {716}{0}
    {717}{0}best

    //Throwing
    {801}{0}common
    {802}{0}
    {803}{0}
    {804}{0}
    {805}{0}
    {806}{0}
    {807}{0}best

    //Throwing Conditionals
    {811}{0}common
    {812}{0}
    {813}{0}
    {814}{0}
    {815}{0}
    {816}{0}
    {817}{0}best

    //Firearms
    {900}{0}
    {901}{0}common
    {902}{0}
    {903}{0}
    {904}{0}
    {905}{0}
    {906}{0}
    {907}{0}best

    //Firearms Conditionals
    {911}{0}common
    {912}{0}
    {913}{0}
    {914}{0}
    {915}{0}
    {916}{0}
    {917}{0}best

    Fail safe Weapon (If you didn't get an of the above)
    {1001}{0}Dagger
    {1002}{0}Mage's Staff
    {1003}{0}Magic Dagger
    {1004}{0}Mechanical Dagger
    {1005}{0}Quality Dagger



    //EQUIPING EXTRA ITEMS

    //Lockpicks
    {1101}{0}lowest grade
    {1102}{0}
    {1103}{0}best

    //Lockpicks Conditionals
    {1111}{0}lowest grade
    {1112}{0}
    {1113}{0}best

    //Healing Aids
    {1201}{0}lowest grade
    {1202}{0}
    {1203}{0}best

    //Backstabing Aids
    {1301}{0}lowest grade
    {1302}{0}
    {1303}{0}best

    //Backstabing Aids Conditionals
    {1311}{0}lowest grade
    {1312}{0}
    {1313}{0}best

    So... this dosent work too...
     
  8. ville-v

    ville-v New Member

    Messages:
    81
    Likes Received:
    0
    Joined:
    Dec 29, 2005
    ...

    Have you compiled your mod after editing the file?

    (and there is no need to paste whole while here, just tell what happened when you tried it)
     
  9. MackaN

    MackaN New Member

    Messages:
    105
    Likes Received:
    0
    Joined:
    Jun 27, 2005
    Yes I used 'compress module' in WorldEd and...

    :(

    Nothing...
     
  10. ville-v

    ville-v New Member

    Messages:
    81
    Likes Received:
    0
    Joined:
    Dec 29, 2005
    Oops! My mistake! AutoEquip.mes works only with multiplayer, so you must do that some other way if you are going to do single player-mod.
     
  11. MackaN

    MackaN New Member

    Messages:
    105
    Likes Received:
    0
    Joined:
    Jun 27, 2005
    Hmnn... So I must do some script what destroy all items of Player...
    but I don't find this Action in ScriptMaker... I can destroy only items with special names... How destroy all?

    Someone knows answer?
     
  12. MackaN

    MackaN New Member

    Messages:
    105
    Likes Received:
    0
    Joined:
    Jun 27, 2005
    So... I can destroy only one thing when I use action:
    destroy item named (num) in inventory of (obj)

    Is there realy nobody who can explain me how destroy all items of Player on start game?

    I am trying do this and I cant do this... I need help...!
     
  13. MackaN

    MackaN New Member

    Messages:
    105
    Likes Received:
    0
    Joined:
    Jun 27, 2005
    or... just how to take from PC all stuff and put somewhere by script....


    Is there some list of items' unical internal numbers?

    For examlpe:
    I want to make quest, "I you will have to bring someone some water". But I dont want to make "this" one water with internal name. So how put to de script information about every bottel of water?
     
  14. TONGSyaBASS

    TONGSyaBASS Member

    Messages:
    772
    Likes Received:
    0
    Joined:
    Apr 19, 2005
    Well, first to answer your question from last year:
    If you want to destroy every item a player has then loop the command "destroy item named (num) in inventory of (obj)". Loop it say one hundred times for armour, then 100 times for weapons, then 100 times for potions, then loop it for unique item names.
    e.g.
    loop
    destroy item named local1
    local1 = local1 + 1
    end loop

    The internal names you need can be found in onames.mes. Generic armour, weapons, etc each have a specific number.
    e.g. armour is 2800.

    As for your latest question: To accomplish this you must hex edit the proto for water to give it a unique internal name. The proto docs found in the download section give a good guide on how to do this.
    If you are really stuck I could do it for you as it only involves changing one number.
     
  15. MackaN

    MackaN New Member

    Messages:
    105
    Likes Received:
    0
    Joined:
    Jun 27, 2005
    I am refreshing this topic. So after 1 year of many tests and scripts I failed. I know for sure that script: "destroy item named (num) in inventory of (obj)" can destroy only item with INTERNAL NAME, but I noticed that in orginal Arcanum only a few items have their internal names (from oname.mes) what "destroy" script can use... For example barbarian armor has no name, so I can try to loop my script till death, I will never meet any number what I need for armors, siuts, swords and etc. coz they dont have internal name to this script... or I am wrong?

    I looked in to schematics example, because there are some numbers of items, but I am not sure if this nubers are connetced to internal names...
    I dont think so... They are just prototype nubers I think...

    [1000][10] // Schematic name: this is a test
    [1001][11] // Schematic description text
    [1002][366] // Schematic Drawing
    [1003][8054] // Needed Item 1: ring
    [1004][8055] // Needed Item 2: medallion
    [1005][15066] // Result Item: spiderbot
    [1006][1] // Result Amount: 1

    So any other ideas how to destroy all items from inventory of player? Or I need to edit all PRO. files (to give to all items internal name) and then use script "destroy item named (num) in inventory of (obj)" ???
     
Our Host!