Jump to content

bWolfie

Members
  • Content Count

    848
  • Joined

  • Last visited

  • Days Won

    34

Posts posted by bWolfie


  1. This code announces the character's name when they enter the map. It checks the name of your map using the strcharinfo(3) function.

     

    OnPCLoadMapEvent:
    if (strcharinfo(3) == "ENTER YOUR MAP HERE") {
    mapannounce "ENTER YOUR MAP NAME HERE","" + strcharinfo(0) + " joined the map!",0;
    }
    end;
    

  2. Go in your map_zone_db.conf and put the mapflag under the mapflag part in whatever area you want it. e.g.

     

     

    {
        /* PvP zone is applied to all maps with a pvp mapflag */
        name: "PvP" /* changing this name requires MAP_ZONE_PVP_NAME to also be changed in src/map/map.h file */
     
        disabled_skills: {
            BS_GREED: "PLAYER"
            CG_HERMODE: "PLAYER"
        }
     
        disabled_items: {
            Greed_Scroll: true
        }
     
        mapflags: (
            "nocashshop",
            "adjust_skill_damage    HT_LANDMINE 200",
        )
     
    },
    

  3. ooh I just found this. You can use the gettimetick function. This is how I use it in one of my scripts.

    How it works if you pay it 2m zeny (just remove this and anything else you don't want, this is just an example), it will announce the message for you.

    set $DelayTime,gettimetick(2) + ( 30 * 60 ); is where you set your timer (30 * 60 seconds, AKA 30 minutes).

    I think it works on a global local account basis?

     

    I'm sure you can make use of this even if its not good in this form.

    dunno.

                if( $DelayTime <= gettimetick(2)) {
                    mes .@name$;
                    mes "For just ^FF00002,000,000^000000^000000z I can send a challenge out to other players on the server.";
                    next;
                    switch(select("^777777No Thanks^000000:Send out the challenge!")) {
                        case 1:
                            next;
                            goto L_OneSelect;
                        break;
                        
                        case 2:
                            if(Zeny >= 2000000) {
                                set $DelayTime,gettimetick(2) + ( 30 * 60 );
                                Zeny -= 2000000;
                                next;
                                announce " " + strcharinfo(0) + " is looking for a challenger in Duel Room " + .map$ + ".",bc_all,0xD45611;
                                close;
                            }
                            else {
                                mes .@name$;
                                mes "You don't have enough zeny!";
                                close;
                            }
                        break;
                    }
                    close;
                }
                else if ( $DelayTime > gettimetick(2) ){
                        set $last, $DelayTime - gettimetick(2);
                        set $min,  $last % (24*60*60) % (60*60) / (60);
                        set $sec,  $last % (24*60*60) % (60*60) % (60);
                        mes .@name$;
                        mes "You recently sent out a challenge.";
                        mes "Please wait "+$min+" minutes, "+$sec+" seconds before issuing another.";
                        close;
                    }
    

  4. How exactly do the labels OnPCDieEvent and OnPCKillEvent work?

     

    Example:

    I want any characters killed in the map Prontera to lose 1 zeny.

    While I also want any character who kills a player in Prontera to gain 1 zeny.

     

    Something like this...



    -    script    PronteraKill    FAKE_NPC,{
    OnPCDieEvent:
        if (strcharinfo(3) == "prontera") {
            Zeny -= 1;
        }
            end;
        
    OnPCKillEvent:
        if (strcharinfo(3) == "prontera") {
            Zeny += 1;
        }
            end;
    }


     

    Who can help me here? I'm yet to come across an example script.

     

    Thanks guys.

     

    never mind, i figured my problem out. I had it on a separate FAKE_NPC script rather than in the script itself.


  5. I have a few questions regarding where I can post stuff and what I am limited to.

     

    I want to write some guides for really basic things. Pretty much all of them already exist, but some of them are difficult to comprehend for first-timers. Having only recently come to the world of ro emulators, I still feel kind of new and feel my perspective would be helpful.

    1. Where can I post these?

    2. Can I make a guide for something that already exists?


  6. Have you double checked your syntax and such? If you are getting unknown item it usually means one of two things.

    1. Your ID is not matching that in your item_db.conf.

    2. Your itemInfo is not arranged properly.

     

    Have you checked there is not another itemInfo your client is trying to read?

     

     

    [501] = {
    unidentifiedDisplayName = "Item Name",
    unidentifiedResourceName = "name_of_sprite_in_grf",
    unidentifiedDescriptionName = {
    "This is a description.",
     },
    identifiedDisplayName = "Item Name",
    identifiedResourceName = "name_of_sprite_in_grf",
    identifiedDescriptionName = {
    "This is a description.",
    },
    slotCount = 0,
    ClassNum = 0
    },    
    
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.