RoseOnline SVN Source[Revision 89]

Page 31 of 36 FirstFirst ... 212324252627282930313233343536 LastLast
Results 751 to 775 of 881
  1. #751
    Valued Member Killerbee(NL) is offline
    MemberRank
    Oct 2006 Join Date
    City of Junon PolisLocation
    101Posts
    EDIT lol i'm stupid :P sorry for this post XD
    Last edited by Killerbee(NL); 14-11-06 at 07:24 PM.

  2. #752
    Valued Member barnett81 is offline
    MemberRank
    Oct 2006 Join Date
    113Posts
    Umm ok, but its very sloppy
    (in worldserver.cpp)
    Code:
    	// -------------- UPDATE USER ATTACK AND OR MOVEMENT STOPPERS --------------
    	for(unsigned j=0; j<ClientList.size(); j++) {
    		CWorldClient* thisclient = (CWorldClient*)ClientList[j];
    		if (!thisclient->inGame) continue;
    
    		CMonster* thismon = GetMonsterByID(thisclient->targetid);
    		if (thismon==0) {
    			CNPC* thisnpc = GetNPCByID(thisclient->targetid);
    			if (thisnpc==0) continue;
    
    			float dx = ( thisclient->pos.x - thisnpc->pos.x );
    			float dy = ( thisclient->pos.y - thisnpc->pos.y );
    			if ( (dx*dx)+(dy*dy) <= 2.5*2.5 ) thisclient->nPos = thisclient->pos;
    
    			continue;
    		}
    
    		if (thismon->targetid==0) {
    			thismon->targetid=thisclient->clientid;
    			thismon->lastMoveTime=clock();
    
    			// GO OVER AND ATTACK IT
    			BEGINPACKET( pak, 0x798 );
    			ADDWORD( pak, thismon->clientid );
    			ADDWORD( pak, thisclient->clientid );
    			ADDWORD( pak, STB_NPC.rows[thismon->montype][3] );
    			ADDFLOAT ( pak, thisclient->pos.x*100 );
    			ADDFLOAT ( pak, thisclient->pos.y*100 );
    			SendToVisible( &pak, thismon );
    		}
    
    		float dx=thismon->pos.x - thisclient->pos.x;
    		float dy=thismon->pos.y - thisclient->pos.y;
    		if(thisclient->atktype==0) {
    			clock_t etime = clock() - thisclient->lastAttackTime;
    			if (etime > 0.9*CLOCKS_PER_SEC && abs(dx*dx+dy*dy) <= 0) {
    				unsigned hitpower = unsigned((thisclient->c_level/5) + (thisclient->c_str/2) + (thisclient->c_dex/3.3));
    				//Log( MSG_DEBUG, "weapon refine:%i",(thisclient->items[7].refine) );
    				//Log( MSG_DEBUG, "monster defense: %i", thismon->defense );
    				//Log( MSG_DEBUG, "monster health: %i", thismon->currenthp );
    				// refined weapon damage needs to be added.
    				switch(thisclient->items[7].refine){
    					case 16:	// 1
    						hitpower += int(thisclient->GetAtkPower( )*1.06); // add weapon damage;
    						break;
    					case 32:	// 2
    						hitpower += int(thisclient->GetAtkPower( )*1.13); // add weapon damage;
    						break;
    					case 48:	// 3
    						hitpower += int(thisclient->GetAtkPower( )*1.2); // add weapon damage;
    						break;
    					case 64:	// 4
    						hitpower += int(thisclient->GetAtkPower( )*1.3); // add weapon damage;
    						break;
    					case 80:	// 5
    						hitpower += int(thisclient->GetAtkPower( )*1.4); // add weapon damage;
    						break;
    					case 96:	// 6
    						hitpower += int(thisclient->GetAtkPower( )*1.5); // add weapon damage;
    						break;
    					case 112:	// 7
    						hitpower += int(thisclient->GetAtkPower( )*1.65); // add weapon damage;
    						break;
    					case 128:	// 8
    						hitpower += int(thisclient->GetAtkPower( )*1.80); // add weapon damage;
    						break;
    					case 144:	// 9				
    						hitpower += int(thisclient->GetAtkPower( )*2.0); // add weapon damage;
    						break;
    					default:	// 0
    						hitpower += thisclient->GetAtkPower( ); // add weapon damage;
    						break;
    				} //end switch
    				hitpower+= 3*(rand()%(thisclient->c_level))+1;
    				hitpower -= thismon->defense;
    				hitpower=(hitpower<0)?0:hitpower;
    				//Log( MSG_DEBUG, "weapon ap= %i", (thisclient->GetAtkPower( )) );
    				//Log( MSG_DEBUG, "hitpower= %i", hitpower );
    				//if (hitpower<5) hitpower = 5;
    				thismon->currenthp -= hitpower;
    				if (thismon->currenthp < 0) thismon->currenthp=0;
    
    				BEGINPACKET( pak, 0x799 );
    				ADDWORD( pak, thisclient->clientid );
    				ADDWORD( pak, thismon->clientid );
    				ADDDWORD( pak, hitpower );
    				ADDDWORD( pak, (thismon->currenthp<=0)?16:0 );
    				SendToVisible( &pak, thismon );
    
    				thisclient->lastAttackTime = clock();
    			}
    		}else if( thisclient->atktype == 1 ) {
    			unsigned skillid = thisclient->cskills[thisclient->atkskill].id + thisclient->cskills[thisclient->atkskill].level - 1;
    			unsigned skillrange = STB_SKILL.rows[skillid][6];
    			unsigned skillpower = STB_SKILL.rows[skillid][9];
    			if ( dx*dx+dy*dy <= skillrange*skillrange ) {
    				thisclient->atktype=-1;
    				thismon->currenthp -= skillpower;
    
    				BEGINPACKET( pak, 0x799 );
    				ADDWORD( pak, thisclient->clientid );
    				ADDWORD( pak, thismon->clientid );
    				ADDDWORD( pak, skillpower );
    				ADDDWORD( pak, (thismon->currenthp<=0)?16:0 );
    				SendToVisible( &pak, thismon );
    
    				RESETPACKET( pak, 0x7bb );
    				ADDWORD( pak, thisclient->clientid );
    				SendToVisible( &pak, thisclient );
    			}
    		}
    	}
    and here is the weapon attack (in worldclient.cpp)
    Code:
    // -----------------------------------------------------------------------------------------
    // Returns the Weapon Attack Power
    // -----------------------------------------------------------------------------------------
    unsigned CWorldClient::GetAtkPower( )
    {
    	unsigned atkpower = 0;
    	for( unsigned j =  0; j < 12; j++ ) {
    		if( items[j].itemtype == 8 ) {
    			atkpower += ((CWorldServer*)ParentServer)->STB_ITEM[items[j].itemtype-1].rows[items[j].itemnum][35];
    		} // end if
    	} // end for
    
    	return atkpower;
    }
    Last edited by barnett81; 14-11-06 at 07:29 PM.

  3. #753
    Member BlackIIIce is offline
    MemberRank
    Nov 2006 Join Date
    82Posts
    and that is? the fix or? because killerbee edited his post so i cant see the question -.-

  4. #754
    Valued Member barnett81 is offline
    MemberRank
    Oct 2006 Join Date
    113Posts
    Sry, he asked for my attack script.

  5. #755
    Member BlackIIIce is offline
    MemberRank
    Nov 2006 Join Date
    82Posts
    hehe np i see :P

  6. #756
    Enthusiast Magelanas is offline
    MemberRank
    Oct 2006 Join Date
    Kaunas, LithuanLocation
    28Posts
    Is news about first prof quest fixing ? Or SVN project is dead ?

  7. #757
    Account Upgraded | Title Enabled! The nGage is offline
    MemberRank
    Oct 2006 Join Date
    Where do you think?Location
    389Posts
    Lol SVN project is not dead

  8. #758
    Enthusiast r4ptor is offline
    MemberRank
    Jun 2006 Join Date
    BrazilLocation
    25Posts
    yea just need more developers >.<


    hmm i saw that the comand /ann is taking trash
    if u digit /ann aaaaa
    it will show 5 a
    than if u digit /ann bbbb
    it will show 4 b and one a (bbbba)

    i dont understand alot of programing, but the fix is maybe clean the buffer or something like this, dont?

  9. #759
    Apprentice Ni3tski is offline
    MemberRank
    Sep 2006 Join Date
    23Posts
    hello people i am wit han problem the problem is if i load the logen server its oke the char server is oek to when i start the world server i gat an message after 5 sec in the window SQL:Could not execeute query: Unkown column 'aggrocount' in 'field list' <--- plz could some1 help me

    -greets- Ni3tski

  10. #760
    Account Upgraded | Title Enabled! Ci2azy is offline
    MemberRank
    Sep 2006 Join Date
    LOCALHOSTLocation
    200Posts
    Quote Originally Posted by Ni3tski View Post
    hello people i am wit han problem the problem is if i load the logen server its oke the char server is oek to when i start the world server i gat an message after 5 sec in the window SQL:Could not execeute query: Unkown column 'aggrocount' in 'field list' <--- plz could some1 help me

    -greets- Ni3tski
    this problem has already been posted a few times...please use the search button b4 posting things like this...

  11. #761
    Apprentice pixou is offline
    MemberRank
    Nov 2006 Join Date
    9Posts
    hello barnett81, thanks to answered to my pm :) and i wanted to know what going on, i used your atack code and i got that error wheni compile!

    ------ Build started: Project: 3. World Server, Configuration: Release Win32 ------
    Compiling...
    worldserver.cpp
    .\worldserver.cpp(317) : error C2039: 'GetAtkPower' : is not a member of 'CWorldClient'
    c:\svn\world server\worldsockets.h(31) : see declaration of 'CWorldClient'
    .\worldserver.cpp(317) : fatal error C1903: unable to recover from previous error(s); stopping compilation
    Build log

  12. #762
    Novice Vengo54 is offline
    MemberRank
    Oct 2006 Join Date
    1Posts
    Il faut implanter getatkpower dans le worldsocket.cpp

  13. #763
    Valued Member barnett81 is offline
    MemberRank
    Oct 2006 Join Date
    113Posts
    sry, you have to declare the getAtkPower method in worldsockets.h like so:
    Code:
    	unsigned GetAtkPower( );

  14. #764
    Apprentice Ni3tski is offline
    MemberRank
    Sep 2006 Join Date
    23Posts
    how to insert an field into an table

  15. #765
    Member BlackIIIce is offline
    MemberRank
    Nov 2006 Join Date
    82Posts
    Click design table and then read FFS! people read and search other threads before posting a question..

    *Offtopic; dude why do you talk in orange

  16. #766
    Apprentice Ni3tski is offline
    MemberRank
    Sep 2006 Join Date
    23Posts
    i dont know i always talk in orange. bud anyways thank you allot

    EDIT: i changed my respawn and i disigned it i putted an collumn in it and called it aggrocount and when i sart the server now the World server crashes :S plz help me and tel me what top do (i disigned the column like this aggrocount int 11 0 checked)

    -greets- Ni3tski
    Last edited by Ni3tski; 17-11-06 at 04:20 PM.

  17. #767
    Apprentice peps is offline
    MemberRank
    Mar 2006 Join Date
    24Posts
    Quote Originally Posted by r4ptor View Post
    yea just need more developers >.<


    hmm i saw that the comand /ann is taking trash
    if u digit /ann aaaaa
    it will show 5 a
    than if u digit /ann bbbb
    it will show 4 b and one a (bbbba)

    i dont understand alot of programing, but the fix is maybe clean the buffer or something like this, dont?
    In gmcmds.cpp, find:
    Code:
    	ADDSTRING( pak, (&P->Buffer[5]) );
    after->add:
    Code:
    	ADDBYTE( pak, 0 );
    That's it! :)

  18. #768
    Member BlackIIIce is offline
    MemberRank
    Nov 2006 Join Date
    82Posts
    people update the svn with the database release its really good..

  19. #769
    Enthusiast r4ptor is offline
    MemberRank
    Jun 2006 Join Date
    BrazilLocation
    25Posts
    Quote:
    Originally Posted by r4ptor View Post
    yea just need more developers >.<


    hmm i saw that the comand /ann is taking trash
    if u digit /ann aaaaa
    it will show 5 a
    than if u digit /ann bbbb
    it will show 4 b and one a (bbbba)

    i dont understand alot of programing, but the fix is maybe clean the buffer or something like this, dont?
    In gmcmds.cpp, find:
    Code:

    ADDSTRING( pak, (&P->Buffer[5]) );

    after->add:
    Code:

    ADDBYTE( pak, 0 );

    nice to know that worked :)
    hey guys im at work now but want to know if this code work

    // -----------------------------------------------------------------------------------------
    // GM: Anonymous Announcment
    // -----------------------------------------------------------------------------------------
    bool CWorldServer::pakGMAnn( CWorldClient* thisclient, CPacket* P )
    {
    BEGINPACKET( pak, 0x702 );
    ADDSTRING( pak, (&P->Buffer[5]) );
    ADDBYTE( pak, 0 );
    SendToAll( &pak );

    return true;
    }

  20. #770
    Member BlackIIIce is offline
    MemberRank
    Nov 2006 Join Date
    82Posts
    it does with /ann

  21. #771
    Apprentice Ni3tski is offline
    MemberRank
    Sep 2006 Join Date
    23Posts
    Quote Originally Posted by Ni3tski View Post
    i dont know i always talk in orange. bud anyways thank you allot

    EDIT: i changed my respawn and i disigned it i putted an collumn in it and called it aggrocount and when i sart the server now the World server crashes :S plz help me and tel me what top do (i disigned the column like this aggrocount int 11 0 checked)

    -greets- Ni3tski

    Plz can some 1 help me Ty


    -greets- Ni3tski

  22. #772
    Member BlackIIIce is offline
    MemberRank
    Nov 2006 Join Date
    82Posts
    i dont know how to fix that m8 maybe you should try to start all over again.. atleast if you dont have any special things u created.

  23. #773
    Enthusiast r4ptor is offline
    MemberRank
    Jun 2006 Join Date
    BrazilLocation
    25Posts
    it does with /ann
    not really, because when u say something in the /ann it show your nickname:and later the message

    when i get home gonna test it :)

  24. #774
    Apprentice Ni3tski is offline
    MemberRank
    Sep 2006 Join Date
    23Posts
    Quote Originally Posted by BlackIIIce View Post
    i dont know how to fix that m8 maybe you should try to start all over again.. atleast if you dont have any special things u created.


    Ty for helping i fixed myself :) bud now he says unknown column 'monid' 'field list' plz help me : ) Fixed:)

    EDIT: Ok i fixed that problem bud now when i start the world server my memory is geting higher and higher it starts with 230.240.250.300.320 :S and so on until my pc says that i use to much memory and then i shutted down the pc guz i couldnt do anything :S so plz can some1 help me Ty

    -greets- Ni3tski
    Last edited by Ni3tski; 18-11-06 at 10:42 AM.

  25. #775
    Enthusiast PeanutBBB is offline
    MemberRank
    Oct 2006 Join Date
    Somewhere in ur gardenLocation
    35Posts
    Uuhm i got a qeustion about ig if i put exp rate at 10 it's only for 1 map
    how do i change?



Advertisement