Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

save command

Junior Spellweaver
Joined
Sep 20, 2007
Messages
138
Reaction score
0
Edit: I've completely rewritten this tutorial on installing !save.... since some people couldn't get it working.

and PLEASE USE YOUR FRICKING BRAINS AND COMMON SENSE and go learn some basics of programming before you complain about it not working. Let me tell you, IT DOES WORK! Anyone who says it doesn't, is a friggn noob. I'm sorry, you aren't pro, you are a noob. And here ends my ranting. thx for reading now go install this.

1. Open up Player.cpp

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

3. CUT everything in BETWEEN not including
Code:
Players::deletePlayer(this);
and
Code:
Skills:stopTimerPlayer(this);

4. In between the two above codes, put:
Code:
save();

5. Underneath:
Code:
		isconnect = false;
	}
}

6. Type:
Code:
void Player::save() {

7. Then paste what you just cutted before from step 3

8. Type:
Code:
}

9. Save Player.cpp

10. Open up Player.h

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

12. In Players.cpp add this command block to all your other commands:
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());
		}
 
Last edited:
Newbie Spellweaver
Joined
Nov 9, 2006
Messages
81
Reaction score
1
Re: [release] !save command

Thanks a lot, I'll test it tomorrow. [Already added it to my server, but wont restart until tomorrow]. :]

<3
 
Junior Spellweaver
Joined
Sep 20, 2007
Messages
138
Reaction score
0
Re: [release] !save command

just yourself
 
Experienced Elementalist
Joined
Apr 3, 2008
Messages
290
Reaction score
0
Re: [release] !save command

but if you have the GM commands only for GM's how would that work for normal players ?
or if get the seperate normal commands to GM commands would that work ?
 
Junior Spellweaver
Joined
Sep 20, 2007
Messages
138
Reaction score
0
Re: [Release] !save command

i just edited my first post, check the top of the post :) you'll find your answer
 
Junior Spellweaver
Joined
Apr 6, 2008
Messages
157
Reaction score
0
Re: [Release] !save command

this can work with rev 005 right? if this does thatd be awesome release even if it doesnt i guess ill upgrade =o been getting mad losing levels and items t_t
 
Junior Spellweaver
Joined
Sep 20, 2007
Messages
138
Reaction score
0
Re: [Release] !save command

if you're using rev5 just make sure your save() function from the first step is correct
 
Junior Spellweaver
Joined
Apr 6, 2008
Messages
157
Reaction score
0
Re: [Release] !save command

mk sounds good ill test tomorrow thanks!
 
Newbie Spellweaver
Joined
Sep 21, 2006
Messages
11
Reaction score
0
Re: [Release] !save command

Error :

3>d:\maple story private server\new server used\maplestoryserver\maplestoryserver\players.cpp(100) : error C2039: 'showNotice' : is not a member of 'PlayersPacket'
3> d:\maple story private server\new server used\maplestoryserver\maplestoryserver\playerspacket.h(7) : see declaration of 'PlayersPacket'
3>d:\maple story private server\new server used\maplestoryserver\maplestoryserver\players.cpp(100) : error C3861: 'showNotice': identifier not found
3>d:\maple story private server\new server used\maplestoryserver\maplestoryserver\players.cpp(120) : warning C4018: '<' : signed/unsigned mismatch
 
Newbie Spellweaver
Joined
Apr 6, 2008
Messages
92
Reaction score
0
Re: [Release] !save command

c:\documents and settings\yuri\mijn documenten\private server rar's\titanmsver006\maplestoryserver\maplestoryserver\player.cpp(40) : error C3861: 'getOrigin': identifier not found
Players.cpp
c:\documents and settings\yuri\mijn documenten\private server rar's\titanmsver006\maplestoryserver\maplestoryserver\players.cpp(165) : warning C4018: '<' : signed/unsigned mismatch
c:\documents and settings\yuri\mijn documenten\private server rar's\titanmsver006\maplestoryserver\maplestoryserver\players.cpp(473) : error C2039: 'showNotice' : is not a member of 'PlayersPacket'
c:\documents and settings\yuri\mijn documenten\private server rar's\titanmsver006\maplestoryserver\maplestoryserver\playerspacket.h(7) : see declaration of 'PlayersPacket'
c:\documents and settings\yuri\mijn documenten\private server rar's\titanmsver006\maplestoryserver\maplestoryserver\players.cpp(473) : error C3861: 'showNotice': identifier not found
Generating Code...
Compiling...
 
Junior Spellweaver
Joined
Sep 20, 2007
Messages
138
Reaction score
0
Re: [Release] !save command

ive edited my thread topic, you'll need the notice packet installed for step 3 to work.

as for a getOrigin error, install the release v3 of the teleporter npcs script properly. its stickied in this forum.
 
Newbie Spellweaver
Joined
Jan 6, 2008
Messages
83
Reaction score
1
Re: [Release] !save command

Hi thank you for the great release,
I noticed that my character doesn't save.
So this will allow it to save?
Also will it still auto save?
 
Junior Spellweaver
Joined
Sep 20, 2007
Messages
138
Reaction score
0
Re: [Release] !save command

if you install this release, you will be able to save by:
- !save
- exiting the game from the menu in the client
 
Newbie Spellweaver
Joined
Apr 7, 2008
Messages
17
Reaction score
0
Re: [Release] !save command

... Where the hell did you get the function "getOrigin" from?
I don't have it, and I re-checked the teleporter NPC thread. It's not there either.
 
Newbie Spellweaver
Joined
Apr 7, 2008
Messages
17
Reaction score
0
Re: [Release] !save command

Oh, I see the problem. We are running different versions of the database.
For me (and others) it is stored in the database as "Pos", not "Origin".
The function is also getPos();
So for people with the getOrigin problem, use this line instead:
Code:
sprintf_s(sql, 2000, "update characters set level=%d, job=%d, str=%d, dex=%d, intt=%d, luk=%d, chp=%d, mhp=%d, cmp=%d, mmp=%d, ap=%d, sp=%d, exp=%d, fame=%d, map=%d, pos=%d, gender=%d, skin=%d, eyes=%d, hair=%d, mesos=%d where id=%d", getLevel(), getJob(), getStr(), getDex(), getInt(), getLuk(), getHP(), getMHP(), getMP(), getMMP(), getAp(), getSp(), getExp(), getFame(), getMap(), getPos(), getGender(), getSkin(), getEyes(), getHair(), inv->getMesos() ,getPlayerid());
 
Junior Spellweaver
Joined
Apr 22, 2007
Messages
123
Reaction score
0
Re: [Release] !save command

... Where the hell did you get the function "getOrigin" from?
I don't have it, and I re-checked the teleporter NPC thread. It's not there either.

What he said. I rechecked all the files and "getOrigin" seems to be located no where :O
 
Back
Top