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

Lua Problem with script, 5 Levers and 5 Apples.

Obsdark

Member
Joined
Sep 25, 2011
Messages
213
Reaction score
9
¡¡¡Hey Oh!!!

Can you help me a little bit with this one?, it's about 5 levers, each one with is triggered creates an apple in one specifical location for each lever, and when they are un-triggered, the apple who they create is removed.


LUA:
local var, t, pos = {
[3211] = "", {x=3012,y=3078,z=8},
[3212] = "", {x=3014,y=3080,z=8},
[3213] = "", {x=3014,y=3078,z=8},
[3214] = "", {x=3012,y=3080,z=8},
[3215] = "", {x=3013,y=3080,z=8}
}
local pop = {
[3211] = "1°", 
[3212] = "2°", 
[3213] = "3°", 
[3214] = "4°", 
[3215] = "5°"
}
local pops = pop[print]
local vars = var[item.uid]
function onUse(cid, item, fromPosition, itemEx, toPosition)
       if item.itemid == 1945 and item.uid == vars then
               local k = doCreateItem(vars, 1, pos)
               t = "la pops torre ha sido activada."
       elseif item.itemid == 1946 and item.uid == vars then
               t = "¡la pops torre ha sido desactivada.!"
               doRemoveItem(getTileItemById(pos, 2674).uid, 1)
       end

       return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945), 
	   doPlayerSendTextMessage(cid, MESSAGE_INFO_GLOBAL, t)
end

¡¡¡Gratefull Since Now!!!
(Y)(Y)


-Obsdark-
 
Back
Top