Author Topic: Need help with SM's Transmutation Chest system.  (Read 397 times)

Legacy_StefanoD

  • Newbie
  • *
  • Posts: 39
  • Karma: +0/-0
Need help with SM's Transmutation Chest system.
« on: July 18, 2015, 04:58:47 am »


               

So, I'm using shadow mountain's Transmutation Chest system to simulate Diablo II's horadric chest.

 

What it is supposed to do is: If Player has 3 equal gems (in this case, runes) and let's say the runes are called "Vex", so  he puts the 3 runes (not stacked) into the chest, and the chest will destroy the runes and give an Item (let's call it, Vex Sword).

 

So, the first script (which is being used on a Chest and it activates on "OnClose") is this:

 


   Spoiler
   



 


So, as you can see, it'll look for "SM_Cube_DB" to see if the items are eligible to be "transmuted" or not. The thing is, I don't have this "SM_Cube_DB". I know what to do, I just don't know how to do(script) it...


 


Can someone help me?



               
               

               
            

Legacy_Squatting Monk

  • Hero Member
  • *****
  • Posts: 776
  • Karma: +0/-0
Need help with SM's Transmutation Chest system.
« Reply #1 on: July 18, 2015, 05:27:45 am »


               

Do you have the Shadow Mountain module? According to the comments at the top of the script you posted, that's what will create and expand the database you're missing.



               
               

               
            

Legacy_StefanoD

  • Newbie
  • *
  • Posts: 39
  • Karma: +0/-0
Need help with SM's Transmutation Chest system.
« Reply #2 on: July 18, 2015, 05:31:26 am »


               

No, I don't have the module. So do I just make a new module called "SM_Cube_DB" and it's done?



               
               

               
            

Legacy_Squatting Monk

  • Hero Member
  • *****
  • Posts: 776
  • Karma: +0/-0
Need help with SM's Transmutation Chest system.
« Reply #3 on: July 18, 2015, 08:11:58 am »


               

Okay, so GetCampaignString() is similar to GetLocalString(), but it targets a database instead of a normal object. The module had a special script that would populate the database with these strings. What the bit in your script is doing is asking the database for a string variable whose name matches your item's resref. You could make a script that would populate your database with strings OnModuleLoad or...


 


...you could just replace this line with an if/else chain that sets the item to be created based on sItem:



if (sItem == "this_item")
    sItem2 = "uber_item";
else if (sItem == "this_other_item")
    sItem2 = "this_not_so_uber_item";
else
    sItem2 = "this_terrible_item";

               
               

               
            

Legacy_StefanoD

  • Newbie
  • *
  • Posts: 39
  • Karma: +0/-0
Need help with SM's Transmutation Chest system.
« Reply #4 on: July 18, 2015, 11:04:58 pm »


               

Thanks alot dude. Works like a charm.