Jump to content

Backpack

Advanced members
  • Content Count

    20
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Backpack


  1. 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.]

    Spoiler
    Quote

    SERVER RATES:

    Solo Experience: 5x

    Party Experience: 8x

    Drop Rate: 3x

    Fairy Growth: 10x

    FEATURES:

    Vanilla-like difficulty with some quality of life changes (more info below)

    Maximum level: 65

    Resource Exchangers (more info below)

    Fairy NPC (more info below)

    Vanilla-like DW/CA (portals moved to land. more info below)

    FC/DS boss chest now gives sealed 45/55 equipment

    Experience Amplifiers for Reputation (more info below)

    Apparels don't need to be fused any longer; a special tab exists in the inventory specific for the apparels

    Forging and Strengthening supplies at the Blacksmith Disciple in Shaitan

    Chipped and Cracked gem vouchers (more info below)

    Inventory Slots & Vial of Resets & No-Exp Stone at Newbie Guide - Senna

    Get reputation by killing monsters

     

    FC/DW/DS PORTALS: 

    Have all been moved on land. Here is a list of their locations:

    Forsaken City Portal is in Shaitan at 978, 3569 (opens every 4 hours starting at 00:00AM GMT+2) No Generator item needed for entrance

    Dark Swamp Portal is in Shaitan at 950, 3647 (opens every 4 hours starting at 00:00AM GMT+2)

    Demonic World Portal moved in Argent at 2069, 2689 (opens every 4 hours starting at 00:00AM GMT+2)

    Chaos Argent portal is in the same location (opens every 6 hours starting at 00:00AM GMT+2) and no longer needs reputation for entrance. 

     

    CHEST OF FORSAKEN CITY & CHEST OF DARK SWAMP 

    Chest of Forsaken City now drops sealed lv. 45 equipments. Chest of Dark Swamp now drops Sealed lv. 55 equipments. Forsaken City Researcher and Dark Swamp Researcher have been modified accordingly to use items from FC and DS respectively to unseal the items.

     

     SKILLS: Spiritual Bolt's does 25% more damage on Monsters Voyager Skills no longer consume Coral Energy; however, a coral is still needed for them to cast spells.

     

     EXPERIENCE AMPLIFIERS: In Argent, at Experience Amplifiers - Marriam (formerly known as Innkeeper - Marriam) you can exchange reputation for Amps, Hi-Amps and Party EXP Fruit (the banana). 

     

    BROKEN, CRACKED AND CHIPPED GEM VOUCHERS:

    Forsaken City: Forsaken City Historian - Jeff (Argent 2209, 2745) will exchange items that are dropped by Captains in Forsaken City for Broken Gem Voucher

    In Dark Swamp: Swamp Champion has a chance to drop Cracked Gem Voucher Huge Mud Monster has a chance to drop Chipped Gem Voucher

    In Demonic World: Wandering Soul has a chance to drop Cracked Gem Voucher Snowman Warlord has a chance to drop Chipped Gem Voucher

    These vouchers can be exchanged for gems at Redemption - Bingo, in Argent. 

     

    MAZE EXCHANGERS IN ARGENT (2208, 2746)

     They will exchange runestones and drops from FC/DW/DS for money and rare items, such as drops from Captains and Bosses for Unique Ring and Necklace Vouchers

     

    MAKING MONEY: 

    You can find a group of researchers. One of the NPCs will exchange item that you can find when you kill monsters for money.

    In Argent at 2067, 2693

    In Shaitan at 981, 3577

    In Icicle at 1206, 598

    Besides that, you can also find NPCs to exchange drops from each maze in Argent at 2208, 2746. These NPCs will exchange Runestones or other items from mazes for money and rare item drops for Unique Ring Voucher and Unique Necklace Voucher

    Greg in Argent at 1885,2807 (Abandon Mine Haven) exchanges 10x Wood for 20.000 Gold! NEW NPCs:

    Pet Caretaker - Amithra is in Argent, near the Newbie Guide - Senna. You can obtain a Fairy Box from her, and several other things, such as: - Fruits for Fairy Coins - Marriage Fruits for Gold - Novice Skills for Gold - Standard Skills for items

    Exotic Trader - Alhazred is in Shaitan at 900,3605 Alhazred will exchange some really exotic looking weapons and outfits (some of the apparels) for Apparel Suit Trading Card and Apparel Weapon Trading Card You can obtain these items from the following monsters: - Behemoth from Abandon Mine 2 drops Apparel Cards to exchange at Alhazred (20% chance) - Great Clam King drops Apparel Cards to exchange at Alhazred (5% chance) - Armored King Crab drops Apparel Cards to exchange at Alhazred (5% chance) - Violent Air Porky drops Apparel Cards to exchange at Alhazred (5% chance) - Little Squidy Captain drops Apparel Cards to exchange at Alhazred (5% chance)

     

    IN-GAME SHOP The in-game shop, notoriously known as Item Mall, will sell:

    Apparel Items (sets, weapons and pet apparels)

    Miscellaneous items (stat reset vials, vodoo puppets and golden pickaxe and axe)

    2nd Generation pets (including Mordo Jr)

    and finally Auto Rations

     

     

    • Like 1

  2. 20 hours ago, Myrddin said:

    Bug Title: Pet Skills do not work

    Bug Description: From what I've checked, Standard Meditation & Berserk do not work. Probably others don't either.

    How to replicate: Train your pet novice & standard med & berserk and go punch something or cast on it. Double damage never happens and sp recovery doesn't increase

    Status: CLOSED

    Author (whoever that fixes it): Myrddin

    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!


  3. On 4/26/2020 at 4:46 AM, 1g0rS1lv4 said:

    the tickets if I'm not mistaken you have to forward all the ItemUse of the tickets found on iteminfo for a new function that can be found in lua / plugins / ticket.lua 

    something like that I'm not on the computer.

    Sorry for bad inglish.

    Nvm, fixed this. It wasn't a bug, it was just my brain being stupid.


  4. Quote

     

    On 8/15/2019 at 8:11 PM, mkhzaleh said:
    
    
    _igs					= {}												-- 
    _igs.SavePath			= GetResPath('../Log/Igs.log')		--
    
    _igs.Initial			= function(File)
    	Table				= io.open(File, 'r')
    	if Table ~= nil then
    		io.close(Table)
    	else
    		table.save({}, File, 'w')
    	end
    end
    _igs.Initial(_igs.SavePath)	

    add this to IGS.lua

    edit 
    function IGSLog(msg)
        local file = "Log/Igs.log"


    or just create new folder and rename it to GSlog  and create new file inside it "Igs.log"

     

    I can't figure out where to add that code. If I add it at the end of the file,

     image.png.ff47f5666cdf495474b697e57cbc5900.png

     

    I get this error in gameserver

     image.png.4726b7a555178288273bdee4f045afad.png

     

    Can someone be a bit more specific?

     

    Nvm, fixed it.


  5. 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):

     

     

     


  6. 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):


    image.png.e4260ab7e9a720cc3efe79cfedcd1a39.png

     


  7. MANAGED TO FIX IT

     

    Here's how:

    1. Create another DB user with the pwd Y87dc#$98, set it to have all permisions over tradedb
    2. Run InfoPasswd AS ADMINISTRATOR then encrypt Y87dc#$98, it will work
    3. Put that in tradeserver cfg, and your new username from DB
    4. Put this into your gameserver's CFGs:
      info = 127.0.0.1, 1985, Y87dc#$98, 1

    And it should work.

    • Thanks 1

  8. Hello,

    So I downloaded Wolfen's IGS, and I an issue:
     image.png.a53709107a46cc90d0b675a89ad5a95c.png

     

    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
    image.png.588c7014d4f270b1f61fb819da4f8d83.png
    and here is my TradeServer config.cfg
    image.png.9e8a09a53bf2bbc8f1ae7953a2a3ff21.png
    And I also put that in the TradeDB Safety table
    image.png.f89601eb7fd4a16529a578d13909345e.png

    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.

     


  9. 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

     


  10. Hello,

    As title says, I am trying to invite another character to PVP at the Argent Bar area, and this message pops up:

    image.png.719011303b7e34c15c1194600a10c55d.png

     

    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.


  11. 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...