Register for your free account! | Forgot your password?

You last visited: Today at 01:37

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

Advertisement



[Source]Random Background

Discussion on [Source]Random Background within the Flyff PServer Guides & Releases forum part of the Flyff Private Server category.

Reply
 
Old   #1
 
elite*gold: 4
Join Date: Mar 2010
Posts: 3,148
Received Thanks: 1,535
[Source]Random Background

Ich wollt euch nur mal schnell zeigen wie ihr Zufalls backgrounds laden lasst ( heißt immer ein anderen Login hintergrund )

ist ziemlich simpel was ihr tun musst ist euhc die screens zu erstellen oder zu laden.

Einfahc in itheme.cpp
die Funtion suchen
Code:
BOOL CTheme::LoadTheme( LPDIRECT3DDEVICE9 pd3dDevice, LPCTSTR lpszFileName)
darin das suchen
Code:
			m_texWallPaper.LoadTexture( m_pd3dDevice, MakePath( "Theme\\", ::GetLanguage(), scanner.token ), 0xff0000 );
und durch das ersetzen
Code:
#define __RANDOM_WALLPAPER
#ifdef __RANDOM_WALLPAPER
			CString Filename;
			int i = xRandom(3); // 1 , 2 , or 3
			switch(i)
			{
				case 1 : Filename = "screen1"; break; // first screen
				case 2: Filename = "screen2"; break; // second screen
				case 3: Filename = "screen3"; break; // third screen
				default : Filename = "screen";break; // no white screen please :D
			}
					Filename += ".bmp"; // its a bmp 
					m_texWallPaper.LoadTexture( m_pd3dDevice, MakePath( "Theme\\", ::GetLanguage(), Filename ), 0xff0000 ); // load the Random bG


#else
			m_texWallPaper.LoadTexture( m_pd3dDevice, MakePath( "Theme\\", ::GetLanguage(), scanner.token ), 0xff0000 );
#endif
schon läd er die Random screens ( genannt screen, screen1 screen2 und screen 3 )

xRandom müsste auch eine 0 mit generieren deswegen screen auch.
Jopsi332 is offline  
Thanks
5 Users
Old 08/06/2012, 02:12   #2

 
elite*gold: 142
Join Date: Apr 2010
Posts: 859
Received Thanks: 428
PHP Code:
charDAFUQ[] = { "Screen1.bmp""Screen2.bmp""Screen3.bmp""Screen4.bmp" };
DWORD dwScreenTarget xRandom(0,3);
m_texWallPaper.LoadTexturem_pd3dDeviceMakePath"Theme\\", ::GetLanguage(), DAFUQ[dwScreenTarget), 0xff0000 ); 
(C) Sandy
©ross is offline  
Thanks
4 Users
Old 08/06/2012, 08:29   #3
 
elite*gold: 0
Join Date: Mar 2008
Posts: 665
Received Thanks: 227
What's the point to keep increasing the client load time with this **** :>?
alfredico is offline  
Old 08/06/2012, 13:03   #4
 
Unleashed!'s Avatar
 
elite*gold: 0
Join Date: Nov 2011
Posts: 395
Received Thanks: 231
Quote:
Originally Posted by alfredico View Post
What's the point to keep increasing the client load time with this **** :>?
Hm, dunno what this should do, but i dont think that the client loadtime will be effected much ;D
Unleashed! is offline  
Old 08/06/2012, 14:03   #5
 
elite*gold: 4
Join Date: Mar 2010
Posts: 3,148
Received Thanks: 1,535
it doesnt took more time to load.
Jopsi332 is offline  
Old 08/06/2012, 14:50   #6
 
Unleashed!'s Avatar
 
elite*gold: 0
Join Date: Nov 2011
Posts: 395
Received Thanks: 231
Quote:
Originally Posted by ©ross View Post
PHP Code:
charDAFUQ[] = { "Screen1.bmp""Screen2.bmp""Screen3.bmp""Screen4.bmp" };
DWORD dwScreenTarget xRandom(0,3);
m_texWallPaper.LoadTexturem_pd3dDeviceMakePath"Theme\\", ::GetLanguage(), DAFUQ[dwScreenTarget), 0xff0000 ); 
(C) Sandy
Noch kürzer:
Code:
char* DAFUQ[] = { "Screen1.bmp", "Screen2.bmp", "Screen3.bmp", "Screen4.bmp" };
m_texWallPaper.LoadTexture( m_pd3dDevice, MakePath( "Theme\\", ::GetLanguage(), DAFUQ[xRandom(0,3)], 0xff0000 );
Unleashed! is offline  
Thanks
2 Users
Old 08/06/2012, 20:46   #7

 
elite*gold: 142
Join Date: Apr 2010
Posts: 859
Received Thanks: 428
@Unleashed wenn das geht..^^
Bin mir nicht sicher ob
Code:
[xRandom()]
rly geht...
©ross is offline  
Old 08/06/2012, 23:43   #8
 
Unleashed!'s Avatar
 
elite*gold: 0
Join Date: Nov 2011
Posts: 395
Received Thanks: 231
Quote:
Originally Posted by ©ross View Post
@Unleashed wenn das geht..^^
Bin mir nicht sicher ob
Code:
[xRandom()]
rly geht...
Klar geht das, xRandom ist genau so ein int/Integer wie z.B. m_nGold. Und da ein Array als Index immer einen int/DWORD etc. erwartet, gibts damit auch kein Problem. ;D
Unleashed! is offline  
Old 08/07/2012, 15:02   #9
 
Pumbaaa's Avatar
 
elite*gold: 20
Join Date: Apr 2009
Posts: 804
Received Thanks: 828
Die Client Ladezeit hat ne andere Ursache, es liegt lediglich an einer Sache, dass der Client ca 14 Sekunden länger lädt.

Diese Aktion dauert vllt nen paar Millisekunden
Pumbaaa is offline  
Thanks
1 User
Old 08/07/2012, 15:23   #10
 
Unleashed!'s Avatar
 
elite*gold: 0
Join Date: Nov 2011
Posts: 395
Received Thanks: 231
Quote:
Originally Posted by Pumbaaa View Post
Die Client Ladezeit hat ne andere Ursache, es liegt lediglich an einer Sache, dass der Client ca 14 Sekunden länger lädt.

Diese Aktion dauert vllt nen paar Millisekunden
Wobei manche Server die Sache wohl schon gefunden haben. Möchtest du uns nicht aufklären?
Unleashed! is offline  
Old 08/07/2012, 15:30   #11
 
Pumbaaa's Avatar
 
elite*gold: 20
Join Date: Apr 2009
Posts: 804
Received Thanks: 828
CMapInformationManager::LoadMapInformationData
Pumbaaa is offline  
Thanks
1 User
Old 08/07/2012, 16:44   #12
 
elite*gold: 0
Join Date: Jun 2012
Posts: 194
Received Thanks: 417
Quote:
Originally Posted by Pumbaaa View Post
CMapInformationManager::LoadMapInformationData
Beschränken wir es mal auf die Funktion LoadPropMapComboBoxData, sonst kommentieren die Noobs die ganze Funktion aus, wäre ja unnötig.
Aber wenn ihr LoadPropMapComboBoxData auskommentiert, wird euere Map nicht mehr funzen. (Hotkey 'M')
Aspectus is offline  
Old 08/07/2012, 16:49   #13
 
Pumbaaa's Avatar
 
elite*gold: 20
Join Date: Apr 2009
Posts: 804
Received Thanks: 828
Quote:
Originally Posted by Aspectus View Post
Beschränken wir es mal auf die Funktion LoadPropMapComboBoxData, sonst kommentieren die Noobs die ganze Funktion aus, wäre ja unnötig.
Aber wenn ihr LoadPropMapComboBoxData auskommentiert, wird euere Map nicht mehr funzen. (Hotkey 'M')
Ich könnts auch weiter beschränken, aber dann hätt ich ja kein Spaß mehr bei^^
Pumbaaa is offline  
Thanks
1 User
Old 08/07/2012, 21:05   #14
 
elite*gold: 0
Join Date: Mar 2008
Posts: 665
Received Thanks: 227
Load the map picture when the map is selected on the window, it may take around a second to load.
alfredico is offline  
Old 08/17/2012, 19:44   #15
 
elite*gold: 0
Join Date: Dec 2011
Posts: 92
Received Thanks: 61
Hast'n Thanks. Ist ganz nett das mit den random bg's.
SteamSwag is offline  
Reply


Similar Threads Similar Threads
[Release]Random NPCs for -impulse-'s source
05/24/2013 - CO2 PServer Guides & Releases - 17 Replies
Hello, I will share with you a few NPCs I made for -impulse-'s source. First is the SurgeonMiracle NPC to change size/gender for one dragonball. In Dialogs.cs #region SurgeonMiracle case 111812: { switch (npcRequest.OptionID)
Giving random stuff Albetros Source
03/14/2012 - CO2 Private Server - 3 Replies
Hi there, I know how to make a NPC, but I don't know how to give random stuff away. I use the Albetros source. Kind regards, Warzie005
[HELP] Random drops of exp potion +stones on source conquersx 5165 plz
01/20/2012 - CO2 Private Server - 3 Replies
I for the life of me cant figure out why these things are still dropping i have changed abut everything for the drops and nothing working if someone could plz plz help i need big big help ty all.



All times are GMT +2. The time now is 01:37.


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.