Jump to content

lillecarl

Members
  • Posts

    893
  • Joined

  • Last visited

  • Donations

    0.00 GBP 

Posts posted by lillecarl

  1. You instead create a new integral value in the player class with a default value of 1

    uint32 xprate = 1;

    Then inside the void Player::GiveXP(uint32 xp, Unit* victim) function you add this: xp = xp*xprate; (in the beginning would probably be fine)

    Then you create a chat command to set the players xprate value.

    That should be it, if you need more help, then reply here again! And remember, the goal is to learn!

  2. 1: Depends on packet compression and if nagle is enabled. Memory depends on where the players are located and what your "unload timers" are on, but calculate on a startup base of 150mb and each player 1-2 mb just to get a hint.

    Is that a joke? The bandwidth per player is a few kilobits/sec MAXIMUM; usually they will probably use far less. A 150Mbit/sec connection is easily enough for tens of thousands of players.

    Also unload timers only affects CPU/memory usage. Has no effect on bandwidth.

    IF you could read you would see that i did type about the memory use aswell, about the traffic usage i can tell you that i were participating in a low pop server (5-50)24/7, and it used about 250 mb in both directions on more then a week.

    Arrogant!

  3. Working now! 100%

    bool ChatHandler::HandleWarpCommand(char* args)
    {
       // Based on a concept by Pwntzyou
       if (!*args)
           return false;
    
       Player* _player = m_session->GetPlayer();
    
       char* arg1 = strtok((char*)args, " ");
       char* arg2 = strtok(NULL, " ");
    
       if (! arg1)
           return false;
    
       if (! arg2)
           return false;
    
       char dir = arg1[0];
       int value = (int)atoi(arg2);
       float x = _player->GetPositionX();
       float y = _player->GetPositionY();
       float z = _player->GetPositionZ();
       float o = _player->GetOrientation();
       uint32 mapid = _player->GetMapId();
       PSendSysMessage("Value is: %i",value);
    
       switch (dir)
       {
       case 'x':
           {
               float xx = x + cosf(o)*value;
               float xy = y + sinf(o)*value; 
               _player->TeleportTo(mapid, xx, xy, z, o);
           }
           break;
       case 'y':
           {
               float yx = x + cos(o-(M_PI/2))*value;
               float yy = y + sin(o-(M_PI/2))*value;
               _player->TeleportTo(mapid, yx, yy, z, o);
           }
           break;
       case 'z':
           {
               _player->TeleportTo(mapid, x, y, z + value, o);
           }
           break;
       case 'o':
           {
               o = o - (value * M_PI / 180.0f);
    
               if (o < 0.0f) o += value * M_PI;
               else if (o > 2* M_PI) o -= value * M_PI;
               _player->TeleportTo(mapid,x,y,z,o);
           }
           break;
       }
       return true;
    }
    

  4. 1: Depends on packet compression and if nagle is enabled. Memory depends on where the players are located and what your "unload timers" are on, but calculate on a startup base of 150mb and each player 1-2 mb just to get a hint.

    2: You can create custom items, but that is not recommended. Since you have to modify the game client to make it work.

    3: Mmaps means movement maps, which means that the server calculates a path for creatures/charge etc... to follow, instead of going trough walls and air.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use