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[item.uid]
if r and (item.itemid == 1945 or item.itemid == 1946) then
if getPlayerStorageValue(cid, s) > 0 then
if getPlayerItemCount(cid, i) > r.cost then
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.')
return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
else
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Você n?o tem moedas VIP suficiente!')
end
else
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You are not VIP.')
end
end
end
<action uniqueid="1500" event="script" value="script_name.lua"/>
<action uniqueid="1501" event="script" value="script_name.lua"/>
<action actionid="1500" script="VIP/lavanca.lua" />
<action actionid="1501" script="VIP/lavanca.lua" />
<action actionid="1502" script="VIP/lavanca.lua" />
<action actionid="1503" script="VIP/lavanca.lua" />
<action actionid="1504" script="VIP/lavanca.lua" />
<action actionid="1505" script="VIP/lavanca.lua" />
<action actionid="1506" script="VIP/lavanca.lua" />
<action actionid="1507" script="VIP/lavanca.lua" />
<action actionid="1508" script="VIP/lavanca.lua" />
<action actionid="1509" script="VIP/lavanca.lua" />
<action actionid="1510" script="VIP/lavanca.lua" />
<action actionid="1500" script="VIP/lavanca.lua" />
<action uniqueid="1501" script="VIP/lavanca.lua" />
<action uniqueid="1502" script="VIP/lavanca.lua" />
<action uniqueid="1503" script="VIP/lavanca.lua" />
<action uniqueid="1504" script="VIP/lavanca.lua" />
<action uniqueid="1505" script="VIP/lavanca.lua" />
<action uniqueid="1506" script="VIP/lavanca.lua" />
<action uniqueid="1507" script="VIP/lavanca.lua" />
<action uniqueid="1508" script="VIP/lavanca.lua" />
<action uniqueid="1509" script="VIP/lavanca.lua" />
<action uniquenid="1510" script="VIP/lavanca.lua" />
if from to then like this 1500-1510xeon can 1500;1510 ?
if from to then like this 1500-1510
1500;1510 means
only unique ids with 1500 and 1510 not from this to this..
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 i, r = 6527, t[item.uid]
if r and (item.itemid == 1945 or item.itemid == 1946) then
if getPlayerItemCount(cid, i) > r.cost then
doPlayerGiveItem(cid, r.itemid, r.count)
doPlayerRemoveItem(cid, r.itemid, r.count)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Voce comprou '.. r.name .. ' por '.. r.cost .. ' VIP coins.')
return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
else
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Voce n?o tem moedas VIP suficiente!')
end
end
end