Jump to content
  • 0
Dev Yhams

HOW TO SCRIPT

Question

give me a script for the item effect. example you can open box items is lvl 50 only it is forbidden to open low lvl

Edited by Mael
Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0

You can actually just follow the Awakening/Berserk Potion trick, which set the equip level to 50, then only level 50 and above only able to use the items.

603,Old_Blue_Box,Old Blue Box,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,50,,,{ getrandgroupitem(IG_BlueBox),1; },{},{}

Your attempt above are workable, but it will remove your item if you character have less than 50 level.

  • Upvote 1
Link to comment
Share on other sites

  • 1
14169,F_Blessing_10_Scroll_Box,Blessing 10 Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ if(BaseLevel >= 50){ getitem 12215,10; } else{ getitem 14169,1; } },{},{}

.

Edited by Hyroshima
Link to comment
Share on other sites

  • 0

i need to set this box on only lvl 50 to avail to open this box

603,Old_Blue_Box,Old Blue Box,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_BlueBox),1; },{},{}

Link to comment
Share on other sites

  • 0
603, Old_Blue_Box, Old Blue Box, 2,10000,, 200 ,,,,, 0xFFFFFFFF, 7,2 ,,,,,, { if(BaseLevel == 50){ getrandgroupitem (IG_BlueBox),1; } }, {}, {}

?

Edited by Hyroshima
Link to comment
Share on other sites

  • 0
On 5/16/2018 at 8:35 PM, Stolao said:

https://github.com/rathena/rathena/blob/master/doc/item_db.txt

 

Rtfm

 

Edit: Moved wrong damn section -_-

heelow ser i need your help how to set this item for avail only lvl 50 to open it
603,Old_Blue_Box,Old Blue Box,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_BlueBox),1; },{},{}
 

i want to make lvl 50 only open this box

13585,Blessing10_Box50,Blessing Scroll 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12215,50; },{},{}
 

2 hours ago, Hyroshima said:

I didn't understand your request

i want to make lvl 50 only open this box

13585,Blessing10_Box50,Blessing Scroll 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12215,50; },{},{}
 

 

 

2 hours ago, Hyroshima said:
603, Old_Blue_Box, Old Blue Box, 2,10000,, 200 ,,,,, 0xFFFFFFFF, 7,2 ,,,,,, { if(BaseLevel == 50){ getrandgroupitem (IG_BlueBox),1; } }, {}, {}

?

i try not working

Link to comment
Share on other sites

  • 0
1 hour ago, Chaos92 said:

that is for ONLY 50.

If 50 and above, use >=

kailangan boss ang makakpag open lang ng box is 50 pataas

pag 50 pababa hndi pwde iopen

 

1 hour ago, Chaos92 said:

that is for ONLY 50.

If 50 and above, use >=

you only need to be able to open the box is 50 or more
/*
- FREEBIES with Level Range

- ADD THIS ITEM SCRIPT ON YOUR item_db.txt
- Make your own Item ID shempre ung nilagay kong item ID is for my Freebies Box on my Pre Made Server.
+ 22721,Freebies_Box,Freebies Box,18,10,,0,,,,0,0xFFFFFFFF,7,2,,,,,,{ callfunc "freebies_box",0; },{ },{}
-- Enable this NPC on your npc script_custom.conf

*/

function    script    freebies_box    {
    set [email protected]_ID,22721;    //ITEM FREEBIES BOX
    
    if(BaseLevel >= 20 && BaseLevel <= 39){
        if(!#FREE_01){
            set #FREE_01,1;            
                //LAGAY MO DITO LAHAT NG FREEBIES ITEMS MO
                getitem 14003,2;
                
                dispbottom "You receive your first Freebies for Level 20~39.";
                
                //BALIK PADIN ANG FREEBIES BOX PARA SA NEXT MISSION LEVEL NYA.
                getitem [email protected]_ID,1;
            end;
        }else{
            dispbottom "Your account already claimed the freebies for Level 20~39.";
            
            //BABALIK LANG ANG ITEM KUNG HINDI NAG MEET YUNG LEVEL
            getitem [email protected]_ID,1;
        }
        
    }else if(BaseLevel >= 40 && BaseLevel <= 59){
        if(!#FREE_02){
            set #FREE_02,1;            
                //LAGAY MO DITO LAHAT NG FREEBIES ITEMS MO
                getitem 14003,2;
                
                dispbottom "You receive your first Freebies for Level 40~59.";
                
                //BALIK PADIN ANG FREEBIES BOX PARA SA NEXT MISSION LEVEL NYA.
                getitem [email protected]_ID,1;
            end;
        }else{
            dispbottom "Your account already claimed the freebies for Level 40~59.";
            
            //BABALIK LANG ANG ITEM KUNG HINDI NAG MEET YUNG LEVEL
            getitem [email protected]_ID,1;
        }
        
    }else if(BaseLevel >= 60 && BaseLevel <= 79){
        if(!#FREE_03){
            set #FREE_03,1;            
                //LAGAY MO DITO LAHAT NG FREEBIES ITEMS MO
                getitem 14003,2;
                
                dispbottom "You receive your first Freebies for Level 60~79.";
                
                //BALIK PADIN ANG FREEBIES BOX PARA SA NEXT MISSION LEVEL NYA.
                getitem [email protected]_ID,1;
            end;
        }else{
            dispbottom "Your account already claimed the freebies for Level 60~79.";
            
            //BABALIK LANG ANG ITEM KUNG HINDI NAG MEET YUNG LEVEL
            getitem [email protected]_ID,1;
        }
        
    }else if(BaseLevel >= 80 && BaseLevel <= 89){
        if(!#FREE_04){
            set #FREE_04,1;            
                //LAGAY MO DITO LAHAT NG FREEBIES ITEMS MO
                getitem 14003,2;
                
                dispbottom "You receive your first Freebies for Level 80~89.";
                
                //BALIK PADIN ANG FREEBIES BOX PARA SA NEXT MISSION LEVEL NYA.
                getitem [email protected]_ID,1;
            end;
        }else{
            dispbottom "Your account already claimed the freebies for Level 80~89.";
            
            //BABALIK LANG ANG ITEM KUNG HINDI NAG MEET YUNG LEVEL
            getitem [email protected]_ID,1;
        }
        
    }else if(BaseLevel >= 90 && BaseLevel <= 99){
        if(!#FREE_05){
            set #FREE_05,1;            
                //LAGAY MO DITO LAHAT NG FREEBIES ITEMS MO
                getitem 14003,2;
                
                dispbottom "You receive your first Freebies for Level 90~99.";
                
                //WALA NG FREEBIES BOX KAPAG LEVEL 90 na KASI LAST PART NA ITO EH
            end;
        }else{
            dispbottom "Your account already claimed the freebies for Level 90~99.";
        }    
    }else{    
        //BABALIK LANG ANG ITEM KUNG HINDI NAG MEET YUNG LEVEL
        getitem [email protected]_ID,1;
        
        mes "[Game Master]";
        mes "^FF0000Sorry your level is not enough to get the freebies^000000.";
        mes "Level Required:";
        mes "Level: 20~39";
        mes "Level: 40~59";
        mes "Level: 60~79";
        mes "Level: 80~89";
        mes "Level: 90~99";
        end; 
    }
    
}

 

how to fix it because after exceeding the lvl they can no longer get the reward of the loser

Link to comment
Share on other sites

  • 0

1st don't double post. Use edit post to update your post.

Your question has been answer already by @Hyroshima and @Chaos92

24 minutes ago, Hyroshima said:
603, Old_Blue_Box, Old Blue Box, 2,10000,, 200 ,,,,, 0xFFFFFFFF, 7,2 ,,,,,, { if(BaseLevel == 50){ getrandgroupitem (IG_BlueBox),1; } }, {}, {}

?

Change this

if(BaseLevel == 50)

to this

if(BaseLevel >= 50)

 

 

Link to comment
Share on other sites

  • 0
Just now, mrfizi said:

1st don't double post. Use edit post to update your post.

Your question has been answer already by @Hyroshima and @Chaos92

Change this

if(BaseLevel == 50)

to this

if(BaseLevel >= 50)

 

 

itry

Link to comment
Share on other sites

  • 0
Just now, Dev Yhams said:

 

how to fix it because after exceeding the lvl they can no longer get the reward of the loser

use NPC, requirement to redeem base level 50 or more.

and use getitem for anything item that u want in the box.

Link to comment
Share on other sites

  • 0

14169,F_Blessing_10_Scroll_Box,Blessing 10 Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ if(BaseLevel >= 50)getitem 12215,10; },{},{}
 

how to fix it if the item is not yet lvl 50 the box will not be lost or he will not be able to click the items box
1 hour ago, mrfizi said:

1st don't double post. Use edit post to update your post.

Your question has been answer already by @Hyroshima and @Chaos92

Change this

if(BaseLevel == 50)

to this

if(BaseLevel >= 50)

 

14169,F_Blessing_10_Scroll_Box,Blessing 10 Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ if(BaseLevel >= 50)getitem 12215,10; },{},{}

how to fix it if the item is not yet lvl 50 the box will not be lost or he will not be able to click the items box
59 minutes ago, Dev Yhams said:

14169,F_Blessing_10_Scroll_Box,Blessing 10 Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ if(BaseLevel >= 50)getitem 12215,10; },{},{}

how to fix it if the item is not yet lvl 50 the box will not be lost or he will not be able to click the items box

 

1 hour ago, Dev Yhams said:

itry

the item disappears when he uses it when he is not yet at the correct lvl to open
JUST RETURN THE ITEM IF THE LEVEL CANNOT BE FOUND
1 hour ago, mrfizi said:

1st don't double post. Use edit post to update your post.

Your question has been answer already by @Hyroshima and @Chaos92

Change this

if(BaseLevel == 50)

to this

if(BaseLevel >= 50)

 

JUST RETURN THE ITEM IF THE LEVEL CANNOT BE FOUND

 

Link to comment
Share on other sites

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.



×
×
  • Create New...

Important Information

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