Jump to content

Billy

Community
  • Content Count

    120
  • Joined

  • Days Won

    28

Posts posted by Billy


  1. 5 hours ago, deguix said:

     

    4. For me top crafting windows are a disaster and should simply be scrapped. Basically copying Minecraft's would be best. To get close to it with least effort, do like a couple of servers do currently and create a new item to insta fuse and another to insta manu and etc. The closest would be to add more inventory slots and just those slots for crafting. In this case, only 1 item would be used - rather, should be a player skill. More than that, and there will need to be client source changes.

     

    • Like 2

  2. @ECHO OFF
    :: Declare amount of cores
    SET /A maxcores=4
    :: Declare path to game.exe
    SET gamepath="system/game.exe" 
    :: Declare game.exe name
    SET game="game.exe"
    ::Count current instances of game.exe
    ::Write number to tmp file.
    tasklist | find /I /C %game%>tmp
    ::Read in number from tmp file.
    SET /p count= <tmp
    ::Get modulous of count and maxcore.
    ::We use this to decide which core to run on.
    SET /A core=(%count% %% %maxcores%)
    SET coreparam=1
    ::If there are no other clients open,
    ::Always run on core 0 (coreparam = 1)
    IF %core%==0 GOTO run
    ::Loop for exponent
    SET loop=0
    :multiply
    SET /a coreparam=coreparam*2
    SET /a loop=loop+1
    IF %loop% LSS %core% GOTO multiply
    :run
    ::Run game.exe and set affinity.
    cmd.exe /c start "Process Monitor" /affinity %coreparam% %gamepath% startgame

    Can try something like this.

    • Like 3

  3. function MazeChest(Player, Item)
    	local Random = 0
    	local tab = MazeChestVar[GetItemID(Item)]
    	local errorMsg
    	if not tab then
    		errorMsg = string.format("Please contact administrator since [%s] currently has no use.",GetItemName(GetItemID(Item)))
    	elseif GetChaFreeBagGridNum(Player) <= 0 then
    		errorMsg =  string.format("You need at least one free inventory slot to open [%s].",GetItemName(GetItemID(Item)))
    	end
    	if errorMsg then
    		SystemNotice(Player,errorMsg)
    		UseItemFailed(Player)
    		return
    	end	
    	while (GetItemName(Random) == "unknown" )do
    		Random = tab[math.floor(math.random(1, table.getn(tab)))]
    	end
    	GiveItem(Player, 0, MazeChestVar[GetItemID(Item)][Random], 1, 5)
    	Notice(string.format("[%s] has opened [%s] and obtained [%s].",GetChaDefaultName(Player),GetItemName(GetItemID(Item)),GetItemName(Random)))
    end

     

    • Like 1

  4. Wouldnt it be much easier to just revive instantly in After_Player_Kill_Player, and not worry about timing the 20 seconds?

     

    Something like: (untested)

     

    AutoRevive= {
    	MapsList = {
    		['garner2'] = true,
    		['puzzleworld'] = true,
    		['puzzleworld2'] = true,
    	},
    	PKFunc = after_player_kill_player,
    }
    
    function AutoRevive.CheckRevive( ATKER, role )
    	if AutoRevive.MapsList[GetChaMapName ( role )] == true then
    		MoveCity(role, "")
    		MoveCity(role, "")
    	end
    	AutoRevive.PKFunc(ATKER,role)
    end
    
    after_player_kill_player = AutoRevive.CheckRevive

     

×
×
  • Create New...