Jump to content

Bringer

Members
  • Posts

    746
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Bringer

  1. On 8/23/2017 at 6:45 AM, estoudegreve said:

    where i put it/?

     

    
    Index: src/map/mob.h
    ===================================================================
    --- src/map/mob.h	(revision 16936)
    +++ src/map/mob.h	(working copy)
    @@ -123,6 +123,7 @@
     	struct block_list bl;
     	struct unit_data  ud;
     	struct view_data *vd;
    +	struct tmp_data tmpd;
     	struct status_data status, *base_status; //Second one is in case of leveling up mobs, or tiny/large mobs.
     	struct status_change sc;
     	struct mob_db *db;	//For quick data access (saves doing mob_db(md->class_) all the time) [Skotlex]
    Index: src/map/pc.h
    ===================================================================
    --- src/map/pc.h	(revision 16936)
    +++ src/map/pc.h	(working copy)
    @@ -91,6 +91,7 @@
     	struct block_list bl;
     	struct unit_data ud;
     	struct view_data vd;
    +	struct tmp_data tmpd;
     	struct status_data base_status, battle_status;
     	struct status_change sc;
     	struct regen_data regen;
    Index: src/map/skill.c
    ===================================================================
    --- src/map/skill.c	(revision 16936)
    +++ src/map/skill.c	(working copy)
    @@ -2110,7 +2110,38 @@
     
     	return 0;
     }
    -
    +int skill_mcri_hit(int tid, unsigned int tick, int id, intptr_t data)
    +{
    +	struct mob_data *md = (struct mob_data *)data;
    +	struct tmp_data *tmpd;
    +	tmpd = &md->tmpd;
    +	if(tmpd!=NULL)
    +	{
    +	switch(1) // 1 = red ; 2 = blue
    +	{
    +	case 1:
    +		clif_damage(tmpd->src, tmpd->bl, gettick(), 1, 1, id, 0, 10, 0);
    +		break;
    +	case 2:
    +		clif_skill_damage(tmpd->src,tmpd->bl,gettick(), 1, 1, id, 0, TK_STORMKICK, 1, 8);
    +		clif_skill_nodamage(tmpd->src,tmpd->src,tmpd->num[0],tmpd->num[1],1);
    +		break;
    +	}
    +	}
    +	return 0;
    +}
    +int skill_mcri_kill_delay(int tid, unsigned int tick, int id, intptr_t data)
    +{
    +	struct block_list *bl = map_id2bl(id);
    +	struct block_list *src = (struct block_list *)data;
    +	struct mob_data *md = BL_CAST(BL_MOB, bl);
    +	if(bl!=NULL)
    +	{
    +		mob_dead(md,src,0);
    +		status_kill(bl);
    +	}
    +	return 0;
    +}
     /*
      * =========================================================================
      * Does a skill attack with the given properties.
    @@ -2449,6 +2480,48 @@
     	default:
     		if( flag&SD_ANIMATION && dmg.div_ < 2 ) //Disabling skill animation doesn't works on multi-hit.
     			type = 5;
    +		//m_cri
    +		if ( src->type == BL_PC || battle_get_master(src)->type == BL_PC )
    +		{
    +			char m_cri = 0;
    +			if(sd==NULL)
    +				m_cri = cap_value(map_id2sd(battle_get_master(src)->id)->battle_status.cri/10,1,100);
    +			else
    +				m_cri = cap_value(sd->battle_status.cri/10,1,100);
    +			if( rand()%100 < m_cri )
    +			{
    +				struct mob_data *md=NULL;
    +				struct tmp_data *tmpd=NULL;
    +				int d_ = 200;
    +				unsigned int u_ = 0;
    +				int i=0, num=abs(skill_get_num(skillid,skilllv)), _damage=0;
    +				damage *= 2;				
    +				md = mob_once_spawn_sub(src, src->m, src->x, src->y, "--en--",1083,"", SZ_SMALL, AI_NONE);
    +				md->deletetimer=add_timer(tick+d_*num+1,mob_timer_delete,md->bl.id,0);
    +				status_set_viewdata(&md->bl, INVISIBLE_CLASS);
    +				tmpd = &md->tmpd;				
    +				if(skill_get_splash(skillid,skilllv)>1&&num>1)
    +					num = 1;
    +				_damage = damage/num;
    +				tmpd->src = src;
    +				tmpd->bl = bl;
    +				tmpd->num[0]=skillid;
    +				tmpd->num[1]=skilllv;
    +				u_ = tick+d_*num+1;
    +				if( tstatus->hp <= damage )//delay to kill it
    +				{
    +					damage = 1;
    +					status_change_start(bl, SC_BLADESTOP_WAIT, 10000, 1, 0, 0, 0, u_, 2);
    +					status_change_start(bl, SC_INVINCIBLE, 10000, 1, 0, 0, 0, u_, 2);
    +					add_timer(u_,skill_mcri_kill_delay,bl->id,(intptr_t)src);
    +				}
    +				clif_skill_nodamage(src,src,skillid,skilllv,1);
    +				for(i=0;i<num;i++)
    +					add_timer(tick+d_*i +1,skill_mcri_hit,_damage,(intptr_t)md);
    +				u_ = d_ = _damage = 0;
    +				break;
    +			}
    +		}
     		if( bl->type == BL_SKILL ){
     			TBL_SKILL *su = (TBL_SKILL*)bl;
     			if( su->group && skill_get_inf2(su->group->skill_id)&INF2_TRAP )// show damage on trap targets
    Index: src/map/skill.h
    ===================================================================
    --- src/map/skill.h	(revision 16936)
    +++ src/map/skill.h	(working copy)
    @@ -21,7 +21,8 @@
     #define MAX_SKILL_IMPROVISE_DB 50
     
     #define MAX_SKILL_LEVEL 100
    -
    +int skill_mcri_hit(int tid, unsigned int tick, int _damage, intptr_t data);
    +int skill_mcri_kill_delay(int tid, unsigned int tick, int id, intptr_t data);
     //Constants to identify the skill's inf value:
     enum e_skill_inf
     {
    Index: src/map/unit.h
    ===================================================================
    --- src/map/unit.h	(revision 16936)
    +++ src/map/unit.h	(working copy)
    @@ -13,7 +13,11 @@
     #include "map.h" // struct block_list
     #include "path.h" // struct walkpath_data
     #include "skill.h" // struct skill_timerskill, struct skill_unit_group, struct skill_unit_group_tickset
    -
    +struct tmp_data {
    +	struct block_list *src;
    +	struct block_list *bl;
    +	int num[2];
    +};
     struct unit_data {
     	struct block_list *bl;
     	struct walkpath_data walkpath;

     

    check your recompile error skilllv and skilllvid

    on Skill.c Find all that and change to skill_id skill_lv

    Erro    C2198    'status_change_start': poucos argumentos para chamada    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3457    
    Erro    C2198    'clif_damage': poucos argumentos para chamada    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3030    
    Erro    C2065    'skillid': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3439    
    Erro    C2065    'skilllv': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3439    
    Erro    C2065    'skillid': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3445    
    Erro    C2065    'skilllv': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3445    
    Erro    C2065    'skillid': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3450    
    Erro    C2065    'skilllv': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3451    
    Erro    C2198    'status_change_start': poucos argumentos para chamada    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3456    
    Erro    C2065    'skillid': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3460    
    Erro    C2065    'skilllv': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3460    

    Index: src/map/skill.c
    ===================================================================
    --- src/map/skill.c	(revision 16936)
    +++ src/map/skill.c	(working copy)
    @@ -2110,7 +2110,38 @@
     
     	return 0;
     }
    -
    +int skill_mcri_hit(int tid, unsigned int tick, int id, intptr_t data)
    +{
    +	struct mob_data *md = (struct mob_data *)data;
    +	struct tmp_data *tmpd;
    +	tmpd = &md->tmpd;
    +	if(tmpd!=NULL)
    +	{
    +	switch(1) // 1 = red ; 2 = blue
    +	{
    +	case 1:
    +		clif_damage(tmpd->src, tmpd->bl, gettick(), 1, 1, id, 0, 10, 0);
    +		break;
    +	case 2:
    +		clif_skill_damage(tmpd->src,tmpd->bl,gettick(), 1, 1, id, 0, TK_STORMKICK, 1, 8);
    +		clif_skill_nodamage(tmpd->src,tmpd->src,tmpd->num[0],tmpd->num[1],1);
    +		break;
    +	}
    +	}
    +	return 0;
    +}
    +int skill_mcri_kill_delay(int tid, unsigned int tick, int id, intptr_t data)
    +{
    +	struct block_list *bl = map_id2bl(id);
    +	struct block_list *src = (struct block_list *)data;
    +	struct mob_data *md = BL_CAST(BL_MOB, bl);
    +	if(bl!=NULL)
    +	{
    +		mob_dead(md,src,0);
    +		status_kill(bl);
    +	}
    +	return 0;
    +}
     /*
      * =========================================================================
      * Does a skill attack with the given properties.
    @@ -2449,6 +2480,48 @@
     	default:
     		if( flag&SD_ANIMATION && dmg.div_ < 2 ) //Disabling skill animation doesn't works on multi-hit.
     			type = 5;
    +		//m_cri
    +		if ( src->type == BL_PC || battle_get_master(src)->type == BL_PC )
    +		{
    +			char m_cri = 0;
    +			if(sd==NULL)
    +				m_cri = cap_value(map_id2sd(battle_get_master(src)->id)->battle_status.cri/10,1,100);
    +			else
    +				m_cri = cap_value(sd->battle_status.cri/10,1,100);
    +			if( rand()%100 < m_cri )
    +			{
    +				struct mob_data *md=NULL;
    +				struct tmp_data *tmpd=NULL;
    +				int d_ = 200;
    +				unsigned int u_ = 0;
    +				int i=0, num=abs(skill_get_num(skillid,skilllv)), _damage=0;
    +				damage *= 2;				
    +				md = mob_once_spawn_sub(src, src->m, src->x, src->y, "--en--",1083,"", SZ_SMALL, AI_NONE);
    +				md->deletetimer=add_timer(tick+d_*num+1,mob_timer_delete,md->bl.id,0);
    +				status_set_viewdata(&md->bl, INVISIBLE_CLASS);
    +				tmpd = &md->tmpd;				
    +				if(skill_get_splash(skillid,skilllv)>1&&num>1)
    +					num = 1;
    +				_damage = damage/num;
    +				tmpd->src = src;
    +				tmpd->bl = bl;
    +				tmpd->num[0]=skillid;
    +				tmpd->num[1]=skilllv;
    +				u_ = tick+d_*num+1;
    +				if( tstatus->hp <= damage )//delay to kill it
    +				{
    +					damage = 1;
    +					status_change_start(bl, SC_BLADESTOP_WAIT, 10000, 1, 0, 0, 0, u_, 2);
    +					status_change_start(bl, SC_INVINCIBLE, 10000, 1, 0, 0, 0, u_, 2);
    +					add_timer(u_,skill_mcri_kill_delay,bl->id,(intptr_t)src);
    +				}
    +				clif_skill_nodamage(src,src,skillid,skilllv,1);
    +				for(i=0;i<num;i++)
    +					add_timer(tick+d_*i +1,skill_mcri_hit,_damage,(intptr_t)md);
    +				u_ = d_ = _damage = 0;
    +				break;
    +			}
    +		}
     		if( bl->type == BL_SKILL ){
     			TBL_SKILL *su = (TBL_SKILL*)bl;
     			if( su->group && skill_get_inf2(su->group->skill_id)&INF2_TRAP )// show damage on trap targets

     

  2. 23 minutes ago, estoudegreve said:

    I tryed to use it, but show me erros.

    Gravidade    Código    Descrição    Projeto    Arquivo    Linha    Estado de Supressão
    Erro    C2198    'status_change_start': poucos argumentos para chamada    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3457    
    Erro    C2198    'clif_damage': poucos argumentos para chamada    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3030    
    Erro    C2065    'skillid': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3439    
    Erro    C2065    'skilllv': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3439    
    Erro    C2065    'skillid': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3445    
    Erro    C2065    'skilllv': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3445    
    Erro    C2065    'skillid': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3450    
    Erro    C2065    'skilllv': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3451    
    Erro    C2198    'status_change_start': poucos argumentos para chamada    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3456    
    Erro    C2065    'skillid': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3460    
    Erro    C2065    'skilllv': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3460    
     

    try skill_id & skill_lv

  3. Find
    case AM_CP_HELM:
    		{
    			unsigned int equip[] = {EQP_WEAPON, EQP_SHIELD, EQP_ARMOR, EQP_HEAD_TOP};
    			
    			if( sd && ( bl->type != BL_PC || ( dstsd && pc_checkequip(dstsd,equip[skill_id - AM_CP_WEAPON]) < 0 ) ) ){
    				clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
    				map_freeblock_unlock(); // Don't consume item requirements
    				return 0;
    			}
    			status_change_end(bl, scid, INVALID_TIMER);
    			clif_skill_nodamage(src,bl,skill_id,skill_lv,
    				sc_start(src,bl,type,100,skill_lv,skill_get_time(skill_id,skill_lv)));
    		}
    		break;

    Edit

    case AM_CP_HELM:
    		{
    			unsigned int equip[] = {EQP_WEAPON, EQP_SHIELD, EQP_ARMOR, EQP_HEAD_TOP};
    			enum sc_type scid = (sc_type)(SC_STRIPWEAPON + (skill_id - AM_CP_WEAPON));
    			
    			if( sd && ( bl->type != BL_PC /*|| ( dstsd && pc_checkequip(dstsd,equip[skill_id - AM_CP_WEAPON]) < 0 )*/ ) ){
    				clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
    				map_freeblock_unlock(); // Don't consume item requirements
    				return 0;
    			}
    			status_change_end(bl, scid, INVALID_TIMER);
    			clif_skill_nodamage(src,bl,skill_id,skill_lv,
    				sc_start(src,bl,type,100,skill_lv,skill_get_time(skill_id,skill_lv)));
    		}
    		break;

    Find

    case CR_FULLPROTECTION:
    		{
    			unsigned int equip[] = {EQP_WEAPON, EQP_SHIELD, EQP_ARMOR, EQP_HEAD_TOP};
    			int i_eqp, s = 0, skilltime = skill_get_time(skill_id,skill_lv);
    
    			for (i_eqp = 0; i_eqp < 4; i_eqp++) {
    				if( bl->type != BL_PC || ( dstsd && pc_checkequip(dstsd,equip[i_eqp]) < 0 ) )
    					continue;
    				sc_start(src,bl,(sc_type)(SC_CP_WEAPON + i_eqp),100,skill_lv,skilltime);
    				s++;
    			}
    			if( sd && !s ){
    				clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
    				map_freeblock_unlock(); // Don't consume item requirements
    				return 0;
    			}
    			clif_skill_nodamage(src,bl,skill_id,skill_lv,1);
    		}
    		break;

    Edit

    case CR_FULLPROTECTION:
    		{
    			unsigned int equip[] = {EQP_WEAPON, EQP_SHIELD, EQP_ARMOR, EQP_HEAD_TOP};
    			int i_eqp, s = 0, skilltime = skill_get_time(skill_id,skill_lv);
    
    			for (i_eqp = 0; i_eqp < 4; i_eqp++) {
    				if( bl->type != BL_PC /*|| ( dstsd && pc_checkequip(dstsd,equip[i_eqp]) < 0 )*/ )
    					continue;
    				status_change_end(bl, (sc_type)(SC_STRIPWEAPON + i), INVALID_TIMER);
    				status_change_end(bl, (sc_type)(SC_STRIPHELM + i), INVALID_TIMER);
    				status_change_end(bl, (sc_type)(SC_STRIPSHIELD + i), INVALID_TIMER);
    				status_change_end(bl, (sc_type)(SC_STRIPARMOR + i), INVALID_TIMER);
    				sc_start(src,bl,(sc_type)(SC_CP_WEAPON + i_eqp),100,skill_lv,skilltime);
    				s++;
    			}
    			if( sd && !s ){
    				clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
    				map_freeblock_unlock(); // Don't consume item requirements
    				return 0;
    			}
    			clif_skill_nodamage(src,bl,skill_id,skill_lv,1);
    		}
    		break;
    

     

    Make Sure Backup your skill.c

  4. Here my Custom status Icon on Land PRO
    
    
    
    
    		
    src/map/script_constants.h
    
    	export_constant(SC_VOLCANO);
    	export_constant(SC_DELUGE);
    	export_constant(SC_VIOLENTGALE);
    +	export_constant(SC_LANDPROTECTOR);
    
    
    	export_constant(SI_VOLCANO);
    	export_constant(SI_DELUGE);
    	export_constant(SI_VIOLENTGALE);
    +	export_constant(SI_LANDPROTECTOR);
    
    

     

    • Upvote 1
  5. 8 minutes ago, KaAlfredPri said:

    How to add an item costume Can I help me ..

    https://github.com/rathena/rathena/wiki/Custom_Items

     

    • equip_locations: Equipment location of armor and arrow-type items. Values below can be combined, i. e. 136 would indicate both accessory slots (typical value for accessories).
    (2^0)        1 = Lower headgear
    (2^1)        2 = Right hand
    (2^2)        4 = Garment/Robe
    (2^3)        8 = Accessory 1
    (2^4)       16 = Armor
    (2^5)       32 = Left hand
    (2^6)       64 = Shoes
    (2^7)      128 = Accessory 2
    (2^8)      256 = Upper headgear
    (2^9)      512 = Middle headgear
    (2^10)    1024 = Costume Upper headgear
    (2^11)    2048 = Costume Middle headgear
    (2^12)    4096 = Costume Lower headgear
    (2^13)    8192 = Costume Garment/Robe
    (2^15)   32768 = Arrow (arrow-type items only)
    (2^16)   65536 = Shadow Armor
    (2^17)  131072 = Shadow Weapon
    (2^18)  262144 = Shadow Shield
    (2^18)  524288 = Shadow Shoes
    (2^20) 1048576 = Shadow Accessory 2
    (2^21) 2097152 = Shadow Accessory 1

     

  6. On 3/13/2017 at 1:46 AM, Freya said:

    Hello, I would like to request some professional/intermediate/willing scripters to help me on "PlayTime" script. I will state the description of the NPC, the menu, the script and its significance, detailed and thoroughly.

    Description of the NPC:
    NPC is clickable and is visible on map.
    NPC will only talk to base level 255 with a job level of 120.
    The NPC has different menus such as ("Start PlayTime Points : Pause PlayTime Points : Claim Reward : Check PlayTime Duration : Cancel"))

    Menu Description:
    Start PlayTime Points - Starts the PlayTime Points timer.
    Pause PlayTime Points - Pauses the PlayTime Points timer.
    Check PlayTime Duration - Checks how much time to be logged on.
    Cancel - Exits the menu.

    Script Description:
    PlayTime Points timer will only start when the player decided to start their PlayTime Points using "Start PlayTime Points".
    PlayTime Points timer will not count whenever the player quitsre-logs in or changes character.
    PlayTime Points timer can only be paused by talking to the NPC using the "Pause PlayTime Points." The timer will be paused and will resume when the player decided to start "Start PlayTime Points" and the timer will resume exactly when the player paused it. The PlayTime Points will not reset even when the player quits, re-logs in or changes character as long as they have paused it through the NPC.

    The reward is not hourly, instead one apple (example) for every 24 hours with an interval of also 24 hours.
    Check PlayTime Duration will check how many more hours left or how many hours he/she has reached for the player to stay online and to receive its reward.
    Inactivity or the idleness of the player won't affect or stop the PlayTime Points timer.

    Significance of this NPC:
    PlayTime Points NPC is to reward the player while being inactive or active in-game for 24 hours, This is also to help the players with their needs and to help them grow in-game.

     

    Thank you!


    "All of the credits will belong to the person who has made the script, I vow that your script will not be reproduced, will not be copied, will not help me gain any profit and will not release the script, modified or unmodified, without the scripter's permission. Everything will be credited to the scripter."

    Spoiler
    
    prontera,146,162,3	script	Time Play	553,{
    
    	
    
    	set @npc$, "[ ^0000FFTime Play^000000 ]";
    	if (#started == 1) {
    	mes @npc$;
    	mes "Your Time Play Timer is ongoing.";
    	mes "You currently have [^FF0000"+#EVENTPOINTS+"^000000] Time Play points.";
    	close;
    	end;
    	}
    	if (BaseLevel < 255) || (JobLevel < 120) {
    	mes @npc$;
    	mes "You must be level ^FF0000255^000000 and job level ^FF0000120^000000 to use this npc.";
    	close;
    	}
    
    	mes @npc$;
    	mes "Good day "+strcharinfo(0)+",";
    	mes "You currently have [^FF0000"+#EVENTPOINTS+"^000000] Time Play points.";
    	mes "What would you like to do?";
    	menu "Start Time Play",tp_start,"Rewards",tp_reward,"What is Time Play?",tp_info;
    
    tp_info:
    	next;
    	mes @npc$;
    	mes "In TimePlay event, You will earn ^FF0000+5^000000 TimePlay points for every ^FF000030^000000 minutes of staying online excluding Autotrading or @at.";
    	mes " ";
    	mes "^0000FFNote^000000: Everytime you log out your account, the timer will reset back to 0";
    	close;
    
    
    tp_reward:
    	menu "Mithril Coin - ^FF0000700^000000 TP pts",tp_tcg;
    
    tp_tcg:
    	if (#EVENTPOINTS >= 700) {
    		next;
    		mes @npc$;
    		mes "Here's your prize, Congratulations!";
    		getitem 674,1;
    		set .@total_points,-700;
    		set #EVENTPOINTS,(#EVENTPOINTS+.@total_points);
    		close;
    	}
    	else
    	next;
    	mes @npc$;
    	mes "Sorry, you don't have enough Time Play points.";
    	close;
    	end;
    
    tp_start:
    	next;
    	if (getgmlevel() > 0) {
    	mes @npc$;
    	mes "Hello "+strcharinfo(0)+", this NPC is for normal players only.";
    	close;
    	}
    	mes @npc$;
    	mes "Time Play Started.";
    	close2;
    	goto start_tp;
    
    start_tp:
    set #started, 1;
    attachnpctimer ""+strcharinfo(0)+"";
    initnpctimer;
    end;
    	
    OnTimer30000:
    if (checkvending() >= 1) {
    	dispbottom "Time Play stopped because you were vending. Talk to me if you wish to start again.";
    	set #started, 0;
    	stopnpctimer;
    	end;
    }
    
    OnTimer60000:
    set @minute,@minute+1;
    if (@minute >= 30) {
    	set @minute,0;
    	set .@point_amt,5;
    	set .@total_points,+5;
    	set #EVENTPOINTS,(#EVENTPOINTS+.@total_points);
    	dispbottom "Time Play: You received "+.@point_amt+" points by staying in game for 30 minutes";
    	set @consecutive_hour, @consecutive_hour+1;
    	}
    
    stopnpctimer;
    initnpctimer;
    end;
    
    OnPCLogoutEvent:
    	If (#started == 1) {
    	set #started, 0;
    	}
    	end;
    }

     

    Script From : 

     

  7. 10 hours ago, johnbond said:

    Alam ng lahat ang muling pagbabalik ni pRO (Philippine Ragnarok Online) under the Electronics Extreme management. Madami ako nababalitaan na nagpapasara daw sila ng mga private servers na may pinoy players. Nauuna ang mga malalaki ang population. May mga nabalitaan ako na napasara ang kanilang Facebook at websites dahil sa complaint ng "copyright infringement". Maybe next ay mismong hosters na ng mga private servers huwag naman sana.

    Ano po ang nababalitaan nyo tunkol dito? May mga kilala po ba kayong mga napasara na?

    Ano po ang laban natin sa ganitong threat sa ating mga minamahal na servers? May alam po ba kayong way to survive this problem?

    Pag usapan natin guys.

     

    Sarah Server 
    Link : https://rssboards.net/topic/12411-facebook-page/

    copyright.png.92ff11090484ee5c8fc928497a

    • Upvote 1
  8. 16 hours ago, Emistry said:

    You want the timer to stop when detected the player in chatroom or vending mode?

    change

    
    
    	//Check for idle.
    	while(checkvending() >= 1 || checkchatting() == 1 || checkidle() >= .idle) {
    		if( .@mes$ == "" ) {
    			dispbottom set( .@mes$, "The hourly points event stopped because you were vending, chatting, or idle!" );
    		}
    		sleep2 .delay;
    	}

    into

    
    	//Check for idle.
    	if (checkvending() >= 1 || checkchatting() == 1 || checkidle() >= .idle) {
    		dispbottom "The hourly points event stopped because you were vending, chatting, or idle!";
    		end;
    	}

    Please be specific about what you actually wanted next time.

    Your topic title are totally not helpful at all consider what you mentioned in the following posts.

    already change it  and my char already vending but still the timer not stop

     

    Spoiler
    
    -	script	hourly_point_main	-1,{
        
        OnInit:
            .duration = 3600;
    	.vip_multi = 2;
            .npc_name$ = strnpcinfo(3);
    	.delay   = 1000;       //Delay for idle re-check check. ( Default: 1000 [ = 1 Second ] )
    	.idle    = 60*1;       //Player is idle after not moving for this many seconds. ( Default: 60*5 [ = 5 Minutes ] )
    	set .2cpoint_amt, 20; //Points gained for consecutive time online.
    	set .3cpoint_amt, 30; //Points gained for consecutive time online.
    	set .4cpoint_amt, 40; //Points gained for consecutive time online.
    	set .5cpoint_amt, 50; //Points gained for consecutive time online.
    	set .6cpoint_amt, 60; //Points gained for consecutive time online.
    	set .7cpoint_amt, 70; //Points gained for consecutive time online.
    	set .8cpoint_amt, 80; //Points gained for consecutive time online.    
    	set .point_amt, 10; //Normal points gained.
            bindatcmd "reward",    .npc_name$ + "::OnCheck";
            end;
    
        OnUpdate:
    	//Check for idle.
    	if (checkvending() >= 1 || checkchatting() == 1 || checkidle() >= .idle) {
    		dispbottom "The hourly points event stopped because you were vending, chatting, or idle!";
    		end;
    	}
    	set #HourlyPoints, #HourlyPoints + .point_amt * 1 * ( vip_status(1) ? .vip_multi : 1 );
    	dispbottom "You received "+.point_amt+" Reward Hourly Points by staying ingame for 1 hour";
    	dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
    	set @consecutive_hour, @consecutive_hour + 1;
    
    	//Check for 2 hours consecutive
    	if(@consecutive_hour == 2) {
    		set #HourlyPoints, #HourlyPoints + .2cpoint_amt * 1 * ( vip_status(1) ? .vip_multi : 1 );
    		dispbottom "You received "+.2cpoint_amt+" Reward Hourly Points due to playing for 2 consecutive hours";
    		dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
    	}
        
    	//Check for 3 hours consecutive
    	else if(@consecutive_hour == 3) {
    		set #HourlyPoints, #HourlyPoints + .3cpoint_amt * 1 * ( vip_status(1) ? .vip_multi : 1 );
    		dispbottom "You received "+.3cpoint_amt+" Reward Hourly Points due to playing for 3 consecutive hours";
    		dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
    	}
        
    	//Check for 4 hours consecutive
    	else if(@consecutive_hour == 4) {
    		set #HourlyPoints, #HourlyPoints + .4cpoint_amt * 1 * ( vip_status(1) ? .vip_multi : 1 );
    		dispbottom "You received "+.4cpoint_amt+" Reward Hourly Points due to playing for 4 consecutive hours";
    		dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
    	}
        
    	//Check for 5 hours consecutive
    	else if(@consecutive_hour == 5) {
    		set #HourlyPoints, #HourlyPoints + .5cpoint_amt * 1 * ( vip_status(1) ? .vip_multi : 1 );
    		dispbottom "You received "+.5cpoint_amt+" Reward Hourly Points due to playing for 5 consecutive hours";
    		dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
    	}
        
    	//Check for 6 hours consecutive
    	else if(@consecutive_hour == 6) {
    		set #HourlyPoints, #HourlyPoints + .6cpoint_amt * 1 * ( vip_status(1) ? .vip_multi : 1 );
    		dispbottom "You received "+.6cpoint_amt+" Reward Hourly Points due to playing for 6 consecutive hours";
    		dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
    	}
        
    	//Check for 7 hours consecutive
    	else if(@consecutive_hour == 7) {
    		set #HourlyPoints, #HourlyPoints + .7cpoint_amt * 1 * ( vip_status(1) ? .vip_multi : 1 );
    		dispbottom "You received "+.7cpoint_amt+" Reward Hourly Points due to playing for 7 consecutive hours";
    		dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
    	}
        
    	//Check for 8 hours consecutive
    	else if(@consecutive_hour == 8) {
    		set @consecutive_hour,0;
    		set #HourlyPoints, #HourlyPoints + .8cpoint_amt * 1 * ( vip_status(1) ? .vip_multi : 1 );
    		dispbottom "You received "+.8cpoint_amt+" Reward Hourly Points due to playing for 8 consecutive hours";
    		dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
    	}
    	@timer = gettimetick(2) + .duration;
    	addtimer ( .duration * 1000 ), .npc_name$+"::OnUpdate";
    	end;
           
        OnPCLoginEvent:
            atcommand "@refresh "+strcharinfo(0);
    	@timer = gettimetick(2) + .duration;
    	addtimer ( .duration * 1000 ), .npc_name$+"::OnUpdate";
    	dispbottom "Hourly Rewards have been started for this character.";
    	end;
    
        OnCheck:
            .@min = (@timer - gettimetick(2))/60;
            .@sec = (@timer - gettimetick(2))%60;
            dispbottom "War Server",0x9ae2d7;
            dispbottom "Total Hours Online " +@consecutive_hour+ "",0x9ae2d7;
            dispbottom "Reward Hourly Points : ^FF0000[ "+#HourlyPoints+" ]^000000",0x9ae2d7;
            dispbottom "[ Hourly Rewards ] Your next reward will be achieved in " +
                        ((.@min)?            "[ " + .@min + " ] minute"         + ((.@min > 1)?"s":""):"") +
                        ((.@min && .@sec)?    " and ":"") +
                        ((.@sec)?            "[ " + .@sec + " ] second"    + ((.@sec > 1)?"s":""):"") +
                        "!",0x9ae2d7;
            end;            
    }

     

     

  9. 19 minutes ago, whodhell said:

    example nka maya card ung target then nag reflect ung skill back to magic caster
    nka devo ung magic caster sa2luhin po ba ng pally ung nag reflect na magic dmg reflected??

    thnx po sa sagot

    // Using 'old' behavior for devotion vs reflect damage? (Note 2)
    // Default is 0 (official). If 'devotion_rdamage' is > 0 (chance to devote the reflected damage),
    // when player with devotion attacks player with reflect damage ability (item bonus or skill),
    // the damage will be taken by the person who provides devotion instead the attacker.
    devotion_rdamage: 100
    
    // Officially, reflecting shield (SC_REFLECTDAMAGE) reflects physical damage by skill or normal attack.
    // But if the target is being devoted, it ONLY reflects the damage for melee skill. (Note 1)
    devotion_rdamage_skill_only: no

    ito pa another info about sa magic reflect

    /src/config/classes/general.h

    /**
     * Default Magical Reflection Behavior
     * - When reflecting, reflected damage depends on gears caster is wearing, not target
     * - When disabled damage depends on gears target is wearing, not caster.
     * @values 1 (enabled) or 0 (disabled)
     **/
    #define MAGIC_REFLECTION_TYPE 1

     

  10. #define VIP_SCRIPT 1
    
    #ifdef VIP_ENABLE
    	#define MIN_STORAGE 600 // Default number of storage slots.
    	#define MIN_CHARS 3 // Default number of characters per account.
    	#define MAX_CHAR_VIP 6 // This must be less than MAX_CHARS
    	#define MAX_CHAR_BILLING 0 // This must be less than MAX_CHARS
    #define MAX_CHARS 9 
    // How many characters are allowed per account?
    // You cannot exceed the limit of MAX_CHARS slots, defined in mmo.h, or chars_per_account
    // will default to MAX_CHARS.
    // 0 will default to the value of MIN_CHARS. (default)
    chars_per_account: 0
    
    // Max character limit increase for VIP accounts (0 to disable)
    // Increase the value of MAX_CHARS if you want to increase vip_char_increase.
    // Note: The amount of VIP characters = MAX_CHARS - chars_per_account.
    // Note 2: This setting must be set after chars_per_account.
    // -1 will default to MAX_CHAR_VIP (src/config/core.h)
    vip_char_increase: -1

    can anyone help why only max 3 char ?

  11. On 4/27/2017 at 11:57 AM, Cyro said:

    Try changing check vending line to

    
    if(checkvending() >= 1 || checkchatting() == 1) {
    dispbottom "The hourly points event stopped because you were vending / chatting. Please relog if you wish to start again.";
    
    

    Ill test this and update, atm using mobile 

    still same

     

    can you help me about this script?

    @Skorm @Capuche

  12. 13 minutes ago, Cyro said:

    a bit more information about your question will be helpfull,

    your script already having vending check

    
    //Check for idle.
    	while(checkvending() >= 1 || checkchatting() == 1 || checkidle() >= .idle) {
    		if( .@mes$ == "" ) {
    			dispbottom set( .@mes$, "The hourly points event stopped because you were vending, chatting, or idle!" );
    		}

     

    yes but even already vending / idle in 5mins the timer still not stop

  13. -	script	hourly_point_main	-1,{
        
        OnInit:
            .duration = 1800;
    	.vip_multi = 1;
            .npc_name$ = strnpcinfo(3);
    	.delay   = 1000;       //Delay for idle re-check check. ( Default: 1000 [ = 1 Second ] )
    	.idle    = 60*5;       //Player is idle after not moving for this many seconds. ( Default: 60*5 [ = 5 Minutes ] )
    	set .2cpoint_amt, 20; //Points gained for consecutive time online.
    	set .3cpoint_amt, 30; //Points gained for consecutive time online.
    	set .4cpoint_amt, 40; //Points gained for consecutive time online.
    	set .5cpoint_amt, 50; //Points gained for consecutive time online.
    	set .6cpoint_amt, 60; //Points gained for consecutive time online.
    	set .7cpoint_amt, 70; //Points gained for consecutive time online.
    	set .8cpoint_amt, 80; //Points gained for consecutive time online.    
    	set .point_amt, 10; //Normal points gained.
            bindatcmd "reward",    .npc_name$ + "::OnCheck";
            end;
    
        OnUpdate:
    	//Check for idle.
    	while(checkvending() >= 1 || checkchatting() == 1 || checkidle() >= .idle) {
    		if( .@mes$ == "" ) {
    			dispbottom set( .@mes$, "The hourly points event stopped because you were vending, chatting, or idle!" );
    		}
    		sleep2 .delay;
    	}
    	set #HourlyPoints, #HourlyPoints + .point_amt * 1 * ( vip_status(1) ? .vip_multi : 1 );
    	dispbottom "You received "+.point_amt+" Reward Hourly Points by staying ingame for 1 hour";
    	dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
    	set @consecutive_hour, @consecutive_hour + 1;
    
    	//Check for 2 hours consecutive
    	if(@consecutive_hour == 2) {
    		set #HourlyPoints, #HourlyPoints + .2cpoint_amt * 1 * ( vip_status(1) ? .vip_multi : 1 );
    		dispbottom "You received "+.2cpoint_amt+" Reward Hourly Points due to playing for 2 consecutive hours";
    		dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
    	}
        
    	//Check for 3 hours consecutive
    	else if(@consecutive_hour == 3) {
    		set #HourlyPoints, #HourlyPoints + .3cpoint_amt * 1 * ( vip_status(1) ? .vip_multi : 1 );
    		dispbottom "You received "+.3cpoint_amt+" Reward Hourly Points due to playing for 3 consecutive hours";
    		dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
    	}
        
    	//Check for 4 hours consecutive
    	else if(@consecutive_hour == 4) {
    		set #HourlyPoints, #HourlyPoints + .4cpoint_amt * 1 * ( vip_status(1) ? .vip_multi : 1 );
    		dispbottom "You received "+.4cpoint_amt+" Reward Hourly Points due to playing for 4 consecutive hours";
    		dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
    	}
        
    	//Check for 5 hours consecutive
    	else if(@consecutive_hour == 5) {
    		set #HourlyPoints, #HourlyPoints + .5cpoint_amt * 1 * ( vip_status(1) ? .vip_multi : 1 );
    		dispbottom "You received "+.5cpoint_amt+" Reward Hourly Points due to playing for 5 consecutive hours";
    		dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
    	}
        
    	//Check for 6 hours consecutive
    	else if(@consecutive_hour == 6) {
    		set #HourlyPoints, #HourlyPoints + .6cpoint_amt * 1 * ( vip_status(1) ? .vip_multi : 1 );
    		dispbottom "You received "+.6cpoint_amt+" Reward Hourly Points due to playing for 6 consecutive hours";
    		dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
    	}
        
    	//Check for 7 hours consecutive
    	else if(@consecutive_hour == 7) {
    		set #HourlyPoints, #HourlyPoints + .7cpoint_amt * 1 * ( vip_status(1) ? .vip_multi : 1 );
    		dispbottom "You received "+.7cpoint_amt+" Reward Hourly Points due to playing for 7 consecutive hours";
    		dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
    	}
        
    	//Check for 8 hours consecutive
    	else if(@consecutive_hour == 8) {
    		set @consecutive_hour,0;
    		set #HourlyPoints, #HourlyPoints + .8cpoint_amt * 1 * ( vip_status(1) ? .vip_multi : 1 );
    		dispbottom "You received "+.8cpoint_amt+" Reward Hourly Points due to playing for 8 consecutive hours";
    		dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
    	}
    	@timer = gettimetick(2) + .duration;
    	addtimer ( .duration * 1000 ), .npc_name$+"::OnUpdate";
    	end;
           
        OnPCLoginEvent:
            atcommand "@refresh "+strcharinfo(0);
    	@timer = gettimetick(2) + .duration;
    	addtimer ( .duration * 1000 ), .npc_name$+"::OnUpdate";
    	dispbottom "Hourly Rewards have been started for this character.";
    	end;
    
        OnCheck:
            .@min = (@timer - gettimetick(2))/60;
            .@sec = (@timer - gettimetick(2))%60;
            dispbottom "War Server",0x9ae2d7;
            dispbottom "Total Hours Online " +@consecutive_hour+ "",0x9ae2d7;
            dispbottom "Reward Hourly Points : ^FF0000[ "+#HourlyPoints+" ]^000000",0x9ae2d7;
            dispbottom "[ Hourly Rewards ] Your next reward will be achieved in " +
                        ((.@min)?            "[ " + .@min + " ] minute"         + ((.@min > 1)?"s":""):"") +
                        ((.@min && .@sec)?    " and ":"") +
                        ((.@sec)?            "[ " + .@sec + " ] second"    + ((.@sec > 1)?"s":""):"") +
                        "!",0x9ae2d7;
            end;            
    }

     

  14. requesting bindcommand for Vip Players
    @vipbuffs


    Assassin Cross of Sunset
    A Drum of the Battlefield
    Into the Abyss
    The Ring of Nibelungen
    A Whistle
    Poem of Bragi
    Service For you
    Apple of Iduns
    Humming
    Fortune's Kiss
    Service for You

  15.  

    OnPCLoginEvent:
    		if (vip_status(1)) {
    			dispbottom "========================";
    			dispbottom "Account Status : VIP";
    			dispbottom "Expire Date : "+vip_status(2);
    			dispbottom "Time left : "+vip_status(3);
    			dispbottom "========================";
    			end;
    		}
    	}
    
    • Upvote 2
×
×
  • Create New...