Jump to content
  • 0

Help with warper script, make it per unique id only


BabaVoss

Question


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.03
  • Content Count:  79
  • Reputation:   0
  • Joined:  06/17/20
  • Last Seen:  

good day, can anyone help fixing this script.  it works fine, but the purpose of this script is to not abuse gold room.
this script can be by pass with making new account. Can anyone help make this PER UNIQUE ID?

 

critown,134,138,6	script	gold room	456,{
    function    t   {
        function s;
        set .@left, getarg(0);
        if ( .@left <= 0 ) return getarg(0);
        set .@day, .@left / 86400;
        set .@hour, .@left % 86400 / 3600;
        set .@min, .@left % 3600 / 60;
        set .@sec, .@left % 60;
        return ( ( .@day ? .@day +" day"+ s( .@day ) : "" ) + ( .@hour ? .@hour +" hour"+ s( .@hour ) : "" ) + ( .@min ? .@min +" min"+ s( .@min ) : "" ) + ( .@sec ? .@sec +" sec"+ s( .@sec,1 ) : "" ));
    function    s   {
        return ( ( getarg(0) > 1 ? "s" : "" ) + ( getarg(1,0) ? "" : " " ) ); }
    }

    if ( gltimer <= 0 && enter_gold_room < gettimetick(2) ) {
        set gltimer, .glt;
        enter_gold_room = gettimetick(2) + 86400 * .dly;
    } else if ( enter_gold_room > gettimetick(2) && gltimer <= 0 ) {
        mes "I'm sorry you can't enter in the gold room. You must wait "+ t( enter_gold_room - gettimetick(2) )+".";
        close;
    }
    mes "You have "+t( gltimer )+" remaining.";
    select( "enter in the gold room" );
    warp .map$,0,0;
    attachnpctimer;
    initnpctimer;
    end;

OnTimer1000:
    if( playerattached() ){
        if(strcharinfo(3)!=.map$) {
            stopnpctimer;
            end;
        }
        set gltimer, gltimer-1;
        if( gltimer <= 0 ) {
            stopnpctimer;
            warp "prontera",0,0;
            message strcharinfo(0), "end of time for the gold room";
            end;
        } else setnpctimer 0;
    }
    end;

OnInit:
    set        .dly ,    7           ; //Delay in days.
    set        .glt ,    1800        ; //Gold Room Timer in seconds.
    set        .map$,    "geffen"    ; //
    end;
}

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  235
  • Reputation:   87
  • Joined:  06/30/18
  • Last Seen:  

Hello,

this is only possible if your server has a way of identifying a unique PC for example based on a hardware id.
If you want someone to modify your script, you would need to tell them how to access this unique id via script to be able to help you.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.03
  • Content Count:  79
  • Reputation:   0
  • Joined:  06/17/20
  • Last Seen:  

On 6/25/2023 at 6:21 AM, Winterfox said:

Hello,

this is only possible if your server has a way of identifying a unique PC for example based on a hardware id.
If you want someone to modify your script, you would need to tell them how to access this unique id via script to be able to help you.

 

copy, this script works with my server. it is attach to a freebie npc per account, apparently i dont know how to attach this to this gold room warper npc, and to be able to clear it once the cooldown is done.
 

TOWN,45,65,5    script    Welcome Reward    871,{
    .@unique_id$ = get_unique_id();
    if($reward_status > 0 || $reward_count < 1){
        mes "[ Reward NPC ]";
        mes "Sorry, but the this rewards are out. Better luck next time.";

        close;
    }
    if(getd("$ID_" + .@unique_id$) > 0 || #NPCREWARD1 > 0){
        mes "[ Reward NPC ]";
        mes "You have already claimed your reward.";
        close;
    }

 

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