Jump to content
  • 0

Guild Emperium script


simplynice

Question


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  128
  • Reputation:   4
  • Joined:  11/14/11
  • Last Seen:  

prontera,127,213,4    script    Guild_Emperium    722,{
if(@breakgname$ == "") {
    } else {
        flagemblem @breakgnameid;
}
switch(select("Participate:Guild Master:Guild Breaker")){
    case 1:
    
    if(agitcheck() == 1){
        mes "War of Emperium is currently active.";
    }
    
    if(getcharid(2,strcharinfo(0)) == 0){
        mes "You should be in a guild;";
        close;
    }
    
    if (@breakgname$){
        if( getcharid(2) == @breakgnameid ){
        warp "pvp_y_1-1",155,195;
        }
    }
    
    warp "pvp_y_1-1",279,204;
    dispbottom "The emperium is located at the center of the map.";
    end;
    break;
    
    case 2:
    if(@breakgname$ == "") {
        mes "No record yet.";
        close;
    } else {
    mes "The Guild Master of ^ff0000"+@breakgname$+"^000000 Guild is:";
    mes "^ff0000"+GetGuildMaster(@breakgnameid)+"^000000";
    }
    break;
    
    case 3:
    if(@breakgname$ == "") {
        mes "No record yet.";
        close;
    } else {
        mes "The breaker of ^ff0000"+@breakgname$+"^000000 Guild is:";
        mes "^ff0000"+@breakeremp$+"^000000";
    }
    break;
}
close;
    
OnInit:
monster "pvp_y_1-1",155,195,"Emperium",1288,1,"GvG::OnBreakEmp";
end;

OnBreakEmp:
set @breakeremp$,""+strcharinfo(0)+"";
set @breakgnameid,getcharid(2,strcharinfo(0));
set @breakgname$,getguildname(@breakgnameid);
maprespawnguildid "pvp_y_1-1",@breakgnameid,6;
sleep2 1000;
announce "The [ Guild Emperium ] has been destroyed by the [ " + @breakgname$ + " ] guild.",bc_all;
if(!mobcount("pvp_y_1-1","GvG::OnBreakEmp")){
monster "pvp_y_1-1",155,195,"Emperium",1288,1,"GvG::OnBreakEmp";
}
end;

OnGuildBreak:
    SetCastleData "pvp_y_1-1",0,0;
    sleep2 2000;
    Announce "Guild Emperium has been abandoned.",0;
    end;
}

pvp_y_1-1    mapflag    nowarp
pvp_y_1-1    mapflag    nomemo
pvp_y_1-1    mapflag    nobranch
pvp_y_1-1    mapflag    noteleport
pvp_y_1-1    mapflag    nosave    SavePoint
pvp_y_1-1    mapflag    gvg_castle

 

i want the script that everytime someone in a guild kill the emp, it cannot be killed again just like the woe. how can i do that?

 

My castledb.txt

 

34,pvp_y_1-1,EmperiumWar,Guild_Emperium,1

 

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  194
  • Topics Per Day:  0.04
  • Content Count:  499
  • Reputation:   3
  • Joined:  03/11/12
  • Last Seen:  

is this some kind of a KOE type?

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  547
  • Reputation:   270
  • Joined:  11/08/11
  • Last Seen:  

Since you did not really specify your problem I tried to sort it out(without testing it on a server):

 

You are referring to a NPC ID with "GvG::", but you did not declare this ID. So the mapserver can not find the NPC.

 

Change the declaration line as follows:

 

 

prontera,127,213,4    script    Guild_Emperium::GvG    722,{

 

Here is a formated and somewhat corrected version. Try it out and if there still are problems, please describe them a little bit better.

 

prontera,127,213,4    script    Guild_Emperium::GvG    722,{
    if( @breakgname$ != "" ) {
            flagemblem @breakgnameid;
    }
    switch( select( "Participate:Guild Master:Guild Breaker" ) ){
        case 1:
            if( agitcheck() == 1 ){
                mes "War of Emperium is currently active.";
                close;
            }
            
            if( getcharid(2) == 0 ){
                mes "You should be in a guild;";
                close;
            }
            
            if( @breakgname$ && getcharid(2) == @breakgnameid ){
                close2;
                warp "pvp_y_1-1", 155, 195;
                end;
            }
            
            close2;
            warp "pvp_y_1-1", 279, 204;
            dispbottom "The emperium is located at the center of the map.";
            end;
        
        case 2:
            if( @breakgname$ == "" ){
                mes "No record yet.";
                close;
            }else{
                mes "The Guild Master of ^ff0000" + @breakgname$ + "^000000 Guild is:";
                mes "^ff0000" + GetGuildMaster( @breakgnameid )+"^000000";
                close;
            }
        
        case 3:
            if( @breakgname$ == "" ){
                mes "No record yet.";
                close;
            }else{
                mes "The breaker of ^ff0000" + @breakgname$ + "^000000 Guild is:";
                mes "^ff0000" + @breakeremp$ + "^000000";
                close;
            }
    }
    
OnInit:
    monster "pvp_y_1-1", 155, 195, "Emperium", 1288, 1, "GvG::OnBreakEmp";
    end;

OnBreakEmp:
    set @breakeremp$, "" + strcharinfo(0);
    set @breakgnameid, getcharid( 2 );
    set @breakgname$, getguildname( @breakgnameid );
    maprespawnguildid "pvp_y_1-1", @breakgnameid, 6;
    sleep2 1000;
    announce "The [ Guild Emperium ] has been destroyed by the [ " + @breakgname$ + " ] guild.", bc_all;
    if( !mobcount( "pvp_y_1-1", "GvG::OnBreakEmp" ) ){
        monster "pvp_y_1-1", 155, 195, "Emperium", 1288, 1, "GvG::OnBreakEmp";
    }
    end;

OnGuildBreak:
    SetCastleData "pvp_y_1-1", 0, 0;
    sleep2 2000;
    Announce "Guild Emperium has been abandoned.", 0;
    end;
}

pvp_y_1-1    mapflag    nowarp
pvp_y_1-1    mapflag    nomemo
pvp_y_1-1    mapflag    nobranch
pvp_y_1-1    mapflag    noteleport
pvp_y_1-1    mapflag    nosave    SavePoint
pvp_y_1-1    mapflag    gvg_castle
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...