Jump to content
  • 0

whats the prob in my crafting shop


chromus28

Question


  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  263
  • Reputation:   1
  • Joined:  04/25/13
  • Last Seen:  

hi

 

can anyone please help me on this.. i tried to use emistry's crafting shop and when im crafting knife it didnt give me anything..it just saying "you gained 1 knife" but it didnt give me 1

prontera,129,215,6 script Crafting NPC 951,{
function RequiredItems;
function ForgedList;

mes "What you are trying to Forge ?";
next;
switch( select( "Knife", // case 1
"Cutter", // case 2
"Dirk" )){ // last case...

Case 1:
RequiredItems( 985,1,984,1 );
set .@i,ForgedList( 1201,1202,1203,1201 );
break;
Case 2:
RequiredItems( 985,2,984,2,607,1 );
set .@i,ForgedList( 1204,1205,1206,1205 );
break;
Case 3:
RequiredItems( 985,3,984,3,607,1,608,1 );
set .@i,ForgedList( 1210,1211,1212,1206 );
break;
//Case 4 or more...

default:
mes "Configuration's Problems..";
close;
}
mes "You gained 1 "+getitemname( .@i )+".";
close2;
emotion e_heh;
end;


function RequiredItems {
mes "[ ^0000FF Required Items ^000000 ]";
mes "^FFFFFF________________________________^000000";
for( set .@i,0; getarg( .@i,0 ); set .@i,.@i + 2 ){
mes (( countitem( getarg( .@i ) ) < getarg( .@i + 1 ) )?"^FF0000":"^00FF00" )+"[ "+countitem( getarg( .@i ) )+" / "+getarg( .@i + 1 )+" ] ^0000FF "+getitemname( getarg( .@i ) )+"^000000";
if( countitem( getarg( .@i ) ) < getarg( .@i + 1 ) )
set .@InComplete,.@InComplete + 1;
}
mes "^FFFFFF________________________________^000000";
if( .@InComplete ){
mes "[ ^FF0000InComplete^000000 ] ^FF0000"+.@InComplete+"^000000 Items ";
close;
}
next;
mes "^FF0000Success Rate^000000 :";
mes "^FFFFFF________________________________^000000";
mes "Normal : 50%";
mes "Superior : 25%";
mes "Perfect : 10%";
mes "Legendary : 5%";
mes "^FFFFFF________________________________^000000";
mes "^FF0000Else...Fail..^000000";
next;
if( select("^FF0000Continue^000000:Cancel") == 2 ) close;
for( set .@i,0; getarg( .@i,0 ); set .@i,.@i + 2 )
delitem getarg( .@i ),getarg( .@i + 1 );
return;
}

function ForgedList {

set .@Rate,rand( 200 );
// 5%
if( .@Rate < 5 ) return getarg(3);
// 15%
else if( .@Rate >= 5 && .@Rate < 15 ) return getarg(2);
// 10%
else if( .@Rate >= 15 && .@Rate < 40 ) return getarg(1);
// 50%
else if( .@Rate >= 40 && .@Rate < 90 ) return getarg(0);
//other...
else{
mes "You ...Failed...";
close;
}
}
}
Edited by Emistry
changed to code bbcode.
Link to comment
Share on other sites

4 answers to this question

Recommended Posts


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


mes "You gained 1 "+getitemname( .@i )+".";

getitem .@i,1;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  410
  • Reputation:   29
  • Joined:  04/04/12
  • Last Seen:  

I don't see anything in that script that gives an item.  Just commands to delete the ingredients.

 

Did you edit the script at all?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  263
  • Reputation:   1
  • Joined:  04/25/13
  • Last Seen:  

I don't see anything in that script that gives an item.  Just commands to delete the ingredients.

 

Did you edit the script at all?

not really coz i just copy what emistry did in this script

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  263
  • Reputation:   1
  • Joined:  04/25/13
  • Last Seen:  

mes "You gained 1 "+getitemname( .@i )+".";
getitem .@i,1;

Thank you so much!!

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...