|
You last visited: Today at 01:37
Advertisement
[Source]Random Background
Discussion on [Source]Random Background within the Flyff PServer Guides & Releases forum part of the Flyff Private Server category.
08/06/2012, 00:03
|
#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.
|
|
|
08/06/2012, 02:12
|
#2
|
elite*gold: 142
Join Date: Apr 2010
Posts: 859
Received Thanks: 428
|
PHP Code:
char* DAFUQ[] = { "Screen1.bmp", "Screen2.bmp", "Screen3.bmp", "Screen4.bmp" }; DWORD dwScreenTarget = xRandom(0,3); m_texWallPaper.LoadTexture( m_pd3dDevice, MakePath( "Theme\\", ::GetLanguage(), DAFUQ[dwScreenTarget), 0xff0000 );
(C) Sandy
|
|
|
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 **** :>?
|
|
|
08/06/2012, 13:03
|
#4
|
elite*gold: 0
Join Date: Nov 2011
Posts: 395
Received Thanks: 231
|
Quote:
Originally Posted by alfredico
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
|
|
|
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.
|
|
|
08/06/2012, 14:50
|
#6
|
elite*gold: 0
Join Date: Nov 2011
Posts: 395
Received Thanks: 231
|
Quote:
Originally Posted by ©ross
PHP Code:
char* DAFUQ[] = { "Screen1.bmp", "Screen2.bmp", "Screen3.bmp", "Screen4.bmp" }; DWORD dwScreenTarget = xRandom(0,3); m_texWallPaper.LoadTexture( m_pd3dDevice, MakePath( "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 );
|
|
|
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 rly geht...
|
|
|
08/06/2012, 23:43
|
#8
|
elite*gold: 0
Join Date: Nov 2011
Posts: 395
Received Thanks: 231
|
Quote:
Originally Posted by ©ross
@Unleashed wenn das geht..^^
Bin mir nicht sicher ob 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
|
|
|
08/07/2012, 15:02
|
#9
|
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
|
|
|
08/07/2012, 15:23
|
#10
|
elite*gold: 0
Join Date: Nov 2011
Posts: 395
Received Thanks: 231
|
Quote:
Originally Posted by Pumbaaa
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?
|
|
|
08/07/2012, 15:30
|
#11
|
elite*gold: 20
Join Date: Apr 2009
Posts: 804
Received Thanks: 828
|
CMapInformationManager::LoadMapInformationData
|
|
|
08/07/2012, 16:44
|
#12
|
elite*gold: 0
Join Date: Jun 2012
Posts: 194
Received Thanks: 417
|
Quote:
Originally Posted by Pumbaaa
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')
|
|
|
08/07/2012, 16:49
|
#13
|
elite*gold: 20
Join Date: Apr 2009
Posts: 804
Received Thanks: 828
|
Quote:
Originally Posted by Aspectus
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^^
|
|
|
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.
|
|
|
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.
|
|
|
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.
|
|