Jump to content
  • 0
Enoch

good day how to add gepard unique ip here

Question

how to add unique gepard ip so that after he/she won the race to max level, he/she cannot join in a different character

freya,218,220,6    script    Max Level    4_LGTSCIENCE,{
    set [email protected]_level, 99; // GM level required to set the reward
    set [email protected], 175;
    set [email protected], 60;
    set [email protected], 39997;
    setarray [email protected][0], Job_Rune_Knight_T, Job_Genetic_T, Job_Guillotine_Cross_T, Job_Minstrel_T, Job_Mechanic_T, Job_Royal_Guard_T, Job_Wanderer_T, Job_Ranger_T, Job_Sura_T, Job_Arch_Bishop_T, Job_Shadow_Chaser_T, Job_Sorcerer_T, Job_Warlock_T, Job_Kagerou, Job_Oboro;
    
    Begin:
    mes "[ ^FF7700Race to Max Level^000000 ]";
    mes "Hello, " + ((getgmlevel() >= [email protected]_level) ? "master! What do you want to do today?" : "are you here for your reward?");
    next;
    switch(select(((getgmlevel() >= [email protected]_level) ? "Set Reward:Restart Race" : ":") + ":YES Please!:What is the Reward?:Who was rewarded?:Cancel")) {
        case 1:
            goto SetReward;
        case 2:
            goto RestartRace;
        case 3:
            goto GetReward;
        case 4:
            goto ExplainRace;
        case 5:
            goto ShowRewarded;
        default:
            end;
    }
    
    SetReward:
        mes "[ ^FF7700Race to Max Level^000000 ]";
        if ($reward == 0)
            set $reward, [email protected];
        mes "The reward is " + getitemname($reward) + " (ID: " + $reward + ").";
        mes "Do you want to change it?";
        next;
        if (select("Yes:No") == 1) {
            mes "[ ^FF7700Race to Max Level^000000 ]";
            mes "Please enter the new reward item ID.";
            input [email protected];            
            next;
            mes "[ ^FF7700Race to Max Level^000000 ]";
            mes "Set " + getitemname([email protected]) + " as the reward?";
            if(select("Yes:No") == 1) {
                set $reward, [email protected];
            }
        }
        goto Begin;
    
    RestartRace:
        mes "[ ^FF7700Race to Max Level^000000 ]";
        mes "Are you sure you want to restart the race?";
        next;
        if (select("Yes:No") == 1) {
            for ([email protected] = 0; [email protected] < getarraysize([email protected]); [email protected]++) {
                set $rewarded$[[email protected][[email protected]]], "";
            }
            announce "The Race to Max Level has begun! Claim a reward once you reach " + [email protected] + " base and job " + [email protected] + " !!", bc_all;
        }
        goto Begin;
    
    GetReward:
        mes "Let's see... " + strcharinfo(0) + ", huh?";
        
        set [email protected], 0;
        for ([email protected] = 0; [email protected] < getarraysize([email protected]); [email protected]++) {
            if (Class == [email protected][[email protected]]) {
                set [email protected], 1;
                if (BaseLevel < [email protected] || JobLevel < [email protected]) {
                    mes "I'm sorry, but you still need to level a bit more.";
                } else if ($rewarded$[Class] == strcharinfo(0)) {
                    mes "You have already claimed your reward.";
                } else if ($rewarded$[Class] != "") {
                    mes "Too late!";
                    mes "The reward for " + jobname(Class) + " was already claimed by " + $rewarded$[Class] + ".";
                } else goto GiveReward;
            }
        }
        if ([email protected] == 0)
            mes "You need to change your job.";
        close;
    
    GiveReward:
        set $rewarded$[Class], strcharinfo(0);
        next;
        mes "[ ^FF7700Race to Max Level^000000 ]";
        mes "Congratulations! You were the first " + jobname(Class) + " to reach " + [email protected] + " base and " + [email protected] + " class!";
        getitem $reward, 1;
        announce strcharinfo(0) + " ~ " + jobname(Class) + " ~ Has Reached Max. Level and Received " + getitemname($reward) + "!", bc_all;
        close;
    
    ExplainRace:
        mes "[ ^FF7700Race to Max Level^000000 ]";
        mes "Yes! When you reach the maximum level for your class, talk to me and you'll be rewarded with a special item.";
        next;
        goto Begin;
        
    ShowRewarded:
        mes "[ ^FF7700Race to Max Level^000000 ]";
        for ([email protected] = 0; [email protected] < getarraysize([email protected]); [email protected]++) {
            mes jobname([email protected][[email protected]]) + ": " + (($rewarded$[[email protected][[email protected]]] != "") ? $rewarded$[[email protected][[email protected]]] : "^ff0000Nobody^000000");
        }
        next;
        goto Begin;
    OnInit:
        while (1) {
            showscript " Race to 175 Winners! ";
            sleep 1000;
        }
        end;
}

 

Edited by Mael
Use codebox
Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

Try with this

freya,218,220,6	script	Max Level	4_LGTSCIENCE,{
    set [email protected]_level, 99; // GM level required to set the reward
    set [email protected], 175;
    set [email protected], 60;
    set [email protected], 39997;
    setarray [email protected][0], Job_Rune_Knight_T, Job_Genetic_T, Job_Guillotine_Cross_T, Job_Minstrel_T, Job_Mechanic_T, Job_Royal_Guard_T, Job_Wanderer_T, Job_Ranger_T, Job_Sura_T, Job_Arch_Bishop_T, Job_Shadow_Chaser_T, Job_Sorcerer_T, Job_Warlock_T, Job_Kagerou, Job_Oboro;
    
    Begin:
    mes "[ ^FF7700Race to Max Level^000000 ]";
    mes "Hello, " + ((getgmlevel() >= [email protected]_level) ? "master! What do you want to do today?" : "are you here for your reward?");
    next;
    switch(select(((getgmlevel() >= [email protected]_level) ? "Set Reward:Restart Race" : ":") + ":YES Please!:What is the Reward?:Who was rewarded?:Cancel")) {
        case 1:
            goto SetReward;
        case 2:
            goto RestartRace;
        case 3:
            goto GetReward;
        case 4:
            goto ExplainRace;
        case 5:
            goto ShowRewarded;
        default:
            end;
    }
    
    SetReward:
        mes "[ ^FF7700Race to Max Level^000000 ]";
        if ($reward == 0)
            set $reward, [email protected];
        mes "The reward is " + getitemname($reward) + " (ID: " + $reward + ").";
        mes "Do you want to change it?";
        next;
        if (select("Yes:No") == 1) {
            mes "[ ^FF7700Race to Max Level^000000 ]";
            mes "Please enter the new reward item ID.";
            input [email protected];            
            next;
            mes "[ ^FF7700Race to Max Level^000000 ]";
            mes "Set " + getitemname([email protected]) + " as the reward?";
            if(select("Yes:No") == 1) {
                set $reward, [email protected];
            }
        }
        goto Begin;
    
    RestartRace:
        mes "[ ^FF7700Race to Max Level^000000 ]";
        mes "Are you sure you want to restart the race?";
        next;
        if (select("Yes:No") == 1) {
            for ([email protected] = 0; [email protected] < getarraysize([email protected]); [email protected]++) {
                set $rewarded$[[email protected][[email protected]]], "";
            }
            announce "The Race to Max Level has begun! Claim a reward once you reach " + [email protected] + " base and job " + [email protected] + " !!", bc_all;
        }
        goto Begin;
    
    GetReward:
        mes "Let's see... " + strcharinfo(0) + ", huh?";
        
        set [email protected], 0;
        for ([email protected] = 0; [email protected] < getarraysize([email protected]); [email protected]++) {
            if (Class == [email protected][[email protected]]) {
                set [email protected], 1;
                if (BaseLevel < [email protected] || JobLevel < [email protected]) {
                    mes "I'm sorry, but you still need to level a bit more.";
                } else if ($rewarded$[Class] == strcharinfo(0) || getd("$MaxLevel" + get_unique_id() + "") == 1) {
                    mes "You have already claimed your reward.";
                } else if ($rewarded$[Class] != "") {
                    mes "Too late!";
                    mes "The reward for " + jobname(Class) + " was already claimed by " + $rewarded$[Class] + ".";
                } else goto GiveReward;
            }
        }
        if ([email protected] == 0)
            mes "You need to change your job.";
        close;
    
    GiveReward:
        set $rewarded$[Class], strcharinfo(0);
        next;
        mes "[ ^FF7700Race to Max Level^000000 ]";
        mes "Congratulations! You were the first " + jobname(Class) + " to reach " + [email protected] + " base and " + [email protected] + " class!";
        getitem $reward, 1;
		setd "$MaxLevel" + get_unique_id() + "",1;
        announce strcharinfo(0) + " ~ " + jobname(Class) + " ~ Has Reached Max. Level and Received " + getitemname($reward) + "!", bc_all;
        close;
    
    ExplainRace:
        mes "[ ^FF7700Race to Max Level^000000 ]";
        mes "Yes! When you reach the maximum level for your class, talk to me and you'll be rewarded with a special item.";
        next;
        goto Begin;
        
    ShowRewarded:
        mes "[ ^FF7700Race to Max Level^000000 ]";
        for ([email protected] = 0; [email protected] < getarraysize([email protected]); [email protected]++) {
            mes jobname([email protected][[email protected]]) + ": " + (($rewarded$[[email protected][[email protected]]] != "") ? $rewarded$[[email protected][[email protected]]] : "^ff0000Nobody^000000");
        }
        next;
        goto Begin;
    OnInit:
        while (1) {
            showscript " Race to 175 Winners! ";
            sleep 1000;
        }
        end;
}

I recommend you to use the code boxes next time

  • Upvote 1
Link to comment
Share on other sites

  • 0

not working btw sorry for  that this is  the full script with code box

///////////////////////////////////////////////////////
//  ___________               _____.__                
//  \__    ___/__.__.________/ ____\__| ____    ____  
//    |    | <   |  |\_  __ \   __\|  |/    \  / ___\ 
//    |    |  \___  | |  | \/|  |  |  |   |  \/ /_/  >
//    |____|  / ____| |__|   |__|  |__|___|  /\___  / 
//            \/       Scripts             \//_____/  
//
//=====================================================
// Name: Race to Max Level
//
// Description:
// This NPC allows for Game Masters to set a reward to
// be given to the first player of each 2nd class that
// reaches maximum level (base and class).
//=====================================================
///////////////////////////////////////////////////////
freya,218,220,6    script    Max Level    4_LGTSCIENCE,{
    set [email protected]_level, 99; // GM level required to set the reward
    set [email protected], 175;
    set [email protected], 60;
    set [email protected], 39997;
    setarray [email protected][0], Job_Rune_Knight_T, Job_Genetic_T, Job_Guillotine_Cross_T, Job_Minstrel_T, Job_Mechanic_T, Job_Royal_Guard_T, Job_Wanderer_T, Job_Ranger_T, Job_Sura_T, Job_Arch_Bishop_T, Job_Shadow_Chaser_T, Job_Sorcerer_T, Job_Warlock_T, Job_Kagerou, Job_Oboro;
    
    Begin:
    mes "[ ^FF7700Race to Max Level^000000 ]";
    mes "Hello, " + ((getgmlevel() >= [email protected]_level) ? "master! What do you want to do today?" : "are you here for your reward?");
    next;
    switch(select(((getgmlevel() >= [email protected]_level) ? "Set Reward:Restart Race" : ":") + ":YES Please!:What is the Reward?:Who was rewarded?:Cancel")) {
        case 1:
            goto SetReward;
        case 2:
            goto RestartRace;
        case 3:
            goto GetReward;
        case 4:
            goto ExplainRace;
        case 5:
            goto ShowRewarded;
        default:
            end;
    }
    
    SetReward:
        mes "[ ^FF7700Race to Max Level^000000 ]";
        if ($reward == 0)
            set $reward, [email protected];
        mes "The reward is " + getitemname($reward) + " (ID: " + $reward + ").";
        mes "Do you want to change it?";
        next;
        if (select("Yes:No") == 1) {
            mes "[ ^FF7700Race to Max Level^000000 ]";
            mes "Please enter the new reward item ID.";
            input [email protected];            
            next;
            mes "[ ^FF7700Race to Max Level^000000 ]";
            mes "Set " + getitemname([email protected]) + " as the reward?";
            if(select("Yes:No") == 1) {
                set $reward, [email protected];
            }
        }
        goto Begin;
    
    RestartRace:
        mes "[ ^FF7700Race to Max Level^000000 ]";
        mes "Are you sure you want to restart the race?";
        next;
        if (select("Yes:No") == 1) {
            for ([email protected] = 0; [email protected] < getarraysize([email protected]); [email protected]++) {
                set $rewarded$[[email protected][[email protected]]], "";
            }
            announce "The Race to Max Level has begun! Claim a reward once you reach " + [email protected] + " base and job " + [email protected] + " !!", bc_all;
        }
        goto Begin;
    
    GetReward:
        mes "Let's see... " + strcharinfo(0) + ", huh?";
        
        set [email protected], 0;
        for ([email protected] = 0; [email protected] < getarraysize([email protected]); [email protected]++) {
            if (Class == [email protected][[email protected]]) {
                set [email protected], 1;
                if (BaseLevel < [email protected] || JobLevel < [email protected]) {
                    mes "I'm sorry, but you still need to level a bit more.";
                } else if ($rewarded$[Class] == strcharinfo(0)) {
                    mes "You have already claimed your reward.";
                } else if ($rewarded$[Class] != "") {
                    mes "Too late!";
                    mes "The reward for " + jobname(Class) + " was already claimed by " + $rewarded$[Class] + ".";
                } else goto GiveReward;
            }
        }
        if ([email protected] == 0)
            mes "You need to change your job.";
        close;
    
    GiveReward:
        set $rewarded$[Class], strcharinfo(0);
        next;
        mes "[ ^FF7700Race to Max Level^000000 ]";
        mes "Congratulations! You were the first " + jobname(Class) + " to reach " + [email protected] + " base and " + [email protected] + " class!";
        getitem $reward, 1;
        announce strcharinfo(0) + " ~ " + jobname(Class) + " ~ Has Reached Max. Level and Received " + getitemname($reward) + "!", bc_all;
        close;
    
    ExplainRace:
        mes "[ ^FF7700Race to Max Level^000000 ]";
        mes "Yes! When you reach the maximum level for your class, talk to me and you'll be rewarded with a special item.";
        next;
        goto Begin;
        
    ShowRewarded:
        mes "[ ^FF7700Race to Max Level^000000 ]";
        for ([email protected] = 0; [email protected] < getarraysize([email protected]); [email protected]++) {
            mes jobname([email protected][[email protected]]) + ": " + (($rewarded$[[email protected][[email protected]]] != "") ? $rewarded$[[email protected][[email protected]]] : "^ff0000Nobody^000000");
        }
        next;
        goto Begin;
    OnInit:
        while (1) {
            showscript " Race to 175 Winners! ";
            sleep 1000;
        }
        end;
}

 

Edited by Mael
Use a codebox
Link to comment
Share on other sites

  • 0

no error code but it doesnt work after  they can talk to the npc even they reach max lvl, i mean they can make another character and max lvl and claim again

Edited by Enoch
Link to comment
Share on other sites

  • 0
On 1/22/2023 at 7:49 PM, Enoch said:

no error code but it doesnt work after  they can talk to the npc even they reach max lvl, i mean they can make another character and max lvl and claim again

Do you want it to be a unique prize per server? Or do you want to have them charge it once per account? That is, if two Ministrels reach the maximum level, will it only be given to one? Or that if I arrive with a minister and then with an archbishop, I can't collect it with the archbishop?

 

i change it to sniper and creator 99/60
i take it first with creator
image.png.b456edfb561bee6f51a14df1ae5c3054.png

then i change to sniper in same account, with new account and dont let me


image.png.aa139981308365f045a220a8541a45e5.png

 

if you already take the price before start doesnt work you need to start from scratch

Link to comment
Share on other sites

  • 0

i want it per ip maybe? so that they can't rejoin the race if they win one job no abuse, make new account and max it to claim it over again

Edited by Enoch
Link to comment
Share on other sites

  • 0

that's specifically what the code I gave you earlier does. But remember, they will only be counted from when you placed that code onwards, if someone collected the reward before they can do it again, although only once more.

Edited by Angeluz
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...