Backpack 4 Report post Posted April 19, 2020 (edited) 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. Edited April 20, 2020 by Myrddin Quote Share this post Link to post Share on other sites
xEvo7 65 Report post Posted April 19, 2020 Show garner ctrl. and teampk ctrl. Have you tried copying file setting on other serverfile? Quote Hit Like If You Like It! Share this post Link to post Share on other sites
Backpack 4 Report post Posted April 20, 2020 (edited) 10 hours ago, xEvo7 said: Show garner ctrl. and teampk ctrl. Have you tried copying file setting on other serverfile? 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 Edited April 20, 2020 by Myrddin Quote Share this post Link to post Share on other sites
Falonne 2 Report post Posted April 20, 2020 Are you using official argent map or an edited one ? If its not official you need to make it pkable in yammi editor Quote Share this post Link to post Share on other sites