Jump to content
  • 0

KoE Warper / Alliance Warp


Nokia

Question


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  150
  • Reputation:   5
  • Joined:  12/28/11
  • Last Seen:  

Hi there, i just wanna ask if its possible to warp the Alliance guild to another place, so i need an alliance check, my koe warper:

prontera,156,182,4 script King of Emperium#KoE 108,{
mes "[The King]";
if ( getcharid(2) == 0 ) {
 mes "You must have a guild to participate in the ^FF0000King of Emperium Tournament^000000.";
 close;
}
 if (getcharid(2) == GetCastleData("guild_vs1",1)) { // Check if the player has the castle.
mes "Hey "+strcharinfo(0)+"";
mes "You will go back into your Castle?";
if ( select ( "Yes!", "No!" ) == 2 ) close;
switch( rand(1,4) ){
	case 1: warp "guild_vs1", 27, 50; end;
	case 2: warp "guild_vs1", 49, 71; end;
	case 3: warp "guild_vs1", 72, 50; end;
	case 4: warp "guild_vs1", 49, 28; end;
}
}



[b]i also need a check like this:[/b]
[b]if > the guild who has taked the emperium is my ally warp me to:[/b]


mes "Hello.";
mes "Would you like to participate in the ^FF0000King of Emperium Tournament^000000?"; //thats if he dosent have the castle
if ( select ( "Yes", "No" ) == 2 ) close;
switch( rand(1,4) ){
	case 1: warp "guild_vs1", 50, 88; end;
	case 2: warp "guild_vs1", 88, 50; end;
	case 3: warp "guild_vs1", 50, 11; end;
	case 4: warp "guild_vs1", 11, 50; end;
}
}

is there no way to check the alliance?

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  74
  • Topics Per Day:  0.02
  • Content Count:  194
  • Reputation:   2
  • Joined:  12/18/11
  • Last Seen:  

its impossible for 3310 Nokia

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

well...actually it is possible when you use SQL Server

prontera,155,181,5 script Sample 757,{
// Set the Castle Map Name or put Main Guild ID here
set .@GuildID,getcastledata("prtg_cas03",1);

query_sql( "SELECT `alliance_id` FROM `guild_alliance` WHERE `guild_id` = "+.@GuildID+"",.@Allie );
if( getcharid(2) == .@GuildID ) set .@Allowed,1;
for( set .@i,0; .@i < getarraysize( .@Allie ); set .@i,.@i + 1 )
if( getcharid(2) == .@Allie[.@i] ) set .@Allowed,1;

if( !.@Allowed ){
mes "This NPC is reserved for Guild "+getguildname( .@GuildID )+" and it's Allies.";
}else{
mes "Where can i warp you to ?";
next;
switch( select( "Warp 1",
 "Warp 2",
 "Warp 3",
 "Warp 4" )){

 Case 1: warp "prontera",155,180; end;
 Case 2: warp "prontera",155,180; end;
 Case 3: warp "prontera",155,180; end;
 Case 4: warp "prontera",155,180; end;
}
}
close;
}

Just edit this Part ( Map Name )

// Set the Castle Map Name or put Main Guild ID here
set .@GuildID,getcastledata("prtg_cas03",1);

currently this script only work with 1 Castle Map..

if you wan make more..then copy it in a new text file

1 NPC = 1 Guild

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  150
  • Reputation:   5
  • Joined:  12/28/11
  • Last Seen:  

well the sample is working, but if add this into my koe script, and my castle is empty, the npc always says: This NPC is reserved for Guild null and its allies.

i also added my map there: set .@GuildID,getcastledata("guild_vs1",1);

edit: nvm got it:

// KoE Entrance
prontera,156,182,4 script King of Emperium#KoE 108,{
set .@GuildID,getcastledata("guild_vs1",1);
mes "[The King]";
if ( getcharid(2) == 0 ) { // [b]if the player has no guild[/b]
 mes "you have no guild!.";
 close;
}
 if (getcharid(2) == GetCastleData("guild_vs1",1)) { // <- [b]if my guild got the caslte warp me to:[/b]
mes "Hey "+strcharinfo(0)+"";
mes "would you go back into the";
mes "^FF0000King of Emperium Castle?^000000";
if ( select ( "Yes!", "No!" ) == 2 ) close;
switch( rand(1,4) ){
	case 1: warp "guild_vs1", 27, 50; end;
	case 2: warp "guild_vs1", 49, 71; end;
	case 3: warp "guild_vs1", 72, 50; end;
	case 4: warp "guild_vs1", 49, 28; end;
}
}

query_sql( "SELECT `alliance_id` FROM `guild_alliance` WHERE `guild_id` = "+.@GuildID+"",.@Allie );
if( getcharid(2) == .@GuildID ) set .@Allowed,1;
for( set .@i,0; .@i < getarraysize( .@Allie ); set .@i,.@i + 1 )
if( getcharid(2) == .@Allie[.@i] ) set .@Allowed,1;
if( !.@Allowed ){
mes "Hello.";
mes "Would you enter the event?"; // <-[b] if there is no ally, warp me to:[/b]
if ( select ( "Ja!", "Nein.." ) == 2 ) close;
switch( rand(1,4) ){
	case 1: warp "guild_vs1", 50, 88; end;
	case 2: warp "guild_vs1", 88, 50; end;
	case 3: warp "guild_vs1", 50, 11; end;
	case 4: warp "guild_vs1", 11, 50; end;
}
}else{
mes "Hey "+strcharinfo(0)+"";
mes "would you enter into the";
mes "^FF0000King of Emperium Castle?^000000"; // [b]if the guild are allys, warp me to:[/b]
if ( select ( "Yes!", "No!" ) == 2 ) close;
switch( rand(1,4) ){
	case 1: warp "guild_vs1", 27, 50; end;
	case 2: warp "guild_vs1", 49, 71; end;
	case 3: warp "guild_vs1", 72, 50; end;
	case 4: warp "guild_vs1", 49, 28; end;
}
}
close;

mes "Hello.";
mes "would you enter the ^FF0000King of Emperium Event^000000?"; //[b] <- do i need this?[/b]
if ( select ( "Yes!", "No.." ) == 2 ) close;
switch( rand(1,4) ){
	case 1: warp "guild_vs1", 50, 88; end;
	case 2: warp "guild_vs1", 88, 50; end;
	case 3: warp "guild_vs1", 50, 11; end;
	case 4: warp "guild_vs1", 11, 50; end;
}
}

another question, if the event endet the players can still warp into the room if they dont close the dialog, would it possible to add some koe check ? :

mes "would you enter the ^FF0000King of Emperium Event^000000?"; // <- do i need this?
if ( select ( "Yes!", "No.." ) == 2 ) close;
[b]if koe == end > close: <- something like this?[/b]
switch( rand(1,4) ){
	case 1: warp "guild_vs1", 50, 88; end;
	case 2: warp "guild_vs1", 88, 50; end;
	case 3: warp "guild_vs1", 50, 11; end;
	case 4: warp "guild_vs1", 11, 50; end;

Edited by Nokia
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

hmm ?? i dont get what you are trying to accomplish ??

the script i post above should have working fine...

why duplicate so many switch for warping ??? :D

since you are using random auto selection...why not just group it together into the switch-case ??

anyway...if you want it to disable during the Agit is not On..

then try add this

if( !agitcheck() && !agitcheck2() ){
mes "WOE is not ON...";
close;
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  150
  • Reputation:   5
  • Joined:  12/28/11
  • Last Seen:  

well, your script is only checking the alliance thing, but i need some more check, players who has taken the castle should be warp to another place, players who dont have the castle should be warped to another player, and the alliance should be warp to another place

Link to comment
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.   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...