Jump to content

Jyabil

Members
  • Posts

    89
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Jyabil

  1.  

    here's the edited with announce. but still not working... when i click npc can't open, or no pop up message..

    prontera,155,285,4 script Luningning 465,{
     
    mes "[Promo NPC]";
    mes "Get random item for 300,000z?";
    next;
    menu "Yes",-,"No",Menu_No;
     
    if (Zeny < 300000) goto No_Zeny;
     
    setarray .RandItem[0],25035,25036,25037,25038,25039,25040,25041,25042,25043,25044,25045,25046,25047,25048; // Put all the items here
    set .RandCount, getarraysize(.RandItem);
     
    mes "[Promo NPC]";
    mes "Here it is...";
    getitem (.RandItem[rand(.RandCount)],1);
    announce strcharinfo(0)+" got "+getitemname(.RandItem[rand(.RandCount)]+"!",bc_all;
    set Zeny, Zeny - 300000;
    close;
     
    Menu_No:
    mes .RandItem[rand(.RandCount)];
     
    close;
     
    No_Zeny:
    mes "[Random]";
    mes "You don't have enough Zeny.";
    close;
    }

     

    Be sure that you are using <tab> and not <spaces> on the first line of the script.

    prontera,155,285,4<tab>script<tab>Luningning<tab>465,{
    

    If it's still not working, check the console for errors and post it.

  2. Thanks El Dragon and Jyabil, but how can I set the prize to item ID though? 

    And also announce a line before actually announcing who's the winner?

     

    If you want the prize to be items instead of cash points, remove

    set #CASHPOINTS,#CASHPOINTS+500;
    

    and change it to

    getitem 501,1; // In example, this code will give you 1 pc of Red Potion

    To add announcement, add these before the announcing of the winner

    announce "Your Message Here",0,0x00FF00;
    sleep 1000; // 1 second delay before announcing the winner, configure it to your liking
    
    • Upvote 1
  3.  

    ohhh i see i will try this script already...thanks   :)

     

    but i like to be like this so that i limit rare items that i will put on that NPC...but its a big help your script to me thanks buddy like :)

    // Old Violet Box Obtainable Items Database
    //
    // Structure of Database:
    // GroupID,ItemID,Rate
    
    2,501,14	// Red Potion
    2,502,14	// Orange Potion
    2,503,14	// Yellow Potion
    2,504,14	// White Potion
    2,505,14	// Blue Potion
    2,506,14	// Green Potion
    2,507,14	// Red Herb
    2,508,14	// Yellow Herb
    2,509,14	// White Herb
    2,510,14	// Blue Herb
    2,511,14	// Green Herb
    

     

    Change this one

    setarray .RandItem[0],501,502,503,504,505; // Put all the items here 

    To:

    if (rand(100) < 10) {
    setarray .RandItem[0],501,502,503; // Items with 10% Chance
    }
    else {
    setarray .RandItem[0],501,502,503; // Items with 90% chance
    }
    
  4. Does anyone already have this script?

     

    Npc Flow:

    1. Pay zeny let say 300k.

    2. It will give random items just like Old Blue Box/Old Violet Box....example of the item:costume items,potions,weapons,armors,etc.

    3. By Percentage it depends on the item level.

     

     

    Hope some could have this script already...Thanks in Advance

     

    Here's a sample script but you have to input the item_IDs of the items you want to include on the list.

    #3 not included.

    prontera,100,100,4 script Promo NPC 100,{
    
    mes "[Promo NPC]";
    mes "Get random item for 300,000z?";
    next;
    menu "Yes",-,"No",Menu_No;
    
    if (Zeny < 300000) goto No_Zeny;
    
    setarray .RandItem[0],501,502,503,504,505; // Put all the items here
    set .RandCount, getarraysize(.RandItem);
    
    mes "[Promo NPC]";
    mes "Here it is...";
    getitem (.RandItem[rand(.RandCount)],1);
    set Zeny, Zeny - 300000;
    close;
    
    Menu_No:
    mes .RandItem[rand(.RandCount)];
    close;
    
    No_Zeny:
    mes "[Random]";
    mes "You don't have enough Zeny.";
    close;
    }
    
  5. Thanks for the replies but for some odd reason, after getting the buff - character can't move anymore. I'm using Hercules btw, if that makes any sense.

     

    16CV40s.jpg

     

    Because Hercules uses different const identifier.

     

    Change:

    SC_INCREASEAGI
    

    To:

    SC_INC_AGI 

    Or you could change them all to value instead of identifier. Also added the specialeffect.

    sc_start 30,240000,10; specialeffect2 42; //Blessing
    sc_start 32,240000,10; specialeffect2 37; //Agi Up
    sc_start 39,240000,10; specialeffect2 112; // Kyrie
    sc_start 41,240000,3; specialeffect2 75; // Gloria
    sc_start 40,240000,5; specialeffect2 76; // Magnificat  

    Also change the timing for the 1 Hour Buff

    sc_start 30,3600000,10; specialeffect2 42; //Blessing
    sc_start 32,3600000,10; specialeffect2 37; //Agi Up
    • Upvote 1
  6. May I bump? Added some details on the request.

     

    Try this:

    prontera,100,100,4	script	Healer	99,{
    
    if (gettimetick(1) < @timer) {
    dispbottom "Pls try again after 3 seconds";
    end;
    }
    
    if (BaseLevel <= 50) {
    	specialeffect2 313;
    	percentheal 100,100;
    	sc_start SC_INCREASEAGI,240000,10;
    	sc_start SC_BLESSING,240000,10;
    	sc_start SC_KYRIE,240000,10;
    	sc_start SC_GLORIA,240000,3;
    	sc_start SC_MAGNIFICAT,240000,5;
    	}
    if (BaseLevel >= 51 && BaseLevel <= 90) {
    	specialeffect2 313;
    	percentheal 100,100;
    	sc_start SC_INCREASEAGI,240000,10;
    	sc_start SC_BLESSING,240000,10;
    	}
    if (BaseLevel >= 91) {
    	mes "[Healer]";
    	mes "Please select an option.";
    	mes " ";
    	mes "Cost:";
    	mes "Normal Buff: 1,500z";
    	mes "1 Hour Buff: 200,000z";
    	next;
    	menu "Normal Buff",-,"1 Hour Buff",One_Hour;
    
    	if (Zeny < 1500) goto Zeny_Lack;
    	specialeffect2 313;
    	percentheal 100,100;
    	sc_start SC_INCREASEAGI,240000,10;
    	sc_start SC_BLESSING,240000,10;
    
    	set Zeny, Zeny - 1500;
    }
    set @timer, gettimetick(1)+3;
    end;
    	
    One_Hour:
    	if (Zeny < 200000) goto Zeny_Lack;
    	specialeffect2 313;
    	percentheal 100,100;
    	sc_start SC_INCREASEAGI,3600000,10;
    	sc_start SC_BLESSING,3600000,10;
    	set Zeny, Zeny - 200000;
    	set @timer, gettimetick(1)+3;
    	close;
    
    Zeny_Lack:
    	mes "[Healer]";
    	mes "You don't have enough Zeny";
    	close;
    }
    
    

    Edit:

    Didn't know that there is already a reply.

    Also, I think I misunderstood the request. I taught that if you choose to pay 200,000z, the buff will stay for 1 hour.

    Sharing it anyways.

  7. As per the script that EL Dragon posted, here's a GM activated version.

    prontera,100,100,4	script	Who's Online Event	99,{
    
    if (getgroupid() == 99) goto Event_Menu;
    mes "[Who's Online Event]";
    mes "Only GM's are allowed to use this NPC.";
    close;
    
    Event_Menu:
    	set .@invokeid,getcharid(3);
    	mes "[Who's Online Event]";
    	mes "Enable event?";
    	menu "Yes",-,"No",Event_End;
    	
    	while(1){
    	query_sql "select account_id from `char` where online = 1 order by rand() limit 1", .@aid;
    	attachrid .@aid;
    	if( CheckVending() ){
    		DetachRID();
    		continue;
    	}
    	announce strcharinfo(0) +" won 500 Cash in Who's Online Event", 0,0x00FF00;
    	set #CASHPOINTS,#CASHPOINTS+500;
    	dispbottom "You got 500 cash point";
    	break;
    	}
    	attachrid(.@invokeID);
    	close;
    
    Event_End:
    close;
    }
    
  8.  

    so how to edit drop and exp rates?

    i try this edit.. my server exp rates is 80x and i want it to be 120 if the floating rates enable.. how to do?

     

    i tried this? is this correct?

    //===== rAthena Script =======================================
    //= Floating Server Rates
    //===== By: ==================================================
    //= Lupus
    //===== Current Version: =====================================
    //= 1.0
    //===== Compatible With: =====================================
    //= rAthena Project
    //===== Description: =========================================
    //= It's a simply example of setbattleflag
    //= This script will change your server rates from 1x to 1.5x every 6 hours
    //= Note: It doesn't affect Card granted drops, MVP & Treasure Chests drops ^_-
    //=       It also doesn't affect CARD drops, because they are just 0.01%
    //===== Additional Comments: =================================
    //= You can make incredible scripts with 'setbattleflag'!
    //============================================================
     
    - script FloatingRates -1,{
    OnInit:
    //add any other HOURS
    OnHour12:
    OnHour18:
    //-------------------
    set $@brate,rand(12000,22000);
    set $@jrate,rand(12000,22000);
    set $@drate,rand(12000,22000);
    //Base exp
    setbattleflag("base_exp_rate",$@brate);
    //Job exp
    setbattleflag("job_exp_rate",$@jrate);
    //Drops
    setbattleflag("item_rate_common",$@drate);
    setbattleflag("item_rate_heal",$@drate);
    setbattleflag("item_rate_use",$@drate);
    setbattleflag("item_rate_equip",$@drate);
    //we don't change card drops rate, because these values won't change them anyway
    atcommand "@reloadmobdb";
     
    announce "Current Rune-Midgard rates are: 1."+($@brate-100)+"x 1."+($@jrate-100)+"x 1."+($@drate-100)+"x",bc_all,0xFF6060;
    end;
    }

     

    The code below from your script will set the rates randomly from 120 - 220.

    set $@brate,rand(12000,22000);
    set $@jrate,rand(12000,22000);
    set $@drate,rand(12000,22000);
    

    If you want it to be set to 120 only, it should be like these:

    set $@brate, 12000;
    set $@jrate, 12000;
    set $@drate, 12000;
    

    Also, change your announcement to:

    announce "Current Rune-Midgard rates are: "+($@brate * .01)+" x "+($@jrate * .01)+" x "+($@drate * .01),bc_all,0xFF6060;

    Note: The script will set your rates to 120 all the time. If you want to set it back to 80, you can add a timer or a new script that will change it back to 80.

  9. There are 2 options that I can think of that you can use in your MVP event script.

     

    First, at the end of the event, instead of using areawarp, make an NPC that will warp them back to Prontera.

    That way, you can just add getitem on that NPC to give rewards before warping them back.

     

    The other option is by getting all the names of the player that participated in the event.

    For that, you need to set arrays, loops and a lot of ifs.

  10. please post an example..

    i tried reading this --> http://rathena.org/wiki/Basic_Scripting#Conditions.2C_Variables.2C_and_Set

    but i don't understand what it means.. or which part should i edit.. =/

    should it be like 

    HuntDelay = #gettimetick(2)+86400; //Once a day only.

    and

    if(#gettimetick(2) < HuntStart) {

    sorry for being noob =/ 

     

    To make it account based, change all the HuntDelay to #HuntDelay

  11. I would suggest using Decrease Agility Skill or @speed command.

     

    Decrease Agility:

    prontera,50,50,3	script	Slower	100,{
    sc_start SC_DECREASEAGI,50000,10; // 50 seconds
    end;
    }
    

    @speed:

    prontera,50,50,3	script	Slower	100,{
    atcommand "#speed "+strcharinfo(0)+" 200"; // Just change the 200 for the speed you wanted
    end;
    }
    

    But you need something like a trigger to make the speed default. If it is an event, they can talk to an npc or enter a portal and insert the code below.

     

    @speed (default):

    atcommand "#speed "+strcharinfo(0)+" -1";
    

    Their speed will also change back to normal if they reconnected/character select.

  12. To do that, you need to add another custom wing (with the same sprite) that is set to low headgear.

     

    On your npc, you can add something like these:

    if (countitem(W) == 1 && countitem(X) == Y) {
    delitem w, 1;
    delitem x, y;
    getitem z, 1;
    end;
    }
    

    W being your mid custom wing id

    X being your tcg id

    Y quantity of tcq needed

    Z being your low custom wing id

  13. Here's a sample script:

    prontera,170,164,1    script    Max Pvp    726,{ // Change to your NPC
    set @MP_Level, 99 - BaseLevel;
    warp "prontera",0,0; // Change to your PVP map
    goto MP_Start;
    end;
    
    MP_Start:
    atcommand "#blevel "+strcharinfo(0)+" "+@MP_Level+"";
    end;
    
    OnPCLogoutEvent:
    OnPCDieEvent: // When they die or logout, it will revert their original level
    if (strcharinfo(3) == "prontera") { // Change to your PVP map
    atcommand "#blevel "+strcharinfo(0)+" -"+@MP_Level+"";
    end;
    }
    
    }
    • Upvote 1
  14.  

     

    you can write like this

    -	script	Sample#auto_pvp	-1,{
    
    OnClock0600:
    OnClock1200:
    OnClock1800:
    OnClock0000:
    	pvpon "prontera";
    	announce "PVP ON",bc_all;
    	sleep ( 120 * 60000 );
    	pvpoff "prontera";
    	announce "PVP OFF",bc_all;
    	end;
    }
    

    if just 1 hour?

     

     

    If you want it every hour, you can change the OnClock settings.

    OnClock0100:

    OnClock0200:

    OnClock0300:

    and so on...

     

    As per your question, you wanted an Auto PvP 2 hours per day? Or every 2 hours? Because the script Emistry gave you will enable PvP every 2 hours. Just wanna clarify..

  15. sampang99

    Posted Today, 08:28 PM

    How to make this to announce "The Koe will be end in 5 mins" before the time end by 5 mins

    heres my time

    OnClock0430:

    OnClock0530:

    OnClock0630:

    OnClock0730:

    OnClock0830:

    OnClock0930:

    OnClock1230:

    OnClock1330:

    OnClock1430:

    OnClock1530:

    OnClock1630:

    OnClock1730:

    OnClock2030:

    OnClock2130:

    OnClock2230:

    OnClock2330:

     

    Is your WoE every hour?

     

    Just add these commands on your script.

    - initnpctimer // At the start of the WoE

    - OnTimer3300000: // If WoE is 1 Hour, It will announce after 55 mins

      announce "Your message",0;

      end;

     

    If you don't know where to insert them, post your script.

  16. Let me rephrase the description on the Wiki.

     

    On normal maps,

    It will freeze monsters as well as guild or party members on the same party as you.

     

    On PvP maps,

    It will freeze everyone.

     

    On GvG/WoE maps,

    It will freeze all enemies, including your guild mates if you are on the same party.

    So if you don't wanna freeze your guild mates, avoid being on the same party with them.

  17. UprisingValkyrie

    Posted Yesterday, 05:06 PM

    Really? even your team mates or guild mates? i think its not...

     

    From Wiki:

    Frost Joker freezes monsters and party members within caster's view by chance in normal maps. In PvP or Guild Siege maps, Frost Joker will also affect enemy characters but not allied characters who are outside the caster's party.

×
×
  • Create New...