CesarZ
Well-Known Member
- Joined
- Sep 20, 2012
- Messages
- 269
- Solutions
- 4
- Reaction score
- 63
I'm starting to work on "action" scripting now, and I don't exactly know how to start the script. This is what i have. im using TFs 1.3. Thanks for your help.
i also think it has to do with the (target == 1304) because the other functions are not showing. I also tried (target == itemId(1304))
i also think it has to do with the (target == 1304) because the other functions are not showing. I also tried (target == itemId(1304))
Lua:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
local player = Player()
if (target == 1304) then -- if (target is equal to stoneID)
target:remove(1304) -- Remove stone
target:addItem(1336) -- add little stones on target spot
target:sendMagicEffect(CONST_ME_POFF) -- effects
target:say("Boom!.",TALKTYPE_MONSTER_SAY ) -- effect
else -- otherwise
player:say("You can't break this.",TALKTYPE_MONSTER_SAY ) -- effect
end
return true
end