yuhsing

Untitled

May 8th, 2013
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.77 KB | None | 0 0
  1.  
  2. // mob_db.txt ( duplicate poring as example )
  3. // drop 10 poring coin at 100%
  4. 30000,PORING_KING,Poring_KING,Poring KING,1,60,1,27,20,1,8,9,2,5,6,1,1,0,6,5,10,12,1,3,21,0x83,400,1872,672,480,0,0,0,0,0,0,0,7539,1000,7539,1000,7539,1000,7539,1000,7539,1000,7539,1000,7539,1000,7539,1000,7539,1000,7539,1000
  5.  
  6.  
  7. // 1st NPC
  8. // npc script to exchange item.
  9. prontera,155,175,5 script Sample 757,{
  10. // item required to exchange.
  11. set .@itemid,7539;
  12.  
  13. mes "If you bring me "+getitemname( .@itemid )+", I will exchange it with proper item by the amount of coins.";
  14. switch( select(
  15. "Exchange with 10 of "+getitemname( .@itemid ),
  16. "Exchange with 25 of "+getitemname( .@itemid ),
  17. "Exchange with 50 of "+getitemname( .@itemid )
  18. )){
  19. Case 1:
  20. // amount + item lists
  21. set .@amount,10;
  22. setarray .@itemlist,607,608;
  23. break;
  24. Case 2:
  25. // amount + item lists
  26. set .@amount,25;
  27. setarray .@itemlist,607,608;
  28. break;
  29. Case 3:
  30. // amount + item lists
  31. set .@amount,50;
  32. setarray .@itemlist,607,608;
  33. default: break;
  34. }
  35. if( countitem( .@itemid ) < .@amount ){
  36. mes "You dont have enough items.";
  37. }else{
  38. mes "What items you want ?";
  39. set .@size,getarraysize( .@itemlist );
  40. for( set .@i,0; .@i < .@size; set .@i,.@i + 1 )
  41. set .@menu$,.@menu$ + getitemname( .@itemlist[.@i] ) +":";
  42. set .@i,select( .@menu$ ) - 1;
  43. mes "Exchange to "+getitemname( .@itemlist[.@i] )+" ??";
  44. if( select( "Yes","No" ) == 1 ){
  45. delitem .@itemid,.@amount;
  46. getitem .@itemlist[.@i],1;
  47. mes "Done";
  48. }
  49. }
  50. close;
  51. }
  52.  
  53.  
  54.  
  55.  
  56.  
  57. // monster spawn every 30 minutes.
  58. prt_fild01,0,0,0,0 monster Poring King 30000,1,1800000,0,0
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67. // 2nd NPC
  68.  
  69. prontera,155,173,5 script Enchanter 757,{
  70. mes "Enchant hairpin.";
  71. switch( select( "What is success rate ?","Give stats to hairpin" ) ){
  72. Case 1:
  73. mes "^FF0000Around 30% chances^000000, if failed the item will be destroyed.";
  74. break;
  75. Case 2:
  76. if( getequipcardid( EQI_HEAD_TOP, 3 ) ){
  77. mes "This headgear has been enchanted already.";
  78. }
  79. set .@hairpin,getequipid( EQI_HEAD_TOP );
  80. for( set .@i,0; .@i < .hairpin_size; set .@i,.@i + 1 )
  81. if( .@hairpin == .hairpin[.@i] ){
  82. mes "If you upgrade it, equipped card will be destroyed upon failed.";
  83. mes "Would you like to proceed ?";
  84. if( select( "I will come back later","Please proceed" ) == 2 ){
  85. failedrefitem EQI_HEAD_TOP;
  86. if( rand(100) < 30 ){
  87. mes "Failed.";
  88. }else{
  89. specialeffect2 154;
  90. mes "Congratz, you success.";
  91. set .@rune,4700 + ( rand(6) * 10 ) + rand(3);
  92. getitem2 .@hairpin,1,1,0,0,0,0,0,.@rune;
  93. equip .@hairpin;
  94. }
  95. }
  96. close;
  97. }
  98. mes "You didnt wear any hairpin.";
  99. default: break;
  100. }
  101. close;
  102.  
  103. OnInit:
  104. setarray .hairpin,5353,5001;
  105. set .hairpin_size,getarraysize( .hairpin );
  106. end;
  107. }
Advertisement
Add Comment
Please, Sign In to add comment