Jump to content

item which teaches spell. How?


DRAGONKIR

Recommended Posts

Greetings. I need help.

What I want to do but do not know exactly how to:
I want to make a one-time item. For example - the potion. Anyone who uses this item - will get a fireball spell. Other words, when anyone use this item, the system will use the command runscript addtalent 10003. And the item itself will be sold at Bodahn Feddik.

Do I understand correctly:
1. In the toolset I need to create a one-time item.
2. Then make a script that will be triggered when using this item and teach a fireball spell?

Please help me to make it all right.

Link to comment
Share on other sites

For reference purposes

toolset wiki http://social.bioware.com/wiki/datoolset/index.php/Main_Page

adding a new spell: http://social.bioware.com/wiki/datoolset/index.php/Adding_a_new_spell_tutorial

 

If this is a spell that doesn't already appear as a spell for the mage, you will have to learn to add a new spell. I learned from the link above and some trial and error.

 

The first line on the Item screen is "Activated Ability" select ITEM_ABILITY_UNIQUE_POWER_SINGLE_USE

 

In Manage Modules, Properties, you shoudl have a 'Script' identified. In file that you have identified in 'Script', you need to put your code in under the following type:

case EVENT_TYPE_UNIQUE_POWER:
{
   object oItem = GetEventObject(ev,0);
   if (GetTag(oItem) == "yourtagnamehere")
     _AddAbility(object, spellidentifier); 
}

This is more information that I had to begin with. The toolset wiki will have more information and you WILL have to experiment in the toolset to learn how to do this. I hoe this helps.

Link to comment
Share on other sites

Just a guess. Never written code before? Of course, the 'code' format changed the colors of some of the words and I could have chosen a better variable name.

 

I am not going to teach someone to code from the beginning and the toolset wiki expects that you have some level of experience programming/scripting. My very specific example had a different function so it won't look like your code. Try this.....

case EVENT_TYPE_UNIQUE_POWER:
{
   object oItem = GetEventObject(ev,0);
   object oyourvariablename = GetEventObject(ev,1);   

   if (GetTag(oItem) == "yourtagnamehere")
     _AddAbility(oyourvariablename, spellidentifier); 
}

oyourvariablename is the variable that represents the user of the unique item.

 

If it doesn't compile, it won't work in the game. If it doesn't compile, do some research on the toolset wiki :thumbsup:

Link to comment
Share on other sites

Yes! I still has made a correct script. Thank mcgoy!

There is another question:
When party members receive passive abilities - in the center of the screen appear a nice effect informs about it. Is it possible to do the same effect with the information at center of screen in the moment of receiving the spell?

Just... when I drink my special potion and get a fireball - a spell silently added to the panel without reporting messages.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...