Jump to content
  • 0

Race to 99 NPC


LewL

Question


  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.02
  • Content Count:  84
  • Reputation:   1
  • Joined:  01/08/20
  • Last Seen:  

Hi i would like to ask how could i disable expanded classes like GS, Ninja, SG and SL on my Race to 99 event.

payon,141,227,5    script    Race to 99 Reward NPC    99,{
set .@maxbase, 99;
set .@maxjob, 70;
setarray .@item, // set rewards
//    31308, 1, // <ID>, <AMT>
    31308, 1;

if (BaseLevel < .@maxbase || JobLevel < .@maxjob) {
    mes "I'm sorry, but you still need to level a bit more.";
    close;
} else if(getcharid(0) <= 150001){
    mes "You must start from Novice level 1 to join the race!";
    close;
} else if ( LReward ) { // checks if you already get the reward.
    mes "No more rewards.";
    close;
} else goto GiveReward;

    GiveReward:
        mes "Congratulations, you've reached the max level in the server, here's your reward!";
        announce strcharinfo(0) + " (" + jobname(Class) + ") reached Max Level!", bc_all;
        close2;
LReward = true; // sets LReward to true which means you already get your item.
for(.@i=0;.@i<getarraysize(.@item);.@i+=2)
    getitem .@item[.@i], .@item[.@i+1];
end;
}

RACE.txt

Edited by Haruka Mayumi
Code Box
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  292
  • Reputation:   46
  • Joined:  10/30/12
  • Last Seen:  

try to add:

if (.@class == Job_Gunslinger || .@class == Job_Ninja || .@class == Job_Soul_Linker || .@class == Job_Star_Gladiator) {
	mes "Sorry, you cannot join this race!";
	close;
}

 

Edited by mrfizi
  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.02
  • Content Count:  84
  • Reputation:   1
  • Joined:  01/08/20
  • Last Seen:  

On 3/25/2021 at 1:11 AM, mrfizi said:

try to add:


if (.@class == Job_Gunslinger || .@class == Job_Ninja || .@class == Job_Soul_Linker || .@class == Job_Star_Gladiator) {
	mes "Sorry, you cannot join this race!";
	close;
}

 

Thanks ❤️

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