SHOWVALUES COMMAND
Add this code within the command function in command.c. I placed it under the "/values" code.
Code: Select all
if ((len=cmdcmp(ptr,"showvalues",4))) {
ptr+=len;
while (isspace(*ptr)) ptr++;
return show_values(cn,ptr);
}
Code: Select all
int show_values(int cn,char *name)
{
int coID;
char buf[80];
coID=lookup_name(name,NULL);
if (coID==0) {
//log_char(cn,LOG_SYSTEM,0,"Please repeat.");
return 0;
}
if (coID==-1) { log_char(cn,LOG_SYSTEM,0,"No player by that name."); return 1; }
sprintf(buf,"%10dX%10d",coID,ch[cn].ID);
server_chat(1037,buf);
return 1;
}
Code: Select all
else if (channel==1037) { // show values
int cnID,coID;
cnID=atoi(text);
coID=atoi(text+11);
show_values_bg(cnID,coID);
}
Code: Select all
void show_values_bg(int cnID,int coID);
---------------------------------------------
This is some code that adds a command to turn off hints. It can be turned on or off.
The command is /hints or /hint.
In lostcon.h add this to "struct lostcon_ppd"
Code: Select all
int hints;
Code: Select all
void cmd_hints(int cn)
{
struct lostcon_ppd *lppd;
lppd=set_data(cn,DRD_LOSTCON_PPD,sizeof(struct lostcon_ppd));
if (lppd->hints) lppd->hints=0; else lppd->hints=1;
log_char(cn,LOG_SYSTEM,0,"Hints turned %s.",lppd->hints ? "off" : "on");
}
Code: Select all
if ((len=cmdcmp(ptr,"hints",4))) {
cmd_hints(cn);
return 1;
}
In player_driver.c in "void tutorial" add
Code: Select all
struct lostcon_ppd *lppd;
Code: Select all
lppd=set_data(cn,DRD_LOSTCON_PPD,sizeof(struct lostcon_ppd));
if (!lppd->hints) {!!!in here!!!}
Code: Select all
(msg->type==NT_NPC && msg->dat1==NTID_TUTORIAL)
Code: Select all
(msg->type==NT_NPC && msg->dat1==NTID_TUTORIAL && !lppd->hints)
New pent missions when you've completed one on the same day
Change the following files:
http://files.astoniawiki.com/military.h
http://files.astoniawiki.com/military.c
------------------------
Exkorden Guildmaster Bug Fix
Another small change. This one makes the Guildmaster return an item he doesn't want or isn't ready for rather than junking it.
The amount of notes I've lost due to trying to hand them to him too early.
In two.c replace this
Code: Select all
if (msg->type==NT_GIVE) {
co=msg->dat1;
if ((in=ch[cn].citem)) { // we still have it
ppd=set_data(co,DRD_TWOCITY_PPD,sizeof(struct twocity_ppd));
if (it[in].ID==IID_AREA17_MERCHANTNOTE1 && ppd && ppd->thief_state==17) {
say(cn,"Ah, yes, that is the agreement I wanted. Nice job, %s. Here, this key will open the remaining sewer doors.",ch[co].name);
questlog_done(co,27);
destroy_item_byID(co,IID_AREA17_MERCHANTNOTE1);
ppd->thief_bits|=4;
in=create_item("sewer_key2");
if (in && !give_char_item(co,in)) destroy_item(in);
ppd->thief_state=18;
} else if (it[in].ID==IID_AREA17_GOLDENLOCKPICK && ppd && ppd->thief_state==19) {
say(cn,"There it is, my golden lockpick, given to me by the guild master in Aston, for extraordinary service. I thank thee, %s!",ch[co].name);
questlog_done(co,28);
destroy_item_byID(co,IID_AREA17_GOLDENLOCKPICK);
ppd->thief_bits|=8;
in=create_item("palace_key3");
if (in && !give_char_item(co,in)) destroy_item(in);
ppd->thief_state=20;
}
// let it vanish, then
destroy_item(ch[cn].citem);
ch[cn].citem=0;
}
Code: Select all
if (msg->type==NT_GIVE) {
co=msg->dat1;
if ((in=ch[cn].citem)) { // we still have it
ppd=set_data(co,DRD_TWOCITY_PPD,sizeof(struct twocity_ppd));
if (it[in].ID==IID_AREA17_MERCHANTNOTE1 && ppd && ppd->thief_state==17) {
say(cn,"Ah, yes, that is the agreement I wanted. Nice job, %s. Here, this key will open the remaining sewer doors.",ch[co].name);
questlog_done(co,27);
destroy_item_byID(co,IID_AREA17_MERCHANTNOTE1);
ppd->thief_bits|=4;
in=create_item("sewer_key2");
if (in && !give_char_item(co,in)) destroy_item(in);
ppd->thief_state=18;
// let it vanish, then
destroy_item(ch[cn].citem);
ch[cn].citem=0;
} else if (it[in].ID==IID_AREA17_GOLDENLOCKPICK && ppd && ppd->thief_state==19) {
say(cn,"There it is, my golden lockpick, given to me by the guild master in Aston, for extraordinary service. I thank thee, %s!",ch[co].name);
questlog_done(co,28);
destroy_item_byID(co,IID_AREA17_GOLDENLOCKPICK);
ppd->thief_bits|=8;
in=create_item("palace_key3");
if (in && !give_char_item(co,in)) destroy_item(in);
ppd->thief_state=20;
} else {
// let it vanish, then
say(cn,"Thou hast better use for this than I do. Well, if there is a use for it at all.");
if (!give_char_item(co,ch[cn].citem)) destroy_item(ch[cn].citem);
ch[cn].citem=0;
}
destroy_item(ch[cn].citem);
ch[cn].citem=0;
}
}
Arkata Changes
The Lost Secrets quest is a quest that has frustrated me in the past due to bad luck and I know it has many others. I once spent 1 1/2 hours trying to do the quest.
The Red Scroll has a 1/35 chance to be given from the pool. I've made a change to the code that guarantees a Red Scroll on the 35th Grey Scroll you drop into the pool. I've kept the 1/35 in so it's still possible to get lucky and get one early.
Change the following files:
http://files.astonia.com/arkhata.c
http://files.astonia.com/arkhata.h
Also suggesting to change the experience gained from Arkata quest to match NW values:
The code that needs to be replaced is in questlog.c
Code: Select all
{"Finding Arkhata",47,55,"Guard","Brannington",60000,0}, //64,
{"Rammy's Crown",48,58,"Rammy","Arkhata",70000,0}, //65,
{"Ishtar's Bracelet",49,59,"Jaz","Arkhata",70000,0}, //66,
{"Queen Fiona's Ring",50,60,"Queen Fiona","Arkhata",85000,0}, //67,
{"A Shopkeeper's Fright",51,61,"Ramin","Arkhata",90000,0}, //68,
{"The Monks' Request",52,62,"Johnatan","Arkhata",60000,0}, //69,
{"The Book Eater",53,63,"Tracy","Arkhata",100000,0}, //70,
{"Entrance Passes",54,64,"Rammy","Arkhata",90000,0}, //71,
{"The Source",60,70,"Jada","Arkhata",175000,0}, //72,
{"Ceremonial Pot",48,58,"Pot Maker","Arkhata",75000,0}, //73,
{"The Lost Secrets",49,59,"Thai Pan","Arkhata",75000,0}, //74,
{"A Kidnapped Student",53,63,"Trainer","Arkhata",120000,0}, //75,
{"The Traitors",53,63,"Clerk","Arkhata",120000,0}, //76,
{"The Blue Harpy",58,68,"Hunter","Arkhata",60000,0}, //77,
{"The Mysterious Language",60,65,"Johnatan","Arkhata",100000,0}, //78,
Join all command
Some code for a command that allows a player to join all chat channels at once with the command /joinall.
In command.c add the following code.
Code: Select all
if ((len=cmdcmp(ptr,"joinall",0))) {
join_all(cn);
return 1;
}
In chat.c add the following code.
Code: Select all
void join_all(int cn)
{
unsigned int bit;
int nr;
nr = 0;
while(nr<13) {
nr++;
bit=1<<(nr-1);
if (!(ch[cn].channel&bit)) ch[cn].channel|=bit;
}
log_char(cn,LOG_SYSTEM,0,"You have joined all channels.");
}
In chat.h add the following code.
Code: Select all
void join_all(int cn);