Jump to content
  • 0
Sign in to follow this  
Guest Aurela

War of Emperium castle rotation System

Question

Guest Aurela

Hello~

I was wondering if anyone would be able to create a WoE castle rotation system for me.

How it should work? 

 

Example: Guild 'ABC' has captured a Payon castle this WoE. Next WoE they will start in a Geffen castle and it automatically has been transfered to the Guild 'ABC' until someone else is able to get the castle by the end of WoE. 

 

It's a bit hard to explain but I think you get what I mean.

 

Rotating castles should be selectable trough script from a GM

If anyone is willing to help me for free I'd be glad. Else I can also pay for this.

 

Thanks in advance!

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

This is untested, but it should do what you want. All you need to do, is set the array with the castle names, and it will continue to rotate the castle after each WoE.

The only thing is, you can't change it from in-game. Meaning GMs cannot change it at will. This is to prevent conflicts when a guild is inside of the guild dungeon, and a GM changes castle's. Resulting in possible abuse.

 

Additionally, this script does not limit access to a castle.

All this does is change owner ship of Castle 1 -> Castle 2,  Castle 2 -> Castle 3, etc.... And loop back over once it reaches the end.

You need to manage which castle's are available during WoE in a seperate script.

 

How this script works:

1. Setup script by editing the arrays.

2. After each WoE the castle will rotate. ( Transfer all data from Castle 1 -> Castle 2 ).

 

-	script	castle_rotation	-1,{OnInit:setarray .castle$[0],"prtg_cas01", // 1st Edition WoE					 "payg_cas01",					 "gefg_cas01",					 "aldg_cas01",					 					 "prtg_cas02",					 "payg_cas02",					 "gefg_cas02",					 "aldg_cas02";					 setarray .castle2$[0],""; // 2nd Edition WoEend;// Has to be set to AgitEnd or else guild will be kicked out upon changing owner ship of castle.// Therefore after WoE has ended in 1 Castle, the Guild will own the castle NEXT in line.// Example: WoE is in prtg_cas01. It ends. Winning Guild now owns, payg_cas01.// Afterwards, guild should go to that castle to make changes ( investments, etc... )OnAgitEnd:callfunc("rotate_castle", .castle$[$rotation], ( (.castle$[($rotation + 1)] == "")? .castle$[0]:.castle$[($rotation + 1)] ) );$rotation ++;if( .castle$[($rotation + 1)] == "" ){	$rotation = 0;}end;OnAgitEnd2:callfunc("rotate_castle", .castle2$[$rotation], ( (.castle2$[($rotation + 1)] == "")? .castle2$[0]:.castle2$[($rotation + 1)] ) );$rotation ++;if( .castle2$[($rotation + 1)] == "" ){	$rotation = 0;}end;}function	script	rotate_castle	{.@i = 18;while( .@i > 1 ){// Transfer data from Castle 1 -> Castle 2	setcastledata( getarg(1), .@i, getcastledata( getarg(0), .@i) );// Erase Data from Castle 1 after transfering it to Castle 2	setcastledata( getarg(0), .@i, 0 );.@i--;}return 0;}
Edited by GmOcean

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.