Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local config = {
- cantidad = 1
- }
- local aid = { --actionid, ITEMQEDARA, ITEMQEQITARA
- --Listas
- [5600] = {7168, 2328},
- [5601] = {7588, 2328},
- [5602] = {7591, 2328},
- [5603] = {7620, 2328},
- [5604] = {7589, 2328},
- [5605] = {7590, 2328},
- [5606] = {8472, 2328},
- [5607] = {8473, 2328},
- [5608] = {2273, 2328},
- [5609] = {2274, 2328},
- [5610] = {2271, 2328,
- [5611] = {2269, 2328},
- [5612] = {2268, 2328},
- [5613] = {2262, 2328},
- [5614] = {2261, 2328},
- [5615] = {2260, 2328},
- [5616] = {2310, 2328},
- [5617] = {2311, 2328},
- [5618] = {2313, 2328},
- [5619] = {2315, 2328},
- [5620] = {2289, 2328},
- [5621] = {2288, 2328},
- [5622] = {2287, 2328},
- [5623] = {2286, 2328},
- [5624] = {2285, 2328},
- [5625] = {2278, 2328},
- [5626] = {2277, 2328},
- [5627] = {2308, 2328},
- [5628] = {2305, 2328},
- [5629] = {2304, 2328},
- [5630] = {2303, 2328},
- [5631] = {2302, 2328},
- [5632] = {2301, 2328},
- [5633] = {2295, 2328},
- [5634] = {2293, 2328},
- [5635] = {2292, 2328},
- [5636] = {2291, 2328},
- [5637] = {2290, 2328}
- }
- function onUse(cid, item, fromPosition, itemEx, toPosition)
- local aids = aid[item.actionid]
- if item.itemid == 1945 then
- if aids then
- if doPlayerAddItem(cid, aids[1], config.cantidad, false) == RETURNVALUE_NOERROR then
- if doPlayerRemoveItem(cid, aids[3]) then
- doPlayerSendTextMessage(cid, TALKTYPE_ORANGE_1, 'Recibiste '..getItemNameById(aids[2])..' acambio de '..getItemNameById(aids[3])..'.')
- else
- doPlayerSendTextMessage(cid, TALKTYPE_ORANGE_1, 'Necesitas un '..getItemNameById(aids[3])..' para comprar este producto.')
- end
- else
- doPlayerSendTextMessage(cid, TALKTYPE_ORANGE_1, 'No tienes suficiente capacidad.')
- end
- end
- return true
- end
Add Comment
Please, Sign In to add comment