Jump to content

Achievement System


Jonne

Recommended Posts


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  149
  • Reputation:   33
  • Joined:  12/24/11
  • Last Seen:  

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

The problem was I didn't reset the timer on relog. I will provide a fix any moment. If you want to do it manually, go to pc.c pc_authok() function and where they assign all INVALID_TIMER add:

sd->achievement_cutin_timer = INVALID_TIMER

And it is fixxed!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  19
  • Reputation:   2
  • Joined:  12/16/11
  • Last Seen:  

Screenshot from Ingame

screensaplingro002.jpg

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  509
  • Reputation:   80
  • Joined:  11/20/11
  • Last Seen:  

nice system

Screenshot from Ingame

screensaplingro002.jpg

but where is the .bmp data for the clientside?

Edited by Kichi
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  149
  • Reputation:   33
  • Joined:  12/24/11
  • Last Seen:  

but where is the .bmp data for the clientside?

Create your own and put it into illust folder where the card BMPs are. Then just add the name into the SQL db.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  65
  • Reputation:   13
  • Joined:  01/08/12
  • Last Seen:  

WoW to Ragnarok this is awesome....looks cool will try it out soon...

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  13
  • Reputation:   7
  • Joined:  12/05/11
  • Last Seen:  

Great work. I recoded it all and optimized your work (but yes it's your Idea and I give you credits) to implement this on eAmod. With some differences in the code because I call to Char server for saving and load, and using TXT db to create achievements with parameters.

I just want to inform you about the credit for your Idea.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  217
  • Reputation:   18
  • Joined:  11/20/11
  • Last Seen:  

Is there actual point tracker like Xbox's gamerscore or Playstation's Trophy score?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  149
  • Reputation:   33
  • Joined:  12/24/11
  • Last Seen:  

Is there actual point tracker like Xbox's gamerscore or Playstation's Trophy score?

Well, just use:

SELECT SUM(`points`) FROM `achievement_db` WHERE 1

for the maximum of points.

And then use:

SELECT `points` FROM `achievement_db`  WHERE `achievement_id` = (SELECT `achievement_id` FROM `achievement_tracker` WHERE `finished` = '1' AND `char_id` = 'X' LIMIT <counter_var>, 1)

for how many one user has finished. Increase the counter_var until you receive an empty result or first fatch the whole achievement_tracker for one player, then the points.

Great work. I recoded it all and optimized your work (but yes it's your Idea and I give you credits) to implement this on eAmod. With some differences in the code because I call to Char server for saving and load, and using TXT db to create achievements with parameters.

I just want to inform you about the credit for your Idea.

Well, no problem. I released it for free and anyone is free to use it. It's an old system and you can obviously optimize it and then use and sell it, if you want.

Edited by Jonne
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  509
  • Reputation:   80
  • Joined:  11/20/11
  • Last Seen:  

hmm,

may i request for ur .psd ^^

no idea to make a achievement

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  149
  • Reputation:   33
  • Joined:  12/24/11
  • Last Seen:  

hmm,

may i request for ur .psd ^^

no idea to make a achievement

What is a "psd"?

Okay, here a quick guide implying you want to add an achievement for killing 1 Poring and as reward you gain 1 Jellopy and 10 achievement points. The picture displayed for this achievement is poring.bmp.

Go to SQL db. Use:

INSERT INTO `achievement_db` (`type`, `name`, `cutin`, `nameid`, `points`)VALUES('0', 'Poring Killer', 'poring.bmp', '909', '10')

(You can also add this through a GUI. Leave out all I left out as they are AUTO_INCREMENT or have standards if not needed.

Now you need to specify the achievement:

INSERT INTO `mob_achievement` VALUES('<id_autoincrement_gave_you>', '0', '1002', '1', '0', '0', '0', '0', '0', '0', '0', '0')

This adds one condition to this achievement: Killing a Monster by ID(that's type 0). And the first monster is Poring(1002) - 1 time. The rest is empty.

Now patch your poring.bmp into the illust folder(that's where card BMPs and cutin are). Go ingame and use @reloadachievements.

That's it.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  1
  • Reputation:   0
  • Joined:  01/15/12
  • Last Seen:  

Jonne, you can help me with something?

I downloaded the 2 files...but I do not know what to do with "achievement.patch" (How do I apply the diff?(and what it is diff?))

can you help me?I'm kinda noob :(

Edited by sk8vingador
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  149
  • Reputation:   33
  • Joined:  12/24/11
  • Last Seen:  

Jonne, you can help me with something?

I downloaded the 2 files...but I do not know what to do with "achievement.patch" (How do I apply the diff?(and what it is diff?))

can you help me?I'm kinda noob :(

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

http://rathena.org/wiki/SVN

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  196
  • Reputation:   72
  • Joined:  12/12/11
  • Last Seen:  

I have found problem with achievement .patch

map server crash away

if include script command

- script test_event -1,{

end;

OnPCLoginEvent:

if (getgmlevel() > 0)

atcommand "@hide";

end;

}

Boom Disconnect and map server crash

please check and fix :(

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  149
  • Reputation:   33
  • Joined:  12/24/11
  • Last Seen:  

I have found problem with achievement .patch

map server crash away

if include script command

- script test_event -1,{

end;

OnPCLoginEvent:

if (getgmlevel() > 0)

atcommand "@hide";

end;

}

Boom Disconnect and map server crash

please check and fix :(

Uhm, have you added any other patches? This does not seem related to my patch. Maybe it was not correctly imported due to version differences and you made a mistake. You provide too less information.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  196
  • Reputation:   72
  • Joined:  12/12/11
  • Last Seen:  

I Test on eAthena r15067 with achievement .patch only

and include script

- script test_event -1,{

end;

OnPCLoginEvent:

if (getgmlevel() > 0)

atcommand "@hide";

end;

}

i think this problem about atcommand command

user atcommand "@item 501 1"; or other

if remove this script ok pass!

map server crash

Compile on VC 2010

Coredump

Registers:

eax=00032000 ebx=7ffd9000 ecx=00000000 edx=08cfa3f0 esi=0012b590 edi=0012b6bc

eip=006fb117 esp=0012b57c ebp=0012b584 iopl=0 nv up ei pl nz na po nc

cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010206

Call stack:

006FB117 H:Trunk Originalmap-server_sql.exe:006FB117 _chkstk f:ddvctoolscrt_bldSELF_X86crtsrcINTELchkstk.asm:99

00660902 H:Trunk Originalmap-server_sql.exe:00660902 run_func h:trunk originalsrcmapscript.c:3236

00661558 H:Trunk Originalmap-server_sql.exe:00661558 run_script_main h:trunk originalsrcmapscript.c:3466

00661050 H:Trunk Originalmap-server_sql.exe:00661050 run_script h:trunk originalsrcmapscript.c:3296

0061A38B H:Trunk Originalmap-server_sql.exe:0061A38B npc_event_sub h:runk originalsrcmapnpc.c:750

00625E6B H:Trunk Originalmap-server_sql.exe:00625E6B npc_script_event h:trunk originalsrcmapnpc.c:3284

005AE70A H:Trunk Originalmap-server_sql.exe:005AE70A clif_parse_LoadEndAck h:trunk originalsrcmapclif.c:8746

005CA494 H:Trunk Originalmap-server_sql.exe:005CA494 clif_parse h:trunk originalsrcmapclif.c:15002

0053951D H:Trunk Originalmap-server_sql.exe:0053951D do_sockets h:trunk originalsrccommonsocket.c:781

0052768D H:Trunk Originalmap-server_sql.exe:0052768D main h:trunk originalsrccommoncore.c:262

006FFFD9 H:Trunk Originalmap-server_sql.exe:006FFFD9 __tmainCRTStartup f:ddvctoolscrt_bldself_x86crtsrccrt0.c:278

006FFE9F H:Trunk Originalmap-server_sql.exe:006FFE9F mainCRTStartup f:ddvctoolscrt_bldself_x86crtsrccrt0.c:189

7C817077 C:WINDOWSsystem32kernel32.dll:7C817077 RegisterWaitForInputIdle

Edited by Napster
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  149
  • Reputation:   33
  • Joined:  12/24/11
  • Last Seen:  

I am not sure if that is my fault. It seems to happen somewhere outside the things I edited.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  196
  • Reputation:   72
  • Joined:  12/12/11
  • Last Seen:  

I test again on rAthena Lasted 154xx with achievement.patch

Same this Problem about atcommand script

Compile VC 2010

Found Problem

achievement.c

in line 117

if( ( flag = pc_additem( sd, &it, 1) ) )

Fix Pickup Log

if( ( flag = pc_additem( sd, &it, 1,LOG_TYPE_PICKDROP_PLAYER ) ) )

And Coredump Map Server Crash

Registers:

eax=00032000 ebx=7ffd5000 ecx=00000000 edx=091ce570 esi=0012b590 edi=0012b6bc

eip=007403c7 esp=0012b57c ebp=0012b584 iopl=0 nv up ei pl nz na po nc

cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010206

Call stack:

007403C7 H:rAthena - Trunk -Originalmap-server_sql.exe:007403C7 _chkstk f:ddvctoolscrt_bldSELF_X86crtsrcINTELchkstk.asm:99

0068C762 H:rAthena - Trunk -Originalmap-server_sql.exe:0068C762 run_func h:rathena - trunk -originalsrcmapscript.c:3242

0068D3B8 H:rAthena - Trunk -Originalmap-server_sql.exe:0068D3B8 run_script_main h:rathena - trunk -originalsrcmapscript.c:3491

0068CEB0 H:rAthena - Trunk -Originalmap-server_sql.exe:0068CEB0 run_script h:rathena - trunk -originalsrcmapscript.c:3302

006439DB H:rAthena - Trunk -Originalmap-server_sql.exe:006439DB npc_event_sub h:rathena - trunk -originalsrcmapnpc.c:782

0064FA9B H:rAthena - Trunk -Originalmap-server_sql.exe:0064FA9B npc_script_event h:rathena - trunk -originalsrcmapnpc.c:3418

005D5A85 H:rAthena - Trunk -Originalmap-server_sql.exe:005D5A85 clif_parse_LoadEndAck h:rathena - trunk -originalsrcmapclif.c:8892

005F3164 H:rAthena - Trunk -Originalmap-server_sql.exe:005F3164 clif_parse h:rathena - trunk -originalsrcmapclif.c:15443

00550ADD H:rAthena - Trunk -Originalmap-server_sql.exe:00550ADD do_sockets h:rathena - trunk -originalsrccommonsocket.c:786

0053EA4D H:rAthena - Trunk -Originalmap-server_sql.exe:0053EA4D main h:rathena - trunk -originalsrccommoncore.c:266

00745419 H:rAthena - Trunk -Originalmap-server_sql.exe:00745419 __tmainCRTStartup f:ddvctoolscrt_bldself_x86crtsrccrt0.c:278

007452DF H:rAthena - Trunk -Originalmap-server_sql.exe:007452DF mainCRTStartup f:ddvctoolscrt_bldself_x86crtsrccrt0.c:189

7C817077 C:WINDOWSsystem32kernel32.dll:7C817077 RegisterWaitForInputIdle

Edited by Napster
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  149
  • Reputation:   33
  • Joined:  12/24/11
  • Last Seen:  

I test again on rAthena Lasted 154xx with achievement.patch

Same this Problem about atcommand script

Compile VC 2010

Found Problem

achievement.c

in line 117

if( ( flag = pc_additem( sd, &it, 1) ) )

Fix Pickup Log

if( ( flag = pc_additem( sd, &it, 1,LOG_TYPE_PICKDROP_PLAYER ) ) )

And Coredump Map Server Crash

Registers:

eax=00032000 ebx=7ffd5000 ecx=00000000 edx=091ce570 esi=0012b590 edi=0012b6bc

eip=007403c7 esp=0012b57c ebp=0012b584 iopl=0 nv up ei pl nz na po nc

cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010206

Call stack:

007403C7 H:rAthena - Trunk -Originalmap-server_sql.exe:007403C7 _chkstk f:ddvctoolscrt_bldSELF_X86crtsrcINTELchkstk.asm:99

0068C762 H:rAthena - Trunk -Originalmap-server_sql.exe:0068C762 run_func h:rathena - trunk -originalsrcmapscript.c:3242

0068D3B8 H:rAthena - Trunk -Originalmap-server_sql.exe:0068D3B8 run_script_main h:rathena - trunk -originalsrcmapscript.c:3491

0068CEB0 H:rAthena - Trunk -Originalmap-server_sql.exe:0068CEB0 run_script h:rathena - trunk -originalsrcmapscript.c:3302

006439DB H:rAthena - Trunk -Originalmap-server_sql.exe:006439DB npc_event_sub h:rathena - trunk -originalsrcmapnpc.c:782

0064FA9B H:rAthena - Trunk -Originalmap-server_sql.exe:0064FA9B npc_script_event h:rathena - trunk -originalsrcmapnpc.c:3418

005D5A85 H:rAthena - Trunk -Originalmap-server_sql.exe:005D5A85 clif_parse_LoadEndAck h:rathena - trunk -originalsrcmapclif.c:8892

005F3164 H:rAthena - Trunk -Originalmap-server_sql.exe:005F3164 clif_parse h:rathena - trunk -originalsrcmapclif.c:15443

00550ADD H:rAthena - Trunk -Originalmap-server_sql.exe:00550ADD do_sockets h:rathena - trunk -originalsrccommonsocket.c:786

0053EA4D H:rAthena - Trunk -Originalmap-server_sql.exe:0053EA4D main h:rathena - trunk -originalsrccommoncore.c:266

00745419 H:rAthena - Trunk -Originalmap-server_sql.exe:00745419 __tmainCRTStartup f:ddvctoolscrt_bldself_x86crtsrccrt0.c:278

007452DF H:rAthena - Trunk -Originalmap-server_sql.exe:007452DF mainCRTStartup f:ddvctoolscrt_bldself_x86crtsrccrt0.c:189

7C817077 C:WINDOWSsystem32kernel32.dll:7C817077 RegisterWaitForInputIdle

Yes, rAthena changed to logging system. You have to change every pc_additem and pc_delitem that appear in the achievement system.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  13
  • Reputation:   0
  • Joined:  01/19/12
  • Last Seen:  

atcommand.obj : error LNK2001: unresolved external symbol _achievement_exists

atcommand.obj : error LNK2001: unresolved external symbol _reload_achievementDB

atcommand.obj : error LNK2001: unresolved external symbol _achievement_achieve

clif.obj : error LNK2001: unresolved external symbol _achievement_update_explore

map.obj : error LNK2001: unresolved external symbol _do_init_achievement

map.obj : error LNK2001: unresolved external symbol _do_final_achievement

mob.obj : error LNK2001: unresolved external symbol _achievement_update_mob

pc.obj : error LNK2001: unresolved external symbol _achievement_update_itemuse

pc.obj : error LNK2001: unresolved external symbol _achievement_loadTracker

pc.obj : error LNK2001: unresolved external symbol _achievement_update_itemfind

quest.obj : error LNK2001: unresolved external symbol _achievement_update_quest

script.obj : error LNK2001: unresolved external symbol _achievement_searchTrackerIndex

..map-server_sql.exe : fatal error LNK1120: 12 unresolved externals

What's this ?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  149
  • Reputation:   33
  • Joined:  12/24/11
  • Last Seen:  

atcommand.obj : error LNK2001: unresolved external symbol _achievement_exists

atcommand.obj : error LNK2001: unresolved external symbol _reload_achievementDB

atcommand.obj : error LNK2001: unresolved external symbol _achievement_achieve

clif.obj : error LNK2001: unresolved external symbol _achievement_update_explore

map.obj : error LNK2001: unresolved external symbol _do_init_achievement

map.obj : error LNK2001: unresolved external symbol _do_final_achievement

mob.obj : error LNK2001: unresolved external symbol _achievement_update_mob

pc.obj : error LNK2001: unresolved external symbol _achievement_update_itemuse

pc.obj : error LNK2001: unresolved external symbol _achievement_loadTracker

pc.obj : error LNK2001: unresolved external symbol _achievement_update_itemfind

quest.obj : error LNK2001: unresolved external symbol _achievement_update_quest

script.obj : error LNK2001: unresolved external symbol _achievement_searchTrackerIndex

..map-server_sql.exe : fatal error LNK1120: 12 unresolved externals

What's this ?

Add achievement.c and achievement.h to your project or MAKEFILE

  • Upvote 1
Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  106
  • Reputation:   3
  • Joined:  01/01/12
  • Last Seen:  

Hi Jonne, sorry for disturbing and my bad English.

I'm using your achievements system, when I'm trying to recompile my EAthena, I'm having this error:

obj_sql/map.o: In function `do_final':
/home/screamro/eathena/src/map/map.c:3465: undefined reference to `do_final_achievement'
obj_sql/map.o: In function `do_init':
/home/screamro/eathena/src/map/map.c:3725: undefined reference to `do_init_achievement'
obj_sql/clif.o: In function `clif_parse_LoadEndAck':
/home/screamro/eathena/src/map/clif.c:8803: undefined reference to `achievement_update_explore'
obj_sql/pc.o: In function `pc_authok':
/home/screamro/eathena/src/map/pc.c:920: undefined reference to `achievement_loadTracker'
obj_sql/pc.o: In function `pc_useitem':
/home/screamro/eathena/src/map/pc.c:3810: undefined reference to `achievement_update_itemuse'
obj_sql/pc.o: In function `pc_additem':
/home/screamro/eathena/src/map/pc.c:3423: undefined reference to `achievement_update_itemfind'
obj_sql/mob.o: In function `mob_dead':
/home/screamro/eathena/src/map/mob.c:2014: undefined reference to `achievement_update_mob'
obj_sql/script.o: In function `buildin_getachievementcutin':
/home/screamro/eathena/src/map/script.c:3988: undefined reference to `achievement_exists'
obj_sql/script.o: In function `buildin_getachievementname':
/home/screamro/eathena/src/map/script.c:3932: undefined reference to `achievement_exists'
obj_sql/script.o: In function `buildin_achieve':
/home/screamro/eathena/src/map/script.c:3965: undefined reference to `achievement_exists'
/home/screamro/eathena/src/map/script.c:3977: undefined reference to `achievement_achieve'
obj_sql/script.o: In function `buildin_getachievementinfo':
/home/screamro/eathena/src/map/script.c:3880: undefined reference to `achievement_exists'
/home/screamro/eathena/src/map/script.c:3914: undefined reference to `achievement_searchTrackerIndex'
obj_sql/atcommand.o: In function `atcommand_achieve':
/home/screamro/eathena/src/map/atcommand.c:1733: undefined reference to `achievement_exists'
/home/screamro/eathena/src/map/atcommand.c:1746: undefined reference to `achievement_achieve'
obj_sql/atcommand.o: In function `atcommand_reloadachievement':
/home/screamro/eathena/src/map/atcommand.c:1707: undefined reference to `reload_achievementDB'
obj_sql/quest.o: In function `quest_update_status':
/home/screamro/eathena/src/map/quest.c:254: undefined reference to `achievement_update_quest'
collect2: ld returned 1 exit status
make[1]: *** [map-server_sql] Error 1
make[1]: Leaving directory `/home/screamro/eathena/src/map'
make: *** [map_sql] Error 2

Please, help me as fast as you can.

Regards, Oxxy

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  407
  • Reputation:   159
  • Joined:  11/18/11
  • Last Seen:  

src/map/Makefile.in

Add achievement.o in MAP_OBJ

Add achievement.h in MAP_H

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  106
  • Reputation:   3
  • Joined:  01/01/12
  • Last Seen:  

Thx /ok

Edited by Oxxy
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  128
  • Reputation:   7
  • Joined:  12/29/11
  • Last Seen:  

Do you have the patch for the latest rev?

Thank you!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  149
  • Reputation:   33
  • Joined:  12/24/11
  • Last Seen:  

Do you have the patch for the latest rev?

Thank you!

No, sorry. I have it for the latest patch(with some special functionality) but for my Sever, so I can't provide it. And I also don't take care of this project anymore activly. At best find someone who knows what he does to apply it to your server or gamble around. Or just write one via NPC.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...