Jump to content

Sakurada

Members
  • Posts

    148
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Sakurada

  1. 1 hour ago, domez86 said:

    hi, I need a npc like this:

    _______________________________

    if: str or vit or agi or int or dex or luk >166 (that is, if they have one of the following stat higher than 166) 

    mes: ok! 

    close;

    else: 

    mes: is not good! 

    close;

    ________________________________

    tnx! 

     

    I wanna say its impossible but this might work:

    prontera,156,180,5	script	Deviruchi#divorce	4_M_SIT_NOVICE,{
    	if (readparam(bAgi) > 77) || (readparam(bVit) > 77){
    	mes "asdddd";
    	close;
    	end;
    	}
    	end;
    }

    just add || inbetween all the stats you want red 

  2. Try this

    Go to map.h

    #define MAX_EVENTQUEUE 2
    #define MAX_EVENTTIMER 32
    #define NATURAL_HEAL_INTERVAL 500
    #define MIN_FLOORITEM 2
    #define MAX_FLOORITEM START_ACCOUNT_NUM
    #define MAX_LEVEL 175
    #define MAX_DROP_PER_MAP 48

    change #define max_level 175 to your desired level 

  3. prontera,156,187,2	script	Valkyrie#1	4_F_LGTGIRL,{
    
    	if (countitem(501) >= 1) {
    		delitem 501,1;
    		@chancezz = rand(1, 100);
    		mes "ok lets see";
    		
    	if (@chancezz <= 50) {
    		mes "You got the common prize!";
    		getitem 501, 2;
    		close;
    		end;
    		}
    	if (@chancezz >= 80) {
    		mes "You got the rare prize!";
    		getitem 501, 12;
    		close;
    		end;
    		}	
    	if (@chancezz >= 51) {
    		mes "You got the uncommon prize!";
    		getitem 501, 5;
    		close;
    		end;
    		}			
    
    		
    		}
    	mes "Sorry no potions, no items";
    	close;
    	end;
    
    }

    Well i tried my best /ene

    It works at least

     

    https://github.com/rathena/rathena/blob/master/npc/other/comodo_gambling.txt

     

  4. At the end of your spawn script that you keep in your NPC folder...

     

    prontera,0,0,0,0 boss_monster Detardeurus 1719,1,10800000,600,000,0,1,0

    prontera,0,0,0,0 boss_monster Detardeurus 1719,1,10800000,600,000,0,2,0

    prontera,0,0,0,0 boss_monster Detardeurus 1719,1,10800000,600,000,0,3,0

     

     

    you can add 2 more collumns, size and ai that arent normally there

    I think 3 is large 

  5. 34 minutes ago, mina said:

    How can I do this?

    
    if(sc->data[SC_GN_CARTBOOST]) {
    				ATK_ADD(wd->damage, wd->damage2, 10 * sc->data[SC_GN_CARTBOOST]->val1);

     

    status.c

    change this

    	set_sc( GN_CARTBOOST			, SC_GN_CARTBOOST	, EFST_GN_CARTBOOST			, SCB_SPEED|SCB_WATK );

    add scb_watk

     

    find this

    	if(sc->data[SC_WATKFOOD])
    		watk += sc->data[SC_WATKFOOD]->val1;
    	if(sc->data[SC_VOLCANO])
    		watk += sc->data[SC_VOLCANO]->val2;
    	if(sc->data[SC_MERC_ATKUP])
    		watk += sc->data[SC_MERC_ATKUP]->val2;

    add a new one 

    	if(sc->data[SC_GN_CARTBOOST])
    		watk += sc->data[SC_GN_CARTBOOST]->val4;

     

    find this

    		case SC_GN_CARTBOOST:
    			if( val1 < 3 )
    				val2 = 50;
    			else if( val1 > 2 && val1 < 5 )
    				val2 = 75;
    			else
    				val2 = 100;
    			break;

    add val4= 50; at the top

    like so

    		case SC_GN_CARTBOOST:
    			val4 = 50; // Watk increase
    			if( val1 < 3 )
    				val2 = 50;
    			else if( val1 > 2 && val1 < 5 )
    				val2 = 75;
    			else
    				val2 = 100;
    			break;

     

     

     

    That should do it unless you want batk if that matters just change scb_watk to scb_batk and change watk in second part to batk , might have  to move it to other section with others tho 

     

    recompile

     

     

     

  6. 1 hour ago, edwinooi1991 said:

    it doesnt matter if we need to recompile the src. as long as it works. >.<

     

    I dont know how to make a patch but ive included my src + mapflag conf at the bottom of the post, ill include instructions on how to add them yourself though. And how to adjust the rates will be first

    drop rates - mob.c

    find this

    #ifdef RENEWAL_DROP
    			if( drop_modifier != 100 ) {
    				drop_rate = apply_rate(drop_rate, drop_modifier);
    				if( drop_rate < 1 )
    					drop_rate = 1;
    			}
    #endif
    			if(map_getmapflag(m, MF_DROPRATE300))
    				drop_rate = (int)( (drop_rate * 300) / 100. );
    			
    			if(map_getmapflag(m, MF_DROPRATE50))
    				drop_rate = (int)( (drop_rate * 30) / 100. );
    			
    			// attempt to drop the item
    			if (rnd() % 10000 >= drop_rate)
    				continue;
    
    			if( mvp_sd && it->type == IT_PETEGG ) {
    				pet_create_egg(mvp_sd, md->db->dropitem[i].nameid);
    				continue;

    insert

    			if(map_getmapflag(m, MF_DROPRATE300))
    				drop_rate = (int)( (drop_rate * 300) / 100. );
    			
    			if(map_getmapflag(m, MF_DROPRATE50))
    				drop_rate = (int)( (drop_rate * 90) / 100. );

    above the comment

    //attempt to drop the item

    (drop_rate * 300) = +200%? 100 would be normal 

    and

     (drop_rate * 30) = 30% of normal drop rate

    these are the only numbers you need to change

    I havnt tested with gum but it should be normal

     

    next NPC.c

    find this

    		case MF_BATTLEGROUND:
    			if (state) {
    				union u_mapflag_args args = {};
    
    				if (sscanf(w4, "%11d", &args.flag_val) < 1)
    					args.flag_val = 1; // Default value
    
    				map_setmapflag_sub(m, MF_BATTLEGROUND, true, &args);
    			} else
    				map_setmapflag(m, MF_BATTLEGROUND, false);
    			break;
    			
    		case MF_DROPRATE50:
    			if (state) {
    			union u_mapflag_args args = {};
    			
    				if (sscanf(w4, "%11d", &args.flag_val) == 1)
    					map_setmapflag(m, MF_DROPRATE50, state);
    				else
    					map_setmapflag(m, MF_DROPRATE50, 100);
    				} else
    					map_setmapflag(m, MF_DROPRATE50, 100);
    			break;
    		case MF_DROPRATE300:
    			if (state) {
    			union u_mapflag_args args = {};
    			
    				if (sscanf(w4, "%11d", &args.flag_val) == 1)
    					map_setmapflag(m, MF_DROPRATE300, state);
    				else
    					map_setmapflag(m, MF_DROPRATE300, 100);
    				} else
    					map_setmapflag(m, MF_DROPRATE300, 100);
    			break;
    			
    		case MF_NOCOMMAND:
    			if (state) {
    				union u_mapflag_args args = {};
    
    				if (sscanf(w4, "%11d", &args.flag_val) < 1)
    					args.flag_val = 100; // No level specified, block everyone.
    
    				map_setmapflag_sub(m, MF_NOCOMMAND, true, &args);
    			} else
    				map_setmapflag(m, MF_NOCOMMAND, false);
    			break;

    insert

    		case MF_DROPRATE50:
    			if (state) {
    			union u_mapflag_args args = {};
    			
    				if (sscanf(w4, "%11d", &args.flag_val) == 1)
    					map_setmapflag(m, MF_DROPRATE50, state);
    				else
    					map_setmapflag(m, MF_DROPRATE50, 100);
    				} else
    					map_setmapflag(m, MF_DROPRATE50, 100);
    			break;
    		case MF_DROPRATE300:
    			if (state) {
    			union u_mapflag_args args = {};
    			
    				if (sscanf(w4, "%11d", &args.flag_val) == 1)
    					map_setmapflag(m, MF_DROPRATE300, state);
    				else
    					map_setmapflag(m, MF_DROPRATE300, 100);
    				} else
    					map_setmapflag(m, MF_DROPRATE300, 100);
    			break;

    under MF_BATTLEGROUND(doesnt matter)

     

    NEXT - MAP.H

    find

    	MF_NOEXP,
    	MF_PRIVATEAIRSHIP_SOURCE,
    	MF_PRIVATEAIRSHIP_DESTINATION,
    	MF_SKILL_DURATION,
    	MF_DROPRATE50,
    	MF_DROPRATE300,
    	MF_MAX

    add MF_DROPRATE50, and MF_DROPRATE300, 

    commas matter 

     

    Last in your SRC find SCRIPT_CONSTANTS.H

    and add our 2 new map flags like above

    	export_constant(MF_NOEXP);
    	export_constant(MF_PRIVATEAIRSHIP_SOURCE);
    	export_constant(MF_PRIVATEAIRSHIP_DESTINATION);
    	export_constant(MF_DROPRATE50);
    	export_constant(MF_DROPRATE300);
    	export_constant(MF_SKILL_DURATION);

     

    recompile i hope it works

     

     

    afterwards you also need to make changes in your NPC folder 

    scripts_mapflags

    npc: npc/mapflag/skill_duration.txt
    npc: npc/mapflag/droprate.txt

    then in the file it should look like this

    prontera	mapflag	droprate50
    geffen	mapflag	droprate300

     

    just merge my files with yours if you want and please let me know if you have problems

     

    droprate.rar

  7. ah well i dont know what you want but ill shed what light i can on you

     

    // Base weapon delay
    	amotion = (sd->status.weapon < MAX_WEAPON_TYPE)
    	 ? (job_info[classidx].aspd_base[sd->status.weapon]) // Single weapon
    	 : (job_info[classidx].aspd_base[sd->weapontype1] + job_info[classidx].aspd_base[sd->weapontype2]) * 7 / 10; // Dual-wield

    amotion = SD->STATUS.WEAPON or whatever... this will look to our character then scan our jobdb1 for our aspd to our equiped weapon

     

    ok now everything above this formula is specific to aspd passives and i guess that list of weapons, not sure why but if those weapons seem off to you, go make changes there. (ah i see your trying to change those, well im not familiar with the mechanics but ill teach you how to read)

    now underneath this base weapon delay we will find this

    	// Percentual delay reduction from stats
    	amotion -= amotion * (4 * status->agi + status->dex) / 1000;
    
    	// Raw delay adjustment from bAspd bonus
    	amotion += sd->bonus.aspd_add;

    btw shield is in jobdb1.. this is where your gonna make your stat related aspd changes... as amotion is what we use to identify the base weapons aspds including shields... potions just seem to be fixed... 

  8. 19 hours ago, pueblodefairy said:

    Exactly, you got the point, this is exactly what i am looking. Same visual effect but dealing damage like a Sharp Shooting. Thanks for your help

    I made this video for you, its simple just go over my first post and watch it

    btw ctrl + f for the search window

     

     

    What do you want it to also deal damage in a straight line ? lol i didnt add that to the video but 

    go into skill.c

    find this chunk

    case SN_SHARPSHOOTING:
    	case MA_SHARPSHOOTING:
    	case NJ_KAMAITACHI:
    	case NPC_DARKPIERCING:
    	case NPC_ACIDBREATH:
    	case NPC_DARKNESSBREATH:
    	case NPC_FIREBREATH:
    	case NPC_ICEBREATH:
    	case NPC_THUNDERBREATH:
    		skill_area_temp[1] = bl->id;
    		if (battle_config.skill_eightpath_algorithm) {
    			//Use official AoE algorithm
    			if (!(map_foreachindir(skill_attack_area, src->m, src->x, src->y, bl->x, bl->y,
    			   skill_get_splash(skill_id, skill_lv), skill_get_maxcount(skill_id, skill_lv), 0, splash_target(src),
    			   skill_get_type(skill_id), src, src, skill_id, skill_lv, tick, flag, BCT_ENEMY))) {
    				//These skills hit at least the target if the AoE doesn't hit
    				skill_attack(skill_get_type(skill_id), src, src, bl, skill_id, skill_lv, tick, flag);
    			}
    		} else {
    			map_foreachinpath(skill_attack_area, src->m, src->x, src->y, bl->x, bl->y,
    				skill_get_splash(skill_id, skill_lv), skill_get_maxcount(skill_id, skill_lv), splash_target(src),
    				skill_get_type(skill_id), src, src, skill_id, skill_lv, tick, flag, BCT_ENEMY);
    		}
    		if (skill_id == SN_SHARPSHOOTING)
    			status_change_end(src, SC_CAMOUFLAGE, INVALID_TIMER);
    		break;

    just add WM_SOUND_OF_DESTRUCTION under Sharpshooting, and then delete everything else related to WM_SOUND_OF_DESTRUCTION..

     

     

    someone could probably make some merge thing, itd be way easier but i dont know how to do that

    • Upvote 2
  9. 20 minutes ago, Akigis said:

    Help please. How i can install whis files? Any guide? And its for what of GRF file? data.grf or rdata or what needed?

    if you dont have the files you can just place them in your data.grf under textur/A~A/collection like where the error says

    • Like 1
  10. Ok does this skill normally deal damage do monsters? 

     

    it looks like it only deals damage to those under the song statuses

    				if( tsc && tsc->count && ( tsc->data[SC_SWING] || tsc->data[SC_SYMPHONY_LOVE] || tsc->data[SC_MOONLIT_SERENADE] ||
    						tsc->data[SC_RUSH_WINDMILL] || tsc->data[SC_ECHOSONG] || tsc->data[SC_HARMONIZE] ||
    						tsc->data[SC_SIREN] || tsc->data[SC_DEEP_SLEEP] || tsc->data[SC_SIRCLEOFNATURE] ||
    						tsc->data[SC_GLOOMYDAY] || tsc->data[SC_SONG_OF_MANA] ||
    						tsc->data[SC_DANCE_WITH_WUG] || tsc->data[SC_SATURDAY_NIGHT_FEVER] || tsc->data[SC_LERADS_DEW] ||
    						tsc->data[SC_MELODYOFSINK] || tsc->data[SC_BEYOND_OF_WARCRY] || tsc->data[SC_UNLIMITED_HUMMING_VOICE] ) &&
    						rnd()%100 < 4 * skill_lv + 2 * (sd ? pc->checkskill(sd,WM_LESSON) : 10) + 10 * battle->calc_chorusbonus(sd)) {
    					skill->attack(BF_MISC,src,src,bl,skill_id,skill_lv,tick,flag);

    but if you want real damage : 

    thats because it it doesnt have a bf_attack... if you look at great echo it uses the same aoe... but it has a bf_weapon...

    but if you want that instead just do this

    in your skill.c 

    		case WM_GREAT_ECHO:
    		case GN_SLINGITEM_RANGEMELEEATK:
    		case KO_SETSUDAN:
    		case GC_DARKCROW:
    		case NPC_CONRAY:
    		case LG_OVERBRAND_BRANDISH:
    		case PA_PRESSURE:
    		case LG_OVERBRAND:
    		case KN_LIGHTNINGSWING:
    		case SJ_FLASHKICK:
    			skill->attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag);
    		break;

    just add WM_SOUND_OF_DESTRUCTION under great echo or wherever...

    you would have to change the damage formula a bit too just copy great echo..

     

    or you can delete this part in your skill.c

    case WM_SOUND_OF_DESTRUCTION:
    		if( tsc && ( tsc->data[SC_SWINGDANCE] || tsc->data[SC_SYMPHONYOFLOVER] || tsc->data[SC_MOONLITSERENADE] || 
    		tsc->data[SC_RUSHWINDMILL] || tsc->data[SC_ECHOSONG] || tsc->data[SC_HARMONIZE] || 
    		tsc->data[SC_VOICEOFSIREN] || tsc->data[SC_DEEPSLEEP] || tsc->data[SC_SIRCLEOFNATURE] || 
    		tsc->data[SC_GLOOMYDAY] || tsc->data[SC_GLOOMYDAY_SK] || tsc->data[SC_SONGOFMANA] || 
    		tsc->data[SC_DANCEWITHWUG] || tsc->data[SC_SATURDAYNIGHTFEVER] || tsc->data[SC_LERADSDEW] || 
    		tsc->data[SC_MELODYOFSINK] || tsc->data[SC_BEYONDOFWARCRY] || tsc->data[SC_UNLIMITEDHUMMINGVOICE] ) && 
    		rnd()%100 < 4 * skill_lv + 2 * ((sd) ? pc_checkskill(sd, WM_LESSON) : skill_get_max(WM_LESSON)) + 10 * battle_calc_chorusbonus(sd)) {
    			status_change_start(src, bl, SC_STUN, 10000, skill_lv, 0, 0, 0, skill_get_time(skill_id,skill_lv), SCSTART_NOTICKDEF);
    			status_change_end(bl, SC_DANCING, INVALID_TIMER);
    			status_change_end(bl, SC_RICHMANKIM, INVALID_TIMER);
    			status_change_end(bl, SC_ETERNALCHAOS, INVALID_TIMER);
    			status_change_end(bl, SC_DRUMBATTLE, INVALID_TIMER);
    			status_change_end(bl, SC_NIBELUNGEN, INVALID_TIMER);
    			status_change_end(bl, SC_INTOABYSS, INVALID_TIMER);
    			status_change_end(bl, SC_SIEGFRIED, INVALID_TIMER);
    			status_change_end(bl, SC_WHISTLE, INVALID_TIMER);
    			status_change_end(bl, SC_ASSNCROS, INVALID_TIMER);
    			status_change_end(bl, SC_POEMBRAGI, INVALID_TIMER);
    			status_change_end(bl, SC_APPLEIDUN, INVALID_TIMER);
    			status_change_end(bl, SC_HUMMING, INVALID_TIMER);
    			status_change_end(bl, SC_FORTUNE, INVALID_TIMER);
    			status_change_end(bl, SC_SERVICE4U, INVALID_TIMER);
    			status_change_end(bl, SC_LONGING, INVALID_TIMER);
    			status_change_end(bl, SC_SWINGDANCE, INVALID_TIMER);
    			status_change_end(bl, SC_SYMPHONYOFLOVER, INVALID_TIMER);
    			status_change_end(bl, SC_MOONLITSERENADE, INVALID_TIMER);
    			status_change_end(bl, SC_RUSHWINDMILL, INVALID_TIMER);
    			status_change_end(bl, SC_ECHOSONG, INVALID_TIMER);
    			status_change_end(bl, SC_HARMONIZE, INVALID_TIMER);
    			status_change_end(bl, SC_WINKCHARM, INVALID_TIMER);
    			status_change_end(bl, SC_SONGOFMANA, INVALID_TIMER);
    			status_change_end(bl, SC_DANCEWITHWUG, INVALID_TIMER);
    			status_change_end(bl, SC_LERADSDEW, INVALID_TIMER);
    			status_change_end(bl, SC_MELODYOFSINK, INVALID_TIMER);
    			status_change_end(bl, SC_BEYONDOFWARCRY, INVALID_TIMER);
    			status_change_end(bl, SC_UNLIMITEDHUMMINGVOICE, INVALID_TIMER);
    		}
    		break;

    and just add WM_SOUND_OF_DESTRUCTION to 

    		case RK_SONICWAVE:
    		case AM_HARVEST:
    		case GN_HELLS_PLANT_ATK:
    #ifdef RENEWAL
    		case ASC_BREAKER:
    #endif
    			skill->attack(BF_MISC,src,src,bl,skill_id,skill_lv,tick,flag);
    			break;

     

     

    haha

  11. Yeah but itd be a pain for you

    pooring.jpg

     

    in mob.c:

    ctrl F

    this

    mob_summonslave

    find this line

    	data.state.size = md2->special_state.size;

    change it to this

    	data.state.size = SZ_BIG; 

     

    recompile

     

     

    Now make another function like this but just for the big size small sizes etc 

     

    maybe easier way but fuck that i dont know it 

×
×
  • Create New...