Jump to content
  • 0

[request] PvP Room


Hatake Kakashi

Question


  • Group:  Members
  • Topic Count:  254
  • Topics Per Day:  0.06
  • Content Count:  825
  • Reputation:   3
  • Joined:  11/14/11
  • Last Seen:  

sir, is this posible? can you give me a pvp room job by job only? ex. PvP Room of Champion vs. Champion only can enter. thank you.

(note: this is for transcendant job only)

thanks.....

Link to comment
Share on other sites

18 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  626
  • Reputation:   188
  • Joined:  11/19/11
  • Last Seen:  

mes .n$;
OnInit:
set .n$,"["+strcharinfo(0)+"]"; // NPC Name
}

uhh, isn't the role of this part, to show the name of the player? if yes,

couldn't you just delete this part,

set .n$,"["+strcharinfo(0)+"]"; // NPC Name

And

you could edit this part

mes .n$;

to this

mes ""+strcharinfo(0)+",";

Please correct me if I'm wrong. Thank you.

Well that was an typo on my side:

set .n$,"["+strcharinfo(0)+"]"; // NPC Name

I requested the char name of the attached player, which wouldn't work since it was requesting it on server start when no player is attached yet.

Should have been:

set .n$,"["+strnpcinfo(1)+"]"; // NPC Name

Also @reloadscript won't initiate "OnInit" either > Server Restart.

Other possiblity is to use that at the beginning, so after the header:

 if(.n$ == "") donpcevent strnpcinfo(3)+"::OnInit";

This is the result:

prontera,156,167,3    script    Champion    100,{
if(.n$ == "") donpcevent strnpcinfo(3)+"::OnInit";
mes .n$;
if(Class != .class) {
    mes "I'm sorry, but only "+jobname(.class)+"s are allowed to join this PvP Room.";
    close;
}
mes "Do you want to go to the PvP Room?";
if(select("- Yes:- No") - 1) close;
close2;
warp "pvp_y_2-2",0,0;
end;

OnInit:
set .n$,"["+strnpcinfo(1)+"]"; // NPC Name
set .class,4016; // Allowed Class
end;
}

After the test you can remove the "if(.n$ == "") donpcevent strnpcinfo(3)+"::OnInit";". Since it's not required anymore ;O.

Regards,

Chris

Edited by llchrisll
Link to comment
Share on other sites

  • 1

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

can you give me a pvp room job by job only?

each Job Class got 1 Room ?? /no1

try this

prontera,155,181,5 script Sample 733,{
set .name$,"[PvP Room]";
set .@menu$, "All Jobs:";
for( set .@i, 1; .@i < getarraysize(.pvproomsjob); set .@i, .@i+1) {
 set .@menu$, .@menu$ + "^FF0000[" + .@i + "] ^0000FF"+jobname(.pvproomsjob[.@i])+"^000000:";
}
set .@choice, select(.@menu$) -1;
if(!.@choice) {
 warp .mapname$[.@choice],0,0; // Edit map for All Jobs
 end;
}
if(Class != .pvproomsjob[.@choice]) {
 mes "You are not of Class "+jobname(.pvproomsjob[.@choice]);
 close;
}
mapannounce .mapname$[.@choice],strcharinfo(0) + " Entered the PvP Room.",0;
warp .mapname$[.@choice],0,0;
end;

OnInit:
setarray .pvproomsjob[1],4009,4016,4010,4017,4011,4018,4012,4019,4013,4020;  // Put job id's here
setarray .mapname$[0],"guild_vs5","pvp_y_7-2","pvp_y_6-2","pvp_y_5-2","pvp_y_4-2","pvp_y_3-2","pvp_y_2-2","pvp_y_1-2","pvp_y_8-2","pvp_y_6-5","pvp_y_7-5"; // Put map name for those jobs.
end;
}

the 1st Map is "All Job Class"

the rest will follow the Job Id Lists

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  626
  • Reputation:   188
  • Joined:  11/19/11
  • Last Seen:  

Well, here is an warper.

prontera,150,180,0    script    Limited PvP    100,{

mes .n$;
if(Class != .class) {
   mes "I'm sorry, but only "+jobname(.class)+"s are allowed to join this PvP Room.",
   close;
}
mes "Do you want to go to the PvP Room?";
if(select("- Yes:- No") - 1) close;
close2;
warp .map$[0],.map$[1],.map$[2];
end;

OnInit:
set .n$,"["+strcharinfo(0)+"]"; // NPC Name
set .class,Job_Champion; // Allowed Class
setarray .map$[0],"mapname.gat","x","y"; // Coordinates: These entries require the '"'.
end;
}

Untested btw /no1.

Regards,

Chris

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  254
  • Topics Per Day:  0.06
  • Content Count:  825
  • Reputation:   3
  • Joined:  11/14/11
  • Last Seen:  

yes sir emistry each job class 1 room.

how to put waiting room on npc head?

i can't put map. pvp_y_1-2 for all jobs and pvp_y_2-2 to 7-2 for job by. job

i got error

Edited by Hatake Kakashi
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:  

OnInit:
waitingroom "PVP Room",0;
end;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  254
  • Topics Per Day:  0.06
  • Content Count:  825
  • Reputation:   3
  • Joined:  11/14/11
  • Last Seen:  

sir, i need a 1 npc. 1 pvp room for example

1 npc script for Free For All pvp room

1 npc script for Champion vs. Champ pvproom

1 npc script for assassion cross vs. assassin cross pvp room

and the othere's

thanks....

(note: sir,. its only Trans Job. thank you very much.)

sir emist. thanks...

*BUMP.

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:  

LOL ???

1 npc script for Champion vs. Champ pvproom

1 npc script for assassion cross vs. assassin cross pvp room

if you are going to use separate NPC....isnt that Chris already give you the solution ?

if you are looking for Multiple Room in 1 NPC...i already provide the script as well...

what else you want ? ==''

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:  

read inside the script :P

set .class,Job_Champion; // Allowed Class

if the Job_Champion doesnt work...

then put in the class id...you can find it inside the

db/cont.txt

Job_Novice 0
Job_Swordman 1
Job_Mage 2
Job_Archer 3
Job_Acolyte 4
Job_Merchant 5
Job_Thief 6
Job_Knight 7
Job_Priest 8
Job_Wizard 9
Job_Blacksmith 10
Job_Hunter 11
Job_Assassin 12
Job_Knight2 13
Job_Crusader 14
Job_Monk 15
Job_Sage 16
Job_Rogue 17
Job_Alchem 18
Job_Alchemist 18
Job_Bard 19
Job_Dancer 20
Job_Crusader2 21
Job_Wedding 22
Job_SuperNovice 23
Job_Gunslinger 24
Job_Ninja 25
Job_Xmas 26
Job_Novice_High 4001
Job_Swordman_High 4002
Job_Mage_High 4003
Job_Archer_High 4004
Job_Acolyte_High 4005
Job_Merchant_High 4006
Job_Thief_High 4007
Job_Lord_Knight 4008
Job_High_Priest 4009
Job_High_Wizard 4010
Job_Whitesmith 4011
Job_Sniper 4012
Job_Assassin_Cross 4013
Job_Lord_Knight2 4014
Job_Paladin 4015
Job_Champion 4016
Job_Professor 4017
Job_Stalker 4018
Job_Creator 4019
Job_Clown 4020
Job_Gypsy 4021
Job_Paladin2 4022
Job_Baby 4023
Job_Baby_Swordman 4024
Job_Baby_Mage 4025
Job_Baby_Archer 4026
Job_Baby_Acolyte 4027
Job_Baby_Merchant 4028
Job_Baby_Thief 4029
Job_Baby_Knight 4030
Job_Baby_Priest 4031
Job_Baby_Wizard 4032
Job_Baby_Blacksmith 4033
Job_Baby_Hunter 4034
Job_Baby_Assassin 4035
Job_Baby_Knight2 4036
Job_Baby_Crusader 4037
Job_Baby_Monk 4038
Job_Baby_Sage 4039
Job_Baby_Rogue 4040
Job_Baby_Alchem 4041
Job_Baby_Alchemist 4041
Job_Baby_Bard 4042
Job_Baby_Dancer 4043
Job_Baby_Crusader2 4044
Job_Super_Baby 4045
Job_Taekwon 4046
Job_Star_Gladiator 4047
Job_Star_Gladiator2 4048
Job_Soul_Linker 4049
Job_Rune_Knight 4054
Job_Warlock 4055
Job_Ranger 4056
Job_Arch_Bishop 4057
Job_Mechanic 4058
Job_Guillotine_Cross 4059
Job_Rune_Knight_T 4060
Job_Warlock_T 4061
Job_Ranger_T 4062
Job_Arch_Bishop_T 4063
Job_Mechanic_T 4064
Job_Guillotine_Cross_T 4065
Job_Royal_Guard 4066
Job_Sorcerer 4067
Job_Minstrel 4068
Job_Wanderer 4069
Job_Sura 4070
Job_Genetic 4071
Job_Shadow_Chaser 4072
Job_Royal_Guard_T 4073
Job_Sorcerer_T 4074
Job_Minstrel_T 4075
Job_Wanderer_T 4076
Job_Sura_T 4077
Job_Genetic_T 4078
Job_Shadow_Chaser_T 4079
Job_Rune_Knight2 4080
Job_Rune_Knight_T2 4081
Job_Royal_Guard2 4082
Job_Royal_Guard_T2 4083
Job_Ranger2 4084
Job_Ranger_T2 4085
Job_Mechanic2 4086
Job_Mechanic_T2 4087
Job_Baby_Rune 4096
Job_Baby_Warlock 4097
Job_Baby_Ranger 4098
Job_Baby_Bishop 4099
Job_Baby_Mechanic 4100
Job_Baby_Cross 4101
Job_Baby_Guard 4102
Job_Baby_Sorcerer 4103
Job_Baby_Minstrel 4104
Job_Baby_Wanderer 4105
Job_Baby_Sura 4106
Job_Baby_Genetic 4107
Job_Baby_Chaser 4108
Job_Baby_Rune2 4109
Job_Baby_Guard2 4110
Job_Baby_Ranger2 4111
Job_Baby_Mechanic2 4112

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:  

change

mes "I'm sorry, but only "+jobname(.class)+"s are allowed to join this PvP Room.",

into

mes "I'm sorry, but only "+jobname(.class)+"s are allowed to join this PvP Room.";

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  254
  • Topics Per Day:  0.06
  • Content Count:  825
  • Reputation:   3
  • Joined:  11/14/11
  • Last Seen:  

omg. there's an error again. wew

prontera,156,167,0	script	Champion	100,{

mes .n$;
if(Class != .class) {
mes "I'm sorry, but only "+jobname(.class)+"s are allowed to join this PvP Room.";
close;
}
mes "Do you want to go to the PvP Room?";
if(select("- Yes:- No") - 1) close;
close2;
warp pvp_y_2-2,0,0;
end;

OnInit:
set .n$,"["+strcharinfo(0)+"]"; // NPC Name
set .class,Job_Champion; // Allowed Class
setarray .map$[0],"pvp_y_2-2","0","0"; // Coordinates: These entries require the '"'.
end;
}

post-329-0-02082100-1329047904_thumb.jpg

Edited by Hatake Kakashi
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:  

warp pvp_y_2-2,0,0;

the map is a NAME not a Variable....

you have to quote the Name using Quotation marks ( " " )

warp "pvp_y_2-2",0,0;

and remove this..since it is useless

setarray .map$[0],"pvp_y_2-2","0","0"; // Coordinates: These entries require the '"'.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  254
  • Topics Per Day:  0.06
  • Content Count:  825
  • Reputation:   3
  • Joined:  11/14/11
  • Last Seen:  

done! but there's a bug on this script. if you click npc says, only novice are allowed to join this PvP Room.

but i edit it into champion?

hmmm.........

prontera,156,167,3    script    Champion    100,{

mes .n$;
if(Class != .class) {
   mes "I'm sorry, but only "+jobname(.class)+"s are allowed to join this PvP Room.";
   close;
}
mes "Do you want to go to the PvP Room?";
if(select("- Yes:- No") - 1) close;
close2;
warp "pvp_y_2-2",0,0;
end;

OnInit:
set .n$,"["+strcharinfo(0)+"]"; // NPC Name
set .class,4016; // Allowed Class
end;
}

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:  

how you reload the script upon edit..

use @Loadnpc ?

or restart server or @reloadscript..

if you use @loadnpc...then it wont be work ....

because OnInit Label wont be trigger by using @loadnpc..

you have to either Restart server or use @reloadscript

  • Like 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  254
  • Topics Per Day:  0.06
  • Content Count:  825
  • Reputation:   3
  • Joined:  11/14/11
  • Last Seen:  

i use @reloadscript. same error.

Edited by Hatake Kakashi
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  167
  • Reputation:   4
  • Joined:  02/01/12
  • Last Seen:  

mes .n$;
OnInit:
set .n$,"["+strcharinfo(0)+"]"; // NPC Name
}

uhh, isn't the role of this part, to show the name of the player? if yes,

couldn't you just delete this part,

set .n$,"["+strcharinfo(0)+"]"; // NPC Name

And

you could edit this part

mes .n$;

to this

mes ""+strcharinfo(0)+",";

Please correct me if I'm wrong. Thank you.

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