Jump to content
  • 0

Question

Posted

Can modify when player warp to the map or near the fish hole... auto fishing? because when i @reloadscript all the players they can't continue fishing while AFK... Not using @afk

 

brasilis,241,60,0    script    Fishing Hole    844,{
    
//Fishing rod
set .@Rod,2764;
//Fishing Lure
set .@Lure,2775;
//Auto-Fish
set .@Auto,1;
//Auto-Fish on Fail
set .@AutoFail,1;
Fish:
    if (isequipped(.@Rod)) && (isequipped(.@Lure)){
        specialeffect EF_BUBBLE,"Fishing Hole";
        dispbottom "[Fishing] Casting...";
        set .@fcast,15;
            if (isequipped(2550)) { //Fisher's Muffler
                set .@fcast,.@fcast - 2;
            }
            if (isequipped(2443)) { //Fisher's Boots
                set .@fcast,.@fcast - 2;
            }
            if (isequipped(2764)) { //Fishing Pole
                set .@fcast,.@fcast - 3;
            }
            if (isequipped(2775)) { //Fishing Lure
                set .@fcast,.@fcast - 1;
            }
        progressbar "ffffff",.@fcast;
        if (rand(1,20) == 2){
        getitem 6096,1; //Fish with Blue Back
        specialeffect2 EF_TEMP_OK;
        mapannounce strcharinfo(3),strcharinfo(0)+" has caught a Blue Fish!",bc_map,"0xff77ff";
        if(.@Auto==1){
        goto Fish;}else{
        end;}
        }
            if (rand(1,6) == 1) ||(rand(1,6) == 3) || (rand(1,6) == 6){
            setarray .@Catch[0],7420,7539,14524,12029,12030,12028,12031,13550;// List of Junk/Other
            set .@CatchRand,.@Catch[rand(getarraysize(.@Catch))];
            getitem .@CatchRand,1;
            }
            else {
            dispbottom "[Fishing] Nothing was caught...";
            if(.@AutoFail == 1){
            goto Fish;} else{
            end;}
            }
        if (rand(1,100) == 3){
        setarray .@Rare[0],7420,13604,13592,13578,13596,13572,13574,7420,7539,14524,12029,12030,12028,13550;
        set .@RareCatch, .@Rare[rand(getarraysize(.@Rare))];
        getitem .@RareCatch,1; //Reward
        mapannounce strcharinfo(3),strcharinfo(0)+" has caught a "+getitemname(.@RareCatch)+"!",bc_map,"0x33CC00";
        }
        if(.@Auto == 1){
        goto Fish;} else{
        end;}
        }
    else {
    dispbottom "[Fishing] You need a Rod and Lure.";
    end;
    }
}

// Duplicates
brasilis,258,60,0    duplicate(Fishing Hole)    Fishing Hole#fh1    844
brasilis,256,62,0    duplicate(Fishing Hole)    Fishing Hole#fh2    844
brasilis,253,61,0    duplicate(Fishing Hole)    Fishing Hole#fh3    844
brasilis,303,86,0    duplicate(Fishing Hole)    Fishing Hole#fh4    844

brasilis,261,64,5    shop    Fishing Shop    912,2764:1000,2775:1000,2550:1000,2443:1000

5 answers to this question

Recommended Posts

  • 0
Posted
31 minutes ago, pajodex said:

dont use @reloadscript then. Use @loadnpc/@reloadnpcfile instead so your players wont be interrupted.

I see... Then how running script how to unload? and i test on the same script it cant let me load again...

  • 0
Posted
---------------------------------------

@loadnpc <path>

Loads an NPC script by path.

Example:
@loadnpc npc/custom/jobmaster.txt

---------------------------------------

@unloadnpc <npc name>

Unloads an NPC.

Example:
@unloadnpc Job Master

---------------------------------------

@unloadnpcfile <path>

Unloads all NPCs in a file.

Example:
@unloadnpcfile npc/custom/jobmaster.txt

---------------------------------------

@reloadnpcfile <path>

Unloads and loads an NPC.
Same as @unloadnpcfile and @loadnpc but ran as one command.

Example:
@reloadnpcfile npc/custom/jobmaster.txt

---------------------------------------

You can literally read the doc folder regarding this.. doc/atcommands.txt

  • 0
Posted
23 minutes ago, pajodex said:
---------------------------------------

@loadnpc <path>

Loads an NPC script by path.

Example:
@loadnpc npc/custom/jobmaster.txt

---------------------------------------

@unloadnpc <npc name>

Unloads an NPC.

Example:
@unloadnpc Job Master

---------------------------------------

@unloadnpcfile <path>

Unloads all NPCs in a file.

Example:
@unloadnpcfile npc/custom/jobmaster.txt

---------------------------------------

@reloadnpcfile <path>

Unloads and loads an NPC.
Same as @unloadnpcfile and @loadnpc but ran as one command.

Example:
@reloadnpcfile npc/custom/jobmaster.txt

---------------------------------------

You can literally read the doc folder regarding this.. doc/atcommands.txt

Thank you! 

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...