Jump to content

Methz

Advanced members
  • Content Count

    31
  • Joined

  • Last visited

Community Reputation

2 Neutral

About Methz

  • Rank
    Pirate

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Show us the error. And tell me what's is Love Line Skill cause I don't know
  2. Oh I wanna help to make a new base file! I was so excited
  3. Solved! I did it this way: In the ctrl.lua (/server file/mapName/) file of the desired map (in this case in Arena), I added the following code in the function can_open_entry_PKmap (map) function can_open_entry_PKmap( map ) -- Specific portal time to open local hour = os.date ("%H") local hournum = tonumber(hour) if hournum == 01 or hournum == 03 or hournum == 05 or hournum == 07 or hournum == 09 or hournum == 11 or hournum == 13 or hournum == 15 or hournum == 17 or hournum == 19 or hournum == 21 or hournum == 23 then return 1 else return 0 end end 01 means 1am 03 " " 3am 05 " " 5am And so on...
  4. @KONG @Angelix Sorry if I was not clear. What I want is for one map to open in even hours and another on odd hours, so not overlapping with one another. For example: "x" map opens: 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23 "y" map opens: 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22 Borth using the same times. For example: SetMapEntryTime(map, "2006/10/18/15/0", "0/2/0", "0/0/30", "0/0/45") Some years ago I did this using GetNowTime running in can_open_entry_map function of the corresponding map, but I'm not sure about it. But I did some way, I just can't remember how Thanks in advance.
  5. Hello, can you help me? I want to open two maps, one in even hours, the other in odd hours. For example, Chaos Argent at 2, 4, 6 hours, and Arena at 1, 3, 5 hours.My goal is not to let these maps open at the same time. If I put one to open every 2 hours, and another in 3, at some point they will open up together, and I don't want this. Any idea? Thanks in advance.
  6. Where's the repository?
  7. Which code did you used? Show me all the code...
  8. @Angelix you're right, but in theory, this should not work, since it is necessary to develop a part of logic. The part necessary to verify if all the equipment is active AFTER entering the initial condition of the effect. Something like this: if check_stone < 1 then -- Checking if the player has the Remove Effect Stone if Dina_xl_ID==2577 and Dina_x2_ID==2817 then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING1 , statelv , statetime ) else -- Checking if the player has all items local statelv_bbring1 = GetChaStateLv ( role , STATE_BBRING1 ) if statelv_bbring1~=0 then RemoveState ( role , STATE_BBRING1 ) end end I think this happens because we have two situations to remove the effect: player without all the items and player with the Remove Effect Stone. So we need to check these situations as well. Of course the above code is awful and not optimized at all, but it's just to show the logic I'm thinking. Do you have any suggestions optimized and that works? I mean, without adapting the script you created, hahaha. Btw, I really enjoyed your script, thanks for sharing. I just didn't understand the function of math.random at the end. It's only a option?
  9. Did you meant like this? -- Glow 85 with Remove Effect Stone local Dina_xl = GetEquipItemP(role,8) local Dina_xl_ID= GetItemID (Dina_xl) local Dina_x2 = GetEquipItemP(role,2) local Dina_x2_ID= GetItemID (Dina_x2) local check_stone = CheckBagItem(role, xxxx) --- Angelix line 1 if check_stone < 1 then --- Angelix line 2 if Dina_xl_ID==2577 and Dina_x2_ID==2817 then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING1 , statelv , statetime ) elseif Dina_xl_ID==2578 and Dina_x2_ID==2820 then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING2 , statelv , statetime ) elseif Dina_xl_ID==2579 and Dina_x2_ID==2823 then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING3 , statelv , statetime ) elseif Dina_xl_ID==2580 and Dina_x2_ID==2826 then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING4 , statelv , statetime ) elseif Dina_xl_ID==2581 and Dina_x2_ID==2832 then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING5 , statelv , statetime ) elseif Dina_xl_ID==2582 and Dina_x2_ID==2829 then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING6 , statelv , statetime ) end else local statelv_bbring1 = GetChaStateLv ( role , STATE_BBRING1 ) if statelv_bbring1~=0 then RemoveState ( role , STATE_BBRING1 ) end local statelv_bbring2 = GetChaStateLv ( role , STATE_BBRING2 ) if statelv_bbring2~=0 then RemoveState ( role , STATE_BBRING2 ) end local statelv_bbring3 = GetChaStateLv ( role , STATE_BBRING3 ) if statelv_bbring3~=0 then RemoveState ( role , STATE_BBRING3 ) end local statelv_bbring4 = GetChaStateLv ( role , STATE_BBRING4 ) if statelv_bbring4~=0 then RemoveState ( role , STATE_BBRING4 ) end local statelv_bbring5 = GetChaStateLv ( role , STATE_BBRING5 ) if statelv_bbring5~=0 then RemoveState ( role , STATE_BBRING5 ) end local statelv_bbring6 = GetChaStateLv ( role , STATE_BBRING6 ) if statelv_bbring6~=0 then RemoveState ( role , STATE_BBRING6 ) end end ---Glow 85 End If so, there's a bug. When you take out the armor or the ring, the effect will still on (unless you relog or switch the character) If not, show me the code, please. I'm very noob with programming for now, need to practice :x
  10. If you don't understand something, let me know
  11. Anyone know a good game programming book to tell me? I mean, a book that explains the logic behind a game, the step-by-step creation process, areas of action, possible engines and tools... things like that. It doesn't have to be a programming book itself that teaches how to make a game, I'm more interested in processes and logic. (If anyone has a good book about Lua language will be welcome too) Thank you.
  12. Yes, I see that you have helped and shared a lot, congratulations (and tnx)! Keep it up, haha. I am searching for these hidden treasures and gathering as much information and useful material as possible to begin development. What happened to ServerDev and how can I access it? No problem, I will.
  13. Great idea! I was thinking of clearing all the files: blank spaces, indentation, codes that are not being used and this summary of functions that you did. Thanks for sharing.
×
×
  • Create New...