Jump to content

Recommended Posts

  • Honorable Member

C++ or LUA?

LUA: SetPolymorph(math.random(10000, 10100), true); OR SetPolymorph(number(10000, 10100), true);
C++: SetPolymorph(number(10000, 10100), true);
 
You can use the 2nd solution for both but there is a difference in LUA:
local var = number(1, 10);
local var2 = math.random(1, 10);
for i = 1, 10 do
     chat(var);
     chat(var2);
end -- for
 
will return a different output:
math.random will save the value in the variable, so "chat(var2)" will always return the same number.
while chat(var) will ALWAYS return a different number, cause the "number" function will always randomize the output, even if you save it in a variable, it doesn't save its value.
 
  • 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
https://metin2.dev/topic/13722-private-shop-random/#findComment-78128
Share on other sites

1 hour ago, NabbHackeR said:

C++ or LUA?

LUA: SetPolymorph(math.random(10000, 10100), true); OR SetPolymorph(number(10000, 10100), true);
C++: SetPolymorph(number(10000, 10100), true);
 
You can use the 2nd solution for both but there is a difference in LUA:
local var = number(1, 10);
local var2 = math.random(1, 10);
for i = 1, 10 do
     chat(var);
     chat(var2);
end -- for
 
will return a different output:
math.random will save the value in the variable, so "chat(var2)" will always return the same number.
while chat(var) will ALWAYS return a different number, cause the "number" function will always randomize the output, even if you save it in a variable, it doesn't save its value.
 

Nice functions.So this can be used in manny things...I want to make an quest so player with an special item can change his level random.With your function its easy.

Link to comment
https://metin2.dev/topic/13722-private-shop-random/#findComment-78133
Share on other sites

  • Honorable Member
11 hours ago, Thanatos said:

Nice functions.So this can be used in manny things...I want to make an quest so player with an special item can change his level random.With your function its easy.

yes

http://pastebin.com/Bz1WMCVP

  • 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
https://metin2.dev/topic/13722-private-shop-random/#findComment-78148
Share on other sites

  • Honorable Member
7 minutes ago, Thanatos said:

Ohh,Thank you!

yw!

 

"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
https://metin2.dev/topic/13722-private-shop-random/#findComment-78153
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.