Jump to content
  • 0

MOTD for specific party members


Question

Posted

Hi ! Im using this MOTD script .. I just wanna ask how to also give atleast a portion of exp to party members when a player kills a monster ? Coz this script only give bonus exp to the mob killer.

OnNPCKillEvent:
	if(killedrid!=$MobTypeLow && killedrid!=$MobTypeMid && killedrid!=$MobTypeHard ) { end; }
	dispbottom "[Monster of the Day]: Experience Gained Base:"+strmobinfo(6,killedrid)+" Job:"+strmobinfo(7,killedrid)+"";
	set BaseExp,(BaseExp+strmobinfo(6,killedrid));
	set JobExp,(JobExp+strmobinfo(7,killedrid));
	end;

 

3 answers to this question

Recommended Posts

  • 0
Posted

Hi ! Im using Monster of the Day script .. I just want to ask how to attach a certain party member on OnNPCKillEvent script ?? I made it work but the problem is I have a party level gap of 15 .. I want to disable this to a certain member if he/she is below or above the said level gap ... 

 

//**********************************************************************************
// ____                    _                                            _   _  ____ 
//|  _ \ ___   ___   ____ | |  ___   ____   ___   ___   __  ___   _  _ | |_| |/ __ |
//| |__// _ \ / _ \ |  _ \| | / _ \ |  _ \ / _ \ /  _| / _)/ _ \ | \| ||___  |\__  |
//| |  |  __/ ||_|| | |__/| ||  __/ | |__/|  __/ | |  _\ \ ||_|| | \\ |    | |   | |
//|_|___\___|_\___/_| |___|_|_\___|_| |____\___|_|_|_(___/ \___/_|_|\_|____|_|___|_|
//------------------|_|-------------|_|---------------------------------------------
//**********************************************************************************
//===== rAthena Script =============================================================
//= Monster Of The Day
//===== By: ========================================================================
//= Peopleperson49 (Eddie) - [email protected]
//===== Start Date: ================================================================
//= 20NOV2011
//===== Current Version: ===========================================================
//= 1.4
//===== Compatible With: ===========================================================
//= rAthena SVN
//===== Description: ===============================================================
//= Another Monster Of The Day script. I made this one from scratch to be very
//=	simple and work automatically. Uses almost the full list of monsters from
//=	the mob_branch. I included the dispbottom here when players login, but I
//=	actually perfer to use a login script with this in it.
//===== Version Control: ===========================================================
//= 1.0 First Version.
//= 1.1	Broke .MobTypeArray[0] into ten seperate arrays to allow full list of mobs
//=	to be used without overflowing the array. Before I had to limit the number
//=	of mobs in an array to around 100 or I would randomly get an error from it.
//= 1.2	Modified script to not change mobs if scripts are reloaded. Will set mob if
//=	not already set on OnInit.
//= 1.3 Changed getexp to BaseExp.
//= 1.4 Added bindatcmd to allow GM to repick the MOTD.
//===== Additional Comments:========================================================
//= 
//==================================================================================
//-	script	MOTD#RoUG	-1,{
//end;
prontera,151,191,4	script	Monster of the Day	802 ,{
mes "[Monster Of The Day]";
mes "You will earn twice the EXP from killing the following monsters today!:";
mes "[^FF0000Low Difficulty^000000] "+getmonsterinfo($MobTypeLow,0)+"s [^0000ff"+$MobTypeLow+"^000000] ";
mes "[^FF0000Mid Difficulty^000000] "+getmonsterinfo($MobTypeMid,0)+"s [^0000ff"+$MobTypeMid+"^000000] ";
mes "[^FF0000Hard Difficulty^000000] "+getmonsterinfo($MobTypeHard,0)+"s [^0000ff"+$MobTypeHard+"^000000] ";
end;
OnInit:
bindatcmd "motd",strnpcinfo(0)+"::OnCheck";
bindatcmd("repickmotd",strnpcinfo(3)+"::OnAtcommand");
if($MobType!=0) { end; }
OnClock0000:
setarray .MobTypeArrayLow[0],1033, //Elder Willow
							1060, //Bigfoot
							1294, //Mantis
							1013, //Wolves
							1054, //Male Theif bug
							1018, //Creamy
							1111, //Drainliar
							1015, //Zombie
							1068, //Hydra
							1057, //Yoyo
							1019, //Pecopeco
							1170, //Sohee
							1007, //Fabre
							1113, //Drops
							1055, //Muka
							1026, //Munak
							1128; //Horn

setarray .MobTypeArrayMid[0],1035, //Hunter Fly
							 1278, //Stalactic Golem
							 1061, //Nightmare
							 1001, //Scorpion
							 1243, //Sasquatch
							 1099, //Argiope
							 1158, //Phen
							 1032, //Verit
							 1029, //Isis
							 1069, //Swordfish
							 1149, //Minorous
							 1178, //Zerom
							 1044, //Obeanue
							 1034, //Thara Frog
							 1045, //Marc
							 1152, //Skeletal Orc
							 1213; //High Orc

setarray .MobTypeArrayHard[0],1098, //Anubis
							  1379, //Nightmare Terror	
							  1777, //Ice Golem
							  1163, //Raydric
							  1783, //Galion
							  1365, //Apocalypse
							  1206, //Anolian
							  1310, //Majorurous
							  1320, //Owl Duke
							  1682, //Remover
							  1762, //Frus
							  1752, //Skogul
							  1714, //Ferus
							  1713, //Acidus
							  1315, //Assaulter
							  1319, //Freezer
							  1148, //Medusa
							  1676, //Venatu
							  1677, //Venatu
							  1678, //Venatu
							  1679; //Venatu

set $MobTypeLow,.MobTypeArrayLow[rand(0,16)];
set $MobTypeMid,.MobTypeArrayMid[rand(0,16)];
set $MobTypeHard,.MobTypeArrayHard[rand(0,20)];
announce "[Monster of the Day]: Players will earn twice the EXP from hunting "+getmonsterinfo($MobTypeLow,0)+"s ["+$MobTypeLow+"], "+getmonsterinfo($MobTypeMid,0)+"s ["+$MobTypeMid+"] and "+getmonsterinfo($MobTypeHard,0)+"s ["+$MobTypeHard+"] today!",0;
end;

OnNPCKillEvent:
	if(killedrid!=$MobTypeLow && killedrid!=$MobTypeMid && killedrid!=$MobTypeHard ) { end; }
	.mobid = killedrid;
	addrid(2,0,getcharid(1));
	dispbottom "[Monster of the Day]: Experience Gained Base:"+strmobinfo(6,.mobid)+" Job:"+strmobinfo(7,.mobid)+"";
	set BaseExp,(BaseExp+strmobinfo(6,.mobid));
	set JobExp,(JobExp+strmobinfo(7,.mobid));
	end;

OnAtcommand:
setarray .MobTypeArrayLow[0],1033, //Elder Willow
							1060, //Bigfoot
							1294, //Mantis
							1013, //Wolves
							1054, //Male Theif bug
							1018, //Creamy
							1111, //Drainliar
							1015, //Zombie
							1068, //Hydra
							1057, //Yoyo
							1019, //Pecopeco
							1170, //Sohee
							1007, //Fabre
							1113, //Drops
							1055, //Muka
							1026, //Munak
							1128; //Horn

setarray .MobTypeArrayMid[0],1035, //Hunter Fly
							 1278, //Stalactic Golem
							 1061, //Nightmare
							 1001, //Scorpion
							 1243, //Sasquatch
							 1099, //Argiope
							 1158, //Phen
							 1032, //Verit
							 1029, //Isis
							 1069, //Swordfish
							 1149, //Minorous
							 1178, //Zerom
							 1044, //Obeanue
							 1034, //Thara Frog
							 1045, //Marc
							 1152, //Skeletal Orc
							 1213; //High Orc

setarray .MobTypeArrayHard[0],1098, //Anubis
							  1379, //Nightmare Terror	
							  1777, //Ice Golem
							  1163, //Raydric
							  1783, //Galion
							  1365, //Apocalypse
							  1206, //Anolian
							  1310, //Majorurous
							  1320, //Owl Duke
							  1682, //Remover
							  1762, //Frus
							  1752, //Skogul
							  1714, //Ferus
							  1713, //Acidus
							  1315, //Assaulter
							  1319, //Freezer
							  1148, //Medusa
							  1676, //Venatu
							  1677, //Venatu
							  1678, //Venatu
							  1679; //Venatu

set $MobTypeLow,.MobTypeArrayLow[rand(0,16)];
set $MobTypeMid,.MobTypeArrayMid[rand(0,16)];
set $MobTypeHard,.MobTypeArrayHard[rand(0,20)];
announce "[Monster of the Day]: Players will earn twice the EXP from hunting "+getmonsterinfo($MobTypeLow,0)+"s ["+$MobTypeLow+"], "+getmonsterinfo($MobTypeMid,0)+"s ["+$MobTypeMid+"] and "+getmonsterinfo($MobTypeHard,0)+"s ["+$MobTypeHard+"] today!",0;
end;

OnCheck:
	dispbottom "[Monster of the Day]: Players will earn twice the EXP from hunting "+getmonsterinfo($MobTypeLow,0)+"s ["+$MobTypeLow+"], "+getmonsterinfo($MobTypeMid,0)+"s ["+$MobTypeMid+"] and "+getmonsterinfo($MobTypeHard,0)+"s ["+$MobTypeHard+"] today!",0xFFFF00;
end;

OnPCLoginEvent:
if (#pcloginflag&128) end;
	dispbottom "[Monster of the Day]: Players will earn twice the EXP from hunting "+getmonsterinfo($MobTypeLow,0)+"s ["+$MobTypeLow+"], "+getmonsterinfo($MobTypeMid,0)+"s ["+$MobTypeMid+"] and "+getmonsterinfo($MobTypeHard,0)+"s ["+$MobTypeHard+"] today!",0xFFFF00;
	end;
}
}

 

  • 0
Posted
	addrid(2,0,getcharid(1));
	dispbottom "[Monster of the Day]: Experience Gained Base:"+strmobinfo(6,.mobid)+" Job:"+strmobinfo(7,.mobid)+"";
	set BaseExp,(BaseExp+strmobinfo(6,.mobid));
	set JobExp,(JobExp+strmobinfo(7,.mobid));
	end;

change into

	getpartymember getcharid(1), 2;
	.@mob_bexp = (getmonsterinfo(killedrid, MOB_BASEEXP) / $@partymembercount);
	.@mob_jexp = (getmonsterinfo(killedrid, MOB_JOBEXP) / $@partymembercount);
	.@current_level = BaseLevel;
	for (.@i = 0; .@i < $@partymembercount; .@i++) {
		if (attachrid($@partymemberaid[.@i])) {
			.@gap = (BaseLevel - .@current_level);
			if (.@gap >= -15 && .@gap <= 15) {
				dispbottom "[Monster of the Day]: Experience Gained Base:"+F_InsertComma(.@mob_bexp)+" Job:"+F_InsertComma(.@mob_jexp)+"";
				BaseExp += .@mob_bexp;
				JobExp += .@mob_jexp;
			}
			detachrid;
		}
	}
	end;

 

Join the conversation

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

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

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

×   Your previous content has been restored.   Clear editor

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...