Jump to content
  • 0

Calling An NPC


iTribal

Question


  • Group:  Members
  • Topic Count:  24
  • Topics Per Day:  0.01
  • Content Count:  59
  • Reputation:   0
  • Joined:  05/19/12
  • Last Seen:  

how to make an NPC Shop that if you PM the shop will show?

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  60
  • Reputation:   0
  • Joined:  07/03/13
  • Last Seen:  

how about by typing @shop the tool dealer shop will pop out

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

like this ?

- script Sample -1,{
OnWhisperGlobal:
callshop "<SHOPNAME>",<OPTION>;
end;
}

*callshop "<name>",<option>;


These are a series of commands used to create dynamic shops.
The callshop function calls a invisible shop (view -1) as if the player clicked on it.
For the options on callShop:

0 = The normal window (buy, sell and cancel)
1 = The buy window
2 = The sell window

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  24
  • Topics Per Day:  0.01
  • Content Count:  59
  • Reputation:   0
  • Joined:  05/19/12
  • Last Seen:  

emistry i can't understand it im a little noob can you make in an tool shop? so i can understand it very well tnx...

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

create your own tool shop npc..

then put the shop npc name into the script i provide above

then ingame

pm the npc

[npc:Sample] blablabla

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  24
  • Topics Per Day:  0.01
  • Content Count:  59
  • Reputation:   0
  • Joined:  05/19/12
  • Last Seen:  

tnx!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  242
  • Reputation:   3
  • Joined:  01/01/12
  • Last Seen:  

Emistry and this one i want to pm how?

i need to put this one or what

- script Jam -1,{

prontera,134,188,5 script Coin Exchanger 807,{
setarray .CoinID,
  671,
  670;
setarray .Zeny,
  5000000,
  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;
 }
}
}

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

you can add this below the header of the npc

OnWhisperGlobal:

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  242
  • Reputation:   3
  • Joined:  01/01/12
  • Last Seen:  

like this

- script Jam -1,{
	   OnWhisperGlobal:
setarray .CoinID,
  671,
  670;
setarray .Zeny,
  5000000,
  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;
 }
}
}

Edited by Jam
Link to comment
Share on other sites

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.

×
×
  • Create New...