Advertisement
johnlol

JailSystem

Aug 14th, 2023
3,100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VeriLog 1.36 KB | Gaming | 0 0
  1. -   script  JailSystem#proto    FAKE_NPC,{
  2.     OnBail:
  3.         .@charCount = getareaunits(BL_PC, "sec_pri", 14, 85, 59, 65, .@charNames$);
  4.         mes "[Guard]";
  5.         if(.@charCount == 0) {
  6.             mes "There is no one in jail.";
  7.             close;
  8.         }
  9.  
  10.         mes "Who do you want to bail out?";
  11.         next;
  12.         select(implode(.@charNames$, ":"));
  13.  
  14.         mes "[Guard]";
  15.         mes "The fee is " + callfunc("F_InsertComma", .bailOutPrice) + "z. Do you want to pay that?";
  16.         next;
  17.         if (select("Yes:No" ) == 1) {
  18.             mes "[Guard]";
  19.             if(Zeny < .bailOutPrice) {
  20.                 mes "It seems you don't have enough money, come back when you have enough.";
  21.                 close;
  22.             }
  23.  
  24.             Zeny -= .bailOutPrice;
  25.  
  26.             .@addressation$ = (strcharinfo(0) == .@charNames$[@menu - 1]) ? "you" : .@charNames$[@menu - 1];
  27.             mes "Alright, i'll let " + .@addressation$ + " go for now.";
  28.            
  29.             close2;
  30.             atcommand("@unjail " + .@charNames$[@menu - 1]);
  31.             end;
  32.         }
  33.        
  34.         mes "[Guard]";
  35.         mes "You can come back when you change your mind.";
  36.         close;
  37.         end;
  38.  
  39.     OnInit:
  40.         .bailOutPrice = 10000;
  41. }
  42.  
  43. -   script  BAIL_ATCOMMAND  FAKE_NPC,{
  44.     OnInit:
  45.         bindatcmd("bail", "Guard#proto::OnBail");
  46. }
  47.  
  48. prontera, 159, 190, 4   duplicate(JailSystem#proto) Prison Warden#sec_pri01 4_M_YOUNGKNIGHT
  49. sec_pri, 18, 63, 4  duplicate(JailSystem#proto) Jail Guard#sec_pri02    4_M_EDEN_GUARDER
  50. sec_pri, 45, 63, 4  duplicate(JailSystem#proto) Jail Guard#sec_pri03    4_M_LGTGUARD
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement