-
Posts
1445 -
Joined
-
Last visited
-
Days Won
10
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Posts posted by Kido
-
-
OnMinute00: .event_timer++; if( .event_timer % 8 == 0 ) end;
Or another way is this:
OnClock0000: OnClock0800: OnClock1600: <your code>
Or this:
OnHour00: OnHour08: OnHour16: <your code>
thanks to both o:! this weill help me to set any future automatic events :3!
i find the emistry one pretty easir to use, thanks again to both!
Edit:
The invasion starsts every hour x_x
now using kenpachi script
thanks to both :3
-
however i need this to work only during WoE.
So, how may i make it like an event thar activates only durin WoE?
What @Emistry did wasn't your request @Kido. Remember you only want this to activate during WOE
*agitcheck() *agitcheck2() These function will let you check whether the server is currently in WoE mode (or WoE SE mode if the second function is called) and will return 1 if War of Emperium is on and 0 if it isn't.
Emistry did :
if ( !agitcheck() && !agitcheck2() ) // Means WOE FE and WOE SE must be off to trigger all scripts under this condition
It should be :
if ( !agitcheck() && !agitcheck2() ) end; // Terminate the script when WOE FE and WOE SE is off. Basically server is not in WOE mode.
or something like :
if ( agitcheck() || agitcheck2() ) { do this; }
Meaning either WOE FE or WOE SE is activated or is on then the do this part will be executed. I used || (or) because practically in most server WOE FE and WOE SE are not executed simultaneously.
oooohhhhh thanks i really did not know about that, on vacations or when i get more free time of the university, i will start to learn this whole thing, im loveing it more each time a learn something o:! thank you guys, this means alot to me and to my server
so, finally the script i will use is this, beause for me it seems pretty simple:
function script Sample { if( ( agitcheck() || agitcheck2() ) && isequippedcnt( 4357,4359,4361,4363,4365,4367,4457,4463,4462,4459,4456,4458,4441,4408,4430,4263,4403,4419,4376,4399,4407,4451 ) > 2 ){ message strcharinfo(0),"You can NOT wear more than 2 of this cards, Biolab, Nidhoggur, Naght, Tendrilrion, Mammoth, Rata, Duneyrr,Fallen Bishop, Gloom, Ifrit, Incantation, Kiel, Ktullanux, Tanee, Thanatos, Randgris, Crothen."; nude; } return; }
thanks to both again :3
-
It is a MvP invasion,i know that i have only to change onminute00; but im not sure if i puted correctly this script
first script
- script mvpinis -1,{ OnInit: setarray .Map$[0],"prontera","morocc","geffen","payon","alberta","aldebaran","xmas","comodo","yuno","amatsu","gonryun","umbala","louyang","ayothaya","eibroch","hugel","rachel","veins","moscovia"; setarray .MVP[0],1511,1785,1630,2320,1039,1272,1719,1389,1115,1418,1252,1086,1885,1492,1734,1251,1688,2156,1373,1147,1087,1190,1038,1157,1159,1623,1583,1312,1685,1658; end; OnMinute00: killmonster .Map$[ .RandMap ],"All"; set .RandMap,rand( getarraysize( .Map$ ) ); set .RandMVP,rand( getarraysize( .MVP ) ); monster .Map$[ .RandMap ],0,0,"MVP Event",.MVP[ .RandMVP ],1,strnpcinfo(0)+"::OnKilled"; announce "Invasion MvP : "+getmonsterinfo( .MVP[ .RandMVP ],0 )+" han invadido "+.Map$[ .RandMap ]+" .",0; end; OnKilled: announce "Evento MvP : Todos los MvP han sido cazados",0; set mvp_point, mvp_point + 1;// +1 mvp point end; }
then where to ass this? also this makes the event run every 8 hours? kinda confused i do not know this one
if( .event_timer%8 ) end; .event_timer++;
thanks in advice
-
12622,Boarding_Halter,Reins Of Mount,11,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ setmounting(); },{},{}
how can change this to Costume mount i want to use for Costume for my players
try mine
12622,Reins_Of_Mount,Reins Of Mount,11,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ setmounting(); },{},{}
this one orks with me
-
Oh thanks again o:!
so, this will make a player earns a mvp_point everytime they kill a mvp out of the event
- script iounoin -1,{ OnNPCKillEvent: if ( getmonsterinfo( killedrid,22 ) )// mvp exp set mvp_point, mvp_point + 1;// +1 mvp point end; }
and this will start the mvp invasion every 8 hours (i want it 8 hours instead of 3) and if the mvps were not killed, a @killmonster2 command will trigger and then the next invasion will start randomly, also this will make a player earn+1mvp_point when they kill the mvp on the invasion.
- script mvpinis -1,{ OnInit: setarray .Map$[0],"prontera","morocc","geffen","payon","alberta","aldebaran","xmas","comodo","yuno","amatsu","gonryun","umbala","louyang","ayothaya","eibroch","hugel","rachel","veins","moscovia"; setarray .MVP[0],1511,1785,1630,2320,1039,1272,1719,1389,1115,1418,1252,1086,1885,1492,1734,1251,1688,2156,1373,1147,1087,1190,1038,1157,1159,1623,1583,1312,1685,1658; end; OnMinute00: killmonster .Map$[ .RandMap ],"All"; if( .event_timer%8 ) end; //<--- im not sure of this part, first it kills the mvps that were not killed on the last event .event_timer++;//then if 8 hours transcurred after OnMinute00: the event will start ? because i see a end; there set .RandMap,rand( getarraysize( .Map$ ) ); set .RandMVP,rand( getarraysize( .MVP ) ); monster .Map$[ .RandMap ],0,0,"MVP Event",.MVP[ .RandMVP ],1,strnpcinfo(0)+"::OnKilled"; announce "Invasion MvP : "+getmonsterinfo( .MVP[ .RandMVP ],0 )+" occurs in "+.Map$[ .RandMap ]+" .",0; end; OnKilled: announce "Invasion MvP : All MvPs have been hunted",0; set mvp_point, mvp_point + 1;// +1 mvp point end; }
so if all of this is correct, the next questions appears
when a player kills a mvp in the invasion event, it will earns 2 mvp_points right? because the mvp invasion gives +1 mvp_point and the first script gives another +1mvp when a player kills a mvp out of the event, basicsilly both scripts stack making the player earn +2 mvp points when they kill mvps on the event o:?
thanks in adivice o:!
-
basically it's work the same...
probably mine will be resource saving i guess.. ?
you dont have to keep checking for this part
isequippedcnt( 4357,4359,4361,4363,4365,4367,4457,4463,4462,4459,4456,4458,4441,4408,4430,4263,4403,4419,4376,4399,4407,4451 )
it's the behaviour of rAthena that it will run all the stuff inside the if( .... ) conditions.
since you dont need to check that part...so just avoid from running it.
cool o: so it would still working the same if i leave it like this ?
function script Sample { if( !agitcheck() && !agitcheck2() ) && isequippedcnt > 2 ){ message strcharinfo(0),"You can NOT wear more than 2 of this cards, Biolab, Nidhoggur, Naght, Tendrilrion, Mammoth, Rata, Duneyrr,Fallen Bishop, Gloom, Ifrit, Incantation, Kiel, Ktullanux, Tanee, Thanatos, Randgris, Crothen."; nude; } return; }
-
Hello, i got this error too on the past. Actually it's pretty easy to correct, here is how it goes.
First, i recommend you to use notepad++ easier to detect same words so i will tell you how to fix it on notepad++
Use this one, this will help you a lot because it is easier too to use
izlude,125,160,4 script Votacion 920,50,50,{ function Add; function Chk; function Slot; function A_An; if(.Shops$ != "") set .@i,1; else { set .@menu$,""; for(set .@i,1; .@i<=getarraysize(.Shops$); set .@i,.@i+1) set .@menu$, .@menu$+.Shops$[.@i]+":"; set .@i, select(.@menu$); } dispbottom "Selecciona solo un objeto a la vez."; callshop "qshop"+.@i,1; npcshopattach "qshop"+.@i; end; function Add { if (getitemname(getarg(1))=="null") { debugmes "Quest reward #"+getarg(1)+" invalid (skipped)."; return; } for(set .@n,5; .@n<127; set .@n,.@n+2) { if (!getarg(.@n,0)) break; if (getitemname(getarg(.@n))=="null") { debugmes "Quest requirement #"+getarg(.@n)+" invalid (skipped)."; return; } } for(set .@i,2; .@i<.@n; set .@i,.@i+1) set getd(".q_"+getarg(1)+"["+(.@i-2)+"]"), getarg(.@i); npcshopadditem "qshop"+getarg(0),getarg(1),((.ShowZeny)?getarg(3):0); sleep 1; return; } function Chk { if (getarg(0)<getarg(1)) { set @qe0,1; return "^FF0000"; } else return "^00FF00"; } function Slot { set .@s$,getitemname(getarg(0)); switch(.ShowSlot){ case 1: if (!getitemslots(getarg(0))) return .@s$; case 2: if (getiteminfo(getarg(0),11)>0) return .@s$+" ["+getitemslots(getarg(0))+"]"; default: return .@s$; } } function A_An { setarray .@A$[0],"a","e","i","o","u"; set .@B$, "_"+getarg(0); for(set .@i,0; .@i<5; set .@i,.@i+1) if (compare(.@B$,"_"+.@A$[.@i])) return "an "+getarg(0); return "a "+getarg(0); } OnBuyItem: set .@q[0],@bought_nameid; copyarray .@q[1],getd(".q_"+@bought_nameid+"[0]"),getarraysize(getd(".q_"+@bought_nameid+"[0]")); if (!.@q[1]) { message strcharinfo(0),"An error has occurred."; end; } mes "[Master Quest]"; mes "Premio: ^0055FF"+((.@q[1]>1)?.@q[1]+"x ":"")+Slot(.@q[0])+"^000000"; mes "Requerimentos:"; if (.@q[2]) mes " > "+Chk(Zeny,.@q[2])+.@q[2]+" Zeny^000000"; if (.@q[3]) mes " > "+Chk(getd(.Points$[0]),.@q[3])+.@q[3]+" "+.Points$[1]+" ("+getd(.Points$[0])+"/"+.@q[3]+")^000000"; if (.@q[4]) for(set .@i,4; .@i<getarraysize(.@q); set .@i,.@i+2) mes " > "+Chk(countitem(.@q[.@i]),.@q[.@i+1])+((.DisplayID)?"{"+.@q[.@i]+"} ":"")+Slot(.@q[.@i])+" ("+countitem(.@q[.@i])+"/"+.@q[.@i+1]+")^000000"; next; set @qe1, getiteminfo(.@q[0],5); set @qe2, getiteminfo(.@q[0],11); addtimer 1000, strnpcinfo(1)+"::OnEnd"; while(1){ switch(select(" Hacer ^0055FF"+getitemname(.@q[0])+"^000000:"+((((@qe1&1) || (@qe1&256) || (@qe1&512)) && @qe2>0 && !@qe6)?" Probarselo...":"")+": ~ ^777777Cancelar^000000")) { case 1: if (@qe0) { mes "[Master Quest]"; mes "Te falta uno o mas objetos para hacer este item."; close; } if (!checkweight(.@q[0],.@q[1])) { mes "[Master Quest]"; mes "^FF0000Necesitas "+(((.@q[1]*getiteminfo(.@q[0],6))+Weight-MaxWeight)/10)+" capacidad de peso adicional para hacer este objeto.^000000"; close; } if (.@q[2]) set Zeny, Zeny-.@q[2]; if (.@q[3]) setd .Points$[0], getd(.Points$[0])-.@q[3]; if (.@q[4]) for(set .@i,4; .@i<getarraysize(.@q); set .@i,.@i+2) delitem .@q[.@i],.@q[.@i+1]; getitem .@q[0],.@q[1]; if (.Announce) announce strcharinfo(0)+" ha creado "+A_An(getitemname(.@q[0]))+"!",0; specialeffect2 699; close; case 2: set @qe3, getlook(3); set @qe4, getlook(4); set @qe5, getlook(5); if (@qe1&1) atcommand "@changelook 3 "+@qe2; if (@qe1&256) atcommand "@changelook 1 "+@qe2; if (@qe1&512) atcommand "@changelook 2 "+@qe2; set @qe6,1; break; case 3: close; } } OnEnd: if (@qe6) { atcommand "@changelook 3 "+@qe3; atcommand "@changelook 1 "+@qe4; atcommand "@changelook 2 "+@qe5; } for(set .@i,0; .@i<7; set .@i,.@i+1) setd "@qe"+.@i,0; end; OnInit: // --------------------- Config --------------------- // Custom points, if needed: "<variable>","<name to display>" setarray .Points$[0],"#CASHPOINTS","Cash Points"; set .Announce,1; // Announce quest completion? (1: yes / 0: no) set .ShowSlot,1; // Show item slots? (2: all equipment / 1: if slots > 0 / 0: never) set .DisplayID,1; // Show item IDs? (1: yes / 0: no) set .ShowZeny,0; // Show Zeny cost, if any? (1: yes / 0: no) // Shop categories, if needed: "<Shop 1>","<Shop 2>"{,...}; // Duplicate dummy data for any additional shops (bottom of script). // If no categories, use the second line instead (remove //). setarray .Shops$[1],"Quest Items","Usables","Hats","Basic MvP Cards"; // set .Shops$,"n/a"; // Add(<shop number>,<reward ID>,<reward amount>,<Zeny cost>,<point cost>, // <required item ID>,<required item amount>{,...}); // Shop number corresponds with order above (default is 1). // Note: Do NOT use a reward item more than once! Add(1,7563,20,0,3); Add(2,14232,3,1,3); Add(3,12186,1,20,10); Add(4,4142,1,0,1); // -------------------------------------------------- for(set .@i,1; .@i<=getarraysize(.Shops$); set .@i,.@i+1) npcshopdelitem "qshop"+.@i,909; end; } // -------- Dummy data (duplicate as needed) -------- - shop qshop1 -1,909:-1 - shop qshop2 -1,909:-1 - shop qshop3 -1,909:-1 - shop qshop4 -1,909:-1 niflheim,189,192,4 duplicate(Votacion) Votacion#niflheim1 920
Allright, you have to look for all "qshop" words on the script, and then change it
notepad++ shows you all the words, like this
select the word and then hit on your keyboard ctrl+f
then go to Replace Tab, the pic. shows it itself
then, you have to change the word for anyone you like, the thing is that the word to replace have to be different and then hit Replace All
here is the example
then there you have
all the qshop were changed to NEWqshop
you may get this message
to create more, yo can just copy and paste the script, just remember to change this:
- coordinates
- name of the npc
- the qshop words
- the items for selling/tradding
Finally, the script will look like this
izlude,125,160,4 script Votacion 920,50,50,{ function Add; function Chk; function Slot; function A_An; if(.Shops$ != "") set .@i,1; else { set .@menu$,""; for(set .@i,1; .@i<=getarraysize(.Shops$); set .@i,.@i+1) set .@menu$, .@menu$+.Shops$[.@i]+":"; set .@i, select(.@menu$); } dispbottom "Selecciona solo un objeto a la vez."; callshop "NEWqshop"+.@i,1; npcshopattach "NEWqshop"+.@i; end; function Add { if (getitemname(getarg(1))=="null") { debugmes "Quest reward #"+getarg(1)+" invalid (skipped)."; return; } for(set .@n,5; .@n<127; set .@n,.@n+2) { if (!getarg(.@n,0)) break; if (getitemname(getarg(.@n))=="null") { debugmes "Quest requirement #"+getarg(.@n)+" invalid (skipped)."; return; } } for(set .@i,2; .@i<.@n; set .@i,.@i+1) set getd(".q_"+getarg(1)+"["+(.@i-2)+"]"), getarg(.@i); npcshopadditem "NEWqshop"+getarg(0),getarg(1),((.ShowZeny)?getarg(3):0); sleep 1; return; } function Chk { if (getarg(0)<getarg(1)) { set @qe0,1; return "^FF0000"; } else return "^00FF00"; } function Slot { set .@s$,getitemname(getarg(0)); switch(.ShowSlot){ case 1: if (!getitemslots(getarg(0))) return .@s$; case 2: if (getiteminfo(getarg(0),11)>0) return .@s$+" ["+getitemslots(getarg(0))+"]"; default: return .@s$; } } function A_An { setarray .@A$[0],"a","e","i","o","u"; set .@B$, "_"+getarg(0); for(set .@i,0; .@i<5; set .@i,.@i+1) if (compare(.@B$,"_"+.@A$[.@i])) return "an "+getarg(0); return "a "+getarg(0); } OnBuyItem: set .@q[0],@bought_nameid; copyarray .@q[1],getd(".q_"+@bought_nameid+"[0]"),getarraysize(getd(".q_"+@bought_nameid+"[0]")); if (!.@q[1]) { message strcharinfo(0),"An error has occurred."; end; } mes "[Master Quest]"; mes "Premio: ^0055FF"+((.@q[1]>1)?.@q[1]+"x ":"")+Slot(.@q[0])+"^000000"; mes "Requerimentos:"; if (.@q[2]) mes " > "+Chk(Zeny,.@q[2])+.@q[2]+" Zeny^000000"; if (.@q[3]) mes " > "+Chk(getd(.Points$[0]),.@q[3])+.@q[3]+" "+.Points$[1]+" ("+getd(.Points$[0])+"/"+.@q[3]+")^000000"; if (.@q[4]) for(set .@i,4; .@i<getarraysize(.@q); set .@i,.@i+2) mes " > "+Chk(countitem(.@q[.@i]),.@q[.@i+1])+((.DisplayID)?"{"+.@q[.@i]+"} ":"")+Slot(.@q[.@i])+" ("+countitem(.@q[.@i])+"/"+.@q[.@i+1]+")^000000"; next; set @qe1, getiteminfo(.@q[0],5); set @qe2, getiteminfo(.@q[0],11); addtimer 1000, strnpcinfo(1)+"::OnEnd"; while(1){ switch(select(" Hacer ^0055FF"+getitemname(.@q[0])+"^000000:"+((((@qe1&1) || (@qe1&256) || (@qe1&512)) && @qe2>0 && !@qe6)?" Probarselo...":"")+": ~ ^777777Cancelar^000000")) { case 1: if (@qe0) { mes "[Master Quest]"; mes "Te falta uno o mas objetos para hacer este item."; close; } if (!checkweight(.@q[0],.@q[1])) { mes "[Master Quest]"; mes "^FF0000Necesitas "+(((.@q[1]*getiteminfo(.@q[0],6))+Weight-MaxWeight)/10)+" capacidad de peso adicional para hacer este objeto.^000000"; close; } if (.@q[2]) set Zeny, Zeny-.@q[2]; if (.@q[3]) setd .Points$[0], getd(.Points$[0])-.@q[3]; if (.@q[4]) for(set .@i,4; .@i<getarraysize(.@q); set .@i,.@i+2) delitem .@q[.@i],.@q[.@i+1]; getitem .@q[0],.@q[1]; if (.Announce) announce strcharinfo(0)+" ha creado "+A_An(getitemname(.@q[0]))+"!",0; specialeffect2 699; close; case 2: set @qe3, getlook(3); set @qe4, getlook(4); set @qe5, getlook(5); if (@qe1&1) atcommand "@changelook 3 "+@qe2; if (@qe1&256) atcommand "@changelook 1 "+@qe2; if (@qe1&512) atcommand "@changelook 2 "+@qe2; set @qe6,1; break; case 3: close; } } OnEnd: if (@qe6) { atcommand "@changelook 3 "+@qe3; atcommand "@changelook 1 "+@qe4; atcommand "@changelook 2 "+@qe5; } for(set .@i,0; .@i<7; set .@i,.@i+1) setd "@qe"+.@i,0; end; OnInit: // --------------------- Config --------------------- // Custom points, if needed: "<variable>","<name to display>" setarray .Points$[0],"#CASHPOINTS","Cash Points"; set .Announce,1; // Announce quest completion? (1: yes / 0: no) set .ShowSlot,1; // Show item slots? (2: all equipment / 1: if slots > 0 / 0: never) set .DisplayID,1; // Show item IDs? (1: yes / 0: no) set .ShowZeny,0; // Show Zeny cost, if any? (1: yes / 0: no) // Shop categories, if needed: "<Shop 1>","<Shop 2>"{,...}; // Duplicate dummy data for any additional shops (bottom of script). // If no categories, use the second line instead (remove //). setarray .Shops$[1],"Votacion-Objetos Quest","Votacion-Consumibles utiles","Votacion-Hats coleccionables","Votacion-Cartas MvP basicas"; // set .Shops$,"n/a"; // Add(<shop number>,<reward ID>,<reward amount>,<Zeny cost>,<point cost>, // <required item ID>,<required item amount>{,...}); // Shop number corresponds with order above (default is 1). // Note: Do NOT use a reward item more than once! Add(1,7563,20,0,3); Add(1,7511,20,0,3); Add(1,1039,50,0,3); Add(1,7262,50,0,3); Add(1,7268,50,0,3); Add(1,7063,50,0,3); Add(1,7441,50,0,3); Add(1,7440,50,0,3); Add(1,7168,100,0,3); Add(1,983,10,0,3); Add(1,978,10,0,3); Add(1,979,10,0,3); Add(1,980,10,0,3); Add(1,975,10,0,3); Add(1,981,10,0,3); Add(1,982,10,0,3); Add(2,14232,3,1,3); Add(2,14545,1,1,1); Add(2,12210,1,1,60); Add(2,12246,1,1,15); Add(2,12103,1,1,20); Add(2,14234,4,1,10); Add(2,12106,1,1,10); Add(2,14191,1,1,35); Add(2,12912,1,1,70); Add(2,12214,1,1,8); Add(2,7776,1,1,5); Add(2,13710,10,10,40); Add(2,13610,1,0,45); Add(2,7619,1,0,10); Add(2,13611,1,0,40); Add(2,7620,1,0,10); Add(2,14590,1,0,30); Add(2,14588,10,0,10); Add(2,14589,10,0,10); Add(3,12186,1,20,10); Add(3,5076,1,0,10); Add(3,5480,1,0,10); Add(3,5057,1,0,10); Add(3,5427,1,0,10); Add(3,5236,1,0,10); Add(3,5235,1,0,10); Add(3,5401,1,0,10); Add(3,5288,1,0,10); Add(3,5597,1,0,10); Add(3,5594,1,0,10); Add(3,5463,1,0,10); Add(3,5536,1,0,10); Add(3,5171,1,32,32); Add(3,5539,1,32,30); Add(3,18600,1,20,10); Add(3,5253,1,20,10); Add(3,5584,1,20,10); Add(3,18503,1,20,10); Add(3,5526,1,20,10); Add(3,5378,1,20,!0); Add(3,5382,1,32,16); Add(3,5311,1,32,35); Add(3,5520,1,32,16); Add(3,5099,1,18,6); Add(3,5137,1,30,35); Add(3,5138,1,18,6); Add(3,5139,1,15,5); Add(3,5140,1,18,6); Add(3,5142,1,17,5); Add(3,5143,1,18,6); Add(3,5152,1,18,6); Add(3,5181,1,18,6); Add(3,5182,1,20,9); Add(3,5183,1,20,9); Add(3,5185,1,18,6); Add(3,5186,1,18,6); Add(3,5187,1,18,6); Add(3,5190,1,0,15); Add(3,5200,1,0,15); Add(3,5579,1,0,15); Add(3,5436,1,0,15); Add(3,5282,1,0,15); Add(3,5098,1,0,15); Add(3,5403,1,0,15); Add(3,5184,1,0,15); Add(3,5225,1,0,15); Add(3,5305,1,0,15); Add(3,5259,1,0,15); Add(3,5495,1,0,15); Add(3,5315,1,0,15); Add(3,5324,1,0,15); Add(3,5362,1,0,15); Add(3,5269,1,0,15); Add(4,4142,1,0,1); Add(4,4147,1,0,1); Add(4,4121,1,0,1); Add(4,4305,1,0,3); Add(4,4132,1,0,3); Add(4,4143,1,0,5); Add(4,4135,1,0,5); Add(4,4123,1,0,5); Add(4,4131,1,0,5); Add(4,4137,1,0,5); // -------------------------------------------------- for(set .@i,1; .@i<=getarraysize(.Shops$); set .@i,.@i+1) npcshopdelitem "NEWqshop"+.@i,909; end; } // -------- Dummy data (duplicate as needed) -------- - shop NEWqshop1 -1,909:-1 - shop NEWqshop2 -1,909:-1 - shop NEWqshop3 -1,909:-1 - shop NEWqshop4 -1,909:-1 niflheim,189,192,4 duplicate(Votacion) Votacion#niflheim1 920
hope this helps
- 1
-
function script Sample { if( !agitcheck() && !agitcheck2() ) // <--------- ADD THIS if( isequippedcnt( .......... ) > 2 ){ mes "....."; } return; }
so it would be like this?
function script Sample { if( !agitcheck() && !agitcheck2() ) && isequippedcnt( 4357,4359,4361,4363,4365,4367,4457,4463,4462,4459,4456,4458,4441,4408,4430,4263,4403,4419,4376,4399,4407,4451 ) > 2 ){ message strcharinfo(0),"You can NOT wear more than 2 of this cards, Biolab, Nidhoggur, Naght, Tendrilrion, Mammoth, Rata, Duneyrr,Fallen Bishop, Gloom, Ifrit, Incantation, Kiel, Ktullanux, Tanee, Thanatos, Randgris, Crothen."; nude; } return; }
-
This script makes the user to NOT being able to equipo more than 2 restriected mvp cards, however i need this to work only during WoE.
So, how may i make it like an event thar activates only durin WoE?
i think I'm using Euphy's WoE controller. Here is both codes
Restrict:
function script Sample { if( isequippedcnt( 4357,4359,4361,4363,4365,4367,4457,4463,4462,4459,4456,4458,4441,4408,4430,4263,4403,4419,4376,4399,4407,4451 ) > 2 ){ message strcharinfo(0),"You can NOT wear more than 2 of this cards, Biolab, Nidhoggur, Naght, Tendrilrion, Mammoth, Rata, Duneyrr,Fallen Bishop, Gloom, Ifrit, Incantation, Kiel, Ktullanux, Tanee, Thanatos, Randgris, Crothen."; nude; } return; }
I found this woe controlloer and i found it like this, i think it's Euphy's woe controller but when i downloaded it has no credits D:!
// Eypheria RO // Manipulado por LinoBH // Este NPC esta siendo usado en Eypheria RO Server // Web del Server: http://forostotalro.awardspace.com izlude,93,153,4 script WoE-King 108,{ doevent "WOE_CONTROL::OnMenu"; end; OnAgitStart: while(agitcheck()) { misceffect 58; sleep 425; } end; } - script WOE_CONTROL -1,{ function Disp_Owner; function Add_Zero; OnInit: // -------------------------------------------------------------------------------------------------------------------------- set .CastleWarp,0; // 1: Always enable all castle warps. | 0: Warp only to active castles. set .AutoKick,1; // Automatically kick players from inactive castles during WOE? (1:yes / 0:no) set .ExitWarp,1; // Warp all players from castles when WOE ends? (1:yes / 0:no) set .GMAccess,99; // GM level required to access Session Manager (cannot be 0) setarray .Reward[1],675,1000; // Reward for all members of conquering guilds, per castle: <ID>,<Count>{,...} (0 to disable) // -------------------------------------------------------------------------------------------------------------------------- set .Size, getarraysize($WOE_CONTROL); setarray .Castles$[0], "prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05", "payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05", "gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05", "aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05", "arug_cas01","arug_cas02","arug_cas03","arug_cas04","arug_cas05", "schg_cas01","schg_cas02","schg_cas03","schg_cas04","schg_cas05"; setarray .EndLabel$[0],"aru01","aru02","aru03","aru04","aru05","sch01","sch02","sch03","sch04","sch05"; setarray .Days$[0],"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"; setarray .Regions$[0],"Prontera","Payon","Geffen","Aldebaran","Arunafeltz","Schwaltzvalt"; setarray .Map$[0],"prt_gld","pay_gld","gef_fild13","alde_gld","aru_gld","sch_gld"; setarray .MapX[0],134,240,153,111,208,121,295,317,140,204,214,308,143,193,305,48, 95,142,239,264,158,83, 68,299,292,293,288, 97,137, 71; setarray .MapY[0], 65,128,137,240,240,233,116,293,160,266, 75,240,240,278, 87,83,249, 85,242, 90,272,47,155,345,107,100,252,196, 90,315; if (!agitcheck() && !agitcheck2()) sleep 4000; set .Init,1; OnMinute00: if (agitcheck() || agitcheck2()) { for(set .@i,0; .@i<.Size; set .@i,.@i+4) if (gettime(4)==$WOE_CONTROL[.@i] && gettime(3)==$WOE_CONTROL[.@i+2]) { OnWOEEnd: announce "The War Of Emperium is over!",bc_all|bc_woe; AgitEnd; AgitEnd2; sleep 1000; for(set .@j,0; .@j<30; set .@j,.@j+1) { if (.Active[0]&(1<<.@j)) Disp_Owner(.Castles$[.@j],1); else if (.AutoKick) removemapflag .Castles$[.@j], mf_loadevent; if (.ExitWarp) maprespawnguildid .Castles$[.@j],0,3; } if (.Reward[0] && .Active[0] && .ForceEnd != 2) callsub OnReward, .Active[0]; deletearray .Active[0],2; if (.ForceEnd) { set .ForceEnd,0; end; } break; } } sleep 5; if ((!agitcheck() && !agitcheck2()) || .Init) { if (!agitcheck() && !agitcheck2()) set .Init,0; for(set .@i,0; .@i<.Size; set .@i,.@i+4) if (gettime(4)==$WOE_CONTROL[.@i] && gettime(3)>=$WOE_CONTROL[.@i+1] && gettime(3)<$WOE_CONTROL[.@i+2]) { deletearray .Active[0],2; set .Active[0], $WOE_CONTROL[.@i+3]; if (.Init) { AgitEnd; AgitEnd2; } else announce "The War Of Emperium has begun!",bc_all|bc_woe; sleep 1000; AgitStart; AgitStart2; for(set .@j,0; .@j<30; set .@j,.@j+1) { if (.Active[0]&(1<<.@j)) { if (!.Init) Disp_Owner(.Castles$[.@j],0); set .Active[1], .Active[1] | (1<<((.@j/5)+1)); } else { if (.AutoKick) setmapflag .Castles$[.@j], mf_loadevent; if (.@j<20) { donpcevent "Agit#"+.Castles$[.@j]+"::OnAgitEnd"; killmonster .Castles$[.@j], "Agit#"+.Castles$[.@j]+"::OnAgitBreak"; } else { donpcevent "Manager#"+.Castles$[.@j]+"_02::OnAgitEnd2"; killmonster .Castles$[.@j], "Steward#"+.EndLabel$[.@j-20]+"::OnStartArena"; } } } break; } } set .Init,0; end; function Disp_Owner { set .@o, getcastledata(getarg(0),1); if (.@o) announce "The ["+getcastlename(getarg(0))+"] castle "+((getarg(1))?"has been conquered":"is currently held")+" by the ["+getguildname(.@o)+"] guild.",bc_all|bc_woe; else announce "The ["+getcastlename(getarg(0))+"] castle is currently unoccupied.",bc_all|bc_woe; return; } function Add_Zero { return ((getarg(0)<10)?"0":"")+getarg(0)+(getarg(1,0)?".":":")+"00"; } OnReward: for(set .@i,0; .@i<30; set .@i,.@i+1) if (getarg(0)&(1<<.@i)) { set .@guild, getcastledata(.Castles$[.@i],1); if (.@guild) { deletearray .@acc[0], getarraysize(.@acc); deletearray .@char[0], getarraysize(.@char); query_sql("SELECT account_id,char_id FROM `guild_member` WHERE guild_id = '"+.@guild+"'", .@acc, .@char); for(set .@j,0; .@j<getarraysize(.@acc); set .@j,.@j+1) if (isloggedin(.@acc[.@j],.@char[.@j])) { for(set .@k,0; .@k<getarraysize(.Reward); set .@k,.@k+2) getitem .Reward[.@k], .Reward[.@k+1], .@acc[.@j]; message rid2name(.@acc[.@j]),"You have been rewarded for conquering "+getcastlename(.Castles$[.@i])+"."; } sleep 1; } } return; OnPCLoadMapEvent: if (!compare(strcharinfo(3),"g_cas")) end; sleep2 1000; message strcharinfo(0), getcastlename(strcharinfo(3))+" is inactive during this WOE session."; sleep2 5000; if (compare(strcharinfo(3),"g_cas")) warp "SavePoint",0,0; end; OnMenu: while(1) { mes "[WOE Information]"; if (agitcheck() || agitcheck2()) { if (!.Size) mes "The War of Emperium is ^0055FFactive^000000."; else { for(set .@i,0; .@i<.Size; set .@i,.@i+4) if (gettime(4)==$WOE_CONTROL[.@i] && gettime(3)>=$WOE_CONTROL[.@i+1] && gettime(3)<$WOE_CONTROL[.@i+2]) { set .@i, $WOE_CONTROL[.@i+2]; break; } mes "The War of Emperium is ^0055FFactive^000000 until ^FF0000"+Add_Zero(.@i)+"^000000 in the following regions:"; mes " "; for(set .@i,0; .@i<6; set .@i,.@i+1) if (.Active[1]&(1<<(.@i+1))) mes " > ^777777"+.Regions$[.@i]+"^000000"; } } else { set .@j,0; set .@k,0; for(set .@i,0; .@i<.Size; set .@i,.@i+4) if ((gettime(4)==$WOE_CONTROL[.@i] && gettime(3)<=$WOE_CONTROL[.@i+1]) || gettime(4)<$WOE_CONTROL[.@i]) { set .@j, $WOE_CONTROL[.@i]; set .@k, $WOE_CONTROL[.@i+1]; break; } if (!.@j && !.@k) { set .@j, $WOE_CONTROL[0]; set .@k, $WOE_CONTROL[1]; } mes "The War of Emperium is ^777777inactive^000000."; if (.Size) { mes " "; mes "The next session will begin"; mes "on ^0055FF"+.Days$[.@j]+"^000000 at "+Add_Zero(.@k)+"^000000."; } } next; switch(select(""+((.CastleWarp || .Active[1])?" ~ Warp to castles...":"")+": ~ Check schedule...: ~ View castle owners...:"+((getgmlevel()<.GMAccess || !getgmlevel())?"":" ~ Manage sessions...")+": ~ ^777777Cancel^000000")) { case 1: set .@menu$,""; for(set .@i,0; .@i<6; set .@i,.@i+1) { if (.CastleWarp || .Active[1]&(1<<(.@i+1))) set .@menu$, .@menu$+" ~ "+((.Active[1]&(1<<(.@i+1)))?"^0055FF":"^777777")+.Regions$[.@i]+" Castles^000000"; set .@menu$, .@menu$+":"; } set .@i, select(.@menu$)-1; set .@menu$,""; for(set .@j,.@i*5; .@j<(.@i*5)+5; set .@j,.@j+1) { if (.CastleWarp || .Active[0]&(1<<.@j)) set .@menu$, .@menu$+" ~ "+((.Active[0]&(1<<.@j))?"^0055FF":"^777777")+getcastlename(.Castles$[.@j])+"^000000"; set .@menu$, .@menu$+":"; } set .@j, select(.@menu$)-1; warp .Map$[.@i],.MapX[(.@i*5)+.@j],.MapY[(.@i*5)+.@j]; close; case 2: mes "[Schedule]"; if (.Size) { for(set .@i,0; .@i<.Size; set .@i,.@i+4) { mes "> ^FF0000"+.Days$[$WOE_CONTROL[.@i]]+" ("+Add_Zero($WOE_CONTROL[.@i+1])+"-"+Add_Zero($WOE_CONTROL[.@i+2])+")^000000"; for(set .@j,0; .@j<30; set .@j,.@j+1) if ($WOE_CONTROL[.@i+3]&(1<<.@j)) mes " ~ "+getcastlename(.Castles$[.@j])+" ^777777("+.Castles$[.@j]+")^000000"; if (.@i+4<.Size) mes " "; sleep2 1; } } else mes "No times are configured."; next; break; case 3: mes "[Castle Ownership]"; for(set .@i,0; .@i<6; set .@i,.@i+1) { set .@k, .@i*5; mes "> ^FF0000"+.Regions$[.@i]+"^000000"; for(set .@j,.@k; .@j<(.@k+5); set .@j,.@j+1) { set .@t, getcastledata(.Castles$[.@j],1); mes " ~ "+getcastlename(.Castles$[.@j])+": "+((.@t)?"^0055FF"+getguildname(.@t):"^777777unoccupied")+"^000000"; } if (.@i<5) mes " "; } next; break; case 4: while(1) { mes "[Session Manager]"; mes "There are ^0055FF"+(.Size/4)+" session(s)^000000 configured."; mes "What would you like to do?"; next; switch(select(" ~ Add a session...: ~ Delete a session...: ~ Reload settings...:"+((agitcheck() || agitcheck2())?" ~ End WOE session...":"")+": ~ ^777777Go back^000000")) { case 1: mes "[New Session]"; if (.Size > 127) { mes "You have already reached the maximum of 32 sessions."; next; break; } mes "Select a day."; next; set .@menu$,""; for(set .@i,0; .@i<7; set .@i,.@i+1) set .@menu$, .@menu$+" ~ "+.Days$[.@i]+":"; set .@Day, select(.@menu$)-1; mes "[New Session]"; mes "Select a start time for ^0055FF"+.Days$[.@Day]+"^000000."; next; set .@menu$,""; for(set .@i,0; .@i<23; set .@i,.@i+1) set .@menu$, .@menu$+" ~ "+Add_Zero(.@i,1)+":"; set .@Start, select(.@menu$)-1; mes "[New Session]"; mes "Select an end time for ^0055FF"+.Days$[.@Day]+"^000000."; next; set .@menu$,""; for(set .@i,.@Start+1; .@i<24; set.@i,.@i+1) set .@menu$, .@menu$+" ~ "+Add_Zero(.@i,1)+":"; set .@End, select(.@menu$)+.@Start; for(set .@i,0; .@i<.Size; set .@i,.@i+4) if (.@Day==$WOE_CONTROL[.@i] && ((.@Start >= $WOE_CONTROL[.@i+1] && .@Start < $WOE_CONTROL[.@i+2]) || (.@End > $WOE_CONTROL[.@i+1] && .@End <= $WOE_CONTROL[.@i+2]) || (.@Start <= $WOE_CONTROL[.@i+1] && .@End >= $WOE_CONTROL[.@i+2]))) { mes "[New Session]"; mes "The chosen times overlap with an existing session."; next; set .@d,1; break; } if (.@d) { set .@d,0; break; } set .@Castle,0; while(1) { mes "[New Session]"; mes "^0055FF"+.Days$[.@Day]+" ("+Add_Zero(.@Start)+"-"+Add_Zero(.@End)+")^000000"; mes " > Castles:"; if (!.@Castle) mes " ~ ^777777(none selected)^000000"; else for(set .@i,0; .@i<30; set .@i,.@i+1) if (.@Castle&(1<<.@i)) mes " ~ "+getcastlename(.Castles$[.@i])+" ("+.Castles$[.@i]+")"; next; set .@menu$,((.@Castle)?" ~ ^FF0000Finished...^000000":"")+":"; for(set .@i,0; .@i<30; set .@i,.@i+1) set .@menu$, .@menu$+" ~ "+((.@Castle&(1<<.@i))?"^0055FF":"")+getcastlename(.Castles$[.@i])+" ("+.Castles$[.@i]+")^000000:"; set .@i, select(.@menu$)-1; if (.@i) set .@Castle, .@Castle^(1<<(.@i-1)); else { mes "[New Session]"; mes "Are you sure?"; next; switch(select(" ~ ^0055FFAdd session...^000000: ~ Continue selecting castles...: ~ ^777777Cancel^000000")) { case 1: for(set .@i,0; .@i<.Size; set .@i,.@i+4) if ((.@Day==$WOE_CONTROL[.@i] && .@End<=$WOE_CONTROL[.@i+1]) || .@Day<$WOE_CONTROL[.@i]) { set .@d,1; break; } if (!.@d) { set .@d,1; set .@i,.Size; } copyarray $WOE_CONTROL[.@i+4], $WOE_CONTROL[.@i], .Size-.@i; setarray $WOE_CONTROL[.@i], .@Day, .@Start, .@End, .@Castle; set .Size, getarraysize($WOE_CONTROL); case 3: mes "[New Session]"; mes ((.@d)?"Session added.":"Cancelled."); next; set .@d,1; case 2: break; } if (.@d) { set .@d,0; break; } } } break; case 2: mes "[Remove Session]"; if (!.Size) { mes "There are no sessions configured."; next; break; } mes "Select a session to remove."; next; set .@menu$,""; for(set .@i,0; .@i<.Size; set .@i,.@i+4) set .@menu$, .@menu$+" ~ "+.Days$[$WOE_CONTROL[.@i]]+" ("+Add_Zero($WOE_CONTROL[.@i+1],1)+"-"+Add_Zero($WOE_CONTROL[.@i+2],1)+"):"; set .@menu$, .@menu$+" ~ ^777777Cancel^000000"; set .@i, select(.@menu$)-1; if (.@i==(.Size/4)) break; mes "[Remove Session]"; mes "Delete ^0055FF"+.Days$[$WOE_CONTROL[.@i*4]]+"'s^000000 session?"; mes "This action cannot be undone."; next; set .@j, select(" ~ ^FF0000Delete session...^000000: ~ ^777777Cancel^000000"); mes "[Remove Session]"; if (.@j==2) mes "Cancelled."; else { deletearray $WOE_CONTROL[.@i*4],4; set .Size, getarraysize($WOE_CONTROL); mes "Session deleted."; } next; break; case 3: mes "[Reload Settings]"; mes "This will trigger all events related to new session configurations, if any."; if (agitcheck() || agitcheck2()) { mes " "; mes "Be aware that this will disrupt the current WOE session."; } next; set .@i, select(" ~ ^0055FFReload settings...^000000: ~ ^777777Cancel^000000"); mes "[Reload Settings]"; if (.@i==2) mes "Cancelled."; else { set .Init,1; donpcevent "WOE_CONTROL::OnMinute00"; mes "Variables have been re-initialized."; } next; break; case 4: mes "[Force Agit End]"; if (!agitcheck() && !agitcheck2()) { mes "WOE has already ended."; next; break; } mes "This command will safely execute all AgitEnd events."; mes " "; mes "Kill the current WOE session?"; next; set .@i, select(" ~ ^FF0000End session...^000000:"+((.Reward[0])?" ~ ^FF0000End session without rewards...^000000":"")+": ~ ^777777Cancel^000000"); mes "[Force Agit End]"; if (.@i==3) mes "Cancelled."; else { set .ForceEnd, .@i; donpcevent "WOE_CONTROL::OnWOEEnd"; mes "WOE session terminated."; } next; break; case 5: set .@d,1; break; } if (.@d) { set .@d,0; break; } } break; case 5: close; } } } payon.gat,162,221,4 duplicate(WoE-King) WoE-King#payon1 108 niflheim,186,187,4 duplicate(WoE-King) WoE-King#payon1 108
Thanks, hope this helps
My players will love this, thanks again!
-
i think it's because they didnt set the Default Browser as Google Chrome.
thanks for the repply sir
i have it as my deffault browser, is it possible to make the neon change their deffault browser by clicking a link or something?
-
Well i just want to make the neoncube patcher open a new tab if it is existing one on the player clicking a link, or just to open a new tab on the predetermined browses and if the browser was already open, just add the new tab to that browser.
The problem is that i have google chrome for predetermined browser but when i click a link on my neon cube patcher, tha link opens a new window with internet explorer D: D: D:!! nothing agains it, it is only that 99% of my users have google chrome as predetermined
thanks in adanvice !
huh here is my code example
<a href="http://tairyu-ro.dreksoft.com/noticias/actualizacion.php" target=_blank>News</a>
thanks again in advance (sorry my english)
-
ea mod cp is available only in ceres cp or it is available in flux cp also?
i contacted neza and seems like it is only available for eamod users, however, there are some features that works on rathena users, soy you may contact neza to see wich features you may buy
-
thank you so much! it's hard to me to understand the whole script but thanks to a friend of mine now we may look at both scripts and codes so we can compare a lot of things, thank you this totally helps!
just a question
why you did not include storage? it is not possible o:? just asking
-
I was talking with a friend and he said that it is possible to detect how many cards or X item currently exist in the server by using the SQL DB. He managed to show how many players have X item and at wich ID that item corresponds to.
Here is anexample:
Card: High Priest card (4363) - Players that owns this card: 1 -
Existentes = how many of that cards exists on the whole server
so, how can i get that information?
it's all about php and mysql but i have tryid for hours and can not find how D:!
-
did you do like this ?
4357,B_Seyren_Card,Lord Knight Card,6,20,,10,,,,,,,,769,,,,,{ skill "LK_BERSERK",1; },{ callfunc "Sample"; },{}
or just simply added the function ..hmm
you need @reloaditemdb and have them to relog / re-equip the item to make the effect take place.
thanks now it works :´D i hope i will recover some players, this will help, thanks again :´3!
-
it did not work ): or do i have to shutdown the server and then turn it on?
because i added it and i also did @reloadscript but i'm still able to equip them ):
-
but this is not costume......what is
7,2,1,,
what is the 1? where does it go? 4096 is the costume tab lower headgear
You may edit it after you tested it, because i did not aded any weight or price, that was taken from a custom lower headgear that i had
first try it then if you like, you can edit it to match your preferences o:
-
...
it is a costume lower headgear. Costume tab.
try this
26085,Black_Furry_Coat,Black_Furry_Coat,5,0,0,0,,0,,1,0xFFFFFFFF,7,2,1,,1,0,1036,{ bonus bAllStats,1; },{ },{ }
-
...
yeah sir, but i mean this:
if is a card, armor, consumible, weapon etc
then the effect
by the way, this is the correct script
,{ bonus bAllStats,1; }.{}.{}
but tell me please, if that item is an armor, a weapon, a card or ???
-
Do you want to enable only one card not two?
allright maybe i just asked too much, i just want to make that script to work
when more than 2 of the ids of items on the script are equiped on, they will get its equipments off
that is what the script is supposed to do, but for example when i equip ID 4367 and 4457 the equipments won't get off
please, im so sad because some of my players leave my server for the over powered players that has many mvps
thanks i hope you guys can help me im begging
-
i see m so i will need to reboot the server to take new effects, allright, working on it, thanks guys!
-
thanks
-
No problem!
:3
-
...
well, i can not find the error, give me the item description i will make it for you ok then if it works, we may compare and see that was the error
MvP invasion
in Scripting Support
Posted
Hello, i just want to make this script summon all mvps instead of 1, i tought it was going to summon all mvps but actually it only summons 1 random mvp of the current IDs D:!
here is the code
im not sure about it, for now i can not test it, but to change the numers of mvps that will spawn on invasion i have to change this number/line?
monster .Map$[ .RandMap ],0,0,"MVP Event",.MVP[ .RandMVP ],1,strnpcinfo(0)+"::OnKilled";
the problem is, that if i manage to make the scripot to summon all the mvps, it may summon repeated mvps D:! and no my players and i would love to summon 1 mvp of each ID on the script ):
help please D:
thanks in advicie