Aller au contenu

Photo

SetQuickslot( ) question?


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

#1
Rogue World

Rogue World
  • Members
  • 46 messages
I managed to figure out how to assign a quickslot for a skill/ability rather easily. However, assigning a consumable item to a quickslot is proving a tad tougher. I can't seem to find the correct constant to use.

Has anyone managed to do this yet? Is it even possible? :huh:

Thanks.

#2
Craig Graff

Craig Graff
  • Members
  • 608 messages
Have you tried something like this?
[dascript]
#include "item_constants_h"
...
SetQuickslot(GetHero(), 4, ABILITY_ITEM_ACID_FLASK, "gen_im_qck_grenade_101");
[/dascript]

Modifié par Craig Graff, 19 janvier 2010 - 06:19 .


#3
shennessy

shennessy
  • Members
  • 29 messages
The ability ID field comes from ABI_base.xls. If you can find a consumable in that list I would think that would work. If you cant, you could make your own entry (check out the adding a new spell tutorial for making a mergable 2da), and then make a script that finds that consumable in the inventory and uses it.



Maybe... CommandUseObject() will use a consumable.

and GetItemsInInventory with the right filter to find the consumable.


#4
Rogue World

Rogue World
  • Members
  • 46 messages

Craig Graff wrote...

Have you tried something like this?
[dascript]
#include "item_constants_h"
...
SetQuickslot(GetHero(), 4, ABILITY_ITEM_ACID_FLASK, "gen_im_qck_grenade_101");
[/dascript]



DOH!! Adding the correct #include did it. I was toying with a test module script and didn't have the "item_constants_h" included... Which cut my help bar of constants considerably.

Thanks Craig! :D

#5
Rogue World

Rogue World
  • Members
  • 46 messages

shennessy wrote...

The ability ID field comes from ABI_base.xls. If you can find a consumable in that list I would think that would work. If you cant, you could make your own entry (check out the adding a new spell tutorial for making a mergable 2da), and then make a script that finds that consumable in the inventory and uses it.

Maybe... CommandUseObject() will use a consumable.
and GetItemsInInventory with the right filter to find the consumable.


Thanks for the suggestion shennessy. I was not yet aware that ABI_base.xls has those ID values.