Register for your free account! | Forgot your password?

You last visited: Today at 22:07

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Quest: number(a, b)

Discussion on Quest: number(a, b) within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
Yiv's Avatar
 
elite*gold: 47
Join Date: Feb 2012
Posts: 2,282
Received Thanks: 2,579
Quest: number(a, b)

Liebe Community,

ich habe eine kleine Quest geschrieben, mit einer Tabelle von 1-14 also:
Code:
			[1] = {28030},
			[2] = {28031},
			[3] = {28032},
			[4] = {28033},
			[5] = {28034},
			[6] = {28035},
			[7] = {28036},
			[8] = {28037},
			[9] = {28038},
			[10] = {28039},
			[11] = {28040},
			[12] = {28041},
			[13] = {28042},
			[14] = {28043}
Nun möchte ich mit
PHP Code:
number(ab
eine Zufallszahl von 1-14 generieren.

Wie muss die Spanne sein?
PHP Code:
number(114)

-----

number(014)

-----

number(015
MfG
Yiv is offline  
Old 08/12/2013, 18:53   #2
 
elite*gold: 32
Join Date: Dec 2010
Posts: 1,294
Received Thanks: 862
number(28030, 28043) wäre in deinem Fall am einfachsten, dann brauchst du auch keine Tabelle.
√π. is offline  
Old 08/12/2013, 19:19   #3
 
Yiv's Avatar
 
elite*gold: 47
Join Date: Feb 2012
Posts: 2,282
Received Thanks: 2,579
Doch, da dort noch Sachen hinzugefügt werden

Also number(1, 14)?

MfG
Yiv is offline  
Old 08/12/2013, 19:21   #4

 
elite*gold: 0
Join Date: Mar 2013
Posts: 2,449
Received Thanks: 6,446
number(1, table.getn([name der table])) geht auch.
Das macht es sozusagen dynamisch da eine Zahl zwischen 1 und dem letzten Index der Tabelle generiert wird.
Lord iRemix is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
[SPECIAL TEAM_WARP QUEST]'nd Metin2 Sweet Time Quest's Icons and News
01/27/2013 - Metin2 PServer Guides & Strategies - 22 Replies
deleted!
Compile all quest without quest's files list // Kompilieren Sie alle Quest ohne Quest
07/17/2011 - Metin2 PServer Guides & Strategies - 3 Replies
ENGLISH Hello dear community, this is a very simple guide but at the same time useful. How to compile ALL quest in the folder "quest" without the files list in the file "locale_list"? Easy! Open the file "make" and replace the content of the file with this: for f in *.quest; do ./qc $f; done Oki. Now set the 0777 permission to the file. Finally open a SSH client and sign in. Write the command: cd /game_file_folder



All times are GMT +1. The time now is 22:07.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.