Evangelion
New Member
- Joined
- May 8, 2008
- Messages
- 13
- Reaction score
- 0
Hello guys!
well i need, what the next script work to tfs v2, why the functions how "getItemById", this function don`t exist in this plataform tfs v2.
"setItemName()" = dont exist.
"tonumber(cnt)" = what ?
Note: if do oyu can fixed for tfs v2, i give you Rep ++
well i need, what the next script work to tfs v2, why the functions how "getItemById", this function don`t exist in this plataform tfs v2.
"setItemName()" = dont exist.
"tonumber(cnt)" = what ?
Note: if do oyu can fixed for tfs v2, i give you Rep ++
Lua:
local weapons = {
-- earth
[7860] = {lvl=0, arma=2430, vocs={4,8}, exaust=1},
[7864] = {lvl=0, arma=2423, vocs={4,8}, exaust=1},
[7857] = {lvl=0, arma=7406, vocs={4,8}, exaust=1},
[7855] = {lvl=0, arma=7383, vocs={4,8}, exaust=1},
[7856] = {lvl=0, arma=7384, vocs={4,8}, exaust=1},
[7866] = {lvl=0, arma=7415, vocs={4,8}, exaust=1},
[7862] = {lvl=0, arma=7380, vocs={4,8}, exaust=1},
[7858] = {lvl=0, arma=7402, vocs={4,8}, exaust=1},
[7868] = {lvl=0, arma=2391, vocs={4,8}, exaust=1},
[7861] = {lvl=0, arma=7389, vocs={4,8}, exaust=1},
[7854] = {lvl=0, arma=2383, vocs={4,8}, exaust=1},
[7867] = {lvl=0, arma=7392, vocs={4,8}, exaust=1},
[7859] = {lvl=0, arma=2429, vocs={4,8}, exaust=1},
[7865] = {lvl=0, arma=2445, vocs={4,8}, exaust=1},
[7863] = {lvl=0, arma=2454, vocs={4,8}, exaust=1},
-- fire
[7750] = {lvl=50, arma=2430, vocs={4,8}, exaust=1},
[7754] = {lvl=50, arma=2423, vocs={4,8}, exaust=1},
[7747] = {lvl=50, arma=7406, vocs={4,8}, exaust=1},
[7745] = {lvl=50, arma=7383, vocs={4,8}, exaust=1},
[7746] = {lvl=50, arma=7384, vocs={4,8}, exaust=1},
[7756] = {lvl=50, arma=7415, vocs={4,8}, exaust=1},
[7752] = {lvl=50, arma=7380, vocs={4,8}, exaust=1},
[7784] = {lvl=50, arma=7402, vocs={4,8}, exaust=1},
[7758] = {lvl=50, arma=2391, vocs={4,8}, exaust=1},
[7751] = {lvl=50, arma=7389, vocs={4,8}, exaust=1},
[7744] = {lvl=50, arma=2383, vocs={4,8}, exaust=1},
[7757] = {lvl=50, arma=7392, vocs={4,8}, exaust=1},
[7749] = {lvl=50, arma=2429, vocs={4,8}, exaust=1},
[7755] = {lvl=50, arma=2445, vocs={4,8}, exaust=1},
[7753] = {lvl=50, arma=2454, vocs={4,8}, exaust=1},
-- energy
[7875] = {lvl=80, arma=2430, vocs={4,8}, exaust=1},
[7879] = {lvl=80, arma=2423, vocs={4,8}, exaust=1},
[7872] = {lvl=80, arma=7406, vocs={4,8}, exaust=1},
[7870] = {lvl=80, arma=7383, vocs={4,8}, exaust=1},
[7871] = {lvl=80, arma=7384, vocs={4,8}, exaust=1},
[7881] = {lvl=80, arma=7415, vocs={4,8}, exaust=1},
[7877] = {lvl=80, arma=7380, vocs={4,8}, exaust=1},
[7873] = {lvl=80, arma=7402, vocs={4,8}, exaust=1},
[7883] = {lvl=80, arma=2391, vocs={4,8}, exaust=1},
[7876] = {lvl=80, arma=7389, vocs={4,8}, exaust=1},
[7869] = {lvl=80, arma=2383, vocs={4,8}, exaust=1},
[7882] = {lvl=80, arma=7392, vocs={4,8}, exaust=1},
[7874] = {lvl=80, arma=2429, vocs={4,8}, exaust=1},
[7880] = {lvl=80, arma=2445, vocs={4,8}, exaust=1},
[7878] = {lvl=80, arma=2454, vocs={4,8}, exaust=1},
--- ice
[7769] = {lvl=130, arma=2430, vocs={4,8}, exaust=1},
[7773] = {lvl=130, arma=2423, vocs={4,8}, exaust=1},
[7766] = {lvl=130, arma=7406, vocs={4,8}, exaust=1},
[7764] = {lvl=130, arma=7383, vocs={4,8}, exaust=1},
[7765] = {lvl=130, arma=7384, vocs={4,8}, exaust=1},
[7775] = {lvl=130, arma=7415, vocs={4,8}, exaust=1},
[7771] = {lvl=130, arma=7380, vocs={4,8}, exaust=1},
[7767] = {lvl=130, arma=7402, vocs={4,8}, exaust=1},
[7777] = {lvl=130, arma=2391, vocs={4,8}, exaust=1},
[7770] = {lvl=130, arma=7389, vocs={4,8}, exaust=1},
[7763] = {lvl=130, arma=2383, vocs={4,8}, exaust=1},
[7776] = {lvl=130, arma=7392, vocs={4,8}, exaust=1},
[7768] = {lvl=130, arma=2429, vocs={4,8}, exaust=1},
[7774] = {lvl=130, arma=2445, vocs={4,8}, exaust=1},
[7772] = {lvl=130, arma=2454, vocs={4,8}, exaust=1},
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isPlayer(itemEx.uid) == false or weapons[item.itemid] == nil or isCreature(itemEx.uid) == false then
return FALSE
elseif getPlayerLevel(itemEx.uid) < weapons[item.itemid].lvl or isInArray(weapons[item.itemid].vocs,getPlayerVocation(itemEx.uid)) == FALSE then
doCreatureSay(itemEx.uid, "Only required vocation and level "..weapons[item.itemid].lvl.." or can used this weapons.", TALKTYPE_ORANGE_1)
return TRUE
end
local _, _, cnt =string.find(getItemName(item.uid),'(%d+)')
if tonumber(cnt) ~= nil and tonumber(cnt) > 1 then
local _, _, cnt =string.find(getItemName(item.uid),'(%d+)')
setItemName(item.uid, getItemNameById(item.itemid).." x "..cnt-1)
else
doTransformItem(item.uid,weapons[item.itemid].arma)
end
doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
doCreatureSay(itemEx.uid, "xD...", TALKTYPE_ORANGE_1)
return TRUE
end