kimokimo
Kimo
I was trying to make a script but i got stuck in the first part of it i hope someone can help me.
I want to get item id in item place and if that item id is in array of wepaon type 1,2,3 and get gem id in gem place = config.Dgem then blalbalba.
will the code below works ?
- - - Updated - - -
Bump whats wrong in the script?
I want to get item id in item place and if that item id is in array of wepaon type 1,2,3 and get gem id in gem place = config.Dgem then blalbalba.
will the code below works ?
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local config = {
Dchance = math.random(1,100)
ItemPlace = {x=1001, y=1003, z=6}
GemPlace = {x=999, y=1003, z=6}
Items = getTileItemById(ItemPlace, item)
}
if(isInArray({1, 2, 3}, getItemWeaponType(config.Items))) then
if(getTileItemById(config.GemPlace, 2156)) then
doItemSetAttribute(config.Items.uid, "attack", (getItemAttack(config.Items) + config.Dchance))
doSetItemSpecialDescription(config.Items.uid, "+"..config.Dchance.." ATTK")
doSendMagicEffect(config.ItemPlace, 30)
end
end
return true
end
- - - Updated - - -
Bump whats wrong in the script?
Last edited: