Jump to content

Luciar

Support Leaders
  • Content Count

    45
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by Luciar


  1. Set a variable that is increased every time someone purchases a heal. Display the variable.

    Please see the script command documentation and sample scripts located at /doc/script_commands.txt and /doc/sample/

    Be cognizant that you will need to handle the number prior to it exceeding the maximum integer value of 2^31 to avoid any issues.


  2. I would potentially be willing to help you, but this request remains unclear and lacking in detail. The poor translation coupled with limited information makes it impossible to assist you. 

    Please try to provide clear details of what exactly you want. If you are unable to do so in English, consider using one of our international forums found here.


  3. 7 hours ago, bWolfie said:

    tip: put your scripts in pastebin so people don't have to download files.

     

    ^This.

    Also, you have made several requests on the forums recently. It would be nice to see you attempt to start learning how to do these things for yourself. The purpose of this forum is not to do everything for you.

    The additions you requested are quite simple, and there are examples of how to do exactly what you have requested throughout the Hercules repository and forums.

    Use these resources to get started:

    doc/script_commands.txt
    https://github.com/HerculesWS/Hercules/blob/stable/doc/script_commands.txt#L1005 

     

    https://github.com/HerculesWS/Hercules/wiki/Timers-(Scripting)

     

    Look through scripts several scripts found in the repository or custom scripts you have collected. Read them line by line. If you don’t know what a specific line does, look up its functionality in doc/script_commands.txt.

    Once you have begun to make your own attempt, if you need assistance, I will be happy to help you.

     

     

     


  4. 15 minutes ago, Dangerous said:

    Just change "getgmlevel" to '"getgroupid" .

     

    I was just coming back to edit my post with regard to this!

    @Miud00 

    note that getgmlevel() returns the Level of the group to which the player is assigned. (See level below)

    getgroupid() returns the group ID of the group to which the player is assigned. (See id below)

    As defined in conf/groups.conf

    {
    	id: 1
    	name: "Group"
    	inherit: ( "" )
    	level: 0
    	...

     


  5. This script could use a few updates on syntax and modern scripting conventions. As always try referring to the /doc/ and doc/sample directories in Hercules for best practices, examples, and script command documentation.

     

    Try Replacing this:  

    	if (getgmlevel() >= $minlvgm)
    		set .@menu$,select("- Entrar na sala VIP","- Administrar VIPs","","- Nada");
    	else
    		set .@menu$,select("- Entrar na sala VIP","","- Dias restantes de VIP","- Nada");
    switch(.@menu$){

     

    With This:

    	if (getgmlevel() >= $minlvgm)
    		.@menu = select("- Entrar na sala VIP","- Administrar VIPs","","- Nada");
    	else
    		.@menu = select("- Entrar na sala VIP","","- Dias restantes de VIP","- Nada");
    switch (.@menu) {

    Note that the select() script command will return an INTEGER value corresponding to the menu option selected, not a string. Furthermore, switch() will not accept a string as an argument.

    Let me know if that fixes your problem. I have not reviewed the entire script.

×
×
  • Create New...

Important Information

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