MVP Announcer

themon

New member
Messages
517
Points
0
Location
라그나로크
Github
ThemonChan (5468656d6f6e4368616e)
Emulator
is there a script that will announce MVP Boss that Spawn and what map it spawned to. and if the MVP Boss is killed it will also announce what time till it spawned again? 

 
Every hour spawn time :

Code:
-	script	Sample	-1,{	OnInit:		setarray .Maps$[0],"prontera","payon","geffen";		.mob_id = 1002;		end;		OnMinute00:		.random_index = rand(getarraysize(.Maps$));		monster .Maps$[.random_index],0,0,getmonsterinfo(.mob_id,0),.mob_id,1,strnpcinfo(1)+"::OnKill";		announce getmonsterinfo(.mob_id,0)+ " has been spawned on map " +.Maps$[.random_index],0;		end;			OnKill:		announce getmonsterinfo(.mob_id,0)+ " has been killed and will spawn again at " +(gettime(3)+1)+ ":" +gettime(2)+ " " +(gettime(3)+1>11?"PM":"AM"),0;		end;}
 
how do i add monster and map here? is it every hour of mvp?

sorry newbie in scripting.

Thx

 
[cbox]- script sample#0 -1,{
OnInit:
setarray .Maps$[0],"prontera","payon","geffen";
.mob_id = 1002;
end;

OnMinute00:
.random_index = rand(getarraysize(.Maps$));
monster .Maps$[.random_index],0,0,getmonsterinfo(.mob_id,0),.mob_id,1,strnpcinfo(1)+"::OnKill";
announce getmonsterinfo(.mob_id,0)+ " has been spawned on map " +.Maps$[.random_index],0;
end;

OnKill:
announce getmonsterinfo(.mob_id,0)+ " has been killed and will spawn again at " +(gettime(3)+1)+ ":" +gettime(2)+ " " +(gettime(3)+1>11?"PM":"AM"),0;
end;
}[/cbox]

is this supposed to announce  poring get spawn or get kill right?

but Its not working?

dont know why?

 
The script works, you just forgot first line spaces are actually tabs:

- script Sample -1,{ OnInit: setarray .Maps$[0],"prontera","payon","geffen"; .mob_id = 1002; end; OnMinute00: .random_index = rand(getarraysize(.Maps$)); monster .Maps$[.random_index],0,0,getmonsterinfo(.mob_id,0),.mob_id,1,strnpcinfo(1)+"::OnKill"; announce getmonsterinfo(.mob_id,0)+ " has been spawned on map " +.Maps$[.random_index],0; end; OnKill: announce getmonsterinfo(.mob_id,0)+ " has been killed and will spawn again at " +(gettime(3)+1)+ ":" +gettime(2)+ " " +(gettime(3)+1>11?"PM":"AM"),0; end;}


how do i add monster and map here? is it every hour of mvp?

sorry newbie in scripting.

Thx
Yeah, it's an MvP (or whichever mob you want to spawn, this one is in fact a poring) each hour, on a random city. If you want to add more monsters and maps there please use my script modification of Patskie's:

Code:
-	script	Sample	-1,{    OnInit:        setarray .Maps$[0],"prontera","payon","geffen","aldebaran"; // Add more map names here following this syntax (up to 128)        setarray .mob_ids[0], 1002,1031,1062,1090,1096,1120,1388,1582,1613,1836,1894; // Add more mob IDs here following this syntax (up to 128)        end;        OnMinute00:        .random_map = rand(getarraysize(.Maps$));		.random_mob = rand(getarraysize(.mob_ids));        monster .Maps$[.random_map],0,0,getmonsterinfo(.mob_ids[.random_mob],0),.mob_ids[.random_mob],1,strnpcinfo(3)+"::OnKill";        announce getmonsterinfo(.mob_ids[.random_mob],0)+ " has been spawned on map " +.Maps$[.random_map],0;        end;            OnKill:        announce getmonsterinfo(.mob_ids[.random_mob],0)+ " has been killed and will spawn again at " +(gettime(3)+1)+ ":" +gettime(2)+ " " +(gettime(3)+1>11?"PM":"AM"),0;        end;}
 
Last edited by a moderator:
@Jabote please post a screenshot of patskie script so i will know what to look at so i will know that its working on my server.

how do i activate it

is there a way to make this a patch not just a script?

so that every time any of the MVP Boss appeared everybody will know where to hunt

 
Last edited by a moderator:
That's a source request then. I'm still not good at source requests. Mind if moving this topic to source requests?

 
@jaBote error on your mob id array 

This :

setarray .mob_ids[0] = 1002,1031,1062,1090,1096,1120,1388,1582,1613,1836,1894; // Add more mob IDs here following this syntax (up to 128)
Should be :

Code:
setarray .mob_ids[0],1002,1031,1062,1090,1096,1120,1388,1582,1613,1836,1894; // Add more mob IDs here following this syntax (up to 128)
 
Whoa, that's true Patskie. I don't know why the parser passed that but I didn't test the script. Thanks!

@themon There's no big deal, just change the regular spaces on the first line of Patskie's answer to tabulation spaces and it's OK.

 
Whoa, that's true Patskie. I don't know why the parser passed that but I didn't test the script. Thanks!

@themon There's no big deal, just change the regular spaces on the first line of Patskie's answer to tabulation spaces and it's OK.
sir, can u make its announce all mvp from mob_db and all map?

 
This script is flawed because it does not announce who really won the MVP in the event of disputes, he announces who it was who gave the last attack.

 
Whoa, that's true Patskie. I don't know why the parser passed that but I didn't test the script. Thanks!

@themon There's no big deal, just change the regular spaces on the first line of Patskie's answer to tabulation spaces and it's OK.
sir, can u make its announce all mvp from mob_db and all map?
Yes, but the NPC is way too different to this one in that case.

This script is flawed because it does not announce who really won the MVP in the event of disputes, he announces who it was who gave the last attack.
Sorry, but scripting engine won't allow you to get the MvP of the monster, so either you conform with that or there's nothing you can do unless you edit the source.

 
Back
Top