Aller au contenu

Photo

Need help with SM's Transmutation Chest system.


  • Veuillez vous connecter pour répondre
4 réponses à ce sujet

#1
StefanoD

StefanoD
  • Members
  • 20 messages

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?



#2
Squatting Monk

Squatting Monk
  • Members
  • 446 messages

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.



#3
StefanoD

StefanoD
  • Members
  • 20 messages

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



#4
Squatting Monk

Squatting Monk
  • Members
  • 446 messages

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";


#5
StefanoD

StefanoD
  • Members
  • 20 messages

Thanks alot dude. Works like a charm.


  • Squatting Monk aime ceci