Jump to content

Rynbef

Members
  • Posts

    509
  • Joined

  • Last visited

  • Days Won

    7

Posts posted by Rynbef

  1. @eakzoi How @WhiteEaglealready said. This is the solution u requested.

    20 hours ago, WhiteEagle said:

    I think, you don't understand the source change correctly.
    It create a new function like summon/monster spawning.

     fakeplayer( map, x, y, name, job_id, sex, hair_style, hair_color, weapon, shield, head_top, head_mid, head_bottom, option, cloth_color );

    Just make a script like this as excample:

    OnInit:
      setarray .hairstyle,1,2,3,4,5,6;
      setarray .haircolor,1,2,3,4,5,6;
      and so on !!
      .size_hairstyle = getarraysize(.hairstyle);
      .size_haircolor = getarraysize(.haircolor);
      [email protected] = rand(.size_hairstyle);
      [email protected] = rand(.size_haircolor);
      [email protected] = 30;
      while ([email protected] <= 30) {
    	fakeplayer( map, x, y, name, job_id, sex, .hairstyle[[email protected]], .haircolor[[email protected]], weapon, shield, head_top, head_mid, head_bottom, option, cloth_color );
    	[email protected]++;
      }
      end;
    }

     

    Fakeplayer() returns the Mob GID after spawn. U can store it in a variable and use setunitdata() to change or randomize the stats etc.

     

    Rynbef~

  2. @chadnessPlease next time use code box or attach ur file. It's easier to copy/edit and read.

    I've just added a delay as u want(if I understand u correctly). A check if 60 minutes ago since the completion of the last quest ago and an additional check if it was the same day. If it is a dialog will open and tells the player how many minutes he have to wait.

    //not tested

    RandomQuest.txt

     

    Rynbef~

    • Like 1
  3. @lLoydxx

    2nd  Endless Tower

    on line 2124 the monster "Naght Sieger" have their own label when he killed and this will trigger if he's died. I added ur request. If some of a player of the party kill Naght Sieger a loop though the party members will start and give the item to the party master if he's online.

     

    EndlessTower changed.txt

    //NOTE: Not tested

     

    Rynbef~

    • Upvote 1
  4. @lLoydxxfirst of all I've spend a lot of time to optimize the Ceffenia script u've attached. My language knowledge u used in the script is equals to zero😂 Portuguese I think.

    I haven't the time to correct the other scripts yet but if no one else will done it I will come back later and fix it.

     

    Optimizations

    U've added the if statement (gettime) on top of the script. This will only triggerd when the script starts.

    The event OnClock2357 triggers every day at the same time and without any check. U need to add the if statement on this label. The day u want to start-1. I've removed the sleep timer cause a 24 hours sleep isn't a good idea.

    I've added an announcement if the day is the 5th or 20th to announce the event will stop in x minutes(3,2,1) and that's what I mean with my portuguese knowledge. I hope I've write the correctly sentence😅

     

    U need another event OnClock0000 and then check if it's the 5th or 20th of a month and enable the npc. Of course if it is the 6th or 21th warp players out of map. Do the announcement and disable the npc.

     

    I've added a check OnInit if it is the 5th or 20th of a month to enable or disable the event. Cuz' if the server crashes or u need to perform a reloadscript the event will stop. It's stupid if the event should enabled 24hrs and the server crash after 2hrs as example.

     

    I corrected a lot of the formatting cuz' it's know much better to read and understand.

     

    I've replaced the menu with switch(select()) it's much easier to read and u don't need the thousands of labels. Just cases for each menu point.

    Also removed the next; on each label and put it before select.

     

    Monsters, Mapflags or Warp Portals should be on the bottom of a script not in the middle.

     

    //the script should be do what u want. I'm not able to test it cuz' I'm on mobile and a few hundred miles from my home.

    As I already said at beginning I'll change and optimize the other scripts later if now one already done it.

     

    Please let me know if everything works.

    cheffenia changed.txt

     

     

    Rynbef~

    • Upvote 1
  5. @powkdaI've posted a modified version above. Just replace ur case and check if it works. I can only recommend u to study about close; close2; and end; I've already explained it. Not only on this thread. U should read the rA/doc/script_commands.txt Manual! U do again used close; and end; wrong.

     

    Maybe attach ur full script. So I can understand why ur case needs a next; Is their a dialog before?

     

    Rynbef~

    • Like 1
  6. @Natsu Dragneelsearch for ur mysql config file (my.cnf).

    On Linux:

    /etc/mysql/my.cnf

     

    Change:

    bind-address = 127.0.0.1

    To:

    #bind-address = 127.0.0.1

     

    This will allow remote access to the database. But be careful! Use a iptable or UFW to allow only packets/connections from ur server ip.

    U need to change that the database user is accessible from other server.

     

    Of course restart ur server.

     

    Rynbef~

  7. @riopplease give us more informations.

    Please attach a screenshot of ur servers (char, map and login). Maybe attach ur config files (char_*, map_*, login_*, inter_* (athena.conf))

     

    Which version of rAthena u're using(is it an old one?) ?

    Which OS u're using?

     

    Do u installed a security system like Avira, Kaspersky and Co.?

    Do u have administrator rights on ur computer? -Try to run as administrator

    Do u've tried to add the servers to ur firewall? Or maybe ur security system to grant all rights.

     

    Which program ur using for ur database (MySQL) (Xampp as ex.)?

    Do u create a database and an user with all needed permissions to the db?

    Ur changed settings of ur mysql server?

    Maybe the port (default: 3306)?

    Is the mysql server on the same system or a virtual machine/other conputer/root or else?

     

    NOTE:

    This could be much easier to solve ur problem if u provide directly every informations u've tried and attach the exactly problem as screenshot or log file as example.

     

    Rynbef~

  8. @powkda

    Some small suggestions

    if u only want to know if player don't have one of an item u better change from:

    if(countitem(31000)<1)

     

    To:

    if(!countitem(31000))

     

    If u just need the label noanel once. U should better put the code directly to the if statement. It will be better than goto a label u only need once.

    U don't need to close; and end; the script. Close end the dialog (mes etc). End stops the script. It's as example used if no dialog is open. If u want to close the dialog but u want to do something like getitem, delitem or else where u need to keep player attached u can use close2. It will close the dialog normally but the script do stuff in background. Than u need to end the script afterwards.

    On switch case u can use break; to jump directly to the code after the switch. It will ignores the other cases.

     

    This should works for u:

    case 1:
        if(!countitem(31000))goto noanel;
        getinventorylist;
        for(set [email protected],0; [email protected]<@inventorylist_count; [email protected]++){
            if(@inventorylist_id[[email protected]] == 31000 && [email protected]_equip[[email protected]]){
                delitem @inventorylist_id[[email protected]],1;
                getitem 30001,5;
                next;
                mes "^FF0000["+strnpcinfo(1)+"]^000000";
                mes "Aqui está a sua recompensa.";
                close;
            } else if([email protected]==inventorylist_count){
                //they only have the equipped item
                close;
            } else continue;
        }
        end;

    Feel free to PM me if u need help. I'm already willing to help.

     

    Rynbef~

    • Like 1
  9. Idea:

    add to *getunittype() one (or two) new types BL_CMD/BL_SCRIPTCMD to check if monster was killed by script-/ or atcommand.

    A new pre defined variable of type int *killedmid it contains the ID of the mob who was killed(not the unique game mob ID *GID). Will be empty(0) if no mob was killed of course.

    //I don't know if there is any other way to check if mob was killed by script and get the MOB ID or cast GID to MOB ID. If monster spawn by script command with own unique event label its not possible to check if the mob was killed by command (script/at) in my opinion. Only we know the ID.

     

    Maybe I'm lost but tried/searched everything.

    What do you think about?

     

    Rynbef~

×
×
  • Create New...

Important Information

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