local function doPlayerSetSkullEnd(cid)
if getPlayerStorageValue(cid, 2000) == 1 then
doCreatureSetSkullType(cid,1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Msg")
end
return true
end
function onLogin(cid)
if isPlayer(cid) then
addEvent(doPlayerSetSkullEnd,5*1000, cid)
end
return true
end
cid, hp, mp, pos)
i want it in login then it will check player everyloginCode:local function doPlayerSetSkullEnd(cid) if getPlayerStorageValue(cid, 2000) == 1 then doCreatureSetSkullType(cid,1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Msg") end return true end function onLogin(cid) if isPlayer(cid) then addEvent(doPlayerSetSkullEnd,5*1000, cid) end return true end
Thanks @owned @heba for your help@heba's script will work for you no problem you just have to make a new login script, or if you want post your login.lua and I'll add it there for you.
local config = {
loginMessage = getConfigValue('loginMessage'),
useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}
function onLogin(cid)
doChangeSpeed(cid, 750)
doCreatureSay(cid, "Welcome!", 19)
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, "Forever Amulet")
registerCreatureEvent(cid, "onPrepareDeath")
registerCreatureEvent(cid, "ZombieAttack")
registerCreatureEvent(cid, "removeghostspell")
registerCreatureEvent(cid, "removeghostcombat")
registerCreatureEvent(cid, "AutoBuyer")
registerCreatureEvent(cid, "SkullSystem")
registerCreatureEvent(cid, "SkullLevel")
registerCreatureEvent(cid, "BlockEffect")
registerCreatureEvent(cid, "GuildMotd")
registerCreatureEvent(cid, "Idle")
if(config.useFragHandler) then
registerCreatureEvent(cid, "SkullCheck")
end
registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "AdvanceSave")
local storageItem = 11741
if (getPlayerStorageValue(cid, storageItem) > 0) and (getPlayerBlessing(cid, 1) == false) then
doPlayerAddItem(cid, 2173, 1)
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 1)
for i = 1,5 do
doPlayerAddBlessing(cid, i)
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You received free AOL and BLESS.")
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
else
doCreatureSay(cid, "Automaticlly blessed and amulet of loss equiped!", 19)
doSendMagicEffect(getThingPos(cid), CONST_ME_HOLYAREA)
end
return true
end
local config = {
loginMessage = getConfigValue('loginMessage'),
useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}
local function setSkull(cid)
if getPlayerStorageValue(cid, 2000) == 1 then
doCreatureSetSkullType(cid,1)
end
end
function onLogin(cid)
addEvent(setSkull, 3000, cid)
doChangeSpeed(cid, 750)
doCreatureSay(cid, "Welcome!", 19)
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, "Forever Amulet")
registerCreatureEvent(cid, "onPrepareDeath")
registerCreatureEvent(cid, "ZombieAttack")
registerCreatureEvent(cid, "removeghostspell")
registerCreatureEvent(cid, "removeghostcombat")
registerCreatureEvent(cid, "AutoBuyer")
registerCreatureEvent(cid, "SkullSystem")
registerCreatureEvent(cid, "SkullLevel")
registerCreatureEvent(cid, "BlockEffect")
registerCreatureEvent(cid, "GuildMotd")
registerCreatureEvent(cid, "Idle")
if(config.useFragHandler) then
registerCreatureEvent(cid, "SkullCheck")
end
registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "AdvanceSave")
local storageItem = 11741
if (getPlayerStorageValue(cid, storageItem) > 0) and (getPlayerBlessing(cid, 1) == false) then
doPlayerAddItem(cid, 2173, 1)
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 1)
for i = 1,5 do
doPlayerAddBlessing(cid, i)
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You received free AOL and BLESS.")
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
else
doCreatureSay(cid, "Automaticlly blessed and amulet of loss equiped!", 19)
doSendMagicEffect(getThingPos(cid), CONST_ME_HOLYAREA)
end
return true
end
Awawaw you are very helpful member thanks owned very much@cuba
Code:local config = { loginMessage = getConfigValue('loginMessage'), useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')) } local function setSkull(cid) if getPlayerStorageValue(cid, 2000) == 1 then doCreatureSetSkullType(cid,1) end end function onLogin(cid) addEvent(setSkull, 3000, cid) doChangeSpeed(cid, 750) doCreatureSay(cid, "Welcome!", 19) 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, "Forever Amulet") registerCreatureEvent(cid, "onPrepareDeath") registerCreatureEvent(cid, "ZombieAttack") registerCreatureEvent(cid, "removeghostspell") registerCreatureEvent(cid, "removeghostcombat") registerCreatureEvent(cid, "AutoBuyer") registerCreatureEvent(cid, "SkullSystem") registerCreatureEvent(cid, "SkullLevel") registerCreatureEvent(cid, "BlockEffect") registerCreatureEvent(cid, "GuildMotd") registerCreatureEvent(cid, "Idle") if(config.useFragHandler) then registerCreatureEvent(cid, "SkullCheck") end registerCreatureEvent(cid, "ReportBug") registerCreatureEvent(cid, "AdvanceSave") local storageItem = 11741 if (getPlayerStorageValue(cid, storageItem) > 0) and (getPlayerBlessing(cid, 1) == false) then doPlayerAddItem(cid, 2173, 1) doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 1) for i = 1,5 do doPlayerAddBlessing(cid, i) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You received free AOL and BLESS.") doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) else doCreatureSay(cid, "Automaticlly blessed and amulet of loss equiped!", 19) doSendMagicEffect(getThingPos(cid), CONST_ME_HOLYAREA) end return true end
This will work for you. Test it on an actual player since it wont work on a gm.
Awawaw you are very helpful member thanks owned very much
last thing i want from you can you make this login if get storage 3000 do set skull green and if storage 4000 do set skull white and if get storage 5000 do set yellow and if get storage 6000 do set red and if get storage 7000 do set black
sorry for you time this last thing bro thanks
@owned
local config = {
loginMessage = getConfigValue('loginMessage'),
useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}
local function setSkull(cid)
if getCreatureStorage(cid, 2000) >= 1 then
local skull = getCreatureStorage(cid, 2000) then
doCreatureSetSkullType(cid,skull)
end
end
function onLogin(cid)
addEvent(setSkull, 3000, cid)
doChangeSpeed(cid, 750)
doCreatureSay(cid, "Welcome!", 19)
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, "Forever Amulet")
registerCreatureEvent(cid, "onPrepareDeath")
registerCreatureEvent(cid, "ZombieAttack")
registerCreatureEvent(cid, "removeghostspell")
registerCreatureEvent(cid, "removeghostcombat")
registerCreatureEvent(cid, "AutoBuyer")
registerCreatureEvent(cid, "SkullSystem")
registerCreatureEvent(cid, "SkullLevel")
registerCreatureEvent(cid, "BlockEffect")
registerCreatureEvent(cid, "GuildMotd")
registerCreatureEvent(cid, "Idle")
if(config.useFragHandler) then
registerCreatureEvent(cid, "SkullCheck")
end
registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "AdvanceSave")
local storageItem = 11741
if (getPlayerStorageValue(cid, storageItem) > 0) and (getPlayerBlessing(cid, 1) == false) then
doPlayerAddItem(cid, 2173, 1)
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 1)
for i = 1,5 do
doPlayerAddBlessing(cid, i)
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You received free AOL and BLESS.")
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
else
doCreatureSay(cid, "Automaticlly blessed and amulet of loss equiped!", 19)
doSendMagicEffect(getThingPos(cid), CONST_ME_HOLYAREA)
end
return true
end
please can u make it because im new on this work..Code:local config = { loginMessage = getConfigValue('loginMessage'), useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')) } local function setSkull(cid) if getCreatureStorage(cid, 2000) >= 1 then local skull = getCreatureStorage(cid, 2000) then doCreatureSetSkullType(cid,skull) end end function onLogin(cid) addEvent(setSkull, 3000, cid) doChangeSpeed(cid, 750) doCreatureSay(cid, "Welcome!", 19) 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, "Forever Amulet") registerCreatureEvent(cid, "onPrepareDeath") registerCreatureEvent(cid, "ZombieAttack") registerCreatureEvent(cid, "removeghostspell") registerCreatureEvent(cid, "removeghostcombat") registerCreatureEvent(cid, "AutoBuyer") registerCreatureEvent(cid, "SkullSystem") registerCreatureEvent(cid, "SkullLevel") registerCreatureEvent(cid, "BlockEffect") registerCreatureEvent(cid, "GuildMotd") registerCreatureEvent(cid, "Idle") if(config.useFragHandler) then registerCreatureEvent(cid, "SkullCheck") end registerCreatureEvent(cid, "ReportBug") registerCreatureEvent(cid, "AdvanceSave") local storageItem = 11741 if (getPlayerStorageValue(cid, storageItem) > 0) and (getPlayerBlessing(cid, 1) == false) then doPlayerAddItem(cid, 2173, 1) doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 1) for i = 1,5 do doPlayerAddBlessing(cid, i) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You received free AOL and BLESS.") doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) else doCreatureSay(cid, "Automaticlly blessed and amulet of loss equiped!", 19) doSendMagicEffect(getThingPos(cid), CONST_ME_HOLYAREA) end return true end
Use this instead of the 2000-7000 or whatever, just change the storage value of 2000 and based on that storage it'll change the skull.
It's the same thing as you requested except the only thing that's different is you change storage value 2000, from 1-5. If you can't understand that then you need to do some reading.please can u make it because im new on this work..
Or you simply do, if getPlayerLevel(cid) >= 100 then doCreatureSetStorage(cid, 2000, 1) if getPlayerLevel(cid) >= 200 then doCreatureSetStorage(cid, 2000, 2) I'm well aware of what you're trying to accomplish. This is just a much cleaner way to do it, and a lot less code. Like I said, if you don't understand what's going on here, you need to go read a tutorial or something. I've given you everything you need.bro listen to me few seconds only
1-i need that script in creature script that if player level 100 do set storage 1000 if get player level 200 do set storage 2000 if get player level 300 set storage 3000 if get player 400 set storage 400
2-in login.lua
you gave me script that if player have storage 2000 he will get frags after 5 second when login
i need add more storage in login
like if get player storage 1000 create white skull and if storage 2000 create yellow skull and if storage 3000 create green skull and if storage 400 create red skull and all of thoes frags will work like that script u gave me in login frag appear after x seconds but this time more frags not 1 because we add more storages
i hope you understood me and sorry for your time
<event type="advance" name="levelStorage" event="script" value="levelstorage.lua"/>
local config = {
level100 = 100,
storage100 = 1000,
level200 = 200,
storage200 = 2000,
level300 = 300,
storage300 = 3000
}
function onAdvance(cid, skill, oldlevel, newlevel)
if skill ~= SKILL__LEVEL then
return true
end
if newlevel >= config.level100 and getPlayerStorageValue(cid, config.storage100) ~= 1 then
doCreatureSetStorage(cid, config.storage100, 1)
end
if newlevel >= config.level200 and getPlayerStorageValue(cid, config.storage200) ~= 1 then
doCreatureSetStorage(cid, config.storage200, 1)
end
if newlevel >= config.level300 and getPlayerStorageValue(cid, config.storage300) ~= 1 then
doCreatureSetStorage(cid, config.storage300, 1)
end
return true
end
registerCreatureEvent(cid, "levelStorage")
Work's Perfect @Danger IIcreaturescript.xml
Code:<event type="advance" name="levelStorage" event="script" value="levelstorage.lua"/>
creaturescript/scripts/levelstorage.lua
Code:local config = { level100 = 100, storage100 = 1000, level200 = 200, storage200 = 2000, level300 = 300, storage300 = 3000 } function onAdvance(cid, skill, oldlevel, newlevel) if skill ~= SKILL__LEVEL then return true end if newlevel >= config.level100 and getPlayerStorageValue(cid, config.storage100) ~= 1 then doCreatureSetStorage(cid, config.storage100, 1) end if newlevel >= config.level200 and getPlayerStorageValue(cid, config.storage200) ~= 1 then doCreatureSetStorage(cid, config.storage200, 1) end if newlevel >= config.level300 and getPlayerStorageValue(cid, config.storage300) ~= 1 then doCreatureSetStorage(cid, config.storage300, 1) end return true end
login.lua
add:
Code:registerCreatureEvent(cid, "levelStorage")
If I get you right
Not tested btw
local function setSkull(cid)
if getPlayerStorageValue(cid, 2000) == 1 then
doCreatureSetSkullType(cid,1)
end
end
bumb?
@Danger II
local config = {
level100 = 100,
storage100 = 1000,
level200 = 200,
storage200 = 2000,
level300 = 300,
storage300 = 3000,
skullLevel100 = SKULL_YELLOW,
skullLevel200 = SKULL_WHITE,
skullLevel300 = SKULL_RED
}
function onAdvance(cid, skill, oldlevel, newlevel)
if skill ~= SKILL__LEVEL then
return true
end
if newlevel >= config.level100 and getPlayerStorageValue(cid, config.storage100) ~= 1 then
doCreatureSetStorage(cid, config.storage100, 1)
doCreatureSetSkullType(cid, config.skullLevel100)
end
if newlevel >= config.level200 and getPlayerStorageValue(cid, config.storage200) ~= 1 then
doCreatureSetStorage(cid, config.storage200, 1)
doCreatureSetSkullType(cid, config.skullLevel200)
end
if newlevel >= config.level300 and getPlayerStorageValue(cid, config.storage300) ~= 1 then
doCreatureSetStorage(cid, config.storage300, 1)
doCreatureSetSkullType(cid, config.skullLevel300)
end
return true
end
local config = {
loginMessage = getConfigValue('loginMessage'),
useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')),
level100 = 100,
storage100 = 1000,
level200 = 200,
storage200 = 2000,
level300 = 300,
storage300 = 3000,
skullLevel100 = SKULL_YELLOW,
skullLevel200 = SKULL_WHITE,
skullLevel300 = SKULL_RED
}
function onLogin(cid)
doChangeSpeed(cid, 750)
doCreatureSay(cid, "Welcome!", 19)
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
if getPlayerStorageValue(cid, config.level100) > 0 then
doCreatureSetSkullType(cid, config.skullLevel100)
elseif getPlayerStorageValue(cid, config.level200) > 0 then
doCreatureSetSkullType(cid, config.skullLevel200)
elseif getPlayerStorageValue(cid, config.level300) > 0 then
doCreatureSetSkullType(cid, config.skullLevel300)
end
registerCreatureEvent(cid, "Mail")
registerCreatureEvent(cid, "Forever Amulet")
registerCreatureEvent(cid, "onPrepareDeath")
registerCreatureEvent(cid, "ZombieAttack")
registerCreatureEvent(cid, "removeghostspell")
registerCreatureEvent(cid, "removeghostcombat")
registerCreatureEvent(cid, "AutoBuyer")
registerCreatureEvent(cid, "SkullSystem")
registerCreatureEvent(cid, "SkullLevel")
registerCreatureEvent(cid, "BlockEffect")
registerCreatureEvent(cid, "GuildMotd")
registerCreatureEvent(cid, "Idle")
if(config.useFragHandler) then
registerCreatureEvent(cid, "SkullCheck")
end
registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "AdvanceSave")
local storageItem = 11741
if (getPlayerStorageValue(cid, storageItem) > 0) and (getPlayerBlessing(cid, 1) == false) then
doPlayerAddItem(cid, 2173, 1)
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 1)
for i = 1,5 do
doPlayerAddBlessing(cid, i)
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You received free AOL and BLESS.")
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
else
doCreatureSay(cid, "Automaticlly blessed and amulet of loss equiped!", 19)
doSendMagicEffect(getThingPos(cid), CONST_ME_HOLYAREA)
end
return true
end
local function setSkull(cid)
if getPlayerStorageValue(cid, 2000) == 1 then
doCreatureSetSkullType(cid,1)
elseif getPlayerStorageValue(cid, 3000) == 1 then
doCreatureSetSkullType(cid,2)
elseif getPlayerStorageValue(cid, 4000) == 1 then
doCreatureSetSkullType(cid,3)
end
work's but why my login bugged when i added this
local function setSkull(cid)
to this
if getPlayerStorageValue(cid, 2000) == 1 then
doCreatureSetSkullType(cid,1)
elseif getPlayerStorageValue(cid, 3000) == 1 then
doCreatureSetSkullType(cid,2)
elseif getPlayerStorageValue(cid, 4000) == 1 then
doCreatureSetSkullType(cid,3)
end
to be like this
Code:local function setSkull(cid) if getPlayerStorageValue(cid, 2000) == 1 then doCreatureSetSkullType(cid,1) elseif getPlayerStorageValue(cid, 3000) == 1 then doCreatureSetSkullType(cid,2) elseif getPlayerStorageValue(cid, 4000) == 1 then doCreatureSetSkullType(cid,3) end