Jump to content

Question

9 answers to this question

Recommended Posts

Posted (edited)


prontera,150,150,0    script    Sample    100,{

    .@npc$ = strnpcinfo(1);

    

    mes .@npc$;

    mes "Exchange gold to zeny?";

    next;

    if (select("Yes:No") - 1) end;

    mes .@npc$;

    mes "Input amount of gold you want to exchange";

    next;

    input @amount;

    if ( @amount == 0 || countitem(969) < @amount ) {

        mes .@npc$;

        mes "Invalid amount";

        close;

    }

    Zeny = Zeny + ( @amount * 10000 );

delitem 969, @amount;

    mes .@npc$;

    mes "Done!";

    close;

}

Edited by Patskie
  • Upvote 1
Posted (edited)

Try this.. you can edit it by yourself..

 

 

//==============================================================================//
//=[Script Release : Credit Exchanger]
//=[Easy Modification]
//============================================================================//
//=[Script : DaemonSpade]
//==============================================================================//
//=[Idea Came From : DaemonSpade]
//=[Special Thanks to : Emistry]
//==============================================================================//
//= Description
//==============================================================================//
//=1. This Script Has Capacity Exchange
//= Zeny Capacity is 2,000,000,000z
//=A.Non Zeny Eater
//=B.Zeny/Credit Limiter Make it Exact
//=Example A: You Have 2b Zeny & You Exchange a Coin/Credit
//= The NPC Will Ask You Agian How Many Credits or Zeny You Will Exchanged
//=Example B: It Reads Your Zeny so The NPC Know The Max of Credit You Can Exchange Dont Put Wrong Ammount of Credit/Coin
//= The NPC Will Ask You Agian How Many Credits or Zeny You Will Exchanged
//==============================================================================//
//= Rules for using this script
//=1. Do not claim it as yours.
//=2. Do not change the credits.
//=3. Do not sell the script to earn money.
//==============================================================================//

prontera,164,196,4 script Credit Exchanger 416,{

//====================================[Customization Area]==========================//
set .npcname$,"^0000EE[Zeny Exchanger]^000000"; //NPC Name
set .coinname$,"^0000EEGold Coin^000000"; //Name of Item as Coin Used
set .CoinID,671; // Credit ID Set to Red Potion
set .zeny,10000000; // Credit Price Set by 10,000,000 or 10m
set .capzeny,1000000000; //Zeny Capacity Set by 2,000,000,000 or 2b
//==============================================================================//
// Check Line 89 To Edit The Chat/Pub Name Like This:
// waitingroom "Credit Exchanger",0;
//==============================================================================//

PlayerMode:
mes .npcname$;
mes "Hello there "+strcharinfo(0);
mes "Rule's Of Exchange";
mes "1 ^0000EE"+.coinname$+"^000000 is [^0000EE"+.zeny+"z^000000]";
mes "Zeny Exchange Capacity is [^0000EE"+.capzeny+"z^000000]";
switch(select("(Gold Coin) to (Zeny):(Zeny) to (Gold COin)")) {
Case 1:
next;
mes .npcname$;
mes "How many Gold Coins to exchange?";
mes "Put The Credit Amount";
mes "Put ^0000EE[0]^000000 to Cancel";
mes "1 ^0000EE"+.coinname$+"^000000 is [^0000EE"+.zeny+"z^000000]";
mes "Zeny Exchange Capacity is [^0000EE"+.capzeny+"z^000000]";
next;
do{
input @Credit,0,countitem(.CoinID);
if( @Credit < 1 ) close;
}while( ( ( @Credit * .zeny ) + Zeny ) > .capzeny );
next;
mes .npcname$;
mes "Thanks";
delitem .CoinID,@Credit;
set Zeny, Zeny + ( @Credit * .zeny );
dispbottom "Zeny Exchange Finished";
close;

Case 2:
next;
mes .npcname$;
mes "How much Gold Coin you like to Gain?";
mes "Put The Zeny Amount";
mes "Put ^0000EE[0]^000000 to Cancel";
mes "1 ^0000EE"+.coinname$+"^000000 is [^0000EE"+.zeny+"z^000000]";
mes "Zeny Exchange Capacity is [^0000EE"+.capzeny+"z^000000]";
next;
input @Credit,0,( Zeny / .zeny );
if( @Credit < 1 ) close;
next;
mes .npcname$;
mes "Thanks.";
set Zeny, Zeny - ( @Credit * .zeny);
getitem .CoinID,@Credit;
dispbottom "Zeny Exchange Finished";
close;

OnInit:
waitingroom "Zeny Exchanger",0;
end;
}
close;
}

 


Edited by Capuche
Script in code
Posted
 
prontera,150,150,0    script    Sample    100,{

    .@npc$ = strnpcinfo(1);

    

    mes .@npc$;

    mes "Exchange gold to zeny?";

    next;

    if (select("Yes:No") - 1) end;

    mes .@npc$;

    mes "Input amount of gold you want to exchange";

    next;

    input @amount;

    if ( @amount == 0 || countitem(969) < @amount ) {

        mes .@npc$;

        mes "Invalid amount";

        close;

    }

    Zeny = Zeny + ( @amount * 10000 );

    mes .@npc$;

    mes "Done!";

    close;

}

 

 

Sir.. patskie..

Got one problem... The 969 item did not reduce after make exchanger...

 

Posted
Forgot to add Delitem function. Edited my previous post. Thanks for that!  :P

 

It my pleasure sir... helping each other  ^ ^ 

Im just trying to use it the noticed item not delete after use..  ^ ^

Posted

prontera,150,150,0    script    Test    100,{
    .@npc$ = strnpcinfo(1);
    
    mes .@npc$;
    mes "Exchange TCG into zeny?";
    next;
    if (select("Yes:No") - 1) end;
    mes .@npc$;
    mes "Input amount of TCG you want to exchange";
    next;
    input @amount;
    if ( @amount == 0 || countitem(7227) < @amount ) {
        mes .@npc$;
        mes "Invalid amount";
        close;
    }
    Zeny = Zeny + ( @amount * 10000 );
    delitem 7227, @amount;
    mes .@npc$;
    mes "Done!";
    close;
}

 

 

Here we are 

daen

 

This is what im changr for you :

 

    mes "Exchange TCG into zeny?";

 

    mes "Input amount of TCG you want to exchange";

 

    if ( @amount == 0 || countitem(7227) < @amount ) {

 

    delitem 7227, @amount;

 

Btw.. If you want to change the zeny just to to here :

 

    Zeny = Zeny + ( @amount * 10000 );

There you go..  ^ ^

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...