Postado Dezembro 19, 2014 10 anos @Edit Cara, n deu erro, porem n aconteçeu nada que tem no Script e agr? Bota assim: if getPlayerStorageValue(cid, pk.DB_PK) <= 0 then doPlayerSendCancel(cid, "%#CatcherWindow@"..getItemInfo(pk.ID_Portrait).clientId.."@"..pokeName.."@"..pk.P_Experience.."@"..getPlayerStorageValue(cid, pk.DB_Balls)) setPlayerStorageValue(cid, pk.DB_Balls, "pb=0,gb=0,sb=0,ub=0,") doPlayerAddExp(cid, pk.P_Experience) setPlayerStorageValue(cid, pk.DB_PK, 1) else if getPlayerStorageValue(cid, pk.DB_PK) > 0 then num = 0 doPlayerSendCancel(cid, "%#CatcherWindow@"..getItemInfo(pk.ID_Portrait).clientId.."@"..pokeName.."@" ..num.. "@"..getPlayerStorageValue(cid, pk.DB_Balls)) setPlayerStorageValue(cid, pk.DB_Balls, "pb=0,gb=0,sb=0,ub=0,") setPlayerStorageValue(cid, pk.DB_PK, 1) end return true end Editado Dezembro 19, 2014 10 anos por NoturnoBRN (veja o histórico de edições)
Postado Dezembro 19, 2014 10 anos Bota assim: if getPlayerStorageValue(cid, pk.DB_PK) <= 0 then doPlayerSendCancel(cid, "%#CatcherWindow@"..getItemInfo(pk.ID_Portrait).clientId.."@"..pokeName.."@"..pk.P_Experience.."@"..getPlayerStorageValue(cid, pk.DB_Balls)) setPlayerStorageValue(cid, pk.DB_Balls, "pb=0,gb=0,sb=0,ub=0,") doPlayerAddExp(cid, pk.P_Experience) setPlayerStorageValue(cid, pk.DB_PK, 1) else if getPlayerStorageValue(cid, pk.DB_PK) > 0 then num = 0 doPlayerSendCancel(cid, "%#CatcherWindow@"..getItemInfo(pk.ID_Portrait).clientId.."@"..pokeName.."@" ..num.. "@"..getPlayerStorageValue(cid, pk.DB_Balls)) setPlayerStorageValue(cid, pk.DB_Balls, "pb=0,gb=0,sb=0,ub=0,") setPlayerStorageValue(cid, pk.DB_PK, 1) end return true end Cara eu substitui isso ai por isso aki: if getPlayerStorageValue(cid, pk.DB_PK) <= 0 then doPlayerSendCancel(cid, "%#CatcherWindow@"..getItemInfo(pk.ID_Portrait).clientId.."@"..pokeName.."@"..pk.P_Experience.."@"..getPlayerStorageValue(cid, pk.DB_Balls)) setPlayerStorageValue(cid, pk.DB_Balls, "pb=0,gb=0,sb=0,ub=0,") doPlayerAddExp(cid, pk.P_Experience) setPlayerStorageValue(cid, pk.DB_PK, 1) end e deu esse erro no console: [19/12/2014 09:44:51] [Error - LuaScriptInterface::loadFile] data/lib/CatchWindow_lib.lua:71: 'end' expected (to close 'function' at line 42) near '<eof>' [19/12/2014 09:44:51] [Warning - LuaScriptInterface::initState] Cannot load data/lib/ [19/12/2014 09:44:53] [Error - LuaScriptInterface::loadFile] data/lib/CatchWindow_lib.lua:71: 'end' expected (to close 'function' at line 42) near '<eof>' [19/12/2014 09:44:53] [Warning - LuaScriptInterface::initState] Cannot load data/lib/ [19/12/2014 09:44:53] [Error - LuaScriptInterface::loadFile] cannot open data/movements/scripts/pisolevel.lua: No such file or directory [19/12/2014 09:44:53] [Warning - Event::loadScript] Cannot load script (data/movements/scripts/pisolevel.lua) [19/12/2014 09:44:53] cannot open data/movements/scripts/pisolevel.lua: No such file or directory [19/12/2014 09:44:54] [Error - LuaScriptInterface::loadFile] data/lib/CatchWindow_lib.lua:71: 'end' expected (to close 'function' at line 42) near '<eof>' [19/12/2014 09:44:54] [Warning - LuaScriptInterface::initState] Cannot load data/lib/ [19/12/2014 09:44:55] [Error - LuaScriptInterface::loadFile] data/lib/CatchWindow_lib.lua:71: 'end' expected (to close 'function' at line 42) near '<eof>'[19/12/2014 09:44:55] [Warning - LuaScriptInterface::initState] Cannot load data/lib/ Meus Contatos! Minhas Funções: Skype: TsplayerT Facebook: TakaFukushii YouTube: ADoseDupla Twitter: @_Splayer_ Mapper:▓▓▓▓▓▓▓▓▓▓ 97% Programmer:▓▓▓▓▓▒▒▒▒▒ 45% Scripter:▓▓▓▓▓▓▓▓▓▒ 83% Spriter:▓▓▓▓▓▓▒▒▒▒ 57% Gamemaster:▓▓▓▓▓▓▓▓▓▓ 99% Ot Creator:▓▓▓▓▓▓▓▒▒▒71% Ot Client Maker:▓▓▓▓▓▓▓▒▒▒74%
Postado Dezembro 19, 2014 10 anos Autor Altera o arquivo "CatchWindow_lib.lua" por este aqui. -- V1.3 ->Developed by: Tony Araújo (OrochiElf) ~~ www.OTCodes.com ~~ CW_Pokes = { ["bulbasaur"] = {DB_Balls = 500001, DB_PK = 900001, ID_Portrait = 11989, P_Experience = 5000}, ["ivysaur"] = {DB_Balls = 500002, DB_PK = 900002, ID_Portrait = 11990, P_Experience = 10000}, ["venusaur"] = {DB_Balls = 500003, DB_PK = 900003, ID_Portrait = 11991, P_Experience = 15000}, } CW_Balls = { ["normal"] = "pb", -- PokeBall ["great"] = "gb", -- GreatBall ["super"] = "sb", -- SuperBall ["ultra"] = "ub", -- UltraBall } -------- Functions ---------- function CW_Count(cid, pokeName, ball) local name = nil if tostring(pokeName) then name = pokeName:lower() else name = getCreatureName(pokeName):lower() end local pk = CW_Pokes[name] if pk then if tonumber(getPlayerStorageValue(cid, pk.DB_Balls)) then setPlayerStorageValue(cid, pk.DB_Balls, "pb=0,gb=0,sb=0,ub=0,") end local txt = getPlayerStorageValue(cid, pk.DB_Balls) local change = txt:match(CW_Balls[ball].."=(.-),") local num = tonumber(change) local ret = string.gsub(txt, CW_Balls[ball].."="..num, CW_Balls[ball].."="..(num+1)) return setPlayerStorageValue(cid, pk.DB_Balls, ret) and true end end function CW_Caught(cid, pokeName) local name = nil if tostring(pokeName) then name = pokeName:lower() else name = getCreatureName(pokeName):lower() end local pk = CW_Pokes[name] if pk then if getPlayerStorageValue(cid, pk.DB_PK) <= 0 then doPlayerSendCancel(cid, "%#CatcherWindow@"..getItemInfo(pk.ID_Portrait).clientId.."@"..pokeName.."@"..pk.P_Experience.."@"..getPlayerStorageValue(cid, pk.DB_Balls)) setPlayerStorageValue(cid, pk.DB_Balls, "pb=0,gb=0,sb=0,ub=0,") doPlayerAddExp(cid, pk.P_Experience) setPlayerStorageValue(cid, pk.DB_PK, 1) end doPlayerSendCancel(cid, "%#CatcherWindow@"..getItemInfo(pk.ID_Portrait).clientId.."@"..pokeName.."@0@"..getPlayerStorageValue(cid, pk.DB_Balls)) setPlayerStorageValue(cid, pk.DB_Balls, "pb=0,gb=0,sb=0,ub=0,") end return true end Editado Dezembro 19, 2014 10 anos por Orochi Elf (veja o histórico de edições) Tony Araújo
Postado Dezembro 19, 2014 10 anos Altera o arquivo "CatchWindow_lib.lua" por este aqui. -- V1.3 ->Developed by: Tony Araújo (OrochiElf) ~~ www.OTCodes.com ~~ CW_Pokes = { ["bulbasaur"] = {DB_Balls = 500001, DB_PK = 900001, ID_Portrait = 11989, P_Experience = 5000}, ["ivysaur"] = {DB_Balls = 500002, DB_PK = 900002, ID_Portrait = 11990, P_Experience = 10000}, ["venusaur"] = {DB_Balls = 500003, DB_PK = 900003, ID_Portrait = 11991, P_Experience = 15000}, } CW_Balls = { ["normal"] = "pb", -- PokeBall ["great"] = "gb", -- GreatBall ["super"] = "sb", -- SuperBall ["ultra"] = "ub", -- UltraBall } -------- Functions ---------- function CW_Count(cid, pokeName, ball) local name = nil if tostring(pokeName) then name = pokeName:lower() else name = getCreatureName(pokeName):lower() end local pk = CW_Pokes[name] if pk then if tonumber(getPlayerStorageValue(cid, pk.DB_Balls)) then setPlayerStorageValue(cid, pk.DB_Balls, "pb=0,gb=0,sb=0,ub=0,") end local txt = getPlayerStorageValue(cid, pk.DB_Balls) local change = txt:match(CW_Balls[ball].."=(.-),") local num = tonumber(change) local ret = string.gsub(txt, CW_Balls[ball].."="..num, CW_Balls[ball].."="..(num+1)) return setPlayerStorageValue(cid, pk.DB_Balls, ret) and true end end function CW_Caught(cid, pokeName) local name = nil if tostring(pokeName) then name = pokeName:lower() else name = getCreatureName(pokeName):lower() end local pk = CW_Pokes[name] if pk then if getPlayerStorageValue(cid, pk.DB_PK) <= 0 then doPlayerSendCancel(cid, "%#CatcherWindow@"..getItemInfo(pk.ID_Portrait).clientId.."@"..pokeName.."@"..pk.P_Experience.."@"..getPlayerStorageValue(cid, pk.DB_Balls)) setPlayerStorageValue(cid, pk.DB_Balls, "pb=0,gb=0,sb=0,ub=0,") doPlayerAddExp(cid, pk.P_Experience) setPlayerStorageValue(cid, pk.DB_PK, 1) end doPlayerSendCancel(cid, "%#CatcherWindow@"..getItemInfo(pk.ID_Portrait).clientId.."@"..pokeName.."@0@"..getPlayerStorageValue(cid, pk.DB_Balls)) setPlayerStorageValue(cid, pk.DB_Balls, "pb=0,gb=0,sb=0,ub=0,") end return true end Cara eu substitui mas não nada.... nem erro e nem um sinal que tem o script Por Favor, me ajude até conseguir, please Editado Dezembro 19, 2014 10 anos por TsplayerT (veja o histórico de edições) Meus Contatos! Minhas Funções: Skype: TsplayerT Facebook: TakaFukushii YouTube: ADoseDupla Twitter: @_Splayer_ Mapper:▓▓▓▓▓▓▓▓▓▓ 97% Programmer:▓▓▓▓▓▒▒▒▒▒ 45% Scripter:▓▓▓▓▓▓▓▓▓▒ 83% Spriter:▓▓▓▓▓▓▒▒▒▒ 57% Gamemaster:▓▓▓▓▓▓▓▓▓▓ 99% Ot Creator:▓▓▓▓▓▓▓▒▒▒71% Ot Client Maker:▓▓▓▓▓▓▓▒▒▒74%
Postado Dezembro 19, 2014 10 anos Substitui tudo em CatchWindow_lib.lua Por esse: -- V1.3 ->Developed by: Tony Araújo (OrochiElf) ~~ www.OTCodes.com ~~ CW_Pokes = { ["bulbasaur"] = {DB_Balls = 500001, DB_PK = 900001, ID_Portrait = 11989, P_Experience = 5000}, ["ivysaur"] = {DB_Balls = 500002, DB_PK = 900002, ID_Portrait = 11990, P_Experience = 10000}, ["venusaur"] = {DB_Balls = 500003, DB_PK = 900003, ID_Portrait = 11991, P_Experience = 15000}, } CW_Balls = { ["normal"] = "pb", -- PokeBall ["great"] = "gb", -- GreatBall ["super"] = "sb", -- SuperBall ["ultra"] = "ub", -- UltraBall } -------- Functions ---------- function CW_Count(cid, pokeName, ball) local name = nil if tostring(pokeName) then name = pokeName:lower() else name = getCreatureName(pokeName):lower() end local pk = CW_Pokes[name] if pk then if tonumber(getPlayerStorageValue(cid, pk.DB_Balls)) then setPlayerStorageValue(cid, pk.DB_Balls, "pb=0,gb=0,sb=0,ub=0,") end local txt = getPlayerStorageValue(cid, pk.DB_Balls) local change = txt:match(CW_Balls[ball].."=(.-),") local num = tonumber(change) local ret = string.gsub(txt, CW_Balls[ball].."="..num, CW_Balls[ball].."="..(num+1)) return setPlayerStorageValue(cid, pk.DB_Balls, ret) and true end end function CW_Caught(cid, pokeName) local name = nil if tostring(pokeName) then name = pokeName:lower() else name = getCreatureName(pokeName):lower() end local pk = CW_Pokes[name] if pk then if getPlayerStorageValue(cid, pk.DB_PK) <= 0 then doPlayerSendCancel(cid, "%#CatcherWindow@"..getItemInfo(pk.ID_Portrait).clientId.."@"..pokeName.."@"..pk.P_Experience.."@"..getPlayerStorageValue(cid, pk.DB_Balls)) setPlayerStorageValue(cid, pk.DB_Balls, "pb=0,gb=0,sb=0,ub=0,") doPlayerAddExp(cid, pk.P_Experience) setPlayerStorageValue(cid, pk.DB_PK, 1) else if getPlayerStorageValue(cid, pk.DB_PK) > 0 then num = 0 doPlayerSendCancel(cid, "%#CatcherWindow@"..getItemInfo(pk.ID_Portrait).clientId.."@"..pokeName.."@" ..num.. "@"..getPlayerStorageValue(cid, pk.DB_Balls)) setPlayerStorageValue(cid, pk.DB_Balls, "pb=0,gb=0,sb=0,ub=0,") setPlayerStorageValue(cid, pk.DB_PK, 1) end return true end end return true end
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.