Jump to content

cook1e

Members
  • Posts

    129
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by cook1e

  1. Try this.

    Script.

    function	script	Boxes	{
    
    	setarray @i1[0],501; // Common
    	setarray @i2[0],502; // Rare
    	setarray @i3[0],503; // Super Rare
    	set @i1rand,rand( getarraysize(@i1) ); 
    	set @i2rand,rand( getarraysize(@i2) ); 
    	set @i3rand,rand( getarraysize(@i3) ); 
       .chance = rand(100);
    
    		// Super Rare
    		if (.chance == 1){
    			getitem @i3[@i3rand],1;
    			announce "["+strcharinfo(0)+"] got ["+getitemname(@i3[@i3rand])+"] 'Super Rare'.",0;
    
    		} 
            // Rare
    		else if (.chance <= 10 && .chance >= 5){
    			getitem @i2[@i2rand],1;
    			announce "["+strcharinfo(0)+"] obtained ["+getitemname(@i2[@i2rand])+"] 'Rare'.",0;
    
    		} 
    
    		// Common
    		else {
    			getitem @i1[@i1rand],1;
    			announce "["+strcharinfo(0)+"] obtained ["+getitemname(@i2[@i2rand])+"] 'Common'.",0;
    	end; }
    }

     

    item_db (example).

    501,Red_Potion,Red Potion,0,50,,70,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "Boxes"; },{},{}

     

    • Upvote 1
  2. Try this.

    -	script	Lucky_Pick	-1,{
    OnMinute00:
    	sleep 1000 * rand(60);
    	if(addrid(0)){
    		if(checkidle() < 600) setarray .AccountIds[getarraysize(.AccountIds)],getcharid(3);
    		detachrid;
    	} else { end; }
    	while(!attachrid(.AccountIds[rand(getarraysize(.AccountIds))]));
       [email protected] = F_Rand( 501,502 ); // Items ID Here
    	getitem [email protected],1;
    	announce "[ Lucky Prize ]" + strcharinfo(0) + " recived a prize from whos online event",0;
    end;
    }

     

  3. Go to npc/merchants/refine.txt

    search for

    successrefitem [email protected];

    below add

    		if (getequiprefinerycnt([email protected]) >= 7)
            announce strcharinfo(0)+" has refined "+getequipname([email protected])+" to +"+getequiprefinerycnt([email protected])+"!",0;

    it would be like this

    		successrefitem [email protected];
    		if (getequiprefinerycnt([email protected]) >= 7)
            announce strcharinfo(0)+" has refined "+getequipname([email protected])+" to +"+getequiprefinerycnt([email protected])+"!",0;

     

  4. Go to src/map/atcommand.cpp

    search for ACMD_FUNC(go)

    And here are the coordinates of @go.

    Like this.

    /*==========================================
     * @go [city_number or city_name] - Updated by Harbin
     *------------------------------------------*/
    ACMD_FUNC(go)
    {
    	int i;
    	int town;
    	char map_name[MAP_NAME_LENGTH];
    
    	const struct {
    		char map[MAP_NAME_LENGTH];
    		int x, y;
    	} data[] = {
    		{ MAP_PRONTERA,    156, 191 }, //  0=Prontera
    		{ MAP_MORROC,      156,  93 }, //  1=Morroc
    		{ MAP_GEFFEN,      119,  59 }, //  2=Geffen
    		{ MAP_PAYON,       162, 233 }, //  3=Payon
    		{ MAP_ALBERTA,     192, 147 }, //  4=Alberta
    #ifdef RENEWAL
    		{ MAP_IZLUDE,      128, 146 }, //  5=Izlude (Renewal)
    #else
    		{ MAP_IZLUDE,      128, 114 }, //  5=Izlude
    #endif
    		{ MAP_ALDEBARAN,   140, 131 }, //  6=Al de Baran
    		{ MAP_LUTIE,       147, 134 }, //  7=Lutie
    		{ MAP_COMODO,      209, 143 }, //  8=Comodo
    		{ MAP_YUNO,        157,  51 }, //  9=Yuno
    		{ MAP_AMATSU,      198,  84 }, // 10=Amatsu
    		{ MAP_GONRYUN,     160, 120 }, // 11=Gonryun
    		{ MAP_UMBALA,       89, 157 }, // 12=Umbala
    		{ MAP_NIFLHEIM,     21, 153 }, // 13=Niflheim
    		{ MAP_LOUYANG,     217,  40 }, // 14=Louyang
    #ifdef RENEWAL
    		{ MAP_NOVICE,       18, 26  }, // 15=Training Grounds (Renewal)
    #else
    		{ MAP_NOVICE,       53, 111 }, // 15=Training Grounds
    #endif
    		{ MAP_JAIL,         23,  61 }, // 16=Prison
    		{ MAP_JAWAII,      249, 127 }, // 17=Jawaii
    		{ MAP_AYOTHAYA,    151, 117 }, // 18=Ayothaya
    		{ MAP_EINBROCH,     64, 200 }, // 19=Einbroch
    		{ MAP_LIGHTHALZEN, 158,  92 }, // 20=Lighthalzen
    		{ MAP_EINBECH,      70,  95 }, // 21=Einbech
    		{ MAP_HUGEL,        96, 145 }, // 22=Hugel
    		{ MAP_RACHEL,      130, 110 }, // 23=Rachel
    		{ MAP_VEINS,       216, 123 }, // 24=Veins
    		{ MAP_MOSCOVIA,    223, 184 }, // 25=Moscovia
    		{ MAP_MIDCAMP,     180, 240 }, // 26=Midgard Camp
    		{ MAP_MANUK,       282, 138 }, // 27=Manuk
    		{ MAP_SPLENDIDE,   201, 147 }, // 28=Splendide
    		{ MAP_BRASILIS,    182, 239 }, // 29=Brasilis
    		{ MAP_DICASTES,    198, 187 }, // 30=El Dicastes
    		{ MAP_MORA,         44, 151 }, // 31=Mora
    		{ MAP_DEWATA,      200, 180 }, // 32=Dewata
    		{ MAP_MALANGDO,    140, 114 }, // 33=Malangdo Island
    		{ MAP_MALAYA,      242, 211 }, // 34=Malaya Port
    		{ MAP_ECLAGE,      110,  39 }, // 35=Eclage
    		{ MAP_LASAGNA,     193, 182 }, // 36=Lasagna
    	};

    If you change the coordinates recompile.

  5. function	script	gacha1	{
    	setarray .i1[1],909,908,521,575,512,531,558,533,514; // Common Items
    	set .i1rand,rand(1,9); // Randomize Common Items; just change max amount if you add items
    	setarray .i2[1],40740,40929,40777,40786,40776,40785,40517,40590; // Rare Items
    	set .i2rand,rand(1,8); // Randomize Rare Items; just change max amount if you add items
    	setarray .i3[1],41161,41156,20500,20727,40591; // Super Rare Items
    	set .i3rand,rand(1,5); //Randomize Super Rare Items; just change max amount if you add items
    	setarray .i4[1],24004,24010; // Hyper Rare Items
    	set .i4rand,rand(1,2); //Randomize Super Rare Items; just change max amount if you add items
    	set .chance, rand(100);
    
    
    		// Hyper Rare Item
    		if (rand(1000) < 5){
    		getitem .i4[.i4rand],1;
    		announce "["+strcharinfo(0)+"] won a ["+getitemname(.i4[.i4rand])+"] super rare.",0;
    		end;
    		} 
    
    		// Super Rare Item
    		else if (.chance < 4){
    		getitem .i3[.i3rand],1;
    		announce "["+strcharinfo(0)+"] won a ["+getitemname(.i3[.i3rand])+"] rare.",0;
    		end;
    		} 
    
    		// Rare Item
    		else if (.chance < 15){
    		getitem .i2[.i2rand],1;
    		announce "["+strcharinfo(0)+"] won a ["+getitemname(.i2[.i2rand])+"] ga begitu rare.",0;
    		end;
    		} 
    
    		// Common Items
    		else {
    		getitem .i1[.i1rand],1;
    		end; 
    		}
    }

     

    changes

    if (.chance < 1){

    to

    if (rand(1000) < 5){

     

    if (rand(1000) < 5) = 0.50%
    
    if (rand(1000) < 1) = 0.10%
    
    if (rand(1000) < 10) = 1.00%
  6. You mean like this?

    prontera,156,180,3    script    test    833,{
        mes "[Bathory]";
        mes "Eheeheeheehee! The spotlight is on Glast Heim this week, so I'm ferrying people there for a mere 1,000z!";
        next;
        mes "[Bathory]";
        mes "How about it? Want to take a ride on a beautiful Bathory's broom?";
        next;
        switch(select("Prepare for Takeoff!:No thanks.")) {
        case 1:
            if (BaseLevel < 85  || BaseLevel > 90) {
                mes "[Bathory]";
                mes "Come on dearie...";
                mes "You must be 85~90 to enter.";
                close;
            }
            mes "[Bathory]";
            mes "Alright, hold on tight!";
            close2;
            warp "izlu2dun",50,133;
            end;
        case 2:
            mes "["+strcharinfo(0)+"]";
            mes "No thanks, maybe later.";
            close;
        }
    }

     

    Changes

     if (BaseLevel < 85) {

    to

    if (BaseLevel < 85  || BaseLevel > 90) {

     

    • Love 1
  7. Maybe a NPC?

     

    rontera,237,81,5	script	Performer	479,3,3,{
    	end;
    	
    OnTouch:
    	if( .sbragi < gettimetick(2) ){			// triggered within area 7x7, start bragi if not on delay
    		unitskilluseid getnpcid(0),321,10;	// bragi(321) level 10
    		set .sbragi,gettimetick(2) + 180;	// delay 3 minute for npc to cast song
    	}
    	end;
    	
    OnInit:
    	setunitdata getnpcid(0),UNPC_INT,150;	// set npc INT 150
    	setunitdata getnpcid(0),UNPC_DEX,150;	// set NPC DEX 150
    	end;
    }

     

×
×
  • Create New...

Important Information

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