Jump to content
  • 0

Castle Owner Warper


Question

Posted

Hi, hope that someone can help me with this script :)

i need a script npc that can warp a Castle Owner (Guild Leader ONLY) to a specific place.

example my OPEN Castle is Krimhield so who ever the guild leader of krim can only use the npc and warp to a specific place? make sense?

thanks in advance to those who will help me... /no1

5 answers to this question

Recommended Posts

Posted

if (strcharinfo(0) == getguildmaster(getcharid(2)) && getcharid(2) == getcastledata("prtg_cas01",1)) {}

thanks Euphy but how i can make this as npc :D sorry im not a scripter dont know how to make script i only know how to edit them :)

Posted
prontera,156,172,5    script    kdfhskfjhs    100,{
   if ( getcharid(2) != getcastledata( "prtg_cas01", 1 ) ) {
       mes "your guild is not the owner of Krimhield castle";
       close;
   }
   if ( getcharid(0) != getguildmasterid( getcharid(2) ) ) {
       mes "you are not guild master of your guild";
       close;
   }
   warp "prtg_cas01", 0,0; // warp to specific places
   end;
}

Posted (edited)

thanks alot Annie your the best :D/no1

last question what if i have all prontera castle not only krimheild?

is this correct?

prontera,156,172,5 script kdfhskfjhs 100,{
if ( getcharid(2) != getcastledata( "prtg_cas01", "prtg_cas02", "prtg_cas03", 3 ) ) {
 mes "your guild is not the owner of Krimhield castle";
 close;
}
if ( getcharid(0) != getguildmasterid( getcharid(2) ) ) {
 mes "you are not guild master of your guild";
 close;
}
warp "prontera", 0,0; // warp to specific places
end;
}

Edited by jigsgfx
Posted (edited)

beginner level script

prontera,156,172,5    script    kdfhskfjhs    100,{
   mes "select a castle";
   next;
   menu "Kriemhild", L_prtg_cas01,
   "Swanhild", L_prtg_cas02,
   "Fadhgridh", L_prtg_cas03;
L_prtg_cas01:
   if ( getcharid(2) != getcastledata( "prtg_cas01", 1 ) ) {
       mes "your guild is not the owner of Krimhield castle";
       close;
   }
   if ( getcharid(0) != getguildmasterid( getcharid(2) ) ) {
       mes "you are not guild master of your guild";
       close;
   }
   warp "prtg_cas01", 0,0; // warp to specific places
   end;
L_prtg_cas02:
   if ( getcharid(2) != getcastledata( "prtg_cas02", 1 ) ) {
       mes "your guild is not the owner of Swanhild castle";
       close;
   }
   if ( getcharid(0) != getguildmasterid( getcharid(2) ) ) {
       mes "you are not guild master of your guild";
       close;
   }
   warp "prtg_cas02", 0,0; // warp to specific places
   end;
L_prtg_cas03:
   if ( getcharid(2) != getcastledata( "prtg_cas03", 1 ) ) {
       mes "your guild is not the owner of Fadhgridh castle";
       close;
   }
   if ( getcharid(0) != getguildmasterid( getcharid(2) ) ) {
       mes "you are not guild master of your guild";
       close;
   }
   warp "prtg_cas03", 0,0; // warp to specific places
   end;
}

advance level

prontera,156,172,5	script	kdfhskfjhs	100,{
mes "select a castle";
next;
.@s = select( .menu$ ) -1;
if ( getcharid(2) != getcastledata( .castle_map$[.@s], 1 ) ) {
	mes "your guild is not the owner of "+ .castle_name$[.@s] +" castle";
	close;
}
if ( getcharid(0) != getguildmasterid( getcharid(2) ) ) {
	mes "you are not guild master of your guild";
	close;
}
warp .castle_map$[.@s], 0,0; // warp to specific places
end;
OnInit:
setarray .castle_map$, "prtg_cas01", "prtg_cas02", "prtg_cas03"; // add more castle map here

while ( getstrlen( .castle_map$[.@i] ) ) {
	.castle_name$[.@i] = getcastlename( .castle_map$[.@i] );
	.@i++;
}
.menu$ = implode( .castle_name$, ":" );
end;
}

EDIT: forgotten about *getcastlemap script command

Edited by AnnieRuru

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...