Author Topic: Need 2da Scripting Help  (Read 364 times)

Legacy__Guile

  • Hero Member
  • *****
  • Posts: 1308
  • Karma: +0/-0
Need 2da Scripting Help
« on: April 16, 2012, 11:58:53 pm »


               I'm going to be doing some special scripting for crafting and will need to access the "spells" 2da for refrence to spell ID # & spell name for a new crafting system I'm working on...

If someone could come up with the code to return the values from the spell.2da I'd really appreciate it, this is not something I'm familiar with...

Essentially I will need to see which spell the PC cast on the item to determine what to do to the item to be crafted, also I will need to check the spell ID to create a potion based upon the name of the spell (for the item name)...

I wanted to create a more robust crafting system for my new module I'm working on..

(Will share the work later, as always)  '<img'>
               
               

               
            

Legacy_ShadowM

  • Hero Member
  • *****
  • Posts: 1373
  • Karma: +0/-0
Need 2da Scripting Help
« Reply #1 on: April 17, 2012, 01:28:05 am »


               Look at GetStringByStrRef in the lexicon it even give you the function you need for the name. GetSpellId()  for the number in your spell hooking system. That should get you pointed in the right direction.
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Need 2da Scripting Help
« Reply #2 on: April 17, 2012, 01:35:25 am »


               why not use Get2daString or whatever that function is called? I think it was improved in one of the updates so that it is no longer as slow as it once was.
               
               

               
            

Legacy__Guile

  • Hero Member
  • *****
  • Posts: 1308
  • Karma: +0/-0
Need 2da Scripting Help
« Reply #3 on: April 17, 2012, 03:33:42 am »


               Thanks guys.