felipemuniz2013 19 Postado Dezembro 27, 2013 Share Postado Dezembro 27, 2013 lucas tem como adaptar pro pokemon? Link para o comentário https://xtibia.com/forum/topic/211979-sistema-de-atribui%C3%A7%C3%A3o-de-pontos-by-draky-lucas/page/3/#findComment-1596194 Compartilhar em outros sites More sharing options...
llucas75 3 Postado Fevereiro 5, 2014 Share Postado Fevereiro 5, 2014 Aqui esta dando um erro no login.lua! Quando logo algum char aparece essa mensagem!! [05/02/2014 16:34:45] Pedra has logged in. [05/02/2014 16:34:45] [Error - CreatureScript Interface] [05/02/2014 16:34:45] data/creaturescripts/scripts/login.lua:onLogin [05/02/2014 16:34:45] Description: [05/02/2014 16:34:45] data/creaturescripts/scripts/login.lua:56: attempt to index global 'storagesUtilizadas' (a nil value) [05/02/2014 16:34:45] stack traceback: [05/02/2014 16:34:45] data/creaturescripts/scripts/login.lua:56: in function <data/creaturescripts/scripts/login.lua:5> [05/02/2014 16:34:45] Pedra has logged out. Tibia 8.60!! Meu login Lua VV Sabe resolver??(se resolver é meu rep do dia ) local config = {loginMessage = getConfigValue('loginMessage')}function onLogin(cid)local loss = getConfigValue('deathLostPercent')if(loss ~= nil) thendoPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)endlocal Subwat = getPlayerAccountManager(cid)if(Subwat == MANAGER_NONE) thenlocal lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessageif(lastLogin > 0) thendoPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)str = "Seu ultimo login foi " .. os.date("%a %b %d %X %Y", lastLogin) .. "."elsestr = str .. "The BEST"doPlayerSendOutfitWindow(cid)enddoPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)elseif(Subwat == MANAGER_NAMELOCK) thendoPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appearss that your character has been namelocked, what would you like as your new name?")elseif(Subwat == MANAGER_ACCOUNT) thendoPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Ola, digite 'account' acessar sua conta ou digite 'cancel'.")elsedoPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Ola, digite 'account' Para criar uma conta no servidor ou 'recover' Para recuperar conta perdida.")endif(not isPlayerGhost(cid)) thendoSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)enddoPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Bem vindo!")registerCreatureEvent(cid, "Mail")if getPlayerLevel(cid) < 717217 thenregisterCreatureEvent(cid, "AdvanceTeleport")endregisterCreatureEvent(cid, "GuildMotd")registerCreatureEvent(cid, "Idle")registerCreatureEvent(cid, "DeathBroadcast")registerCreatureEvent(cid, "addons")registerCreatureEvent(cid, "onPrepareDeath")registerCreatureEvent(cid, "magebomb")registerCreatureEvent(cid, "SkullCheck")registerCreatureEvent(cid, "SkullAmulet")registerCreatureEvent(cid, "killitem")registerCreatureEvent(cid, "zombieevent")registerCreatureEvent(cid, "huntdeath")registerCreatureEvent(cid, "loguthunt")registerCreatureEvent(cid, "ReportBug")registerCreatureEvent(cid, "PointSystem")registerCreatureEvent(cid, "AmoebaTask")-- attribute system by draky lucasif getPlayerStorageValue(cid,storagesUtilizadas.storageLevelJaPego) == -1 thenfor i = storagesUtilizadas.storageLevelJaPego,storagesUtilizadas.storageMana dosetPlayerStorageValue(cid,i,0)endendregisterCreatureEvent(cid,"avancarGanharPontos")--return trueend Link para o comentário https://xtibia.com/forum/topic/211979-sistema-de-atribui%C3%A7%C3%A3o-de-pontos-by-draky-lucas/page/3/#findComment-1611772 Compartilhar em outros sites More sharing options...
Incur 30 Postado Fevereiro 5, 2014 Share Postado Fevereiro 5, 2014 Adicione isso: local storagesUtilizadas = { storageLevelJaPego = 12448, storagePontos = 12449, storageFistPoints = 12450, storageClubPoints = 12451, storageSwordPoints = 12452, storageAxePoints = 12453, storageDistancePoints = 12454, storageShieldingPoints = 12455, storageMagicPoints = 12456, storageVitalityPoints = 12457, storageManaPoints = 12458, storageFist = 12459, storageClub = 12460, storageSword = 12461, storageAxe = 12462, storageDistance = 12463, storageShielding = 12464, storageMagic = 12465, storageVitality = 12466, storageMana = 12467, } no começo do arquivo.. antes do "local config = { loginMessage = getConfigValue('loginMessage') }" Link para o comentário https://xtibia.com/forum/topic/211979-sistema-de-atribui%C3%A7%C3%A3o-de-pontos-by-draky-lucas/page/3/#findComment-1611778 Compartilhar em outros sites More sharing options...
llucas75 3 Postado Fevereiro 5, 2014 Share Postado Fevereiro 5, 2014 (editado) Agora está logando, só que quando eu digo /atributos age como se não fosse um comando e da essa mensagem no console do server : [05/02/2014 18:12:47] [Error - TalkAction Interface] [05/02/2014 18:12:47] data/talkactions/scripts/drakylucas/atributos.lua:onSay [05/02/2014 18:12:47] Description: [05/02/2014 18:12:47] data/talkactions/scripts/drakylucas/atributos.lua:8: attempt to call global 'getPontos' (a nil value) [05/02/2014 18:12:47] stack traceback: [05/02/2014 18:12:47] data/talkactions/scripts/drakylucas/atributos.lua:8: in function <data/talkactions/scripts/drakylucas/atributos.lua:1> Meu atributos.lua do talkactions VV function onSay(cid, words, param) local param = param:lower() local op = string.explode(param, ",") local text = "" if param == nil or (op[1] ~= "reset" and op[1] ~= "add" and op[1] ~= "build") then text = text .. "Pontos: " .. getPontos(cid) .. "\nSua vocação ganha: " .. vocationPoints[getPlayerVocation(cid)] .. " pontos por level" .. "\n\nNome - Precisa - Ganha -- Para sua voc" for i, x in pairs(skills) do if isInArray(x.vocationNeeded,getPlayerVocation(cid)) then text = text .. "\n"..i.. " - " ..x.neededPoints.. " - " .. x.quantoGanha .. "" end end text = text .. "\n\nExemplos:\n/atributos add,mana\n/atributos add,vitality" text = text .. "\nVoce pode resetar seus atributos: Digite /atributos reset (custa " .. resetPreco.."k)\nVeja sua build: /atributos build" return doShowTextDialog(cid, 1976, text) end if op[1] == "reset" then if getCreatureCondition(cid, CONDITION_INFIGHT) == true then return doPlayerSendCancel(cid,"Voce tem que estar sem battle para resetar seus atributos") end if getPlayerMoney(cid) < (resetPreco*1000) then return doPlayerSendCancel(cid,"Voce nao tem dinheiro suficiente para resetar seus atributos!") end doPlayerRemoveMoney(cid, resetPreco*1000) return resetPontos(cid) end if op[1] == "add" then if skills[op[2]] == nil then return doPlayerSendTextMessage(cid,19,"atributo nao existente. Verifique sua ortografia!") end doPlayerSendTextMessage(cid,19,addSkill(cid,skills[op[2]].id,skills[op[2]].neededPoints,skills[op[2]].quantoGanha,skills[op[2]].vocationNeeded)) return true end if op[1] == "build" then local atuais = { hp = (getPlayerStorageValue(cid,storagesUtilizadas.storageVitality)), mp = (getPlayerStorageValue(cid,storagesUtilizadas.storageMana)), magic = (getPlayerStorageValue(cid,storagesUtilizadas.storageMagic)), fist = (getPlayerStorageValue(cid,storagesUtilizadas.storageFist)), club = (getPlayerStorageValue(cid,storagesUtilizadas.storageClub)), sword = (getPlayerStorageValue(cid,storagesUtilizadas.storageSword)), axe = (getPlayerStorageValue(cid,storagesUtilizadas.storageAxe)), dist = (getPlayerStorageValue(cid,storagesUtilizadas.storageDistance)), shield = (getPlayerStorageValue(cid,storagesUtilizadas.storageShielding)), } text = "Quantidades de atributos ja recebidos: \n" .. "Vitality: "..atuais.hp.." \n" .. "Mana: "..atuais.mp.." \n" .. "Magic: "..atuais.magic.." \n" .. "Fist: "..atuais.fist.." \n" .. "Club: "..atuais.club.." \n" .. "Sword: "..atuais.sword.." \n" .. "Axe: "..atuais.axe.." \n" .. "Distance: "..atuais.dist.." \n" .. "Shielding: "..atuais.shield.." \n" .. "Pontos restantes: " .. getPontos(cid) doShowTextDialog(cid, 1976, text) return true end return true end Resolvidooooo:(instalação mal feita, nao passei direito arquivo atributos.lua da lib pra lib ) SO 1 bug quando evoluo ml upa so ate 99% Editado Fevereiro 7, 2014 por llucas75 Link para o comentário https://xtibia.com/forum/topic/211979-sistema-de-atribui%C3%A7%C3%A3o-de-pontos-by-draky-lucas/page/3/#findComment-1611793 Compartilhar em outros sites More sharing options...
Posts Recomendados