Jump to content

Mario

Advanced members
  • Content Count

    47
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Mario

  1. i don`t think this would work since they have diffrent database sql ,, but i just remeberd when top2 used to merge 2 servers an make pk bewtween them
  2. 2 servers fight , on a map ( this map gives all players same max/health/pr ete.. ) i think this would be nice
  3. Also there is no expections on my files since I’m using Corsair files o.o
  4. Hello developers here is script was published by @Rinor but I still couldn’t do it .. here is the script —— BossFolder = "script/extension/Boss Knowledge/BossLogs/" print( "* Loading Boss Knowledge" ) Characterinfo_path = "resource\\characterinfo.txt" -- scanned characterinfo path -- ---------------- -- Table Index's -- ---------------- MonsterKnowledge = {} RespawnBoss = {} BossToRecord = {} MonstersToRecord = {} -- ---------------- -- Bosses IDS -- ---------------- MonstersToRecord[1] = 805 MonstersToRecord[2] = 789 MonstersToRecord[3] = 1302 MonstersToRecord[4] = 757 MonstersToRecord[5] = 1265 MonstersToRecord[6] = 1204 MonstersToRecord[7] = 1267 MonstersToRecord[8] = 1244 -- -------------------- -- Bosses Respawn Time -- -------------------- -- MonsterID / Time in seconds RespawnBoss[805] = 10800 RespawnBoss[789] = 86400 RespawnBoss[1302] = 604800 RespawnBoss[757] = 7200 RespawnBoss[1265] = 14400 RespawnBoss[1204] = 14400 RespawnBoss[1267] = 30000 RespawnBoss[1244] = 39600 -- ---------------------------- -- Record tables for monsters -- ---------------------------- for i,v in pairs (MonstersToRecord) do BossToRecord[v] = true end function file_exists(name) local f=io.open(name,"r") if f~=nil then io.close(f ) return true else return false end end -- ------------------------- -- NPC SDK -- ----------------- -- elseif item.func == CheckMonsterSat then -- return CheckMonsterSat( character,item.p1) -- --------------------------- -- CUSTOM SPLIT FUNCTION -- --------------------------- function split(str, delim, maxNb) -- Eliminate bad cases... if string.find(str, delim) == nil then return { str } end if maxNb == nil or maxNb < 1 then maxNb = 0 -- No limit end local result = {} local pat = "(.-)" .. delim .. "()" local nb = 0 local lastPos for part, pos in string.gfind(str, pat) do nb = nb + 1 result[nb] = part lastPos = pos if nb == maxNb then break end end -- Handle the last field if nb ~= maxNb then result[nb + 1] = string.sub(str, lastPos) end return result end -- --------------------------- -- SCAN CHARACTERINFO -- --------------------------- function ScanMonsterKnowledge(file) local fp = assert(io.open (file)) for line in fp:lines() do local position = string.find(line, "[ \t]*//") if (position ~= 1) then local data = split(line,"\t") local c1 = tonumber(data[1]) if c1 ~= nil then MonsterKnowledge[c1] = {Name = {tostring(data[2])},Skills = {data[45]},Drops = {data[47]},Lv = data[61],MaxHP=data[62],MaxSP=data[64],MinAtk=data[66],MaxAtk=data[67],Pr=data[68],Def=data[69],Hr=data[70],Dodge=data[71],Exp=data[91] } end end end end -- ---------------------------- -- Run characterinfo.txt scan -- ---------------------------- ScanMonsterKnowledge(Characterinfo_path) -- --------------------------- -- CHECK STATUS -- --------------------------- function CheckBossRespawn(id) if file_exists(GetResPath(BossFolder..""..id..".txt")) == false then table.save({LastKilled = 0 , RecordRespawn = 0 },GetResPath(BossFolder..""..id..".txt"),"a") end local Boss = table.load(GetResPath(BossFolder..""..id..".txt"),"r") if Boss.RecordRespawn ~= 0 then local RemainingTime = Boss.RecordRespawn - os.time() if RemainingTime <= 1 then Boss.LastKilled = 0 Boss.RecordRespawn = 0 table.save(Boss,GetResPath(BossFolder..""..id..".txt"),"w") end local notice = "Dead" local notice1 = "Remaining Respawn time: "..GetTime(RemainingTime).."!" return notice,notice1 end if Boss.RecordRespawn == 0 then local noticey = "Alive" local noticex = "Boss: "..MonsterKnowledge[id].Name[1].." is still alive!" return noticey,noticex end end -- --------------------------- -- CHECK LAST KILLER -- --------------------------- function LastKillBossName(id) if file_exists(GetResPath(BossFolder..""..id..".txt")) == false then table.save({LastKilled = 0 , RecordRespawn = 0 },GetResPath(BossFolder..""..id..".txt"),"a") end local Boss = table.load(GetResPath(BossFolder..""..id..".txt"),"r") if Boss.LastKilled == 0 then killer = "Nobody" else killer = Boss.LastKilled end return killer end -- ---------------------------- -- NPC Function -- ---------------------------- function bossknowl() Talk(1,"Graves: Hello, I can show you some information about bosses! Pick a boss already and check the information about it.") for i,v in pairs(MonstersToRecord) do Text(1,""..MonsterKnowledge[v].Name[1].."",CheckMonsterSat,v) end end -- --------------------------- -- LOADING STATS -- --------------------------- function CheckMonsterSat(cha,id) local MonsterName = MonsterKnowledge[id].Name[1] local Lv = MonsterKnowledge[id].Lv local Hp = MonsterKnowledge[id].MaxHP local Sp = MonsterKnowledge[id].MaxSP local mAtk = MonsterKnowledge[id].MinAtk local mxAtk = MonsterKnowledge[id].MaxAtk local Pr = MonsterKnowledge[id].Pr local Def = MonsterKnowledge[id].Def local Hr = MonsterKnowledge[id].Hr local Dodge = MonsterKnowledge[id].Dodge local Exp = MonsterKnowledge[id].Exp local Drops = MonsterKnowledge[id].Drops for i,v in pairs(Drops)do end local Stat,Notice = CheckBossRespawn(id) local LastKill = LastKillBossName(id) HelpInfo(cha,0,"Boss: "..MonsterName.." Information_ Lv:"..Lv.." Hp: "..Hp.." Sp: "..Sp.."_ Min Attack: "..mAtk.." Max Attack: "..mxAtk.."_ Physical Resistance: "..Pr.." Defense: "..Def.."_ Hit Rate: "..Hr.." Dodge: "..Dodge.." Exp: "..Exp.."_ Status: "..Stat.." Last Killer: "..LastKill.." _ "..Notice.."")-- _ Drops : "..Dropsx.."") end -- --------------------------- -- GET TIME IN SECOND -- --------------------------- function GetTime(Seconds) if tonumber(Seconds) == 0 then return "00:00:00"; else Hours = string.format("%02.f", math.floor(tonumber(Seconds)/3600)); Mins = string.format("%02.f", math.floor(tonumber(Seconds)/60 - (Hours*60))); Secs = string.format("%02.f", math.floor(tonumber(Seconds) - Hours*3600 - Mins *60)); return Hours..":"..Mins..":"..Secs end end -- --------------------------- -- PLAYER KILL BOSS HOOK -- --------------------------- function RecordKilledBosses(z,dead,atk) local GetKillerName = GetChaDefaultName(atk) local GetBossName = GetChaDefaultName(dead) local GetBossID = GetChaID(dead) local DisplayCurrentTime = ""..os.date("%H")..":"..os.date("%M")..":"..os.date("%S").."" if BossToRecord[GetBossID] == true then local Boss = table.load(GetResPath(BossFolder..""..GetBossID..".txt"),"r") Boss.RecordRespawn = os.time() + RespawnBoss[GetBossID] Boss.LastKilled = GetKillerName table.save(Boss,GetResPath(BossFolder..""..GetBossID..".txt"),"w") Notice("<BOSS>: "..GetBossName.." has been defeated by ["..GetKillerName.."] at ["..DisplayCurrentTime.."]!") end end Hook:AddPostHook("GetExp_PKM",RecordKilledBosses) This one has HP ,SP , DROPS etc.. about bosses Add this script into a .lua file and create a folder " Boss Knowledge " like this: script/extension/Boss Knowledge/ Dont forget to make a folder name " Boss Logs " like this: script/extension/Boss Knowledge/BossLogs/ my question is where should we past this script . Because there is many files that end with .lua I tried to past it on Npc script to see the acctions, but nothin happen im still confused if any one can make easy guide for it or just answer my questions please
  5. Mario

    Boss Respawn NPC

    This one has HP ,SP , DROPS etc.. about bosses Add this script into a .lua file and create a folder " Boss Knowledge " like this: script/extension/Boss Knowledge/ Dont forget to make a folder name " Boss Logs " like this: script/extension/Boss Knowledge/BossLogs/ i don`t understand which lua file , there is many lua files XD and there is no extention file on my files o.o any help ?
  6. how could i compile files files 1.38 since the gemini compiler no works ? any help ?
  7. Hello , PKODEV community If any one could help me on this , how to banned / edit username also if I can register account by using my files , and make this account GM thank you
  8. Offline Mode not offline stall ? also Top2 Cam does not work by right click like other servers ..
  9. Interested in buying this mods , so if anyone is interested in selling, drop me a note on discord - Offline System - Top2 Camera - 60 fbs Fixed wing speed - Mount Source + Files - Portal Timer - Mob drop info - Vip kill system for vip players Note Im using corsair files
×
×
  • Create New...