- Joined
- Jun 19, 2009
- Messages
- 1,852
- Reaction score
- 5
Hello! This script was made by Cykotitan xD
What I need is, right now when you click on the lever with one of the follow uid's it says (if I don't have enough money) "you need xxxxxxxx gold"... some people might not know how much these numbers are in "ruby coins" (1 ruby coin = 100 cc)
so, instead of saying "you need xxxxxxx gold" it should say "you need xx ruby coins"
I might not be clear... if not, please tell me lol
thanks
here's the script:
What I need is, right now when you click on the lever with one of the follow uid's it says (if I don't have enough money) "you need xxxxxxxx gold"... some people might not know how much these numbers are in "ruby coins" (1 ruby coin = 100 cc)
so, instead of saying "you need xxxxxxx gold" it should say "you need xx ruby coins"
I might not be clear... if not, please tell me lol
thanks
here's the script:
Lua:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Buy Sys" enabled="yes">
<action itemid="9825" event="script"><![CDATA[
local t = {
[59999] = {cost = 50000000, id = 7720, count = 1},
[60000] = {cost = 50000000, id = 5958, count = 1},
[60001] = {cost = 50000000, id = 9004, count = 1},
[60002] = {cost = 50000000, id = 7696, count = 1},
[60003] = {cost = 50000000, id = 5956, count = 1},
[60004] = {cost = 500000000, id = 8302, count = 1},
[60005] = {cost = 200000000, id = 9693, count = 1},
[60006] = {cost = 500000000, id = 7620, count = 1},
[60007] = {cost = 500000000, id = 7618, count = 1},
[60008] = {cost = 55000000, id = 2087, count = 1, aid = 2087},
[60009] = {cost = 55000000, id = 2091, count = 1, aid = 2091},
[60010] = {cost = 100000000, id = 2798, count = 100},
[60013] = {cost = 150000000, id = 2641, count = 1},
[60014] = {cost = 150000000, id = 2504, count = 1},
[60015] = {cost = 150000000, id = 2503, count = 1},
[60016] = {cost = 150000000, id = 7461, count = 1}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local v = t[item.uid]
local weight = getItemWeightById(v.id, v.count)
if getPlayerFreeCap(cid) >= weight then
if getPlayerMoney(cid) >= v.cost then
local thing = doCreateItemEx(v.id, v.count)
if doPlayerAddItemEx(cid, thing) ~= 1 then
doPlayerSendCancel(cid, "You don't have enough space.")
else
if v.aid then
doItemSetAttribute(thing, "aid", v.aid)
end
doPlayerRemoveMoney(cid, v.cost)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have bought " .. (v.count > 1 and v.count or getItemInfo(v.id).article) .. " " .. (v.count > 1 and getItemInfo(v.id).plural or getItemInfo(v.id).name) .. ".")
return doTransformItem(item.uid, item.itemid == 9825 and 9826 or 9825)
end
else
doPlayerSendCancel(cid, "You need to have " .. v.cost .. " gold.")
end
else
doPlayerSendCancel(cid, "You need atleast " .. weight:format("%.2f") .. " oz. of free capacity.")
end
return doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
end
]]></action>
</mod>