Jump to content
  • 0

How to reset guild's castle [part 2] ?


Auryn

Question


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  147
  • Reputation:   1
  • Joined:  01/26/12
  • Last Seen:  

There is two WoEs per week on my server, one on wednesday and another on sunday.

I would the castle that has been aquired by a guild in wednesday be reset when the sunday one comes.

How could I do it ?

I hope I explained myself correctly.

NB : I'm using WoE Setter 3 by [GM]Xeon.

This a second topic about guild's castle resetting.

I had a very nice answer from you Emistry and had not as much time to thank & answer to you.

try this

- script Sample -1,{
OnClock0001:
switch( gettime(4) ){
Case 0: // Sunday
 setarray .@Map$[0], "prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05","payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05";
 break;
Case 3: // Wednesday
 setarray .@Map$[0], "gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05","aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05";
 break;
default: end;
}
if( getarraysize(.@Map$) )
for( set .@i,0; .@i < getarraysize(.@Map$); set .@i,.@i + 1 )
 setcastledata .@Map$[.@i],1,0;
end;
}

edit the map array to set which castle map guild ownership to be remove

this script should be able to remove the guild castle ownership every designed day on 00:01 AM

I was able to test this script yesterday, and found it doesn't took effect the way wanted :

In SQL database, the castle that was supposed to be removed from any guild occupation was occuped by guild with ID "0", and InGame, there still were the emblem of the previous guild on the flag.

Here is your script once I edited it for a personal reset system :

-	script	creset	-1,{
OnClock2130:
switch( gettime(4) ){
Case 3: // Mercredi
setarray .@Map$[0], "aldeg_cas04";
break;
Case 0: // Dimanche
setarray .@Map$[0], "payg_cas05";
break;
default: end;
}
if( getarraysize(.@Map$) )
for( set .@i,0; .@i < getarraysize(.@Map$); set .@i,.@i + 1 )
setcastledata .@Map$[.@i],1,0;
end;
}

Did I miss something ?

Edited by Auryn
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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.

×
×
  • Create New...