Jump to content

Dev Blaze

Members
  • Posts

    212
  • Joined

  • Last visited

Posts posted by Dev Blaze

  1. Hello anyone help me.. i disbled normal cards already ,

    my question posible changes only MVP and Miniboss  cards only? credits script Euphy thanks

    MVP cards and MINI boss card and if they trade Rare boss card points is different from the original 5 point each mvp to 10points please help me thank you in advance.

    Quote

    //===== rAthena Script =======================================
    //= Card Trader
    //===== By: ==================================================
    //= Euphy
    //===== Current Version: =====================================
    //= 1.1 
    //===== Compatible With: =====================================
    //= rAthena SVN
    //===== Description: =========================================
    //= Exchange cards for points.
    //============================================================

    prontera,164,168,3    script    Card Trader    90,{
        mes "[ Card Trader ]";
        mes "Hi, "+strcharinfo(0)+"!";
        mes "What can I do for you?";
        next;
        switch(select(" > Information: > Trade in cards: > Point shop (^0055FF"+getd(.Points$)+"^000000): > Leave")) {
        case 1:
            mes "[ Card Trader ]";
            mes "Do you find that you've got";
            mes "useless cards lying around?";
            mes "I'll be glad to take them off";
            mes "your hands!";
            next;
            mes "[ Card Trader ]";
            mes "I'll give you ^0055FF"+.Points[0]+" Point"+((.Points[0] == 1)?"":"s")+"^000000 for each";
            mes "card you give me, and";
            mes "^0055FF"+.Points[1]+" Points^000000 for MVP cards.";
            mes "You can trade those points";
            mes "for items later on.";
            mes "How does that sound?";
            emotion e_cash;
            close;
        case 2:
            mes "[ Card Trader ]";
            mes "Select the cards you";
            mes "want to trade in.";
            if (.Level) {
                mes " ";
                mes "They must be dropped";
                mes "by monsters of level";
                mes .Level+" and above.";
            }
            deletearray @sold_nameid[0],getarraysize(@sold_nameid);
            callshop "card_shop",2;
            npcshopattach "card_shop";
            end;
        case 3:
            mes "[ Card Trader ]";
            mes "You have ^0055FF"+getd(.Points$)+"^000000 Point"+((getd(.Points$) == 1)?".":"s.");
            callshop "card_shop",1;
            npcshopattach "card_shop";
            end;
        case 4:
            mes "[ Card Trader ]";
            mes "*yawn*";
            mes "See you later!";
            emotion e_yawn;
            close;        
        }

    OnSellItem:
        mes "Cards to sell:";
        mes "-----------------------------------";
        for(set .@i,0; .@i<getarraysize(@sold_nameid); set .@i,.@i+1)
            if (@sold_nameid[.@i] > 4000 && @sold_nameid[.@i] < 4700) {
                set .@mvp, compare(.MVP$,""+@sold_nameid[.@i]);
                if (!.@mvp) {
                    continue;
                }
                set .@card_id[getarraysize(.@card_id)], @sold_nameid[.@i];
                set .@card_amt[getarraysize(.@card_amt)], @sold_quantity[.@i];
                mes ((.@mvp)?"  ^FF0000":"  ^777777")+@sold_quantity[.@i]+"x "+getitemname(@sold_nameid[.@i])+"^000000";
                set .@card_total, .@card_total+(@sold_quantity[.@i]*((.@mvp)?.Points[1]:.Points[0]));
            }
        deletearray @sold_nameid[0], getarraysize(@sold_nameid);
        deletearray @sold_quantity[0], getarraysize(@sold_quantity);
        if (!.@card_id) {
            mes "  ^777777(none)^000000";
            emotion e_swt;
            next;
            close;
        }
        mes " ";
        mes "---------- Total: ^0055FF"+.@card_total+" pt.^000000 -------";
        next;
        if(select(" > ^0055FFComplete trade...^000000: > ^777777Cancel^000000") == 2) {
            mes "[ Card Trader ]";
            mes "Oh, okay...";
            emotion e_hmm;
            close;
        }
        for(set .@i,0; .@i<getarraysize(.@card_id); set .@i,.@i+1)
            delitem .@card_id[.@i],.@card_amt[.@i];
        setd .Points$, getd(.Points$)+.@card_total;
        mes "[ Card Trader ]";
        mes "All done!";
        emotion e_ho;
        close;

    OnBuyItem:
        for(set .@i,0; .@i<getarraysize(@bought_nameid); set .@i,.@i+1)
            for(set .@j,0; .@j<getarraysize(.Shop); set .@j,.@j+2)
                if (@bought_nameid[.@i] == .Shop[.@j]) {
                    set .@cost, .@cost+(.Shop[.@j+1]*@bought_quantity[.@i]);
                    break;
                }
        if (.@cost > getd(.Points$)) {
            mes "[ Card Trader ]";
            mes "You don't have enough Points.";
            emotion e_omg;
        }
        else {
            mes "Items purchased:";
            mes "-----------------------------------";
            for(set .@i,0; .@i<getarraysize(@bought_nameid); set .@i,.@i+1) {
                getitem @bought_nameid[.@i], @bought_quantity[.@i];
                mes "  ^777777"+@bought_quantity[.@i]+"x "+getitemname(@bought_nameid[.@i])+"^000000";
            }
            mes " ";
            mes "---------- Total: ^0055FF"+.@cost+" pt.^000000 -------";
            setd .Points$, getd(.Points$)-.@cost;
            emotion e_cash;
        }
        deletearray @bought_nameid[0], getarraysize(@bought_nameid);
        deletearray @bought_quantity[0], getarraysize(@bought_quantity);
        close;

    OnInit:
        set .Level,0;           // Minimum monster level to trade corresponding cards.
        set .Points$,"#Card_Points";    // Variable to store points.
        setarray .Shop[0],        // Card Shop items: <ID>,<point cost>
         14508,10,616,10;
        setarray .Points[0],1,100;    // Points per <normal card>,<MVP card>
        set .MVP$,            // List of MVP cards.
          "4121,4123,4128,4131,4132,4134,4135,4137,4143,4144,4145,4146,4147,4148,4168,4236,"+
          "4241,4263,4276,4302,4305,4318,4324,4330,4342,4357,4359,4361,4363,4365,4399,4403,4407";
        
        npcshopdelitem "card_shop",909;
        for(set .@i,0; .@i<getarraysize(.Shop); set .@i,.@i+2)
            npcshopadditem "card_shop",.Shop[.@i],.Shop[.@i+1];
        end;
    }
    -    shop    card_shop    -1,909:-1

     

  2. Hello  can i ask how to add hourly points (will not work for people vending/auto-trading) script link https://pastebin.com/ry0JJp6U  credit Emistry

    1.  
    2. -   script  hourly_point_main   -1,{
    3.    
    4.     OnInit:
    5.         .npc_name$ = strnpcinfo(3);
    6.         bindatcmd "check",.npc_name$+"::OnAtcommand";
    7.         end;
    8.        
    9.     OnAtcommand:
    10.         dispbottom "Accumulated "+#daily_minute_count;
    11.         end;
    12.        
    13.     OnUpdate:
    14.         #daily_minute_count++;
    15.         deltimer .npc_name$+"::OnUpdate";
    16.         dispbottom "Accumulated "+#daily_minute_count+" minute(s)";
    17.         switch ( #daily_minute_count ) {
    18.             default:
    19.                 break;
    20.             case 60: // 60 minutes
    21.                 #CASHPOINT += 1;
    22.                 getitem 512,1;
    23.                 break;
    24.             case 120: // 120 minutes
    25.                 #CASHPOINT += 2;
    26.                 getitem 512,2;
    27.                 break;
    28.             case 180: // 180 minutes
    29.                 #CASHPOINT += 3;
    30.                 getitem 512,3;
    31.                 break;
    32.             case 240: // 240 minutes
    33.                 #CASHPOINT += 4;
    34.                 getitem 512,4;
    35.                 break;
    36.             case 300: // 300 minutes
    37.                 #CASHPOINT += 5;
    38.                 getitem 512,6;
    39.                 break;
    40.             case 360: // 360 minutes
    41.                 #CASHPOINT += 6;
    42.                 getitem 512,7;
    43.                 break;
    44.             case 420: // 420 minutes
    45.                 #CASHPOINT += 7;
    46.                 getitem 512,8;
    47.                 break;
    48.             case 480: // 480 minutes
    49.                 #CASHPOINT += 8;
    50.                 getitem 512,9;
    51.                 #daily_minute_count = 0; // reset.
    52.                 break;
    53.         }
    54.        
    55.     OnPCLoginEvent:
    56.         addtimer ( 60 * 1000 ), .npc_name$+"::OnUpdate";
    57.         end;
    58. }

     

  3. 12 minutes ago, Rynbef said:

    This simple script works fine:

    
    -	script	HorlyPoints	-1,{
    
    OnInit:
    	end;
    
    OnMinute01:
    	query_sql("SELECT `account_id` FROM `char` WHERE `online`='1'",.@accid);
    	for(set .@i,0; .@i<getarraysize(.@accid); .@i++){
    		attachrid(.@accid[.@i]);
    		if(!getstatus(SC_JAILED)){
    			if (!checkvending() && !checkchatting() && !checkidle()){
    				dispbottom "[Hourly Point]: You've received a point.";
    				getitem xxx,1;
    			}
    		}
    		detachrid;
    	}
    	end;
    }

    Rynbef~

    Hello Rynbef~

    Allows players who afk and pubbing to gain points except players who use @autotrade or Vending

    if (!checkvending() && !checkchatting() && !checkidle()){  <------------------------ This line

     

  4. On 3/5/2017 at 1:07 PM, Skorm said:

    ...

    
    -	script	hourly_point_main	-1,{
        
        OnInit:
            .max_hour = 5;
            .duration = 3600;
            .npc_name$ = strnpcinfo(3);
            bindatcmd "hourly", .npc_name$ + "::OnCheck";
            end;
    		
        OnClock0000:
            deletearray $@hourly_tick;
            
        OnUpdate:
    		.@aid = getcharid(3) & 0xFFFF;
    		deltimer .npc_name$+"::OnUpdate";
    		$@hourly_ticks[.@aid]++;
    		#reward += $@hourly_ticks[.@aid] * 10;
            
        OnPCLoginEvent:
    		.@aid = getcharid(3) & 0xFFFF;
    		if ( $@hourly_ticks[.@aid] < .max_hour ) {
    			@timer = gettimetick(2) + .duration;
    			addtimer ( .duration * 1000 ), .npc_name$+"::OnUpdate";
    		} else {
    			dispbottom "[ Hourly Rewards ] You've reached the daily maximum of "+.max_hour+" hours played, well done!",0x9ae2d7;
    			end;
    		}
    		if ( #reward && $@hourly_ticks[.@aid] )
    			dispbottom "[ Hourly Rewards ] " + $@hourly_ticks[.@aid] + "/" + .max_hour + " hours played, "+#reward+" point(s)!",0x9ae2d7;
    		end;
            
        OnCheck:
            .@min = (@timer - gettimetick(2))/60;
            .@sec = (@timer - gettimetick(2))%60;
            dispbottom "[ Hourly Rewards ] Your next reward will be achieved in " +
                        ((.@min)?            "[ " + .@min + " ] minute"         + ((.@min > 1)?"s":""):"") +
                        ((.@min && .@sec)?    " and ":"") +
                        ((.@sec)?            "[ " + .@sec + " ] second"    + ((.@sec > 1)?"s":""):"") +
                        "!",0x9ae2d7;
            end;            
    }

     

    Question Allows players who afk and pubbing to gain points except players who use @autotrade or Vending I see this script any one help me??

  5. Allows players who afk and pubbing to gain points except players who use @autotrade or Vending I see this script any one help me

     

    -    script    hourly_point_main    -1,{
        
        OnInit:
            .max_hour = 5;
            .duration = 3600;
            .npc_name$ = strnpcinfo(3);
            bindatcmd "hourly",    .npc_name$ + "::OnCheck";
            end;
            
        OnClock0000:
            query_sql( "DELETE FROM acc_reg_num` WHERE `key` = '#daily_hour_count' AND `account_id` IN ( SELECT `account_id` FROM `char` WHERE `login` = 0 GROUP BY `account_id` ) " );
            addrid(0);
            #daily_hour_count = -1;
            
        OnUpdate:
            deltimer .npc_name$+"::OnUpdate";
            #daily_hour_count++;
            switch ( #daily_hour_count ) {
                case 1:
                    #KAFRAPOINTS += 1;
                    getitem 512,1;
                    break;
                case 2:
                    #KAFRAPOINTS += 2;
                    getitem 512,2;
                    break;
                case 3:
                    #KAFRAPOINTS += 3;
                    getitem 512,3;
                    break;
                case 4:
                    #KAFRAPOINTS += 4;
                    getitem 512,4;
                    break;
                case 5:
                    #KAFRAPOINTS += 5;
                    getitem 512,6;
                    break;
                default: break;
            }
            
        OnPCLoginEvent:
            if ( #daily_hour_count < .max_hour ) {
                @timer = gettimetick(2) + .duration;
                addtimer ( .duration * 1000 ), .npc_name$+"::OnUpdate";
            }
            if ( #daily_hour_count )    dispbottom "[ Hourly Rewards ] " + #daily_hour_count + "/" + .max_hour + " hour" + ((#daily_hour_count > 1)?"s":"") + " played!",0x9ae2d7;
            end;
            
        OnCheck:
            .@min = (@timer - gettimetick(2))/60;
            .@sec = (@timer - gettimetick(2))%60;
            dispbottom "[ Hourly Rewards ] Your next reward will be achieved in " +
                        ((.@min)?            "[ " + .@min + " ] minute"         + ((.@min > 1)?"s":""):"") +
                        ((.@min && .@sec)?    " and ":"") +
                        ((.@sec)?            "[ " + .@sec + " ] second"    + ((.@sec > 1)?"s":""):"") +
                        "!",0x9ae2d7;
            end;            
    }

     

  6. On 10/20/2013 at 9:23 PM, Capuche said:

     

    
    
     

    - script gvubhnji -1,{

    OnNPCKillEvent:

    if( getmonsterinfo(killedrid, 21) & 0x0020 ) {

    if( getmonsterinfo(killedrid, 22) )

    .@R = rand( 100, 500 );//-- MVP

    else

    .@R = rand( 50, 150 );//-- MINIBOSS

    }

    else

    .@R = rand( 10,100 );//-- normal monster

    #CASHPOINTS = #CASHPOINTS + .@R;

    dispbottom "Gained : "+ .@R +" points. Total : "+ #CASHPOINTS +" points.";

    end;

    }

     

    capuche how to include 1 party in your script??

  7. -	script	MVPPOINTS	-1,{
    	
    OnNpcKillEvent:
       if( killedrid && ( getmonsterinfo(killedrid, 21) & 0x0020 ) && ( killedrid <= 3000 ) ) {
           if( getmonsterinfo(killedrid, 22) )
           .@R = rand( 1, 10 );//-- MVP
         #MVPPOINTS = #MVPPOINTS + .@R;
    	 set .@party_id,getcharid(1);
    		if( !.@party_id ){
    		set #MVPPOINTS,#MVPPOINTS + .@R;
    		dispbottom "Gained "+.@R+" points.";
    	 }else{
    	getpartymember getcharid(1), 1;
    	getpartymember getcharid(1), 2;
    	for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {
    	if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { // what happens if someone in the party member is offline =/
    	.@partymemberaid[.@c] = $@partymemberaid[.@i];
    	.@c++;
    	}
    	}
    announce "Party ["+ strcharinfo(1) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" at "+ strcharinfo(3), 0;
    dispbottom "Gained : "+ .@R +" points. Total : "+ #MVPPOINTS +" points."; }
    	   announce "[ Player ] "+strcharinfo(0)+" has killed [ "+getmonsterinfo(killedrid,0)+" ] at the map of [ "+strcharinfo(3)+" ]",0, 0x47EEAC;
           dispbottom "Gained : "+ .@R +" points. Total : "+ #MVPPOINTS +" points."; }
    	}	
    end;
    }

    Party points not working help me thanks

×
×
  • Create New...