Jump to content

Backpack

Advanced members
  • Content Count

    20
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Backpack

  1. Some parts of the website were coded hastily. All queries are parameterized, but double-checking everything against SQL injections (provided you want to use that crappy website) is something I'd strongly suggest to do.
  2. Ppft, my bad. I edited it.
  3. Because DPO has met a sudden and quick end, we decided to share the server files with everyone. I've received some help from a friend of mine, yagura, and since he's no more around us, I will assume that he eventually would've wanted to have these shared to help other people too. He fixed a lot of problems in them - not all, mind you, a lot of bugs still popped up - but I do suppose it would've made him happy to know that maybe some people will be helped by the fixes that are here. MEGA.NZ Link: https://mega.nz/file/pB5CzAwZ#p87jyRR17H1xiT6pIVCwgaDd1vcqZoiFr4qox2J3WIE Note: Some parts of the website were coded hastily. All queries are parameterized, but double-checking everything against SQL injections (provided you want to use that crappy website) is something I'd strongly suggest to do. The client has some features removed: Removed all new guild functionality (bank, name, stats, quests) Removed mount & cloak slots from inventory The features that the client has added: Level near character name Apparel hats now are displayed even if you are not wearing any helmet SP bar under character Character waves at you in Character Select (another thing that yagura was playing with and we just thought it would be funny if they waved) Server files features: [There are fixes such as random dc, item switch flood which I've noticed a lot of people got fixed but none of them wanted to share.]
  4. The website is running on the same host as server? Have you tried putting 127.0.0.1 instead of the direct IP?
  5. That's awesome! I've worked a bit with yagura, he really knows his stuff, and he's pretty darn good at it. You guys should go ahead and get this man asap.
  6. Oops, meant to edit and pressed Quote instead. Sorry for double post
  7. Found the fix. In CO files, you equip the pet. In server's functions.lua, the system checks if the pet is on the 2nd slot in the inventory So here's the fix: Go to resources > scripts > calculate > functions.lua Find this line: (it's in function CheckHaveElf ( role )) local Item = GetChaItem ( role , 2 , 1 ) As you can see, it checks the fairy on the 2nd slot of the 1st row. Now we're going to make it check if it is equipped in the fairy slot. Replace it with this: local Item = GetEquipItemP(role ,16) This checks if you have any item equipped in the 16th slot (the Fairy slot, if you will) on your inventory. Save it, and reload all your .lua files (or restart server) and it should work!
  8. Nvm, fixed this. It wasn't a bug, it was just my brain being stupid.
  9. I can't figure out where to add that code. If I add it at the end of the file, I get this error in gameserver Can someone be a bit more specific? Nvm, fixed it.
  10. I'll post here more things as I find them to keep track, and if I find a fix on the forum I'll remvoe them. Is it ok? Bug Title: Names do not appear correctly in chat Bug Description: Sometimes, names do not appear at all in chat. I can't see what others write in other chats except normal (world, guild, etc.) How to replicate: Have someone write in World chat, whisper, or guild Status: OPEN Author (whoever that fixes it):
  11. Bug Title: Tickets do not always work Bug Description: Sometimes I can use Tickets (to Argent, Icicle, Shaitan) to teleport. Other times, nothing happens and item is not consumed How to replicate: Double click one of the tickets. Most of the time nothing happens Status: OPEN Author (whoever that fixes it):
  12. Bug Title: Cannot Create Guild Bug Description: Cannot create a guild. No error pops up and nothing happens How to replicate: Have stone of oath, go to icicle to create a guild, nothing happens Status: OPEN Author (whoever that fixes it): Edit: Nvm, I was too dumb to figure out you need 10m.
  13. Bug Title: Blank texture upon character switch after trying item mall Bug Description: When you wear armor, try an item mall apparel on you,switch your character/relog, the texture of the item is white How to replicate: Equip an armor (tested with Newbie Vest), try an item mall apparel then relog; it will have white texture (doesnt work all the time, only sometimes) Status: OPEN Author (whoever that fixes it):
  14. How can I exactly add items in the item mall?
  15. MANAGED TO FIX IT Here's how: Create another DB user with the pwd Y87dc#$98, set it to have all permisions over tradedb Run InfoPasswd AS ADMINISTRATOR then encrypt Y87dc#$98, it will work Put that in tradeserver cfg, and your new username from DB Put this into your gameserver's CFGs: info = 127.0.0.1, 1985, Y87dc#$98, 1 And it should work.
  16. Hello, So I downloaded Wolfen's IGS, and I an issue: I tried the thing with getting the tradeserver password from gameserver, the moliyo#TradeServer@bird&man one, I did encrypt it using InfoPasswd, put that into the database, and did not work. Here is what I have in GameServer.cfg and here is my TradeServer config.cfg And I also put that in the TradeDB Safety table The pwd is the encrypted version of moliyo#TradeServer@bird&man What else can I do to make it work? I tried encrypting Y87dc#$98 using the InfoPasswd tool but it does not work; it doesn't show anything.
  17. Hello, As the title says, when I try to add skills to pet obtained from Marriage, the skill get funky; some of them don't show, and if you try to put the same skill twice, it says that the Fairy already knows the skill. Any idea or workaround to fix this?
  18. Garner ctrl.lua --此文件中,凡是可能被多次执行的函数,函数名都要加上地图名前缀 function config(map) MapCanSavePos(map, 1) -- 1 = Allow players to save respaw // 0 = Do not allow players to save respaw MapCanPK(map, 1) -- 1 = Turns on PK Mouse Sword Icon // 0 = Turns off PK Mouse Sword Icon ( Need to press CTRL key ) SingleMapCopyPlyNum(map, 300) -- 300 Players are allowed to enter the map MapCanTeam( map, 1 ) -- 1 = Allow players to create party // 0 = Do not allow players to create party MapType( map , 1 ) -- 0 = PvP Off // 1 = PvP Off // 2 = PvP On ( Not allowed to kill Guild and Party Mates ) // 3 = PvP On ( Allowed to kill any player but not Party Mates ) // 4 = PvP On ( Not allowed to kill Guild and Party Mates ) MapCanStall(map , 1) -- 1 = Allow players to set stall // 0 = Do not allow players to set stall end function get_map_entry_pos_garner() --设置入口的位置的坐标(坐标(米)) local POS_X=0 local POS_Y=0 return POS_X , POS_Y end function init_entry(map) end function after_enter_garner( role , map_copy ) end function before_leave_garner( role ) end function map_copy_first_run_garner( map_copy ) end function map_copy_run_garner( map_copy ) end --每5秒执行一次的 function map_run_garner( map ) local nowTime = GetNowTimeW() if math.fmod(nowTime,1200)<5 then ZTLBalance() end if math.fmod(nowTime,86400)<5 then clear() end if math.fmod(nowTime,1200)<5 then GARNER_CTRL_LUA_000001 = GetResString("GARNER_CTRL_LUA_000001") Notice (GARNER_CTRL_LUA_000001) end -------------------------------------zhangliang--------------------抓捕王小虎---------- local now_hour= tonumber(os.date("%H")) -------------时 local now_miniute= tonumber(os.date("%M")) -------------分 local CheckDateNum = now_hour*100 +now_miniute local NowSecond = tonumber(os.date("%S")) -------秒 if now_hour == 0 and now_miniute == 0 and NowSecond < 6 then Clear_Event_Record_By_Event_Name( "Capture the fearsome Wang Xiao Hu" ) end --------------------------------------------------圣诞BOSS------------------------------- -- local now_miniute= os.date("%M") -------------分 -- local now_scend= os.date("%S") -------------秒 -- now_miniute= tonumber(now_miniute) -- now_scend= tonumber(now_scend) -------------秒 -- if now_miniute == 2 and now_scend>0 and now_scend <6 then -- SDBOSS = CreateCha(1333, 207300, 276500, 90, 60)-----60.单位.秒 -- SetChaLifeTime(SDBOSS,3600000)--存活时间1小时 单位.毫秒 -- SDBOSS1 = CreateCha(1334, 207500, 276500, 90, 60)-----60.单位.秒 -- SetChaLifeTime(SDBOSS1,3600000)--存活时间1小时 单位.毫秒 -- SDBOSS2 = CreateCha(1334, 207700, 276500, 90, 60)-----60.单位.秒 -- SetChaLifeTime(SDBOSS2,3600000)--存活时间1小时 单位.毫秒 -- SDBOSS3 = CreateCha(1334, 208000, 276500, 90, 60)-----60.单位.秒 -- SetChaLifeTime(SDBOSS3,3600000)--存活时间1小时 单位.毫秒 -- SDBOSS4 = CreateCha(1334, 208200, 276500, 90, 60)-----60.单位.秒 -- SetChaLifeTime(SDBOSS4,3600000)--存活时间1小时 单位.毫秒 -- SDBOSS5 = CreateCha(1334, 208500, 276500, 90, 60)-----60.单位.秒 -- SetChaLifeTime(SDBOSS5,3600000)--存活时间1小时 单位.毫秒 -- ScrollNotice ( "<<Christmas Event-Siege of Evil Claus>>announcement: Evil Claus and his pet reindeer are committing atrocities near Argent City(2073,2765).Hurry now to apprenhend him~~~",1) -- end -- Refresh_Round() ----记录当前系统时间 --[[彩票系统下线 local issue = GetLotteryIssue() if issue~=nil then local Now_Week = os.date("%w") local Now_WeekNum = tonumber(Now_Week) local Now_Time = os.date("%H") local NowTimeNum = tonumber(Now_Time) local now_Day= os.date("%d") local NowDayNum = tonumber(now_Day) local Now_Minite = os.date("%M") local NowMiniteNum = tonumber(Now_Minite) local Now_Scend= os.date("%S") -----秒 local Now_ScendNum = tonumber(Now_Scend) local CheckTimeNum=NowTimeNum*3600+NowMiniteNum*60+Now_ScendNum local time_mod=math.fmod(CheckTimeNum,5) TimeNum = TimeNum+5 local i = 0 local no1 = 0 local no2 = 0 local no3 = 0 local no4 = 0 local no5 = 0 local no6 = 0 local no0 = 0 if Now_WeekNum == 1 and NowTimeNum == 12 and NowMiniteNum == 55 and Now_ScendNum >= 50 and Now_ScendNum <55 then GARNER_CTRL_LUA_000002 = GetResString("GARNER_CTRL_LUA_000002") Notice (GARNER_CTRL_LUA_000002) end if Now_WeekNum == 3 and NowTimeNum == 17 and NowMiniteNum == 55 and Now_ScendNum >= 50 and Now_ScendNum <55 then GARNER_CTRL_LUA_000003 = GetResString("GARNER_CTRL_LUA_000003") Notice (GARNER_CTRL_LUA_000003) end if Now_WeekNum == 5 and NowTimeNum == 12 and NowMiniteNum == 55 and Now_ScendNum >= 50 and Now_ScendNum <55 then GARNER_CTRL_LUA_000004 = GetResString("GARNER_CTRL_LUA_000004") Notice (GARNER_CTRL_LUA_000004) end if Now_WeekNum == 6 and NowTimeNum == 19 and NowMiniteNum == 55 and Now_ScendNum >= 50 and Now_ScendNum <55 and i < 1 then -----触发产生期号 GARNER_CTRL_LUA_000005 = GetResString("GARNER_CTRL_LUA_000005") Notice (GARNER_CTRL_LUA_000005) local winItemno = CalWinLottery(issue, 2) end if GetWinLotteryItemnoX(issue-1,1)~=nil then if CheckTimeNum>=72000 and CheckTimeNum<72005 then ---每十五分钟广播一位中奖号码,从个位开始 no1 = GetWinLotteryItemnoX(issue-1,1) GARNER_CTRL_LUA_000006 = GetResString("GARNER_CTRL_LUA_000006") Notice (GARNER_CTRL_LUA_000006) GARNER_CTRL_LUA_000007 = GetResString("GARNER_CTRL_LUA_000007") Notice(GARNER_CTRL_LUA_000007..no1) end if CheckTimeNum>=72900 and CheckTimeNum<72905 then --十位 no2 = GetWinLotteryItemnoX(issue-1,2) GARNER_CTRL_LUA_000008 = GetResString("GARNER_CTRL_LUA_000008") Notice(GARNER_CTRL_LUA_000008..no2) end if CheckTimeNum>=73800 and CheckTimeNum<73805 then --百位 no3 = GetWinLotteryItemnoX(issue-1,3) GARNER_CTRL_LUA_000009 = GetResString("GARNER_CTRL_LUA_000009") Notice(GARNER_CTRL_LUA_000009..no3) end if CheckTimeNum>=74700 and CheckTimeNum<74705 then --千位 no4 = GetWinLotteryItemnoX(issue-1,4) GARNER_CTRL_LUA_000010 = GetResString("GARNER_CTRL_LUA_000010") Notice(GARNER_CTRL_LUA_000010..no4) end if CheckTimeNum>=75600 and CheckTimeNum<75605 then --万位 no5 = GetWinLotteryItemnoX(issue-1,5) GARNER_CTRL_LUA_000011 = GetResString("GARNER_CTRL_LUA_000011") Notice(GARNER_CTRL_LUA_000011..no5) end if CheckTimeNum>=76500 and CheckTimeNum<76505 then --十万位 no6 = GetWinLotteryItemnoX(issue-1,6) GARNER_CTRL_LUA_000012 = GetResString("GARNER_CTRL_LUA_000012") Notice(GARNER_CTRL_LUA_000012..no6) end if CheckTimeNum>=77400 and CheckTimeNum<77405 then --十万位 local issue = GetLotteryIssue() local NOWqihao = issue - 1 GARNER_CTRL_LUA_000013 = GetResString("GARNER_CTRL_LUA_000013") Notice(GARNER_CTRL_LUA_000013..issue) no0 = GetWinLotteryItemnoX(issue-1,0) GARNER_CTRL_LUA_000014 = GetResString("GARNER_CTRL_LUA_000014") Notice(GARNER_CTRL_LUA_000014..no0) end if CheckTimeNum>=77700 and CheckTimeNum<77705 then --十万位 local issue = GetLotteryIssue() local NOWqihao = issue - 1 GARNER_CTRL_LUA_000013 = GetResString("GARNER_CTRL_LUA_000013") Notice(GARNER_CTRL_LUA_000013..issue) no0 = GetWinLotteryItemnoX(issue-1,0) GARNER_CTRL_LUA_000014 = GetResString("GARNER_CTRL_LUA_000014") Notice(GARNER_CTRL_LUA_000014..no0) end if CheckTimeNum>=78000 and CheckTimeNum<78005 then --十万位 local issue = GetLotteryIssue() local NOWqihao = issue - 1 GARNER_CTRL_LUA_000013 = GetResString("GARNER_CTRL_LUA_000013") Notice(GARNER_CTRL_LUA_000013..issue) no0 = GetWinLotteryItemnoX(issue-1,0) GARNER_CTRL_LUA_000014 = GetResString("GARNER_CTRL_LUA_000014") Notice(GARNER_CTRL_LUA_000014..no0) end if CheckTimeNum>=78300 and CheckTimeNum<78305 then --十万位 local issue = GetLotteryIssue() local NOWqihao = issue - 1 GARNER_CTRL_LUA_000013 = GetResString("GARNER_CTRL_LUA_000013") Notice(GARNER_CTRL_LUA_000013..issue) no0 = GetWinLotteryItemnoX(issue-1,0) GARNER_CTRL_LUA_000014 = GetResString("GARNER_CTRL_LUA_000014") Notice(GARNER_CTRL_LUA_000014..no0) end TimeNum=0 end end ]] ----------------竞技场 -- local now_Day= os.date("%d") -- local NowDayNum = tonumber(now_Day) -- local i = 8 -- for i = 8 , 31 , 3 do -- if NowDayNum == i+2 and NowTimeNum == 23 then -- SetMaxBallotTeamRelive() -- UpdateState() -- return LUA_TRUE -- else -- return LUA_FALSE -- end -- end end --地图关闭时执行 function map_copy_close_garner ( map_copy ) end --地图开关判断—————————————————————————————————————————— function can_open_entry_garner( map ) end function map_copy_run_special_garner(map) end TeamPK ctrl.lua --此文件中,凡是可能被多次执行的函数,函数名都要加上地图名前缀 function config(map) MapCanSavePos(map, 0) --设置地图是否保存角色位置(地图,坐标,方向),此设置影响该地图的所有副本 MapCanPK(map, 1) --设置地图是否可以PK,此设置影响该地图的所有副本 --MapCopyNum(map, 800) --设置地图的副本数目,如果不调用该语句,则使用默认值1 MapCanTeam( map, 1 ) MapType( map , 3 ) MapCopyStartType( map , 3 ) end function init_entry(map) SetMapEntryMapName(map, "garner") --设置入口的位置(地图名,坐标(米)) SetMapEntryTime(map, "2005/8/30/13/0", "0/0/0", "0/0/0", "0/0/0") --设置入口的时间,地图对象,首次开启时间(年/月/日/时/分),以后再次开启的间隔(日/时/分,全0表示只有首次开启),每次开启到入口消失的间隔(日/时/分,全0表示永不消失),每次开启到地图关闭的间隔(日/时/分,全0表示永不关闭)。。 end function map_copy_run_teampk(map_copy) -- local Start_time = GetMapCopyParam2(map_copy , 7) -- if Start_time> 0 then -- Start_time = Start_time -1 -- SetMapCopyParam2(map_copy, 7,Start_time) -- return -- end -- if Start_time == 0 then -- end local ply_num = GetMapCopyPlayerNum(map_copy) if ply_num == 0 then CloseMapCopy ("teampk", GetMapCopyID2(map_copy)) end local Map_Start = GetMapCopyParam2(map_copy, 8) local Map_Start = Map_Start + 1 SetMapCopyParam2(map_copy, 8, Map_Start) local log_count = 0 local PKMap_HasPlayers = 0 local Team1_live = 0 local Team2_live = 0 local Team1_Num = GetMapCopyParam2(map_copy, 3) local Team2_Num = GetMapCopyParam2(map_copy, 4) local Max_PlayerNum = 11 local Team_type = GetMapCopyParam2(map_copy, 1) local Team1_PlayerNum = 0 local Team2_PlayerNum = 0 local Team1_PlayerLv = 0 local Team2_PlayerLv = 0 local Winner_Is = GetMapCopyParam2( map_copy, 5 ) if Winner_Is == -1 then SetMapCopyParam2(map_copy, 6, 11 ) end if Winner_Is > -1 then local Time_count = GetMapCopyParam2(map_copy, 6) local Time_count = Time_count - 1 SetMapCopyParam2(map_copy, 6,Time_count) if Time_count == 0 then CloseMapCopy ("teampk", GetMapCopyID2(map_copy)) end end BeginGetMapCopyPlayerCha ( map_copy ) for i = 0 ,Max_PlayerNum - 1 , 1 do PKMap_HasPlayers = GetMapCopyNextPlayerCha ( map_copy ) if PKMap_HasPlayers ~= 0 and PKMap_HasPlayers ~= nil then local Time_count = GetMapCopyParam2(map_copy, 6) local Time_num = Time_count / 5 log_count = log_count + 1 if Time_num == math.floor ( Time_num ) then TEAMPK_CTRL_LUA_000001 = GetResString("TEAMPK_CTRL_LUA_000001") TEAMPK_CTRL_LUA_000002 = GetResString("TEAMPK_CTRL_LUA_000002") SystemNotice ( PKMap_HasPlayers , TEAMPK_CTRL_LUA_000002..Time_count..TEAMPK_CTRL_LUA_000001) if Team_type == 1 then local Team_Num_get = GetChaTeamID( PKMap_HasPlayers ) if Team_Num_get == Winner_Is then TEAMPK_CTRL_LUA_000003 = GetResString("TEAMPK_CTRL_LUA_000003") SystemNotice ( PKMap_HasPlayers , TEAMPK_CTRL_LUA_000003 ) end end if Team_type == 2 then local Player = GetChaPlayer( PKMap_HasPlayers ) local Player_ID_get = GetPlayerID( Player ) if Player_ID_get == Winner_Is then TEAMPK_CTRL_LUA_000004 = GetResString("TEAMPK_CTRL_LUA_000004") SystemNotice ( PKMap_HasPlayers , TEAMPK_CTRL_LUA_000004 ) end end end local Hp = Hp( PKMap_HasPlayers ) local Lv = Lv( PKMap_HasPlayers ) if Hp > 0 then if Team_type == 1 then local Team_Num_get = GetChaTeamID( PKMap_HasPlayers ) if Team_Num_get == 0 then TEAMPK_CTRL_LUA_000005 = GetResString("TEAMPK_CTRL_LUA_000005") LG("teampk",TEAMPK_CTRL_LUA_000005) Map_Start = 0 SetMapCopyParam2(map_copy, 8, Map_Start) -----如果队伍信息未到达则地图开启标志置0 return end if Team1_Num == Team_Num_get then Team1_live = Team1_live + 1 Team1_PlayerNum = Team1_PlayerNum + 1 Team1_PlayerLv = Team1_PlayerLv + Lv elseif Team2_Num == Team_Num_get then Team2_live = Team2_live + 1 Team2_PlayerNum = Team2_PlayerNum + 1 Team2_PlayerLv = Team2_PlayerLv + Lv end elseif Team_type == 2 then local Player = GetChaPlayer( PKMap_HasPlayers ) local Player_ID_get = GetPlayerID( Player ) if Player_ID_get == 0 then TEAMPK_CTRL_LUA_000006 = GetResString("TEAMPK_CTRL_LUA_000006") LG("teampk",TEAMPK_CTRL_LUA_000006) Map_Start = 0 SetMapCopyParam2(map_copy, 8, Map_Start) -----如果队伍信息未到达则地图开启标志置0 return end if Team1_Num == Player_ID_get then Team1_live = Team1_live + 1 Team1_PlayerNum = Team1_PlayerNum + 1 Team1_PlayerLv = Team1_PlayerLv + Lv elseif Team2_Num == Player_ID_get then Team2_live = Team2_live + 1 Team2_PlayerNum = Team2_PlayerNum + 1 Team2_PlayerLv = Team2_PlayerLv + Lv end end if Time_count == 1 then BIRTH_BIRTH_CONF_LUA_000044 = GetResString("BIRTH_BIRTH_CONF_LUA_000044") MoveCity( PKMap_HasPlayers, BIRTH_BIRTH_CONF_LUA_000044 ) end end else if log_count <=1 and Map_Start == 1 then TEAMPK_CTRL_LUA_000007 = GetResString("TEAMPK_CTRL_LUA_000007") LG("teampk",TEAMPK_CTRL_LUA_000007..log_count ) end if Map_Start == 1 then -- Notice("第一次运行脚本") SetMapCopyParam2(map_copy , 11 ,Team1_PlayerNum ) SetMapCopyParam2(map_copy , 12 ,Team2_PlayerNum ) local Team1_Lv = math.floor ( Team1_PlayerLv / Team1_PlayerNum ) local Team2_Lv = math.floor ( Team2_PlayerLv / Team2_PlayerNum ) SetMapCopyParam2(map_copy , 9 , Team1_Lv ) SetMapCopyParam2(map_copy , 10 , Team2_Lv ) -- Notice ("队伍1人数为"..Team1_PlayerNum) -- Notice ("队伍2人数为"..Team2_PlayerNum) -- Notice ("队伍1平均级别为"..Team1_Lv) -- Notice ("队伍2平均级别为"..Team2_Lv) end if Team1_live == 0 and Team2_live > 0 and Winner_Is == -1 then SetMapCopyParam2(map_copy, 5, Team2_Num ) end if Team1_live > 0 and Team2_live == 0 and Winner_Is == -1 then SetMapCopyParam2(map_copy, 5, Team1_Num ) end return end end end function before_leave_teampk ( role , map_copy ) -- SystemNotice (role , "离开啦") local Cha = TurnToCha( role ) local Winner_Is = GetMapCopyParam2( map_copy, 5 ) local Cha_TeamID = GetChaTeamID ( Cha ) local Player = GetChaPlayer( Cha ) local Cha_ID = GetPlayerID( Player ) local PK_type = GetMapCopyParam2( map_copy , 1 ) local Team1_ID = GetMapCopyParam2( map_copy , 3 ) local Team2_ID = GetMapCopyParam2( map_copy , 4 ) local base_rongyu = 2 local rongyu_dif = 0 local Team1_Lv = GetMapCopyParam2( map_copy , 9 ) local Team2_Lv = GetMapCopyParam2( map_copy , 10) local Team1_PlayerNum = GetMapCopyParam2( map_copy , 11 ) local Team2_PlayerNum = GetMapCopyParam2( map_copy , 12 ) local Team1_Rongyu_get = ( base_rongyu * Team2_PlayerNum ) local Team2_Rongyu_get = ( base_rongyu * Team1_PlayerNum ) local Team1_Lv_dif = Team1_Lv - Team2_Lv local Team2_Lv_dif = Team2_Lv - Team1_Lv local Rongyu_get = 0 local Player_Lv_dif = 0 -- SystemNotice(role , "队伍1平均等级="..Team1_Lv) -- SystemNotice(role , "队伍2平均等级="..Team2_Lv) -- SystemNotice(role , "队伍1人数="..Team1_PlayerNum) -- SystemNotice(role , "队伍2人数="..Team2_PlayerNum) if PK_type == 1 then -- SystemNotice ( role , "是队伍PK哦") if Cha_TeamID == Team1_ID then if Winner_Is == Cha_TeamID then Rongyu_get = Team1_Rongyu_get else Rongyu_get = Team2_Rongyu_get end Player_Lv_dif = Team1_Lv_dif elseif Cha_TeamID == Team2_ID then if Winner_Is == Cha_TeamID then Rongyu_get = Team2_Rongyu_get else Rongyu_get = Team1_Rongyu_get end Player_Lv_dif = Team2_Lv_dif else TEAMPK_CTRL_LUA_000008 = GetResString("TEAMPK_CTRL_LUA_000008") LG("teampk",TEAMPK_CTRL_LUA_000008 ) return end local rongyu_add = 0 if Player_Lv_dif > 0 then if Winner_Is == Cha_TeamID then rongyu_add = math.floor ( Rongyu_get / math.floor ( ( Player_Lv_dif + 10 )/10 ) ) else -- SystemNotice(role , "计算失败荣誉") rongyu_add = math.floor ( Rongyu_get * math.min( 3 , math.floor ( ( Player_Lv_dif + 10 )/10 ) ) ) -- SystemNotice(role , "失败荣誉为"..rongyu_add) end end if Player_Lv_dif < 0 then if Winner_Is == Cha_TeamID then rongyu_add = math.floor ( Rongyu_get * -1 * math.max ( -3 , math.floor ( ( Player_Lv_dif - 10 )/10 ) ) ) else -- SystemNotice(role , "计算失败荣誉") rongyu_add = math.floor ( Rongyu_get * -1 / math.floor ( ( Player_Lv_dif - 10 )/10 ) ) -- SystemNotice(role , "失败荣誉为"..rongyu_add) end end if Player_Lv_dif == 0 then rongyu_add = Rongyu_get end if Winner_Is == Cha_TeamID then local RYZ_Num = 0 RYZ_Num = CheckBagItem( role,3849 ) if RYZ_Num == 0 then return elseif RYZ_Num > 1 then TEAMPK_CTRL_LUA_000009 = GetResString("TEAMPK_CTRL_LUA_000009") LG("RYZ_PK",TEAMPK_CTRL_LUA_000009) return end local Cha_RYZ = GetChaItem2 ( Cha , 2 , 3849 ) local attrtype = ITEMATTR_VAL_STA local attrtype_Rongyu = ITEMATTR_VAL_STR local num = 1 local Rongyu = rongyu_add -- SystemNotice ( role , "胜利增加胜利场数") Add_ItemAttr_RYZ ( role , Cha_RYZ , attrtype , num ) TEAMPK_CTRL_LUA_000010 = GetResString("TEAMPK_CTRL_LUA_000010") SystemNotice ( role , TEAMPK_CTRL_LUA_000010..Rongyu ) Add_ItemAttr_RYZ ( role , Cha_RYZ , attrtype_Rongyu , Rongyu ) else local RYZ_Num = 0 RYZ_Num = CheckBagItem( role,3849 ) if RYZ_Num == 0 then return elseif RYZ_Num > 1 then TEAMPK_CTRL_LUA_000009 = GetResString("TEAMPK_CTRL_LUA_000009") LG("RYZ_PK",TEAMPK_CTRL_LUA_000009) return end local Cha_RYZ = GetChaItem2 ( Cha , 2 , 3849 ) local attrtype_Rongyu = ITEMATTR_VAL_STR local Rongyu = -1 * rongyu_add TEAMPK_CTRL_LUA_000011 = GetResString("TEAMPK_CTRL_LUA_000011") SystemNotice ( role ,TEAMPK_CTRL_LUA_000011..rongyu_add ) Add_ItemAttr_RYZ ( role , Cha_RYZ , attrtype_Rongyu , Rongyu ) end elseif PK_type == 2 then -- SystemNotice ( role , "是单挑哦" ) if Cha_ID == Team1_ID then -- SystemNotice(role , "我是1队的哦") Rongyu_get = Team1_Rongyu_get Player_Lv_dif = Team1_Lv_dif elseif Cha_ID == Team2_ID then -- SystemNotice ( role , "我是2队的哦") Rongyu_get = Team2_Rongyu_get Player_Lv_dif = Team2_Lv_dif else -- SystemNotice(role ,"我是幽灵哦") TEAMPK_CTRL_LUA_000012 = GetResString("TEAMPK_CTRL_LUA_000012") LG("teampk",TEAMPK_CTRL_LUA_000012 ) return end -- SystemNotice(role , "准备判断等级了") -- SystemNotice(role , "Player_Lv_dif="..Player_Lv_dif) local rongyu_add = 0 if Player_Lv_dif > 0 then -- SystemNotice(role ,"欺负级低的了吧?") if Winner_Is == Cha_ID then rongyu_add = math.floor ( Rongyu_get / math.floor ( ( Player_Lv_dif + 10 )/10 ) ) else rongyu_add = math.floor ( Rongyu_get * math.min ( 3 ,math.floor ( ( Player_Lv_dif + 10 )/10 ) ) ) end end if Player_Lv_dif < 0 then -- SystemNotice(role , "被级高的 K 了?") if Winner_Is == Cha_ID then rongyu_add = math.floor ( Rongyu_get * -1 * math.max ( -3 , math.floor ( ( Player_Lv_dif - 10 )/10 ) ) ) else rongyu_add = math.floor ( Rongyu_get * -1 / math.floor ( ( Player_Lv_dif - 10 )/10 ) ) end end if Player_Lv_dif == 0 then -- SystemNotice(role , "这么巧,级别一样?") rongyu_add = Rongyu_get end if Winner_Is == Cha_ID then -- SystemNotice(role ,"其实我不想赢") local RYZ_Num = 0 RYZ_Num = CheckBagItem( role,3849 ) if RYZ_Num == 0 then return elseif RYZ_Num > 1 then TEAMPK_CTRL_LUA_000009 = GetResString("TEAMPK_CTRL_LUA_000009") LG("RYZ_PK",TEAMPK_CTRL_LUA_000009) return end local Cha_RYZ = GetChaItem2 ( Cha , 2 , 3849 ) local attrtype = ITEMATTR_VAL_STA local attrtype_Rongyu = ITEMATTR_VAL_STR local num = 1 local Rongyu = rongyu_add -- SystemNotice ( role , "胜利增加胜利场数") Add_ItemAttr_RYZ ( role , Cha_RYZ , attrtype , num ) TEAMPK_CTRL_LUA_000010 = GetResString("TEAMPK_CTRL_LUA_000010") SystemNotice ( role , TEAMPK_CTRL_LUA_000010..Rongyu) Add_ItemAttr_RYZ ( role , Cha_RYZ , attrtype_Rongyu , Rongyu ) else -- SystemNotice(role ,"我是让他的") local RYZ_Num = 0 RYZ_Num = CheckBagItem( role,3849 ) if RYZ_Num == 0 then return elseif RYZ_Num > 1 then TEAMPK_CTRL_LUA_000009 = GetResString("TEAMPK_CTRL_LUA_000009") LG("RYZ_PK",TEAMPK_CTRL_LUA_000009) return end local Cha_RYZ = GetChaItem2 ( Cha , 2 , 3849 ) local attrtype_Rongyu = ITEMATTR_VAL_STR local Rongyu = -1 * rongyu_add TEAMPK_CTRL_LUA_000011 = GetResString("TEAMPK_CTRL_LUA_000011") SystemNotice ( role ,TEAMPK_CTRL_LUA_000011..rongyu_add) Add_ItemAttr_RYZ ( role , Cha_RYZ , attrtype_Rongyu , Rongyu ) end end end function after_enter_teampk ( role , map_copy ) local RYZ_Num = 0 RYZ_Num = CheckBagItem( role,3849 ) if RYZ_Num == 0 then return elseif RYZ_Num > 1 then TEAMPK_CTRL_LUA_000009 = GetResString("TEAMPK_CTRL_LUA_000009") LG("RYZ_PK",TEAMPK_CTRL_LUA_000009) return end local Cha_RYZ = GetChaItem2 ( role , 2 , 3849 ) local attrtype = ITEMATTR_VAL_CON local num = 1 -- SystemNotice ( role , "增加参加场数" ) Add_ItemAttr_RYZ ( role , Cha_RYZ , attrtype , num ) end function map_run_teampk(map) end function get_map_entry_pos_teampk() --设置入口的位置的坐标(坐标(米)) local POS_X=0 local POS_Y=0 return POS_X , POS_Y end
  19. Hello, As title says, I am trying to invite another character to PVP at the Argent Bar area, and this message pops up: And yes, teampk is running in the gameserver (same gameserver as garner) This is the garner ctrl.lua config. I tried removing it, but same thing happens. function config(map) MapCanSavePos(map, 1) -- 1 = Allow players to save respaw // 0 = Do not allow players to save respaw MapCanPK(map, 1) -- 1 = Turns on PK Mouse Sword Icon // 0 = Turns off PK Mouse Sword Icon ( Need to press CTRL key ) SingleMapCopyPlyNum(map, 300) -- 300 Players are allowed to enter the map MapCanTeam( map, 1 ) -- 1 = Allow players to create party // 0 = Do not allow players to create party MapType( map , 1 ) -- 0 = PvP Off // 1 = PvP Off // 2 = PvP On ( Not allowed to kill Guild and Party Mates ) // 3 = PvP On ( Allowed to kill any player but not Party Mates ) // 4 = PvP On ( Not allowed to kill Guild and Party Mates ) MapCanStall(map , 1) -- 1 = Allow players to set stall // 0 = Do not allow players to set stall end I have no idea what else to check/to do, so if anyone can help I'd be grateful.
  20. Greetings! I am wondering if there is still a big community for this game going on. I used to be in the private server making teams years ago, around 5-6 years back, when privatia was still a thing and old PKODev was around. So, back to the question: is this game still worth investing time into?
×
×
  • Create New...