Nie widzia?em tego tutaj to postanowi?em to tu zamie?ci? niekt?re skrypty umie?ci?em na wklejtu.pl poniewa? tekst by? za d?ugi
skrypt nie m?j - z otland
Alchemy
Skrypt dzia?a na TFS 0.3.5 oraz TFS 0.3.6
tutaj przyk?ad container zawsze musi byc po prawej stronie
dodajemy funkcje data/lib/function.lua
w data/actions/scripts dodajemy:
alchemyskill.lua
alchemyskill.lua
learn_alchemy_recipe.lua
learn_alchemy_recipe.lua
alchemybook.lua
alchemybook.lua
skill_book.lua
skill_book.lua
potion effect.lua
potion effect.lua
alchemy.lua
alchemy.lua
w data/actions/actions.xml dodajemy
Jak to dzia?a?
A wiec tak graczowi potrzebna jest ksi??ka do nauki alchemi (2217)
gdy si? nauczy mo?e kupi? recept? kt?ra zawiera wiedz? jak zrobi? mikstur? (1954)
ksi??ka o ID (1965) pokazuje jakich receptur ju? si? nauczyli?my oraz nasz poziom alchemii
Oryginalny tekst:
skrypt nie m?j - z otland
Alchemy
Skrypt dzia?a na TFS 0.3.5 oraz TFS 0.3.6
tutaj przyk?ad container zawsze musi byc po prawej stronie
dodajemy funkcje data/lib/function.lua
Kod:
--[CustomSkill]-- By:Athern
function getCustomSkill(cid, storage)
return getPlayerStorageValue(cid, storage)
end
function addCustomSkill(cid, skillName, storage)
local skillStorage = math.max(10, getPlayerStorageValue(cid, storage))
local skillTries = math.max(0, getPlayerStorageValue(cid, storage+1))
doPlayerSetStorageValue(cid, storage, skillStorage+1)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You advanced in " .. skillName .. ".")
doPlayerSetStorageValue(cid, storage+1, 0)
end
function addCustomSkillTry(cid, skillName, storage)
local skillStorage = math.max(10, getPlayerStorageValue(cid, storage))
local skillTries = math.max(0, getPlayerStorageValue(cid, storage+1))
doPlayerSetStorageValue(cid, storage+1, skillTries+getConfigInfo("rateSkill"))
if skillTries >= math.floor(20 * math.pow(1.1, (skillStorage-11)) / getConfigInfo("rateSkill")) then
addCustomSkill(cid, skillName, storage)
end
end
function getCustomSkillPercent(cid, storage)
local skillStorage = math.max(10, getPlayerStorageValue(cid, storage))
local skillTries = math.max(0, getPlayerStorageValue(cid, storage+1))
local triesNeeded = math.floor(20 * math.pow(1.1, (skillStorage-11)) / getConfigInfo("rateSkill"))
return math.floor(100*(1-skillTries / triesNeeded))
end
--[/CustomSkill]--
alchemyskill.lua
alchemyskill.lua
learn_alchemy_recipe.lua
learn_alchemy_recipe.lua
alchemybook.lua
alchemybook.lua
skill_book.lua
skill_book.lua
potion effect.lua
potion effect.lua
alchemy.lua
alchemy.lua
w data/actions/actions.xml dodajemy
Kod:
<!-- Alchemy -->
<action itemid="1965" event="script" value="alchemybook.lua"/>
<action itemid="1950" event="script" value="skill_book.lua"/>
<action itemid="1954" event="script" value="learn_alchemy_recipe.lua"/>
<action itemid="2217" event="script" value="alchemyskill.lua"/>
<action itemid="9825" event="script" value="alchemy.lua"/>
<action actionid="41501-41509" event="script" value="potion effects.lua"/>
A wiec tak graczowi potrzebna jest ksi??ka do nauki alchemi (2217)
gdy si? nauczy mo?e kupi? recept? kt?ra zawiera wiedz? jak zrobi? mikstur? (1954)
ksi??ka o ID (1965) pokazuje jakich receptur ju? si? nauczyli?my oraz nasz poziom alchemii
Oryginalny tekst:
Explanation:
ok, so now i will explain the process of alchemy, first and utmost is that a player needs the book for learning alchemy(2217) once he learns the alchemy skill, he can start by buying the first recipe(1954), these recipes contain the knowledge on how to make a particular potion which is determined by an action id, also the recipe is also needed for the mixing in alchemy without it the mix will not happen and players must take in consideration that everything has an order, which means that, yes you have to place the ingredients inside the container in the specified order and the recipe should always be in the first slot of the container, now also there is the skill book that is needed to know what level is your alchemy in, the other thing needed here is the alchemy book (1965) which will show you the recipes so far learned, and it will show the order of the ingredients(remember that if it shows the ingredients in order:1, 2, 3, you place them in the container backwards:3, 2, 1, why? because if you place the first item the next one that you place will be pushed back)now that is all that is needed to know the other which is the potions effect, really is just that, potions with unique effects.

