AsurielRO Posted July 12, 2020 Group: Members Topic Count: 19 Topics Per Day: 0.01 Content Count: 67 Reputation: 2 Joined: 05/01/20 Last Seen: October 19, 2021 Share Posted July 12, 2020 Hi good day rathena, i would like to request a NPC that sells different items monthly. for example: January = apple , jellopy and oridecon Febraury = elunium , Pharacon and knife etc. 1 Quote Link to comment Share on other sites More sharing options...
0 PottScilgrim Posted July 13, 2020 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 18 Reputation: 12 Joined: 04/10/20 Last Seen: March 4, 2021 Share Posted July 13, 2020 (edited) Try this //======================================================== // Monthly rotation shop //======================================================== // Written by PottScilgrim //======================================================== // Main NPC: // - Switches the month and creates an array // - Sets the shop contents as the array // Options: // - Modify ".customPrice" to 1 if you want to use custom prices for items // Edit the .MONTHLYPRICE arrays with your desired prices //======================================================== prontera,154,179,3 script Monthly Shop#1 10180,{ mes .name$; mes "Now opening the monthly shop"; close2; callshop "S_MONTHLYSHOP",1; end; OnClock0001: OnInit: .customPrice = 0; // Modify this to 1 if you want to use custom buy prices for items .name$ = "[^FF0000 Monthly Shop ^000000]"; $monthint = gettime(DT_MONTH); switch($monthint){ case 1: // January setarray .MONTHLYSHOP[0],512,909,984; if(.customPrice) { setarray .MONTHLYPRICE[0],10,10,10; } else { setarray .MONTHLYPRICE[0],getiteminfo(.MONTHLYSHOP[0],0),getiteminfo(.MONTHLYSHOP[1],0),getiteminfo(.MONTHLYSHOP[2],0); } break; case 2: // February setarray .MONTHLYSHOP[0],985,1010,1201; if(.customPrice) { setarray .MONTHLYPRICE[0],10,10,10; } else { setarray .MONTHLYPRICE[0],getiteminfo(.MONTHLYSHOP[0],0),getiteminfo(.MONTHLYSHOP[1],0),getiteminfo(.MONTHLYSHOP[2],0); } break; case 3: // March setarray .MONTHLYSHOP[0],512,512,512; if(.customPrice) { setarray .MONTHLYPRICE[0],10,10,10; } else { setarray .MONTHLYPRICE[0],getiteminfo(.MONTHLYSHOP[0],0),getiteminfo(.MONTHLYSHOP[1],0),getiteminfo(.MONTHLYSHOP[2],0); } break; case 4: // April setarray .MONTHLYSHOP[0],512,512,512; if(.customPrice) { setarray .MONTHLYPRICE[0],10,10,10; } else { setarray .MONTHLYPRICE[0],getiteminfo(.MONTHLYSHOP[0],0),getiteminfo(.MONTHLYSHOP[1],0),getiteminfo(.MONTHLYSHOP[2],0); } break; case 5: // May setarray .MONTHLYSHOP[0],512,512,512; if(.customPrice) { setarray .MONTHLYPRICE[0],10,10,10; } else { setarray .MONTHLYPRICE[0],getiteminfo(.MONTHLYSHOP[0],0),getiteminfo(.MONTHLYSHOP[1],0),getiteminfo(.MONTHLYSHOP[2],0); } break; case 6: // June setarray .MONTHLYSHOP[0],512,512,512; if(.customPrice) { setarray .MONTHLYPRICE[0],10,10,10; } else { setarray .MONTHLYPRICE[0],getiteminfo(.MONTHLYSHOP[0],0),getiteminfo(.MONTHLYSHOP[1],0),getiteminfo(.MONTHLYSHOP[2],0); } break; case 7: // July setarray .MONTHLYSHOP[0],985,512,512; if(.customPrice) { setarray .MONTHLYPRICE[0],10,10,10; } else { setarray .MONTHLYPRICE[0],getiteminfo(.MONTHLYSHOP[0],0),getiteminfo(.MONTHLYSHOP[1],0),getiteminfo(.MONTHLYSHOP[2],0); } break; case 8: // August setarray .MONTHLYSHOP[0],512,512,512; if(.customPrice) { setarray .MONTHLYPRICE[0],10,10,10; } else { setarray .MONTHLYPRICE[0],getiteminfo(.MONTHLYSHOP[0],0),getiteminfo(.MONTHLYSHOP[1],0),getiteminfo(.MONTHLYSHOP[2],0); } break; case 9: // September setarray .MONTHLYSHOP[0],512,512,512; if(.customPrice) { setarray .MONTHLYPRICE[0],10,10,10; } else { setarray .MONTHLYPRICE[0],getiteminfo(.MONTHLYSHOP[0],0),getiteminfo(.MONTHLYSHOP[1],0),getiteminfo(.MONTHLYSHOP[2],0); } break; case 10: // October setarray .MONTHLYSHOP[0],512,512,512; if(.customPrice) { setarray .MONTHLYPRICE[0],10,10,10; } else { setarray .MONTHLYPRICE[0],getiteminfo(.MONTHLYSHOP[0],0),getiteminfo(.MONTHLYSHOP[1],0),getiteminfo(.MONTHLYSHOP[2],0); } break; case 11: // November setarray .MONTHLYSHOP[0],512,512,512; if(.customPrice) { setarray .MONTHLYPRICE[0],10,10,10; } else { setarray .MONTHLYPRICE[0],getiteminfo(.MONTHLYSHOP[0],0),getiteminfo(.MONTHLYSHOP[1],0),getiteminfo(.MONTHLYSHOP[2],0); } break; case 12: // December setarray .MONTHLYSHOP[0],512,512,512; if(.customPrice) { setarray .MONTHLYPRICE[0],10,10,10; } else { setarray .MONTHLYPRICE[0],getiteminfo(.MONTHLYSHOP[0],0),getiteminfo(.MONTHLYSHOP[1],0),getiteminfo(.MONTHLYSHOP[2],0); } break; } npcshopdelitem "S_MONTHLYSHOP",501; npcshopadditem "S_MONTHLYSHOP", .MONTHLYSHOP[0],.MONTHLYPRICE[0], .MONTHLYSHOP[1],.MONTHLYPRICE[1], .MONTHLYSHOP[2],.MONTHLYPRICE[2]; end; } //======================================================== // Shop NPC. Don't touch this. //======================================================== - shop S_MONTHLYSHOP -1,501:-1; Edited July 13, 2020 by PottScilgrim 1 Quote Link to comment Share on other sites More sharing options...
0 Jaodegwapo Posted July 29, 2020 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 17 Reputation: 0 Joined: 02/22/18 Last Seen: August 25, 2024 Share Posted July 29, 2020 On 7/13/2020 at 5:04 PM, PottScilgrim said: Try this //======================================================== // Monthly rotation shop //======================================================== // Written by PottScilgrim //======================================================== // Main NPC: // - Switches the month and creates an array // - Sets the shop contents as the array // Options: // - Modify ".customPrice" to 1 if you want to use custom prices for items // Edit the .MONTHLYPRICE arrays with your desired prices //======================================================== prontera,154,179,3 script Monthly Shop#1 10180,{ mes .name$; mes "Now opening the monthly shop"; close2; callshop "S_MONTHLYSHOP",1; end; OnClock0001: OnInit: .customPrice = 0; // Modify this to 1 if you want to use custom buy prices for items .name$ = "[^FF0000 Monthly Shop ^000000]"; $monthint = gettime(DT_MONTH); switch($monthint){ case 1: // January setarray .MONTHLYSHOP[0],512,909,984; if(.customPrice) { setarray .MONTHLYPRICE[0],10,10,10; } else { setarray .MONTHLYPRICE[0],getiteminfo(.MONTHLYSHOP[0],0),getiteminfo(.MONTHLYSHOP[1],0),getiteminfo(.MONTHLYSHOP[2],0); } break; case 2: // February setarray .MONTHLYSHOP[0],985,1010,1201; if(.customPrice) { setarray .MONTHLYPRICE[0],10,10,10; } else { setarray .MONTHLYPRICE[0],getiteminfo(.MONTHLYSHOP[0],0),getiteminfo(.MONTHLYSHOP[1],0),getiteminfo(.MONTHLYSHOP[2],0); } break; case 3: // March setarray .MONTHLYSHOP[0],512,512,512; if(.customPrice) { setarray .MONTHLYPRICE[0],10,10,10; } else { setarray .MONTHLYPRICE[0],getiteminfo(.MONTHLYSHOP[0],0),getiteminfo(.MONTHLYSHOP[1],0),getiteminfo(.MONTHLYSHOP[2],0); } break; case 4: // April setarray .MONTHLYSHOP[0],512,512,512; if(.customPrice) { setarray .MONTHLYPRICE[0],10,10,10; } else { setarray .MONTHLYPRICE[0],getiteminfo(.MONTHLYSHOP[0],0),getiteminfo(.MONTHLYSHOP[1],0),getiteminfo(.MONTHLYSHOP[2],0); } break; case 5: // May setarray .MONTHLYSHOP[0],512,512,512; if(.customPrice) { setarray .MONTHLYPRICE[0],10,10,10; } else { setarray .MONTHLYPRICE[0],getiteminfo(.MONTHLYSHOP[0],0),getiteminfo(.MONTHLYSHOP[1],0),getiteminfo(.MONTHLYSHOP[2],0); } break; case 6: // June setarray .MONTHLYSHOP[0],512,512,512; if(.customPrice) { setarray .MONTHLYPRICE[0],10,10,10; } else { setarray .MONTHLYPRICE[0],getiteminfo(.MONTHLYSHOP[0],0),getiteminfo(.MONTHLYSHOP[1],0),getiteminfo(.MONTHLYSHOP[2],0); } break; case 7: // July setarray .MONTHLYSHOP[0],985,512,512; if(.customPrice) { setarray .MONTHLYPRICE[0],10,10,10; } else { setarray .MONTHLYPRICE[0],getiteminfo(.MONTHLYSHOP[0],0),getiteminfo(.MONTHLYSHOP[1],0),getiteminfo(.MONTHLYSHOP[2],0); } break; case 8: // August setarray .MONTHLYSHOP[0],512,512,512; if(.customPrice) { setarray .MONTHLYPRICE[0],10,10,10; } else { setarray .MONTHLYPRICE[0],getiteminfo(.MONTHLYSHOP[0],0),getiteminfo(.MONTHLYSHOP[1],0),getiteminfo(.MONTHLYSHOP[2],0); } break; case 9: // September setarray .MONTHLYSHOP[0],512,512,512; if(.customPrice) { setarray .MONTHLYPRICE[0],10,10,10; } else { setarray .MONTHLYPRICE[0],getiteminfo(.MONTHLYSHOP[0],0),getiteminfo(.MONTHLYSHOP[1],0),getiteminfo(.MONTHLYSHOP[2],0); } break; case 10: // October setarray .MONTHLYSHOP[0],512,512,512; if(.customPrice) { setarray .MONTHLYPRICE[0],10,10,10; } else { setarray .MONTHLYPRICE[0],getiteminfo(.MONTHLYSHOP[0],0),getiteminfo(.MONTHLYSHOP[1],0),getiteminfo(.MONTHLYSHOP[2],0); } break; case 11: // November setarray .MONTHLYSHOP[0],512,512,512; if(.customPrice) { setarray .MONTHLYPRICE[0],10,10,10; } else { setarray .MONTHLYPRICE[0],getiteminfo(.MONTHLYSHOP[0],0),getiteminfo(.MONTHLYSHOP[1],0),getiteminfo(.MONTHLYSHOP[2],0); } break; case 12: // December setarray .MONTHLYSHOP[0],512,512,512; if(.customPrice) { setarray .MONTHLYPRICE[0],10,10,10; } else { setarray .MONTHLYPRICE[0],getiteminfo(.MONTHLYSHOP[0],0),getiteminfo(.MONTHLYSHOP[1],0),getiteminfo(.MONTHLYSHOP[2],0); } break; } npcshopdelitem "S_MONTHLYSHOP",501; npcshopadditem "S_MONTHLYSHOP", .MONTHLYSHOP[0],.MONTHLYPRICE[0], .MONTHLYSHOP[1],.MONTHLYPRICE[1], .MONTHLYSHOP[2],.MONTHLYPRICE[2]; end; } //======================================================== // Shop NPC. Don't touch this. //======================================================== - shop S_MONTHLYSHOP -1,501:-1; how to change the costume price? Quote Link to comment Share on other sites More sharing options...
0 PottScilgrim Posted July 30, 2020 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 18 Reputation: 12 Joined: 04/10/20 Last Seen: March 4, 2021 Share Posted July 30, 2020 13 hours ago, Jaodegwapo said: how to change the costume price? Edit .customPrice to 1 so the script knows to use the custom prices rather than the default values. Then edit the .MONTHLYPRICE[0] arrays from to whatever you want them to cost. Quote Link to comment Share on other sites More sharing options...
Question
AsurielRO
Hi good day rathena, i would like to request a NPC that sells different items monthly.
for example:
January = apple , jellopy and oridecon
Febraury = elunium , Pharacon and knife
etc.
Link to comment
Share on other sites
3 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.