merge inititem and message

Results 1 to 6 of 6
  1. #1
    Member engel86 is offline
    MemberRank
    Mar 2007 Join Date
    GermanyLocation
    84Posts

    merge inititem and message

    hello guys,

    is there any programm which puts the name of an item on top of the item?
    e.g:
    inititem.txt:
    Code:
    (item    (name 256)        (Index 1)    (Image "Wea001")    (Action 1 1)        (class weapon sword)    (code 1 1 1 1)    (country 0 1 2)    (level 1)    (wear 1)                                    (limit knight 1)    (range 16)    (buy 4)    (sell 1)    (endurance 4)                (specialty    (aspeed 700)                        (Attack 3 10)                    (hit 15)                                                                                                    )                                )
    (item    (name 257)        (Index 2)    (Image "Wea002")    (Action 2 1)        (class weapon sword)    (code 1 1 1 1)    (country 0 1 2)    (level 5)    (wear 1)                                    (limit knight 1)    (range 16)    (buy 180)    (sell 45)    (endurance 6)                (specialty    (aspeed 700)                        (Attack 16 24)                    (hit 18)                                                                                                    )                                )
    (item    (name 258)        (Index 3)    (Image "Wea003")    (Action 2 2)        (class weapon sword)    (code 1 1 1 1)    (country 0 1 2)    (level 9)    (wear 1)                                    (limit knight 1)    (range 24)    (buy 1650)    (sell 412)    (endurance 12)                (specialty    (aspeed 700)                        (Attack 25 37)                    (hit 21)                                                                                                    )                                )
    message:
    Code:
    ( itemname 256 "Short Iron Sword")
    ( itemname 257 "Short Steel Sword")
    ( itemname 258 "Small Steel Sword")
    result:
    Code:
    ;Short Iron Sword
    (item    (name 256)        (Index 1)    (Image "Wea001")     (Action 1 1)        (class weapon sword)    (code 1 1 1 1)    (country 0  1 2)    (level 1)    (wear 1)                                    (limit  knight 1)    (range 16)    (buy 4)    (sell 1)    (endurance 4)                 (specialty    (aspeed 700)                        (Attack 3  10)                    (hit 15)                                                                                                     )                                 )
    ;Short Steel Sword
    (item    (name 257)        (Index 2)     (Image "Wea002")    (Action 2 1)        (class weapon sword)    (code 1  1 1 1)    (country 0 1 2)    (level 5)    (wear 1)                                     (limit knight 1)    (range 16)    (buy 180)    (sell  45)    (endurance 6)                (specialty    (aspeed 700)                         (Attack 16 24)                    (hit 18)                                                                                                      )                                )
    ;Small Steel Sword
    (item    (name 258)         (Index 3)    (Image "Wea003")    (Action 2 2)        (class weapon  sword)    (code 1 1 1 1)    (country 0 1 2)    (level 9)    (wear 1)                                     (limit knight 1)    (range 24)    (buy  1650)    (sell 412)    (endurance 12)                (specialty     (aspeed 700)                        (Attack 25 37)                     (hit 21)                                                                                                     )                                )
    I hope you understand my problem :)

    thanks !


    ps: I would need it for initmonster as well :D


  2. #2
    Yes, it's really me HuninHune is offline
    MemberRank
    Sep 2006 Join Date
    ::1Location
    1,084Posts

    Re: merge inititem and message

    write one :o

  3. #3
    Proficient Member Swiftdeath is offline
    MemberRank
    Jan 2016 Join Date
    184Posts

    Re: merge inititem and message

    excel? paste all the inititems in sheet 1 paste all the messages in sheet 2 and combine them in sheet 3

  4. #4
    Helper for everyone Ismir93 is offline
    MemberRank
    Oct 2010 Join Date
    BosniaLocation
    1,200Posts

    Re: merge inititem and message


  5. #5
    Yes, it's really me HuninHune is offline
    MemberRank
    Sep 2006 Join Date
    ::1Location
    1,084Posts

    Re: merge inititem and message

    Here, I'll be nice for once... Thrown together very roughly
    Code:
    Get-Content "inititem.txt" | foreach {
         if ($_ -match "name (\d+)") {
              $Num = $Matches[1]
              Get-Content "message.txt" | foreach {
                   if ($_ -match "itemname $Num .([ a-zA-Z0-9]+).") {
                        Add-Content "merged.txt" (";" + [string]$Matches[1])
                   }
              } 
             Add-Content "merged.txt" $_ 
        }
    }

  6. #6
    Member engel86 is offline
    MemberRank
    Mar 2007 Join Date
    GermanyLocation
    84Posts

    Re: merge inititem and message

    lovely, thanks guys =)



Advertisement