Jump to content

Dark Theme was set as default for all members. Please report any issues here.

  • 0
CDER

System Survival and @menu

Question

Hello guys, I need help with a script, would be a survival system, to open more customization in ragnarok, I would like to remind you that I am Brazilian, so the script exists sets in Portuguese, but bullshit like "hunger, thirst, sleep , weapon and armor durability "

Script Survival

Spoiler

prontera,153,173,5    script    sobrevivencia    85,{
[email protected]$ = "[Fome]";
[email protected]$ = "[Sede]";
[email protected]$ = "[Sono]";
[email protected]$ = "[DubArma]";
[email protected]$ = "[DubArmadura]";
getcharid(0);
        
        if(getcharid(0)){
        OnPCLoginEvent:
        addtimer 1000, strnpcinfo(3) + "::OnSurvival";
        end;
        OnSurvival:
        setd "[email protected]$", "80";
        setd "[email protected]$", "80";
        setd "[email protected]$", "80";
        deltimer strnpcinfo(3) + "::OnSurvival";
        addtimer 1000, strnpcinfo(3) + "::OnPenality1";
        addtimer 1000, strnpcinfo(3) + "::OnPenality2";
        end;
        OnPenality1:
            deltimer strnpcinfo(3) + "::OnPenality1";
                if ([email protected] > 0 && [email protected] > 0){
                [email protected] = -1;
                [email protected] = -1;
                addtimer 30000, strnpcinfo(3) + "::OnPenality1";
                }
                else 
                    warp "sec_pri",50,76;
                    end;
        OnPenality2:
            deltimer strnpcinfo(3) + "::OnPenality2";
                if ([email protected] > 0){
                [email protected] = -1;
                addtimer 30000, strnpcinfo(3) + "::OnPenality2";
                }
                else
                    warp "sec_pri",50,76;
                    end;
                            if ([email protected] > 100 && [email protected] > 100 && [email protected] > 100 && [email protected] > 100 && [email protected] > 100){
                            setd "[email protected]$", "100";
                            setd "[email protected]$", "100";
                            setd "[email protected]$", "100";
                            setd "[email protected]$", "100";
                            setd "[email protected]$", "100";
                            end;
        }
    }
}    

this is a npc I used to create a system, if hungry, thirsty, sleep is at 0 he would take the player to prison, the problem is that he even takes my character to prison, but I don't know how I can make the player start with 80's hunger, thirst, sleep, and he ends up being taken to prison after the programming detects that he is at 0, and even in the menu npc I created when using the @menu all status command is at 0. .. below is the menu script

Script Menu -

Spoiler

prontera,155,160,5    script    menu    85,{
[email protected]$ = "[Menu]";
getvariableofnpc([email protected],"sobrevivencia");
getvariableofnpc([email protected],"sobrevivencia");
getvariableofnpc([email protected],"sobrevivencia");
getvariableofnpc([email protected],"sobrevivencia");
getvariableofnpc([email protected],"sobrevivencia");

menu1:
mes [email protected]$;
mes "[Fome]:"[email protected];
mes "[Sede]:"[email protected];
mes "[Sono]:"[email protected];
mes "[DubArma]:"[email protected];
mes "[DubArmor]:"[email protected];
close;
end;

    
    atcommand "@menu";
    charcommand "strcharinfo(0)";
    OnInit:
        bindatcmd "@menu",strnpcinfo(3) + "::OnAtcommand";
        end;
    OnAtcommand:
        menu "Menu",menu1;
        close;
        end;
}

Can anyone help me assign 80 hunger, thirst, sleep to the player creating the character?

 

Edited by CDER

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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

  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.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.