PHP:
function skinMonster(cid,item,skin)
local random = math.random(1,8)
if(random == 1) then
doPlayerAddItem(cid,skin,1)
doSendMagicEffect(getThingPos(item.uid), CONST_ME_MAGIC_RED)
else
doSendMagicEffect(getThingPos(item.uid), CONST_ME_POFF)
end
doTransformItem(item.uid,item.itemid+1)
end
I want to know how to know when to put the ( and ) 's.
Like in the code above "if(random == 1) then.
Why do you have to write "(random == 1)?
I think a "gramma" tutorial for LUA would be nice xD
EDIT; And please try to not answer in a very advanced English(CIP language).