Slot definitions for scripting

Post Reply
Zedingo
Developer
Posts: 85
Joined: Tue Aug 14, 2012 12:24 pm

Slot definitions for scripting

Post by Zedingo » Sun Sep 23, 2012 11:24 pm

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
Attachments
slot_definitions.patch
(82.98 KiB) Downloaded 189 times

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Slot definitions for scripting

Post by kjLotus » Sun Sep 23, 2012 11:32 pm

and i was just starting to memorize all those damn slot IDs!

Zedingo
Developer
Posts: 85
Joined: Tue Aug 14, 2012 12:24 pm

Re: Slot definitions for scripting

Post by Zedingo » Mon Sep 24, 2012 12:13 am

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.


User avatar
diatanato
Developer
Posts: 112
Joined: Thu Aug 30, 2012 9:59 pm

Re: Slot definitions for scripting

Post by diatanato » Tue Sep 25, 2012 12:19 am

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)

Zedingo
Developer
Posts: 85
Joined: Tue Aug 14, 2012 12:24 pm

Re: Slot definitions for scripting

Post by Zedingo » Tue Sep 25, 2012 8:23 am

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

bluekirby0
Developer
Posts: 707
Joined: Sun Jul 22, 2012 12:11 am

Re: Slot definitions for scripting

Post by bluekirby0 » Tue Sep 25, 2012 10:37 am

Well, I did say to put it in its own equipment.lua but you didn't like that either.

Post Reply