Jump to content

Paul

Members
  • Posts

    43
  • Joined

  • Last visited

  • Days Won

    1

Paul last won the day on March 15

Paul had the most liked content!

About Paul

  • Birthday 06/30/1989

Profile Information

Contact Methods

Recent Profile Visitors

1893 profile views

Paul's Achievements

Santa Poring

Santa Poring (3/15)

  • Dedicated
  • Conversation Starter
  • First Post
  • Collaborator
  • Week One Done

Recent Badges

2

Reputation

3

Community Answers

  1. //===== rAthena Script ======================================= //= Card Trader //===== By: ================================================== //= Psalm (Updated & Fixed) //===== Current Version: ===================================== //= 1.2 //===== Compatible With: ===================================== //= rAthena SVN //===== Description: ========================================= //= Exchange cards for points and buy rewards. //============================================================ prontera,165,196,6 script Card Trader 90,{ mes "[Card Trader]"; mes "Hi, "+strcharinfo(0)+"!"; mes "What can I do for you?"; next; switch(select(" > Information: > Trade in cards: > Point shop (^0055FF"+getd(.Points$)+"^000000): > Leave")) { case 1: mes "[Card Trader]"; mes "Do you find that you've got useless cards lying around?"; mes "I'll be glad to take them off your hands!"; next; mes "[Card Trader]"; mes "I'll give you ^0055FF"+.Points[0]+" Point"+((.Points[0] == 1)?"":"s")+"^000000 for each card,"; mes "and ^0055FF"+.Points[1]+" Points^000000 for MVP cards."; mes "Trade those points for items later on."; emotion e_cash; close; case 2: mes "[Card Trader]"; mes "Select the cards you want to trade in."; if (.Level) { mes " "; mes "They must be from monsters level "+.Level+" and above."; } deletearray @sold_nameid[0], getarraysize(@sold_nameid); callshop "card_shop",2; end; case 3: mes "[Card Trader]"; mes "You have ^0055FF"+getd(.Points$)+"^000000 Points."; callshop "card_shop",1; end; case 4: mes "[Card Trader]"; mes "*yawn* See you later!"; emotion e_yawn; close; } OnSellItem: set .@card_total, 0; mes "Cards to sell:"; mes "-----------------------------------"; for (set .@i, 0; .@i < getarraysize(@sold_nameid); set .@i, .@i+1) { if (@sold_nameid[.@i] > 4000 && @sold_nameid[.@i] < 4700) { if (.Level) { query_sql("SELECT `LV` FROM `mob_db` WHERE `DropCardid` = "+@sold_nameid[.@i], .@lv); if (.@lv < .Level) { dispbottom getitemname(@sold_nameid[.@i])+" is under the minimum level."; continue; } } set .@mvp, compare(.MVP$, ""+@sold_nameid[.@i]); mes ((.@mvp)?" ^FF0000":" ^777777")+@sold_quantity[.@i]+"x "+getitemname(@sold_nameid[.@i])+"^000000"; set .@card_total, .@card_total + (@sold_quantity[.@i] * ((.@mvp) ? .Points[1] : .Points[0])); } } deletearray @sold_nameid[0], getarraysize(@sold_nameid); deletearray @sold_quantity[0], getarraysize(@sold_quantity); if (.@card_total == 0) { mes " ^777777(none)^000000"; emotion e_swt; close; } mes " "; mes "Total: ^0055FF"+.@card_total+" pt.^000000"; next; if(select(" > ^0055FFComplete trade...^000000: > ^777777Cancel^000000") == 2) { mes "[Card Trader]"; mes "Oh, okay..."; emotion e_hmm; close; } setd .Points$, getd(.Points$) + .@card_total; mes "[Card Trader]"; mes "All done!"; emotion e_ho; close; OnBuyItem: set .@cost, 0; for (set .@i, 0; .@i < getarraysize(@bought_nameid); set .@i, .@i+1) { for (set .@j, 0; .@j < getarraysize(.Shop); set .@j, .@j+2) { if (@bought_nameid[.@i] == .Shop[.@j]) { set .@cost, .@cost + (.Shop[.@j+1] * @bought_quantity[.@i]); break; } } } if (.@cost > getd(.Points$)) { mes "[Card Trader]"; mes "You don't have enough Points."; emotion e_omg; } else { mes "Items purchased:"; mes "-----------------------------------"; for (set .@i, 0; .@i < getarraysize(@bought_nameid); set .@i, .@i+1) { getitem @bought_nameid[.@i], @bought_quantity[.@i]; mes " ^777777"+@bought_quantity[.@i]+"x "+getitemname(@bought_nameid[.@i])+"^000000"; } mes "Total: ^0055FF"+.@cost+" pt.^000000"; setd .Points$, getd(.Points$) - .@cost; emotion e_cash; } deletearray @bought_nameid[0], getarraysize(@bought_nameid); deletearray @bought_quantity[0], getarraysize(@bought_quantity); close; OnInit: set .Level, 0; set .Points$, "#Card_Points"; setarray .Shop, 4001,1,4004,1,4033,1,4196,1,4197,25,4054,50,4174,75,4047,100; setarray .Points, 1, 5; set .MVP$, "4121,4123,4128,4131,4132,4134,4135,4137,4142,4143,4144,4145,4146,4147,4148,4168,4236,4241,4263,4276"; end; } Changes & Fixes: ✔ Fixed npcshopattach Issue - Removed unnecessary npcshopattach "card_shop";. ✔ Corrected Point Handling - Ensured correct getd(.Points$) usage for point calculations. ✔ Improved Sell & Buy Logic - Ensured arrays are properly processed before deleting. ✔ Refactored OnSellItem and OnBuyItem - More efficient iteration through sold/bought items. Try testing this version, and let me know if you need further adjustments!
  2. /** * Adds the specified amount of zeny to the trade window * This function will check if the player have enough money to do so * And if the target player have enough space for that money * @param sd : Player who's adding zeny * @param amount : zeny amount */ void trade_tradeaddzeny(map_session_data* sd, int32 amount) { // Trading is disabled return; } completely removed trading
  3. - script hourly_point_main -1,{ OnInit: .npc_name$ = strnpcinfo(3); .reward_minutes = 60; .target_map$ = "prontera"; // Restrict to Prontera bindatcmd("check", .npc_name$ + "::OnAtcommand"); end; OnAtcommand: dispbottom("Accumulated " + #daily_minute_count); end; OnPCLoginEvent: addtimer(.reward_minutes * 60000, .npc_name$ + "::OnUpdate"); end; OnUpdate: deltimer(.npc_name$ + "::OnUpdate"); addtimer(.reward_minutes * 60000, .npc_name$ + "::OnUpdate"); // Check if the player is in Prontera if (strcharinfo(3) != .target_map$) { end; } if (checkvending() & 2) { end; } #daily_minute_count += .reward_minutes; switch(#daily_minute_count) { case 60: case 120: case 180: case 240: case 300: case 360: case 420: #CASHPOINT += 1; getitem 677,1; break; case 480: #CASHPOINT += 1; getitem 677,1; #daily_minute_count = 0; // Reset counter after 8 hours break; } } Features: Works only in Prontera (prontera map) Rewards every hour up to 8 hours Prevents vending abuse Resets counter after 8 hours
  4. State it clear. You want a headgear npc and for hat effect?
  5. You know its hard to script. If you want, i fix script for just 5 dollar
  6. prontera,193,124,6 script Global Exp Amplifier#EventFloatingRates 10308,{ mes "[Global Exp Amplifier]"; mes "Current collected items:"; mes "~ [^0000ff" + callfunc("F_InsertComma", $collected_funds) + "^000000] Items"; mes "Target global items:"; mes "~ [^0000ff" + callfunc("F_InsertComma", .target_funds) + "^000000] Items"; mes "Still need " + callfunc("F_InsertComma", $donation_missing) + " Items to reach the target."; next; switch (select("Donate Items", "Cancel")) { case 1: mes "Enter the amount you want to donate:"; next; input .@donation; // Validations if (.@donation < .min_donation_items) { mes "The minimum donation amount is " + callfunc("F_InsertComma", .min_donation_items) + " Items."; end; } if (countitem(.donation_item) < .@donation) { mes "You don't have enough items."; end; } if (.@donation > $donation_missing) { mes "The amount exceeds the remaining balance."; mes "Remaining Balance: " + callfunc("F_InsertComma", $donation_missing) + " Items"; end; } // Apply the donation delitem .donation_item, .@donation; $collected_funds += .@donation; $donation_missing -= .@donation; mes "Donation successful. Thank you for your contribution!"; // Start the event if the target is reached if ($collected_funds >= .target_funds) { $collected_funds = 0; announce "[Global Exp Amplifier]: Target reached! Activating Floating Rates Event for 1 hour.", bc_all, 0xFF6060; donpcevent strnpcinfo(3) + "::OnStart"; // Ensure the event is triggered } end; } OnStart: if (.EventActive) end; // Prevent multiple activations // Start the event for 1 hour set .EventActive, 1; announce "[Floating Rates]: The event has now officially started!", bc_all, 0x00FF00; initnpctimer; // Start the NPC timer end; OnTimer60000: // Every 60 minutes (60,000 milliseconds) if (!.EventActive) end; // Assign random rates within the specified range set .@expRate, rand(5,8); set .@dropRate, rand(10,15) / 10; // 1.0x - 1.5x setbattleflag("base_exp_rate", .@expRate * 100); setbattleflag("job_exp_rate", .@expRate * 100); setbattleflag("item_rate_common", .@dropRate * 100); announce "[Floating Rates]: New Rates -> EXP: " + .@expRate + "x, DROP: " + .@dropRate + "x", bc_all, 0xFFD700; // This function is automatically repeated due to `initnpctimer` end; OnTimer3600000: // Event ends after 1 hour // Reset rates to normal setbattleflag("base_exp_rate", 100); setbattleflag("job_exp_rate", 100); setbattleflag("item_rate_common", 100); announce "[Floating Rates]: The event has ended. Rates are now back to normal.", bc_all, 0xFF0000; set .EventActive, 0; stopnpctimer; // Stops the NPC timer system end; OnInit: set .target_funds, 500; // Target donation amount (change this based on your needs) set .min_donation_items, 5; // Minimum donation amount set .donation_item, 501; // Example Item ID (Change to the correct one) set .EventActive, 0; set $donation_missing, .target_funds - $collected_funds; end; } Zeny changed to an item donation (Replace 501 with the actual item ID you want). Event lasts only 1 hour (OnTimer3600000). Minimum donation is now in item quantity (set .min_donation_items, 5;).
  7. Paul

    Freezing problem

    I think its on your statusdb try to look at this path. db\pre-re\status.yml and find this line - Status : Freeze
  8. Could anyone help me find out how this happened? My clone damage on was about 900+ And The clone damagetaken was 8500 / 6500 I think there was a problem with the source code mob.cpp in line mob_spawn() function that needs to be edited/Modified or need to add new line of codes. WindowsRO 2024-06-02 14-44-46.mp4 WindowsRO 2024-06-02 14-45-29.mp4
  9. mine is working ? i think the error was on your fluxcp config take a look at it.
  10. If you still got problem, I can make you customized patcher ? just pm me.
  11. what? kindly post screenshot..
×
×
  • Create New...