Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.

Constant Updates [Oct. 10-17]

3 participants

Aller en bas

Constant Updates [Oct. 10-17] Empty Constant Updates [Oct. 10-17]

Message  Sason Lun Oct 11, 2010 8:53 am

Throughout this week, Duncan and I will be constantly upgrading the server, adding more and more everyday.
If any bugs are found, please report them immediately through the forums, or to a staff member.

If you have any suggestions, also post them on the forums.

Soon to come:

  • Rings + Weddings
  • Player NPCs
  • JQ Points Reward NPC
  • Custom Chairs
  • Etc..

Known Bugs:

  • Losing All Skills/BL/Guild
  • Losing Fap Points
  • Rollbacks
Sason
Sason

Posts : 208
Join date : 29/08/2010
Age : 33

http://fapstory.com/vote.php

Revenir en haut Aller en bas

Constant Updates [Oct. 10-17] Empty Re: Constant Updates [Oct. 10-17]

Message  Towelie Lun Oct 11, 2010 12:13 pm

Probably adding the command @saveall to use before shutting down the server, so that it saves the memory to the mysql database.


1. Open up Player.cpp

2. Now look at the Player::~Player() block of stuff

3. Copy everything in BETWEEN not including
Code:
Code:
 Players::deletePlayer(this);
and
Code:
Code:
 Skills:stopTimerPlayer(this);
4. In between the two above codes, put:
Code:
Code:
 save();
5. Underneath:
Code:
Code:
       isconnect = false;   }}
6. Type:
Code:
Code:
 void Player::save() {
7. Then paste what you just copied before from step 3

8. Type:
Code:
Code:
 }
9. Save Player.cpp

10. Open up Player.h

11. Above:
Code:
Code:
    void handleRequest(unsigned char* buf, int len);
put:
Code:
Code:
 void save();
Now save.

12. In Players.cpp add this command block to all your other commands:
Code:
Code:
       else if(strcmp(command, "save") == 0) {         player->save();                   PlayersPacket::showMassage("You have saved your progress successfully", 5);         printf ("%s has saved\n", player->getName());      }

I didn't create this method nor do I take any credits for it.
Towelie
Towelie

Posts : 103
Join date : 03/10/2010

Revenir en haut Aller en bas

Constant Updates [Oct. 10-17] Empty Re: Constant Updates [Oct. 10-17]

Message  Jonathan [Co-owner] Lun Oct 11, 2010 12:22 pm

Gm's have !saveall to make sure everyones account is saved, so it won't be a problem to non-gm players Very Happy.
Jonathan [Co-owner]
Jonathan [Co-owner]

Posts : 224
Join date : 28/08/2010
Location : Australia

http://fapmsforumsv2.friendhood.net   or    http://www.youtube.c

Revenir en haut Aller en bas

Constant Updates [Oct. 10-17] Empty Re: Constant Updates [Oct. 10-17]

Message  Towelie Lun Oct 11, 2010 12:30 pm

As for the JQ points system, it's the same exact method you used for your fap points, just add the new command "JQPOINTS" in the same method you did for your "fap points" or "Voting points" as it's originally called.

Then just use cm. commands in your npc
Example:
Code:
cm.JQPoints(); // Shows you how much JQpoints the player has.
cm.JQPoints(1000); // Sets the users JQPoints to 1000, directly into MySQL
cm.JQPoints(100); // Adds or removes 100 JQPoints on top of what's already in MySQL
cm.JQPoints1(); // Adds 1 JQPoint(s) on top of what's already in MySQL <<--- What you'll be using in your npc
NPC Example:
var status = 0;
Code:

function start() {
    status = -1;
    action(1, 0, 0);
}

function action(mode, type, selection) {
    if (mode == -1) {
        cm.dispose();
    } else {
        if (mode == 0 && status == 1) {
            cm.dispose();
            return;
        }
        if (mode == 1)
            status++;
        else
            status--;
            if (status == 0) {
                cm.sendNext("Congratulations on making it this far!");
            } else if (status == 1) {
                cm.sendSimple(Would you like to receive your prize? \r\n #L0##bYes!#k#l \r\n #L1##bGive me a second.#k#l");
            } else if (status == 2) {
                if (selection == 0) {
                    cm.JQPoints1337()
                    cm.sendOk("Enjoy!");
                 
                } else if (selection == 1) {
                    cm.sendOk("I'll be here.");
                    cm.dispose();
                }
            }
    }
}
Towelie
Towelie

Posts : 103
Join date : 03/10/2010

Revenir en haut Aller en bas

Constant Updates [Oct. 10-17] Empty Re: Constant Updates [Oct. 10-17]

Message  Sason Lun Oct 11, 2010 4:43 pm

Already added them
Sason
Sason

Posts : 208
Join date : 29/08/2010
Age : 33

http://fapstory.com/vote.php

Revenir en haut Aller en bas

Constant Updates [Oct. 10-17] Empty Re: Constant Updates [Oct. 10-17]

Message  Contenu sponsorisé


Contenu sponsorisé


Revenir en haut Aller en bas

Revenir en haut

- Sujets similaires

 
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum