• 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!

[8.6] Item that add you points for shop system.

ziomek14b

New Member
Joined
Dec 26, 2007
Messages
98
Reaction score
0
Hello, i need some sort of script for some item that will add points for shop when you click on it. Thank you.
 
XML:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Premium Points Item" version="20200402" author="Xaekai" contact="[email protected]" enabled="yes" >

    <action itemid="8675309" allowfaruse="1" blockwalls="0" event="script" ><![CDATA[

function onUse(cid, item, fromPosition, itemEx, toPosition)
    local playerID = getPlayerAccountId(cid)
    local infinite = false

    db.executeQuery("UPDATE `accounts` SET `premium_points` = `premium_points` + " .. 10 .. " WHERE `id` = " .. playerID .. ";")

    if infinite == false then
        if item.type > 1 then
            doChangeTypeItem(item.uid, ( item.type - 1 ))
        else
            doRemoveItem(item.uid, 1)
        end
    end
    return true
end

    ]]></action>

</mod>
 
Back
Top