War of Emperium castle rotation System

  • Thread starter Thread starter Aurela
  • Start date Start date
A

Aurela

Guest
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!

 
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 ).

Code:
-	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;}
 
Last edited by a moderator:
Back
Top