Jump to content
  • 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,{
.@fome$ = "[Fome]";
.@sede$ = "[Sede]";
.@sono$ = "[Sono]";
.@dubarma$ = "[DubArma]";
.@dubarmadura$ = "[DubArmadura]";
getcharid(0);
        
        if(getcharid(0)){
        OnPCLoginEvent:
        addtimer 1000, strnpcinfo(3) + "::OnSurvival";
        end;
        OnSurvival:
        setd ".@fome$", "80";
        setd ".@sede$", "80";
        setd ".@sono$", "80";
        deltimer strnpcinfo(3) + "::OnSurvival";
        addtimer 1000, strnpcinfo(3) + "::OnPenality1";
        addtimer 1000, strnpcinfo(3) + "::OnPenality2";
        end;
        OnPenality1:
            deltimer strnpcinfo(3) + "::OnPenality1";
                if (.@fome > 0 && .@sede > 0){
                .@fome = -1;
                .@sede = -1;
                addtimer 30000, strnpcinfo(3) + "::OnPenality1";
                }
                else 
                    warp "sec_pri",50,76;
                    end;
        OnPenality2:
            deltimer strnpcinfo(3) + "::OnPenality2";
                if (.@sono > 0){
                .@sono = -1;
                addtimer 30000, strnpcinfo(3) + "::OnPenality2";
                }
                else
                    warp "sec_pri",50,76;
                    end;
                            if (.@fome > 100 && .@sede > 100 && .@sono > 100 && .@dubarma > 100 && .@dubarmadura > 100){
                            setd ".@fome$", "100";
                            setd ".@sede$", "100";
                            setd ".@sono$", "100";
                            setd ".@dubarma$", "100";
                            setd ".@dubarmadura$", "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,{
.@nome$ = "[Menu]";
getvariableofnpc(.@fome,"sobrevivencia");
getvariableofnpc(.@sede,"sobrevivencia");
getvariableofnpc(.@sono,"sobrevivencia");
getvariableofnpc(.@dubarma,"sobrevivencia");
getvariableofnpc(.@dubarmadura,"sobrevivencia");

menu1:
mes .@nome$;
mes "[Fome]:"+.@fome;
mes "[Sede]:"+.@sede;
mes "[Sono]:"+.@sono;
mes "[DubArma]:"+.@dubarma;
mes "[DubArmor]:"+.@dubarmadura;
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.