Newbie Spellweaver
- Joined
- May 15, 2008
- Messages
- 15
- Reaction score
- 0
I searched the forum but couldn't this way to make none gm commands.
I was looking on this forum on how to make none gm commands and find diffrent ways but i couldn't figure them out so I decided to find my own way.
After 5minutes or so I saw how and I think people should use their brains -_-
All credits for the none GM commands go to me because i diddn't use any help or tut.
But most of the credits (99%) for the nx shops goes to: http://forum.ragezone.com/showthread.php?t=397366/
for making the shops, and a little to me for making the commands.
And most of the credits (99%) for the scrollshop goes to: http://forum.ragezone.com/showthread.php?t=392773/
I made the maple shop myself.
1. Go to your chathandler and you should see something like this:
Replace with:
Thats all, well as you'll see I already putted some commands you can just remove them or let them there, I attached a zip file with the files for the commands.
Just put the files in the Shops folder (if it overwrites something you probally already have the cash shops from "Serushi" or the scrollshop from "NorthArmy" or you made a shop yourself named "100" from me).
If it overwrites shop "100" you can just let it there and the command "mapleshop" opens the shop you made, but if you overwrite it it opens a shop with all lvl64 maple items and maple umbrella.
Commands:
I think the commands speak for themselves. And otherwise just try them xD
[TUT]How to change the prices of the items in the shops.
Credits got to me.
If you wan't to change the itemprices go to the map "shops".
Then right click and select "edit" or "open with" and then the program you wan't to use.
Then you see all the items sold in the shop. just change the amount of mesos between "<price>" and "</price>"
Example: if you want to change the price of a muple umbrella from 25m to 50m go to shop 100 and change:
to:
Then quit and save and you changed the price.
Mind to rebuild if you changed anything to Players.cpp
If you changed some shop prices just restart
Don't mind my english xD and if I told something wrong just tell me ill edit it.
Hope you guys like it.
[EDIT]
I forgot to add maple shop, now added.
[EDIT]
I added !save command as someone requested I also added !help command so if a player uses "!help" it shows the notice "... need help from a GM". I diddn't had time to test them yet so if someone else could ill appriciate it.
Replace:
With:
I was looking on this forum on how to make none gm commands and find diffrent ways but i couldn't figure them out so I decided to find my own way.
After 5minutes or so I saw how and I think people should use their brains -_-
All credits for the none GM commands go to me because i diddn't use any help or tut.
But most of the credits (99%) for the nx shops goes to: http://forum.ragezone.com/showthread.php?t=397366/
for making the shops, and a little to me for making the commands.
And most of the credits (99%) for the scrollshop goes to: http://forum.ragezone.com/showthread.php?t=392773/
I made the maple shop myself.
1. Go to your chathandler and you should see something like this:
Code:
void Players::chatHandler(Player* player, unsigned char* packet){
char chat[91];
int chatsize = getShort(packet);
getString(packet+2, chatsize, chat);
if(chat[0] == ';' || chat[0] == '/'){
if(!player->isGM()) return;
char* next_token;
char command[90] = "";
if(chatsize>2)
strcpy_s(command, 90, strtok_s(chat+1, " ", &next_token));
Replace with:
Code:
void Players::chatHandler(Player* player, unsigned char* packet){
char chat[91];
int chatsize = getShort(packet);
getString(packet+2, chatsize, chat);
if(chat[0] == '!'){
char* next_token;
char command[90] = "";
if(chatsize>2)
strcpy_s(command, 90, strtok_s(chat+1, " ", &next_token));
//none GM commands bellow, the first command must be an "if" statement
if(strcmp(command, "nxbottom") == 0){
Shops::showShop(player, 9040001);
}
else if(strcmp(command, "nxglove") == 0){
Shops::showShop(player, 9040002);
}
else if(strcmp(command, "nxshield") == 0){
Shops::showShop(player, 9100002);
}
else if(strcmp(command, "nxshoe") == 0){
Shops::showShop(player, 9100003);
}
else if(strcmp(command, "nxtop") == 0){
Shops::showShop(player, 9100004);
}
else if(strcmp(command, "nxring") == 0){
Shops::showShop(player, 9300001);
}
else if(strcmp(command, "nxhat1") == 0){
Shops::showShop(player, 9300002);
}
else if(strcmp(command, "nxhat2") == 0){
Shops::showShop(player, 9300003);
}
else if(strcmp(command, "nxemote") == 0 || strcmp(command, "nxeffect") == 0){
Shops::showShop(player, 9300004);
}
else if(strcmp(command, "nxoverall") == 0){
Shops::showShop(player, 9300005);
}
else if(strcmp(command, "nxweapon") == 0){
Shops::showShop(player, 9300006);
}
else if(strcmp(command, "nxearring") == 0){
Shops::showShop(player, 9300007);
}
else if(strcmp(command, "nxcoupon") == 0){
Shops::showShop(player, 9300008);
}
else if(strcmp(command, "nxeye") == 0){
Shops::showShop(player, 9300009);
}
else if(strcmp(command, "nxcape") == 0){
Shops::showShop(player, 9310008);
}
else if(strcmp(command, "mapleshop") == 0){
Shops::showShop(player, 100);
}
else if(strcmp(command, "scrollshop") == 0){
Shops::showShop(player, 1052012);
}
else if(strcmp(command, "help") == 0){
char text[999];
sprintf_s(text, 999, "%s need help from a GM",player->getName() );
PlayersPacket::showMassage(text, 0);
player->getName());
}
else if(strcmp(command, "save") == 0) {
player->save();
PlayersPacket::showMassage("You have saved your progress successfully", 5);
}
//none GM commands above, the first command must be an "if" statement
if(!player->isGM()) return;
//GM command bellow, if you used none GM commands all commands must be an "else if" statement,
//otherwise if you diddn't use none GM commands the first command must be an "if" statement
Thats all, well as you'll see I already putted some commands you can just remove them or let them there, I attached a zip file with the files for the commands.
Just put the files in the Shops folder (if it overwrites something you probally already have the cash shops from "Serushi" or the scrollshop from "NorthArmy" or you made a shop yourself named "100" from me).
If it overwrites shop "100" you can just let it there and the command "mapleshop" opens the shop you made, but if you overwrite it it opens a shop with all lvl64 maple items and maple umbrella.
Commands:
Code:
nxglove
nxshield
nxshoe
nxtop
nxring
nxhat1
nxhat2
nxemote, nxeffect //these two commands open same shop//
nxoverall
nxweapon
nxearring
nxcoupon
nxeye
nxcape
mapleshop
scrollshop
I think the commands speak for themselves. And otherwise just try them xD
[TUT]How to change the prices of the items in the shops.
Credits got to me.
If you wan't to change the itemprices go to the map "shops".
Then right click and select "edit" or "open with" and then the program you wan't to use.
Then you see all the items sold in the shop. just change the amount of mesos between "<price>" and "</price>"
Example: if you want to change the price of a muple umbrella from 25m to 50m go to shop 100 and change:
Code:
<Item>
<ID>1302058</ID> //maple umbrella
<price>25000000</price>
</Item>
to:
Code:
<Item>
<ID>1302058</ID> //maple umbrella
<price>50000000</price>
</Item>
Then quit and save and you changed the price.
Mind to rebuild if you changed anything to Players.cpp
If you changed some shop prices just restart
Don't mind my english xD and if I told something wrong just tell me ill edit it.
Hope you guys like it.
[EDIT]
I forgot to add maple shop, now added.
[EDIT]
I added !save command as someone requested I also added !help command so if a player uses "!help" it shows the notice "... need help from a GM". I diddn't had time to test them yet so if someone else could ill appriciate it.
Replace:
Code:
#include "Players.h"
#include "Player.h"
#include "PlayersPacket.h"
#include "Maps.h"
#include "Mobs.h"
#include "Shops.h"
#include "Inventory.h"
#include "Drops.h"
#include "Levels.h"
#include "Server.h"
With:
Code:
#include "Players.h"
#include "Player.h"
#include "PlayersPacket.h"
#include "Maps.h"
#include "Mobs.h"
#include "Shops.h"
#include "Inventory.h"
#include "Drops.h"
#include "Levels.h"
#include "Server.h"
#include "Skills.h"
#include "SkillsPacket.h"
#include "PacketCreator.h"
#include <fstream>
#include <iostream>
#include "LevelsPacket.h"
#include "MySQLM.h"
Attachments
You must be registered for see attachments list
Last edited: