Jump to content

Racaae

Members
  • Posts

    222
  • Joined

  • Last visited

  • Days Won

    32

Posts posted by Racaae

  1. Hi. Find this line in \src\map\skill.cpp and cut it (around line 8197):

    case AL_INCAGI:

     

    Then find the following line in \src\map\skill.cpp and paste that line (around line 9233):

    case CASH_ASSUMPTIO:

    >

    	case CASH_ASSUMPTIO:
    	case AL_INCAGI:

     

    Add the following in \db\import\skill_db.yml:

    Body:
      - Id: 29
        Description: Increase AGI
        TargetType: Self
        DamageFlags:
          Splash: true
        SplashArea: -1

    Save the files and recompile your server.

  2. 44 minutes ago, Astro Young said:

    hi sir block custom items and allow everything.. thanks!!

     

    👍

    prt_ext,165,138,5	script	PvP Arena	574,{
    
    	if(agitcheck()) goto nowoetime;
    	mes "[PvP Battle Room]";
    	mes "Let's Go!!!!!";
    	menu    
    		"No limit [" + getmapusers("guild_vs3") + "]",pvp1, 
    		"Non Donate [" + getmapusers("guild_vs4") + "]",spvp,
    		"Guild vs Guild [" + getmapusers("guild_vs2") + "]",gvg1,
    		"Sinx [" + getmapusers("guild_vs1") + "]",sinx; 
    	
    nowoetime:
    	mes "[PvP Battle Room]";
    	mes "You cannot enter to PvP Room during WoE!";
    	close;
    
    pvp1:
    	warp "guild_vs3",0,0;
    	announce ""+ strcharinfo(0) +" Has Entered The PVP Room.",bc_all; 
    	close;
    gvg1:
    	warp "guild_vs2",0,0;
    	announce ""+ strcharinfo(0) +" Has Entered The GVG Room.",bc_all; 
    	close;
    spvp:
    	if(countitem(59138) > 0 
    	|| countitem(59139) > 0 
    	|| countitem(59140) > 0
    	|| countitem(59141) > 0
    	|| countitem(59142) > 0
    	|| countitem(59143) > 0
    	|| countitem(59144) > 0
    	|| countitem(59145) > 0
    	|| countitem(59146) > 0
    	|| countitem(59147) > 0
    	|| countitem(59148) > 0
    	|| countitem(59149) > 0
    	|| countitem(59155) > 0
    	|| countitem(59150) > 0
    	|| countitem(59151) > 0
    	|| countitem(59152) > 0
    	|| countitem(59153) > 0
    	|| countitem(59154) > 0
    	//donate weapon
    	|| countitem(59000) > 0
    	|| countitem(59001) > 0
    	|| countitem(59002) > 0
    	|| countitem(59003) > 0
    	|| countitem(59004) > 0
    	|| countitem(59005) > 0
    	|| countitem(59006) > 0
    	|| countitem(59007) > 0 
    	|| countitem(59008) > 0
    	|| countitem(59009) > 0
    	|| countitem(59010) > 0
    	|| countitem(59011) > 0
    	|| countitem(59012) > 0 
    	|| countitem(59013) > 0
    	|| countitem(59014) > 0
    	
    //Pointers
    	|| countitem(501) > 0) 
    		goto donator; 
    	warp "guild_vs4",0,0;
    	announce ""+ strcharinfo(0) +" Has Entered The PVP Room Non Donate.",bc_all; 
    	close;
    		
    donator:
    	mes "You are a donator you are not allowed to this room";
    	close; 
    
    sinx:
    	//Put the Custom Items IDs here
    	setarray .@sinx_CustomItems,59000,59001,59002,59003,59004,59005,59006,59007,
    					59008,59009,59010,59011,59012,59013,59014,59138,59139,59140,
    					59141,59142,59143,59144,59145,59146,59147,59148,59149,59150,
    					59151,59152,59153,59154,59155;
    
    	clear;
    	mes "[PvP Battle Room]";
    	mes "This room is for ^0000FFAssassin job only^000000.";
    	if (BaseJob != Job_Assassin)
    		close;
    	switch(select("Enter", "Restricted items list", "Cancel")) {
    		case 1:
    			break;
    		case 2:
    			clear;
    			mes "[PvP Battle Room]";
    			mes "You can't use the following inside:";
    			for(.@i = 0; .@i < getarraysize(.@sinx_CustomItems); .@i++)
    				mes "" + getitemname(.@sinx_CustomItems[.@i]);
    			close;
    		case 3:
    			close;
    	}
    	for (.@i = 0; .@i < getarraysize(.@sinx_CustomItems); .@i++) {
    		if (countitem(.@sinx_CustomItems[.@i]))
    			.@has_forbidden[.@count++] =.@sinx_CustomItems[.@i];
    	}
    	if (.@has_forbidden[0]) {
    		clear;
    		mes "[PvP Battle Room]";
    		mes "You can't enter the room with the following items in your inventory:";
    		for(.@i = 0; .@i < getarraysize(.@has_forbidden); .@i++)
    			mes "" + getitemname(.@has_forbidden[.@i]);
    		close;
    	}
    	announce strcharinfo(0) +" has entered the PVP Room Sinx.",bc_all; 
    	warp "guild_vs1",0,0;
    	end;
    
    //OnPCDieEvent:
    //	set @Die,@Die + 1;
    //	if( @Die % 2 == 0 ) warp "SavePoint",0,0;
    //	end; 
    
    }

     

  3. 15 minutes ago, Astro Young said:

    Hi i got this error

     

    Capture4.PNG

    Your rAthena is outdated. You can update it or use this version below:

    prt_ext,165,138,5	script	PvP Arena	574,{
    
    	if(agitcheck()) goto nowoetime;
    	mes "[PvP Battle Room]";
    	mes "Let's Go!!!!!";
    	menu    
    		"No limit [" + getmapusers("guild_vs3") + "]",pvp1, 
    		"Non Donate [" + getmapusers("guild_vs4") + "]",spvp,
    		"Guild vs Guild [" + getmapusers("guild_vs2") + "]",gvg1,
    		"Sinx [" + getmapusers("guild_vs1") + "]",sinx; 
    	
    nowoetime:
    	mes "[PvP Battle Room]";
    	mes "You cannot enter to PvP Room during WoE!";
    	close;
    
    pvp1:
    	warp "guild_vs3",0,0;
    	announce ""+ strcharinfo(0) +" Has Entered The PVP Room.",bc_all; 
    	close;
    gvg1:
    	warp "guild_vs2",0,0;
    	announce ""+ strcharinfo(0) +" Has Entered The GVG Room.",bc_all; 
    	close;
    spvp:
    	if(countitem(59138) > 0 
    	|| countitem(59139) > 0 
    	|| countitem(59140) > 0
    	|| countitem(59141) > 0
    
    	|| countitem(59142) > 0
    	|| countitem(59143) > 0
    	|| countitem(59144) > 0
    
    	|| countitem(59145) > 0
    	|| countitem(59146) > 0
    	|| countitem(59147) > 0
    
    	|| countitem(59148) > 0
    	|| countitem(59149) > 0
    	|| countitem(59155) > 0
    
    	|| countitem(59150) > 0
    	|| countitem(59151) > 0
    	|| countitem(59152) > 0
    	|| countitem(59153) > 0
    	|| countitem(59154) > 0
    
    
    	//donate weapon
    	|| countitem(59000) > 0
    	|| countitem(59001) > 0
    	|| countitem(59002) > 0
    	|| countitem(59003) > 0
    	|| countitem(59004) > 0
    	|| countitem(59005) > 0
    	|| countitem(59006) > 0
    	|| countitem(59007) > 0 
    	|| countitem(59008) > 0
    	|| countitem(59009) > 0
    	|| countitem(59010) > 0
    	|| countitem(59011) > 0
    	|| countitem(59012) > 0 
    	|| countitem(59013) > 0
    	|| countitem(59014) > 0
    
    
    	//Pointers
    	|| countitem(501) > 0) 
    goto donator; 
    	warp "guild_vs4",0,0;
    	announce ""+ strcharinfo(0) +" Has Entered The PVP Room Non Donate.",bc_all; 
    	close;
    		
    donator:
    	mes "You are a donator you are not allowed to this room";
    	close; 
    
    sinx:
    	//Put the Custom Items IDs here
    	setarray .@sinx_CustomItems,2538,2435,2378,2721,13036,13411,1279,13037,13410,1280,2772,2773,2774,1281,1282;
    
    	clear;
    	mes "[PvP Battle Room]";
    	mes "This room is for ^0000FFAssassin job only^000000.";
    	if (BaseJob != Job_Assassin)
    		close;
    	switch(select("Enter", "Allowed items list", "Cancel")) {
    		case 1:
    			break;
    		case 2:
    			clear;
    			mes "[PvP Battle Room]";
    			mes "You can use only the following inside:";
    			for(.@i = 0; .@i < getarraysize(.@sinx_CustomItems); .@i++)
    				mes "" + getitemname(.@sinx_CustomItems[.@i]);
    			close;
    		case 3:
    			close;
    	}
    	getinventorylist;
    	for (.@i = 0; .@i < @inventorylist_count; .@i++) {
    		.@item_id = @inventorylist_id[.@i];
    		if (getiteminfo(.@item_id, ITEMINFO_TYPE) != IT_ARMOR && getiteminfo(.@item_id, ITEMINFO_TYPE) != IT_WEAPON && getiteminfo(.@item_id, ITEMINFO_TYPE) != IT_SHADOWGEAR)
    			continue;
    		if (inarray(.@sinx_CustomItems, .@item_id) > -1 || inarray(.@has_forbidden, .@item_id) > -1)
    			continue;
    		.@has_forbidden[.@count++] = .@item_id;
    	}
    	if (.@has_forbidden[0]) {
    		clear;
    		mes "[PvP Battle Room]";
    		mes "You have forbidden items in your inventory. Store or put them away before entering:";
    		for(.@i = 0; .@i < getarraysize(.@has_forbidden); .@i++)
    			mes "" + getitemname(.@has_forbidden[.@i]);
    		close;
    	}
    	announce strcharinfo(0) +" has entered the PVP Room Sinx.",bc_all; 
    	warp "guild_vs1",0,0;
    	end;
    
    //OnPCDieEvent:
    //	set @Die,@Die + 1;
    //	if( @Die % 2 == 0 ) warp "SavePoint",0,0;
    //	end; 
    
    }

     

  4. Hello,
    getmonsterinfo will return "null" if you requested a invalid monster's name.

    getmonsterinfo(.@mvp_id, MOB_NAME) == "null"

     

    monster sets an array with the game ID of the spawned monster(s). Array is stored in $@mobid[].

    .@mob_gid = $@mobid[0];

     

    setunitdata monster parameters are UMOB_.

    	    setunitdata(.@mob_gid, UMOB_HP, 20000000);
    	    setunitdata(.@mob_gid, UMOB_MAXHP, 20000000);
    	    setunitdata(.@mob_gid, UMOB_ATKMIN, 10000);
    	    setunitdata(.@mob_gid, UMOB_ATKMAX, 15000);
    	    setunitdata(.@mob_gid, UMOB_DEF, 200);
    	    setunitdata(.@mob_gid, UMOB_MDEF, 200);
    	    setunitdata(.@mob_gid, UMOB_AGI, 150);
    	    setunitdata(.@mob_gid, UMOB_STR, 200);
    	    setunitdata(.@mob_gid, UMOB_VIT, 200);
    	    setunitdata(.@mob_gid, UMOB_INT, 150);
    	    setunitdata(.@mob_gid, UMOB_HIT, 600);
    	    setunitdata(.@mob_gid, UMOB_FLEE, 500);

    Parameters (indexes) for monsters
     

    Use sleep2 instead of sleep. sleep will not keep the rid (to display the mes text), while sleep2 does.

  5. Hi

    Spoiler
    prt_ext,165,138,5	script	PvP Arena	574,{
    
    	if(agitcheck()) goto nowoetime;
    	mes "[PvP Battle Room]";
    	mes "Let's Go!!!!!";
    	menu    
    		"No limit [" + getmapusers("guild_vs3") + "]",pvp1, 
    		"Non Donate [" + getmapusers("guild_vs4") + "]",spvp,
    		"Guild vs Guild [" + getmapusers("guild_vs2") + "]",gvg1,
    		"Sinx [" + getmapusers("guild_vs1") + "]",sinx; 
    	
    nowoetime:
    	mes "[PvP Battle Room]";
    	mes "You cannot enter to PvP Room during WoE!";
    	close;
    
    pvp1:
    	warp "guild_vs3",0,0;
    	announce ""+ strcharinfo(0) +" Has Entered The PVP Room.",bc_all; 
    	close;
    gvg1:
    	warp "guild_vs2",0,0;
    	announce ""+ strcharinfo(0) +" Has Entered The GVG Room.",bc_all; 
    	close;
    spvp:
    	if(countitem(59138) > 0 
    	|| countitem(59139) > 0 
    	|| countitem(59140) > 0
    	|| countitem(59141) > 0
    
    	|| countitem(59142) > 0
    	|| countitem(59143) > 0
    	|| countitem(59144) > 0
    
    	|| countitem(59145) > 0
    	|| countitem(59146) > 0
    	|| countitem(59147) > 0
    
    	|| countitem(59148) > 0
    	|| countitem(59149) > 0
    	|| countitem(59155) > 0
    
    	|| countitem(59150) > 0
    	|| countitem(59151) > 0
    	|| countitem(59152) > 0
    	|| countitem(59153) > 0
    	|| countitem(59154) > 0
    
    
    	//donate weapon
    	|| countitem(59000) > 0
    	|| countitem(59001) > 0
    	|| countitem(59002) > 0
    	|| countitem(59003) > 0
    	|| countitem(59004) > 0
    	|| countitem(59005) > 0
    	|| countitem(59006) > 0
    	|| countitem(59007) > 0 
    	|| countitem(59008) > 0
    	|| countitem(59009) > 0
    	|| countitem(59010) > 0
    	|| countitem(59011) > 0
    	|| countitem(59012) > 0 
    	|| countitem(59013) > 0
    	|| countitem(59014) > 0
    
    
    	//Pointers
    	|| countitem(501) > 0) 
    goto donator; 
    	warp "guild_vs4",0,0;
    	announce ""+ strcharinfo(0) +" Has Entered The PVP Room Non Donate.",bc_all; 
    	close;
    		
    donator:
    	mes "You are a donator you are not allowed to this room";
    	close; 
    
    sinx:
    	//Put the Custom Items IDs here
    	setarray .@sinx_CustomItems,2538,2435,2378,2721,13036,13411,1279,13037,13410,1280,2772,2773,2774,1281,1282;
    
    	clear;
    	mes "[PvP Battle Room]";
    	mes "This room is for ^0000FFAssassin job only^000000.";
    	if (BaseJob != Job_Assassin)
    		close;
    	switch(select("Enter", "Allowed items list", "Cancel")) {
    		case 1:
    			break;
    		case 2:
    			clear;
    			mes "[PvP Battle Room]";
    			mes "You can use only the following inside:";
    			for(.@i = 0; .@i < getarraysize(.@sinx_CustomItems); .@i++)
    				mes "" + mesitemlink(.@sinx_CustomItems[.@i]);
    			if (getarraysize(.@sinx_CustomItems) > 5)
    				setdialogsize(280,cap_value(185+((getarraysize(.@sinx_CustomItems)-5)*20),185,600));
    			close;
    		case 3:
    			close;
    	}
    	getinventorylist;
    	for (.@i = 0; .@i < @inventorylist_count; .@i++) {
    		.@item_id = @inventorylist_id[.@i];
    		if (getiteminfo(.@item_id, ITEMINFO_TYPE) != IT_ARMOR && getiteminfo(.@item_id, ITEMINFO_TYPE) != IT_WEAPON && getiteminfo(.@item_id, ITEMINFO_TYPE) != IT_SHADOWGEAR)
    			continue;
    		if (inarray(.@sinx_CustomItems, .@item_id) > -1 || inarray(.@has_forbidden, .@item_id) > -1)
    			continue;
    		.@has_forbidden[.@count++] = .@item_id;
    	}
    	if (.@has_forbidden[0]) {
    		clear;
    		mes "[PvP Battle Room]";
    		mes "You have forbidden items in your inventory. Store or put them away before entering:";
    		for(.@i = 0; .@i < getarraysize(.@has_forbidden); .@i++)
    			mes "" + mesitemlink(.@has_forbidden[.@i]);
    		if (getarraysize(.@has_forbidden) > 3)
    			setdialogsize(280,cap_value(185+((getarraysize(.@has_forbidden)-3)*20),185,600));
    		close;
    	}
    	announce strcharinfo(0) +" has entered the PVP Room Sinx.",bc_all; 
    	warp "guild_vs1",0,0;
    	end;
    
    //OnPCDieEvent:
    //	set @Die,@Die + 1;
    //	if( @Die % 2 == 0 ) warp "SavePoint",0,0;
    //	end; 
    
    }

     

     

  6. Hello, the data is stored on sql database table skill.

    You can use script command getskilllist.

    /doc/script_commands.txt#L3662

    *getskilllist({<char_id>});
    
    This command sets a bunch of arrays with a complete list of skills the
    invoking character has. Here's what you get:
    
    @skilllist_id[]   - skill ids.
    @skilllist_lv[]   - skill levels.
    @skilllist_flag[] - see 'skill' for the meaning of skill flags.
    @skilllist_count  - number of skills in the above arrays.

     

  7. Hi
     

    //===== rAthena Script =======================================
    //= World Boss Apparition
    //===== By: ==================================================
    //= Alayne
    //===== Current Version: =====================================
    //= 1.0 First version.
    //= 2.0 Updated. [Racaae]
    //============================================================
    
    -	script	WorldBoss::alawboss	-1,{
    OnInit:
    
    //===== CONF
    	.rewardMode = 2;	// 1:inventory - 2:mailed - 3:drop on floor
    
    	// Rewards
    	// setarray .reward_id[0],     <itemID>{,<itemID>,...}
    	// setarray .reward_amount[0], <amount>{,<amount>,...}
    	setarray .reward_id[0],969;
    	setarray .reward_amount[0],1;
    
    	.special_reward_id = 607;	//item id for person who gave the final blow 
    	.special_reward_amount = 3;	//amount for person who gave the final blow
    	.reward_zeny = 0;	// Zeny reward
    	.rewardCount = -1;	//How many items to drop on floor? (rewardMode:3 Only)
    	.ip_check = true;	//No rewards for double login
    	set .bossAliveDuration, 30; //in minutes
    	setarray .rebirthXY[0],120,202,202,120,119,37,37,119; //X, then Y. Only used if only one map is used
    	set $lastPopMap$, "";
    	set $wordBossPop, 0;
    	setarray .wbMap$[0],
    		"prontera";
    	setarray .wbMapName$[0],
    		"Prontera";
    	setarray .wBossIds[0],
    		2320,2483,1917,2942,2131;
    	setarray .wBossHp[0],
    		20000000,30000000,40000000,50000000,60000000;
    	//Storm Gust, Meteor Storm, Lord of Vermillion, Bowling Bash, Kyrie Eleison
    	setarray .wbSummonSkillId[0],
    		89, 83, 85, 62, 73;
    	setarray .wBossName$[0],
    		"Hoktarrh","Giashim","Deathres","Cerbere","Citrak";
    	setarray .wbSlaveMobsId[0], 1098, 2023, 2365, 2019, 2472;
    	setarray .wbSlaveMobsCount[0], 25, 15, 10, 15, 5;
    	setarray .deadMonstersId[0], 1865, 2603, 1870, 2473, 2474, 2283;
    //===== CONF END
    
    	set .timerCount, 0;
    	.reward_id_size = getarraysize(.reward_id);
    	bindatcmd "worldboss", strnpcinfo(3) + "::OnStartWBoss",90,90;
    	end;
    
    OnStartWBoss:
    	.@force = 1;
    OnMinute30:
    OnStarted:
    	if($WorldBoss_cd <= gettimetick(2) || .@force) {
    		set .@chosenMap$, "[ ";
    		set .@spawnRand, rand(0, getarraysize(.wbMap$)-1);
    		set .lastRandId, rand(0, getarraysize(.wBossIds) - 1);
    		//RATHENA
    		monster .wbMap$[.@spawnRand],82,55,.wBossName$[.lastRandId],.wBossIds[.lastRandId],1,strnpcinfo(3) + "::OnWorldBossDied",2; 
    		set .wBossId, $@mobId[0];
    		setunitdata .wBossId, UMOB_MAXHP, .wBossHp[.@spawnRand];
    		
    		set .@chosenMap$, .@chosenMap$ + .wbMapName$[.@spawnRand] + "]";
    		
    		announce "[ System ] World Boss appeared in " + .@chosenMap$ + " !",bc_all,0xFF0000;
    		set $WorldBoss_cd, gettimetick(2) + 21600; //next pop in 3 days, 60 for debug (1 min) - 21600 6hours
    		
    		set $lastPopMap$, .wbMap$[.@spawnRand];
    		set $lastPopIdRank, .@spawnRand;
    		deletearray $wbFighters[0], getarraysize($wbFighters);
    		set $wordBossPop, 1;
    		set .deadCount, 0;
    		
    		set .timerCount, 0;
    		initnpctimer;
    		donpcevent "World Boss#wb_board::OnEvent";
    	}
    	else {
    		if(.debug == 1) {
    			debugmes "Not ready yet.";		
    		}
    	}
    	end;
    	
    OnTimer1000:
    	.timerCount += 1;
    	freeloop(1);
    	if(.timerCount == .bossAliveDuration * 60) {
    		stopnpctimer; 
    
    		killmonster $lastPopMap$, strnpcinfo(3) + "::OnWorldBossDied";
    		killmonster $lastPopMap$, strnpcinfo(3) + "::OnSaveDied";
    		killmonster $lastPopMap$, strnpcinfo(3) + "::OnCloneDied";
    		killmonster $lastPopMap$, strnpcinfo(3) + "::OnReducedBossDied";
    
    		set $wordBossPop, 0;
    		announce "[ System ] World Boss vanished without being killed...",bc_all,0x00FF00;
    	}
    	set .@cellRange, 25;
    	switch(.timerCount)
    	{
    		case 60:
    			//1 min
    			mapannounce $lastPopMap$, "[ World Boss ] Raise! Raise, my army!", bc_map, 0xFF0000;
    			//RATHENA
    			getunitdata(.wBossId, .@worldBossData);
    			set .@x, .@worldBossData[UMOB_X];
    			set .@y, .@worldBossData[UMOB_Y];
    			for(set .@i,0; .@i<getarraysize(.wbSlaveMobsId); set .@i,.@i+1)
    			{
    				for(set .@j,0; .@j<.wbSlaveMobsCount[.@i]; set .@j,.@j+1)
    				{
    					areamonster $lastPopMap$, .@x - .@cellRange, .@y - .@cellRange, .@x + .@cellRange, .@y + .@cellRange, "Slaves", .wbSlaveMobsId[.@i], 1, strnpcinfo(3) + "::OnSaveDied";  
    				}
    			}
    			break;
    		case 120:
    			//2 min, all summon cast skills
    			mapannounce $lastPopMap$, "[ World Boss ] You are all far beyond my control!", bc_map, 0xFF0000;
    			//RATHENA
    			getunitdata(.wBossId, .@worldBossData);
    			set .@x, .@worldBossData[UMOB_X];
    			set .@y, .@worldBossData[UMOB_Y];
    			for(set .@i,0; .@i<getarraysize(.wbSlaveMobsId); set .@i,.@i+1)
    			{
    				areamobuseskill $lastPopMap$, .@x, .@y, .@cellRange * 2, .wbSlaveMobsId[.@i], .wbSummonSkillId[.lastRandId], 5, 3000,1,ET_KIK,3;
    			}
    			break;
    		case 180:
    			//3 min, pop 15 reduced clone of the mob
    			mapannounce $lastPopMap$, "[ World Boss ] You won't go away with this, humans!", bc_map, 0xFF0000;
    			monster $lastPopMap$,0,0,.wBossName$[.lastRandId],.wBossIds[.lastRandId],15,strnpcinfo(3) + "::OnReducedBossDied"; 
    			copyarray .@tempMobId[0], $@mobId[0], 15;
    			//RATHENA
    			getunitdata(.wBossId, .@worldBossData);
    			set .@hp, .@worldBossData[UMOB_HP];
    			set .@tempHp, .@hp / 15;
    			for(set .@i,0; .@i<getarraysize(.@tempMobId); set .@i,.@i+1)
    			{	
    				//RATHENA
    				setunitdata .@tempMobId[.@i], UMOB_MAXHP, .@tempHp;
    				setunitdata .@tempMobId[.@i], UMOB_HP, .@tempHp;
    			}
    			break;
    		case 240:
    			//4 min, raise dead bodies
    			mapannounce $lastPopMap$, "[ World Boss ] Even the deads are on my side! You can't win!", bc_map, 0xFF0000;
    			set .@deadSplit, .deadCount / getarraysize(.deadMonstersId);
    			if(.@deadSplit <= 0)
    			{
    				set .@deadSplit, 2;
    			}
    			//RATHENA
    			getunitdata(.wBossId, .@worldBossData);
    			set .@x, .@worldBossData[UMOB_X];
    			set .@y, .@worldBossData[UMOB_Y];
    			for(set .@i,0; .@i<getarraysize(.deadMonstersId); set .@i,.@i+1)
    			{
    				areamonster $lastPopMap$, .@x - .@cellRange, .@y - .@cellRange, .@x + .@cellRange, .@y + .@cellRange, "Dead Corpses", .deadMonstersId[.@i], .@deadSplit, strnpcinfo(3) + "::OnSaveDied";  
    			}
    			break;
    		case 300:
    			//5 min, pop clone of each player
    			mapannounce $lastPopMap$, "[ World Boss ] Fight against your own power you're so proud of, shall you?!", bc_map, 0xFF0000;
    			//RATHENA
    			getunitdata(.wBossId, .@worldBossData);
    			set .@x, .@worldBossData[UMOB_X];
    			set .@y, .@worldBossData[UMOB_Y];
    			for(set .@i,0; .@i<getarraysize($wbFighters); set .@i,.@i+1)
    			{
    				if(attachrid($wbFighters[.@i]) == 1 && strcharinfo(3) == $lastPopMap$)
    				{
    					clone $lastPopMap$, rand(.@x - .@cellRange, .@x + .@cellRange), rand(.@y - .@cellRange, .@y + .@cellRange), strnpcinfo(3) + "::OnCloneDied", getcharid(0);
    				}
    				else
    				{
    					deletearray $wbFighters[.@i], 1;
    				}
    			}
    			break;
    		case 360:
    			//6 min
    			mapannounce $lastPopMap$, "[ World Boss ] Raise! Raise, my army!", bc_map, 0xFF0000;
    			//RATHENA
    			getunitdata(.wBossId, .@worldBossData);
    			set .@x, .@worldBossData[UMOB_X];
    			set .@y, .@worldBossData[UMOB_Y];
    			for(set .@i,0; .@i<getarraysize(.wbSlaveMobsId); set .@i,.@i+1)
    			{
    				for(set .@j,0; .@j<.wbSlaveMobsCount[.@i]; set .@j,.@j+1)
    				{
    					areamonster $lastPopMap$, .@x - .@cellRange * 2, .@y - .@cellRange * 2, .@x + .@cellRange * 2, .@y + .@cellRange * 2, "Slaves", .wbSlaveMobsId[.@i], 1, strnpcinfo(3) + "::OnSaveDied";  
    				}
    			}
    			break;
    		case 420:
    			//7 min, autocast earthquake at 10% hp cost
    			mapannounce $lastPopMap$, "[ World Boss ] STOP BOTHERING ME, HUMANS!", bc_map, 0xFF0000;
    			//RATHENA
    			getunitdata(.wBossId, .@worldBossData);
    			set .@hp, .@worldBossData[UMOB_HP];
    			set .@mhp, .@worldBossData[UMOB_MAXHP];
    			set .@x, .@worldBossData[UMOB_X];
    			set .@y, .@worldBossData[UMOB_Y];
    			if(.@hp > 10 * .@mhp / 100)
    			{
    				//RATHENA
    				setunitdata .wBossId, UMOB_HP, .@hp - 10 * .@mhp / 100;
    				set .@id, .wbSlaveMobsId[rand(getarraysize(.wbSlaveMobsId) - 1)];
    				areamobuseskill $lastPopMap$, .@x, .@y, .@cellRange * 2, .@id, 653, 3, 3000, 1, ET_KIK, 3;
    			}
    			else
    			{
    				//only world boss pop, but stronger
    				areamobuseskill $lastPopMap$, .@x, .@y, .@cellRange * 2, .wBossIds[$lastPopIdRank], 653, 10, 3000, 1, ET_KIK, 3;
    			}
    			break;
    		case 480:
    			//8 min, wide bleeding
    			mapannounce $lastPopMap$, "[ World Boss ] You don't even deserve me to fight you!", bc_map, 0xFF0000;
    			areamobuseskill $lastPopMap$, .@x, .@y, 50, .wBossIds[$lastPopIdRank], 665, 5, 3000, 1, ET_KIK, 3;
    			break;
    		case 540:
    			//9 min, random kill over fighters
    			mapannounce $lastPopMap$, "[ World Boss ] Feel my rage! Limitless is my power!!", bc_map, 0xFF0000;
    			set .@killCount, rand(getarraysize($wbFighters));
    			for(set .@i,0; .@i<getarraysize($wbFighters); set .@i,.@i+1)
    			{
    				if(attachrid($wbFighters[.@i]) == 1 && strcharinfo(3) == $lastPopMap$)
    				{
    					charcommand "#nuke " + strcharinfo(0) + " " + strcharinfo(0);
    				}
    				else
    				{
    					deletearray $wbFighters[.@i], 1;
    				}
    			}
    			break;
    		case 600:
    			//10 min, raise life according to alive clones
    			mapannounce $lastPopMap$, "[ World Boss ] I'll feast from your bones!!", bc_map, 0xFF0000;
    			set .@mobCount, mobcount($lastPopMap$, strnpcinfo(3) + "::OnReducedBossDied");
    			killmonster $lastPopMap$, strnpcinfo(3) + "::OnReducedBossDied";
    			//RATHENA
    			getunitdata(.wBossId, .@worldBossData);
    			set .@hp, .@worldBossData[UMOB_HP];
    			set .@mhp, .@worldBossData[UMOB_MAXHP];
    			if( .@hp + .@mobCount * 50000 > .@mhp )
    				setunitdata .wBossId, UMOB_HP, .@mhp;
    			else
    				setunitdata .wBossId, UMOB_HP, .@hp + .@mobCount * 50000;
    			break;
    		case 660:
    			//11 min, slave skill area
    			mapannounce $lastPopMap$, "[ World Boss ] Life and death are nothing to me!", bc_map, 0xFF0000;
    			//RATHENA
    			getunitdata(.wBossId, .@worldBossData);
    			set .@x, .@worldBossData[UMOB_X];
    			set .@y, .@worldBossData[UMOB_Y];
    			for(set .@i,0; .@i<getarraysize(.wbSlaveMobsId); set .@i,.@i+1)
    			{
    				//BASILICA 362 (5) OR EVILLAND 670 (1)
    				if(rand(1) == 0)
    				{
    					areamobuseskill $lastPopMap$, .@x, .@y, .@cellRange * 2, .wbSlaveMobsId[.@i], 362, 5, 3000,1,ET_KIK,3;
    				}
    				else
    				{
    					areamobuseskill $lastPopMap$, .@x, .@y, .@cellRange * 2, .wbSlaveMobsId[.@i], 670, 1, 3000,1,ET_KIK,3;
    				}
    			}
    			break;
    	}
    	setnpctimer 0;
    	freeloop(0);
    	end;
    	
    OnPCDieEvent:
    	if(strcharinfo(3) == $lastPopMap$ && getarraysize(.wbMap$) == 1)
    	{
    		set .@rebirthArea, rand(4);
    		warp $lastPopMap$, .rebirthXY[.@rebirthArea * 2], .rebirthXY[.@rebirthArea * 2 + 1];	 
    		charcommand "#alive " + strcharinfo(0);
    	}
    	addtimer 10000, strnpcinfo(3) + "::OnPopClone";
    	set .deadCount, .deadCount + 1;
    	end;
    	
    OnPopClone:
    	if(Hp > 0)
    	{
    		set .@cellRange, 25;
    		//RATHENA
    		getunitdata(.wBossId, .@worldBossData);
    		set .@x, .@worldBossData[UMOB_X];
    		set .@y, .@worldBossData[UMOB_Y];
    		clone $lastPopMap$, rand(.@x - .@cellRange, .@x + .@cellRange), rand(.@y - .@cellRange, .@y + .@cellRange), strnpcinfo(3) + "::OnCloneDied", getcharid(0);
    	}
    	end;
    	
    OnSaveDied:
    OnCloneDied:
    OnReducedBossDied:
    	//nothing, used to clean
    	end;
    	
    OnWorldBossDied:
    	stopnpctimer;
    	set $wordBossPop, 0;
    	donpcevent "World Boss#wb_board::OnEvent";
    	killmonster $lastPopMap$, "All";
    	announce "[ System ] "+strcharinfo(0)+" gave the final blow to the World Boss !",bc_all,0x0000FF;
    	if (.special_reward_id && .special_reward_amount)
    		getitem .special_reward_id, .special_reward_amount;
    	callsub OnReward;
    	end;
    
    OnReward:
    	if (!.reward_id_size && !.reward_zeny)
    		return;
    	if (.rewardMode == 3) {
    		if (.rewardCount == -1) {
    			set .rewardCount, getmapusers($lastPopMap$);
    		}
    		for (set .@i,0; .@i < .rewardCount; set .@i,.@i+1) {
    			set .@rand, rand(getarraysize(.@reward_id));
    			//edit 150 if the map length and height is different of 150 cell
    			makeitem .reward_id[.@rand],.reward_amount[.@rand],$lastPopMap$,rand(150),rand(150); 
    		}
    		return;
    	}
    	if (.rewardMode) .@str$ = gettimestr("%B %d, %Y",21);
    	freeloop(1);
    	.@size = getmapunits(BL_PC,$lastPopMap$,.@aid[0]);
    	if (.ip_check) {
    		for ( .@j = 0; .@j < .@size; ++.@j ) {
    		//	.@ip$ = replacestr(getcharip(.@aid[.@j]),".","");
    			.@ip$ = getcharip(.@aid[.@j]);
    			.@duplicate = inarray(.@iplist$, .@ip$);
    			if (.@duplicate < 0)
    				.@iplist$[.@iplistcount++] = .@ip$;
    			else {
    				message rid2name(.@aid[.@j]), "Another character with the same IP address has received the World Boss reward.";
    				deletearray .@aid[.@j],1;
    				.@j--;
    			}
    		}
    		.@size = getarraysize(.@aid[0]);
    	}
    	for (.@j = 0; .@j < .@size; .@j++) {
    		if (.rewardMode == 2) {
    			.@charid = convertpcinfo(.@aid[.@j],CPC_CHAR);
    			.@sender$ = "Rune-Midgarts Kingdom";
    			.@title$ = "World Boss Reward";
    			.@body$ = "Congratulations on defeating the World Boss!\r\n "+.@str$+".\r\n \r\n \r\n \r\n \r\n [ Your reward is attached. ]";
    
    			if (.reward_id_size)
    				mail .@charid, .@sender$, .@title$, .@body$, .reward_zeny, .reward_id, .reward_amount;
    			else
    				mail .@charid, .@sender$, .@title$, .@body$, .reward_zeny;
    
    			if (PACKETVER < 20150513 && !getd(".@str_"+.@cid[.@j]) && .@online) {
    				setd ".@str_"+.@cid[.@j],1;
    				message rid2name(.@aid[.@j]),"You've got mail!";
    			}
    		}
    		else {
    			attachrid( .@aid[.@j], true );
    			.@name$ = strcharinfo( 0 );
    			for ( .@k = 0; .@k < .reward_id_size; .@k++ ) {
    				if (checkweight(.reward_id[.@k], .reward_amount[.@k]))
    					getitem .reward_id[.@k], .reward_amount[.@k];
    				else
    					dispbottom "You can't receive x" + .reward_amount[.@k] + " " + getitemname(.reward_id[.@k]) + " for defeating the World Boss because you're overweight.";
    			}
    			Zeny += .reward_zeny;
    			dispbottom "You have been rewarded for defeating the World Boss.";
    		}
    	}
    	return;
    }
    
    prontera,144,198,4	script	World Boss#wb_board	2_BOARD1,{
    	mes "[World Boss]";
    	if ($wordBossPop == 1) {
    		mes "Hurry up, " + strcharinfo(0) + ".";
    		mes "A World Boss threat has been raised, a few ago!";
    		mes "We need all fighters to join!";
    		if(select("Send me there","No way, I'm not going") == 1) {
    			next;
    			mes "[World Boss Area]";
    			mes "Right, get ready.";
    			set $wbFighters[getarraysize($wbFighters)], getcharid(3);
    			warp $lastPopMap$, 0, 0;
    		}
    		else {
    			next;
    			mes "[World Boss Area]";
    			mes "What are you? A coward?";
    			mes "You'll be blessed when we all be dead...";
    		}
    	}
    	else {
    		mes "I'm the one you should come to visit when a World Boss will appear.";
    		mes "And believe, it will.";
    		mes "Those monsters are regular, in some kind.";
    		mes "Al mortal, giant...And ridiculously strong...";
    	}
    	close;
    
    OnInit:
    OnTimer60000:
    OnEvent:
    	stopnpctimer;
    	initnpctimer;
    	delwaitingroom;
    	if ($wordBossPop) {
    		waitingroom "World Boss Alive",0;
    		end;
    	}
    	.@time = ($WorldBoss_cd - gettimetick(2));
    	if (.@time < 1) {
    		donpcevent "alawboss::OnStarted";
    		end;
    	}
    	.@remaining_d = .@time / 86400;
    	.@remaining_h = (.@time % 86400) / 3600;
    	.@remaining_m = (.@time % 3600) / 60;
    	.@remaining_s = .@time % 60;
    	if (.@remaining_d)
    		.@s$[.@i++] = .@remaining_d + " day" + (.@remaining_d>1?"s":"");
    	if (.@remaining_h)
    		.@s$[.@i++] = .@remaining_h + " hour" + (.@remaining_h>1?"s":"");
    	if (.@remaining_m)
    		.@s$[.@i++] = .@remaining_m + " minute" + (.@remaining_m>1?"s":"");
    	if (!.@remaining_d && !.@remaining_h && !.@remaining_m)
    		.@s$[.@i++] = .@remaining_s + " second" + (.@remaining_s>1?"s":"");
    	waitingroom implode(.@s$," "),0;
    	end;
    }

     

    • Like 1
  8. On 4/16/2025 at 2:35 AM, monyet said:

    help me to corection my script or modification for all map but every 1 hour reset npc a and b deferent item.

    I'm not sure this is what you asked. You can copy the NPC to put in another map, there are 3 examples. The item data is in the .items array.

    //===== rAthena Script =======================================
    //= Idea Economic Model
    //===== By: ==================================================
    //= monyet
    //============================================================
    
    // NPC: Abas Eden Group (NPC Penjual Item Konsumsi)
    morocc,172,86,5	script	Abas	56,{
    	mes "[Abas]";
    	mes "Berikut adalah harga pembelian kami saat ini:";
    	ShowSellItemList(strnpcinfo(0));
    	next;
    	ChooseSellItem(strnpcinfo(0));
    	close;
    
    OnInit:
    	//<Item ID>, <Minimum Price>, <Maximum Price>,
    	setarray .items,
    				12041,200,2500, //Fried Grasshopper Legs
    				12051,150,2550, //Steamed Crab Nippers
    				12056,200,2500, //Frog Egg Squid Ink Soup
    				12066,200,2500, //Fried Monkey Tails
    				12042,200,2500, //Seasoned Sticky Webfoot
    				12052,200,2500, //Assorted Seafood
    				12057,200,2500, //Smooth Noodle
    				12043,200,2500, //Bomber Steak
    				12053,200,2500, //Clam Soup
    				12058,200,2500, //Tentacle Cheese Gratin
    				12068,200,2500, //Fried Sweet Potato
    				12054,200,2500, //Seasoned Jellyfish
    				12059,200,2500, //Lutie Cold Noodle
    				12069,200,2500, //Steamed Ancient Lips
    				12070,200,2500; //Fried Scorpion Tails
    
    	bindatcmd "resetpricesmorocc",strnpcinfo(3) + "::OnReset",99,99;
    	.size = getarraysize(.items);
    	donpcevent strnpcinfo(0)+"::OnReset";
    	end;
    
    OnTimer3600000:
    OnReset:
    	stopnpctimer();
    	.@npc = getnpcid(0);
    	for ( .@i = 0; .@i < .size; .@i += 3 ) {
    		setd "$@" + .@npc + "last" + .items[.@i], getd("$@" + .@npc + "_" + .items[.@i]);
    		setd "$@" + .@npc + "_" + .items[.@i], rand(.items[.@i+1], .items[.@i+2]);
    	}
    	initnpctimer();
    	announce "Pedagang Grup Eden Morocc: Harga telah diperbarui! Silakan cek barang yang ingin dijual.", bc_all;
    	end;
    }
    
    // NPC: Abas Veins (NPC Penjual Item ratna)
    morocc,172,90,3	script	Abas#veins	1_M_SIGNMCNT,{
    	mes "[Abas]";
    	mes "Saya akan membeli batu langka apa pun yang Anda temukan saat menambang.";
    	if (getgroupid() >= 99) mes " ", "^808080@resetpricesveins^000000 untuk memaksa pengaturan ulang.";
    	next;
    	switch(select("Pembelian harga saat", "Penjual")) {
    		case 1:
    			mes "[Abas]";
    			mes "Berikut adalah harga pembelian kami saat ini:";
    			ShowSellItemList(strnpcinfo(0));
    			break;
    		case 2:
    			ChooseSellItem(strnpcinfo(0));
    			break;
    	}
    	close;
    
    OnInit:
    	//<Item ID>, <Minimum Price>, <Maximum Price>,
    	setarray .items,
    				718,3000,6000,		//Garnet
    				719,3000,6000,		//Amethyst
    				720,3000,6000,		//Aquamarine
    				721,2500,4500,		//Emerald
    				722,3000,6000,		//Pearl
    				723,2500,4500,		//Ruby
    				725,3000,6000,		//Sardonyx
    				726,2500,4500,		//Sapphire
    				727,3000,6000,		//Opal
    				728,2500,4500,		//Topaz
    				729,2500,4500,		//Zircon
    				969,2000,3500,		//Gold
    				714,10000,20000;	//Emperium
    
    	bindatcmd "resetpricesveins",strnpcinfo(3) + "::OnReset",99,99;
    	.size = getarraysize(.items);
    	donpcevent strnpcinfo(0)+"::OnReset";
    	end;
    
    OnMinute20:
    OnReset:
    	stopnpctimer();
    	.@npc = getnpcid(0);
    	for ( .@i = 0; .@i < .size; .@i += 3 ) {
    		setd "$@" + .@npc + "last" + .items[.@i], getd("$@" + .@npc + "_" + .items[.@i]);
    		setd "$@" + .@npc + "_" + .items[.@i], rand(.items[.@i+1], .items[.@i+2]);
    	}
    	initnpctimer();
    	announce "Pedagang Veins: Harga telah diperbarui! Silakan cek barang yang ingin dijual.", bc_all;
    	end;
    }
    
    // NPC: Abas Rachel (NPC Penjual Item)
    morocc,170,89,3	script	Abas#rachel	935,{
    	mes "[Abas]";
    	mes "Kuil tersebut mencari artefak terkutuk untuk pemurnian nanti.";
    	if (getgroupid() >= 99) mes " ", "^808080@resetpricesrachel^000000 untuk memaksa pengaturan ulang.";
    	next;
    	switch(select("Pembelian harga saat", "Penjual")) {
    		case 1:
    			mes "[Abas]";
    			mes "Berikut adalah harga pembelian kami saat ini:";
    			ShowSellItemList(strnpcinfo(0));
    			break;
    		case 2:
    			ChooseSellItem(strnpcinfo(0));
    			break;
    	}
    	close;
    
    OnInit:
    	//<Item ID>, <Minimum Price>, <Maximum Price>,
    	setarray .items,
    				1761,50,200,		//Cursed Arrow
    				724,200,600,		//Cursed Ruby
    				6004,8000,10000,	//Cursed Baphomet Doll
    				12020,1000,2000,	//Cursed Water
    				2728,50000,60000;	//Cursed Hand
    
    	bindatcmd "resetpricesrachel",strnpcinfo(3) + "::OnReset",99,99;
    	.size = getarraysize(.items);
    	donpcevent strnpcinfo(0)+"::OnReset";
    	end;
    
    OnMinute40:
    OnReset:
    	stopnpctimer();
    	.@npc = getnpcid(0);
    	for ( .@i = 0; .@i < .size; .@i += 3 ) {
    		setd "$@" + .@npc + "last" + .items[.@i], getd("$@" + .@npc + "_" + .items[.@i]);
    		setd "$@" + .@npc + "_" + .items[.@i], rand(.items[.@i+1], .items[.@i+2]);
    	}
    	initnpctimer();
    	announce "Pedagang Kuil Rachel: Harga telah diperbarui! Silakan cek barang yang ingin dijual.", bc_all;
    	end;
    }
    
    // NPC: Abas Hugel (NPC Penjual Item)
    morocc,176,90,3	script	Abas#hugel	4_M_HUOLDARMY,{
    	mes "[Abas]";
    	mes "Halo! Saya membeli barang-barang lokal untuk mendukung pertanian di Hugel.";
    	if (getgroupid() >= 99) mes " ", "^808080@resetpriceshugel^000000 untuk memaksa pengaturan ulang.";
    	next;
    	switch(select("Pembelian harga saat", "Penjual")) {
    		case 1:
    			mes "[Abas]";
    			mes "Berikut adalah harga pembelian kami saat ini:";
    			ShowSellItemList(strnpcinfo(0));
    			break;
    		case 2:
    			ChooseSellItem(strnpcinfo(0));
    			break;
    	}
    	close;
    
    OnInit:
    	//<Item ID>, <Minimum Price>, <Maximum Price>,
    	setarray .items,
    				519,50,100,  //Milk
    				574,50,100,  //Egg
    				518,100,200,  //Honey
    				577,100,200,  //Grain
    				1026,100,200, //Acorn
    				581,100,200,  //Edible Mushroom
    				515,100,200,  //Carrot
    				516,100,200,  //Sweet Potato
    				535,100,200,  //Pumpkin
    				517,150,300,  //Meat
    				919,80,100;  //Animal Skin
    
    	bindatcmd "resetpriceshugel",strnpcinfo(3) + "::OnReset",99,99;
    	.size = getarraysize(.items);
    	donpcevent strnpcinfo(0)+"::OnReset";
    	end;
    
    OnMinute00:
    OnReset:
    	stopnpctimer();
    	.@npc = getnpcid(0);
    	for ( .@i = 0; .@i < .size; .@i += 3 ) {
    		setd "$@" + .@npc + "last" + .items[.@i], getd("$@" + .@npc + "_" + .items[.@i]);
    		setd "$@" + .@npc + "_" + .items[.@i], rand(.items[.@i+1], .items[.@i+2]);
    	}
    	initnpctimer();
    	announce "Pedagang Hugel: Harga telah diperbarui! Silakan cek barang yang ingin dijual.", bc_all;
    	end;
    }
    
    // Function ShowSellItemList - Tampilkan daftar barang yang dijual
    function	script	ShowSellItemList	{
    	.@npc = getnpcid(0, getarg(0));
    	.@size = getvariableofnpc( .size, getarg(0));
    	copyarray .@items[0], getvariableofnpc( .items[0], getarg(0)), .@size;
    	for ( .@i = 0; .@i < .@size; .@i += 3 ) {
    		.@item_id = .@items[.@i];
    		.@old_price = getd("$@" + .@npc + "last" + .@items[.@i]);
    		.@price = getd("$@" + .@npc + "_" + .@items[.@i]);
    		if (.@price > .@old_price && .@old_price)
    			setarray .@c$,"^008000","/\\";
    		else if (.@price < .@old_price)
    			setarray .@c$,"^FF0000","\\/";
    		mes mesitemlink(.@item_id, false) + ": " + .@c$[0] + F_InsertComma(.@price) + " Z " + .@c$[1] + "^000000";
    	}
    	return;
    }
    
    // Function ChooseSellItem - periksa inventaris untuk barang yang akan dijual
    function	script	ChooseSellItem	{
    	disable_items;
    	.@npc = getnpcid(0, getarg(0));
    	explode(.@npcname$, getarg(0), "#");
    	.@size = getvariableofnpc( .size, getarg(0));
    	copyarray .@items[0], getvariableofnpc( .items[0], getarg(0)), .@size;
    
    	for (.@i = 0; .@i < .@size; .@i+=3) {
    		if (countitem(.@items[.@i]) > 0) {
    			.@menu$ += "^0000FF" + getitemname(.@items[.@i]) + "^000000:";
    			.@menuindex[.@count++] = .@i;
    		}
    	}
    	if (.@count == 0) {
    		mes "[" + .@npcname$[0] + "]";
    		mes "Anda tidak memiliki salah satu item yang diterima.";
    		mes "Kembali lagi ketika Anda memiliki sesuatu untuk dijual.";
    		close;
    	}
    	mes "[" + .@npcname$[0] + "]";
    	mes "Apa yang ingin kamu jual?";
    	mes "Silakan pilih item yang ingin kamu jual.";
    	.@selected = .@menuindex[select(.@menu$ + "Tidak Jadi") - 1];
    	clear;
    	if (.@selected < .@count) {
    		mes "[" + .@npcname$[0] + "]";
    		mes "Baik, mungkin lain kali.";
    		close;
    	}
    	callfunc "SellItem", .@items[.@selected], getd("$@" + .@npc + "_" + .@items[.@selected]), getitemname(.@items[.@selected]);
    	return;
    }
    
    // Function SellItem — penanganan jual item
    function	script	SellItem	{
    	.@item_id = getarg(0);
    	.@price = getarg(1);
    	.@item_name$ = getarg(2);
    
    	if (countitem(.@item_id) < 1) {
    		mes "Maaf, sepertinya kamu tidak memiliki "+.@item_name$+"!";
    		close;
    	}
    
    	mes "Berapa banyak "+.@item_name$+" yang ingin kamu jual?";
    	input .@amount;
    
    	if (.@amount <= 0 || .@amount > countitem(.@item_id)) {
    		mes "Mohon masukkan jumlah yang valid!";
    		close;
    	}
    
    	.@total_price = .@amount * .@price;
    	mes "Kamu akan mendapatkan "+.@total_price+" Zeny untuk "+.@amount+" "+.@item_name$+".";
    	if (select("Jual:Batalkan") == 1) {
    		delitem .@item_id, .@amount;
    		set Zeny, Zeny + .@total_price;
    		mes "Terima kasih telah menjual "+.@amount+" "+.@item_name$+" seharga "+.@total_price+" Zeny!";
    	} else {
    		mes "Baik, mungkin lain kali.";
    	}
    	close;
    }

     

    • Love 1
  9. Hi. Find:

    OnTimer10800000:

    And replace:

    OnTimer9000000: //trigger on the minimum time (2.5 hours)
    	sleep rand(1800000); //Waits randomly until the max time (3 hours)

     

    Find:

    monster "prontera",98,186,"Gluttonous Plant",1750,1,"AntHellInvasion::OnInvasionAntHellPlant";

    And add below it:

    setunitdata($@mobid[0], UMOB_DMGIMMUNE, 1); //make Plant not killable

     

    • Love 1
  10. Hello

    //===== rAthena Script ===========================================|
    //= Mr.Secrets DressRoom - Custom Request
    //= 1.5 Added 4th job sprites and item requirements [Racaae]
    //= https://rathena.org/board/topic/144504-mrsecrets-dressroom-custom-request
    
    morocc,167,95,4	script	Dress Room#sc	2_M_DYEINGER,{
    function RestrictClass;
    function HasjROCostume;
    function ChangeAppr;
    
    function RestrictClass {
    	.@eaj = eaclass();
    	if(.@eaj&EAJ_BASEMASK == EAJ_NOVICE) return 0;
    	if(.@eaj&EAJL_2 && roclass(.@eaj|EAJL_UPPER) != -1){
    		return 1;
    	}
    	return 0;
    }
    
    function HasjROCostume {
    	switch(roclass(eaclass()&EAJ_THIRDMASK|EAJL_THIRD)) {
    		case Job_Guillotine_Cross:
    		case Job_Genetic:
    		case Job_Royal_Guard:
    		case Job_Arch_Bishop:
    		case Job_Mechanic:
    		case Job_Ranger:
    		case Job_Minstrel:
    		case Job_Wanderer:
    		case Job_Warlock:
    		// Uncomment lines below to enable certain job when their respective jRO costume is released and you patched the sprite in your client.
    		//case Job_Sorcerer:
    		//case Job_Sura:
    		//case Job_Rune_Knight:
    			return 1;
    		default:
    			return 0;
    	}
    }
    
    function ChangeAppr {
    	mes .n$;
    	if (Zeny < .cost_dressroom) {
    		mes "You don't have enough Zeny.";
    		.@missingzeny = true;
    	}
    	.@size = getarraysize(.cost_item);
    	if (.@size > 1) {
    		for ( .@i = 0; .@i < .@size; .@i += 2 ) {
    			if (countitem(.cost_item[.@i]) < .cost_item[.@i+1]) {
    				if (!.@missingitem) {
    					mes "You didn't bring what I need. You're missing:";
    					.@missingitem = true;
    				}
    				mes .cost_item[.@i+1] + "x " + mesitemlink(.cost_item[.@i]);				
    			}
    		}	
    	}
    	if (.@missingzeny || .@missingitem)
    		close;
    
    	switch(getarg(1)){
    		case 0: // Normal Mode
    			setlook LOOK_BODY2,0;
    			changebase getarg(0);
    			set baselook, getarg(0);
    			break;
    		case 1: // jRO Mode
    			if(!HasjROCostume()) return;
    			changebase roclass(eaclass()&EAJ_THIRDMASK|EAJL_THIRD);
    			setlook LOOK_CLOTHES_COLOR,0;
    			setlook LOOK_BODY2,!(getlook(LOOK_BODY2));
    			//atcommand "@bodystyle " + !(getlook(LOOK_BODY2));
    			baselook = 0;
    			break;
    	}
    	Zeny -= .cost_dressroom;
    	.@size = getarraysize(.cost_item);
    	if (.@size > 1) {
    		for ( .@i = 0; .@i < .@size; .@i += 2 )
    			delitem .cost_item[.@i], .cost_item[.@i+1];
    	}
    	mes "Here you are!";
    	close;
    }
    
    	.@TYPE_CHANGEBASE = 0;
    	.@TYPE_SETLOOK = 1;
    	
    	mes .n$;
    	if (!RestrictClass()){
    		mes "Your class isn't allowed to use my services.";
    		close;
    	}
    	mes "I can change your appearance to another class of your classline!";
    	if (HasjROCostume()){
    		mes "I also have a brand new costume for your class!";
    	}
    	next;
    	mes .n$;
    	if (.cost_dressroom)
    		mes "At a cost of ^FF0000" + F_InsertComma(.cost_dressroom) + "^000000z";
    	
    	//displaying needed item list
    	.@size = getarraysize(.cost_item);
    	if (.@size > 1) {
    		for ( .@i = 0; .@i < .@size; .@i += 2 )
    			mes (.@i+3>.@size?"And ":"") + .cost_item[.@i+1] + "x " + mesitemlink(.cost_item[.@i]);
    	}
    
    	mes "Which class do you want to change your appearance to?";
    	next;
    	.@option[0] = roclass(eaclass()&EAJ_UPPERMASK);
    	.@option[1] = roclass(eaclass()&EAJ_UPPERMASK|EAJL_UPPER);
    	.@option[2] = roclass(eaclass()&EAJ_THIRDMASK|EAJL_THIRD);
    	if (.4th) {
    		.@job = roclass(eaclass()&EAJ_THIRDMASK|EAJL_THIRD);
    		.@option[4] = roclass(eaclass(.@job)|EAJL_FOURTH|EAJL_UPPER);
    	}
    
    	for(.@i = 0; .@i < (.4th?5:4); .@i++) {
    		if (!.@option[.@i] && HasjROCostume() && !getlook(LOOK_BODY2) && .@option[.@i] != baselook)
    			.@menu$ += "New jRO " + jobname(.@option[2]) + " costume";
    		else if (.@option[.@i] > 0 && .@option[.@i] != baselook) {
    			if (roclass(eaclass()) == .@option[.@i])
    				.@menu$ += "Restore " + jobname(.@option[.@i]) + " costume";
    			else
    				.@menu$ += jobname(.@option[.@i]);
    		}
    		.@menu$ += ":";
    	}
    	if(select(.@menu$)-1 == 3) { //jRO costume
    		ChangeAppr(0,.@TYPE_SETLOOK);
    	}
    	ChangeAppr(.@option[@menu-1],.@TYPE_CHANGEBASE);
    	end;
    
    OnPCLoginEvent:
    	if(baselook && .dress_perma){
    		changebase baselook;
    	}
    	end;
    
    OnInit:
    	.n$ = "[Dress Room]"; // NPC Name
    	.dress_perma = 1; //Changes are saved when player logout (1=Yes / 0=No)
    	.4th = true;    //Enable changing to 4th job sprite (True / False)
    	.cost_dressroom = 10000; 	// Zeny Cost
    	setarray .cost_item,6959,1,982,3,983,2;	// Item cost - item ID,Amount,item ID,Amount...
    	
    	end;
    }

     

  11. Hi. Add this in \db\import\item_db.yml

      - Id: 512
        Trade:
          NoDrop: true

    In this example, Apple (ID 512) cannot be dropped.
    Change the ID to your item's.

    PTBR:

    Spoiler

    Boa noite, tem a seção Portuguese Support > Suporte Geral.
    Coloque isso em \db\import\item_db.yml

      - Id: 512
        Trade:
          NoDrop: true

    Nesse exemplo, Maça (ID 512) não vai poder ser dropada no chão.
    Mude para a ID do seu item.

     

  12. 32 minutes ago, Takun said:

    Hello @Racaae,

    I'm not that good with scripting, how can i fix this?

     

        parse_line: expect command, missing function name or calling undeclared function
        66 :                if (!.@HasOnlyOneEnchant) {
        67 :                        mes "Which effect to transfer?";
        68 :                        if (.@mode) {
        69 :                                for(.@i=0; .@i < 5; .@i++) {
        70 :                                        if (.@r_id[.@i])
    *   71 :                                                .@slot_menu$ += F_RDMOPT_Name('.'@r_id[.@i],.@r_v[.@i]);
        72 :                                        .@slot_menu$ += ":";
        73 :                                }
        74 :                        }
        75 :                        else {
        76 :                                for(.@i=0; .@i < 4; .@i++) {

     

    Hi. Put the following function above the NPC:
     

    //////////////////////////////////////////////////////////////////////////////////
    // Returns Random Option name and value
    // -- callfunc "F_RDMOPT_Name",<ROA_ID>{,<Value>{,<2nd value>}};
    //////////////////////////////////////////////////////////////////////////////////
    function	script	F_RDMOPT_Name	{
    	if (getargcount() > 2)
    		.@s$ = getarg(1) + "~" + getarg(2);
    	else if (getargcount() > 1)
    		.@s$ = getarg(1);
    	else
    		.@s$ = "?";
    
    	if (#langtype = 8) {
    		//POR
    		switch(getarg(0)){
    			case 3: return "FOR +" + .@s$;
    			case 6: return "INT +" + .@s$;
    			case 7: return "DES +" + .@s$;
    			case 8: return "SOR +" + .@s$;
    			case 232: return "EXP ganha de Amorfos +" + .@s$ + "%";
    			case 233: return "EXP ganha de Morto-Vivos +" + .@s$ + "%";
    			case 234: return "EXP ganha de Brutos +" + .@s$ + "%";
    			case 235: return "EXP ganha de Plantas +" + .@s$ + "%";
    			case 236: return "EXP ganha de Insetos +" + .@s$ + "%";
    			case 237: return "EXP ganha de Peixes +" + .@s$ + "%";
    			case 238: return "EXP ganha de Demônios +" + .@s$ + "%";
    			case 239: return "EXP ganha de Humanoides +" + .@s$ + "%";
    			case 240: return "EXP ganha de Anjos +" + .@s$ + "%";
    			case 241: return "EXP ganha de Dragões +" + .@s$ + "%";
    			case 242: return "EXP ganha de todas raças +" + .@s$ + "%";
    		}
    	}
    	switch(getarg(0)){
    		case 1: return "MaxHP +" + .@s$;
    		case 2: return "MaxSP +" + .@s$;
    		case 3: return "STR +" + .@s$;
    		case 4: return "AGI +" + .@s$;
    		case 5: return "VIT +" + .@s$;
    		case 6: return "INT +" + .@s$;
    		case 7: return "DEX +" + .@s$;
    		case 8: return "LUK +" + .@s$;
    		case 9: return "MaxHP +" + .@s$ + "%";
    		case 10: return "MaxSP +" + .@s$ + "%";
    		case 11: return "HP regen +" + .@s$ + "%";
    		case 12: return "SP regen +" + .@s$ + "%";
    		case 13: return "ATK +" + .@s$ + "%";
    		case 14: return "MATK +" + .@s$ + "%";
    		case 15: return "ASPD +" + .@s$;
    		case 16: return "Delay after attack -" + .@s$ + "%";
    		case 17: return "ATK +" + .@s$;
    		case 18: return "HIT +" + .@s$;
    		case 19: return "MATK +" + .@s$;
    		case 20: return "DEF +" + .@s$;
    		case 21: return "MDEF +" + .@s$;
    		case 22: return "FLEE +" + .@s$;
    		case 23: return "Perfect dodge +" + .@s$;
    		case 24: return "CRIT +" + .@s$;
    		case 25: return "Neutral elemental resistance +" + .@s$ + "%";
    		case 26: return "Water elemental resistance +" + .@s$ + "%";
    		case 27: return "Earth elemental resistance +" + .@s$ + "%";
    		case 28: return "Fire elemental resistance +" + .@s$ + "%";
    		case 29: return "Wind elemental resistance +" + .@s$ + "%";
    		case 30: return "Poison elemental resistance +" + .@s$ + "%";
    		case 31: return "Holy elemental resistance +" + .@s$ + "%";
    		case 32: return "Shadow elemental resistance +" + .@s$ + "%";
    		case 33: return "Ghost elemental resistance +" + .@s$ + "%";
    		case 34: return "Undead elemental resistance +" + .@s$ + "%";
    		case 35: return "All elemental (except Neutral) resistance +" + .@s$ + "%";
    		case 36: return "Neutral monster resistance +" + .@s$ + "%";
    		case 37: return "ATK +" + .@s$ + "% against Neutral monster";
    		case 38: return "Water monster resistance +" + .@s$ + "%";
    		case 39: return "ATK +" + .@s$ + "% against Water monster";
    		case 40: return "Earth monster resistance +" + .@s$ + "%";
    		case 41: return "ATK +" + .@s$ + "% against Earth monster";
    		case 42: return "Fire monster resistance +" + .@s$ + "%";
    		case 43: return "ATK +" + .@s$ + "% against Fire monster";
    		case 44: return "Wind monster resistance +" + .@s$ + "%";
    		case 45: return "ATK +" + .@s$ + "% against Wind monster";
    		case 46: return "Poison monster resistance +" + .@s$ + "%";
    		case 47: return "ATK +" + .@s$ + "% against Poison monster";
    		case 48: return "Holy monster resistance +" + .@s$ + "%";
    		case 49: return "ATK +" + .@s$ + "% against Holy monster";
    		case 50: return "Shadow monster resistance +" + .@s$ + "%";
    		case 51: return "ATK +" + .@s$ + "% against Shadow monster";
    		case 52: return "Ghost monster resistance +" + .@s$ + "%";
    		case 53: return "ATK +" + .@s$ + "% against Ghost monster";
    		case 54: return "Undead monster resistance +" + .@s$ + "%";
    		case 55: return "ATK +" + .@s$ + "% against Undead monster";
    		case 56: return "Neutral monster magic resistance +" + .@s$ + "%";
    		case 57: return "MATK +" + .@s$ + "% against Neutral monster";
    		case 58: return "Water monster magic resistance +" + .@s$ + "%";
    		case 59: return "MATK +" + .@s$ + "% against Water monster";
    		case 60: return "Earth monster magic resistance +" + .@s$ + "%";
    		case 61: return "MATK +" + .@s$ + "% against  Earth monster";
    		case 62: return "Fire monster magic resistance +" + .@s$ + "%";
    		case 63: return "MATK +" + .@s$ + "% against Fire monster";
    		case 64: return "Wind monster magic resistance +" + .@s$ + "%";
    		case 65: return "MATK +" + .@s$ + "% against Wind monster";
    		case 66: return "Poison monster magic resistance +" + .@s$ + "%";
    		case 67: return "MATK +" + .@s$ + "% against Poison monster";
    		case 68: return "Holy monster magic resistance +" + .@s$ + "%";
    		case 69: return "MATK +" + .@s$ + "% against Holy monster";
    		case 70: return "Shadow monster magic resistance +" + .@s$ + "%";
    		case 71: return "MATK +" + .@s$ + "% against Shadow monster";
    		case 72: return "Ghost monster magic resistance +" + .@s$ + "%";
    		case 73: return "MATK +" + .@s$ + "% against Ghost monster";
    		case 74: return "Undead monster magic resistance +" + .@s$ + "%";
    		case 75: return "MATK +" + .@s$ + "% against Undead monster";
    		case 76: return "Armor element Neutral";
    		case 77: return "Armor element Water";
    		case 78: return "Armor element Earth";
    		case 79: return "Armor element Fire";
    		case 80: return "Armor element Wind";
    		case 81: return "Armor element Poison";
    		case 82: return "Armor element Holy";
    		case 83: return "Armor element Shadow";
    		case 84: return "Armor element Ghost";
    		case 85: return "Armor element Undead";
    		case 87: return "Formless monster resistance +" + .@s$ + "%";
    		case 88: return "Undead monster resistance +" + .@s$ + "%";
    		case 89: return "Brute monster resistance +" + .@s$ + "%";
    		case 90: return "Plant monster resistance +" + .@s$ + "%";
    		case 91: return "Insect monster resistance +" + .@s$ + "%";
    		case 92: return "Fish monster resistance +" + .@s$ + "%";
    		case 93: return "Demon monster resistance +" + .@s$ + "%";
    		case 94: return "Demihuman monster resistance +" + .@s$ + "%";
    		case 95: return "Angel monster resistance +" + .@s$ + "%";
    		case 96: return "Dragon monster resistance +" + .@s$ + "%";
    		case 97: return "ATK +" + .@s$ + "% against Formless monster";
    		case 98: return "ATK +" + .@s$ + "% against Undead monster";
    		case 99: return "ATK +" + .@s$ + "% against Brute monster";
    		case 100: return "ATK +" + .@s$ + "% against Plant monster";
    		case 101: return "ATK +" + .@s$ + "% against Insect monster";
    		case 102: return "ATK +" + .@s$ + "% against Fish monster";
    		case 103: return "ATK +" + .@s$ + "% against Demon monster";
    		case 104: return "ATK +" + .@s$ + "% against Demihuman monster";
    		case 105: return "ATK +" + .@s$ + "% against Angel monster";
    		case 106: return "ATK +" + .@s$ + "% against Dragon monster";
    		case 107: return "MATK +" + .@s$ + "% against Formless monster";
    		case 108: return "MATK +" + .@s$ + "% against Undead monster";
    		case 109: return "MATK +" + .@s$ + "% against Brute monster";
    		case 110: return "MATK +" + .@s$ + "% against Plant monster";
    		case 111: return "MATK +" + .@s$ + "% against Insect monster";
    		case 112: return "MATK +" + .@s$ + "% against Fish monster";
    		case 113: return "MATK +" + .@s$ + "% against Devil monster";
    		case 114: return "MATK +" + .@s$ + "% against Demihuman monster";
    		case 115: return "MATK +" + .@s$ + "% against Angel monster";
    		case 116: return "MATK +" + .@s$ + "% against Dragon monster";
    		case 117: return "CRIT +" + .@s$ + " against Formless monster";
    		case 118: return "CRIT +" + .@s$ + " against Undead monster";
    		case 119: return "CRIT +" + .@s$ + " against Brute monster";
    		case 120: return "CRIT +" + .@s$ + " against Plant monster";
    		case 121: return "CRIT +" + .@s$ + " against Insect monster";
    		case 122: return "CRIT +" + .@s$ + " against Fish monster";
    		case 123: return "CRIT +" + .@s$ + " against Demon monster";
    		case 124: return "CRIT +" + .@s$ + " against Demihuman monster";
    		case 125: return "CRIT +" + .@s$ + " against Angel monster";
    		case 126: return "CRIT +" + .@s$ + " against Dragon monster";
    		case 127: return "Pierces " + .@s$ + "% DEF of Formless monster";
    		case 128: return "Pierces " + .@s$ + "% DEF of Undead monster";
    		case 129: return "Pierces " + .@s$ + "% DEF of Brute monster";
    		case 130: return "Pierces " + .@s$ + "% DEF of Plant monster";
    		case 131: return "Pierces " + .@s$ + "% DEF of Insect monster";
    		case 132: return "Pierces " + .@s$ + "% DEF of Fish monster";
    		case 133: return "Pierces " + .@s$ + "% DEF of Demon monster";
    		case 134: return "Pierces " + .@s$ + "% DEF of Demihuman monster";
    		case 135: return "Pierces " + .@s$ + "% DEF of Angel monster";
    		case 136: return "Pierces " + .@s$ + "% DEF of Dragon monster";
    		case 137: return "Pierces " + .@s$ + "% MDEF of Formless monster";
    		case 138: return "Pierces " + .@s$ + "% MDEF of Undead monster";
    		case 139: return "Pierces " + .@s$ + "% MDEF of Brute monster";
    		case 140: return "Pierces " + .@s$ + "% MDEF of Plant monster";
    		case 141: return "Pierces " + .@s$ + "% MDEF of Insect monster";
    		case 142: return "Pierces " + .@s$ + "% MDEF of Fish monster";
    		case 143: return "Pierces " + .@s$ + "% MDEF of Demon monster";
    		case 144: return "Pierces " + .@s$ + "% MDEF of Demihuman monster";
    		case 145: return "Pierces " + .@s$ + "% MDEF of Angel monster";
    		case 146: return "Pierces " + .@s$ + "% MDEF of Dragon monster";
    		case 147: return "ATK +" + .@s$ + "% against Normal monster";
    		case 148: return "ATK +" + .@s$ + "% against Boss monster";
    		case 149: return "Normal monster resistance +" + .@s$ + "%";
    		case 150: return "Boss monster resistance +" + .@s$ + "%";
    		case 151: return "MATK +" + .@s$ + "% against Normal monster";
    		case 152: return "MATK +" + .@s$ + "% against Boss monster";
    		case 153: return "Pierces " + .@s$ + "% DEF of Normal monster";
    		case 154: return "Pierces " + .@s$ + "% DEF of Boss monster";
    		case 155: return "Pierces " + .@s$ + "% MDEF of Normal monster";
    		case 156: return "Pierces " + .@s$ + "% MDEF of Boss monster";
    		case 157: return "ATK +" + .@s$ + "% against Small size monster";
    		case 158: return "ATK +" + .@s$ + "% against Medium size monster";
    		case 159: return "ATK +" + .@s$ + "% against Large size monster";
    		case 160: return "Small monster resistance +" + .@s$ + "%";
    		case 161: return "Medium monster resistance +" + .@s$ + "%";
    		case 162: return "Large monster resistance +" + .@s$ + "%";
    		case 163: return "Nullify weapon's DMG size penalty";
    		case 164: return "Critical attack +" + .@s$ + "%";
    		case 165: return "Critical DMG -" + .@s$ + "%";
    		case 166: return "Long range physical attack +" + .@s$ + "%";
    		case 167: return "Long range physical DMG -" + .@s$ + "%";
    		case 168: return "Healing skills +" + .@s$ + "%";
    		case 169: return "Restoration gained from Healing skills +" + .@s$ + "%";
    		case 170: return "Variable cast time -" + .@s$ + "%";
    		case 171: return "After cast delay -" + .@s$ + "%";
    		case 172: return "Reduces SP cost by " + .@s$ + "%";
    		case 175: return "Weapon element Neutral";
    		case 176: return "Weapon element Water";
    		case 177: return "Weapon element Earth";
    		case 178: return "Weapon element Fire";
    		case 179: return "Weapon element Wind";
    		case 180: return "Weapon element Poison";
    		case 181: return "Weapon element Holy";
    		case 182: return "Weapon element Shadow";
    		case 183: return "Weapon element Ghost";
    		case 184: return "Weapon element Undead";
    		case 185: return "Indestructible in battle";
    		case 186: return "Indestructible in battle";
    		case 187: return "MATK against Small size monster +" + .@s$ + "%";
    		case 188: return "MATK against Medium size monster +" + .@s$ + "%";
    		case 189: return "MATK against Large size monster +" + .@s$ + "%";
    		case 190: return "Small monster magic resistance +" + .@s$ + "%";
    		case 191: return "Medium monster magic resistance +" + .@s$ + "%";
    		case 192: return "Large monster magic resistance +" + .@s$ + "%";
    		case 193: return "Elemental attacks resistance +" + .@s$ + "%";
    		case 194: return "Formless monster resistance +" + .@s$ + "%";
    		case 195: return "Undead monster resistance +" + .@s$ + "%";
    		case 196: return "Brute monster resistance +" + .@s$ + "%";
    		case 197: return "Plant monster resistance +" + .@s$ + "%";
    		case 198: return "Insect monster resistance +" + .@s$ + "%";
    		case 199: return "Fish monster resistance +" + .@s$ + "%";
    		case 200: return "Demon monster resistance +" + .@s$ + "%";
    		case 201: return "Demihuman monster resistance +" + .@s$ + "%";
    		case 202: return "Angel monster resistance +" + .@s$ + "%";
    		case 203: return "Dragon monster resistance +" + .@s$ + "%";
    		case 206: return "Demi-Human players resistance + " + .@s$ + "%";
    		case 207: return "Doram players resistance +" + .@s$ + "%";
    		case 208: return "ATK against Demi-Human players +" + .@s$ + "%";
    		case 209: return "ATK against Doram players +" + .@s$ + "%";
    		case 210: return "MATK against Demi-Human players +" + .@s$ + "%";
    		case 211: return "MATK against Doram players +" + .@s$ + "%";
    		case 212: return "Critical +" + .@s$ + " for Demi-Human players";
    		case 213: return "Critical +" + .@s$ + " for Doram players";
    		case 214: return "Pierces " + .@s$ + "% DEF of Demi-Human players";
    		case 215: return "Pierces " + .@s$ + "% DEF of Doram players";
    		case 216: return "Pierces " + .@s$ + "% MDEF of Demi-Human players";
    		case 217: return "Pierces " + .@s$ + "% MDEF of Doram players";
    		case 218: return "Received reflected DMG -" + .@s$ + "%";
    		case 219: return "Melee physical DMG +" + .@s$ + "%";
    		case 220: return "Melee physical DMG -" + .@s$ + "%";
    		case 221: return "Neutral elemental magic skill DMG +" + .@s$ + "%";
    		case 222: return "Water elemental magic skill DMG +" + .@s$ + "%";
    		case 223: return "Earth elemental magic skill DMG +" + .@s$ + "%";
    		case 224: return "Fire elemental magic skill DMG +" + .@s$ + "%";
    		case 225: return "Wind elemental magic skill DMG +" + .@s$ + "%";
    		case 226: return "Poison elemental magic skill DMG +" + .@s$ + "%";
    		case 227: return "Holy elemental magic skill DMG +" + .@s$ + "%";
    		case 228: return "Shadow elemental magic skill DMG +" + .@s$ + "%";
    		case 229: return "Ghost elemental magic skill DMG +" + .@s$ + "%";
    		case 230: return "Undead elemental magic skill DMG +" + .@s$ + "%";
    		case 231: return "All elemental magic skill DMG +" + .@s$ + "%";
    		case 232: return "EXP gained from Formless race +" + .@s$ + "%";
    		case 233: return "EXP gained from Undead race +" + .@s$ + "%";
    		case 234: return "EXP gained from Brute race +" + .@s$ + "%";
    		case 235: return "EXP gained from Plant race +" + .@s$ + "%";
    		case 236: return "EXP gained from Insect race +" + .@s$ + "%";
    		case 237: return "EXP gained from Fish race +" + .@s$ + "%";
    		case 238: return "EXP gained from Demon race +" + .@s$ + "%";
    		case 239: return "EXP gained from Demi-Human race +" + .@s$ + "%";
    		case 240: return "EXP gained from Angel race +" + .@s$ + "%";
    		case 241: return "EXP gained from Dragon race +" + .@s$ + "%";
    		case 242: return "EXP gained from all races +" + .@s$ + "%";
    		case 243: return "POW + " + .@s$;
    		case 244: return "SPL + " + .@s$;
    		case 245: return "STA + " + .@s$;
    		case 246: return "WIS + " + .@s$;
    		case 247: return "CON + " + .@s$;
    		case 248: return "CRT + " + .@s$;
    		case 249: return "P.ATK + " + .@s$;
    		case 250: return "S.MATK + " + .@s$;
    		case 251: return "RES + " + .@s$;
    		case 252: return "MRES + " + .@s$;
    		case 253: return "H.PLUS + " + .@s$;
    		case 254: return "C.RATE + " + .@s$;
    		default: return "Unknow Random Option";
    	}
    }

     

  13. Hi. From \doc\script_commands.txt

    *healap <ap>{,<char_id>};
    
    This command will heal a set amount of AP on the invoking character.
    
    	healap 10;  // This will give 10 AP
    	healap -10; // This will remove 10 AP

    Example:

    prontera,161,167,3	script	HP and AP Healer	4_F_NURSE,{
    	specialeffect2 EF_HEAL2;
    	percentheal 100,100;
    	healap 200;
    	end;
    }

     

    • Love 1
  14. Hola, yo diría que rAthena es el emulador más actualizado. Pero gran parte del contenido actual toma tiempo para ingresar al emulador, la atención se centra en el contenido permanente, por lo que no creo que haya ningún plan para agregar eventos temporales como Booster Promotion.

    Los errores de sprite/bmp están relacionados con los archivos del juego (GRF, Data y System folder). Aquí hay un excelente proyecto de traducción al inglés: https://github.com/llchrisll/ROenglishRE.

    Esta es la antigua Biblioteca Prontera. Se renovaron y cambiaron mapas, junto con los NPC. Tu página de Quest no tiene sus coordenadas actualizadas. Puedes encontrar a Jerry en la nueva biblioteca: prt_elib,57,18.
    Y el archivo de este NPC está en /npc/re/quests/quests_16_2_illusion.txt
    Este mensaje fue generado usando Google Translate, perdón por los errores.

  15. 18 hours ago, zeusc137 said:

    Hi there!

    Any suggestion if I want to usekill "in front" of the npc current location?

    I wanted to use something like:
     

    OnTimer3000:
    
        npcskill STORM_GUST, 10, 130, <x,y positions?>;

    I don't think I have a way to make the NPC cast the skill without being attached to a player OnTouch event...

     

    Hi. Use OnInit and initnpctimer to trigger the NPC without attached player. Then use unitskillusepos to cast the skill anywhere.

    Example:

    prontera,155,114,4	script	StormGust Wizard	4_M_JOB_WIZARD,{
    	end;
    
    OnTimer3000:
    	unitskillusepos getnpcid(0),"WZ_STORMGUST", 10, .x, .y-7, -6;
    	stopnpctimer;
    	initnpctimer;
    	end;
    
    OnInit:
    	getmapxy(.map$, .x, .y, BL_NPC);
    	initnpctimer;
    	end;
    }

     

    *unitskillusepos <GID>,<skill id>,<skill lvl>,<x>,<y>{,<casttime>,<cancel>,<Line_ID>,<ignore_range>};

     

    • Love 1
  16. Hello. Find this line:

    if (select(" ~ Change into ^0055FF" + jobname(.@i) + "^000000 class: ~ ^777777" + ((getargcount() > 1) ? "Go back" : "Cancel") + "^000000") == 1) {

    And insert this code below it:

    	if (BaseJob == Job_Novice || BaseJob == Job_Summoner)
    		.@cost = 50000;
    	else
    		.@cost = 100000;
    	if (Zeny < .@cost) {
    		mes "[Job Master]";
    		mes "Sorry. You don't have enough zeny.";
    		mes "You need ^0000FF" + F_InsertComma(.@cost) + "z^000000 to job change.";
    		close;
    	}
    	Zeny -= .@cost;

     

    • Upvote 1
  17. Hello. Open file \db\import\skill_db.yml and insert the following:

    Body:
    
      - Id: 10013
        Name: GD_EMERGENCYCALL
        Cooldown: 300000
        FixedCastTime: 5000

    Change the value (miliseconds) in Cooldown and/or the Casttime to reduce the time waiting for the skill.

    300000 = 300 seconds = 5 minutes
    5000 = 5 seconds

  18. On 10/21/2024 at 11:25 PM, DEVS SCRIPTS said:

    THX, Admin  you can share all map of episode 17.1 and 17.2  ? 

    i have error miy Exe not read this mapa from data.grf . and when extract this not work. only ep 17.1 and ep 17.2 map, no sure this error is on data.ini orden. but my orden is this:

    [Data]
    1=hispanic.grf
    2=hispanicro2.grf
    3=hispanic2.grf
    4=palette.grf
    5=extras.grf
    6=costumes.grf
    7=palettes.grf
    8=newclasses.grf
    9=data.grf
    10=ep17maptur.grf
    11=ep17maps.grf
    12=maps17maison.grf

    In the end I extracted those maps from my data.grf separately and that didn't work either, thank you for the help.  @Racaae 😄 

    I believe some clients stop reading later entries in DATA.INI. For example: read from 0 to 9 normal, then ignore 10 11 and 12.

    maps 17_1 17_2.zip

  19. Hi. You can create a new restricted zone that blocks Warp Portal and use a loop to activate and deactivate it in every single map during your event.

     

    Add this in your \db\import\skill_nocast_db.txt

    //----------------------------------------------------------------------------
    // Zone 10 - Temporary (event only)
    //----------------------------------------------------------------------------
    27,16384    //disables skill id 27 AL_WARP (warp portal) on zone 10

    Save the file. Use @reloadskilldb or restart the server.

     

    Insert this in the NPC when the event starts:

    	freeloop(1);
    	for(.@i = 1; .@i < 1400; .@i++) {
    		.@map$ = mapid2name(.@i);
    		if (.@map$ != "") {
    			setmapflag .@map$, mf_restricted, 10;
    		}
    	}
    	freeloop(0);

    And insert this when the event ends:

    	freeloop(1);
    	for(.@i = 1; .@i < 1400; .@i++) {
    		.@map$ = mapid2name(.@i);
    		if (.@map$ != "") {
    			removemapflag .@map$, mf_restricted, 10;
    		}
    	}
    	freeloop(0);

    Save the file. Use @reloadscript/@reloadnpcfile or restart the server.

    • Upvote 1
×
×
  • Create New...