Jump to content
  • 0

Guild owner NPC


maynard

Question


  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  159
  • Reputation:   1
  • Joined:  12/21/11
  • Last Seen:  

Please someone make a NPC like this, I found it here in eathena.

1.change it to a guild winner. It will use 1 castle only and it is kreimhild,only Guild leader of kriemhild can access. Guild leader can make prontera into a pvp whenever he wants.Its like owning the prontera.if is possible I want to have a brodcast feature but only guild leader can use it.

2. can override by GM.

prontera,154,186,3 script Prontera_switch 871,{

if( getgmlevel() >= 0 ) {

switch(select("Enable PVP:Disable PVP")) {

case 1: pvpon "prontera"; break;

case 2: pvpoff "prontera"; break;

}

}

close;

}

Link to comment
Share on other sites

19 answers to this question

Recommended Posts


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

try this

prontera,155,181,5 script Sample 718,{
set .Map$,"prtg_cas03";
if( strcharinfo(0) != getguildmaster( getcastledata( .Map$,1 ) ) ){
mes "Only ^FF0000"+getguildmaster( getcastledata( .Map$,1 ) )+"^000000 can use this services.";
}else{
mes "Turn ON/OFF the PVP ?";
switch( select("Turn ON PVP:Turn OFF PVP") ){
 Case 1: pvpon "prontera";
   mapannounce "prontera","PVP in Turned ON",0;
   break;
 Case 2: pvpoff "prontera";
   mapannounce "prontera","PVP in Turned OFF",0;
   break;
}
}
close;
}

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  94
  • Topics Per Day:  0.02
  • Content Count:  2192
  • Reputation:   252
  • Joined:  11/11/11
  • Last Seen:  

Masao, do you know how to make the NPC check the amount of players in the guild? And if possible, check how long they currently go online?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  159
  • Reputation:   1
  • Joined:  12/21/11
  • Last Seen:  

Thank you sir emistry and masao, I already use it in my server and so far no error or warning, They are both working. I use Masao script because the Gm can still on/off even though hes not the guild leader. thanks again. by the way, what I mean for broadcast is you can type message to broadcast, its a privilege for the guild leader that he can use it. If you can add more stuff I will try it.

hmm, I have some problem, sometimes if I turn it on my server crash but there is no warning or error in my mapserv. and everytime I log in my client crash. I have a pvp warper in prontera town. then the script is also in the prontera town.To resolve I restart the server.

Edited by maynard
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  23
  • Reputation:   3
  • Joined:  12/10/11
  • Last Seen:  

I have edit Masao's Npc a bit and also added an announce feature. Please try it first because I haven't.

pvp_switch.txt

Link to comment
Share on other sites


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

Okay try this...

now both Guild Master and GM Above Level 50 should be able to use this

they able to Turn ON / OFF PVP and make announcement

prontera,155,181,5 script Sample 718,{
set .Map$,"prtg_cas03";
if( strcharinfo(0) != getguildmaster( getcastledata( .Map$,1 ) ) && getgmlevel() < 50 ){
mes "Only ^FF0000"+getguildmaster( getcastledata( .Map$,1 ) )+"^000000 can use this services.";
}else{
mes "Turn ON/OFF the PVP ?";
mes "Made Announcement ?";
switch( select("Announce:Turn ON PVP:Turn OFF PVP") ){
Case 1:
 mes "Type your message.";
 input @Input$;
 mes "Your Message :";
 mes "^0000FF"+@Input$+"^000000";
 if( select("Announce:Cancel") == 2 ) break;
 mes "Okay..";
 close2;
 announce @Input$,0;
 end;
Case 2:
 pvpon "prontera";
 mapannounce "prontera","PVP in Turned ON",0;
 break;
Case 3:
 pvpoff "prontera";
 mapannounce "prontera","PVP in Turned OFF",0;
 break;
}
}
close;
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  159
  • Reputation:   1
  • Joined:  12/21/11
  • Last Seen:  

Thanks emistry, so far so good, im using it right now and you made it exactly as I wanted. No error so far. thank you very much sir. I love your script.

Sir can you put the name of the guild leader or much better if the name of the guild when he makes broadcast to prevent confusion.maybe someone will think that he or she is a GM.I got a lot of feedback, some like it and some don't want it.But I guess woe will never be the same again. ^_^

Edited by maynard
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  23
  • Reputation:   3
  • Joined:  12/10/11
  • Last Seen:  

prontera,154,186,3 script Prontera_switch 871,{

set .@n$,"[Prontera PvP Switch]";
set @GID,getcastledata("prtg_cas03",1);
if((getguildmaster(@GID) != strcharinfo(0) || @GID == 0) && getgmlevel() <= 0)
{
 mes .@n$;
 mes "I am loyal and I will follow my master ^ff0000"+getguildmaster(@GID)+"^000000. We are Guardians! We defend to the bitter end!";
 close;
}
mes .@n$;
mes "Hello "+strcharinfo(0)+",";
mes "what can i do for you today?";
switch(select("Enable PVP:Disable PVP:Announce"))
{
 case 1:
  pvpon "prontera";
  mapannounce "prontera","PvP has been enabled in Prontera by an GM!",bc_map;
 break;
 case 2:
  pvpoff "prontera";
  mapannounce "prontera","PvP has been disabled in Prontera by an GM!",bc_map;
 break;
 case 3:
  mes "Please Input Your Message";
  input .@m$;
  announce strcharinfo(0)+"("+strcharinfo(2)+"): "+.@m$,0;
 break;

}
close;
}

I have run to try and error already but haven't try in games yet but I think it will work as you like (have an name of announcer)

change the gmlevel at getgmlevel() <= 0 change 0 to which the least gm level that need to override it.

(if 50 mean gmlevel 50 and below unable to use it)

Edited by Magic-Maker
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  159
  • Reputation:   1
  • Joined:  12/21/11
  • Last Seen:  

is it possible to disable @go @jump @warp when click to PVP ON? or you cant use @commads except for gm with lvl50. If turn OFF they can use again their player @commands. They love the script but there are some who take advantages of @warp. prontera is my main town so I cant use mapflag. They are enjoying it and some are into it that they begin trashtalking.2 guilds are fighting each other.Thank you very much sir Emistry, Masao and Magic-Maker.If you have suggestion I will glad to try it.

Link to comment
Share on other sites


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



mapname    mapflag    nowarp
mapname    mapflag    nowarpto
mapname    mapflag    nosave

mapname    mapflag    nocommand    50


Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  159
  • Reputation:   1
  • Joined:  12/21/11
  • Last Seen:  

tnx sir, I tried that but I remove it because its permanent. If I put that mapflag my players cant warp or go to main town. I think I will try the @go/@warp delay when being hit by monster or player. Thanks anyway for the effort.

Link to comment
Share on other sites


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

change'

pvpon "prontera";

mapannounce "prontera","PvP has been enabled in Prontera by an GM!",bc_map;

break;

case 2:

pvpoff "prontera";

mapannounce "prontera","PvP has been disabled in Prontera by an GM!",bc_map;

break;

into this

 case 1:
 pvpon "prontera";
 setmapflag "prontera",mf_nowarpto;
 setmapflag "prontera",mf_nowarp;
 setmapflag "prontera",mf_nowarpreturn;
 setmapflag "prontera",mf_nosave;
 setmapflag "prontera",mf_nocommand,50;
 mapannounce "prontera","PvP has been enabled in Prontera by an GM!",bc_map;
 break;
case 2:
 pvpoff "prontera";
 removemapflag "prontera",mf_nowarpto;
 removemapflag "prontera",mf_nowarp;
 removemapflag "prontera",mf_nowarpreturn;
 removemapflag "prontera",mf_nosave;
 removemapflag "prontera",mf_nocommand;
 mapannounce "prontera","PvP has been disabled in Prontera by an GM!",bc_map;
 break;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  23
  • Reputation:   3
  • Joined:  12/10/11
  • Last Seen:  

mapflag "nosave" can't be set by setmapflag command (If you don't change src)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  159
  • Reputation:   1
  • Joined:  12/21/11
  • Last Seen:  

Sir its working perfectly.If I turn it ON nobody can leave or enter prontera,no player can can use @commands.If I turn ir off, it goes back to normal town. Tnx sir Emistry.Tnx to all who helped me.If I have a another idea I hope you help me again.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  1
  • Reputation:   0
  • Joined:  12/29/11
  • Last Seen:  

Sir Emistry how can winning guildmate can use this, winner of the guild can use this including all guildmates.Im using your script in post#7 can you add in the announcement the name of character and guild "Pvp is ON by myname(myGuild)".

hmm another 1 modify I want is, can you make a broadcast/talk if there is someone is trying to use it the npc will broadcast. "name of intruder" get lost before my master get's you.

Sir magic maker your script is working but there are times that my client crash, sometimes if turn on/off by guild leader the client crash,I dont know what went wrong because theres no warning/debug or error in mapserv.

Im using right now the script of emistry and so far it is stable for 2days using it.

Link to comment
Share on other sites


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

the announcement the name of character and guild "Pvp is ON by myname(myGuild)".

add this

announce "The PVP is On By "+strcharinfo(0)+" from "+getguildname( getcharid(2) ),0;

can you make a broadcast/talk if there is someone is trying to use it the npc will broadcast. "name of intruder" get lost before my master get's you.
if( getcharid(2) != getcastledata( .Map$,1 ) ){
mes "You are not allow to use this NPC.";
announce "Get Lost Intruder - "+strcharinfo(0),0;
npctalk "Get Lost Intruder - "+strcharinfo(0);
close;
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  439
  • Reputation:   2
  • Joined:  05/04/12
  • Last Seen:  

this is a very nice script by sir emistry.

Edited by RN1986
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  69
  • Reputation:   4
  • Joined:  07/02/12
  • Last Seen:  

what do i need to add if i want to require the guildmaster to take 2 castles instead of just one before he can activate the npc? kriem + horn for example.

Link to comment
Share on other sites


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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  69
  • Reputation:   4
  • Joined:  07/02/12
  • Last Seen:  

awesome, thank you so much emistry. i'm learning alot just reading and reviewing the scripts you guys are helping other people with. i've only been doing this for like 3 days (including setting up server) so i'm a noob. i've also used some scripts from your collection (edited them to my preferences) and i hope you don't mind. it's amazing how a simple "search" button can help a total newbie like myself.

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