ThiagoADM 2 Postado Outubro 15, 2011 Share Postado Outubro 15, 2011 (editado) Boa Noite XTibianos! Tudo bom com vocês? Então galera, em meu servidor de Tibia, o meu sistema de blessings não está funcionando perfeitamente. Para um player comprar a bless é necessário utilizar o comando !bless. Ao utilizar o comando, o player adquire a bless. Bom, até aqui está tudo certo. Agora vem o grande problema! Quando um player que possuí a bless morre,ele não perde os itens, porém, volta ao level 1! Segue abaixo o meu script bless.lua que estou utilizando. local bless = {1, 2, 3, 4, 5}local cost = 50000 function onSay(cid, words, param) for i = 1, table.maxn(bless) do if(getPlayerBlessing(cid, bless)) then doPlayerSendCancel(cid, "You have already all blessings.") return TRUE end end if(doPlayerRemoveMoney(cid, cost) == TRUE) then for i = 1, table.maxn(bless) do doPlayerAddBlessing(cid, bless) end doCreatureSay(cid, "You are now blessed by the GOD Apsivaflines!" ,19) doSendMagicEffect(getPlayerPosition(cid), 49) else doPlayerSendCancel(cid, "You don\'t have enough money.") end return TRUE end Se possível, alguém poderia me informar qual seria o possível erro com o meu script? E quanto ao meu login.lua, tenho que verificar ou adicionar alguma coisa? Segue abaixo o meu login.lua: local config = { loginMessage = getConfigValue('loginMessage') } 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, "SkullCheck") registerCreatureEvent(cid, "ReportBug") registerCreatureEvent(cid, "repKill") registerCreatureEvent(cid, "repLook") registerCreatureEvent(cid, "repMonster") registerCreatureEvent(cid, "ArenaKill") -- if he did not make full arena 1 he must start from zero if getPlayerStorageValue(cid, 42309) < 1 then for i = 42300, 42309 do setPlayerStorageValue(cid, i, 0) end end -- if he did not make full arena 2 he must start from zero if getPlayerStorageValue(cid, 42319) < 1 then for i = 42310, 42319 do setPlayerStorageValue(cid, i, 0) end end -- if he did not make full arena 3 he must start from zero if getPlayerStorageValue(cid, 42329) < 1 then for i = 42320, 42329 do setPlayerStorageValue(cid, i, 0) end end if getPlayerStorageValue(cid, 42355) == -1 then setPlayerStorageValue(cid, 42355, 0) -- did not arena level end setPlayerStorageValue(cid, 42350, 0) -- time to kick 0 setPlayerStorageValue(cid, 42352, 0) -- is not in arena if getPlayerStorageValue(cid, 13540) > os.time() then if getPlayerStorageValue(cid, 122131) == 1 and isInArray({ 5, 6, 7, 8 }, getPlayerVocation(cid)) then doPlayerSetVocation(cid, getPlayerVocation(cid)+4) end else if isInArray({ 9, 10, 11, 12 }, getPlayerVocation(cid)) then doPlayerSetVocation(cid, getPlayerVocation(cid)-4) end end registerCreatureEvent(cid, "bless") return true end Obrigado. OBS: Uso o servidor Alissow OTS 4.11 Uso a versão do Tibia 8.60 Editado Outubro 16, 2011 por thiagoxtk Link para o comentário Compartilhar em outros sites More sharing options...
angeldoido 37 Postado Outubro 15, 2011 Share Postado Outubro 15, 2011 erro no seu ot pq o script ai ta perfeito '-' Link para o comentário Compartilhar em outros sites More sharing options...
ThiagoADM 2 Postado Outubro 15, 2011 Autor Share Postado Outubro 15, 2011 erro no seu ot pq o script ai ta perfeito '-' Estou pedindo ajuda para solucionar o problema. Se o erro não está no script, deve estar em outro lugar. Mas onde? Link para o comentário Compartilhar em outros sites More sharing options...
SkyDangerous 395 Postado Outubro 15, 2011 Share Postado Outubro 15, 2011 Sabe que nunca usei bless eu meus servidores dá uma olhada no config.lua Se está igual a esse. blessingOnlyPremium = true blessingReductionBase = 30 blessingReductionDecreament = 5 eachBlessReduction = 8 Link para o comentário Compartilhar em outros sites More sharing options...
ThiagoADM 2 Postado Outubro 15, 2011 Autor Share Postado Outubro 15, 2011 (editado) Sabe que nunca usei bless eu meus servidores dá uma olhada no config.lua Se está igual a esse. blessingOnlyPremium = true blessingReductionBase = 30 blessingReductionDecreament = 5 eachBlessReduction = 8 Está igualzinho ao teu! blessingOnlyPremium = true blessingReductionBase = 30 blessingReductionDecreament = 5 eachBlessReduction = 8 O que eu devo fazer então? Editado Outubro 16, 2011 por thiagoxtk Link para o comentário Compartilhar em outros sites More sharing options...
Jefferson19921992 8 Postado Janeiro 26, 2012 Share Postado Janeiro 26, 2012 Olá caro amigo... Sou novo na area, sei que este topico tem mais de 30 dias, mas quero ajudar. Por gentileza poderia mostrar seu playerdeath no creaturescripts e o creaturescript.xml? Obg. Link para o comentário Compartilhar em outros sites More sharing options...
Posts Recomendados