Jump to content
  • 0

how to fix this?


Hatake Kakashi

Question


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

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

Link to comment
Share on other sites

14 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  764
  • Reputation:   220
  • Joined:  11/14/11
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  530
  • Reputation:   33
  • Joined:  01/17/12
  • Last Seen:  

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

how to put change into automatic get that freebies? its OnInIt ryt? but there's an error while i change OnPcLoginEvent: into OnInIt:.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  764
  • Reputation:   220
  • Joined:  11/14/11
  • Last Seen:  

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

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 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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  46
  • Reputation:   0
  • Joined:  11/22/11
  • Last Seen:  

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

post-329-0-33277600-1327367910_thumb.jpg

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:  

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

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:  

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

where to put only 1 char. per 1 account

change this

#Newbie

into these

#Newbie   // For Each Account
Newbie   // For Each Character

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:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  530
  • Reputation:   33
  • Joined:  01/17/12
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  43
  • Reputation:   1
  • Joined:  01/20/12
  • Last Seen:  

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?

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