Jump to content
  • 0

good day how to add gepard unique ip here


Enoch

Question


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.02
  • Content Count:  65
  • Reputation:   0
  • Joined:  10/21/19
  • Last Seen:  

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 .@gm_level, 99; // GM level required to set the reward
    set .@maxbase, 175;
    set .@maxjob, 60;
    set .@defaultreward, 39997;
    setarray .@rewardablejobs[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() >= .@gm_level) ? "master! What do you want to do today?" : "are you here for your reward?");
    next;
    switch(select(((getgmlevel() >= .@gm_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, .@defaultreward;
        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 .@rewardid;            
            next;
            mes "[ ^FF7700Race to Max Level^000000 ]";
            mes "Set " + getitemname(.@rewardid) + " as the reward?";
            if(select("Yes:No") == 1) {
                set $reward, .@rewardid;
            }
        }
        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 (.@i = 0; .@i < getarraysize(.@rewardablejobs); .@i++) {
                set $rewarded$[.@rewardablejobs[.@i]], "";
            }
            announce "The Race to Max Level has begun! Claim a reward once you reach " + .@maxbase + " base and job " + .@maxjob + " !!", bc_all;
        }
        goto Begin;
    
    GetReward:
        mes "Let's see... " + strcharinfo(0) + ", huh?";
        
        set .@competitioner, 0;
        for (.@i = 0; .@i < getarraysize(.@rewardablejobs); .@i++) {
            if (Class == .@rewardablejobs[.@i]) {
                set .@competitioner, 1;
                if (BaseLevel < .@maxbase || JobLevel < .@maxjob) {
                    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 (.@competitioner == 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 " + .@maxbase + " base and " + .@maxjob + " 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 (.@i = 0; .@i < getarraysize(.@rewardablejobs); .@i++) {
            mes jobname(.@rewardablejobs[.@i]) + ": " + (($rewarded$[.@rewardablejobs[.@i]] != "") ? $rewarded$[.@rewardablejobs[.@i]] : "^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

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  99
  • Reputation:   16
  • Joined:  07/28/12
  • Last Seen:  

Try with this

freya,218,220,6	script	Max Level	4_LGTSCIENCE,{
    set .@gm_level, 99; // GM level required to set the reward
    set .@maxbase, 175;
    set .@maxjob, 60;
    set .@defaultreward, 39997;
    setarray .@rewardablejobs[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() >= .@gm_level) ? "master! What do you want to do today?" : "are you here for your reward?");
    next;
    switch(select(((getgmlevel() >= .@gm_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, .@defaultreward;
        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 .@rewardid;            
            next;
            mes "[ ^FF7700Race to Max Level^000000 ]";
            mes "Set " + getitemname(.@rewardid) + " as the reward?";
            if(select("Yes:No") == 1) {
                set $reward, .@rewardid;
            }
        }
        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 (.@i = 0; .@i < getarraysize(.@rewardablejobs); .@i++) {
                set $rewarded$[.@rewardablejobs[.@i]], "";
            }
            announce "The Race to Max Level has begun! Claim a reward once you reach " + .@maxbase + " base and job " + .@maxjob + " !!", bc_all;
        }
        goto Begin;
    
    GetReward:
        mes "Let's see... " + strcharinfo(0) + ", huh?";
        
        set .@competitioner, 0;
        for (.@i = 0; .@i < getarraysize(.@rewardablejobs); .@i++) {
            if (Class == .@rewardablejobs[.@i]) {
                set .@competitioner, 1;
                if (BaseLevel < .@maxbase || JobLevel < .@maxjob) {
                    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 (.@competitioner == 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 " + .@maxbase + " base and " + .@maxjob + " 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 (.@i = 0; .@i < getarraysize(.@rewardablejobs); .@i++) {
            mes jobname(.@rewardablejobs[.@i]) + ": " + (($rewarded$[.@rewardablejobs[.@i]] != "") ? $rewarded$[.@rewardablejobs[.@i]] : "^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

  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.02
  • Content Count:  65
  • Reputation:   0
  • Joined:  10/21/19
  • Last Seen:  

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 .@gm_level, 99; // GM level required to set the reward
    set .@maxbase, 175;
    set .@maxjob, 60;
    set .@defaultreward, 39997;
    setarray .@rewardablejobs[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() >= .@gm_level) ? "master! What do you want to do today?" : "are you here for your reward?");
    next;
    switch(select(((getgmlevel() >= .@gm_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, .@defaultreward;
        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 .@rewardid;            
            next;
            mes "[ ^FF7700Race to Max Level^000000 ]";
            mes "Set " + getitemname(.@rewardid) + " as the reward?";
            if(select("Yes:No") == 1) {
                set $reward, .@rewardid;
            }
        }
        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 (.@i = 0; .@i < getarraysize(.@rewardablejobs); .@i++) {
                set $rewarded$[.@rewardablejobs[.@i]], "";
            }
            announce "The Race to Max Level has begun! Claim a reward once you reach " + .@maxbase + " base and job " + .@maxjob + " !!", bc_all;
        }
        goto Begin;
    
    GetReward:
        mes "Let's see... " + strcharinfo(0) + ", huh?";
        
        set .@competitioner, 0;
        for (.@i = 0; .@i < getarraysize(.@rewardablejobs); .@i++) {
            if (Class == .@rewardablejobs[.@i]) {
                set .@competitioner, 1;
                if (BaseLevel < .@maxbase || JobLevel < .@maxjob) {
                    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 (.@competitioner == 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 " + .@maxbase + " base and " + .@maxjob + " 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 (.@i = 0; .@i < getarraysize(.@rewardablejobs); .@i++) {
            mes jobname(.@rewardablejobs[.@i]) + ": " + (($rewarded$[.@rewardablejobs[.@i]] != "") ? $rewarded$[.@rewardablejobs[.@i]] : "^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

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  99
  • Reputation:   16
  • Joined:  07/28/12
  • Last Seen:  

Does it give you an error in the code or does it not work?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.02
  • Content Count:  65
  • Reputation:   0
  • Joined:  10/21/19
  • Last Seen:  

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

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  99
  • Reputation:   16
  • Joined:  07/28/12
  • Last Seen:  

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

  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.02
  • Content Count:  65
  • Reputation:   0
  • Joined:  10/21/19
  • Last Seen:  

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

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  99
  • Reputation:   16
  • Joined:  07/28/12
  • Last Seen:  

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