function onUse(cid, item, frompos, item2, topos)
local cost = 1000000
local item = xxxx
if doRemovePlayerMoney(cid, cost) == TRUE then
doPlayerAddItem(cid, item, 1)
doPlayerSendTextMessage(cid,22,"You have bought a sword.")
else
doPlayerSendTextMessage(cid,22,"You don't have engouh money.")
end
end
function onUse(cid, item, frompos, item2, topos)
local cost = 1000000
local item = xxxx
if doPlayerTakeItem(cid, 6527, 10) == TRUE then
doPlayerAddItem(cid, item, 1)
doPlayerSendTextMessage(cid,22,"You have bought a sword.")
else
doPlayerSendTextMessage(cid,22,"You don't have engouh money.")
end
end
doPlayerSendTextMessage(cid,22,"You don[B][COLOR="Red"]/[/COLOR][/B]'t have engouh money.")
doPlayerSendTextMessage(cid,22,'You don/'t have engouh money.')
local t = {
[1500] = {name='sword', count=1, itemid=2376, cost=10}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local s, i, r = 11551, 6527, t[item.uid]
if item.uid == r and item.itemid == 1945 then
if getPlayerStorageValue(cid, s) > 0 then
if getPlayerItemCount(cid, i) > r.cost then
doTransformItem(item.uid,item.itemid+1)
doPlayerGiveItem(cid, r.itemid, r.count)
doPlayerRemoveItem(cid, r.itemid, r.count)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You have bought a '.. r.name .. ' for '.. r.cost .. ' VIP coins.')
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You don\'t have enough money!')
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You are not VIP.')
end
elseif item.itemid == 1946 then
doTransformItem(item.uid,item.itemid-1)
end
return true
end
if item.uid == r and item.itemid == 1945
elseif item.itemid == 1946
dont working
local t = {
[1500] = {name='VIP Sword', count=1, itemid=8932, cost=7},
[1501] = {name='VIP Axe', count=1, itemid=7435, cost=7},
[1502] = {name='VIP Club', count=1, itemid=7450, cost=7},
[1503] = {name='VIP Spear', count=1, itemid=2426, cost=7},
[1504] = {name='VIP Wand', count=1, itemid=7958, cost=7},
[1505] = {name='VIP Shield', count=1, itemid=7460, cost=7},
[1506] = {name='VIP Helmet', count=1, itemid=7458, cost=7},
[1507] = {name='VIP Armor', count=1, itemid=7463, cost=7},
[1508] = {name='VIP Shorts', count=1, itemid=7464, cost=7},
[1509] = {name='VIP Boots', count=1, itemid=7457, cost=7},
[1510] = {name='Super Refinador', count=1, itemid=8300, cost=1}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local s, i, r = 11551, 6527, t[uid]
if item.uid == r and item.itemid == 1945 then
if getPlayerStorageValue(cid, s) > 0 then
if getPlayerItemCount(cid, i) > r.cost then
doTransformItem(item.uid,item.itemid+1)
doPlayerGiveItem(cid, r.itemid, r.count)
doPlayerRemoveItem(cid, r.itemid, r.count)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Você comprou '.. r.name .. ' por '.. r.cost .. ' VIP coins.')
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Você não tem moedas VIP suficiente!')
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You are not VIP.')
end
elseif item.itemid == 1946 then
doTransformItem(item.uid,item.itemid-1)
end
return true
end
local t = {
[1500] = {name='VIP Sword', count=1, itemid=8932, cost=7},
[1501] = {name='VIP Axe', count=1, itemid=7435, cost=7},
[1502] = {name='VIP Club', count=1, itemid=7450, cost=7},
[1503] = {name='VIP Spear', count=1, itemid=2426, cost=7},
[1504] = {name='VIP Wand', count=1, itemid=7958, cost=7},
[1505] = {name='VIP Shield', count=1, itemid=7460, cost=7},
[1506] = {name='VIP Helmet', count=1, itemid=7458, cost=7},
[1507] = {name='VIP Armor', count=1, itemid=7463, cost=7},
[1508] = {name='VIP Shorts', count=1, itemid=7464, cost=7},
[1509] = {name='VIP Boots', count=1, itemid=7457, cost=7},
[1510] = {name='Super Refinador', count=1, itemid=8300, cost=1}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local s, i, r = 11551, 6527, t[uid]
if item.uid == r and item.itemid == 1945 then
if getPlayerStorageValue(cid, s) > 0 then
if getPlayerItemCount(cid, i) > r.cost then
doTransformItem(item.uid,item.itemid+1)
doPlayerGiveItem(cid, r.itemid, r.count)
doPlayerRemoveItem(cid, r.itemid, r.count)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Você comprou '.. r.name .. ' por '.. r.cost .. ' VIP coins.')
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Você não tem moedas VIP suficiente!')
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You are not VIP.')
end
elseif item.itemid == 1946 then
doTransformItem(item.uid,item.itemid-1)
end
return true
end