thefrancis
New Member
- Joined
- Apr 16, 2010
- Messages
- 22
- Reaction score
- 1
Hello, good evening. I wonder if someone could help me with this script that at first served me for tibia 12.72, the thing is to modify it and make it work but then I wanted to add something else and mess it up, the idea is to summon a monster in X place with X object. about X items. Attached script and console error.
Lua:
-------------THIS SCRIPT WAS MADED BY VANKK AT 15TH DECEMBER 2016 AT 4 P.M (GMT - 3) -------------
local config = {
[7636] = {
targetId = 38834, -- Target ID.
bossName = 'Goshnar Greed', -- boss name
keyPlayerPosition = Position(33608, 32394, 11), -- Where the player should be.
bossPosition = Position(32355, 32272, 7), -- Boss Position
}
}
local keys = Action()
function keys.onUse(player, item, fromPosition, target, toPosition, isHotkey)
local tmpConfig = config[item.itemid]
if not tmpConfig then
return true
end
if target.itemid ~= tmpConfig.targetId then
return true
end
local monster = Game.createMonster(tmpConfig.bossName, tmpConfig.bossPosition)
if not monster then
return true
end
-- Send message
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'Cuidado! un Boss ha sido convocado!')
item:remove()
return true
end
bosskeys:id(7636)
bosskeys:register()