Ximboliex 86 Report post Posted February 14, 2017 On 24/10/2016 at 0:37 PM, Ximboliex said: You Need serialize.lua run in your server WeekFolder = "scripts/addons/weekprize/" function CheckWeek(role) if exists_file(GetResPath(WeekFolder..""..GetCharID(role)..".txt")) == false then table.save({Week = -1,Registered = 0},GetResPath(WeekFolder..""..GetCharID(role)..".txt"),"a") end local DailyPrize = table.load(GetResPath(WeekFolder..""..GetCharID(role)..".txt"),"r") local NowWeek = GetNowWeek() if DailyPrize.Week ~= NowWeek then GiveWeekPrize(role) else HelpInfo(role,0,"You already have received your award today, come back tomorrow to receive again.") return end end function GiveWeekPrize(role) local DailyPrize = table.load(GetResPath(WeekFolder..""..GetCharID(role)..".txt"),"r") local NowWeek = GetNowWeek() if DailyPrize.Registered >= 6 and NowWeek == 0 then GiveItem(role,0,xxxx,5,1) DailyPrize.Week = NowWeek DailyPrize.Registered = -1 table.save(DailyPrize,GetResPath(WeekFolder..""..GetCharID(role)..".txt"),"w") HelpInfo(role,0,"Congratulations, you collected all the daily prizes and obtained 5 Forbidden Keys") else local WeekPrize = {} WeekPrize[0] = xxx WeekPrize[1] = xxx WeekPrize[2] = xxx WeekPrize[3] = xxx WeekPrize[4] = xxx WeekPrize[5] = xxx WeekPrize[6] = xxx GiveItem(role,0,WeekPrize[NowWeek],1,1) DailyPrize.Week = NowWeek DailyPrize.Registered = DailyPrize.Registered + 1 table.save(DailyPrize,GetResPath(WeekFolder..""..GetCharID(role)..".txt"),"w") HelpInfo(role,0,"You received "..GetItemName(WeekPrize[NowWeek]).."! You can obtain another award again tomorrow.") end end ************************************* in NpcSdk: ( under JumpPage ) elseif item.func == CheckWeek then return CheckWeek(character) ************************************ npc function; function blabla() Talk(1,"Test 1 2 3") Text(1,"Daily Prize",CheckWeek) end -By @Yomazu TRY THIS!! Quote Share this post Link to post Share on other sites
blazi10 37 Report post Posted February 15, 2017 5 hours ago, Ximboliex said: TRY THIS!! Where past 1st part? in weekfolder in new . txt? Or Missionsdk? Quote Share this post Link to post Share on other sites
Ximboliex 86 Report post Posted February 15, 2017 All put In missionsdk create a carpet called "weekprize" in the direction of WeekFolder Ex: WeekFolder= "scripts/weekfolder" make a carpet in scripts called weekfolder Quote Share this post Link to post Share on other sites
blazi10 37 Report post Posted February 15, 2017 (edited) 6 hours ago, Ximboliex said: All put In missionsdk create a carpet called "weekprize" in the direction of WeekFolder Ex: WeekFolder= "scripts/weekfolder" make a carpet in scripts called weekfolder eh... not working ... I'm Giving up... All what is Daily, weekly etc is not working now i see... 1.36 files= SH1T! Edited February 15, 2017 by blazi10 Quote Share this post Link to post Share on other sites
Ximboliex 86 Report post Posted February 15, 2017 @blazi10 have you serialize.lua run in your server? Quote Share this post Link to post Share on other sites
blazi10 37 Report post Posted February 15, 2017 yes Quote Share this post Link to post Share on other sites
blazi10 37 Report post Posted February 15, 2017 Just now, Ximboliex said: @blazi10 have you serialize.lua run in your server? can you share me any good files 1.36 (im using wing xp 32bit sql2000, cant more atm.) Maybe you tested any? Quote Share this post Link to post Share on other sites
Ximboliex 86 Report post Posted February 15, 2017 Give me only your scripts carpet and will add 3 scripts... only 3 Quote Share this post Link to post Share on other sites
blazi10 37 Report post Posted February 15, 2017 (edited) Ximboliex i Dont know if it is possible... but you can help me with daily quest? Daily reward is good idea too, but i want to work for something... Can be with serialize... or say here step by step how install This daily ,maybe i did wrong something. Edited February 15, 2017 by blazi10 Quote Share this post Link to post Share on other sites