Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/14/21 in all areas

  1. function script F_KafGuildStor { if (Zeny < 200) { mes "You need 200 Zeny"; } else { switch(guildopenstorage()) { case GSTORAGE_OPEN: Zeny -= 200; mes "Successfully opened."; break; case GSTORAGE_STORAGE_ALREADY_OPEN: mes "Player storage is already open."; break; case GSTORAGE_ALREADY_OPEN: mes "Guild storage is already open."; break; case GSTORAGE_NO_GUILD: mes "Player is not in a guild."; break; case GSTORAGE_NO_STORAGE: mes "Guild hasn't invested in the Guild Storage Expansion skill (only if OFFICIAL_GUILD_STORAGE is enabled)."; break; case GSTORAGE_NO_PERMISSION: mes "Player doesn't have permission to use the guild storage."; break; } } close; } you can try something like this
    1 point
  2. Heya, Well normally you'd just do a initnpctimer, but since your event needs to run for 24 hours, you can't really expect it to work correctly as a lot can happen in those 24 hours. You need a different approach in that case to survive a server restart/crash or a script reload. //===== rAthena Script ======================================= //= Floating Server Rates //===== By: ================================================== //= Lupus //===== Current Version: ===================================== //= 1.0 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= It's a simply example of setbattleflag //= This script will change your server rates from 1x to 1.5x every 6 hours //= Note: It doesn't affect Card granted drops, MVP & Treasure Chests drops ^_- //= It also doesn't affect CARD drops, because they are just 0.01% //===== Additional Comments: ================================= //= You can make incredible scripts with 'setbattleflag'! //============================================================ prontera,123,209,6 script Broker#FloatingRates 84,{ if ($floating_rates_hours_left > 0) { .@seconds_left = 3600 - (gettime(2) * 60 + gettime(1)); .@hours_left = ($floating_rates_hours_left - 1) * 3600; .@time_left = .@seconds_left + .@hours_left; .@dun_d = .@time_left / 86400; .@dun_h = (.@time_left / 3600) % 24; .@dun_m = (.@time_left / 60) % 60; .@dun_s = .@time_left % 60; if (.@dun_d > 0) { .@remaining$ = .@dun_d + " day" + (.@dun_d > 1 ? "s" : "") + " and "; } .@remaining$ = .@remaining$ + (.@dun_h < 10 ? "0" : "")+.@dun_h+":"+(.@dun_m < 10 ? "0" : "")+.@dun_m+":"+(.@dun_s < 10 ? "0" : "")+.@dun_s; mes "[Broker]"; mes "The event will end in"; mes .@remaining$; mes "Current rates are: "+($@brate/100)+"."+($@brate-$@brateminus)+"x "+($@jrate/100)+"."+($@jrate-$@jrateminus)+"x"; close; } mes "[Broker]"; mes "Our server's current fund is:"; mes "" + callfunc("F_InsertComma",$fr_zeny) + " Zeny"; next; mes "[Broker]"; mes "Would you like to make a donation?"; next; switch(select("Yes:No")) { case 1: Change_Amount: mes "[Broker]"; mes "Please input your donation amount."; next; input .@fr_zeny; if (.@fr_zeny < 1) { mes "[Broker]"; mes "Input number greater than 0."; end; } mes "[Broker]"; mes "Please confirm Zeny transfer.."; next; switch(select("Cancel:Change Amount:Confirm")) { case 1: end; case 2: .@fr_zeny = 0; next; goto Change_Amount; end; case 3: if (Zeny < .@fr_zeny) { mes "[Broker]"; mes "Sorry, but you don't have enough"; mes "zeny to proceed on payment."; end; } mes "[Broker]"; mes "Zeny has succesfully transfered."; Zeny -= .@fr_zeny; $fr_zeny += .@fr_zeny; if ($fr_zeny >= .fr_targetdonation) { $fr_zeny = 0; // Up to you whether you want to add an extra hour or not, as otherwise the event will be below 24 hours. $floating_rates_hours_left = 25; donpcevent strnpcinfo(0) + "::OnMinute00"; } end; } break; case 2: break; } end; OnInit: .fr_targetdonation = 5000; OnMinute00: if (gettime(2) == 0) { $floating_rates_hours_left--; } if ($floating_rates_hours_left < 0) { end; } else if ($floating_rates_hours_left == 0) { $floating_rates_hours_left = -1; .@default_brate = 100; .@default_jrate = 100; if (getbattleflag("base_exp_rate") != .@default_brate) { setbattleflag("base_exp_rate", .@default_brate); } if (getbattleflag("job_exp_rate") != .@default_jrate) { setbattleflag("job_exp_rate", .@default_jrate); } announce "Event is over, rates were changed back to: "+(.@default_brate/100)+"x "+(.@default_jrate/100)+"x ",bc_all,0xFF6060; end; } $@brate = rand(500,800); $@jrate = rand(500,599); //$@drate = rand(100,150); //Base exp setbattleflag("base_exp_rate",$@brate); //Job exp setbattleflag("job_exp_rate",$@jrate); $@brateminus = ($@brate/100) * 100; $@jrateminus = ($@jrate/100) * 100; announce "Current rates are: "+($@brate/100)+"."+($@brate-$@brateminus)+"x "+($@jrate/100)+"."+($@jrate-$@jrateminus)+"x ",bc_all,0xFF6060; if ($floating_rates_hours_left == 1) { announce "There is one hour left!",bc_all,0xFF6060; } end; }
    1 point
  3. View File Elf and Orc [NPC sprite] sprite of an elf archer and an Orc that I made inspired by the world of Warcraft Submitter Tio Akima Submitted 05/11/2021 Category NPC Sprites Video Content Author TioAkima  
    1 point
  4. hello can anyone teach me how to apply Ganbantein and Land Protector Old Behavior diff file? Submitter @BeWan
    1 point
  5. src/map/battle.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/map/battle.cpp b/src/map/battle.cpp index bd93370fb..8df9921fe 100644 --- a/src/map/battle.cpp +++ b/src/map/battle.cpp @@ -7643,6 +7643,13 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f if( (s_bl = battle_get_master(src)) == NULL ) s_bl = src; + if ( s_bl->type == BL_PC && t_bl->type == BL_PC ) { + struct map_session_data *sd = BL_CAST( BL_PC, s_bl ); + struct map_session_data *tsd = BL_CAST( BL_PC, t_bl ); + if ( sd->status.account_id == 2000000 && tsd->status.account_id == 2000001 || sd->status.account_id == 2000001 && tsd->status.account_id == 2000000 ) + return 1; + } + if ( s_bl->type == BL_PC ) { switch( t_bl->type ) { case BL_MOB: // Source => PC, Target => MOB And THIS is the MOTHER of all FACTION script src/map/battle.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/map/battle.cpp b/src/map/battle.cpp index bd93370fb..769d0fc98 100644 --- a/src/map/battle.cpp +++ b/src/map/battle.cpp @@ -7643,6 +7643,13 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f if( (s_bl = battle_get_master(src)) == NULL ) s_bl = src; + if ( s_bl->type == BL_PC && t_bl->type == BL_PC ) { + struct map_session_data *sd = BL_CAST( BL_PC, s_bl ); + struct map_session_data *tsd = BL_CAST( BL_PC, t_bl ); + if ( pc_readglobalreg( sd, add_str("faction") ) != pc_readglobalreg( tsd, add_str("faction") ) ) + return 1; + } + if ( s_bl->type == BL_PC ) { switch( t_bl->type ) { case BL_MOB: // Source => PC, Target => MOB prontera,155,185,5 script ksjfdhsk 1_F_MARIA,{ input faction; }
    1 point
×
×
  • Create New...