Siegh
Thronar Developer
Hello, I'm having a supposedly very simple issue. What I need basically is to check if the player's equipped weapon corresponds to a list of ids. I'm adding these to the global.lua so I can utilize in multiple scripts easier. The problem is it's returning as false even when I clearly wield an weapon which id is included.
What I have so far is:
Global.lua
And a spell script including:
spell.lua
If someone can enlighten me on how to solve this I'd be very happy!
Thanks in advance.
What I have so far is:
Global.lua
Code:
meleeCheck = {2406, 2388, 2376, 2385, 2384, 2397, 2419, 7385, 7383, 2413, 2377, 7406, 2422, 2417, 2439, 2423, 2394, 2434, 7437, 2424, 7452, 7392, 2452, 2380, 2386, 2441, 2428, 2430, 8601, 3962, 2435, 2387, 7380, 7436, 7379, 2389, 7378, 3965, 3964, 2425, 2414, 2379, 2404, 2402, 2351, 8602, 7404, 7408, 2381, 2426, 2429, 2427, 11323, 11305}
And a spell script including:
spell.lua
Code:
melee = getPlayerSlotItem(cid, CONST_SLOT_LEFT).itemid
if melee == meleeCheck then
If someone can enlighten me on how to solve this I'd be very happy!
Thanks in advance.