ok, i have looked at every script on this forum that says will work to refil life and mana on levelup but nont of them work, i get no errors they ust plain dont work.
i am using tfs4.0 rev 3884 i have copy and pasted every levelup.lua i have found on site and none work...
here is what my levelup.lua consists of
here is my login.lua
this is what i have entered on my creature scripts
and yes SKILL__LEVEL is registered in my constant.lua.
i am on windows 7
again using tfs 4 rev 3884
for faster corilation please email me at
[email protected]
i am using tfs4.0 rev 3884 i have copy and pasted every levelup.lua i have found on site and none work...
here is what my levelup.lua consists of
Code:
function onAdvance(cid, newLevel)
local playerPos = getCreaturePosition(cid)
if newLevel == SKILL__LEVEL then
doSendMagicEffect(playerPos, CONST_ME_BIGCLOUDS)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
doCreatureAddMana(cid, getCreatureMaxMana(cid))
end
return TRUE
end
here is my login.lua
Code:
function onLogin(cid)
--configuration--
local config = {
texttype = TALKTYPE_CHANNEL_W,
channelID = 11,
textprefix = "Login:",
textsuffix = "has logged in!"
}
--end config--
local showGamemasters = getBooleanFromString(getConfigValue('displayGamemastersWithOnlineCommand'))
for _, pid in ipairs(getChannelUsers(config.channelID)) do
if((showGamemasters or getPlayerCustomFlagValue(pid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES) or not getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) and (not isPlayerGhost(cid) or getPlayerGhostAccess(pid) >= getPlayerGhostAccess(cid))) then
doPlayerSendChannelMessage(pid, cid, config.textprefix.." "..getCreatureName(cid).." "..config.textsuffix, config.texttype, config.channelID)
end
registerCreatureEvent(cid, "NewLevel")
end
return true
end
this is what i have entered on my creature scripts
Code:
<event type="advance" name="newlevel" event="script" value="levelUp.lua"/>
and yes SKILL__LEVEL is registered in my constant.lua.
i am on windows 7
again using tfs 4 rev 3884
for faster corilation please email me at
[email protected]
Last edited: