Postado Abril 15, 2015 10 anos Autor fiz do jeito que vc pediu e ainda nao deu certo: voclogin.lua local vocations = { ["tapion"] = {voc = 501, storage = 210000, outfit = 485}, ["tapion2"] = {voc = 502, storage = 210001, outfit = 477}, ["tapion3"] = {voc = 503, storage = 210002, outfit = 475}, ["tapion4"] = {voc = 504, storage = 210003, outfit = 476}, ["tapion5"] = {voc = 505, storage = 210004, outfit = 478}, ["tapion Gt"] = {voc = 506, storage = 210005, outfit = 479}, ["tapion2 Gt"] = {voc = 507, storage = 210006, outfit = 480}, ["tapion3 Gt"] = {voc = 508, storage = 210007, outfit = 481}, ["tapion4 Gt"] = {voc = 509, storage = 210008, outfit = 482}, ["tapion5 Gt"] = {voc = 510, storage = 210009, outfit = 483}, ["tapion6 gt"] = {voc = 511, storage = 210010, outfit = 421}, ["tapion7 gt"] = {voc = 512, storage = 210011, outfit = 484} } function onLogin(cid) for k, v in pairs(vocations) do local outfit = {lookType = v.outfit , lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookAddons = 0} if getPlayerStorageValue(cid, v.storage) == 1 then doPlayerSetVocation(cid, v.voc) doSetCreatureOutfit(cid, outfit, -1) break end end return true end voclogout.lua: function onLogout(cid) local vocations = { ["tapion"] = {voc = 501, storage = 21001}, ["tapion2"] = {voc = 502, storage = 21002}, ["tapion3"] = {voc = 503, storage = 21003}, ["tapion4"] = {voc = 504, storage = 21004}, ["tapion5"] = {voc = 505, storage = 21005}, ["tapion Gt"] = {voc = 506, storage = 21006}, ["tapion2 Gt"] = {voc = 507, storage = 21007}, ["tapion3 Gt"] = {voc = 508, storage = 21008}, ["tapion4 Gt"] = {voc = 509, storage = 21009}, ["tapion5 Gt"] = {voc = 510, storage = 21010}, ["tapion6 gt"] = {voc = 511, storage = 21011}, ["tapion7 gt"] = {voc = 512, storage = 21012} } for k, v in pairs(vocations) do if getPlayerVocation(cid) == v.voc then setPlayerStorageValue(cid, v.storage, 1) end end return true end
Postado Abril 15, 2015 10 anos fiz do jeito que vc pediu e ainda nao deu certo: voclogin.lua local vocations = { ["tapion"] = {voc = 501, storage = 210000, outfit = 485}, ["tapion2"] = {voc = 502, storage = 210001, outfit = 477}, ["tapion3"] = {voc = 503, storage = 210002, outfit = 475}, ["tapion4"] = {voc = 504, storage = 210003, outfit = 476}, ["tapion5"] = {voc = 505, storage = 210004, outfit = 478}, ["tapion Gt"] = {voc = 506, storage = 210005, outfit = 479}, ["tapion2 Gt"] = {voc = 507, storage = 210006, outfit = 480}, ["tapion3 Gt"] = {voc = 508, storage = 210007, outfit = 481}, ["tapion4 Gt"] = {voc = 509, storage = 210008, outfit = 482}, ["tapion5 Gt"] = {voc = 510, storage = 210009, outfit = 483}, ["tapion6 gt"] = {voc = 511, storage = 210010, outfit = 421}, ["tapion7 gt"] = {voc = 512, storage = 210011, outfit = 484} } function onLogin(cid) for k, v in pairs(vocations) do local outfit = {lookType = v.outfit , lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookAddons = 0} if getPlayerStorageValue(cid, v.storage) == 1 then doPlayerSetVocation(cid, v.voc) doSetCreatureOutfit(cid, outfit, -1) break end end return true end voclogout.lua: function onLogout(cid) local vocations = { ["tapion"] = {voc = 501, storage = 21001}, ["tapion2"] = {voc = 502, storage = 21002}, ["tapion3"] = {voc = 503, storage = 21003}, ["tapion4"] = {voc = 504, storage = 21004}, ["tapion5"] = {voc = 505, storage = 21005}, ["tapion Gt"] = {voc = 506, storage = 21006}, ["tapion2 Gt"] = {voc = 507, storage = 21007}, ["tapion3 Gt"] = {voc = 508, storage = 21008}, ["tapion4 Gt"] = {voc = 509, storage = 21009}, ["tapion5 Gt"] = {voc = 510, storage = 21010}, ["tapion6 gt"] = {voc = 511, storage = 21011}, ["tapion7 gt"] = {voc = 512, storage = 21012} } for k, v in pairs(vocations) do if getPlayerVocation(cid) == v.voc then setPlayerStorageValue(cid, v.storage, 1) end end return true end O valor das storages de onLogin está diferente das storages de onLogout, coloque as storages do onLogin iguais a do onLogout e teste. ➥ Regras | Seções OTServ | Seções BOT
Postado Abril 15, 2015 10 anos Autor continua perdendo a outfit quando loga ver se fiz certo... voclogin.lua local vocations = { ["tapion"] = {voc = 501, storage = 21001, outfit = 485}, ["tapion2"] = {voc = 502, storage = 21002, outfit = 477}, ["tapion3"] = {voc = 503, storage = 21003, outfit = 475}, ["tapion4"] = {voc = 504, storage = 21004, outfit = 476}, ["tapion5"] = {voc = 505, storage = 21005, outfit = 478}, ["tapion Gt"] = {voc = 506, storage = 21006, outfit = 479}, ["tapion2 Gt"] = {voc = 507, storage = 21007, outfit = 480}, ["tapion3 Gt"] = {voc = 508, storage = 21008, outfit = 481}, ["tapion4 Gt"] = {voc = 509, storage = 21009, outfit = 482}, ["tapion5 Gt"] = {voc = 510, storage = 21010, outfit = 483}, ["tapion6 gt"] = {voc = 511, storage = 21011, outfit = 421}, ["tapion7 gt"] = {voc = 512, storage = 21012, outfit = 484} } function onLogin(cid) for k, v in pairs(vocations) do local outfit = {lookType = v.outfit , lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookAddons = 0} if getPlayerStorageValue(cid, v.storage) == 1 then doPlayerSetVocation(cid, v.voc) doSetCreatureOutfit(cid, outfit, -1) break end end return true end voclogout.lua function onLogout(cid) local vocations = { ["tapion"] = {voc = 501, storage = 21001}, ["tapion2"] = {voc = 502, storage = 21002}, ["tapion3"] = {voc = 503, storage = 21003}, ["tapion4"] = {voc = 504, storage = 21004}, ["tapion5"] = {voc = 505, storage = 21005}, ["tapion Gt"] = {voc = 506, storage = 21006}, ["tapion2 Gt"] = {voc = 507, storage = 21007}, ["tapion3 Gt"] = {voc = 508, storage = 21008}, ["tapion4 Gt"] = {voc = 509, storage = 21009}, ["tapion5 Gt"] = {voc = 510, storage = 21010}, ["tapion6 gt"] = {voc = 511, storage = 21011}, ["tapion7 gt"] = {voc = 512, storage = 21012} } for k, v in pairs(vocations) do if getPlayerVocation(cid) == v.voc then setPlayerStorageValue(cid, v.storage, 1) end end return true end Editado Abril 15, 2015 10 anos por jeanchess (veja o histórico de edições)
Postado Abril 15, 2015 10 anos continua perdendo a outfit quando loga ver se fiz certo... voclogin.lua local vocations = { ["tapion"] = {voc = 501, storage = 210001, outfit = 485}, ["tapion2"] = {voc = 502, storage = 210002, outfit = 477}, ["tapion3"] = {voc = 503, storage = 210003, outfit = 475}, ["tapion4"] = {voc = 504, storage = 210004, outfit = 476}, ["tapion5"] = {voc = 505, storage = 210005, outfit = 478}, ["tapion Gt"] = {voc = 506, storage = 210006, outfit = 479}, ["tapion2 Gt"] = {voc = 507, storage = 210007, outfit = 480}, ["tapion3 Gt"] = {voc = 508, storage = 210008, outfit = 481}, ["tapion4 Gt"] = {voc = 509, storage = 210009, outfit = 482}, ["tapion5 Gt"] = {voc = 510, storage = 2100010, outfit = 483}, ["tapion6 gt"] = {voc = 511, storage = 210011, outfit = 421}, ["tapion7 gt"] = {voc = 512, storage = 210012, outfit = 484} } function onLogin(cid) for k, v in pairs(vocations) do local outfit = {lookType = v.outfit , lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookAddons = 0} if getPlayerStorageValue(cid, v.storage) == 1 then doPlayerSetVocation(cid, v.voc) doSetCreatureOutfit(cid, outfit, -1) break end end return true end voclogout.lua function onLogout(cid) local vocations = { ["tapion"] = {voc = 501, storage = 21001}, ["tapion2"] = {voc = 502, storage = 21002}, ["tapion3"] = {voc = 503, storage = 21003}, ["tapion4"] = {voc = 504, storage = 21004}, ["tapion5"] = {voc = 505, storage = 21005}, ["tapion Gt"] = {voc = 506, storage = 21006}, ["tapion2 Gt"] = {voc = 507, storage = 21007}, ["tapion3 Gt"] = {voc = 508, storage = 21008}, ["tapion4 Gt"] = {voc = 509, storage = 21009}, ["tapion5 Gt"] = {voc = 510, storage = 21010}, ["tapion6 gt"] = {voc = 511, storage = 21011}, ["tapion7 gt"] = {voc = 512, storage = 21012} } for k, v in pairs(vocations) do if getPlayerVocation(cid) == v.voc then setPlayerStorageValue(cid, v.storage, 1) end end return true end Storage está errada ainda amigo. ➥ Regras | Seções OTServ | Seções BOT
Postado Abril 15, 2015 10 anos Autor eu arrumei la em cima tinha um 0 amais aii eu tirei. Nao sei se isso interfere na script mas eu notei aqui que apos criar uma conta e ela loga aparece assim: 22:07 Your last visit was on Tue Apr 4 13:06:20 1969. Eu arrumei as storage la em cima viu .. e.e ficou certo?
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.