Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Flyff > Flyff Private Server
You last visited: Today at 19:37

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

Advertisement



[Source] PenyaToPerin

Discussion on [Source] PenyaToPerin within the Flyff Private Server forum part of the Flyff category.

Reply
 
Old   #1
 
[LS]Michael's Avatar
 
elite*gold: 15
Join Date: Oct 2007
Posts: 450
Received Thanks: 474
[Source] PenyaToPerin

wollte eine function schreiben die penya in perin umtauscht blos irgendwie erfüllt sie nicht ihre aufgabe würde mich freuen wen mir einer helfen kann woran das liegt

PHP Code:
BOOL TextCmd_penyatoperinCScannerscanner )
{
scanner.GetToken();
#ifdef __WORLDSERVER
    
DWORD dwNum;
    
DWORD dwCharged        0;
    
CItemElem itemElem;
    
CUserpUser    = (CUser*)scanner.dwValue;
    
CWorldpWorld    pUser->GetWorld();
        
int MaxPenya pUser->GetGold();
        
int Count 0;
            while( 
MaxPenya >= 100000000 )
            {
                
Count += 1;
                
MaxPenya -= 100000000;
            }
            
dwNum Count;
        
itemElem.m_dwItemId        26456;
        
itemElem.m_nItemNum        = (short)( dwNum );
        
pUser->AddGold( (Count*100000000) * (-1) );
        
pUser->CreateItem( &itemElem);//, &nId 
        
g_dpDBClient.SavePlayerpUserpWorld->GetID(), pUser->GetPos(), pUser->GetLayer() );
        
char message[255];
        
sprintfmessage"You received %d %s"CountitemElem.GetName() );
    
#endif    // __WORLDSERVER
return TRUE;

[LS]Michael is offline  
Old 05/10/2012, 16:01   #2
 
elite*gold: 0
Join Date: May 2012
Posts: 16
Received Thanks: 5
Frag mal sedrika, er hat es auch.
DarknessFighter is offline  
Old 05/10/2012, 16:03   #3
 
[LS]Michael's Avatar
 
elite*gold: 15
Join Date: Oct 2007
Posts: 450
Received Thanks: 474
der gibt mir ja kein support^^
[LS]Michael is offline  
Old 05/10/2012, 16:21   #4
 
lolix3's Avatar
 
elite*gold: 10
Join Date: Sep 2010
Posts: 348
Received Thanks: 298
Penya to perin

Hier ersetz die Funktion in User.cpp

PHP Code:
void CUser::AddGoldTextint nPlus )
{
    
char szPlus[64];
    
char szGold[64];

    
sprintfszPlus"%d"nPlus );
    
sprintfszGold"%d"GetGold() );

    
CString strPlus GetNumberFormatExszPlus );
    
CString strGold GetNumberFormatExszGold );

    if( 
GetGold() > 2100000000 &&  this->m_Inventory.GetEmptyCount() == && CMover::GetPerinNum() > )
    {
        
CItemElem pItem;
        
pItem.m_nItemNum CMover::GetPerinNum() + 21;
        
pItem.m_bCharged TRUE;
        
pItem.m_dwItemId II_SYS_SYS_SCR_PERIN;
        
BYTE nID;
        
CMover::RemovePerinCMover::GetPerinNum() );
        
CreateItem( &pItem, &nID );
        
AddGold( -2100000000 );
        
AddDefinedTextTID_GAME_MAKEPERIN );
    }
    else if (
GetGold() > 2100000000 &&  this->m_Inventory.GetEmptyCount() > && CMover::GetPerinNum() == 0)
    {
        
CItemElem pItem;
        
pItem.m_nItemNum 21;
        
pItem.m_bCharged TRUE;
        
pItem.m_dwItemId II_SYS_SYS_SCR_PERIN;
        
BYTE nID;
        
CreateItem( &pItem, &nID );
        
AddGold( -2100000000 );
        
AddDefinedTextTID_GAME_MAKEPERIN );
    }
    else if (
GetGold() > 2100000000 &&  this->m_Inventory.GetEmptyCount() > && CMover::GetPerinNum() > 1)
    {
        
CItemElem pItem;
        
pItem.m_nItemNum 21;
        
pItem.m_bCharged TRUE;
        
pItem.m_dwItemId II_SYS_SYS_SCR_PERIN;
        
BYTE nID;
        
CreateItem( &pItem, &nID );
        
AddGold( -2100000000 );
        
AddDefinedTextTID_GAME_MAKEPERIN );
    }
    else if (
GetGold() > 2100000000 &&  this->m_Inventory.GetEmptyCount() == && CMover::GetPerinNum() == 0)
    {
        
AddDefinedTextTID_GAME_MAKEPERIN_FAILURE );
    }

    
AddDefinedTextTID_GAME_REAPMONEY"%s %s"strPlusstrGold );

Dann DefineText.h (Source & Resource)

PHP Code:
#define TID_GAME_MAKEPERIN 4702
#define TID_GAME_MAKEPERIN_FAILURE 4703 
textClient.inc

PHP Code:
TID_GAME_MAKEPERIN    0xffbb00
{
    
IDS_TEXTCLIENT_INC_100000
}
TID_GAME_MAKEPERIN_FAILURE    0xff0000
{
    
IDS_TEXTCLIENT_INC_100001

textClient.txt.txt

PHP Code:
IDS_TEXTCLIENT_INC_100000    Es wurden 21 Perins erstelltDer Betrag wurde von deinen Penya abgezogen.
IDS_TEXTCLIENT_INC_100001    Es konnten keine Perins erstellt werdenbitte prüfe dein Inventar
Perin Stacks werden beibehalten, es werden nur Perins erstellt / Penya abgezogen wenn Inventar Platz hat, oder ein Perin Stack vorhanden ist. Es wird eine (goldene xD) Nachricht ausgegeben, wenn die Perins erstellt wurden, oder eine (rote) ausgegeben, wenn kein Platz im Inventar ist.

Credits by Yakuzai.

Hoffe es ist das was du brauchst, oder brauchen kannst.

Gruss lolix3 ;>
lolix3 is offline  
Thanks
1 User
Old 05/10/2012, 17:22   #5
 
[LS]Michael's Avatar
 
elite*gold: 15
Join Date: Oct 2007
Posts: 450
Received Thanks: 474
optimal wäre ja noch wen ich meine function auch zum laufen griege
[LS]Michael is offline  
Old 05/10/2012, 19:59   #6
 
elite*gold: 4
Join Date: Mar 2010
Posts: 3,148
Received Thanks: 1,535
Code:
BOOL TextCmd_penyatoperin( CScanner& scanner )
{
scanner.GetToken();
#ifdef __WORLDSERVER
	DWORD dwCharged		= 0;
	CItemElem itemElem;
	CUser* pUser	= (CUser*)scanner.dwValue;
	CWorld* pWorld	= pUser->GetWorld();
		int MaxPenya = pUser->GetGold();
		int Count = 0;
			while( MaxPenya >= 100000000 )
			{
				Count += 1;
				MaxPenya -= 100000000;
			}

        itemElem.m_nItemNum = CMover::GetPerinNum() + Count;
        itemElem.m_bCharged = TRUE;
	itemElem.m_dwItemId = II_SYS_SYS_SCR_PERIN;
        BYTE nID;
        pUser->CreateItem( &pItem, &nID );
        pUser->AddGold( (Count*100000000) * (-1) );
		g_dpDBClient.SavePlayer( pUser, pWorld->GetID(), pUser->GetPos(), pUser->GetLayer() );
CString message;
message.Format( "You received %d %s", Count, itemElem.GetName() );
pUser->AddText(message);

#endif	// __WORLDSERVER
return TRUE;
}
vllt. so?
Jopsi332 is offline  
Thanks
1 User
Old 05/11/2012, 08:40   #7
 
elite*gold: 0
Join Date: Mar 2008
Posts: 665
Received Thanks: 227
itemElem.m_nItemNum = CMover::GetPerinNum() + Count;

short for get ammount.
alfredico is offline  
Old 05/11/2012, 12:35   #8



 
Sedrika's Avatar
 
elite*gold: 18
The Black Market: 103/0/0
Join Date: Sep 2009
Posts: 20,177
Received Thanks: 14,471
Quote:
Originally Posted by [LS]Michael View Post
der gibt mir ja kein support^^
Ich hab es dir doch noch gestern per ICQ geschrieben....

PHP Code:
BOOL TextCmd_PenyaToPerinCScannerscanner )
{
#ifdef __WORLDSERVER
    
CUserpUser = (CUser*)scanner.dwValue;

    
CItemElem itemElem;
    
itemElem.m_dwItemId II_SYS_SYS_SCR_PERIN;
    
itemElem.m_nItemNum 0;
    
itemElem.m_bCharged TRUE;
    
BYTE nId;

    
int MaxPenya pUser->GetGold();
    
int Count 0;
    while( 
MaxPenya >= 100000000 ){
        
Count += 1;
        
MaxPenya -= 100000000;
    }

    
itemElem.m_nItemNum Count;
    
pUser->AddGold( (Count*100000000) * (-1) );

    
DWORD dwRetVal pUser->CreateItem( &itemElem, &nId );

    
char message[255];
    if( 
dwRetVal ){
        
sprintfmessage"You received %d %s"CountitemElem.GetName() );
    }else{
        
sprintfmessage"%d %s has been send to your PostBox"CountitemElem.GetName() );
        
LogItemInfo aLogItem;
        
aLogItem.Action "S";
        
aLogItem.SendName pUser->GetName();
        
aLogItem.WorldId pUser->GetWorld()->GetID();
        
aLogItem.Gold aLogItem.Gold2 pUser->GetGold();

        
g_dpDBClient.SendQueryPostMailpUser->m_idPlayer0itemElem0"""" );
        
aLogItem.RecvName "PenyaToPerin";
        
g_DPSrvr.OnLogItemaLogItem, &itemElemitemElem.m_nItemNum );
    }
    
pUser->AddTextmessage );
#endif //__WORLDSERVER
    
return TRUE;

Und es funktioniert...
Sedrika is offline  
Old 05/11/2012, 20:26   #9
 
[LS]Michael's Avatar
 
elite*gold: 15
Join Date: Oct 2007
Posts: 450
Received Thanks: 474
Schau mal Aufe zeit
[LS]Michael is offline  
Reply


Similar Threads Similar Threads
[WTS] Steam ACC - Counter Strike Source, Day of Defeat: Source und Half-Life 2: Death
12/12/2010 - Counter-Strike Trading - 1 Replies
Delete.
[Biete]COD6 Modern Warfare 2 Steam Accounts + CS:Source + DoD:Source
04/17/2010 - Steam Trading - 9 Replies
Hallo, ich biete hier einen Call of Duty 6 - Modern Warfare (UNCUT + RETAIL) Steam Account an. 1. STEAM-Account Call Of Duty 6 - Modern Warfare 2 + Cunter-Strike: Source + Day Of Defeat: Source SOLD! http://img199.imageshack.us/img199/7035/steamaccou nt1.png Des weiteren biete ich hier noch einen orignalen Uncut Modern Warfare 2 Steam Account mit VAC Bann an, welcher jedoch im Single Player problemlos zu spielen ist.
[Request]Black&White Source or other source for version 5065 or 5095
04/11/2009 - CO2 Private Server - 22 Replies
I need Source Black and White or from other server i wanna Start a server.. All who help me will got Pm or Gm on my server.. ________
[Release]How To Make Tq Source Work + Working Source + Server ByBass + Commands
12/08/2008 - CO2 PServer Guides & Releases - 15 Replies
1: How To Make The Server Work In fact, before other people did not just let ACC now with hi EACC Columbia landing on the settlement of the issue, and the rest is our own how to improve the content of those interested can improve the next. MY MY set and the same. INI MAP INI files and MAP with the client-to-date coverage of the account. server.dat ! And then as long as the client will be able to modify server.dat! 127.0.0.1 192.168.0.1 192.168.1.1 IP。 Please do generally use...



All times are GMT +2. The time now is 19: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.