Slime
Active Member
- Joined
- Jan 25, 2014
- Messages
- 115
- Reaction score
- 32
Może ktoś mi pomoże z tym fantem. Tibiando działczy, jeśli chodzi o odtwarzanie muzyki według kordów, ale nie wysyła jakichkolwiek innych dźwięków. 0 errorów w konsoli, ale dźwięk nie zostaje wysłany do gracza. TFS 0.3.6pl1
attacksound.lua
login.lua
creaturescripts.xml
Gdzie jest błąd? Generalnie to cały czas creaturescripty świrują mi pawiana, ostatnio nie wiedzieć czemu przestał mi działać skrypt onAdvance, który przyznawał punkty statystyk do rozdania (http://otland.net/threads/level-points-system.162379/). Działał, działał i nagle przestał - przy każdym awansie ustawia storage punktów na 0.
attacksound.lua
Code:
function onCombat(cid, target)
if isPlayer(cid) and isMonster(target) then
local sock = getSocket(cid)
if sock then
sock:send('EF=atk.wav\n')
end
end
return true
end
Code:
local config = {
loginMessage = getConfigValue('loginMessage'),
useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}
function onLogin(cid)
local loss = getConfigValue('deathLostPercent')
if(loss ~= nil) then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
end
local accountManager = getPlayerAccountManager(cid)
if(accountManager == MANAGER_NONE) then
local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
if(lastLogin > 0) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
else
str = str .. " Please choose your outfit."
doPlayerSendOutfitWindow(cid)
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
elseif(accountManager == MANAGER_NAMELOCK) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
elseif(accountManager == MANAGER_ACCOUNT) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
end
if(not isPlayerGhost(cid)) then
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
end
registerCreatureEvent(cid, "Mail")
registerCreatureEvent(cid, "GuildMotd")
registerCreatureEvent(cid, "Idle")
registerCreatureEvent(cid, "Attackanimation")
registerCreatureEvent(cid, "Attackoutfit")
registerCreatureEvent(cid, "Attacksound")
if(config.useFragHandler) then
registerCreatureEvent(cid, "SkullCheck")
end
registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "AdvanceSave")
return true
end
if not dj then
dj = startAPI(7173) -- Here start the audio
end
Code:
<?xml version="1.0" encoding="UTF-8"?>
<creaturescripts>
<event type="login" name="PlayerLogin" event="script" value="login.lua"/>
<event type="login" name="start_audio" script="start_audio.lua"/>
<event type="logout" name="log" script="logout.lua"/>
<event type="preparedeath" name="die" event="script" value="die.lua"/>
<event type="joinchannel" name="GuildMotd" event="script" value="guildmotd.lua"/>
<event type="receivemail" name="Mail" event="script" value="mail.lua"/>
<event type="reportbug" name="SaveReportBug" script="reportbug.lua"/>
<event type="advance" name="AdvanceSave" event="script" value="advancesave.lua"/>
<event type="combat" name="Attackanimation" event="script" value="attackanim.lua"/>
<event type="combat" name="Attackoutfit" event="script" value="attackoutfit.lua"/>
<event type="combat" name="Attacksound" event="script" value="attacksound.lua"/>
<event type="think" name="Idle" event="script" value="idle.lua"/>
<event type="think" name="SkullCheck" event="script" value="skullcheck.lua"/>
</creaturescripts>