Register for your free account! | Forgot your password?

You last visited: Today at 09:58

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

Advertisement



Release __BS_EFFECT_LUA FIXXED

Discussion on Release __BS_EFFECT_LUA FIXXED within the Flyff PServer Guides & Releases forum part of the Flyff Private Server category.

Reply
 
Old 12/02/2011, 12:58   #31
 
elite*gold: 2
Join Date: Jul 2009
Posts: 1,447
Received Thanks: 923
Das ist nicht das, was ich meine. :>

Such das fopen darunter.
.Crasy is offline  
Old 12/02/2011, 13:40   #32
 
elite*gold: 0
Join Date: Oct 2011
Posts: 178
Received Thanks: 113
Quote:
Originally Posted by .Crasy View Post
Das ist nicht das, was ich meine. :>

Such das fopen darunter.
Ju, meinte deine Beschreibung wegen Path un so.

Bzw, ich würde gern mal wissen was bei manchen nicht geht o.O
Sekkusu[DW] is offline  
Old 12/02/2011, 15:37   #33
 
elite*gold: 0
Join Date: Oct 2008
Posts: 275
Received Thanks: 68
also nach

static const CString strPATH( "SFX\\Scripts\\" );
static const CString strFORMAT(".lua");
char szFunc[ 64 ];
GetFileTitle( szMoverName, szFunc );
CString strFileName = CString( szFunc ) + strFORMAT;
CString strFullPath = strPATH + strFileName;

suchen
und das Internal Server in Client ändern ?
Das klingt zu leicht aber mal schaun obs funzt xD



edit :

Tatsache ...
Echt Einfach ....
Vielen Dan Crasy
guardianangel is offline  
Thanks
1 User
Old 12/09/2011, 14:38   #34
 
Ultimate™'s Avatar
 
elite*gold: 40
Join Date: Aug 2011
Posts: 453
Received Thanks: 281
ich verstehs nicht mein pfad ist jetzt z.B SFX/Scripts so wie es im source steht bei mir und trotzdem gehts nicht :x
Ultimate™ is offline  
Old 12/09/2011, 15:43   #35
 
elite*gold: 0
Join Date: Oct 2008
Posts: 275
Received Thanks: 68
schau dir doch bitte meinen Post an dann weisst du wie mans Fixxt ^^
Dieses Release hier ist eher ein Fail ...
Aber wie über deinem Post steht ...
Den Abschnitt musst du finden
ein kleines Stück darunter findest du eine Define ...
wo InternalServer steht ...
daraus machst du Client
weil der Server nix damit zu tun hat ^^
guardianangel is offline  
Old 12/09/2011, 19:03   #36
 
elite*gold: 0
Join Date: Nov 2008
Posts: 178
Received Thanks: 10
Hab nun InternalServer zu #ifdef __Client geändert aber nun kommt der error run_lua_sfx : attempt to call a nil value
greenmong is offline  
Old 12/09/2011, 20:07   #37
 
Achileus's Avatar
 
elite*gold: 74
Join Date: Apr 2009
Posts: 5,908
Received Thanks: 2,386
schreib mal alles groß so CLIENT
Achileus is offline  
Old 12/09/2011, 20:12   #38
 
elite*gold: 0
Join Date: Nov 2008
Posts: 178
Received Thanks: 10
ist es
Quote:
#ifdef __CLIENT
if( m_nTexFrame > 1 )
{ // ÅØ½ºÃÄ ¾Ö´Ï¸ÞÀ̼ÇÀÏ °æ¿ì
SfxKeyFrame* pFirstKey=GetNextKey(0);
if(nFrame<pFirstKey->nFrame) return;
int nTexFrame= (m_nTexFrame*(nFrame-pFirstKey->nFrame)/m_nTexLoop)%m_nTexFrame; // ÀÌ ÇÁ·¹ÀÓ¿¡¼* Ãâ·ÂÇÒ ÅØ½ºÃÄ ¹øÈ£
CSfxMng::m_pd3dDevice->SetTexture(0,g_SfxTex.Tex(GetTextureName(m_strTex ,nTexFrame)));
}
else
CSfxMng::m_pd3dDevice->SetTexture( 0, g_SfxTex.Tex( m_strTex ) );
SfxKeyFrame* pPrevKey = GetPrevKey( nFrame );
SfxKeyFrame* pNextKey = GetNextKey( nFrame );
if( pPrevKey == NULL || pNextKey == NULL ) return;
SfxKeyFrame Key;
int dFrame = pNextKey->nFrame-pPrevKey->nFrame;
Key = *(pPrevKey);
// ¾ÕµÚ keyframeÀ» »öÃâÇÏ¿© ÇöÀç ۰ªÀ» »êÃâÇØ ³½´Ù.
if( dFrame != 0 )
{
Key.vPos += (pNextKey->vPos - pPrevKey->vPos) * (FLOAT)( (nFrame - pPrevKey->nFrame) ) / (FLOAT)( dFrame );
Key.vPosRotate += (pNextKey->vPosRotate - pPrevKey->vPosRotate) * (FLOAT)( (nFrame - pPrevKey->nFrame) ) / (FLOAT)( dFrame );
Key.vRotate += (pNextKey->vRotate - pPrevKey->vRotate) * (FLOAT)( (nFrame - pPrevKey->nFrame) ) / (FLOAT)( dFrame );
Key.vScale += (pNextKey->vScale - pPrevKey->vScale) * (FLOAT)( (nFrame - pPrevKey->nFrame) ) / (FLOAT)( dFrame );
Key.nAlpha += (pNextKey->nAlpha - pPrevKey->nAlpha) * (nFrame - pPrevKey->nFrame)/dFrame;
}

D3DXMATRIX matTemp,matTemp1,matTemp2;
D3DXMATRIX matTrans,matAngle,matScale,matInv;
D3DXVECTOR3 vTemp;
D3DXVECTOR3 vScaleTemp = vScale;
vScaleTemp.x *= Key.vScale.x;
vScaleTemp.y *= Key.vScale.y;
vScaleTemp.z *= Key.vScale.z;
// ÅØ½ºÃÄ Å¸ÀÔ¿¡ µû¶ó world ¸ÅÆ®¸¯½º¸¦ ¼³Á¤ÇÑ´Ù
switch(m_nBillType)
{
case SFXPARTBILLTYPE_BILL: // ºôº¸µåÀ̸é
{ // ¹«Á¶°Ç È*¸éÀ» Á¤¸éÀ¸·Î ¹Ù¶óº¸°Ô ÇÑ´Ù.
D3DXMatrixRotationZ( &matAngle, DEGREETORADIAN( Key.vRotate.z ) );
D3DXMatrixScaling( &matScale, vScaleTemp.x, vScaleTemp.y, vScaleTemp.z );
matTemp2=g_matView; matTemp2._41=matTemp2._42=matTemp2._43=.0f;
// D3DXMatrixInverse(&matInv,NULL,&matTemp2);
matTemp=matScale*matAngle*g_matInvView;
break;
}
case SFXPARTBILLTYPE_BOTTOM: // ¹Ù´Ú¿¡ ±ò¸®´Â ³ðÀ̸é
{ // xÃàÀ¸·Î 90µµ µ¹¸°´Ù.
D3DXMatrixRotationZ( &matAngle, DEGREETORADIAN( Key.vRotate.z - fAngle.z ) );
D3DXMatrixScaling( &matScale, vScaleTemp.x, vScaleTemp.y, vScaleTemp.z );
D3DXMatrixRotationX( &matTemp2,DEGREETORADIAN( 90 ) );
matTemp = matScale * matAngle * matTemp2;
break;
}
case SFXPARTBILLTYPE_POLE:
{ // ÀÌ°Ç ±âµÕÀε¥ ¾ÆÁ÷ ¾ÈÇß´Ù.
D3DXMatrixRotationZ( &matAngle, DEGREETORADIAN( Key.vRotate.z ) );
D3DXMatrixScaling( &matScale, vScaleTemp.x, vScaleTemp.y, vScaleTemp.z );
matTemp2 = g_matView; matTemp2._41 = matTemp2._42 = matTemp2._43 = .0f;
// D3DXMatrixInverse(&matInv,NULL,&matTemp2);
matTemp = matScale * matAngle * g_matInvView;
break;
}
case SFXPARTBILLTYPE_NORMAL: // º¸ÅëÀ̸é.
{ // ±×³É º¸Åë ¿ÀºêÁ§Æ®Ã³·³...
D3DXMATRIX mRot;
D3DXVECTOR3 vRot = DEGREETORADIAN(fAngle);
D3DXVECTOR3 vTemp2=DEGREETORADIAN( Key.vRotate );
D3DXMatrixRotationYawPitchRoll( &matAngle, vTemp2.y, vTemp2.x, vTemp2.z );
D3DXMatrixRotationYawPitchRoll(&mRot,vRot.y,vRot.x ,vRot.z);
D3DXMatrixScaling( &matScale, vScaleTemp.x, vScaleTemp.y, vScaleTemp.z );
matTemp = matScale * matAngle * mRot;
break;
}
}
D3DXMATRIX mRot;
D3DXVECTOR3 vRot = DEGREETORADIAN(fAngle);
D3DXVECTOR3 vTemp2=DEGREETORADIAN(Key.vPosRotate); // À§Ä¡È¸Àü°ª¿¡ ÀÇÇÑ »õ·Î¿î À§Ä¡µµ °è»êÇϰí
D3DXMatrixRotationYawPitchRoll(&matTemp2,vTemp2.y, vTemp2.x,vTemp2.z);
D3DXMatrixRotationYawPitchRoll(&mRot,vRot.y,vRot.x ,vRot.z);

matTemp2 = mRot * matTemp2;

D3DXVec3TransformCoord(&vTemp,&Key.vPos,&matTemp2) ;
D3DXMatrixTranslation( &matTrans,
vPos.x + ( vTemp.x * vScale.x ),
vPos.y + ( vTemp.y * vScale.y ),
vPos.z + ( vTemp.z * vScale.z )
);
matTemp1=matTemp*matTrans;

switch(m_nAlphaType) { // ¾ËÆÄÀÇ ¿ëµµ¿¡ µû¶ó ·»´õ ½ºÅ×ÀÌÆ®¸¦ ¹Ù²ãÁØ´Ù
case SFXPARTALPHATYPE_BLEND: // ºí·»µåÀ̸é
{ // ¹ÝÅõ¸í ¼³Á¤À¸·Î...
CSfxMng::m_pd3dDevice->SetRenderState( D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA );
break;
}
case SFXPARTALPHATYPE_GLOW: // ±Û·Î¿ì¸é
{ // ¹«Á¶°Ç ´õÇϴ°ɷÎ...
CSfxMng::m_pd3dDevice->SetRenderState( D3DRS_DESTBLEND, D3DBLEND_ONE );
break;
}
}

// ´Ù¸¥ partµéµµ ±âº»ÀûÀ¸·Î ÀÌ¿Í ºñ½ÁÇÏ°Ô Ã³¸®ÇÑ´Ù.

// D3DXMATRIX matWorld;
// CSfxMng::m_pd3dDevice->GetTransform(D3DTS_WORLD,&matWorld);
CSfxMng::m_pd3dDevice->SetTransform(D3DTS_WORLD,&matTemp1);
CSfxMng::m_pd3dDevice->SetRenderState( D3DRS_TEXTUREFACTOR, Key.nAlpha<<24 | 0x404040 );

CSfxMng::m_pd3dDevice->DrawPrimitive( D3DPT_TRIANGLEFAN, 0, 2); // ÀÌÁ¦ ¼³Á¤ ´ÙÇßÀ¸´Ï ±×·Á¾ßÁö
// CSfxMng::m_pd3dDevice->SetTransform(D3DTS_WORLD,&matWorld);
#endif //__CLIENT
greenmong is offline  
Old 12/10/2011, 20:56   #39
 
elite*gold: 0
Join Date: Nov 2008
Posts: 178
Received Thanks: 10
Hallo ?
greenmong is offline  
Old 01/14/2012, 08:03   #40
 
elite*gold: 0
Join Date: Nov 2008
Posts: 178
Received Thanks: 10
kann mir jemand seine sfxbase.cpp hochladen
greenmong is offline  
Old 01/14/2012, 12:54   #41
 
elite*gold: 0
Join Date: Oct 2008
Posts: 275
Received Thanks: 68
static const CString strPATH( "SFX\\Scripts\\" );
static const CString strFORMAT(".lua");
char szFunc[ 64 ];
GetFileTitle( szMoverName, szFunc );
CString strFileName = CString( szFunc ) + strFORMAT;
CString strFullPath = strPATH + strFileName;


NACH DIESEM ABSCHNITT !
Das Nächste InternalServer zu __CLIENT !!!
guardianangel is offline  
Old 01/14/2012, 13:32   #42
 
elite*gold: 0
Join Date: Nov 2008
Posts: 178
Received Thanks: 10
hab ich
Quote:
///////////////////////////////////////////////////////////////////////////////////////////
// lua for sfx

lua_State* g_SfxLua = NULL;

int call_sfx( lua_State* L )
{
// ·ç¾Æ¿¡¼* call ( lua glue )
int n = lua_gettop( L );

int who = lua_tointeger( L, 1 ); // master id
int nKind = lua_tointeger( L, 2 ); // kind of the effect
const char* szSfx = lua_tostring( L, 3 ); // sfx
const char* szBone = lua_tostring( L, 4 ); // bone
BOOL bLoop = lua_tointeger( L, 5 ); // is loop ?
int nState = lua_tointeger( L, 6 ); // state ( create, battle ... )

CMover* pMover = prj.GetMover( who );
if( !pMover )
{
assert( 0 );
return 0;
}

//! »ý¼ºÇϱâ Àü¿¡ ÇÊÈ÷ °Ë»çÇØ¾ßÇÔ.
BOOL bFull = CSfxModelMng::GetThis()->IsFull( who, szSfx, szBone );
if( bFull )
return 0;

SfxModelSet* pSfxSet = new SfxModelSet( who, szSfx, szBone, bLoop, nState );
BOOL bOK = CSfxModelMng::GetThis()->AddData( pSfxSet, TRUE );

if( !bOK )
SAFE_DELETE( pSfxSet );

return 0;
}

int call_mte( lua_State* L )
{
// ·ç¾Æ¿¡¼* call ( lua glue )
// multitexture effect
int n = lua_gettop( L );

int who = lua_tointeger( L, 1 ); // master id
int nKind = lua_tointeger( L, 2 ); // kind of the effect
const char* sz2ndDDS = lua_tostring( L, 3 ); // 2nd dds

CMover* pMover = prj.GetMover( who );
if( !pMover )
{
assert( 0 );
return 0;
}

if( !pMover->IsNPC( ) )
return 0;

CModelObject* pModel = (CModelObject*)pMover->GetModel();
if( !pModel )
return 0;

CObject3D* pObj = pModel->GetObject3D( );
if( !pObj )
return 0;

pObj->m_dwEffect_EX |= XE_MTE;

char szDDS[ 64 ];
strcpy( szDDS, sz2ndDDS );
strcat( szDDS, ".dds" );
BOOL bOK = pMover->SetDataMTE( pMover->GetNameO3D(), szDDS );

if( !bOK )
Error( "please check the mte texture %s", pMover->GetNameO3D() );

return 0;
}

int stop_sfx_bybone( lua_State* L )
{
//2010_05_10 gmpbigsun : ÀÏ´Ü ¸¸µé¾î³ùµû.. Ȥ½Ã³ª ¾î¶²»óŰ¡ ³¡³ª¸é ¾î¶²º»¿¡ ¸µÅ©µÈ sfx¸¸ Áö¿ì°í½ÍÀ»¶§¸¦ ´ëºñÇØ¼*..
int n = lua_gettop( L );

int who = lua_tointeger( L, 1 );
const char* szBone = lua_tostring( L, 2 );

CMover* pMover = prj.GetMover( who );
if( !pMover )
{
assert( 0 );
return 0;
}

BOOL bOK = CSfxModelMng::GetThis()->SubData( who, szBone );

return bOK;
}

void open_lua_sfx()
{
if( !g_SfxLua )
{
g_SfxLua = lua_open();
// luaL_openlibs(g_SfxLua);

// push function
lua_register( g_SfxLua, "call_sfx", call_sfx );
lua_register( g_SfxLua, "call_mte", call_mte );
}
}

void close_lua_sfx()
{
if( g_SfxLua )
lua_close( g_SfxLua );
}


void run_lua_sfx( int nState, OBJID caller, const char* szMoverName )
{
static const CString strPATH( "SFX\\Scripts\\" );
static const CString strFORMAT(".lua");

// setup
if( !g_SfxLua )
open_lua_sfx( );

// caller´Â ¹«¹ö¸¸ Áö¿øÇÑ´Ù. ÇöÀç 2010_0204
CMover* pWho = prj.GetMover( caller );
if( !pWho )
{
// Èì »ý¼ºÀÌ µÇ´ÂµµÁß ºÒ¸±¼ö°¡ ÀÖ´Ù. ÀÌ·±°æ¿ì´Â prj¿¡¼* ¸øÃ¡À»²¯À̹ǷΠµî·Ï»óÅ·ΠµÎ°í ´ÙÀ½ ÇÁ·¹ÀÓ¿¡ ½ÃµµÇÑ´Ù.
CSfxModelMng::GetThis()->_cWaitingObj.insert( map< DWORD, int >::value_type( caller, nState ) );
return;
}

char szFunc[ 64 ];
GetFileTitle( szMoverName, szFunc );
CString strFileName = CString( szFunc ) + strFORMAT;
CString strFullPath = strPATH + strFileName;

// res¸¦ Ãë±ÞÇÏ´Â Å×¼· ¹× Á¤¼·Àº buffer¸¦ ¾ò¾î¿Í¼* ·ç¾Æ¸¦ µ¹¸®ÀÚ
#ifdef __CLIENT
if( 0 != luaL_dofile( g_SfxLua, strFullPath.GetBuffer(0) ) )
{
// Error( "run_lua_sfx : %s", (char*)lua_tostring( g_SfxLua, -1 ) );
return;
}
#else
// res·Î mergeµÈ ÆÄÀÏÀº CResFileÀ» ÀÌ¿ëÇØ ¹öÆÛ¸¦ ¾ò°í ·ç¾Æ¸¦ È£Ãâ
CResFile file;
BOOL bRet = file.Open( strFullPath.GetBuffer(0), "rt" );
if( bRet == FALSE )
{
Error( "run_lua_sfx : %s ÀÐ±â ½ÇÆÐ", strFullPath.GetBuffer(0) );
return;
}

static char pBuff[ 2048 ];
int nLength = file.GetLength();
if( nLength > 2047 )
{
Error( "error!! overflowed size of lua file %s", strFullPath.GetBuffer(0) );
return;
}

if( nLength < 2 ) // Á¸ÀçÀÌÀ¯°¡ ¾ø´Â ±æÀÌ ÀÌ´Ù .
return;

pBuff[ 0 ] = 0;
file.Read( pBuff, nLength );
pBuff[ nLength ] = 0;

// TODO : buffer¸¦ ¾ò¾î¿Í¼* call lua
int a = luaL_loadbuffer( g_SfxLua, pBuff, nLength, NULL );
int b = lua_pcall(g_SfxLua, 0, LUA_MULTRET, 0);

if( (a | b) != 0 )
{
Error( "error run_lua_sfx : %s", (char*)lua_tostring( g_SfxLua, -1 ) );
return;
}
#endif //__CLIENT

//¸¸¾à ¸ó½ºÅÍ¿¡ ´ëÇØ¼* ÀϹÝÀûÀÎ lua¸¦ Àû¿ëÇϰí, Ưº°ÇÑ °æ¿ì¸¸ ¸ó½ºÅͰ³°³Àο¡ ´ëÇØ¼* lua¸¦ ÁöÁ¤ÇÑ´Ù¸é
// ¿ì¼±¼øÀ§´Â Ưº°È÷ ÁöÁ¤µÈ°æ¿ì´Ù ,

if( OBJSTAF_COMBAT == nState )
strcat( szFunc, "_battle" );
else
if( OBJSTA_NONE == nState )
{
//»ý¼º»óÅ·Π°£ÁÖÇÑ´Ù.. Áï »ý¼ºµÇ°í ¾Æ¹«°Íµµ ¾Æ´Ñ»óŶõ °É·Î ÇØ¼®Çϱ⠹ٶ÷.
strcat( szFunc, "_create" );
}
else
{
Error( "SFXLUA is not supported the state : %d ", nState );
return;
}

lua_getglobal( g_SfxLua, szFunc );
lua_pushnumber( g_SfxLua, caller );

// lua_call( g_SfxLua, 1, 0 ) ;

//_DEBUG
if( lua_pcall( g_SfxLua, 1, 0, 0 ) != 0 )
{
char* szError = (char*)lua_tostring( g_SfxLua, -1 );
Error( "run_lua_sfx : %s", szError );
}
}

BOOL stop_sfx( OBJID caller )
{
return CSfxModelMng::GetThis()->SubData( caller );
}

#endif //__BS_EFFECT_LUA
greenmong is offline  
Old 01/14/2012, 21:07   #43
 
elite*gold: 0
Join Date: Oct 2008
Posts: 275
Received Thanks: 68
hmmm dann nimm einfach mal nen Releasden Source &hol dir da die Datei raus und machs erneut
guardianangel is offline  
Old 01/14/2012, 23:43   #44
 
elite*gold: 0
Join Date: Nov 2008
Posts: 178
Received Thanks: 10
Hab schon mit dem RoC,b & clean probiert

hier emiene errors
Code:
2012/ 1/15   09:42:20   run_lua_sfx : attempt to call a nil value

2012/ 1/15   09:42:20   run_lua_sfx : attempt to call a nil value

2012/ 1/15   09:42:20   run_lua_sfx : attempt to call a nil value

2012/ 1/15   09:42:20   run_lua_sfx : attempt to call a nil value

2012/ 1/15   09:42:20   run_lua_sfx : attempt to call a nil value

2012/ 1/15   09:42:20   run_lua_sfx : attempt to call a nil value

2012/ 1/15   09:42:20   run_lua_sfx : attempt to call a nil value
greenmong is offline  
Old 01/18/2012, 19:23   #45
 
elite*gold: 0
Join Date: Nov 2008
Posts: 178
Received Thanks: 10
PUSH THIS ****
greenmong is offline  
Reply


Similar Threads Similar Threads
__BS_EFFECT_LUA Frage
10/19/2011 - Flyff Private Server - 6 Replies
Hey weiss jemand ob der Behemoth auch an die Füße brennt oder nur auf dem Rücken und Schwanz? Lg ich
__BS_EFFECT_LUA
10/14/2011 - Flyff Private Server - 3 Replies
Hello there! I would like to have some help with the Lua SFX Effect Files!! If you do not know which .lua files I mean, Check in the SFX/Script Folder! When I start my game and Spawn a monster I get this error: error run_lua_sfx : attempt to call a string value
[Source] SFX Lua ?! (__BS_EFFECT_LUA)
10/14/2011 - Flyff Private Server - 10 Replies
Hi Leute ... und zwar sind ja schon Definitionen usw eingebaut im Source .... Nun ist meine Frage wie krieg ich das zum Laufen ... Wenn ichs in der VersionCommon zufüge dann kann die Neuz die luas nicht Lesen ... Wär doch Cool wenns mal funzen würde xD Ich danke für Helfende Hände ^^
CyberPasci fixxed Version| Unl.Ammo fixxed. | Unl. Stamina | PlantAnyWhere | Chams &&
06/17/2011 - WarRock Hacks, Bots, Cheats & Exploits - 26 Replies
#removed Neuer Hack: http://www.elitepvpers.com/forum/warrock-hacks-bot s-cheats-exploits/1246022-works-after-update-17-ju ni-d3d-other-shit-no-laggs.html
[Release][Offi v15 Acc Database Fixxed]
08/30/2010 - Flyff PServer Guides & Releases - 2 Replies
Ich Release hier mal eine gefixxte Account Datenbank, da die von Cross ja beim Account erstellen die id_no2 nicht einträgt und somit das Character Löschen nicht möglich ist. Nunja hier hiermit geht es =P. File-Upload.net - Offi-v15-Datenbank-by-Massaka.rar



All times are GMT +1. The time now is 09:59.


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.