Jump to content
  • 0

Castle Owner Warper


jigsgfx

Question


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  83
  • Reputation:   0
  • Joined:  06/02/12
  • Last Seen:  

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

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

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

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  83
  • Reputation:   0
  • Joined:  06/02/12
  • Last Seen:  

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 :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

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;
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  83
  • Reputation:   0
  • Joined:  06/02/12
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

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
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...