Hatake Kakashi Posted June 10, 2014 Group: Members Topic Count: 254 Topics Per Day: 0.05 Content Count: 825 Reputation: 3 Joined: 11/14/11 Last Seen: June 25, 2021 Share Posted June 10, 2014 hello, can you please help me.. how to put an menu.. for example.. choose what you want to donate 1. Donation Headgear 2. Donation Card 3. Donation Items like that.. here's the script of my dynamic donation npc. //========================================= //By : louigui //Ver : 2.40.99 //========================================= - shop dyn_shop2 -1,501:50 //========================================= turbo_room,63,94,4 script Donation Cards#2 790,{ mes "Your Donation Coupon-->["+countitem(.Cost)+"]"; close2; callshop "dyn_shop"+.a,1; npcshopattach "dyn_shop"+.a; end; OnInit: set .a,strnpcinfo(2); //========================================= set .Cost,7179; //========================================= setarray .buy_id[0],4441,4367,4361,4357,4359,4365,4408,4399; setarray .buy_co[0],500,350,350,450,400,350,500,350; //========================================= npcshopitem "dyn_shop2",.buy_id[0],.buy_co[0]; for(set .ik,1;.ik<getarraysize(.buy_id);set .ik,.ik+1){ npcshopadditem "dyn_shop"+.a,.buy_id[.ik],.buy_co[.ik]; } end; OnBuyItem: getinventorylist; if(@bought_quantity[@i] <= 0){ goto OnEnrd; end; } for(set @i,0;@i<getarraysize(@bought_nameid);set @i,@i+1){ //KeyWorld set .@type, getiteminfo( @bought_nameid[.@i], 2 ); if ( .@type == 4 || .@type == 5 || .@type == 7 || .@type == 8 ) set .@count, .@count + 1; else { for( set .@j,0; .@j<@inventorylist_count; set .@j, .@j+1 ) if ( @inventorylist_id[.@i] == @bought_nameid[.@i] ) break; if ( .@j == @inventorylist_count ) set .@count, .@count+1 ; } for(set @i2,0;@i2<getarraysize(.buy_id);set @i2,@i2+1){ if(@bought_nameid[@i]==.buy_id[@i2]){ set @gh,@gh+.buy_co[@i2]*@bought_quantity[@i]; set @wh,@wh+getiteminfo(@bought_nameid[@i],6)*@bought_quantity[@i]; } } } if ( .@count + @inventorylist_count > 100 ) { announce "[D-Shop]: Can't hold more than 100 items.",bc_self; goto OnEnrd; } if(countitem(.Cost)<@gh){ announce "You do not have enough Proof Of Donation.",bc_self; announce "Contact * ADMIN * and try to donate.",bc_self; goto OnEnrd; end; }else{ if(@wh>(MaxWeight-Weight)){ announce "[D-Shop]:Too heavy",bc_self; goto OnEnrd; end; }else{ delitem .Cost,@gh; for(set @i,0;@i<getarraysize(@bought_nameid);set @i,@i+1){ getitem @bought_nameid[@i],@bought_quantity[@i]; } } } OnEnrd: set @gh,0; set @wh,0; set @i,0; set @i2,0; deletearray @bought_quantity,getarraysize(@bought_quantity); deletearray @bought_nameid,getarraysize(@bought_nameid); end; } Quote Link to comment Share on other sites More sharing options...
Emistry Posted June 10, 2014 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted June 10, 2014 instead of making a new one, why not you try the current existing script ?? npc/custom/quests/quest_shop.txt or https://rathena.org/board/index.php?/files/file/2504-%7B?%7D/ Quote Link to comment Share on other sites More sharing options...
Hatake Kakashi Posted June 11, 2014 Group: Members Topic Count: 254 Topics Per Day: 0.05 Content Count: 825 Reputation: 3 Joined: 11/14/11 Last Seen: June 25, 2021 Author Share Posted June 11, 2014 (edited) can u please guide me on your script where i change the requirements and the item.. please choose me an easy one. thanks. Edited June 11, 2014 by Hatake Kakashi Quote Link to comment Share on other sites More sharing options...
Question
Hatake Kakashi
hello, can you please help me..
how to put an menu.. for example..
choose what you want to donate
1. Donation Headgear
2. Donation Card
3. Donation Items
like that.. here's the script of my dynamic donation npc.
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.