• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua How to properly use getItemSpecialDescription ?

Kakaher

Member
Joined
Nov 2, 2009
Messages
129
Reaction score
7
Hello everybody...

I hope someone can help me out here...
I just can't get this to work...

I want the script to check if the item on one of the players hand has a plus signal on its description...

Here is how the scripts looks like now:
LUA:
local hand = getPlayerSlotItem(cid, CONST_SLOT_RIGHT)
local hand2 = getPlayerSlotItem(cid, CONST_SLOT_LEFT)
if (getItemSpecialDescription(hand):find('+')) or (getItemSpecialDescription(hand2):find('+')) then

I get this msg error:
Code:
[Error - TalkAction Interface]
data/talkactions/scripts/auction.lua:onSay
Description:
(luaGetthing) Thing not found

[Error - TalkAction Interface]
data/talkactions/scripts/auction.lua:onSay
Description:
data/lib/050-function.lua:269: attempt to index a boolean value
stack traceback:
data/lib/050-function.lua:269: in function 'getItemSpecialDescription'
data/talkactions/scripts/auction.lua:51: in function <data/talkactions/scripts/auction.lua:12>

Thanks a lot already for the help!
Rep+
 
LUA:
local hand = getPlayerSlotItem(cid, CONST_SLOT_RIGHT)
local hand2 = getPlayerSlotItem(cid, CONST_SLOT_LEFT)
if (getItemSpecialDescription(hand.uid):find('+')) or (getItemSpecialDescription(hand2.uid):find('+')) then

Try that, it's the most outlandish guess I can make here.
 
LUA:
local hand = getPlayerSlotItem(cid, CONST_SLOT_RIGHT)
local hand2 = getPlayerSlotItem(cid, CONST_SLOT_LEFT)
if (getItemSpecialDescription(hand.uid):find('+')) or (getItemSpecialDescription(hand2.uid):find('+')) then

Try that, it's the most outlandish guess I can make here.

Still the same error = /
 
Does Anyone got an idea on how to use this properly?.. like maybe to set the description to a number to use for an item use countdown??

Like
Code:
13:00 You see a special flask.
 (Charges: 4)
ItemID: [7494].
Each time u use it will then count down the number till it reaches 1 or 0, w/e and then it'll removes the object....
 
Back
Top