Erebos Posted January 19, 2019 Posted January 19, 2019 I tried and googled but i cant understand well the ea_job_system.txt. I need an only 3rd jobs(and kagerou/oboro, rebellions) and an only 2nd job constants for an if (class == constant ) command Help please Quote
0 AnnieRuru Posted January 19, 2019 Posted January 19, 2019 prontera,163,171,3 script PvP Arena Guardian 966,{ .@eaj = eaclass(); mes "[Guardian]"; mes "Greeting Warriors, which PvP room you wish to enter ?"; next; switch(select("3rd Job Arena", "2nd Job Arena", "All Job Arena")) { case 1: if ( (.@eaj & EAJL_THIRD) || (.@eaj & EAJ_KAGEROUOBORO) == EAJ_KAGEROUOBORO || (.@eaj & EAJ_KAGEROUOBORO) == EAJ_KAGEROUOBORO ) { close2; switch( rand(4) ) { case 1: warp "guild_vs3",16,49; end; case 2: warp "guild_vs3",50,83; end; case 3: warp "guild_vs3",83,50; end; default: warp "guild_vs3",50,16; end; } } else { mes "Only 3rd Jobs are allowed in this arena."; close; } end; case 2: if ( Upper == 1 && (.@eaj & EAJL_2) && (.@eaj & EAJL_THIRD) == false && (.@eaj & EAJ_KAGEROUOBORO) != EAJ_KAGEROUOBORO && (.@eaj & EAJ_KAGEROUOBORO) != EAJ_KAGEROUOBORO ) { switch( rand(4) ) { case 1: warp "guild_vs2",89,49; end; case 2: warp "guild_vs2",50,89; end; case 3: warp "guild_vs2",9,50; end; default: warp "guild_vs2",49,10; end; } } else { mes "This arena is only for 2nd jobs"; close; } end; case 3: close2; switch( rand(4) ) { case 1: warp "pvp_n_1-5",99,134; end; case 2: warp "pvp_n_1-5",133,100; end; case 3: warp "pvp_n_1-5",100,65; end; default: warp "pvp_n_1-5",66,99; end; } end; } } now only I understand what you are trying to do.... this one should fix it 24 minutes ago, Brizyous said: no errors but the options keep mixing, for example, i want to warp to 3rd job pvp but sometimes it warps to 2nd or all job pvp maps, yeah my fault, didn't know you are making this for pvp room script, now this make sense now those who satisfy the 1st option, cannot go inside the 2nd option room 29 minutes ago, Brizyous said: and sometimes does not warp at all.... rand(4) is random number between 0~3 so just change your case 4 into default: case Quote
0 Secrets Posted January 19, 2019 Posted January 19, 2019 .@eaj = eaclass(); if((.@eaj & EAJL_THIRD) || (.@eaj & MAPID_REBELLION == MAPID_REBELLION) || (.@eaj & MAPID_KAGEROUOBORO == MAPID_KAGEROUOBORO)) { // ... } untested 1 Quote
0 AnnieRuru Posted January 19, 2019 Posted January 19, 2019 dispbottom MAPID_REBELLION +""; // return 0 dispbottom MAPID_KAGEROUOBORO +""; // return 0 prontera,155,185,5 script kjsfksdfhj 100,{ .@eaj = eaclass(); if ( .@eaj & EAJL_THIRD || .@eaj == EAJ_KAGEROUOBORO || .@eaj == EAJ_REBELLION ) dispbottom "say yes"; end; } Quote
0 Secrets Posted January 19, 2019 Posted January 19, 2019 1 hour ago, AnnieRuru said: -snip- Your version will miss the baby version of the two jobs since they have the JOBL_BABY flag added. 1 Quote
0 AnnieRuru Posted January 19, 2019 Posted January 19, 2019 (edited) since when they have baby version I must be out from RO for very long time prontera,155,185,5 script kjsfksdfhj 100,{ .@eaj = eaclass(); dispbottom .@eaj +" 0x"+ sprintf( "%X", .@eaj ); if ( .@eaj & EAJL_THIRD || (.@eaj & EAJ_KAGEROUOBORO) == EAJ_KAGEROUOBORO || (.@eaj & EAJ_REBELLION) == EAJ_KAGEROUOBORO ) dispbottom "say yes"; end; } prontera,158,185,5 script kjsfksdfhj2 100,{ jobchange Class, 2; } EDIT: WAIT a moment .... topic start says only 3rd jobs .... means NO BABY I got tricked means the previous post answer is correct Edited January 19, 2019 by AnnieRuru Quote
0 Erebos Posted January 19, 2019 Author Posted January 19, 2019 (edited) Thanks guys! but i need two "if"; one for a script only for 3rd jobs(plus baby 3rd jobs, kagerou/oboro and rebellion) and one for a script only for 2nd rebirth jobs, sorry if my english is bad xD Edited January 19, 2019 by Brizyous Quote
0 AnnieRuru Posted January 19, 2019 Posted January 19, 2019 prontera,155,185,5 script kjsfksdfhj 100,{ .@eaj = eaclass(); dispbottom .@eaj +" 0x"+ sprintf( "%X", .@eaj ); if ( (.@eaj & EAJL_THIRD) || .@eaj == EAJ_KAGEROUOBORO || .@eaj == EAJ_REBELLION ) dispbottom "say one"; else if ( Upper == 1 && (.@eaj & EAJL_2) ) dispbottom "say two"; end; } prontera,158,185,5 script kjsfksdfhj2 100,{ jobchange Class, 2; } Quote
0 Erebos Posted January 19, 2019 Author Posted January 19, 2019 36 minutes ago, AnnieRuru said: prontera,155,185,5 script kjsfksdfhj 100,{ .@eaj = eaclass(); dispbottom .@eaj +" 0x"+ sprintf( "%X", .@eaj ); if ( (.@eaj & EAJL_THIRD) || .@eaj == EAJ_KAGEROUOBORO || .@eaj == EAJ_REBELLION ) dispbottom "say one"; else if ( Upper == 1 && (.@eaj & EAJL_2) ) dispbottom "say two"; end; } prontera,158,185,5 script kjsfksdfhj2 100,{ jobchange Class, 2; } Oh thanks! sorry i didnt understand at first, but whats the jobchange for? Quote
0 AnnieRuru Posted January 19, 2019 Posted January 19, 2019 28 minutes ago, Brizyous said: Oh thanks! sorry i didnt understand at first, but whats the jobchange for? it just some lines to help debug the script just now Secret told me that Oboro has baby support, so I just add this line to test it yeah there are some lines meant to debug and shows the value in-game Quote
0 Erebos Posted January 19, 2019 Author Posted January 19, 2019 prontera,163,171,3 script PvP Arena Guardian 966,{ .@eaj = eaclass(); mes "[Guardian]"; mes "Saludos guerrero, a que arena deseas entrar?"; switch(select("3rd Job Arena:2nd Job Arena:All Job Arena")) { case 1: if ( (.@eaj & EAJL_THIRD) || .@eaj == EAJ_KAGEROUOBORO || .@eaj == EAJ_REBELLION ) { switch( rand(4) ) { case 1: close2; warp "guild_vs3",16,49; end; case 2: close2; warp "guild_vs3",50,83; end; case 3: close2; warp "guild_vs3",83,50; end; case 4: close2; warp "guild_vs3",50,16; end; } } else { mes "Solo 3rd jobs estan permitidos en esta arena."; close; } end; case 2: if ( Upper == 1 && (.@eaj & EAJL_2) ) { switch( rand(4) ) { case 1: close2; warp "guild_vs2",89,49; end; case 2: close2; warp "guild_vs2",50,89; end; case 3: close2; warp "guild_vs2",9,50; end; case 4: close2; warp "guild_vs2",49,10; end; } } else { mes "Esta arena es solo para 2nd Jobs"; close; } end; case 3: switch( rand(4) ) { case 1: close2; warp "pvp_n_1-5",99,134; end; case 2: close2; warp "pvp_n_1-5",133,100; end; case 3: close2; warp "pvp_n_1-5",100,65; end; case 4: close2; warp "pvp_n_1-5",66,99; end; } end; } } I tried using them, no errors but the options keep mixing, for example, i want to warp to 3rd job pvp but sometimes it warps to 2nd or all job pvp maps, and sometimes does not warp at all. I'm very new in scripting, so i would like a quick explanation on what and why its is wrong, not just a fix. thanks in advance ^^ 1 Quote
Question
Erebos
I tried and googled but i cant understand well the ea_job_system.txt.
I need an only 3rd jobs(and kagerou/oboro, rebellions) and an only 2nd job constants for an
if (class == constant ) command
Help please
11 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.