Page 1 of 1

Slot definitions for scripting

Posted: Sun Sep 23, 2012 11:24 pm
by Zedingo
Remembering ever-changing numbers for slots are a thing of the past!

In future scripts, please use

Code: Select all

require("scripts/globals/status");
at the top of your script (under the commented description is fine,) and then you may/shall use the following references in your calls to getEquipID or wherever you may need a slot number:

Code: Select all

SLOT_MAIN
SLOT_SUB
SLOT_RANGED
SLOT_AMMO
SLOT_HEAD
SLOT_BODY
SLOT_HANDS
SLOT_LEGS
SLOT_FEET
SLOT_NECK
SLOT_WAIST
SLOT_EAR1
SLOT_EAR2
SLOT_RING1
SLOT_RING2
SLOT_BACK
Also in this patch, I deleted some unneeded requires to settings, included the sneak/invis multiplier from settings in invisible, hide, camouflage, and sneak spells, and turned ON 12 TP per tick Meditate when Samurai is subbed

Re: Slot definitions for scripting

Posted: Sun Sep 23, 2012 11:32 pm
by kjLotus
and i was just starting to memorize all those damn slot IDs!

Re: Slot definitions for scripting

Posted: Mon Sep 24, 2012 12:13 am
by Zedingo
Well I guess you'll just have to get that tattoo covered up with something else then, won't you?


BTW, this patch also fixes cure potency and any other script-checking-the-wrong-slot errors.

Re: Slot definitions for scripting

Posted: Mon Sep 24, 2012 5:16 am
by Metalfiiish

Re: Slot definitions for scripting

Posted: Tue Sep 25, 2012 12:19 am
by diatanato
i think what Slot Definitions must be in common.lua and if you wish to use it, then include settings.lua (it include common.lua)

Re: Slot definitions for scripting

Posted: Tue Sep 25, 2012 8:23 am
by Zedingo
I put it in common.lua first and everyone said it should probably be in status.lua

I'm about to say hell with it and make a definitions.lua

Re: Slot definitions for scripting

Posted: Tue Sep 25, 2012 10:37 am
by bluekirby0
Well, I did say to put it in its own equipment.lua but you didn't like that either.