• 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!

Sklepik ;p

felek02

New Member
Joined
Feb 4, 2011
Messages
80
Reaction score
1
Witam mam pewiem problem w takim skrypcie ;p
PHP:
local items = {
                {2465,150},
                {2466,20000},
                {2486,1500},
                {2487,13000},
				{2187,3000},
				{2434,2000},
				{7390,50000},
				{7434,50000},
				{7429,50000},
				{2492,40000},
				{2503,30000},
				{7897,11000},
				{2466,20000},
				{2470,40000},
				{8873,3000},
				{3968,1000},
				{7898,11000},
				{2514,40000},
				{2472,150000},
				{7899,11000},
				{7463,6000},
				{8891,15000},
				{6095,500},
				{8889,18000},
				{7889,11000},
				{7896,11000},
				{7895,11000},
				{7894,11000},
				{7464,500},
				{5918,200},
				{7885,11000},
				{2541,80},
				{2521,400},
				{2520,30000},
				{7387,3000},
				{2536,9000},
				{7460,1500},
				{2540,2000},
				{8900,4000},
				{6131,150},
				{3972,7500},
				{2462,1000},
				{7902,2500},
				{7461,200},
				{7901,2500},
				{7900,2500},
				{6096,1000},
				{7462,400},
				{5741,40000},
				{7903,2500},
				{3982,1000},
				{7457,2000},
				{7892,2500},
				{7893,2500},
				{7891,2500},
				{7890,2000},
				{5462,3000},
				{2645,30000},
				{7886,2500},
				{7426,8000},
				{3962,1500},
				{7427,12000},
				{7415,30000},
				{7449,600},
				{2429,110},
				{2440,1000},
				{7382,36000},
				{7402,15000},
				{7430,3000},
				{7419,10000},
				{7432,1000},
				{2427,11000},
				{2442,90},
				{7389,30000},
				{7424,5000},
				{7381,300},
				{7386,12000},
				{7384,30000},
				{7418,35000},
				{7456,6000},
				{7456,11000},
				{7383,25000},
				{7437,7000},
				{2402,500},
				{7452,5000},
				{7425,500},
				{2454,9000},
				{7408,1500},
				{2142,200},
				{2125,400},
				{2124,250},
				{6300,1000},
				{2136,32000},
				{2127,800},
				{7888,1500},
				{2171,2500},
				{2123,30000},
				{2133,2000},
				{2135,200},
				{2134,150},
				{5710,300},
				{2110,200},
				{3955,400},
				{5810,500},
				{5914,1000},
				{2144,280},
				{7633,3000},
				{7632,3000},
				{2150,200},
				{2145,300},
				{2146,250},
				{2143,160},
				{2147,250},
				{2149,250},
				{2208,100},
				{2209,100},
				{2166,50},
				{2165,200},
				{2207,100},
				{2172,50},
				{2199,50},
				{2198,100},
				{2197,500},
				{2189,2000},
				{2188,1000},
				{2191,200},
				{2187,3000},
				{2190,100},
				{8921,1500},
				{8920,3600},
				{8922,4400},
				{2162,35},
				{4851,50},
				{2178,100},
				{7493,750},
				{2183,3000},
				{2186,200},
				{2185,1000},
				{2182,100},
				{2181,2000},
				{8912,3600},
				{8911,1500},
				{8911,1500}
                }
function onUse(cid, item, fromPosition, itemEx, toPosition)
local pos = getThingPos(item.uid)
pos.x = pos.x - 1
local cost = 0
for i = 254, 1, -1 do
    local pos.stackpos = i
    local temp = getThingFromPos(pos)
        if isContainer(temp.uid) then
            cost = doSearchItemsID(cid, items, temp, cost)
            break
        end
end
if item.itemid == 1945 and item.actionid == 4392 then
    doTransformItem(item.uid, 1946)
elseif item.itemid == 1946 and item.actionid == 4392 then
    doTransformItem(item.uid, 1945)
end
if cost ~= 0 then
    doPlayerAddMoney(cid, cost)
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sprzedales loot i zarobiles "..cost.." sztuk zlota.")
    cost = 0
else
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Pojemnik z lootem jest pusty.")
end
return true
end
a teraz powiem oco chodzi a chodzi oto ze silnik wywala jakis blad ktorego wcale nie ma :D
Code:
[Error - LuaScriptInterface::LoadFole] data/actions/scripts/sklep.lua:151: unexpected symbol near '-'
[Warning - Event::loadScript] Cannot load script <data/actions/scripts/sklep.lua>
data/actions/scripts/sklep.lua:151: unexpected symbol near '-'
 
powiem inaczej blad dotyczy tej linijki
local pos.stackpos = i
ze niby jest tu zaduzo znakow '-' ale ja w tym nie widze ani jednego
 
PHP:
for i = 254, 1, -1 do
od kiedy to tak? może...
PHP:
for i = 254, -1 do
:)


#dół
ale jak zmieniłeś, to błąd powinien być inny, możesz go też skopiować ..
 
Last edited:
nadal nie dziala ;/
tak zapytam ma ktos moze trunki tfs 0.4.1 r3429
wiem ze to stare ale inne mi nie odpalaja tzn wywala blad przy wlaczaniu ;/
 
Last edited:
jesteś głupi czy ślepy? tam między minusem a jedynką jest spacja
 
Back
Top