Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/05/20 in all areas

  1. Your initial script has some oddities (regarding variable scope). Hmm, I see a few things you'd probably to worry about with the proposed solution: A player can do multiple auto announces. There is no way of tracking the active announcements. Once the auto announce is bought, it is fully detached from the player and cannot be linked back to him. The announces will get lost on script reload/server reboots. You'd probably want to use global arrays and have the announces displayed with a OnTimer1000 checks instead. With that being said, the following is probably what you're looking for. I personally prefer to have the loop on a separate event, but the end result is very similar in this case. prontera,187,210,3 script Broadcaster#1::BC 894,{ .@npcname$ = "^FF9300 Broadcaster ^000000"; .@header$ = "[^0000ff" + .@npcname$ + "^000000]"; mes .@header$; mes "Hi, I'm the Broadcaster."; mes "I can Broadcast a message for you."; mes " "; mes " "; mes " "; mes "It costs ^ff0000" + .broadcastfee + "^000000 zeny."; next; mes .@header$; mes "Would you like to Broadcast?"; next; switch (select("Yes:Nevermind:Auto-broadcast")) { case 1: if (Broadcast > gettimetick(2)) { mes .@header$; mes "Sorry you have to wait for 1 min."; close; } if (Zeny < .broadcastfee) { goto L_NotEnoughZeny; } mes .@header$; mes "Please input your message."; next; input .@broadcast$; Zeny -= .broadcastfee; announce "Shout from " + strcharinfo(0) + ": " + .@broadcast$ + "", 0, 0x5AFF00; // Edit 5AFF00 for color code HTML Color Code Broadcast = gettimetick(2) + 60; //Timer 60 = 1 minute/s dispbottom "Broadcaster: Please wait for 1min until next broadcast to avoid flooding."; end; case 2: mes .@header$; mes "Suit yourself."; close; case 3: mes .@header$; mes "Hi, I can automatically broadcast messages for you!"; mes "It will cost you ^ff0000" + .auto_broadcastfee + "^000000 zeny per broadcast."; next; switch(select("Proceed:Check status:Exit")) { case 1: mes .@header$; mes "Please input your message."; next; input .@broadcast$; mes .@header$; mes "How many times do you want to broadcast?"; mes "Min: 1"; mes "Max: 100"; next; input .@repeat, 1, 100; if (.@repeat < 1 || .@repeat > 100) { mes .@header$; mes "Suit yourself."; close; } .@cost = .auto_broadcastfee * .@repeat; mes .@header$; mes "You want to broadcast:"; mes "^ff0000" + .@broadcast$ + "^000000"; mes "Every 3 minutes for ^00ff00" + .@repeat + "^000000 time(s)?"; mes "It will cost you a total of ^ff0000" + .@cost + "^000000 zeny."; next; switch(select("Proceed:Cancel")) { case 2: mes .@header$; mes "Suit yourself."; close; } if (Zeny < .@cost) { goto L_NotEnoughZeny; } Zeny -= .@cost; $@bc_announce$ = "Shout from " + strcharinfo(0) + ": " + .@broadcast$; $@repeat = .@repeat; donpcevent strnpcinfo(3) + "::OnAutoAnnounce"; close; case 2: // ?? end; case 3: mes .@header$; mes "Suit yourself."; close; } close; } end; L_NotEnoughZeny: mes .@header$; mes "You don't have enough zeny."; close; OnAutoAnnounce: .@repeat = $@repeat; .@broadcast$ = $@bc_announce$; while (.@repeat > 0) { announce .@broadcast$, 0, 0x5AFF00; // Edit 5AFF00 for color code HTML Color Code sleep 180000; .@repeat--; } end; OnInit: .broadcastfee = 3000000; .auto_broadcastfee = 500000; end; }
    2 points
  2. Snowball War Battleground Snowball War is a custom Battleground Arena. The objective is to eliminate the enemy team until the indicator is 0. Participants only can kill throwing Snowballs to their enemies. Features Compatible with default battleground System. Compatible with Extended Battleground. Compatible with Extended Battleground 2.0 Snowball Custom Skill Snowball skill is only available on Snowball War and its behaviour is like a ground/place skill. This skill requires x1 Snowball in Level 1 and x3 Snowball in Level 2 and 3. To obtaining snowballs players need to find a Snowman and click him in a close distance. Snowman is teleported once the player gets the snowball. KVM Map Christmas Edition The arena is performed in a snowy KVM map. GitHash: 662a3e
    1 point
  3. yes originally I was also thinking about storing it on SQL table or using a $PERMANENT_GLOBAL_ARRAY so can GM can track which announcement are still being queue or deny the same player from using auto-broadcast over and over, but somehow I went for the easier route and do things that is easier to be made ... probably because he didn't pay me to do it so I made it easy hahaha initnpctimer and sleep doesn't persist after server reboots, I think the only way is use OnMinute00: OnMinute03: ... OnMinute57: ... ?
    1 point
  4. @Ahoy if u enabled VIP SYSTEM ... or conf/login_athena
    1 point
  5. storage skill i think ? Investigating in the discord of rAthena I found the answer. FIXED. diff --git a/src/custom/defines_post.hpp b/src/custom/defines_post.hpp index 253b8cdbf..4c10c0623 100644 --- a/src/custom/defines_post.hpp +++ b/src/custom/defines_post.hpp @@ -9,6 +9,8 @@ * For detailed guidance on these check http://rathena.org/wiki/SRC/config/ **/ - +#ifdef OFFICIAL_GUILD_STORAGE +#undef OFFICIAL_GUILD_STORAGE +#endif #endif /* CONFIG_CUSTOM_DEFINES_POST_HPP */ thanks to @Secrets another solution is... "for pre-re" db/pre-re/guild_skill_tree.yml - Id: GD_GUILD_STORAGE MaxLevel: 5 db/pre-re/skill_db.yml - Id: 10016 Name: GD_GUILD_STORAGE Description: Guild Storage Expansion MaxLevel: 5 Flags: IsGuild: true thanks to Aglao for the complementary information.
    1 point
×
×
  • Create New...