-
Posts
17 -
Joined
-
Last visited
-
Days Won
2 -
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by Dean
-
-
@VegaS™ As good as your script might look, I find it more demanding on the game having to load the list of names everytime the game loads localeInfo.py
My piece of code it loads up a rather short list of names which can be maintained on a weekly basis (reason why most servers perform a weekly maintenance) and grab a random name when user requests it by clicking the button.I could see a point in combining the two methods by making a list which is loaded up when the user is trying to create a character followed by dumping it when the user exits the create interface.
I thank you nevertheless for bringing alternatives to the table which makes us expand our knowledge
-
On 11/3/2018 at 11:10 PM, Co0L said:
@Dean ???
On 11/4/2018 at 5:25 AM, Blend said:I have the same problem
Hello to both,
Sorry for late response.
As for the problem at hand I've failed to replicate your issue on my side, unless you have set an actual cooldown to those potions you should not encounter that. So you might want to check that first and see if you find a way to fix it.TDLR: The piece of code I shared way way above it takes the active cooldown of a skill, if existent, and displays the actual timer which already runs in the background. The main reason of this release was to improve player's reaction have while using their skills as it gives you a better understanding when the skill will be available for next cast.
-
10 hours ago, Chyu ^^ said:
I think the biggest question is why would you implement this.
The code is simple, it takes names at random from a list and it's being placed in your character name edit line. Also the whole purpose of it is as pure inspiration whenever a player is in lack for a better name. To decrease the chance of getting a duplicate you can do either of 2 things: expand the list to a larger amount of names or simply place a condition within the code to generate a new name if the first name generated is already taken. (PS. you already have such functions in your game)
I hope that answers most of your questions and if you have any further questions please do let me know.
Have a great day everyone!- 1
-
Hi there everyone,
I'd like to share a small function which will give you a random name whilst creating a new character.
This will only include the function and a list of names, so you will have to set the event on your own.Preview:
The function which will most likely be put in introCreate.py
import os import app #import the above lines if you don't have them already def __randomizeName(self): dir = os.path.dirname(os.path.abspath("introCreate.py")) list = open("%s\\names.list" % dir, "r").read().split("\n") rng = app.GetRandom(0, len(list)-1) randomName = list[rng] self.heroName.SetText("%s" % randomName) ## change variable 'heroName' with your editline's name
Also place the attached file to this thread in the main directory of the client. (i.e: where the launcher is)
names.list contains 150 names, if you ever need more names let me know so I can up the number or you can add more yourself, but do note you need to put each name as a new line so you won't mess up the function.
That's all for now, hope you all have a great day!
Cheers.- 1
- 1
- 1
- 1
- 2
- 22
-
Also if you want to get the gender during select screen like I wanted to you will have to use the following syntax:
import chr import net chr.RaceToSex(chr.GetRace(net.ACCOUNT_CHARACTER_SLOT_ID))
And as @RatCatcher said, it will return an integer value: 1 for males and 0 for females
Cheers!
- 1
-
Hello everyone. Thank you all for the warm feedback, it's been a pleasure reading all your replies.
Now, I brought some changes to this feature to further improve it.Also I'd like to thank Shang and Aerrow for pointing out ways of improving the script.
- 3
-
23 minutes ago, ragem0re said:
So.. where is it?
I only realized that whilst editing a different topic.
The file is now attached to the thread.
-
Hi there,
I hope this thread finds you all well.
The reason of this thread is mainly the fact I grew tired of having to change the directory and executing a quest with ./qc quest_name.quest every single time, well not every single time, but you know the lines you need to go through while updating quests.Attached to this post you will find a shell script which its sole purpose is to take away that heavy load of you having to type cd /usr/home/share/locale/... && ./qc quest_name.quest every damn time.
All you need to do is copy the file provided in /usr/bin and set file's permissions on 777.
Now before you go bananas there are a few adjustments needed, so follow my lead.
Open the quest file and change the following to reflect the path to your quest folder(i.e: /usr/home/game/share/locale/germany/quest)#!/bin/sh get_locale="arkadia" # locale name goes here get_name="ARKADIA2" # Server name goes here dean_path="/usr/arkadia2" # do not add a forwards slash (/) at the end of this variable quest_path="$dean_path/share/locale/$get_locale/quest" clear echo -e "\033[1;31m] $get_name Quest menu: " echo -n "] Type the quest name here to execute it or 'x' to cancel: " read quest if [ -z $quest ] then clear echo -e "\033[1;31m] Next time, please provide the name of the quest you're trying to execute. \033[0;0m" elif [ $quest = "x" ] || [ $quest = "q" ] then echo -e "\033[0;0m" clear else echo -e "\033[0;31m" clear quest_name="$quest.quest" cd $quest_path if [ -f $quest_name ] then ./qc $quest_name echo -e "\033[1;31m] $quest_name has been executed successfully. \033[0;0m" else echo -e "\033[1;31m] $quest_name not found. Please try again. \033[0;0m" fi fi
Save your progress and now start a SSH session and after logging you will call this script by typing quest and it should look something like this:
Now you can go bananas on this!
If you have questions or suggestions in regards of the above, leave a reply to this thread as usual.
Cheers!- 3
-
4 hours ago, [Dev]Medo said:
same bug here ...
Hi there Medo, could you record a video with the bug so I can get a better grasp of the issue and post it here?
Thank you!
-
On 7/31/2018 at 2:32 AM, Werwolf94 said:
That's a nice idea!
But I think I found a bug (or I messed up something when I pasted your code to my files).
When you go to another map the counters are freezing after you use a skill.Hi there Werwolf, I have tested the potential bug you mentioned and I failed to encounter it.
The only aspect of the script which I'm still working on is the possibility to hide the cooldown whilst holding down Alt.
It's not a bug, just a simple adjustment I'd like to add in the future to assure 100% functionability.Thank you all for the warm feedback, it gladdens me knowing my scripts are useful.
Keep me posted if potential bugs arise.
Cheers!
- 1
-
Hi devs,
I'd like to share a script I developed the other night whilst working on a project, this script is meant to improve the quality of life of Metin2 as often players find it hard to accurately tell the cooldown of skills and end up spamming their keyboards like many of us have.
Preview:
Without any further ado, let's dig right into coding this bad boy.We start with locale:
SpoilerFirst you will have to unpack your locale and look for taskbar.py in your ui folder and look for the following:
"name" : "quick_slot_1", ... "children" :
And replace the content of "children" : ( ... ), with this:
{ "name" : "slot_1", "type" : "image", "x" : 3, "y" : 3, "image" : "d:/ymir work/ui/game/taskbar/1.sub", "children" : ( { "name" : "slot_1_cd", "type" : "text", "x" : 0, "y" : 0, "horizontal_align" : "center", "vertical_align" : "center", "text" : "10", "fontname" : "Tahoma Bold:16", "r" : 1, "g" : 1, "b" : 0, "a" : 0, }, ), }, { "name" : "slot_2", "type" : "image", "x" : 35, "y" : 3, "image" : "d:/ymir work/ui/game/taskbar/2.sub", "children" : ( { "name" : "slot_2_cd", "type" : "text", "x" : 0, "y" : 0, "horizontal_align" : "center", "vertical_align" : "center", "text" : "10", "fontname" : "Tahoma Bold:16", "r" : 1, "g" : 1, "b" : 0, "a" : 0, }, ), }, { "name" : "slot_3", "type" : "image", "x" : 67, "y" : 3, "image" : "d:/ymir work/ui/game/taskbar/3.sub", "children" : ( { "name" : "slot_3_cd", "type" : "text", "x" : 0, "y" : 0, "horizontal_align" : "center", "vertical_align" : "center", "text" : "10", "fontname" : "Tahoma Bold:16", "r" : 1, "g" : 1, "b" : 0, "a" : 0, }, ), },{ "name" : "slot_4", "type" : "image", "x" : 99, "y" : 3, "image" : "d:/ymir work/ui/game/taskbar/4.sub", "children" : ( { "name" : "slot_4_cd", "type" : "text", "x" : 0, "y" : 0, "horizontal_align" : "center", "vertical_align" : "center", "text" : "10", "fontname" : "Tahoma Bold:16", "r" : 1, "g" : 1, "b" : 0, "a" : 0, }, ), },
Then look for:
"name" : "quick_slot_1", ... "children" :
And replace the content of its "children" : ( ... ), with the following:
{ "name" : "slot_f1", "type" : "image", "x" : 3, "y" : 3, "image" : "d:/ymir work/ui/game/taskbar/f1.sub", "children" : ( { "name" : "slot_f1_cd", "type" : "text", "x" : 0, "y" : 0, "horizontal_align" : "center", "vertical_align" : "center", "text" : "10", "fontname" : "Tahoma Bold:16", "r" : 1, "g" : 1, "b" : 0, "a" : 0, }, ), }, { "name" : "slot_f2", "type" : "image", "x" : 35, "y" : 3, "image" : "d:/ymir work/ui/game/taskbar/f2.sub", "children" : ( { "name" : "slot_f2_cd", "type" : "text", "x" : 0, "y" : 0, "horizontal_align" : "center", "vertical_align" : "center", "text" : "10", "fontname" : "Tahoma Bold:16", "r" : 1, "g" : 1, "b" : 0, "a" : 0, }, ), }, { "name" : "slot_f3", "type" : "image", "x" : 67, "y" : 3, "image" : "d:/ymir work/ui/game/taskbar/f3.sub", "children" : ( { "name" : "slot_f3_cd", "type" : "text", "x" : 0, "y" : 0, "horizontal_align" : "center", "vertical_align" : "center", "text" : "10", "fontname" : "Tahoma Bold:16", "r" : 1, "g" : 1, "b" : 0, "a" : 0, }, ), },{ "name" : "slot_f4", "type" : "image", "x" : 99, "y" : 3, "image" : "d:/ymir work/ui/game/taskbar/f4.sub", "children" : ( { "name" : "slot_f4_cd", "type" : "text", "x" : 0, "y" : 0, "horizontal_align" : "center", "vertical_align" : "center", "text" : "10", "fontname" : "Tahoma Bold:16", "r" : 1, "g" : 1, "b" : 0, "a" : 0, }, ), },
Now save your work in taskbar.py and pack your files.
Now we shall move onto root part:
version 1.0
SpoilerNext we'll move onto root so I need you to unpack your root files and look for uitaskbar.py
Now I need you to look for the following line: self.quickslot = [] as you can see below:self.quickslot = [] self.quickslot.append(self.GetChild("quick_slot_1")) self.quickslot.append(self.GetChild("quick_slot_2"))
And then enter the following block of code above it:
self.cooldownText = [] self.cooldownText.append(self.GetChild("slot_1_cd")) self.cooldownText.append(self.GetChild("slot_2_cd")) self.cooldownText.append(self.GetChild("slot_3_cd")) self.cooldownText.append(self.GetChild("slot_4_cd")) self.cooldownText.append(self.GetChild("slot_f1_cd")) self.cooldownText.append(self.GetChild("slot_f2_cd")) self.cooldownText.append(self.GetChild("slot_f3_cd")) self.cooldownText.append(self.GetChild("slot_f4_cd")) for i in xrange(8): self.cooldownText[i-1].Hide()
Note: Please pay attention to code indentation
Afterwards you will need to search for:
if player.IsSkillCoolTime(Position):
and under it add the following:
(coolTime, elapsedTime) = player.GetSkillCoolTime(Position) slot.SetSlotCoolTime(slotNumber, coolTime, elapsedTime) cooldownDelay = 0 cooldown = coolTime-elapsedTime+cooldownDelay self.cooldownText[slotNumber].Show() self.cooldownText[slotNumber].SetText("%d" % cooldown) self.cooldownText[slotNumber].SetOutline() if cooldown < 10: self.cooldownText[slotNumber].SetPosition(7,0) elif cooldown > 9 and cooldown < 100: self.cooldownText[slotNumber].SetPosition(2,0) elif cooldown > 99: self.cooldownText[slotNumber].SetPosition(-1,0)
Note: Please pay attention to code indentation
Now make a new line under the whole code block of:
if player.IsSkillCoolTime(Position):
and add the following code:
elif not player.IsSkillCoolTime(Position): self.cooldownText[slotNumber].Hide()
Awesome! You should be good to go, now pack your root and head in for some testing!version 2.0
SpoilerNext we'll move onto root so I need you to unpack your root files and look for uitaskbar.py
Now I need you to look for the following line: self.quickslot = [] as you can see below:self.quickslot = [] self.quickslot.append(self.GetChild("quick_slot_1")) self.quickslot.append(self.GetChild("quick_slot_2"))
And then enter the following block of code above it:
self.cooldownText = [] self.cooldownText.append(self.GetChild("slot_1_cd")) self.cooldownText.append(self.GetChild("slot_2_cd")) self.cooldownText.append(self.GetChild("slot_3_cd")) self.cooldownText.append(self.GetChild("slot_4_cd")) self.cooldownText.append(self.GetChild("slot_f1_cd")) self.cooldownText.append(self.GetChild("slot_f2_cd")) self.cooldownText.append(self.GetChild("slot_f3_cd")) self.cooldownText.append(self.GetChild("slot_f4_cd")) for i in xrange(8): self.cooldownText[i-1].Hide()
Note: Please pay attention to code indentation
Afterwards you will need to search for:
def OnUpdate(self):
And add the following block under self.tooltipEXP.Hide()
startNumber = 0 for slot in self.quickslot: for i in xrange(4): slotNumber = i+startNumber self.cooldownText[slotNumber].Hide() (Type, Position) = player.GetLocalQuickSlot(slotNumber) if player.IsSkillCoolTime(Position): (coolTime, elapsedTime) = player.GetSkillCoolTime(Position) slot.SetSlotCoolTime(slotNumber, coolTime, elapsedTime) cooldownDelay = 0 cooldown = int(coolTime-elapsedTime+cooldownDelay) if app.IsPressed(app.DIK_LALT): self.cooldownText[slotNumber].Hide() else: self.cooldownText[slotNumber].SetOutline() self.cooldownText[slotNumber].SetText("%d" % cooldown) cooldown = str(cooldown) self.cooldownText[slotNumber].SetPosition((7, 2, -1)[len(cooldown)-1], 0) self.cooldownText[slotNumber].Show() startNumber += 4
Note 1: Please pay attention to code indentation
Note 2: Also if you have implemented this feature from version 1.0 then you will have to reverse engineer it and apply this version as it's more reliable.Now get your root files packed and give this bad boy a spin!
If you encounter any bugs or you have suggestions please let me know!
Changes:Spoiler— version 2.0
> Removed the whole script from function def RefreshQuickSlot(self): and added the updated block under def OnUpdate(self): as it's more reliable and fixes one of the bugs where the cooldown gets stuck.
> Hid the cooldown text before it's processed by the if player.IsSkillCoolTime(Position): condition as opposed to previous version, for a cleaner code.
> Added a new condition which will hide the cooldown text whilst holding down Left ALT. However because the cooldown is set per slot and the pages are overlapping, it also hides the cooldown from the 2nd skill page, but that is just a tiny detail which can be ignored until further improvements.- 16
- 1
- 1
- 4
- 1
- 24
-
You're the real MVP! Thanks a bunch mate, most appreciated!
- 1
-
I think what meleme wants to point out is creating a blacklist of such individuals will help by making the community aware to some of the names some scammers go by and so on.
As for the idea of creating a blacklist to spread awareness among the community, I totally agree! -
You might want to post the quest too so we can see what is actually going on.
- 1
-
One thing to mention for everyone facing issues whilst using this function, check below:
if not item.is_worn(itemcell) then return end
Change into
if not item.is_worn(itype) then return end
As you're using the previous function which takes a string not a number, itemcell returns the itype's number.
Other than that thank you very much for posting these functions Avenue. -
Aveline has posted a topic which covers this, please check the following post:
New Discord for the community !
in Announcements
Posted
Given the community isn't about posting skimpy pictures of your toes, I say you can live without spamming NSFW content, being racist, sexist, harass other users, yada yada.
So lighten up and use the Discord for its intended purpose.