Jump to content
  • 0
Sign in to follow this  
Louis T Steinhil

Custom WoE

Question

Let's say I have 4 different emperiums, then, when Agit starts 1 of those 4 emperiums will be summoned, and that emperium will last until WoE is finished. Is it possible to call a random emperium from those 4 emps? :P

Edited by zeek

Share this post


Link to post
Share on other sites

9 answers to this question

Recommended Posts

  • 0

Yes, it is, but you'd have to perform some slight edits to your npc/guild/agit_main.txt lines 69 to 88 (depending on the castle you want to make the emperium spawn randomly and assuming you haven't already edited it). Once you located the line of the castle you want:

 

Look for THIS:

OnAgitStart:if (strnpcinfo(0) == "Gld_Agit_Manager") end;MapRespawnGuildID strnpcinfo(2),GetCastleData(strnpcinfo(2),1),6;GvgOn strnpcinfo(2);

 

Add below:

set $@empspawnpoint, rand(1,4);

 

Change THIS (X and Y reference to the original x and y positions on the script, it's different to each castle):

{ setarray .@emproom[0],X,Y; }

 

To THIS (where X1, Y1 reference the first x and y emperium spawn position and so on):

{	switch($@empspawnpoint) {		case 1:			setarray .@emproom[0],X1,Y1;			break;		case 2:			setarray .@emproom[0],X2,Y2;			break;		case 3:			setarray .@emproom[0],X3,Y3;			break;		default: // case 4 and unhandled			setarray .@emproom[0],X4,Y4;	}}

 

Haven't tested but should work. Only flaw is that if you have more than 1 castle on WoE at once, the spawn point will be the same for each of them (if random number was 4, all castles will use the 4th spawn point for the WoE), but correcting that would require a more complex edit.

Share this post


Link to post
Share on other sites
  • 0

How about setting the ID of the 4 emperiums that will be randomly summoned? For example: angel type emperium, demon type emperium and so on... When agit starts it will randomly select from those 4 kinds of emperiums then only 1 emperium will be chosen for WoE.

Share this post


Link to post
Share on other sites
  • 0

Oh, last post is useless then: I understood you wanted to change the position in which the Emperium is spawned. If possible, try to explain a bit better and elaborate some more on the request next time so that I can get it better next time.

 

In case you want to make different Emperium mobs with the same restrictions (immune to skills, etc), you should do some minor source editions along with adding the corresponding database entries and a minor edition to the agit_main script.

 

I could try those source edits but chances are I'll fail since I'm not that good on src.

So is that it what you want? 4 different race emperiums (if you don't want them with the corresponding benefits then the source edits are not required) and making only one to spawn througout all of one WoE session?

Share this post


Link to post
Share on other sites
  • 0

Yes sir. Sorry if I implied the wrong idea. Yes even without the immune to skill thing.

 

 

Oh and by the way is that also src? only the antagonists of the guild owner and members can hit the custom emp. If it is, how to edit it? :)

Edited by zeek

Share this post


Link to post
Share on other sites
  • 0

AFAIK if you want only antagonists to hit the emperium you'll also need a source edit too.

 

For using the custom emperiums I'll suppose you already have them done on db/mob_db2.txt and that you'll also use default emperium (ID 1288). Take the custom emperium IDs, they'll be EMPID2, EMPID3 and EMPID4 on my example code. Changes, again, will be made on npc/guild/agit_main.txt.

 

Look for THIS:

OnAgitStart:if (strnpcinfo(0) == "Gld_Agit_Manager") end;MapRespawnGuildID strnpcinfo(2),GetCastleData(strnpcinfo(2),1),6;GvgOn strnpcinfo(2);

 

Add below (you can ommit adding the comments if you want):

setarray .@custom_emps[0], 1288, EMPID2, EMPID3, EMPID4; // You can add more if you wishset $@this_woe_emp, .@custom_emps[rand(getarraysize(.@custom_emps))]; // If you add more Emperiums there'll no need to amend this piece of code.sleep 10; // This way, if there are more active castles, they'll all pick an emperium but the last one picked will prevail over all.

 

Look for THIS (on an unedited script it's on line 94):

monster strnpcinfo(2),.@emproom[0],.@emproom[1],"Emperium",1288,1,"Agit#"+strnpcinfo(2)+"::OnAgitBreak";

 

Change to:

monster strnpcinfo(2),.@emproom[0],.@emproom[1],"Emperium",$@this_woe_emp,1,"Agit#"+strnpcinfo(2)+"::OnAgitBreak";

 

And I think you're done with it. I haven't tested it but I think it works unless I've made a quite little mistake.

 

Note the custom emperiums will be affected by skills unless you edit some piece of code inside battle.c.

Share this post


Link to post
Share on other sites
  • 0

You'd mostly need to change somewhere near when MODIB_EMPERIUM appears in src/map/battle.c and src/map/skill.c (and in src/map/mob.c if you want the other Emperiums to have HP and defense bonus for castle economy) for them to have similar "benefits" to what the emperium does.

 

If you want them to exactly mimic the Emperium except for the race (set in mob_db2.txt) you should edit around ALL entries of MOBID_EMPERIUM on the source.

Share this post


Link to post
Share on other sites

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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.