Leaderboard
Popular Content
Showing content with the highest reputation on 07/10/23 in all areas
-
I didn't see any security issues, but two small things that could be handled a bit smoother. The first is to add a check if the items bought can be carried by the player. if (!checkweight2(@bought_nameid, @bought_quantity)) { mes("Sorry, you can't carry all these items!"); close3; } The second is that if you use shop and the player has not enough zeny even though you want to pay with points, he can't put the item in the buy window. So pointshop is the better option. - pointshop hourly_shop -1,Goldpc_Points,13534:-1. If you use pointshop you also could omit the whole npcshopattach implementation, if you do not care about the cutin and the message boxes in between. Putting the two above mentioned changes into you npc it could look like this: - pointshop hourly_shop -1,Goldpc_Points,13534:-1. prontera,156,181,5 script Hourly Point Manager::GOLDPCCAFE 10380,{ cutin("ep18_merchant.png", 2); callshop("hourly_shop", 1); npcshopattach("hourly_shop"); end; OnBuyItem: mes("[Hourly Point Manager]"); if (!checkweight2(@bought_nameid, @bought_quantity)) { mes("Sorry, you can't carry all these items!"); close3; } for (.@i = 0; .@i < getarraysize(@bought_nameid); .@i++){ .@itemIndex = inarray(.Shop, @bought_nameid[.@i]); .@costs += (.Shop[.@itemIndex + 1] * @bought_quantity[.@i]); } if (.@costs > Goldpc_Points) { mes("You don't have enough Hourly Points."); close3; } Goldpc_Points -= .@costs; for(.@i = 0; .@i < getarraysize(@bought_nameid); .@i++) { getitem(@bought_nameid[.@i], @bought_quantity[.@i]); dispbottom("Purchased " + @bought_quantity[.@i] + " x " + getitemname(@bought_nameid[.@i]) + "."); } mes("Purchased successfully!"); mes("You have ^0000ff" + Goldpc_Points + "^000000 points remaining."); close3; OnInit: setarray(.Shop[0], 13534, 1, 13810, 1, 14532, 1, 14606, 1, 12211, 1, 7776, 25); npcshopitem("hourly_shop", 13534, 1, 13810, 1, 14532, 1, 14606, 1, 12211, 1, 7776, 25); }1 point
-
//===== rAthena Script ======================================= //= Banker Script //===== By: ================================================== //= Syrus22 (1.0) //===== Current Version: ===================================== //= 2.0 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= An account wide Banker to store Zeny //===== Additional Comments: ================================= //= Syrus22 - There's an optional transaction fee at the top of //= the script. To use it simply change the first set command //= to set the cost variable to whatever you want the fee to be. //= Version 2.0: Optimized and brought the script up to standard. [Jguy] //============================================================ verus04,174,216,5 script Banker 109,{ //prontera,132,217,5 script Banker 109,{ mes "[Banker]"; mes "Welcome to the First Bank of Prontera. How can I help you today?"; next; switch(select("I'd like to make a deposit.:I'd like to make a withdrawal.:What's my current balance?:Cancel")) { case 1: mes "[Banker]"; mes "Very well... How much would you like to deposit? The maximum you can deposit at once is ^00FF00999,999^000000 zeny."; next; if (.transactionFee > 0) { mes "[Banker]"; mes "Oh, and do realize there is a ^00FF00" + .transactionFee + "^000000 zeny charge on all transactions!"; next; } input(.@deposit); if (.@deposit < 1) { mes "[Banker]"; mes "Make sure you ask me to deposit a real amount."; close; } if (.@deposit > Zeny) { mes "[Banker]"; mes "It does not appear like you have the amount of zeny you're trying to deposit!"; close; } if (.@deposit + .transactionFee > Zeny) { mes "[Banker]"; mes "You need ^00FF00" +.transactionFee + "^000000 Zeny to cover the transaction fee!"; close; } if(#bankstorage + .@deposit > .maxDeposit) { mes "[Banker]"; mes "Your deposit would break the limit of ^00FF00" + .maxDeposit + "^000000 zeny!"; close; } Zeny -= .@deposit + .transactionFee; #bankstorage += .@deposit; mes "[Banker]"; mes "Thank you very much... Your zeny is in good hands."; close; case 2: mes "[Banker]"; mes "Very well... How much would you like to withdraw? The maximum you can withdraw at one time is ^00FF00999,999^000000 zeny"; next; if (.transactionFee > 0) { mes "[Banker]"; mes "Oh, and do realize there is a ^00FF00" + .transactionFee + "^000000 zeny charge on all transactions!"; next; } input(.@withdrawal); if (.@withdrawal < 1) { mes "Please don't play games. I need a real amount to withdraw."; close; } if (.@withdrawal > #bankstorage) { mes "You only have ^00FF00" + callfunc("F_InsertComma", #bankstorage) +"^000000 zeny in your account!"; close; } if (.transactionFee > Zeny && .@withdrawal > .transactionFee) { mes "[Banker]"; mes "You don't have the Zeny for the transaction fee right now. Would you like me to take the fee directly from your withdrawal?"; next; switch(select("Yes please.:No, Thanks")) { case 1: mes "[Banker]"; mes "Removing ^00FF00" + .transactionFee + "^000000 from your withdrawal to cover the deposit fee..."; .@withdrawal -= .transactionFee; #bankstorage -= .transactionFee; next; #bankstorage -= .@withdrawal; Zeny += .@withdrawal; mes "[Banker]"; mes "There's your Zeny. Have a good day."; close; case 2: mes "[Banker]"; mes "Very well... come again soon."; close; } } if(.transactionFee > Zeny) { mes "[Banker]"; mes "You need ^00FF00" + .transactionFee + "^000000 zeny to cover the transaction fee!"; close; } #bankstorage -= .@withdrawal; Zeny -= .transactionFee; Zeny += .@withdrawal; mes "[Banker]"; mes "There's your zeny. Have a good day."; close; case 3: mes "[Banker]"; mes "Hmmmm... let me check some paper work."; next; mes "*Rustle, Rustle*"; next; mes "[Banker]"; mes "You currently have ^00FF00" + callfunc("F_InsertComma", #bankstorage) + "^000000 zeny in your account."; close; case 4: mes "[Banker]"; mes "Very well... come again soon."; close; } OnInit: .transactionFee = 500; .maxDeposit = 1000000; }1 point
-
- script pvpheal -1,{ OnPCKillEvent: if(strcharinfo(3) == "guild_01" || strcharinfo(3) == "guild_02") { percentheal 100,100; dispbottom "HP/SP totalmente restaurado."; switch(rand(1,10)) { case 1: skilleffect 383,0; sc_start SC_WINDWALK,370000,5; dispbottom "skill x"; break; case 2: skilleffect 33,0; sc_start SC_ANGELUS,300000,10; dispbottom "skill x"; break; case 3: skilleffect 74,0; sc_start SC_MAGNIFICAT,90000,5; dispbottom "skill x"; break; case 4: skilleffect 75,0; sc_start SC_GLORIA,30000,5; dispbottom "skill x"; break; case 5: skilleffect 66,0; sc_start SC_IMPOSITIO,60000,5; dispbottom "skill x"; break; case 6: skilleffect 34,0; sc_start SC_BLESSING,240000,10; dispbottom "skill x"; break; case 7: skilleffect 29,0; sc_start SC_INCREASEAGI,240000,10; dispbottom "skill x"; break; case 8: skilleffect 67,0; sc_start SC_SUFFRAGIUM,10000,3; dispbottom "skill x"; break; case 9: skilleffect 361,0; sc_start SC_ASSUMPTIO,100000,5; dispbottom "skill x"; break; case 10: skilleffect 73,0; sc_start SC_KYRIE,120000,10; dispbottom "skill x"; break; } } end; } Só uma otimização.1 point
-
You don't need to complete all the quest to do so. Check on the final NPC that episode script give. and see what quest it check and what variable. example: ep_illusion = 47; completequest 16360; navigateto("sp_cor",113,130,NAV_ALL); close2; So you just need to set the variable with @set ep_illusion 48 . For the quest do this command@setquest 16360 then do @completequest for it. just make sure its the end of the story of your episode script.1 point
-
1 point
-
I made some small modifications, to make it work with the new rathena, credits to the owner of the Keitenai code.. Date compatible: rAthena Oct 19, 2020 @resist.diff1 point
-
Version 1.0.2
5354 downloads
Heya, This is a tool to edit mapcache files for rAthena (db/(pre-)re/map_cache.dat). It is already part of Server Database Editor as a sub tool, but I've made it a tool on its own instead. It was made to fix the issue with WeeMapCache not assigning the water tiles properly. Otherwise, it's pretty much the same interface, but easier to use. The most recent version will always be found from the mediafire link below: http://www.mediafire.com/file/tjlnooebx6am673 Source files: https://github.com/Tokeiburu/Mapcache-EditorFree1 point -
Turn 'cell_novending' ON on the whole prontera map. Then turn cell_novending off on that area to allow vending there. - script prontera_vending -1,{ OnInit: setcell "prontera", 0,0, 400,400, cell_novending,1; setcell "prontera", 146,159, 146,148, cell_novending,0; end; } and this wiki page explains Adding_a_Script1 point