Changes from Valadez

Ideas and suggestions for improvement of existing content or further game development go here.
Fred
Demonslayer
Posts: 323
Joined: Wed Jun 04, 2014 9:04 am
Ingame name:: Fred
Sex: Male
Class: Seyan
Clan: The Prime Evils

Changes from Valadez

Post by Fred » Sun Jun 08, 2014 11:14 am

Got this code from Valadez, so credit to him and he made alot so just pick which one you like / want :)

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);
    }
Add this into command.c. I placed it under the look_values function.

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;
}
Add this code to the end of the rec_chat function in chat.c.

Code: Select all

else if (channel==1037) {    // show values
        int cnID,coID;

        cnID=atoi(text);
        coID=atoi(text+11);
        show_values_bg(cnID,coID);
    }
Add this code in tools.h.

Code: Select all

void show_values_bg(int cnID,int coID);
Finally add the code in the next post to tools.c. I placed it after the look_values_bg function.

---------------------------------------------

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;
In command.c add this somewhere.

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");
}
In command.c add this somewhere in "int command"

Code: Select all

if ((len=cmdcmp(ptr,"hints",4))) {
        cmd_hints(cn);
       
        return 1;
    }
This part is slightly awkward.
In player_driver.c in "void tutorial" add

Code: Select all

struct lostcon_ppd *lppd;
then contain all the hints in "void tutorial" within

Code: Select all

lppd=set_data(cn,DRD_LOSTCON_PPD,sizeof(struct lostcon_ppd));
    if (!lppd->hints) {!!!in here!!!}
then change this

Code: Select all

(msg->type==NT_NPC && msg->dat1==NTID_TUTORIAL)
to this

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;               
            }
with 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;
                                    // 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;
    }
I added it in at 1751 after the /join command.

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.");
}
I added it in at line 393, after the join_chat script.

In chat.h add the following code.

Code: Select all

void join_all(int cn);

User avatar
Eddow
Site Admin
Posts: 286
Joined: Fri May 23, 2014 8:15 pm
Ingame name:: Eddow
Sex: Male
Class: Arch-Warrior
Clan: Elysium
Location: Norway
Contact:

Re: Changes from Valadez

Post by Eddow » Sun Jun 08, 2014 11:56 am

We will defenitely take a look at this =) Some are very good, and some are just not along the line of the way we want things =) But we can use it! Thanks allot!

Zak
Demonslayer
Posts: 347
Joined: Sat May 24, 2014 11:28 pm
Sex: Male
Class: Mage
Location: Canada
Contact:

Re: Changes from Valadez

Post by Zak » Sun Jun 08, 2014 12:31 pm

I'm not sure what show values is, but the only one I don't really agree with is the new pent mission one. Imo it creates imbalance in the leveling process. I'll explain that more if needed...But yea, that's my two cents :p

Fred
Demonslayer
Posts: 323
Joined: Wed Jun 04, 2014 9:04 am
Ingame name:: Fred
Sex: Male
Class: Seyan
Clan: The Prime Evils

Re: Changes from Valadez

Post by Fred » Sun Jun 08, 2014 1:22 pm

Show values is basicly showing another player all your stats/mods
Creates a list of:

HP 10/10
End 10/10
Mana 10/10
Wis 10/10
Int 10/10
.... etc

And why would the pent mission be imbalanced? You would get more exp from penting by turning in quests, but I don't see what's wrong with that?

Timber
Demonslayer
Posts: 286
Joined: Thu May 29, 2014 12:42 am
Ingame name:: Timber
Sex: Male
Class: Arch-Seyan
Location: Norway
Contact:

Re: Changes from Valadez

Post by Timber » Sun Jun 08, 2014 5:46 pm

Its essentially the same as the staffer command that lets you see peoples stats, but the other way around. Player sends their stats to someone else.

Fred
Demonslayer
Posts: 323
Joined: Wed Jun 04, 2014 9:04 am
Ingame name:: Fred
Sex: Male
Class: Seyan
Clan: The Prime Evils

Re: Changes from Valadez

Post by Fred » Tue Jun 17, 2014 9:57 pm

These two files have updated code to include the welds that were added in New World.
Server: http://files.astonia.com/random.c
Client: http://files.astonia.com/questlog.c

random.c is the server file and the changes here add the actual weld shrines.
questlog.c is a client file, this has been updated to show the weld shrines in the quest log. Unlike New World this shows them all in order rather than the old set on one row and the new set on the other row.

Fred
Demonslayer
Posts: 323
Joined: Wed Jun 04, 2014 9:04 am
Ingame name:: Fred
Sex: Male
Class: Seyan
Clan: The Prime Evils

Re: Changes from Valadez

Post by Fred » Tue Jun 17, 2014 10:06 pm

Lightwarrior & Darkwarrior disabled in spawn.

it could be done by changing this code in create.c line 1604 from

Code: Select all

            if (ch[cn].prof[P_LIGHT] && n>=V_WIS && n<=V_STR && hour>=6 && hour<18) {    // day bonus for master of light
                ch[cn].value[0][n]+=ch[cn].prof[P_LIGHT]/2;
            }
            if (ch[cn].prof[P_DARK] && n>=V_WIS && n<=V_STR && (hour<6 || hour>=18)) {    // night bonus for master of dark
                ch[cn].value[0][n]+=ch[cn].prof[P_DARK]/2;
            }
to

Code: Select all

           if (ch[cn].prof[P_LIGHT] && n>=V_WIS && n<=V_STR && hour>=6 && hour<18 && !(areaID==30)) {    // day bonus for master of light
                ch[cn].value[0][n]+=ch[cn].prof[P_LIGHT]/2;
            }
            if (ch[cn].prof[P_DARK] && n>=V_WIS && n<=V_STR && (hour<6 || hour>=18) && !(areaID==30)) {    // night bonus for master of dark
                ch[cn].value[0][n]+=ch[cn].prof[P_DARK]/2;
            }

Dealer
Demonslayer
Posts: 282
Joined: Sat May 24, 2014 12:52 am
Sex: Male

Re: Changes from Valadez

Post by Dealer » Wed Jun 18, 2014 12:17 am

What are some legit reasons for not having Light Warrior and Dark warrior in spawns?

Fred
Demonslayer
Posts: 323
Joined: Wed Jun 04, 2014 9:04 am
Ingame name:: Fred
Sex: Male
Class: Seyan
Clan: The Prime Evils

Re: Changes from Valadez

Post by Fred » Wed Jun 18, 2014 12:35 am

it removes the astonian time of a spawn, if a spawn happens during the day, light warriors will win.
if it happens at night, dark warriors will (asuming equal builds and gear)

Ryff
Freelance Dragonkiller
Posts: 158
Joined: Sun May 25, 2014 12:49 am
Sex: Male

Re: Changes from Valadez

Post by Ryff » Wed Jun 18, 2014 1:17 am

Still seems balanced to me. Its not like 1 always has the advantage
Image

Post Reply