1. I was trying to make this work by
donpcevent "Guardian#"+.RTaken$[.@i]+"::OnSpawnGuardians";
but it's not working how do I fix this?
deletearray (.RTaken$);
.@menu$ = "";
.@c = 0;
for ( .@i = 0 ; .@i < getarraysize(.castle$); ++.@i ) {
if ( getcastledata( .castle$[.@i], 1 ) == getcharid(CHAR_ID_GUILD) && (.RTaken$[.@i] == .castle$[.@i]) == false ) { // CD_GUILD_ID
++.@c;
dispbottom ( .@c + " " + getcastlename(.castle$[.@i]) + " is currently controlled by " + strcharinfo(PC_GUILD) + " " + .RTaken$[.@i] ) ;
setarray .RTaken$[getarraysize(.RTaken$)],.castle$[.@i];
.@menu$ = .@menu$ + getcastlename( .castle$[.@i] );
.@menu$ = .@menu$ + ":";
}
}
if (.@c < 1) {
mes ( ".@c < 1 You have to work harder to obtain glory, chief!");
close;
} else {
mes ( ".@c == " + .@c);
mes ( " Select a Castle." );
.@i = select( .@menu$ ) - 1;
mes "You selected menu : "+ .@menu$[.@i];
while(true) {
switch ( select (
"Maximize Castle Economy & Defense", //xsa//2, 3
"Enable Kafra", //xsa//9
"Disable Kafra", //xsa//9
"Enable All Guardian", // 10 11 12 13 14 15 16 17
"Check Guild Status",
"Exit"
)) {
case 1:
setcastledata(.RTaken$[.@i], 2, 100 );
setcastledata(.RTaken$[.@i], 3, 100 );
break;
case 2:
setcastledata(.RTaken$[.@i], 9, 1 );
enablenpc "Kafra Staff#"+.RTaken$[.@i];
break;
case 3:
setcastledata(.RTaken$[.@i], 9, 0 );
disablenpc "Kafra Staff#"+.RTaken$[.@i];
break;
case 4:
setcastledata(.RTaken$[.@i], 10, 1 );
setcastledata(.RTaken$[.@i], 11, 1 );
setcastledata(.RTaken$[.@i], 12, 1 );
setcastledata(.RTaken$[.@i], 13, 1 );
setcastledata(.RTaken$[.@i], 14, 1 );
setcastledata(.RTaken$[.@i], 15, 1 );
setcastledata(.RTaken$[.@i], 16, 1 );
setcastledata(.RTaken$[.@i], 17, 1 );
donpcevent "Guardian#"+.RTaken$[.@i]+"::OnSpawnGuardians";
break;
case 5:
dispbottom ( "Guld Name :: " + getcastledata(.RTaken$[.@i], 1) ) ;
dispbottom ( "Guild Economy Level :: " + getcastledata(.RTaken$[.@i], 2) ) ;
dispbottom ( "Guild Defense Level :: " + getcastledata(.RTaken$[.@i], 3) ) ;
dispbottom ( "Guild Kafra :: " + getcastledata(.RTaken$[.@i], 9) ) ;
dispbottom ( "Guild 1st Guardian Soldier :: " + getcastledata(.RTaken$[.@i], 10) ) ;
dispbottom ( "Guild 2nd Guardian Soldier :: " + getcastledata(.RTaken$[.@i], 11) ) ;
dispbottom ( "Guild 3rd Guardian Soldier :: " + getcastledata(.RTaken$[.@i], 12) ) ;
dispbottom ( "Guild 4th Guardian Archer :: " + getcastledata(.RTaken$[.@i], 13) ) ;
dispbottom ( "Guild 5th Guardian Archer :: " + getcastledata(.RTaken$[.@i], 14) ) ;
dispbottom ( "Guild 6th Guardian Knight :: " + getcastledata(.RTaken$[.@i], 15) ) ;
dispbottom ( "Guild 7th Guardian Knight :: " + getcastledata(.RTaken$[.@i], 16) ) ;
dispbottom ( "Guild 8th Guardian Knight :: " + getcastledata(.RTaken$[.@i], 17) ) ;
break;
case 6:
close;
}
}
close;
}
OnInit:
setarray .castle$[0],
"aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05",
"gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05",
"payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05",
"prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05",
"arug_cas01","arug_cas02","arug_cas03","arug_cas04","arug_cas05",
"schg_cas01","schg_cas02","schg_cas03","schg_cas04","schg_cas05";
end;
}
2. can we disable default woe system and create custom woe system?
3. by doing this
.@i = 1; .@x = 10;
while ( .@i <= .@x ) {
atcommand "@slaveclone "+strcharinfo(0);
.@i += 1;
}
dispbottom ("spawn'ed " + (.@i-1) + " clones" );
can it able to announce when a slave clone die or should it be changed to something else?
if yes please show me how.
and can it be used with
*setunitdata ??
donpcevent "Guardian#"+.RTaken$[.@i]+"::OnSpawnGuardians";
but it's not working how do I fix this?
deletearray (.RTaken$);
.@menu$ = "";
.@c = 0;
for ( .@i = 0 ; .@i < getarraysize(.castle$); ++.@i ) {
if ( getcastledata( .castle$[.@i], 1 ) == getcharid(CHAR_ID_GUILD) && (.RTaken$[.@i] == .castle$[.@i]) == false ) { // CD_GUILD_ID
++.@c;
dispbottom ( .@c + " " + getcastlename(.castle$[.@i]) + " is currently controlled by " + strcharinfo(PC_GUILD) + " " + .RTaken$[.@i] ) ;
setarray .RTaken$[getarraysize(.RTaken$)],.castle$[.@i];
.@menu$ = .@menu$ + getcastlename( .castle$[.@i] );
.@menu$ = .@menu$ + ":";
}
}
if (.@c < 1) {
mes ( ".@c < 1 You have to work harder to obtain glory, chief!");
close;
} else {
mes ( ".@c == " + .@c);
mes ( " Select a Castle." );
.@i = select( .@menu$ ) - 1;
mes "You selected menu : "+ .@menu$[.@i];
while(true) {
switch ( select (
"Maximize Castle Economy & Defense", //xsa//2, 3
"Enable Kafra", //xsa//9
"Disable Kafra", //xsa//9
"Enable All Guardian", // 10 11 12 13 14 15 16 17
"Check Guild Status",
"Exit"
)) {
case 1:
setcastledata(.RTaken$[.@i], 2, 100 );
setcastledata(.RTaken$[.@i], 3, 100 );
break;
case 2:
setcastledata(.RTaken$[.@i], 9, 1 );
enablenpc "Kafra Staff#"+.RTaken$[.@i];
break;
case 3:
setcastledata(.RTaken$[.@i], 9, 0 );
disablenpc "Kafra Staff#"+.RTaken$[.@i];
break;
case 4:
setcastledata(.RTaken$[.@i], 10, 1 );
setcastledata(.RTaken$[.@i], 11, 1 );
setcastledata(.RTaken$[.@i], 12, 1 );
setcastledata(.RTaken$[.@i], 13, 1 );
setcastledata(.RTaken$[.@i], 14, 1 );
setcastledata(.RTaken$[.@i], 15, 1 );
setcastledata(.RTaken$[.@i], 16, 1 );
setcastledata(.RTaken$[.@i], 17, 1 );
donpcevent "Guardian#"+.RTaken$[.@i]+"::OnSpawnGuardians";
break;
case 5:
dispbottom ( "Guld Name :: " + getcastledata(.RTaken$[.@i], 1) ) ;
dispbottom ( "Guild Economy Level :: " + getcastledata(.RTaken$[.@i], 2) ) ;
dispbottom ( "Guild Defense Level :: " + getcastledata(.RTaken$[.@i], 3) ) ;
dispbottom ( "Guild Kafra :: " + getcastledata(.RTaken$[.@i], 9) ) ;
dispbottom ( "Guild 1st Guardian Soldier :: " + getcastledata(.RTaken$[.@i], 10) ) ;
dispbottom ( "Guild 2nd Guardian Soldier :: " + getcastledata(.RTaken$[.@i], 11) ) ;
dispbottom ( "Guild 3rd Guardian Soldier :: " + getcastledata(.RTaken$[.@i], 12) ) ;
dispbottom ( "Guild 4th Guardian Archer :: " + getcastledata(.RTaken$[.@i], 13) ) ;
dispbottom ( "Guild 5th Guardian Archer :: " + getcastledata(.RTaken$[.@i], 14) ) ;
dispbottom ( "Guild 6th Guardian Knight :: " + getcastledata(.RTaken$[.@i], 15) ) ;
dispbottom ( "Guild 7th Guardian Knight :: " + getcastledata(.RTaken$[.@i], 16) ) ;
dispbottom ( "Guild 8th Guardian Knight :: " + getcastledata(.RTaken$[.@i], 17) ) ;
break;
case 6:
close;
}
}
close;
}
OnInit:
setarray .castle$[0],
"aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05",
"gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05",
"payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05",
"prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05",
"arug_cas01","arug_cas02","arug_cas03","arug_cas04","arug_cas05",
"schg_cas01","schg_cas02","schg_cas03","schg_cas04","schg_cas05";
end;
}
2. can we disable default woe system and create custom woe system?
3. by doing this
.@i = 1; .@x = 10;
while ( .@i <= .@x ) {
atcommand "@slaveclone "+strcharinfo(0);
.@i += 1;
}
dispbottom ("spawn'ed " + (.@i-1) + " clones" );
can it able to announce when a slave clone die or should it be changed to something else?
if yes please show me how.
and can it be used with
*setunitdata ??