Jump to content

Jonne

Members
  • Posts

    149
  • Joined

  • Last visited

Posts posted by Jonne

  1. No trouble at all, but... Now its another error

    [Error]: delete_timer error : function mismatch 0053CF40(connect_check_clear) !=

    00545DA0(achievement_delete_cutin_timer)

    [Error]: cutin duration timer: 25 != 29

    And this

    [Warning]: Unknown setting 'achievement_cutin_duration' in file conf/battle/misc

    .conf

    And also, i dont know if its related but everytime i relog on one of the explore achievements i complete it again and also get the prizes, also when i use the @achieve command, when i use it i automatically complete the achievment without doing anything ( i only tested explore acheivments and i not at the map on the time, its with any map, lets say the map is prontera, if i give the achievment on lets say morocc, i automatically complete it there)

    And just a small thing but when someone completes the achievment it shows ???? on the screen.

    @Achieve bypasses all requirement checks. About the explore thing and the error message, I will llook into it this evening or tomorrow, since I currently run out of time and have to go. You can count with a fix tomorrow or the day after.

  2. thx sir emistry its work now

    how i can many room like room 1,room2,room3,room4,room5,room6,room7,room8

    bump

    <map>,<x>,<y>,<dir>%TAB%duplicate(Diablo Akatsuki Suit)%TAB%Diablo Akatsuki Suit#2%TAB%718

    Raise the number behind # further for more duplicatse. Also, maybe try an unique name for the NPC, since its name is quite long.

  3. First of all, great job, although i got a few errors, not while compiling but after, first i tried out @reloadachievement and it didnt work, its like it doesnt exist, and also i got this

    [Error]: delete_timer error : function mismatch 0062BF20(pc_invincible_timer) !=00545DA0(achievement_delete_cutin_timer)[Error]: cutin duration timer: 23 != 27[Warning]: Unknown setting 'achievement_cutin_duration' in file conf/battle/misc.conf [Warning]: Unknown setting 'achievement_cutin_duration' in file conf/battle/misc.conf

    And yes i have the achievement_cutin_duration in my misc.conf in the battle folder.

    If you can help me out i'll really be grateful

    My bad, sorry. At first I solved this problem of deleted cutins else, but before releasing I changed to this setting. Uhm, either go to ./src/map/achievement.c line 137 and change to delete_timer(sd->achievement_cutin_timer,achievement_delete_cutin_timer); or download the diff I will by now attach to my original post. Sorry for the trouble.

    Wups, the commands name is "reloadachievements" with an s at the end. I only called the function reloadachievement. Sorry for the trouble!

  4. Hello there ^^ it has been a long time

    I would like to request a npc, it only works with gms over level 90.

    it will change IP in the data base by 127.0.0.1 in table last IP and loginlog every time that GM login in the server.

    thanks!

    Pardon me, what?

    So everything a GM (Level 90+) logs in, the IP saved for him in the login table is changed to 127.0.0.1?

    I'd recommend a SRC edits, but if you want a NPC:

    -%TAB%script%TAB%name%TAB%-,{
    OnPCLoginEvent:
    if (GetGMLevel() >= 90) {
    SQL_Query("UPDATE `login` SET `last_ip` = '127.0.0.1' WHERE `account_id` = '" + GetCharID(3) + "' LIMIT 1");
    }
    End();
    }
    

    Not tested, should work though.

  5. i still dont get why this would need coding.

    as of now EA svn supports just about any custom extension.

    Usually when my scripter make script for us he names the files

    *.EAS and they work fine.

    I also have script files with *.php and *.rof from my previous server. all you have to do is make sure you spell it properly with the extension in the conf file.

    True. When taking a closer look:

    // read whole file to buffer
    fp = fopen(filepath, "rb");
    if( fp == NULL )
    {
    ShowError("npc_parsesrcfile: File not found '%s'.n", filepath);
    return;
    }

    But maybe they want it as standard. So in future all script files will have this extension and everything that comes with it.

  6. The login background have changed his name if you enable the missing textures / palettes messages (when diffing your client) it might tell you the name of the file.

    Is it only for your account ? It can be a character with a missing view id ...

    To all accounts. It's a fresh server with no chars.

    what kRO Client are you using?

    http://rathena.org/b...rathena-client/ Read main-post, please

    thats your rAthena Client

    kRO Client and rAthena Client are Different

    not dumb

    kRO Client = Ragray or Mikuru

    ~__~

    Pardon me. RagRay

  7. So today I tried to set up my local rAthena folder for some testing and for MOD/Diff creation. The server works just fine, but I have problems connecting to the char server. Well, not specifically. In particular, after the Serverselection I get a crash. It seems that I miss files, but I don't know from where. I am using the Basic rAthena Client(http://rathena.org/board/topic/54190-release-basic-rathena-client/) and changed the PACKET_VER accordingly(20110315). I can connect to the server but I crash where the char selection should be. I have the latest kRO/renewal and patched. My data.ini states:

    [Data]
    1=test.grf
    2=rdata.grf
    3=data.grf
    

    test.grf only contains a clientinfo.xml. It seems to work since I can connect. My data.grf is 1,35gB and my rdata.grf is 250mB. Any suggestions? Maybe the ressources coming with the Basic Client are invalid?

    Here the screenshot:

    error.png

  8. Preamble

    I have written an achievement system I want to share with you. It is not the best way to solve achievement systems nor is it very efficient(though it might be more efficient than NPC scripting) and if you already have an achievement system(src or npc) and it's working for you, please don't change to mine. Mine is rather old(about half a year or more) and back then it was the first time I wrote something completly new for eAthena. What I did today was applying the system to rA and create a working diff.

    If you are willing to use this system then I beg you to report any bug found.

    Also, if there is enough demand, I might consider re-writing it from scratch, because I am overall unhappy with the system, but not really motivated to further work on it in greater detail. Also the code-style I used back then is totally going against the one I am using nowadays... Don't judge me!

    Functions

    There are pre-defined types of achievements in this system

    Monsterkill Achievements

    Itemfind Achievements (Only use this for Items NOT trade/drop/storage-able, or else it will result in abuse)

    Itemuse Achievements

    Explore Achievements

    Quest Achievements

    Special Achievements

    Let me explain them one after another:

    Monsterkill Achievements(0):

    Well, name says it mostly, but there is a bit more to it. You can define different types per achievement. The types are counting by ID(0), by size(1), by race(2), by element(3) or for all MvPs(4). And if player A has killed X monsters that meet the requirement, then he gets the achievement.

    Itemfind Achievements(1):

    Again, name says what it does. If you find certain items, you get the achievement. Make sure you only use it on non tradeable etc. items or it will be abused. It can also be filtered into types. They are the following: ID(0), Equip(1)[see item_db->equip), Type(2)[see item_db->type]. It will count if you drop it and pick it up again, so really, only use it on items not storageable, tradeable and dropable!

    Itemuse Achievements(2):

    Its porpuse is to count every item used. This achievement might be bugged, report anything you find fishy! It uses the same filtering as Itemfind, so please refer to that.

    Explore Achievements(3):

    When entering a map, the system checks whether the map is inside the database for explore achievements and if so, it sets the count. If the player visited all maps for one achievement, then he receives the achievement.

    Quest Achievements(4):

    When finishing certain quests, you are able to gain quest achievements. Simple as that!

    Special Achievements(5):

    This are achievements in the achievement database. But they are only applicable over @achieve from a GM or with the achieve script_command. This achievement has Event porpuses and is only added for a complete database for your website etc.

    Now comes the technical stuff...

    How to install the achievement system

    1. Download the *.diff and the *.sql file(they are in the *.rar provided).

    2. Import the *.sql into your rAthena database.

    3. Apply the *.diff onto your rAthena server.

    4. Check your ./conf/battle/exp.conf and ./conf/battle/misc.conf: Two new configs have been added: achievement_cutin_duration and achievement_exp_rate. Read the conf files for more information and change it to whatever you wish it to be.

    5. Add the two new files ./src/map/achievement.c and ./src/map/achievement.h to your MAKEFILE or to your project solution and recompile!

    (^ Up to this point, I won't provide ANY support ^)

    How to add achievements

    Well, that is mainly why I would like to find another way of solving the achievement system. But currently it is like this:

    1. Add your achievement to achievement_db. Here is a brief summary of the columns:

    achievement_id: Leave empty, it is set by auto_increment. That is the ID of the achievement. The current max for achievement_ids is 65535. Raise MAX_ACHIEVEMENT in ./src/map/achievement.h for higher values(as if you'd ever need that many). Might slow the system!

    type: The type is a integer between 0 and 5. It is an enum. 0=Monsterkill Achievement. 1=Itemfind Achievement. 2=Itemuse Achievement. 3=Explore Achievement. 4=Quest Achievement. 5=Special Achievement.

    name: Displayed when finishing the achievement. Also for website porpuses.

    cutin: Display when achieving for achievement_cutin_duration ms.

    base_exp: Reward EXP for achieving

    job_exp: same as base_exp, but for job

    nameid: Reward Item for achieving (amount is always 1)

    points: Achievement points the achievement is worth

    If you chose 5 as type, you are nearly done, skip step 2.

    If you chose another type, please read on.

    2. Go to the respective table of your chosen type:

    0->mob_achievement
    1->item_achievement
    2->itemuse_achievement
    3->explore_achievement
    4->quest_achievement
    

    Now add an entry for your newly added achievement.

    The columns are rather similiar, but I'll explain in greater detail:

    mob_achievement:

    achievement_id: Set to ID assigned by achievement_db for your new achievement

    type: See description of Mobkill Achievements. There are numbers in brackets for each filtering type

    valueX: The value for what to filter. I.e. if you chose ID, then place an ID here. If you chose elements, place a number from the element enum here (see script_commands or src for reference)

    amountX: How many to kill

    itemfind_achievement:

    itemuse_achievement:

    achievement_id: Set to ID assigned by achievement_db for your new achievement

    type: See description of Itemfind Achievements. There are numbers in brackets for each filtering type

    valueX: The value for what to filter. I.e. if you chose ID, then place an ID here.

    amountX: How many to find/use

    explore_achievement:

    achievement_id: Set to ID assigned by achievement_db for your new achievement

    mapX: Name of the map. I.e. prontera

    quest_achievement:

    achievement_id: Set to ID assigned by achievement_db for your new achievement

    questX: ID of the quest

    3. Last step is to reload the AchievementDB ingame via @reloadachievement or restart your server.

    Atcommands

    So, I added two atcommands working together with this System:

    @achieve <Achievement_ID> <Player_Name>. Give <Player_Name> Achievement with <Achievement_ID> as ID. IT DOES NOT CHECK WHETHER HE MEETS THE REQUIREMENTS! Built in for debugging and special achievements

    @reloadachievements. Reload the Achievement DBs. Helpfully if you added new achievements and don't want to restart the server.

    Scriptcommands

    *Achieve( <AchievementID>{, <Account_ID>});

    Same as the Atcommand. If no account_id is given, use attached player. Does also not check if player meets requirements. Intended for special achievements

    *GetAchievementInfo(<AchievementID>, <flag>);

    Flag determines what to return:

    0 = type, 1 = bexp, 2 = jexp, 3 = nameid, 4 = points, 5 = status

    5 Only works with attached players and returns 1 if the player finished the achievement and 0 otherwise.

    *GetAchievementName(<AchievementID>);

    Returns the name of the achievement

    *GetAchievementCutin(<AchievementID>);

    Returns the name of the cutin of the achievement

    I think this is about all you need to know. Please report any bugs and post any suggestions. If you overwhelm me enough, I might rework it to be more user-friendly! Only post bugs and suggestions after you've read through the whole article. I will notive if you haven't.

    At last Download

    achievement.patch

    achievement.sql

    €dit:

    I really want to stress the following facts again:

    1. Read the whole article!
    2. Only use if you are unable to script/code a system that is suficient to suit your needs or this system matches your needs perfectly(well, w/e)!
    3. Report any found bug!

    €dit²:

    Forgot to mention. The last achievement is stored within the permanent playervariable "LastAchievement" and it stores the ID of the achievement. So you can check it via NPC script etc.

    Changelog:

    1.0 FIrst version

    1.1 Fixxed bug of not deleting the cutins properly [Thanks Dexter]

    1.2 Fixxed cutin bug fully, fixxed typos in config

    • Upvote 10
  9. I'd like to suggest the style of my company I'm working on.

    We use it for PHP, Python, Perl, C, C++ and even Assembler.

    /**
    * Description here,
    * Even multilined.
    * - 1 line space before params or return statements
    * - 1 line space between params and return statements
    *
    * @param<TAB><name of param><TAB><Parameter description>
    *
    * @return<TAB><type of return><TAB><Return description>
    */

    This is our style of comments and is used above every function/method/prodcedure and is supported natively from doxygen i.e.

    I would love to see somedays every comment in that way <3

    Also, if a comment takes 2 or more lines, we use multiline comment blocks. If not, single line comments of course.

    Suggestions?

    Totally supporting that one. Nice and clean.

    Question to the Style of GodLesZ:

    When the i.e. the return value is returning error code like: 0 - no error, 1 - error and so on. How to you write that into description.

    Like:

    * @return<TAB>int<TAB>error code for calling function
    * 0 - no error
    * 1 - error
    

    or else?

×
×
  • Create New...