Jump to content

qtdan

Members
  • Posts

    223
  • Joined

  • Last visited

  • Days Won

    5

Posts posted by qtdan

  1. On 11/13/2021 at 12:57 AM, sader1992 said:

    this is a reference for you

    	if(getd("#wqeqwe_" + gettime(DT_YYYYMMDD)) < .day_limit){
    		.@left = .day_limit - getd("#wqeqwe_" + gettime(DT_YYYYMMDD));
    		mes "Input how many";
    		input .@count,0,.@left;
    		delitem .@coin,.@count;
    		getitem .@new_coin,.@count;
    		setd("#wqeqwe_" + gettime(DT_YYYYMMDD),getd("#wqeqwe_" + gettime(DT_YYYYMMDD)) + .@count);
    		end;
    	}
    	mes "You cannot exchange anymore today!";
    	end;

     

    i done it but,

    maintown,193,173,5	script	Coin Trader	117,{
    function int__;
    
    do{
    	callsub exchange_rate;
    	.@menu = select( "Zeny to Coin","Coin to Zeny","Close" );
    	switch( .@menu ){
    		Case 1:
    			mes "Convert Zeny to which Coins ?";
    			.@coin = select( implode( .coin_name$,":" ) ) - 1;
    			if( Zeny <  .value[.@coin] ){
    				mes "^FF0000[ERROR]^000000 You didnt have enough zeny.";
    			}else{
    				.@maximum = Zeny / .value[.@coin];
    				mes "You can get maximum of ^FF0000"+int__( .@maximum )+" x "+getitemname( .coin_id[.@coin] )+"^000000";
    				
    				if(getd("#wqeqwe1_" + gettime(DT_YYYYMMDD)) < .day_limit){
    				.@left = .day_limit - getd("#wqeqwe1_" + gettime(DT_YYYYMMDD));
    				input .@amount,0,.@maximum;
    				if( .@amount )
    					if( checkweight( .coin_id[.@coin],.@amount ) ){
    						.@total = ( .@amount * .value[.@coin] );
    						Zeny -= .@total;
    						getitem .coin_id[.@coin],.@amount;
    						setd("#wqeqwe1_" + gettime(DT_YYYYMMDD),getd("#wqeqwe1_" + gettime(DT_YYYYMMDD)) + .@amount);
    						message strcharinfo(0),"Exchanged "+int__( .@total )+" Zeny to "+int__( .@amount )+" "+getitemname( .coin_id[.@coin] )+"^000000";
    					}
    				}
    						else{
    						mes "^FF0000[ERROR]^000000 You cant take this much.";
    					}
    			}
    			break;
    		Case 2:
    			mes "Convert which Coins to Zeny ?";
    			.@coin = select( implode( .coin_name$,":" ) ) - 1;
    			if( !countitem( .coin_id[.@coin] ) ){
    				mes "^FF0000[ERROR]^000000 You didnt have any "+getitemname( .coin_id[.@coin] )+".";
    			}else if( ( .max_zeny - Zeny ) < .value[.@coin] ){
    				mes "^FF0000[ERROR]^000000 You cant exchange this Coin as it will exceed the Zeny limit.";
    			}else{
    				.@maximum = (( .max_zeny - Zeny ) / .value[.@coin] );
    				if( .@maximum > countitem( .coin_id[.@coin] ) ) .@maximum = countitem( .coin_id[.@coin] );
    				mes "You can exchange maximum of ^FF0000"+int__( .@maximum )+" x "+getitemname( .coin_id[.@coin] )+"^000000 to zeny";
    				input .@amount,0,.@maximum;
    				if( .@amount ){
    					.@total = ( .@amount * .value[.@coin] );
    					Zeny += .@total;
    					delitem .coin_id[.@coin],.@amount;
    					message strcharinfo(0),"Exchanged "+int__( .@amount )+" "+getitemname( .coin_id[.@coin] )+" to "+int__( .@total )+" Zeny^000000";
    				}
    			}
    			break;
    		default: break;
    	}
    	next;
    }while( .@menu != 3 );
    mes "Thank you.";
    close;
    
    exchange_rate:
    	mes "Exchange Rate :";
    	for( .@i = 0; .@i < .coin_size; .@i++ )
    		mes "^777777 > "+.coin_name$[.@i]+" - "+int__( .value[.@i] )+" z^000000";
    	return;
    	
    OnInit:
    // server max zeny
    .max_zeny = 1000000000;
    .day_limit = 50;
    // coin list + name + value
    setarray .coin_name$,"Platinum Coin";
    setarray .coin_id,677;
    setarray .value,10000000;
    
    .coin_size = getarraysize( .coin_name$ );
    end;
    
    
    // credits to annieruru
    function	int__	{
    	set .@num, atoi(""+getarg(0));
    	if ( .@num == 0 || .@num >= 2147483647 ) return getarg(0);
    	set .@l, getstrlen(""+.@num);
    	for ( set .@i,0; .@i < .@l; set .@i, .@i + 1 ) {
    		set .@num$, .@num % pow(10,.@i+1) / pow(10,.@i) + .@num$;
    			if ( (.@i+1) % 3 == 0 && .@i+1 != .@l ) set .@num$, ","+ .@num$;
    	}
    	return .@num$;
    }
    
    }

    yeah it stops when i already exchange more than 50, the problem is if i change 1st time of the day by 49 i records 49 and again if i change again 50 total of 99 it still accepts it.

  2. 14 minutes ago, Start_ said:

    If your item had 'itemskill' that will consume otherwise it will infinite.

    can you give me example?

      - Id: 504
        AegisName: White_Potion
        Name: White Potion
        Type: Healing
        Buy: 1200
        Weight: 150
        Script: |
          percentheal 20,0;

     

  3. please help me make this up to level 999?

    # - Level: 240
        # Points: 6405
      # - Level: 241
        # Points: 6456
      # - Level: 242
        # Points: 6507
      # - Level: 243
        # Points: 6558
      # - Level: 244
        # Points: 6609
      # - Level: 245
        # Points: 6660
      # - Level: 246
        # Points: 6712
      # - Level: 247
        # Points: 6764
      # - Level: 248
        # Points: 6816
      # - Level: 249
        # Points: 6868
      # - Level: 250
        # Points: 6920
      # - Level: 251
        # Points: 6973
      # - Level: 252
        # Points: 7026
      # - Level: 253
        # Points: 7079
      # - Level: 254
        # Points: 7132
      # - Level: 255
        # Points: 7185

     

  4. prontera,155,181,5 script Sample 718,{
    
    setarray .CoinID,
      677;
    setarray .Zeny,
      10000000;
    
    while( 1 ){
    mes "What service you want ?";
    next;
    switch( select("Zeny to Coin:Coin to Zeny") ){
    Case 1:
     mes "What Coin you want ?";
     set .@CoinMenu$,"";
     for( set .@i,0; .@i < getarraysize( .CoinID ); set .@i,.@i + 1 ){
      mes "^0000FF"+getitemname( .CoinID[.@i] )+" : ^FF0000"+.Zeny[.@i]+"^000000 Zeny";
      set .@CoinMenu$,.@CoinMenu$ + getitemname( .CoinID[.@i] )+":";
     }
     set .@Coin,select( .@CoinMenu$ ) - 1;
     next;
     mes "Selected : ^00FF00"+getitemname( .CoinID[.@Coin] )+"^000000";
     if( Zeny < .Zeny[.@Coin] ){
      mes "It seem like you didnt have Enough Zeny for this.";
      next;
      break;
     }
     mes "You can exchange to ^FF0000"+( Zeny / .Zeny[.@Coin] )+" ^0000FF"+getitemname( .CoinID[.@Coin] )+"^000000 .";
     mes "How many ^0000FF"+getitemname( .CoinID[.@Coin] )+"^000000 do you want ?";
     input @Amount,0,( Zeny / .Zeny[.@Coin] );
     if( !@Amount ) close;
     mes "You gained "+@Amount+" ^0000FF"+getitemname( .CoinID[.@Coin] )+"^000000.";
     set Zeny,Zeny - ( @Amount * .Zeny[.@Coin] );
     getitem .CoinID[.@Coin],@Amount;
     next;
     break;
    Case 2:
     mes "Which Coin ?";
     set .@CoinMenu$,"";
     for( set .@i,0; .@i < getarraysize( .CoinID ); set .@i,.@i + 1 ){
      mes "^0000FF"+getitemname( .CoinID[.@i] )+" : ^FF0000"+countitem( .CoinID[.@i] )+"^000000 Available";
      set .@CoinMenu$,.@CoinMenu$ + getitemname( .CoinID[.@i] )+":";
     }
     do{
      set .@Coin,select( .@CoinMenu$ ) - 1;
     }while( !countitem( .CoinID[.@Coin] ) );
     next;
     mes "Selected : ^00FF00"+getitemname( .CoinID[.@Coin] )+"^000000";
     mes "You can exchange ^0000FF"+countitem( .CoinID[.@Coin] )+" "+getitemname( .CoinID[.@Coin] )+"^000000 to ^FF0000"+( countitem( .CoinID[.@Coin] ) * .Zeny[.@Coin] )+"^000000 Zeny.";
     mes "How many ^0000FF"+getitemname( .CoinID[.@Coin] )+"^000000 do you want to change into Zeny ?";
     input @Amount,0,( ( 1000000000 - Zeny ) / .Zeny[.@Coin] );
     if( !@Amount ) close;
     mes "You gained "+( @Amount * .Zeny[.@Coin] )+" Zeny.";
     delitem .CoinID[.@Coin],@Amount;
     set Zeny,Zeny + ( @Amount * .Zeny[.@Coin] );
     next;
     break;
     }
    }
    }

    i want to add limit here maximum 50 coins per day that resets every 12:00am

    and every 1 coin needs 1 of #questpoints and 10,000,000 zeny.

    but for coins to zeny doesn't need the #questpoints.

  5. i get this part

    You can add more title here data\luafiles514\lua files\datainfo\titletable.lub

     

    i want is example:

    npc title giver:

    when you talk to the NPC will give you a reward same as the achievement.

    i want to add a title to a character when he finishes my custom quest.

  6. On 9/25/2021 at 12:01 PM, Easycore said:

    New Version:
    Working on latest Git: 6672bf

    • Refactored 'item_vending.txt' to YAML Format 'item_vending_db.yml'.
    • Fixed an issue regarding bound items in the buyer's inventory.
    • Added a config to enable/disable buying with bounded items.
    • Prevent buying if seller has the Max Item in the inventory (30,000 ea).
    • Added GetComma for a better visualization of the amount of zeny received (Vending Report).
    • Code clean-up.

    Status: Pending Approval.

    still pending :<

  7. mes "[ ^336699Coin Master^000000 ]";
    		mes "How many coins would you like?";
    		set @mamount,0;
    		input @mamount;
    		if (zeny < 0) goto L_No;
    		if (zeny < (10000000* @mamount)) goto L_No;
    		if (checkweight(677,@mamount) == 0 ) goto L_OW;
    		set dcoins, @mamount;
    		set dcoins2, (dcoins2 + (@mamount)); //<-------------------- This Line
    		set Zeny,(zeny - (10000000* @mamount));
    		getitem 677,@mamount;
    		goto L_Thanks;

    I want to limit the coin exchange of my server for only 50 per day, how can i reset the "set dcoins2" for every player every "OnClock0000:".

    -	script	CoinsReset	-1,{
    OnInit:
    OnClock0000: //12am
    set dcoins2, 0;
    }

    Already try this code but it doesn't work. TIA ♥

  8. ###########################################################################
    # Mob Item Ratio Database
    ###########################################################################
    #
    # Mob Item Ratio Settings
    #
    ###########################################################################
    # - Item          AegisName of item to adjust.
    #   Ratio         Drop rate.
    #   List:         List of monster(s) affected (format <Aegis monster name>: true/false). (Defaulted to all monsters)
    ###########################################################################
    
    Header:
      Type: MOB_ITEM_RATIO_DB
      Version: 1
    Body:
      - Item: Thanatos_Card
        Ratio: 50000

     

    Making the ratio more than 69999 are getting error it has a limit of 6.99% droprate. how to fix this i want to make it 10%.

    image.png.065204040b94e4c2a4a7e07e2d411d70.png

  9. can someone give me example of this new mob_item_ration.yml

    ###########################################################################
    # Mob Item Ratio Database
    ###########################################################################
    #
    # Mob Item Ratio Settings
    #
    ###########################################################################
    # - Item          AegisName of item to adjust.
    #   Ratio         Drop rate.
    #   List:         List of monster(s) affected (format <Aegis monster name>: true/false). (Defaulted to all monsters)
    ###########################################################################
    
    Header:
      Type: MOB_ITEM_RATIO_DB
      Version: 1


     

×
×
  • Create New...