• 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 Beginner's items in specific slot type.

remus934

New Member
Joined
Mar 1, 2014
Messages
13
Reaction score
0
Hi!
I need to do this:
At start ,player will get: Spells button with runes inside .
But:
Spells button with items inside (in red circle) must be placed in necklace slot (in green circle)
96705649151307640742.png

Database (players_items) table:
13787561658405593398.png



Spells Button ID: 2000
Items ID's:
11662
11663
11664
11665
11666
11667
11668
11669
11661
Items inside the button must be placed in this order^ (up)
Can somebody help me?



#EDIT
Fixed!

If somebody need that script:
in creaturescripts/scripts/XXX.lua add:
Code:
function onLogin(cid)
    if getPlayerLevel(cid) == 1 and getPlayerStorageValue(cid, 133335) == -1 then
    local button = doPlayerAddItem(cid, 2000, 1)

    doAddContainerItem(button, 11662, 1)
    doAddContainerItem(button, 11663, 1)
    doAddContainerItem(button, 11664, 1)
    setPlayerStorageValue(cid, 133335, 1)
   
    elseif getPlayerStorageValue(cid, 133335) == 1 then
    doPlayerSendCancel(cid, "Welcome Again!")
end
    return true
end

in creaturescripts.xml add this line:
<event type="login" name="XXX" event="script" value="XXX.lua"/>
 
Last edited:
Back
Top