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

Lua Level Bug ( Emergency )

Hrsha

Member
Joined
May 30, 2010
Messages
450
Reaction score
21
Location
Egypt
Hi guys

i want your help really important

i have opened my ot yday and there is a huge bug
sometimes when players dying they back to lvl 1
and keep dying and back to lvl 1 again i disabled all creaturescripts
and the bug still exist

i use xxx tfs so i though its bug from itself
so i compiled other one but the bug still exist .... any help please ?
 
-- Blessings
-- NOTE: blessingReduction* regards items/containers loss.
-- eachBlessReduction is how much each bless reduces the experience/magic/skills loss.
blessings = false
blessingOnlyPremium = false
blessingReductionBase = 30
blessingReductionDecrement = 5
eachBlessReduction = 8

blessings = false

there is no blessings yet on server
 
try this in server database.

UPDATE `players` SET loss_experience = 100, loss_mana = 100, loss_skills = 100, loss_containers = 100, loss_items = 100;
 
You need to shut down the server first & then execute the command & then start the server again. If that doesnt work then I'm not sure mate :/ I will look more into it tomorrow if you still have this problem, gotta go now! peace
 
here is my settings

deathLostPercent = 10

doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 2)

and in database i can see some players
their loss_experience = 20 and other = 100
sample vocations = 100 too
 
try this in server database.

UPDATE `players` SET loss_experience = 100, loss_mana = 100, loss_skills = 100, loss_containers = 100, loss_items = 100;


thanks mate
solved by this code :D cuz sample vocation had to be the same as players ... rep +

also thanks to Knight God and gotille for fast replay ;)
 
Whenever I create a new character it starts with loss_experience = 10, is there any way to make it so all new characters also start with the value 100.

Because now you have to type UPDATE `players` SET `loss_experience` = 100; UPDATE `players` SET `loss_mana` = 100; UPDATE `players` SET `loss_skills` = 100; UPDATE `players` SET `loss_containers` = 100; UPDATE `players` SET `loss_items` = 100; everytime a new character is created
 
@Nivieuz
Open login.lua (data/creaturescripts/scripts/login.lua) and find:
Code:
    local lastLogin = getPlayerLastLoginSaved(cid)
    if(lastLogin > 0) then
        doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, text)
    else
        doPlayerSendOutfitWindow(cid)
    end
replace it with:
Code:
    local lastLogin = getPlayerLastLoginSaved(cid)
    if(lastLogin > 0) then
        doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, text)
    else
        doPlayerSendOutfitWindow(cid)
        db.executeQuery("UPDATE `players` SET `loss_experience` = 100; UPDATE `players` SET `loss_mana` = 100; UPDATE `players` SET `loss_skills` = 100; UPDATE `players` SET `loss_containers` = 100; UPDATE `players` SET `loss_items` = 100;")
    end
 
@Nivieuz
Open login.lua (data/creaturescripts/scripts/login.lua) and find:
Code:
    local lastLogin = getPlayerLastLoginSaved(cid)
    if(lastLogin > 0) then
        doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, text)
    else
        doPlayerSendOutfitWindow(cid)
    end
replace it with:
Code:
    local lastLogin = getPlayerLastLoginSaved(cid)
    if(lastLogin > 0) then
        doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, text)
    else
        doPlayerSendOutfitWindow(cid)
        db.executeQuery("UPDATE `players` SET `loss_experience` = 100; UPDATE `players` SET `loss_mana` = 100; UPDATE `players` SET `loss_skills` = 100; UPDATE `players` SET `loss_containers` = 100; UPDATE `players` SET `loss_items` = 100;")
    end
Yeah I did something similar and it worked, thanks ^^

Forgot to write here that I solved my problem. I will probably replace my code with yours though since it looks better.
 
Back
Top