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

Simple Craft

lazarus321

Member
Joined
May 8, 2017
Messages
209
Reaction score
20
I got this script of forge, I made some modifications to try to put it in tfs 1.3 but I can not do it.

Can anyone help?
I believe that to function is to just place an action on some item and check the coordinates of the items as below.


function onUse(player, item, fromPosition, target, toPosition, isHotkey)

local config = {
["fire sword"] = {t1 = 5901, t2 = 5880, t3 = 2392, qnt1 = 10, qnt2 = 1}, -- t1 = ID ITEM 1 |---| t2 = ID ITEM 2 |---| t3 = ID ITEM --
["fire axe"] = {t1 = 2489, t2 = 2487, t3= 2432, qnt1 = 100, qnt2 = 1}
}


local r1 = position{1816,305,3, stackpos = 2} -- Position 1
local r2 = position{1817,305,3, stackpos= 2} -- Position 2
local r3 = position{1818,305,3} -- Position of Item for make

local q1 = position:getTile(r1)
local q2 = position:getTile(r2)

for i, x in pairs(config) do
if q1.itemid == x.t1 and q2.itemid == x.t2 then
q1:remove()
qnt1:remove()
q2:remove()
qnt2:remove()
addEvent(Game.createItem, 1000, x.t3, 1, r3)
doSendMagicEffect(r3, 47)
addEvent(doSendMagicEffect, 900, r3, 39)
player:say("congratulations, You make a " .. i .. ".")
break
elseif q1.itemid == x.t2 and q2.itemid == x.t1 then
remove(q1.uid, x.qnt2)
remove(q2.uid, x.qnt1)
addEvent(doCreateItem, 1000, x.t3, 1, r3)
doSendMagicEffect(r3, 47)
addEvent(doSendMagicEffect, 900, r3, 39)
player:say("congratulations, You make a " .. i .. ".")
break
end
end
return true

end
 
Back
Top