• 0
cder

Function Survival

Question

Hi guys, I have a very big and expansive project.

 

First of all I'm Brazilian the script was not 100% translated, interpreted dubarma as

"durabilityweapon" and dubarmor as "durabilityarmor"

1-Doubts:
I do not know all the doc commands yet, so this is not quite complete function.
2-Npcs function:
I added npcs to the outside of the function, and I used the "callfunc" 
command in the npc to call the function, these npcs would be bed,
durability repairer, and in the future would initiate the same "callfunc"
 1 hunger, thirst.
3-Error !!!
When creating my menu npc, to view the statuses, only everything appears in 0,
as if the function had not responded.
4- Menu command
I used bindatcmd to when using the @ menu command, I would view your information.
And I used the * menu, and even created a labbel for him.
scriptlabbel:
menu1:
[email protected] $;
mes "[Hunger]:"[email protected];
month "[Headquarters]:"[email protected];
mes "[Sleep]:"[email protected];
month "[DubArma]:"[email protected];
mes "[DubArmor]:"[email protected];
close;
end;

5-  function script

function    script    Sobrevivencia    {
getcharid(0);
    if (getcharid(0)){
    [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);
    getd("[email protected]");
    getd("[email protected]");
    getd("[email protected]");
    getd(".dubarma");
    getd("[email protected]");
    end;
    }
    else{
        if ([email protected] <= 1){
        delchar([email protected], 0);
        end;        
        }
    }
        if ([email protected] <= 1){
        delchar([email protected], 0);
        end;
        }
        if ([email protected] <= 1){
        delchar([email protected], 0);
        end;        
        }
        if ([email protected] <= 31){
        sleep(30000);
        sleep2(30000);
        end;
        }
        if ([email protected] <= 1){
       @breakweapon;
        end;
        }    
        if ([email protected] <= 1){
        @breakarmor;
         end;
        }
        attachnpctimer("strcharinfo(0)")
        initnpctimer(strcharinfo(0));
OnTimer1080000:
[email protected] = -1;
[email protected] = -1;
[email protected] = -4;
end;
}

 

Edited by Emistry
Please use codebox

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Hi!

Prefixes and postfixes cant be separated from the variable name. So for example instead of . @ sleep it must be [email protected] always.

delchar is not a command to delete characters.

You can use the command breakequip to break equips. 😄

 

You can learn a lot reading the doc, good luck!

\doc\script_commands.txt

  • Upvote 1

Share this post


Link to post
Share on other sites
  • 0
19 minutes ago, Racaae said:

Hi!

Prefixes and postfixes cant be separated from the variable name. So for example instead of . @ sleep it must be [email protected] always.

delchar is not a command to delete characters.

You can use the command breakequip to break equips. 😄

 

You can learn a lot reading the doc, good luck!

\doc\script_commands.txt

@Racaae 

1- It was a mistake to translate

 

2- I did not find the breakequip command in \ doc \ script_commands.txt

 

3- I thought of atcommand, but I did not find

Share this post


Link to post
Share on other sites
  • 0

Are you using updated rAthena? The command is documented just fine.

You can post the untranslated script, the important thing are the commands and syntax, not the messages/names.

 

Edited by Racaae

Share this post


Link to post
Share on other sites
  • 0
14 hours ago, Racaae said:

Are you using updated rAthena? The command is documented just fine.

You can post the untranslated script, the important thing are the commands and syntax, not the messages/names.

 

 

was using 2 emulators, one had and another not ... the idea is to leave my variables, similar to those green letters of the pvp player score. I'll update the script here

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now