飞飞世界论坛
标题:
通过命令重生
[打印本页]
作者:
admin
时间:
2016-1-10 03:42
标题:
通过命令重生
至于V15和源文件发布重生不再使用通过HP它不再去我会告诉你如何可以通过与它聊天源befehel
; j8 u" q7 Z7 D. w
% k& C5 I8 y$ U, P4 }$ Q
Mover.h
) x% @4 w* r3 h6 N8 C Y/ z$ F
代码:
8 @( }: F& n) s
找到: void InitLevel( int nJob, LONG nLevel, BOOL bGamma = TRUE ); // °′???| nLevel·? 1ù2?áü
, ~, j1 p% w9 i
( t! J2 ]' u. f; E s$ I
下面插入: void InitLevelPumbaaa( int nJob, LONG nLevel, BOOL bGamma = TRUE ) ;
. r* V: i+ K6 Z' D9 A, R) U
" V3 o2 `# Z6 \5 Y5 S& z2 a
然后你去mover.cpp添加
& u1 ?" a6 c3 S3 W& B+ N
+ u8 i+ W; x8 i7 {
代码:
3 K1 [1 D: q0 l- `& t- `9 r. t
void CMover::InitLevelPumbaaa( int nJob, LONG nLevel, BOOL bGamma )
G: i/ b" z3 L# G9 G+ {: M
{
. ^) q2 B: O+ j5 q1 s8 {
#ifdef __WORLDSERVER
3 M! p$ L5 c* S" w; a4 _
// ???μàú ?í·éà?·? ·1o§?÷ ??′?°÷àó
& G2 v& H4 I1 ~# x% Z9 r ^( u
MoverProp* pProp = GetProp();
3 B. I0 y3 I R& Y! s; I
if( pProp )
0 f5 [1 e3 J! Z, l) O
{
- M0 _4 P% L. ~& g
if( nJob > 0 && nJob < MAX_LEGEND_HERO )
- P; e( q( x) {6 \! {: |
{
. U' _6 E4 s/ ?2 I6 g3 X
AddChangeJob( nJob );
9 u% {5 g1 ^7 O+ |
}else{
9 t' f2 z0 g% f" T5 }
return;
2 y, t5 O, J! p- D$ O
}
" A* Z/ v7 \0 o# I% u8 A! Y
int nPoint = 0;
- Z6 p% L: u; Q. @3 D) W# |/ Q1 h' e
if( m_nJob == JOB_MERCENARY )
7 e7 d9 ]- y3 G$ @" s* ]
nPoint += 40;
9 T9 `/ t* Q' p% m/ }; P1 R6 m
else if( m_nJob == JOB_ACROBAT )
! x4 `+ x6 b9 v) N( k# U* k$ l, [
nPoint += 50;
- I* \2 `* N: K
else if( m_nJob == JOB_ASSIST )
0 v" H; p h h$ Q( t
nPoint += 60;
( Q) ~+ b# Q* y9 r, W
else if( m_nJob == JOB_MAGICIAN )
^$ Y i3 ^, k, p1 i9 E% c' G4 t
nPoint += 90;
, M3 l0 [/ {7 p& Q; y* N* G9 a
else if( m_nJob == JOB_KNIGHT || m_nJob == JOB_BLADE )
& m% s q5 R& O' K
nPoint += 120;
' v1 Z" Q! Y+ r# f$ y
else if( m_nJob == JOB_JESTER || m_nJob == JOB_RANGER )
; R+ z! \( i; C( U" I& @% ]1 c0 ^
nPoint += 150;
7 g9 g+ J0 ~) ~" I5 M @. r
else if( m_nJob == JOB_RINGMASTER )
/ a3 a, W4 S0 x/ |" A" N w
nPoint += 160;
" y4 v, I; Q+ q2 b/ |$ l
else if( m_nJob == JOB_BILLPOSTER || m_nJob == JOB_PSYCHIKEEPER )
9 v9 O% D7 e* B6 ]' `
nPoint += 180;
9 R/ o5 a6 e: m. o, W; h4 x
else if( m_nJob == JOB_ELEMENTOR )
0 w; B8 h# d9 S, x
nPoint += 390;
% U& K- j$ Y `2 O" C. A( \
else if( nJob == JOB_LORDTEMPLER_HERO || nJob == JOB_STORMBLADE_HERO )
% r1 F/ Z, H: U/ p$ d6 K
nPoint += 120;
# ]6 d( ]) B: }* e1 e
else if( nJob == JOB_WINDLURKER_HERO || nJob == JOB_CRACKSHOOTER_HERO )
! o; ~5 a& q: W3 U% q
nPoint += 150;
: ?$ w- r, ~ y! V) ^. a1 `
else if( nJob == JOB_FLORIST_HERO )
7 O3 V) Z k& I
nPoint += 160;
. a& \9 a2 D5 j4 }
else if( nJob == JOB_FORCEMASTER_HERO || nJob == JOB_MENTALIST_HERO )
' n9 i1 w$ n7 D* l; b U! e
nPoint += 180;
) _5 g4 z" w4 o; t
else if( nJob == JOB_ELEMENTORLORD_HERO )
% _, V2 b1 k+ ~+ Q3 G
nPoint += 390;
3 l$ q- s$ K9 d9 ]5 p
1 ~) J" P3 @: l! Z$ b; P- V
AddSkillPoint( nPoint );
0 I9 Y/ N& \' j: ]
m_nLevel = nLevel;
+ S& |4 R2 Z/ h' L1 M& ~- h* E
1 S$ \" L; O" a, d7 |
SetJobLevel( nLevel, nJob );
; [! @/ N. S& D4 l7 S
m_nDeathLevel = nLevel;
4 a& R! t; O v! J( s( H3 }) P
#if __VER >= 10 // __LEGEND // 10?÷ àü?????o?? Neuz, World, Trans
, g9 G, R2 L) P- l
if(IsMaster())
: @* A( u$ Q8 @9 ?' O
{
, u S4 [; c& U8 f7 @$ y4 t
int dwTmpSkLevel = 1;//60, 72, 84, 96, 108
. [( T" E" {' r, q" y0 U; a
if( nLevel > 59 && nLevel < 72 )
* |% A- Y9 Z$ a/ t
dwTmpSkLevel = 1;
" q+ ?- T7 |9 A. z1 V6 a
else if( nLevel > 71 && nLevel < 84 )
G0 f( w5 b" x4 u! d' S
dwTmpSkLevel = 2;
) r4 B5 v B- {. |/ R- o
else if( nLevel > 83 && nLevel < 96 )
; q I5 K6 s' [& J+ f9 I
dwTmpSkLevel = 3;
8 v8 M; _6 E! n/ @3 t- N3 ~" m
else if( nLevel > 95 && nLevel < 108 )
5 L+ u& @% E; ]9 T1 O
dwTmpSkLevel = 4;
# V3 G/ |" R9 |. }' D* u I( C% f
else if( nLevel > 107 && nLevel < 120 )
, D4 b5 Z- ~6 M+ t7 f+ i$ k
dwTmpSkLevel = 5;
8 O4 N/ t- Q) g. u3 Z/ T- Q1 y& U
for( int i = 0; i < MAX_SKILL_JOB; i++ )
4 e0 u/ u. k/ j8 _- P2 N( l
{
5 F' i0 G4 w4 E- M/ o
LPSKILL lpSkill = &(m_aJobSkill
);
# I8 H, T# O0 V! H G
if( lpSkill && lpSkill->dwSkill != NULL_ID )
' G1 j1 v0 b* s! c; _5 w
{
+ h; i, Z' r) H) V+ Y8 _
ItemProp* pSkillProp = prj.GetSkillProp( lpSkill->dwSkill );
9 K; W' b1 ?# z, R S" c3 g, S
if( pSkillProp == NULL )
' A: g5 E6 X/ a! B X6 ~8 R
continue;
, ~0 d% @, I8 [* ]
if( pSkillProp->dwItemKind1 != JTYPE_MASTER)
8 X, Y% v0 k) E; p/ R- i
continue;
" B p; a0 W% h
lpSkill->dwLevel = dwTmpSkLevel;
! F# i, B" a# k" A4 z; `' D/ q2 D
}
/ b8 n; f' L/ Q3 V. x2 V) D) ^5 F) ?
}
) Z8 Z7 ^! o; G( w3 P& @0 Y
}
* S$ O! b7 d* W5 g" p8 [
else if(IsHero())
' J; H3 o/ ^- j% p! X( Z1 N
{
6 V" D0 }) ^% h2 e0 |" I
for( int i = 0; i < MAX_SKILL_JOB; i++ )
0 n+ {4 ~ O3 m0 B# w! ]
{
+ G( H2 f' n" a
LPSKILL lpSkill = &(m_aJobSkill
);
6 G4 Z4 ?7 p) Y3 y, J8 L; k
if( lpSkill && lpSkill->dwSkill != NULL_ID )
+ Z! X+ i9 f' `$ D9 T* R* Y% Z
{
4 t$ X9 J9 D' ~2 ?
ItemProp* pSkillProp = prj.GetSkillProp( lpSkill->dwSkill );
( b) c1 e7 r9 R' o
if( pSkillProp == NULL )
4 p0 _; x* b( o
continue;
& Q2 V' V) w+ i1 k
if( pSkillProp->dwItemKind1 != JTYPE_MASTER)
: z2 p. T- I! a
continue;
7 v; d0 b+ m1 P( f3 P) z( f
lpSkill->dwLevel = 5;
" O" f/ E! @' P4 T! F8 t
}
5 }; L' ^ Q1 o+ b5 H. f, e- O
}
4 d( v6 O d. i/ [8 V) Y; M
}
0 F8 A8 r# Q. b0 C
else if(IsLegendHero())
; R, T; S! Y5 m
{
" A2 U+ p5 s( d! b! p
for( int i = 0; i < MAX_SKILL_JOB; i++ )
4 c: e. h) A+ g3 c# @
{
, m5 \/ b) C8 y% ~
LPSKILL lpSkill = &(m_aJobSkill
);
+ Q' R3 h4 g4 L
if( lpSkill && lpSkill->dwSkill != NULL_ID )
" Q( l( D, M* h9 w$ E" a* ~7 {
{
% x. z* h; ~8 O3 v( q/ W5 y
ItemProp* pSkillProp = prj.GetSkillProp( lpSkill->dwSkill );
; V/ ~- e5 Z& g& ^. H9 b5 S) `
if( pSkillProp == NULL )
n6 r$ o+ _+ V2 O# z' {6 J/ U* J
continue;
3 [2 I6 [5 \ B: F7 @: H
if( pSkillProp->dwItemKind1 != JTYPE_MASTER)
# b2 O& H) T+ h) q4 J* e
continue;
* @" p" d0 a6 `, ~
lpSkill->dwLevel = 5;
1 K7 K5 k4 t: y- ~6 _2 L/ o
}
9 {& _: Q9 @8 G: U2 x0 q
}
) ^1 C. g" Q* k: I# @
}
" V- V, i; }/ h; A& o
#endif // __LEGEND // 10?÷ àü?????o?? Neuz, World, Trans
3 [; [) v! v7 A% z y7 B
if( bGamma )
k' j: `! Z# d; M/ Q
{
& b- n$ {. }1 D4 B* l, e
m_nExp1 = 0;
! L) R; M) n9 @+ W" c
}
! K1 E) s) ]4 L( t
/ d f7 k( F% O T4 h" \' B
( (CUser*)this )->AddSetChangeJob( nJob );
/ L- D0 o& y* P
g_UserMng.AddNearSetChangeJob( this, nJob, &((CUser*)this)->m_aJobSkill[MAX_JOB_SKILL] );
$ I& G$ t3 t( P# a5 Z
; m2 t& r$ G$ _
: D h, x* v7 J! B# \
#if __VER >= 11 // __SYS_PLAYER_DATA
2 B5 @% X4 C) M* O i& ?/ N* y p* p
g_dpDBClient.SendUpdatePlayerData( (CUser*)this );
5 E& x: T! K7 Z1 f; S
#else // __SYS_PLAYER_DATA
) r4 A4 R' m4 A" M
g_DPCoreClient.SendPartyMemberJob( (CUser*)this );
: V5 `& O* c! D& [7 Q9 k6 ^/ J3 L
g_DPCoreClient.SendFriendChangeJob( (CUser*)this );
5 A5 l, W" m2 P2 G- p7 k$ e. c: e- n& L
if( m_idGuild != 0 )
) y, c) P4 Y8 e% m6 K: r
g_DPCoreClient.SendGuildChangeJobLevel( (CUser*)this );
7 t) W! Z8 Z8 M; D
#endif // __SYS_PLAYER_DATA
5 {/ ~) l% Y& Y3 k/ T' [
SetHitPoint( GetMaxHitPoint() );
8 }4 L4 ^7 T( h4 m& c& k
SetManaPoint( GetMaxManaPoint() );
V1 R7 Y9 N0 B8 H6 a
SetFatiguePoint( GetMaxFatiguePoint() );
& e" `$ w* H8 I: J. B0 [7 a) U" j
if( nJob >= 1 && nJob <= 4 )
" O" W5 h1 W# z/ k
{
% S# d, o5 t. ], D6 [( h
m_nStr = m_nSta = m_nDex = m_nInt = 15;
; B& x9 M+ _% `2 T1 P9 `* }
m_nRemainGP = 28;
- p! p. z3 H) E/ F: Y+ u5 s. \' I
}
2 n; T7 B1 [% m, }& a
if( nJob >= MAX_PROFESSIONAL && nJob < MAX_MASTER )
' A. ~( n: b/ q! r
{
# f. m8 s; N7 U& H9 z- n, e, N5 ]
m_nRemainGP = 118;
" _) Q% v6 `5 F! W
//m_nRemainGP = ( m_nSta - 15 ) + ( m_nStr - 15 ) + ( m_nDex - 15 ) + ( m_nInt - 15 ) + m_nRemainGP;
- J [2 ^$ Y1 V: | Q7 C. }6 K
m_nStr = m_nSta = m_nDex = m_nInt = 15;
7 ]" e" P7 {( Q; h
}
8 p! s+ b' w# v! h& _, r
if( nJob == JOB_MENTALIST_HERO || nJob == JOB_FORCEMASTER_HERO )
- b+ \. A4 f C! y8 i/ j
{
; ^. z0 x4 D5 j
CItemElem itemelem;
. `$ P! L2 f- w) q
itemelem.m_nItemNum = 1;
0 W4 t9 h3 N2 k- ^+ C$ p2 _
itemelem.m_bCharged = TRUE;
* [, f% L- s7 H, E! m% W
BYTE nID;
/ X6 N1 X8 a, C3 t( r* S$ Q
) ?7 Q) I8 ]4 J# j
if( nJob == JOB_MENTALIST_HERO )
9 O& P" e# J6 q# B
itemelem.m_dwItemId = II_WEA_BOOK_BOKROMAIN;
' h7 }$ U3 F5 `. o. z7 O& v' ^ F. |
if( nJob == JOB_FORCEMASTER_HERO )
: x# g2 s. t) M( R- U5 Y+ P
itemelem.m_dwItemId = II_ARM_ARM_SHI_ZEMBATO;
2 t, ^/ y% |5 E' b) |8 k8 x
& Z, d. v; R* Z }+ M) m$ m
( ( CUser*)this)->CreateItem( &itemelem, &nID );
; _) S; p- y, n$ k/ y# N' E- P
}
3 m8 s. D- g' w* t
g_UserMng.AddSetLevel( this, (WORD)m_nLevel );
X( j4 z9 c ~; U G5 w2 t8 q0 W! E
( (CUser*)this )->AddSetGrowthLearningPoint( m_nRemainGP );
" e! Y o- d+ | j4 Z
( (CUser*)this )->AddSetExperience( GetExp1(), (WORD)m_nLevel, m_nSkillPoint, m_nSkillLevel );
/ L" G; ~* {# k( C1 @5 E
/*( (CUser*)this )->m_playTaskBar.InitTaskBarShorcutKind( SHORTCUT_SKILL );
, z; G- h( J! O2 r6 M9 U2 c
( (CUser*)this )->AddTaskBar();*/
( g! Z1 C1 H; A! {5 r3 h; {, h
( (CUser*)this )->AddSetState( m_nStr, m_nSta, m_nDex, m_nInt, m_nRemainGP );
8 M, ]# B, N$ Y
#if __VER >= 13 // __HONORABLE_TITLE // ′Tà?
7 g. i0 U, Y# V# {
((CUser*)this)->CheckHonorStat();
4 ?9 o. _3 k; h/ y5 P a; D9 Q
((CUser*)this)->AddHonorListAck();
$ m7 T7 M( k: p* C
g_UserMng.AddHonorTitleChange( this, m_nHonor);
n/ M7 o) F( |% b" k% B5 D% x
#endif // __HONORABLE_TITLE // ′Tà?
* y/ R s) \ B5 A
}
4 B* {0 g5 b1 n7 K
#endif // __WORLDSERVER
+ H. v& Z) p }. a
}
$ O S+ ~1 J$ q2 R8 B7 P/ t6 W( ]+ \8 J
+ E$ z4 ^( y: u9 G3 \5 {2 }
然后你进入functextcmd.cpp并添加以下
+ q9 b1 d P! o8 [
& U6 {8 k, j3 ~- v6 q O4 u
代码:
6 H: V9 \" w, S/ p0 T8 ^7 y
ON_TEXTCMDFUNC( TextCmd_say, "say", "say", "??", "??", TCM_SERVER, AUTH_GENERAL , "?ó?èàó [/?í·é ??àìμe 3???]" )
6 R1 b) \* p! E
下面插入
# T* o! u& m; a" C6 v( L
ON_TEXTCMDFUNC( TextCmd_rebirth, "rebirth", "rebirth", "?ú·1?÷??", "?ú·1", TCM_SERVER, AUTH_GENERAL , "?ú·1?÷??" )
; _% n+ S$ `( W+ `
& p) g& h/ b+ M1 N
然后你去
7 I) v5 b, h7 L, q2 }
5 L- F' D6 f" m$ R1 ?# d* ~
代码:
/ i% U8 ~- o( J. y" B9 e& S2 X, J
代码
$ h! a& Z3 Z. q! g/ @ p
BOOL TextCmd_ClearPropose( CScanner & s )
) {6 K( D& w) v6 [- P% i* q0 }0 L
{
: F- |0 \4 d, r9 m! ]* q
#ifdef __WORLDSERVER
" c# |) C& H! g- R& ~" o& h
CUser* pUser = (CUser*)s.dwValue;
5 d) k6 R& I, x2 l2 J+ v
g_dpDBClient.SendClearPropose();
3 w ^- _+ F& x2 J1 j/ S/ |; R
#endif // __WORLDSERVER
( @9 k7 y% l, L4 w: X$ j
return TRUE;
% f' S3 n4 A: X. l% x( M" L2 u
}
5 z; u( U0 J" K
下面插入
* U: a0 j" a5 t, G' ? d
BOOL TextCmd_rebirth( CScanner& scanner )
: u. |* A' D, }' _7 e- g
{
7 O, V' H& T, |4 t6 w# J3 {
#ifdef __WORLDSERVER
/ |3 b6 f/ P& d4 Q- {, v8 _, {
CUser *pUser;
4 s% a& o1 A, f: L
pUser = (CUser*)scanner.dwValue;
% V" o9 [5 ^, h
if(pUser->m_nLevel >= 150 && pUser->IsLegendHero())
6 @; {2 o g7 h5 [9 q+ W$ N
pUser->InitLevelPumbaaa( pUser->m_nJob-16,60);
* o4 U; T/ V5 x+ ?( F! q
else
2 [$ e: e' @1 t. b% ]7 M2 l
pUser->AddText("你还未达到重生条件!");
# M9 m, @4 J& c
#endif
( E5 J0 b+ m8 v4 f' M
return TRUE;
. m' @0 G& B5 E" W
}
! A" W: L% c) a( m- u
3 _% H- j0 G/ J5 C# x
8 n6 r# o }7 m2 f. a0 r
9 p' x% ?9 t; ]
/ T' T- n6 h( j! S k
欢迎光临 飞飞世界论坛 (http://ffwold.com/)
Powered by Discuz! X3.2