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

[TFS 1.x] Crafting System

Could someone help me with making this script have only one proffesion (crafting) and don't require any skills/recipe scrolls/points.
I want something like that : Use anvil -> Choose item -> Craft it (if there are required materials)
I would be grateful, thanks! :D
 
Could someone help me with making this script have only one proffesion (crafting) and don't require any skills/recipe scrolls/points.
I want something like that : Use anvil -> Choose item -> Craft it (if there are required materials)
I would be grateful, thanks! :D
This should be on the request boards, as it has nothing to do with the op.
 
I'd love to help you out but I honestly don't know what the problem is or what you're asking. Do you have a friend that can translate? google isn't the best sometimes


Sorry , but I use translator in conjunction with the little English I know.

I followed the steps to the creation of the items to run it , however it still fails. I realized that my player does not get the job , I need to change so that it receives the profession and can create the item ?
 
Could someone help me with making this script have only one proffesion (crafting) and don't require any skills/recipe scrolls/points.
I want something like that : Use anvil -> Choose item -> Craft it (if there are required materials)
I would be grateful, thanks! :D
Sorry , but I use translator in conjunction with the little English I know.

I followed the steps to the creation of the items to run it , however it still fails. I realized that my player does not get the job , I need to change so that it receives the profession and can create the item ?

Mostly all things that people asks already have a -weird- solution somewhere in the thread.
https://otland.net/threads/tfs-1-x-crafting-system.225478/page-2#post-2228791
 
Did you registered the modalwindow event to the player? I forgot to mention that part. Because if the count part were wrong it would send a cancel message or something.
LOL! I am such a noob, registered in creaturesevents and login and working now for the material list, but after I try to craft, cooldown appears, but it fails, I get error in console for nil value for 'allowMovement'

Hmm, what do I need to do exactly to fix the modalwindow closing when i click a button? (I'm a total noob im mostly copying script parts and doing simple xml)
 
don't work i can go to tile because "22:16 The tile seems to be protected against unwanted intruders."
and
"You need to learn some blacksmithing recipes first"

i used tfs 1.2.

can someone help, fix it?
 
ok i add to data/action/scrips/other/craftsys.lua
Lua:
function onUse(player, item, fromPosition, itemEx, toPosition)
function capAll(str)
    return (str:gsub("(%l)(%w*)", function(a,b) return string.upper(a)..b end))
end
   local found = 0
now can click on anvil and get modalwindow have three button material,create and exit only exit it work and when i click on material or create nothing happens and console logs clear
 
Hello, guys,

I can't seem to get this code working. I'm using TFS 1.3.
The issue is related to the Player.isProfession function, more precisely when it receives a value as a parameter.
If I type the key directly, the self:getStorageKey() function works, but, when I use the variable 'storage', it doesn't.
I'm new to LUA, so maybe it is a reference problem, like in Objects?

Lua:
function Player.isProfession(self, storage) -- storage 55501 equals 10
    self:sendTextMessage(MESSAGE_EVENT_ADVANCE, storage) -- sends 55501 as msg
    self:sendTextMessage(MESSAGE_EVENT_ADVANCE, self:getStorageValue(55501)) -- returns and sends 10 as msg
    self:sendTextMessage(MESSAGE_EVENT_ADVANCE, self:getStorageValue(storage)) -- returns and sends -1 as msg
    if self:getStorageValue(storage) >= 1 then
      return true
    end
end
 
Hey folks, I'm having an issue here.

When i buy the recipe from the npc; ive attached the action id to the recipe, it says I cannot use the object. Any thoughts?
 
Here is a little example from a looting script
Code:
local item = player:addItem(1967, 1)
local rndm = math.random(50501, 50506)
local rndm2 = math.random(1, #craftingProfessionsConfig[rndm].skillRecipes)

item:setAttribute(ITEM_ATTRIBUTE_TEXT, craftingProfessionsConfig[rndm].skillRecipes[rndm2].storage)
item:setAttribute(ITEM_ATTRIBUTE_NAME, getItemName(craftingProfessionsConfig[rndm].skillRecipes[rndm2].item).." ("..craftingProfessionsConfig[rndm].skillName.." Recipe)")
item:setAttribute(ITEM_ATTRIBUTE_ACTIONID, rndm)
Please tell me if you find any bug or something.

I'm trying to implement this but im not entirely sure i follow how to do this.
 
So I'm testing the recipes, but I am having a problem. No errors in the console log, but when I click on the recipe it tells me I've already learned the recipe. When I check on the anvil, it doesnt appear in the window. Thoughts?
 
Hello, I have a problem with the first craft Blacksmithing when I open it it comes up crafting skill: 1522018605/200
 
Back
Top