Jump to content

Chun3

Members
  • Posts

    67
  • Joined

  • Last visited

Posts posted by Chun3

  1. Sorry, a logic problem.
     

    OnPCKillEvent:
    getmapxy @map$,@x,@y,0;
     if ( (@map$ == "prtg_cas01") || (@map$ == "pvpwait") || (@map$ == "ra_koe") ) {  
           set pvp_points,  pvp_points+1;
            dispbottom "You've gained 1 PvP Point. Total = "+pvp_points+" PvP Points.";
    }
        end;

     

  2. -	shop	custom_seller2	-1,501:500
    prontera,120,94,3	script	ehuq	100,{
        mes "[PvP Points Dealer]";
        mes "I will sell you items for PvP points.";
        next;
        mes "[PvP Points Dealer]";
        mes "You currently have [^0000ff"+pvp_points+"^000000] PvP points to spend.";
        callshop "custom_seller2",1;
        npcshopattach "custom_seller2";
        end;
        
    OnBuyItem:
        for(set .@i,0; .@i<getarraysize(.customs); set .@i,.@i+1) {
            for(set .@d,0; .@d<getarraysize(@bought_nameid); set .@d,.@d+1) {
                if(@bought_nameid[.@d]==.customs[.@i]) {
                    if(checkweight(@bought_nameid[.@d],@bought_quantity[.@d])) {
                        if(pvp_points >= .Price[.@i]*@bought_quantity[.@d]) {
                            set pvp_points, pvp_points - .Price[.@i]*@bought_quantity[.@d];
                            getitem @bought_nameid[.@d],@bought_quantity[.@d];
                        } else dispbottom "You don't have enough PvP points to purchase that item.";
                    } else dispbottom "Purchasing these items will put you over the weight limit!";
                }
            }
        }
        deletearray @bought_quantity, getarraysize(@bought_quantity);
        deletearray @bought_nameid, getarraysize(@bought_nameid);
        close;
    
    OnPCKillEvent:
    getmapxy @map$,@x,@y,0;
     if ( (@map$ != "prontera") || (@map$ != "pvpwait") || (@map$ != "ra_koe") ) {end;}   //Put here the maps you WISH to work the points.
           set pvp_points,  pvp_points+1;
            dispbottom "You've gained 1 PvP Point. Total = "+pvp_points+" PvP Points.";
        end;
        
        
    OnInit:
        setarray .customs[0],  12103, 607, 678; // Enter the ID of customs here...
        setarray .Price[0],    20   , 40 , 300; // Price for each custom here...
        npcshopitem "custom_seller2", 0  ,   0; // Don't touch any coding beyond here..
        for( set .i,0; .customs[.i]; set .i,.i+1 )
            npcshopadditem "custom_seller2",.customs[.i],.Price[.i];
        end;
    }

    image.png.690be2ccbf6faab7d97f1d1f8e07a896.png

  3. 
    
    -    shop    custom_seller2    -1,501:500
    1@ghvy,120,94,3    script    PvP Points Dealer    100,{
        mes "[PvP Points Dealer]";
        mes "I will sell you items for PvP points.";
        next;
        mes "[PvP Points Dealer]";
        mes "You currently have [^0000ff"+pvp_points+"^000000] PvP points to spend.";
        callshop "custom_seller2",1;
        npcshopattach "custom_seller2";
        end;
        
    OnBuyItem:
        for(set .@i,0; .@i<getarraysize(.customs); set .@i,.@i+1) {
            for(set .@d,0; .@d<getarraysize(@bought_nameid); set .@d,.@d+1) {
                if(@bought_nameid[.@d]==.customs[.@i]) {
                    if(checkweight(@bought_nameid[.@d],@bought_quantity[.@d])) {
                        if(pvp_points >= .Price[.@i]*@bought_quantity[.@d]) {
                            set pvp_points, pvp_points - .Price[.@i]*@bought_quantity[.@d];
                            getitem @bought_nameid[.@d],@bought_quantity[.@d];
                        } else dispbottom "You don't have enough PvP points to purchase that item.";
                    } else dispbottom "Purchasing these items will put you over the weight limit!";
                }
            }
        }
        deletearray @bought_quantity, getarraysize(@bought_quantity);
        deletearray @bought_nameid, getarraysize(@bought_nameid);
        close;
    
    OnPCKillEvent:
    getmapxy @map$,@x,@y,0;
     if ( (@map$ != "woemap01") || (@map$ != "pvpmap01") ) end;  //Put here the maps you WISH to work the points.
        copyarray( @killed$[1], @killed$[0], .saved_l-1 );
        @killed$ = ""+killedrid;
        if( countstr( implode( @killed$, "|" ), ""+killedrid, 0 ) <= .rstrk_l ) {
            pvp_points++;
            dispbottom "You've gained 1 PvP Point. Total = "+pvp_points+" PvP Points.";
        }
        end;
        
        
    OnInit:
        set .saved_l, 3; //Length of saved ids can be up to 127.
        set .rstrk_l, 2; //Level of restriction.
        setarray .customs[0],  12103, 607, 678; // Enter the ID of customs here...
        setarray .Price[0],    20   , 40 , 300; // Price for each custom here...
        npcshopitem "custom_seller2", 0  ,   0; // Don't touch any coding beyond here..
        for( set .i,0; .customs[.i]; set .i,.i+1 )
            npcshopadditem "custom_seller2",.customs[.i],.Price[.i];
        end;
    }

     

  4. https://github.com/rathena/rathena/blob/master/doc/script_commands.txt

    OnPCKillEvent:
      getmapxy @map$,@x,@y,0;
                if ( @map$ == "woemap01" || @map$ == "pvpmap01" ) {
     copyarray( @killed$[1], @killed$[0], .saved_l-1 );
        @killed$ = ""+killedrid;
        if( countstr( implode( @killed$, "|" ), ""+killedrid, 0 ) <= .rstrk_l ) {
            pvp_points++;
            dispbottom "You've gained 1 PvP Point. Total = "+pvp_points+" PvP Points.";
        }
    }
        end;

     

  5. 12114,Elemental_Fire,Elemental Converter,11,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_end SC_FIREWEAPON; sc_end SC_WINDWEAPON; sc_end SC_EARTHWEAPON; sc_end SC_WATERWEAPON;   sc_start SC_FIREWEAPON,180000,1; },{},{}

     

×
×
  • Create New...