Jump to content

Question

Posted

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.

1jqiax.jpg

14 answers to this question

Recommended Posts

Posted

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

Posted (edited)

you could try to adjust your MAX_EVENTQUEUE on src/map/map.

lol forum problem triple posted it /no1

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 by ngek202
Posted

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();
}

Posted (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 by Hatake Kakashi
Posted (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 by GenGen
Posted

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;
}

Posted (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 by Hatake Kakashi
Posted (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.

post-329-0-19622200-1328762997_thumb.jpg

Edited by Arcenciel

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...