Jump to content
  • 0
Sign in to follow this  
ThyroDree

[Request] 1 Points ( Daily Points ) - 1 Card

Question

anyone teach me or help me how to make 

Gain 1 Point/s ( Daily Points ) - Per get 1 Normal Card

Gain 10 Point/s ( Daily Points ) - Per get 1 Boss/Mini Boss Card

Share this post


Link to post
Share on other sites

8 answers to this question

Recommended Posts

  • 0

Could you please elaborate?

When a certain player kill a mob and that mob drop a card, the player gain points.

Share this post


Link to post
Share on other sites
  • 0

 src/map/mob.c | 3 +++ 1 file changed, 3 insertions(+)diff --git a/src/map/mob.c b/src/map/mob.cindex d504171..35fe37d 100644--- a/src/map/mob.c+++ b/src/map/mob.c@@ -2404,6 +2404,9 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) 				//MSG: "'%s' won %s's %s (chance: %0.02f%%)" 				intif_broadcast(message,strlen(message)+1,0); 			}+			if ( sd )+				if ( it->type == 6 )+					pc_setglobalreg( sd, "Daily_Points", pc_readglobalreg( sd, "Daily_Points" ) +( ( mob_db(md->mob_id)->status.mode & 32 )? 10 : 1 ) ); 			// Announce first, or else ditem will be freed. [Lance] 			// By popular demand, use base drop rate for autoloot code. [Skotlex] 			mob_item_drop(md, dlist, ditem, 0, md->db->dropitem[i].p, homkillonly);
this one works for rathena

hercules shouldn't be that far off

Edited by AnnieRuru

Share this post


Link to post
Share on other sites
  • 0

 

 src/map/mob.c | 3 +++ 1 file changed, 3 insertions(+)diff --git a/src/map/mob.c b/src/map/mob.cindex d504171..35fe37d 100644--- a/src/map/mob.c+++ b/src/map/mob.c@@ -2404,6 +2404,9 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) 				//MSG: "'%s' won %s's %s (chance: %0.02f%%)" 				intif_broadcast(message,strlen(message)+1,0); 			}+			if ( sd )+				if ( it->type == 6 )+					pc_setglobalreg( sd, "Daily_Points", pc_readglobalreg( sd, "Daily_Points" ) +( ( mob_db(md->mob_id)->status.mode & 32 )? 10 : 1 ) ); 			// Announce first, or else ditem will be freed. [Lance] 			// By popular demand, use base drop rate for autoloot code. [Skotlex] 			mob_item_drop(md, dlist, ditem, 0, md->db->dropitem[i].p, homkillonly);
this one works for rathena

hercules shouldn't be that far off

if i use this if the player receive o loot a cards gets a daily points?

Share this post


Link to post
Share on other sites
  • 0

yeah

 

now this is the patch for hercules

 src/map/mob.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)diff --git a/src/map/mob.c b/src/map/mob.cindex dab7b99..cd50475 100644--- a/src/map/mob.c+++ b/src/map/mob.c@@ -2367,7 +2367,9 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) { 				//MSG: "'%s' won %s's %s (chance: %0.02f%%)" 				intif->broadcast(message, strlen(message)+1, BC_DEFAULT); 			}-			+			if ( sd )+				if ( it->type == 6 )+					pc_setglobalreg( sd, script->add_str("Daily_Points"), pc_readglobalreg( sd, script->add_str("Daily_Points") )+( ( md->status.mode & 32 )? 10 : 1 ) ); 			/* heres the thing we got the feature set up however we're still discussing how to best define the ids, 			 * so while we discuss, for a small period of time, the list is hardcoded (yes officially only those 2 use it, 			 * thus why we're unsure on how to best place the setting) */

Share this post


Link to post
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
Answer this question...

×   Pasted as rich text.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

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