• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 0.X Help Script Lever - TFS 0.4

adriez

New Member
Joined
Aug 14, 2011
Messages
73
Reaction score
1
how do I pull a lever and win all items from the first column and one actionid second column all items and so it goes ??

i want so

local lever = {
[7131] = {100,12568,2469,11114,2181,7365,8905,11301, 2474},



local lever = {
[7130] = {100,2474},
[7131] = {100,12568},
[7132] = {100,2469},
[7133] = {100,11114},
[7134] = {100,2181},
[7135] = {100,7365},
[7136] = {100,8905},
[7137] = {100,11301},

[7138] = {130,7903},
[7139] = {130,7884},
[7140] = {130,7885},
[7141] = {130,7886},
[7142] = {130,8911},
[7143] = {130,7363},
[7144] = {130,7460},
[7145] = {130,7390},


[7146] = {160,7900},
[7147] = {160,7899},
[7148] = {160,7894},
[7149] = {160,7891},
[7100] = {160,12597},
[7151] = {160,12391},
[7152] = {160,3974},
[7153] = {160,2446},

[7155] = {190,7902},
[7156] = {190,7897},
[7157] = {190,7896},
[7158] = {190,7892},
[7159] = {190,12288},
[7160] = {190,2547},
[7161] = {190,3975},
[7162] = {190,7404},

[7163] = {220,7901},
[7164] = {220,7898},
[7165] = {220,7895},
[7166] = {220,7893},
[7167] = {220,7735},
[7168] = {220,12286},
[7169] = {220,2532},
[7170] = {220,8930}

}
local storage,exausted = 98762, 2
local Stackable = {7365,7363,12286,2547,12391,12597} -- coloque o ID aqui dos que só vem 1
function onUse(cid,item,fromPosition,itemEx,toPosition)
if getotfunPoints(cid) < lever[item.actionid][1] then
return doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "Você precisa de "..lever[item.actionid][1].." Ot Fun points.")
elseif getPlayerStorageValue(cid, storage) >= os.time() then
return doPlayerSendCancel(cid, "espere " .. getPlayerStorageValue(cid, storage) - os.time() .. " alguns segundos e tente novamente.")
end
doPlayerAddItem(cid,lever[item.actionid][2], isItemStackable(lever[item.actionid][2]) and isInArray(Stackable, lever[item.actionid][2]) and 1 or 100)
doPlayerRemoveotfunPoints(cid,lever[item.actionid][1])
setPlayerStorageValue(cid, storage, os.time()+exausted)
doPlayerSendTextMessage(cid,22,"Você comprou um " .. getItemNameById(lever[item.actionid][2]))
doSendMagicEffect(getCreaturePosition(cid), math.random(28,30))
return true
end
 
Back
Top