Hatake Kakashi Posted January 23, 2012 Posted January 23, 2012 i think its on my freebies npc. here's scripts - script Freebies -,{ OnPCLoginEvent: if( #newbie > 0 || BaseLevel > 1) { mes "[ReunitedRO GM TEAM]"; mes "You have taken the items before or you might not reach the basic requirements for this. "; close; } if(BaseLevel==1 && BaseClass == Job_Novice){ mes "[ReunitedRO GM TEAM]"; mes "Welcome to Reunited RO!"; mes "I can give you Newbie Packages!"; mes "So you can Level up fast!"; mes "Please have fun and enjoy your stay!"; mes "Oh! by the way, please specify your Job when you reach First Job!"; next; switch (select ("Diabolus Set:Valkyrie Set")) { Case 1: mes "[ReunitedRO GM TEAM]"; mes "You've chosen Diabolus Set. Here you go!"; mes "Have fun playing in the server!"; getitem 2375,1; getitem 2433,1; getitem 2537,1; getitem 2374,1; getitem 30130,1; close2; set #newbie,1; close; warp "prontera" ,155,179; save "prontera",155,180; Case 2: mes "[ReunitedRO GM TEAM]"; mes "You've chosen Valkyrie Set. Here you go!"; mes "Have fun playing in the server!"; getitem 2357,1; getitem 2421,1; getitem 2524,1; getitem 2115,1; getitem 30131,1; close2; set #newbie,1; close; warp "prontera" ,155,179; save "prontera",155,180; } } close; OnInit: waitingroom "Freebies",0; end; } here's the error. Quote
Kenpachi Posted January 23, 2012 Posted January 23, 2012 You have to many different OnPCLoginEvent events. Either you raise MAX_EVENTQUEUE in ../map/map.h (requires re-compiling) or you join all you different OnPCLoginEvent events into one (max. two). Quote
ngek202 Posted January 23, 2012 Posted January 23, 2012 (edited) you could try to adjust your MAX_EVENTQUEUE on src/map/map. lol forum problem triple posted it Ok now i noticed you had a mistake with line 1 it's supposed to be -1 (floating npc) coz if u manage to run this it will produce an Error: npc script count: failed npc_checknear test. so it should be like this instead: -<TAB>script<TAB>Freebies<TAB>-1,{ Edited January 23, 2012 by ngek202 Quote
Hatake Kakashi Posted January 23, 2012 Author Posted January 23, 2012 how to put change into automatic get that freebies? its OnInIt ryt? but there's an error while i change OnPcLoginEvent: into OnInIt:. Quote
Kenpachi Posted January 23, 2012 Posted January 23, 2012 OnInit is executed when the map server loads the NPC. Let's make this more clear. Example: - script Freebies -1,{ OnPCLoginEvent: if(!#FREEBIES) { GetItem(501, 5); GetItem(502, 5); GetItem(503, 5); Set(#FREEBIES, 1); } End(); } - script LoginAnnounce -1,{ OnPCLoginEvent: Announce(StrCharInfo(0) + " has logged in.", bc_all); End(); } This is bad because the event queue for this event type has now reached its maximum (2). Try joining them into just one event: - script Freebies -1,{ OnPCLoginEvent: // 1st: Announce login Announce(StrCharInfo(0) + " has logged in.", bc_all); // 2nd: Check freebies if(!#FREEBIES) { GetItem(501, 5); GetItem(502, 5); GetItem(503, 5); Set(#FREEBIES, 1); } // Event ends End(); } Quote
Hatake Kakashi Posted January 24, 2012 Author Posted January 24, 2012 (edited) i dont know how to put this? this is my original freebies script. i need this for automatically not clickable for 1st char in account. - script Freebies -,{ OnPCLoginEvent: if( #newbie > 0 || BaseLevel > 1) { mes "[ReunitedRO GM TEAM]"; mes "You have taken the items before or you might not reach the basic requirements for this. "; close; } if(BaseLevel==1 && BaseClass == Job_Novice){ mes "[ReunitedRO GM TEAM]"; mes "Welcome to Reunited RO!"; mes "I can give you Newbie Packages!"; mes "So you can Level up fast!"; mes "Please have fun and enjoy your stay!"; mes "Oh! by the way, please specify your Job when you reach First Job!"; next; switch (select ("Diabolus Set:Valkyrie Set")) { Case 1: mes "[ReunitedRO GM TEAM]"; mes "You've chosen Diabolus Set. Here you go!"; mes "Have fun playing in the server!"; getitem 2375,1; getitem 2433,1; getitem 2537,1; getitem 2374,1; getitem 30130,1; close2; set #newbie,1; close; warp "prontera" ,155,179; save "prontera",155,180; Case 2: mes "[ReunitedRO GM TEAM]"; mes "You've chosen Valkyrie Set. Here you go!"; mes "Have fun playing in the server!"; getitem 2357,1; getitem 2421,1; getitem 2524,1; getitem 2115,1; getitem 30131,1; close2; set #newbie,1; close; warp "prontera" ,155,179; save "prontera",155,180; } } close; OnInit: waitingroom "Freebies",0; end; } Edited January 24, 2012 by Hatake Kakashi Quote
GenGen Posted January 24, 2012 Posted January 24, 2012 (edited) you dont need a chat waiting room for a OnPCLogin script because it trigger itself when you login. - script Freebies -1,{ OnPCLoginEvent: if( #newbie > 0 || BaseLevel > 1) { mes "[ReunitedRO GM TEAM]"; mes "You have taken the items before or you might not reach the basic requirements for this. "; close; } if(BaseLevel==1 && BaseClass == Job_Novice){ mes "[ReunitedRO GM TEAM]"; mes "Welcome to Reunited RO!"; mes "I can give you Newbie Packages!"; mes "So you can Level up fast!"; mes "Please have fun and enjoy your stay!"; mes "Oh! by the way, please specify your Job when you reach First Job!"; next; switch (select ("Diabolus Set:Valkyrie Set")) { Case 1: mes "[ReunitedRO GM TEAM]"; mes "You've chosen Diabolus Set. Here you go!"; mes "Have fun playing in the server!"; getitem 2375,1; getitem 2433,1; getitem 2537,1; getitem 2374,1; getitem 30130,1; close2; set #newbie,1; close; warp "prontera" ,155,179; save "prontera",155,180; Case 2: mes "[ReunitedRO GM TEAM]"; mes "You've chosen Valkyrie Set. Here you go!"; mes "Have fun playing in the server!"; getitem 2357,1; getitem 2421,1; getitem 2524,1; getitem 2115,1; getitem 30131,1; close2; set #newbie,1; close; warp "prontera" ,155,179; save "prontera",155,180; end; } } Edited January 24, 2012 by GenGen Quote
Hatake Kakashi Posted January 24, 2012 Author Posted January 24, 2012 i think got a bug. bcoz its only stop here. so i need to put @go in my alt + M. to leave this bug msg. prompt when i make new char. i Screen Shot it below. here's the SS. thanks Quote
Emistry Posted January 24, 2012 Posted January 24, 2012 try this - script Sample -1,{ OnPCLoginEvent: if( !#Newbie ){ mes "Hii..please choose your Items."; switch( select("Set 1:Set 2") ){ Case 1: getitem 501,1; getitem 501,1; getitem 501,1; break; Case 2: getitem 501,10; getitem 501,10; getitem 501,10; break; } mes "There you are.."; set #Newbie,1; close2; warp "prontera",155,181; } end; } Quote
Hatake Kakashi Posted January 26, 2012 Author Posted January 26, 2012 (edited) how or where to put only 1 char. per 1 account. to avoid abusing freebies. here. lhz_in03,261,267,3 script Freebies 405,{ OnPCLoginEvent: if( !#Newbie ){ mes "Hii..please choose your Items."; switch( select("Diablo Set:Valkyrie Set") ){ Case 1: getitem 2375,1; getitem 2433,1; getitem 2537,1; getitem 2374,1; getitem 30130,1; break; Case 2: getitem 2357,1; getitem 2421,1; getitem 2524,1; getitem 2115,1; getitem 30131,1; break; } mes "There you are.."; set #Newbie,1; close2; warp "prontera",155,181; } end; } Edited January 26, 2012 by Hatake Kakashi Quote
Emistry Posted January 26, 2012 Posted January 26, 2012 where to put only 1 char. per 1 account change this #Newbie into these #Newbie // For Each Account Newbie // For Each Character Quote
Hatake Kakashi Posted February 9, 2012 Author Posted February 9, 2012 (edited) can you please give it to me a full script bcoz when i edit its error. can you put announce when you get the freebie. thanks i use this freebies but still error in map server - script Freebies -1,{ OnPCLoginEvent: // 1st: Announce login Announce(StrCharInfo(0) + " has logged in.", bc_all); // 2nd: Check freebies if(!#FREEBIES) { GetItem(2830, 2); GetItem(2831, 2); Set(#FREEBIES, 1); } // Event ends End(); } here's the error. again. Edited February 9, 2012 by Arcenciel Quote
ngek202 Posted February 9, 2012 Posted February 9, 2012 have you tried changing your /trunk/src/map/map.h look for #define MAX_EVENTQUEUE 2 //changed 2 to what ever you want then compile. Quote
nelsontyh Posted February 9, 2012 Posted February 9, 2012 Is there a limit to the maximum number of eventqueue that we can change? And will there be any side effects from making it too high? Quote
Hatake Kakashi Posted February 9, 2012 Author Posted February 9, 2012 @ngeks thanks @nelsontyh no. Quote
Question
Hatake Kakashi
i think its on my freebies npc.
here's scripts
- script Freebies -,{
OnPCLoginEvent:
if( #newbie > 0 || BaseLevel > 1) {
mes "[ReunitedRO GM TEAM]";
mes "You have taken the items before or you might not reach the basic requirements for this. ";
close;
}
if(BaseLevel==1 && BaseClass == Job_Novice){
mes "[ReunitedRO GM TEAM]";
mes "Welcome to Reunited RO!";
mes "I can give you Newbie Packages!";
mes "So you can Level up fast!";
mes "Please have fun and enjoy your stay!";
mes "Oh! by the way, please specify your Job when you reach First Job!";
next;
switch (select ("Diabolus Set:Valkyrie Set")) {
Case 1:
mes "[ReunitedRO GM TEAM]";
mes "You've chosen Diabolus Set. Here you go!";
mes "Have fun playing in the server!";
getitem 2375,1;
getitem 2433,1;
getitem 2537,1;
getitem 2374,1;
getitem 30130,1;
close2;
set #newbie,1;
close;
warp "prontera" ,155,179;
save "prontera",155,180;
Case 2:
mes "[ReunitedRO GM TEAM]";
mes "You've chosen Valkyrie Set. Here you go!";
mes "Have fun playing in the server!";
getitem 2357,1;
getitem 2421,1;
getitem 2524,1;
getitem 2115,1;
getitem 30131,1;
close2;
set #newbie,1;
close;
warp "prontera" ,155,179;
save "prontera",155,180;
}
}
close;
OnInit:
waitingroom "Freebies",0;
end;
}
here's the error.
14 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.