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

Problem ze Skryptami TFS 1.2

SoCzek

New Member
Joined
Apr 9, 2017
Messages
14
Reaction score
0
Witam posiadam silnik TFS 1.2 i chciałem wrzucić skrypty typu StaminaDoll to wyskakuje mi błąd i to samo jest z tym skyprtem na Skill Scroll a tez podobno na 1.2

błędy wysyłam w ssach
z góry przeparszam za jakość tak mi na dedyku pokazuje takie male

 

Attachments

skill scroll

local skills = {"Magic Level", "Fist Fighting", "Club Fighting", "Sword Fighting", "Axe Fighting", "Distance Fighting", "Shielding", "Fishing"}
function Player:sendSkillVoucherWindow()
local modaltext = "Select skill you would like to improve:"
local modal = ModalWindow(7092, "Use voucher", modaltext)
for i = 1, #skills do
modal:addChoice(i, skills)
end

modal:addButton(1, "Select")
modal:setDefaultEnterButton(1)
modal:addButton(2, "Cancel")
modal:setDefaultEscapeButton(2)
return modal:sendToPlayer(self)
end
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
player:sendSkillVoucherWindow()
return true
end


STAMINA DOLL

function onUse(player, item, fromPosition, itemEx, toPosition, isHotkey)
local s = player:getStamina() / 60
local cfg = {}
cfg.refuel = 42
cfg.full = 40
if s >= cfg.full then
player:sendCancelMessage("Your stamina is already full.")
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "Your stamina now is "..s.." h.")
else
player:setStamina(cfg.refuel*60)
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "Your stamina has been refilled.")
item:remove(1)
end
return true
end
 
Stamina:

Lua:
[I]function onUse(player, item, fromPosition, itemEx, toPosition, isHotkey)
local s = player:getStamina() / 60
local cfg = {[I]refuel = 42, full = 40[/I]}
if s >= cfg.full then
player:sendCancelMessage("Your stamina is already full.")
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "Your stamina now is "..s.." h.")
else
player:setStamina(cfg.refuel*60)
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "Your stamina has been refilled.")
item:remove(1)
end
return true
end

Upewnij się czy dobrze nazwę plików wpisujesz w actions.xml
 
dobrze wpisuje wlasnie ;/
wkleiłej twoja wersje i jest
Can not load script: scripts/staminaDoll.lua
data/actions/scripts/staminaDoll.lua:1: unexpected symbol near '['
 
ehhh zawsze cos teraz cos takiego ;/

[Warning - Event::checkScript] Can not load script: scripts/staminaDoll.lua
data/actions/scripts/staminaDoll.lua:3: '=' expected near 'refuel'
 
teraz cos takiego mam :p

[Warning - Event::checkScript] Can not load script: scripts/staminaDoll.lua
data/actions/scripts/staminaDoll.lua:4: 'then' expected near '='
 
Back
Top