Jump to content

GameForge | ROOT Pack | 02-02-2018


Abel(Tiger)

Recommended Posts

  • Premium
12 hours ago, tierrilopes said:

From:


self.SelectBtnNameList[0].SetEvent(ui.__mem_func__(self.EventProgress), "mouse_click", 0)
		self.SelectBtnNameList[1].SetEvent(ui.__mem_func__(self.EventProgress), "mouse_click", 1)
		self.SelectBtnNameList[2].SetEvent(ui.__mem_func__(self.EventProgress), "mouse_click", 2)
		self.SelectBtnNameList[3].SetEvent(ui.__mem_func__(self.EventProgress), "mouse_click", 3)
		self.SelectBtnNameList[4].SetEvent(ui.__mem_func__(self.EventProgress), "mouse_click", 4)
		
		self.SelectBtnNameList[0].SetEvent(ui.__mem_func__(self.EventProgress), "mouse_over_in", 0)
		self.SelectBtnNameList[1].SetEvent(ui.__mem_func__(self.EventProgress), "mouse_over_in", 1)
		self.SelectBtnNameList[2].SetEvent(ui.__mem_func__(self.EventProgress), "mouse_over_in", 2)
		self.SelectBtnNameList[3].SetEvent(ui.__mem_func__(self.EventProgress), "mouse_over_in", 3)
		self.SelectBtnNameList[4].SetEvent(ui.__mem_func__(self.EventProgress), "mouse_over_in", 4)
		
		self.SelectBtnNameList[0].SetEvent(ui.__mem_func__(self.EventProgress), "mouse_over_out", 0)
		self.SelectBtnNameList[1].SetEvent(ui.__mem_func__(self.EventProgress), "mouse_over_out", 1)
		self.SelectBtnNameList[2].SetEvent(ui.__mem_func__(self.EventProgress), "mouse_over_out", 2)
		self.SelectBtnNameList[3].SetEvent(ui.__mem_func__(self.EventProgress), "mouse_over_out", 3)
		self.SelectBtnNameList[4].SetEvent(ui.__mem_func__(self.EventProgress), "mouse_over_out", 4)
		
		self.SelectBtnFaceList[0].SetEvent(ui.__mem_func__(self.EventProgress), "mouse_click", 0)
		self.SelectBtnFaceList[1].SetEvent(ui.__mem_func__(self.EventProgress), "mouse_click", 1)
		self.SelectBtnFaceList[2].SetEvent(ui.__mem_func__(self.EventProgress), "mouse_click", 2)
		self.SelectBtnFaceList[3].SetEvent(ui.__mem_func__(self.EventProgress), "mouse_click", 3)
		self.SelectBtnFaceList[4].SetEvent(ui.__mem_func__(self.EventProgress), "mouse_click", 4)
		
		self.SelectBtnFaceList[0].SetEvent(ui.__mem_func__(self.EventProgress), "mouse_over_in", 0)
		self.SelectBtnFaceList[1].SetEvent(ui.__mem_func__(self.EventProgress), "mouse_over_in", 1)
		self.SelectBtnFaceList[2].SetEvent(ui.__mem_func__(self.EventProgress), "mouse_over_in", 2)
		self.SelectBtnFaceList[3].SetEvent(ui.__mem_func__(self.EventProgress), "mouse_over_in", 3)
		self.SelectBtnFaceList[4].SetEvent(ui.__mem_func__(self.EventProgress), "mouse_over_in", 4)
		
		self.SelectBtnFaceList[0].SetEvent(ui.__mem_func__(self.EventProgress), "mouse_over_out", 0)
		self.SelectBtnFaceList[1].SetEvent(ui.__mem_func__(self.EventProgress), "mouse_over_out", 1)
		self.SelectBtnFaceList[2].SetEvent(ui.__mem_func__(self.EventProgress), "mouse_over_out", 2)
		self.SelectBtnFaceList[3].SetEvent(ui.__mem_func__(self.EventProgress), "mouse_over_out", 3)
		self.SelectBtnFaceList[4].SetEvent(ui.__mem_func__(self.EventProgress), "mouse_over_out", 4)

Into:


for i in xrange(5):
	self.SelectBtnNameList[i].SetEvent(ui.__mem_func__(self.EventProgress), "mouse_click", i)
	self.SelectBtnNameList[i].SetEvent(ui.__mem_func__(self.EventProgress), "mouse_over_in", i)
	self.SelectBtnNameList[i].SetEvent(ui.__mem_func__(self.EventProgress), "mouse_over_out", i)
	self.SelectBtnFaceList[i].SetEvent(ui.__mem_func__(self.EventProgress), "mouse_click", i)
	self.SelectBtnFaceList[i].SetEvent(ui.__mem_func__(self.EventProgress), "mouse_over_in", i)
	self.SelectBtnFaceList[i].SetEvent(ui.__mem_func__(self.EventProgress), "mouse_over_out", i)

Couldnt write it in "one string" sadly, teach me how pls:(

 

 

eventlist = [ "mouse_click", "mouse_over_in", "mouse_over_out", "mouse_click", "mouse_over_in", "mouse_over_out"]

for element in eventlist:
	for i in xrange(5):
		self.SelectBtnNameList[i].SetEvent(ui.__mem_func__(self.EventProgress), element, i)




This should do it, tested as follows (py36)
 

eventlist = [ "mouse_click", "mouse_over_in", "mouse_over_out", "mouse_click", "mouse_over_in", "mouse_over_out"]

for element in eventlist:
    for i in range(5):
        print("[{}] Element: {}".format(i,element))

 

Link to comment
Share on other sites

  • Premium

That's my way I did year ago, same ingame output as gf

There are 2 additional images covering the button so you can just disable "mouse over" for this elements (3 lines of code instead of creating functions etc.)B)

        for i in xrange(len(self.NameList)):
            self.SelectBtnFaceList[i].AddFlag("not_pick")
            self.SelectBtnNameList[i].AddFlag("not_pick")

 

Link to comment
Share on other sites

  • Premium
45 minutes ago, Fleon said:

 


eventlist = [ "mouse_click", "mouse_over_in", "mouse_over_out", "mouse_click", "mouse_over_in", "mouse_over_out"]

for element in eventlist:
	for i in xrange(5):
		self.SelectBtnNameList[i].SetEvent(ui.__mem_func__(self.EventProgress), element, i)




This should do it, tested as follows (py36)
 


eventlist = [ "mouse_click", "mouse_over_in", "mouse_over_out", "mouse_click", "mouse_over_in", "mouse_over_out"]

for element in eventlist:
    for i in range(5):
        print("[{}] Element: {}".format(i,element))

 

Now lets import that code from an url so that it becames 'one string'

 

Link to comment
Share on other sites

1 hour ago, Nevisor said:

That's my way I did year ago (same results) B)


        for i in xrange(len(self.NameList)):
            self.SelectBtnFaceList[i].AddFlag("not_pick")
            self.SelectBtnNameList[i].AddFlag("not_pick")

 

That's not related with what he request.

2 hours ago, Fleon said:

eventlist = [ "mouse_click", "mouse_over_in", "mouse_over_out", "mouse_click", "mouse_over_in", "mouse_over_out"]

for element in eventlist:
	for i in xrange(5):
		self.SelectBtnNameList[i].SetEvent(ui.__mem_func__(self.EventProgress), element, i)

 

Doesn't looks exactly with what we need, and your loop will be very bad, repeat it x30 times for each one, and don't to the same. (http://tpcg.io/C4Vv2s)

  • That's like how should be.
# No comprehension
for eventKey, (srcNameList, srcFaceList) in enumerate(zip(self.SelectBtnNameList, self.SelectBtnFaceList)):
	for eventName in ('mouse_click', 'mouse_over_in', 'mouse_over_out'):
		(srcNameList.SetEvent(eventKey, eventName), srcFaceList.SetEvent(eventKey, eventName))
		
# Comprehension
[(srcNameList.SetEvent(eventKey, eventName), srcFaceList.SetEvent(eventKey, eventName)) for eventKey, (srcNameList, srcFaceList) in enumerate(zip(self.SelectBtnNameList, self.SelectBtnFaceList)) for eventName in ('mouse_click', 'mouse_over_in', 'mouse_over_out')]

Thanks @VegaS

keLpeab.jpg

PS: Let's don't make another replies about that.

Let's go on https://metin2dev.org/board/index.php?/forum/34-offtopic/ and make one topic and we can talk 24/7 about that. :lol:

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 1
Link to comment
Share on other sites

  • Premium
On 2/3/2018 at 7:39 PM, Tasho said:

That's not related with what he request.

Doesn't looks exactly with what we need, and your loop will be very bad, repeat it x30 times for each one, and don't to the same. (http://tpcg.io/C4Vv2s)

  • That's like how should be.
# No comprehension
for eventKey, (srcNameList, srcFaceList) in enumerate(zip(self.SelectBtnNameList, self.SelectBtnFaceList)):
	for eventName in ('mouse_click', 'mouse_over_in', 'mouse_over_out'):
		(srcNameList.SetEvent(eventKey, eventName), srcFaceList.SetEvent(eventKey, eventName))
		
# Comprehension
[(srcNameList.SetEvent(eventKey, eventName), srcFaceList.SetEvent(eventKey, eventName)) for eventKey, (srcNameList, srcFaceList) in enumerate(zip(self.SelectBtnNameList, self.SelectBtnFaceList)) for eventName in ('mouse_click', 'mouse_over_in', 'mouse_over_out')]

Thanks @VegaS

keLpeab.jpg

PS: Let's don't make another replies about that.

Let's go on https://metin2dev.org/board/index.php?/forum/34-offtopic/ and make one topic and we can talk 24/7 about that. :lol:

 

?

.gif

Don't know what you are talking about, really, his method works perfectly and it's easy as fuck to comprehend.

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
Share on other sites

10 minutes ago, Syreldar said:

Don't know what are you talking about, really, his method works perfectly and it's easy as fuck to comprehend.

Add the self.SelectBtnFaceList on print too,, and run it, you will get a loop of x60 times (repeat x2 same thing), when need just x30 times. -

Run it: http://tpcg.io/C4Vv2s

Do you think that's a good loop? what's about that eventList items? Read with careful how should be output on my image.

  • Metin2 Dev 1
Link to comment
Share on other sites

  • Premium
On 2/3/2018 at 9:03 PM, Tasho said:

Add the self.SelectBtnFaceList on print too,, and run it, you will get a loop of x60 times (repeat x2 same thing), when need just x30 times. -

Run it: http://tpcg.io/C4Vv2s

Do you think that's a good loop? what's about that eventList items? Read with careful how should be output on my image.

It's printing 60 times instead of 30 because you are asking it to print it twice lol

Screenshot from your link:

.gif

while this is what fleon did:

.gif

 

So yeah..dunno what are you doing.

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
Share on other sites

9 minutes ago, Syreldar said:

It's printing 60 times instead of 30 because you are asking it to print it twice lol

Ok then, maybe i'm noob.

Put the final code (for metin2, not print function) to SetEvent on the both list (self.SelectBtnNameList, self.SelectBtnFaceList) with good arguments, like that. 

Spoiler

keLpeab.jpg

I think you don't understand how exactly need to work, please read again every row from my output.

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • Premium
9 minutes ago, Tasho said:

I think you don't understand how exactly need to work

 

It works perfectly lol

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
Share on other sites

  • Premium
On 2/3/2018 at 9:04 PM, Syreldar said:

It's printing 60 times instead of 30 because you are asking it to print it twice lol

Screenshot from your link:

.gif

while this is what fleon did:

.gif

 

So yeah..dunno what are you doing.

Probably thats because Fleon only did it for the "self.SelectBtnNameList" but forgot the "self.SelectBtnFaceList"

Print example gives the idea, he just didnt edited the first code

 

Using list i prefer (with print to python run thing):

txtlist = [ "mouse_click", "mouse_over_in", "mouse_over_out"]

for loop in txtlist:
    for i in range(5):
        print 'self.SelectBtnNameList[{}].SetEvent(ui.__mem_func__(self.EventProgress), "{}", {})'.format(i, loop, i)
        print 'self.SelectBtnFaceList[{}].SetEvent(ui.__mem_func__(self.EventProgress), "{}", {})'.format(i, loop, i)

Not organized by category like in the above example, but for me its faster to write.

  • Love 2
Link to comment
Share on other sites

  • Premium
28 minutes ago, tierrilopes said:

Probably thats because Fleon only did it for the "self.SelectBtnNameList" but forgot the "self.SelectBtnFaceList"

Print example gives the idea, he just didnt edited the first code

 

Using list i prefer (with print to python run thing):


txtlist = [ "mouse_click", "mouse_over_in", "mouse_over_out"]

for loop in txtlist:
    for i in range(5):
        print 'self.SelectBtnNameList[{}].SetEvent(ui.__mem_func__(self.EventProgress), "{}", {})'.format(i, loop, i)
        print 'self.SelectBtnFaceList[{}].SetEvent(ui.__mem_func__(self.EventProgress), "{}", {})'.format(i, loop, i)

Not organized by category like in the above example, but for me its faster to write.

5
5

I see, turns out i inadvertitely wrote it correctly without noticing Fleon forgot to remove double results on the array, he did

eventlist = [ "mouse_click", "mouse_over_in", "mouse_over_out", "mouse_click", "mouse_over_in", "mouse_over_out"]

I didn't notice, i directly wrote 

eventlist = ["mouse_click", "mouse_over_in", "mouse_over_out"]

which is correct following his code, that's why it worked for me.

  • Love 1

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
Share on other sites

  • Active+ Member

--- 0.0420000553131 seconds tierrilopes execution time ---

--- 0.0659999847412 seconds Tasho execution time ---

Who the f**k care about 0.02 seconds ? You can do a lot of things in those seconds ...

Rewrite an entire file and then you see a difference , not from 2 code lines.

  • Sad 2
  • Love 1
Link to comment
Share on other sites

  • Forum Moderator
Am ‎02‎.‎02‎.‎2018 um 17:38 schrieb Abel(Tiger):

I think they forgot to cythonize =))

I don't recommend to use that code, is ugly ...

This is the hidden content, please

  Unsichtbaren Inhalt anzeigen

Awesome stuff:

uikeychange.py => Line 203 =))

 

Good work.
Thank you :)

Best regards
Raylee

Link to comment
Share on other sites

  • Premium
15 hours ago, Syreldar said:

I see, turns out i inadvertitely wrote it correctly without noticing Fleon forgot to remove double results on the array, he did


eventlist = [ "mouse_click", "mouse_over_in", "mouse_over_out", "mouse_click", "mouse_over_in", "mouse_over_out"]

I didn't notice, i directly wrote 


eventlist = ["mouse_click", "mouse_over_in", "mouse_over_out"]

which is correct following his code, that's why it worked for me.

lol sorry about this i was super stoned and i didn't realize i was writing the same thing twice haha

Both methods should be roughly the same for this kind of quantities but i can imagine in the whole process for someone it can matter

Im glad that we can discuss about these things

Link to comment
Share on other sites

  • Premium

Tryhard mode:

 

[print ('self.SelectBtn{}[{}].SetEvent(ui.__mem_func__(self.EventProgress), "{}" , {})'.format(i,x,element,x) ) for element in ("mouse_click", "mouse_over_in", "mouse_over_out") for i in ("NameList","FaceList") for x in range(5)]

 

Mission accomplished

 

Do they require to be sorted in the output of @Tasho or it's ok like this aswell?

P.s. it's ok for the offtopic, now the forum is ours the relase it's on the first post and the plebs are not gonna eventually use it because they don't know how. Fuck the staff it's never here.

A n a r c h y in metin2dev

  • Love 2
Link to comment
Share on other sites

  • Honorable Member
On 4/2/2018 at 3:24 PM, ѕeмa™ said:

Ok so, who of you have it bigger?

Definitely DevDick. You can find him several times dicking around in this new leaked root:

t9mQW0e.png

(screenshot by Syreldar)

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 15
Link to comment
Share on other sites

  • 3 weeks later...

Honestly I just registered to call you guys a bunch of dumbasses...

So you have code that will look like:

print1
print2
print3

vs code that you think is better and looks better because its a simple line:

for {x=0} {x<=3;print$x} {x++}

damn sure it'll look better...

but when you have servers with over 10k people on at the same time with tcp/udp connections..

do looks matter vs performance?

that's what you guys should be thinking about

  • Confused 1
Link to comment
Share on other sites

@GostMan 

  • Stop using fake account.
  • You are the most of *dum.... from here, because you didn't really understand the sarcasm which @tierrilopes created it, a guy say on first page: "i can write better the code of official and things which containing a lot a lines I can do on one line.", but he doesn't have idea about coding. And from here start some examples from us and make fun about situation, what's your problem? Oh let me know..you are frustrated because you don't understand how it's working the code from us examples? 
  • Don't try to look smart than us because you aren't, don't come with examples of another language if there's all about Python. That one line here is called as "comprehension python list". For simple conditions is ok to use it, but on that case from the previous replies for multiple function to be called doesn't look very good and should stay on normally style.
  • I'm not sure but you are looking like a romanian which didn't eat nothing since a lot a time.
  • You should stop do spam without sense after some weeks just because you are frustrated, if all people do that which all what they don't like it and hate it what happens with community? If I hate something from guys which talking on some topics should I check now all topics and go and say them "yo guys, you are *dum...? Was ok if you was registered when we was had that discussion, not after some weeks.

Have fun.

  • Love 2
Link to comment
Share on other sites

37 minutes ago, Tasho said:

@GostMan 

  • Stop using fake account.
  • You are the most of *dum.... from here, because you didn't really understand the sarcasm which @tierrilopes created it, a guy say on first page: "i can write better the code of official and things which containing a lot a lines I can do on one line.", but he doesn't have idea about coding. And from here start some examples from us and make fun about situation, what's your problem? Oh let me know..you are frustrated because you don't understand how it's working the code from us examples? 
  • Don't try to look smart than us because you aren't, don't come with examples of another language if there's all about Python. That one line here is called as "comprehension python list". For simple conditions is ok to use it, but on that case from the previous replies for multiple function to be called doesn't look very good and should stay on normally style.
  • I'm not sure but you are looking like a romanian which didn't eat nothing since a lot a time.
  • You should stop do spam without sense after some weeks just because you are frustrated, if all people do that which all what they don't like it and hate it what happens with community? If I hate something from guys which talking on some topics should I check now all topics and go and say them "yo guys, you are *dum...? Was ok if you was registered when we was had that discussion, not after some weeks.

Have fun.

Maybe you should start by reading some book on "how to grasp the english language" before you come around talking shit?

as far as examples go..pretty much most languages are the same...imports/defines/if/then/else/functions/pointers?/arrays/lists and lots of rock music in between :)

funny how you accused me of having a fake account..then of not understanding sarcasm that wasnt?!?

then of not being a python coder when i didn't give you an example in any language at all..just the theory itself...

as far as I know this is an open forum..you don't like being called a dumbass and now a moron and a racist?

then its VERY simple:

don't act like one

Link to comment
Share on other sites

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.