• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action Cursed Coin = Premium Coin? ;o [TFS 1.0]

Was this helpful?

  • Yes!

    Votes: 4 57.1%
  • No.

    Votes: 3 42.9%

  • Total voters
    7

God Mythera

Veteran OT User
Joined
Aug 11, 2012
Messages
2,048
Solutions
2
Reaction score
256
Location
United States
x28cGnv.png

data/items/items.xml
Code:
<item id="24137" article="a" name="premium coin">
        <attribute key="description" value="Using this coin will add 10 shop points to your account." />
        <attribute key="weight" value="0" />
    </item>

data/actions/actions.xml
Code:
    <action itemid="24137" script="other/premium_coin.lua"/>

data/actions/scripts/premium_coin.lua
Code:
local function doPlayerAddPremiumPoints(cid, count)
        db.query('UPDATE accounts SET premium_points = premium_points+'.. count ..' WHERE id = ' .. getAccountNumberByPlayerName(getCreatureName(cid)))
end

function onUse(cid, item, fromPosition, itemEx, toPosition)
    doPlayerAddPremiumPoints(cid, 10)
    doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You have recived 10 shop points to your account.")
    doSendMagicEffect(getCreaturePosition(cid), 28)
    doRemoveItem(item.uid,1)
    return true
end
 
Last edited:
Back
Top