Jump to content

Sallycantdance

Members
  • Posts

    810
  • Joined

  • Last visited

Posts posted by Sallycantdance

  1.  hello im wondering how to edit gm permission event its level 99 it cant drop the item or cant trade if the item is not tradable or droppable  so i cant test the item on time without using normal player ty

    - Id: 99
        Name: Admin
        Level: 99
        Inherit:
          Support: true
          Law Enforcement: true
        LogCommands: true
        Permissions:
          can_trade: true
          can_party: true
          command_enable: true
          all_skill: false
          all_equipment: false
          skill_unconditional: false
          use_check: true
          use_changemaptype: true
          all_commands: true
          channel_admin: true
          can_trade_bounded: true
          item_unconditional: false
          bypass_stat_onclone: true
          bypass_max_stat: true
          macro_register: true
          trade_unconditional: true
          #all_permission: true

  2. 3 hours ago, Racaae said:

    Hello. RecommendedQuestInfoList_True_EN is part of the old translation process. Current ROenglishRE project uses the renamed System folder (SystemEN). Avoid mixing components from the old and new.

    If you want to continue using RecommendedQuestInfoList_True_EN:
    Check your client folder/grf for the following files:

    • /System/RecommendedQuestInfoList_True_EN.lub
    • /System/OngoingQuestInfoList_True_EN.lub

    Did you find them in the correct folder? Are they decompiled? Are they in the language you want?

    Also, check:

    • /data/luafile1s54/lua files/datainfo/questinfo_f.lub

    Try opening this file. It should not contain the following lines — if it does, delete the file.

    dofile("SystemEN/OngoingQuests_C.lub")
    dofile("SystemEN/RecommendedQuests_C.lub")

    i try to put the roenglish system en OngoingQuests/lub then i patch it in customize OngoingQuestInfolist.lub and while searching i dont have the file this file questinfo_f.lub

  3. hello everyone im having a problem in woe since some says its normal behavior because of the knockback but i still would like to ask did anyone know how to modify it after the player step in 1 trap it will immediately stop , im trying searching and didnt see any solution 
     

    Player can walk right pass through "Ankle Snare" until reaching the end point of the player's walk path coordinate before getting trapped.

    Player can even walk pass through layers of "Ankle Snare" until reaching the end point of the player's walk path coordinate before getting trapped.

  4. Hello everyone im having a problem regarding ankle snare skill the trap effect only triggers 5 cell or more so basically they can walk around 1-5 traps before they stop here is the sample picture



     

    trap delay.png

  5. 8 hours ago, Mawwhh said:

    no estoy seguro si esta es la solucion, pero creo que debes poner en el programa con el que haces tu cliente algo asi. image.png.2af2e0c2fae2aab74088787907603a68.pngimage.png.68adb65bda7dae8c9d830f65487f8635.png

    También intento eso, señor, pero también tengo un error después de intentarlo 

    unknown quest 1004

    1.png

    2.png

  6. hello i already try everything i can to fix this script im always having this error after i enter the map, can someone help me

    [Error]: buildin_rid2name: invalid RID
    [Error]: buildin_rid2name: invalid RID
    [Error]: buildin_getmapxy: Player with nick '(null)' is not found.
    [Error]: buildin_getmapxy: Player with map id '0' is not found.

     

    Quote

    -    script    dualclientkicker    -1,{
    OnPCLoadMapEvent:
        set .@charmap$, strcharinfo(3);
        if(!compare(.tmp$, .@charmap$)) end;
        
        set .@len, query_sql("SELECT DISTINCT `account_id` FROM `char` WHERE `account_id` IN (SELECT `account_id` FROM `login` WHERE `last_ip` =(SELECT `last_ip` FROM `login` WHERE `account_id`="+getcharid(3)+")) AND `online` <> 0;", .@a);
        
        // Check for results from query_sql
        if (.@len == 0) end;
        
        for (set .@d, 0; .@d < .@len; set(.@d, .@d+1)) {
            // Ensure the account ID is valid before proceeding
            if (rid2name(.@a[.@d]) != "") {
                if (!getmapxy(.@map$, .@x, .@y, BL_PC, rid2name(.@a[.@d])) && .@charmap$ == .@map$)
                    set .@c, .@c + 1;  
            }
        }
        
        if (.@c > .limitacc) {
            dispbottom "Dual accounts not allowed in this map.";
            warp "SavePoint",0,0;
        }    
        end;

    OnInit:
        set .limitacc, 1;
        setarray .maps$, "pvp_y_1-2", "prt_pvp", "grandarena", "bombring", "gh10", "gh11", "prtg_cas01";
        set .lens, getarraysize(.maps$);
        
        for (set .a, 0; .a < .lens; set(.a, .a+1)) {
            setmapflag .maps$[.a], mf_loadevent;
            set .tmp$, .tmp$ + .maps$[.a] + ",";
        }
    }
     

     

  7. hello i already import the sql file but it is error in the webserver

     

    Quote

    CREATE TABLE IF NOT EXISTS `user_configs` (
      `world_name` varchar(32) NOT NULL,
      `account_id` int(11) unsigned NOT NULL,
      `data` longtext NOT NULL,
      PRIMARY KEY (`world_name`, `account_id`)
    ) ENGINE=MyISAM;

     

    Quote

    CREATE TABLE IF NOT EXISTS `char_configs` (
      `world_name` varchar(32) NOT NULL,
      `account_id` int(11) unsigned NOT NULL,
      `char_id` int(11) unsigned NOT NULL,
      `data` longtext NOT NULL,
      PRIMARY KEY (`world_name`, `account_id`, `char_id`)
    ) ENGINE=MyISAM;

     

     

    12345.thumb.png.8fa95075a270675336505a723c203a22.png

  8. Hello everyone, I would like to make this script work in a specific map only can somebody help me? Thank you in advance!
     

    Quote

    -    script    hourly_point_main    -1,{
         OnInit:
            .npc_name$ = strnpcinfo(3);
            .reward_minutes = 60;
            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");

            if (checkvending() & 2) {
                end;
            }

            #daily_minute_count += .reward_minutes;

            switch(#daily_minute_count) {
                case 60: // 60 minutes
                    #CASHPOINT += 1;
                    getitem 677,1;
                    break;
                case 120: // 120 minutes 
                    #CASHPOINT += 1;
                    getitem 677,1;
                    break;
                case 180: // 180 minutes
                    #CASHPOINT += 1;
                    getitem 677,1;
                    break;
                case 240: // 240 minutes
                    #CASHPOINT += 1;
                    getitem 677,1;
                    break;
                case 300: // 300 minutes
                    #CASHPOINT += 1;
                    getitem 677,1;
                    break;
                case 360: // 360 minutes
                    #CASHPOINT += 1;
                    getitem 677,1;
                    break;
                case 420: // 420 minutes
                    #CASHPOINT += 1;
                    getitem 677,1;
                    break;
                case 480: // 480 minutes
                    #CASHPOINT += 1;
                    getitem 677,1;
                    #daily_minute_count = 0; // reset.
                    break;
                default:
                    break;
            }
    }

     

  9. sir @Scanty i know now heres the error coming from this script

     

    Quote

    -    script    dualclientkicker    -1,{
    OnPCLoadMapEvent:
    set .@charmap$, strcharinfo(3);
    if(!compare(.tmp$,.@charmap$)) end;
    set .@len, query_sql("SELECT DISTINCT `account_id` FROM `char` WHERE`account_id` IN (SELECT `account_id` FROM `login` WHERE `last_ip` =(SELECT `last_ip` FROM `login` WHERE `account_id`="+getcharid(3)+")) AND`online` <> 0;",.@a);
    for(set(.@d,0);.@d<.@len;set(.@d,.@d+1)) {
        if(!getmapxy(.@map$,.@x,.@y,BL_PC,rid2name(.@a[.@d])) && .@charmap$==.@map$)
        set .@c,.@c+ 1;     
        }
    if(.@c > .limitacc ) {
    dispbottom "dual accounts not allowed in this map.";
        warp "maintown",97,30;
        }    
        end;
    OnInit:
    set .limitacc,1;
    setarray .maps$, "pvp_y_1-2", "prt_pvp", "br_ifrit", "grandarena", "bombring", "gh10", "gh11", "gh12";
    set .lens ,    getarraysize(.maps$) ;
    for(set(.a,0);.a<.lens;set(.a,.a+1)) {
        setmapflag .maps$[.a],    mf_loadevent ;
        set .tmp$ ,.tmp$+.maps$[.a]+",";
    }
    }

     

  10. 2 hours ago, Scanty said:

    I did this basic script, maybe it will help you.

    CREATE TABLE IF NOT EXISTS `pvp_rank` (
      `char_id` int(11) unsigned NOT NULL,
      `kills` int(11) unsigned NOT NULL DEFAULT 0,
      `deaths` int(11) unsigned NOT NULL DEFAULT 0,
      PRIMARY KEY (`char_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

     

    And here's the script.

    prontera,196,142,5	script	PVP Warper	100,{
    	mes "[ ^FF0000PVP Warper^000000 ]";
    	mes "Welcome, ^0000FF"+strcharinfo(0)+"^000000.";
    	mes "Please select a PVP room:";
    	next;
    
    	// Dynamic menu with player counts
    	.@menu$ = "";
    	for (.@i = 0; .@i < getarraysize(.pvp_map$); .@i++) {
    		.@users = getmapusers(.pvp_map$[.@i]);
    		.@menu$ += .pvp_name$[.@i]+" ["+.@users+"/"+.pvp_max[.@i]+"]:";
    	}
    
    	.@sel = select(.@menu$) - 1;
    
    	if (BaseLevel < .pvp_level[.@sel]) {
    		mes "[ ^FF0000PVP Warper^000000 ]";
    		mes "You must be at least level "+.pvp_level[.@sel]+" to enter this room.";
    		close;
    	}
    
    	if (getmapusers(.pvp_map$[.@sel]) >= .pvp_max[.@sel]) {
    		mes "[ ^FF0000PVP Warper^000000 ]";
    		mes "This room has reached its player limit ("+.pvp_max[.@sel]+").";
    		close;
    	}
    
    	warp .pvp_map$[.@sel],0,0;
    	end;
    
    
    OnPCKillEvent:
    	// Validate if map is a valid PVP room
    	.@valid = 0;
    	for (.@i = 0; .@i < getarraysize(.pvp_map$); .@i++) {
    		if (strcharinfo(3) == .pvp_map$[.@i]) {
    			.@valid = 1;
    			break;
    		}
    	}
    	if (!.@valid) end;
    
    	// Get Killer and Victim Char IDs safely
    	.@killer_cid = getcharid(0);
    	.@victim_cid = getcharid(0, rid2name(killedrid));
    
    	if (!.@killer_cid || !.@victim_cid || .@killer_cid == .@victim_cid) end;
    
    	// Always register kills and deaths for all maps
    	query_sql("INSERT INTO pvp_rank (`char_id`, `kills`, `deaths`) VALUES ("+.@killer_cid+",1,0),("+.@victim_cid+",0,1) ON DUPLICATE KEY UPDATE `kills`=`kills`+VALUES(`kills`), `deaths`=`deaths`+VALUES(`deaths`)");
    
    	// Only grant special points in the GM-selected map
    	if (strcharinfo(3) != .points_map$) end;
    
    	// IP check validation (enabled or disabled by admin)
    	if (.ip_check_enabled) {
    		query_sql("SELECT last_ip FROM login WHERE account_id="+getcharid(3), .@killer_ip$);
    		query_sql("SELECT last_ip FROM login WHERE account_id="+killedrid, .@victim_ip$);
    		if (.@killer_ip$ == .@victim_ip$) {
    			dispbottom "[PVP Warper]: No points granted. Same IP detected.";
    			end;
    		}
    	}
    
    	// Kill cooldown validation
    	.@current_time = gettimetick(2);
    	.@cooldown = .kill_cooldown;
    
    	.@kill_cd_var$ = "kill_cd_"+.@killer_cid+"_"+.@victim_cid;
    	if (getd(.@kill_cd_var$) + .@cooldown > .@current_time) {
    		dispbottom "[PVP Warper]: You recently killed this player. Wait before earning more points.";
    		end;
    	}
    	setd .@kill_cd_var$, .@current_time;
    
    	// Add your special points reward code here.
    	// Example: set pvp_points, pvp_points + 1;
    
    	dispbottom "[PVP Warper]: You've earned special points for defeating a player.";
    	end;
    
    OnCheckRank:
    	mes "[ ^FF0000PVP Warper^000000 ]";
    	query_sql("SELECT kills, deaths FROM pvp_rank WHERE char_id="+ getcharid(0), .@kills, .@deaths);
    	mes "Tus estadísticas actuales:";
    	mes "^0000FFKills:^000000 "+ (.@kills ? .@kills : 0);
    	mes "^FF0000Muertes:^000000 "+ (.@deaths ? .@deaths : 0);
    	close;
    
    OnGMResetRank:
    	if (getgmlevel() < 60) {
    		dispbottom "No tienes permisos para usar este comando.";
    		end;
    	}
    	query_sql("TRUNCATE TABLE pvp_rank");
    	dispbottom "Ranking PVP reiniciado correctamente.";
    	end;
    
    OnInit:
    	// General Configuration
    	setarray .pvp_map$[0], "guild_vs1", "guild_vs2", "pvp_y_1-2";
    	setarray .pvp_name$[0], "PVP Room 1", "PVP Room 2", "PVP Prontera";
    	setarray .pvp_level[0], 1, 50, 99;
    	setarray .pvp_max[0], 10, 15, 20;
    
    	// Enable or disable IP check (1 = ON, 0 = OFF)
    	.ip_check_enabled = 0;
    
    	// Kill cooldown in seconds (recommended: 60-120 sec)
    	.kill_cooldown = 60;
    	
    	// GM configuration: Set the map that gives special points here (default is room 1)
    	.points_map$ = .pvp_map$[0]; // Change [0] to [1] or [2] to switch rooms
    
    	// Commands for player and GM
    	bindatcmd "pvprank",strnpcinfo(3)+"::OnCheckRank";
    	bindatcmd "resetpvprank",strnpcinfo(3)+"::OnGMResetRank",60,60;
    	end;
    }

     

    Feel free to ask for a change.

     

    thank you so much sir for this script !!!!!

  11. i think i got my error in mail.ccp

    heres yours

    Quote
    if( !map_getmapflag(sd->bl.m, MF_TOWN) && !pc_can_use_command(sd, "mail", COMMAND_ATCOMMAND) )
    	{
    		ShowWarning("clif_parse_Mail: char '%s' trying to do invalid mail operations.\n", sd->status.name);
    		return true;
    	}
    #else
    	if( map_getmapflag( sd->bl.m, MF_NORODEX ) ){
    		clif_displaymessage( sd->fd, msg_txt( sd, 796 ) ); // You cannot use RODEX on this map.
    		return true;
    	}

    and here is mine maybe the reason is my server side is not updated, thats my always problem in putting some diff files in my server cause i dont know how to update it anyways thank you very much sir for your effort and help i really appreciate it Godbless you!

     

    Quote

    #if PACKETVER < 20150513
        if( !map_getmapflag(sd->bl.m, MF_TOWN) && !pc_can_use_command(sd, "mail", COMMAND_ATCOMMAND) )
        {
            ShowWarning("clif_parse_Mail: char '%s' trying to do invalid mail operations.\n", sd->status.name);
            return true;
        }
    #endif

     

  12. 17 hours ago, Brynner said:

    i just tried it no error on my side. i don't have Grand Arena map so I replace it with another existing map but it works fine on me no error on map server image.thumb.jpeg.e5d7c7b36de06a92634976ffb087a5e6.jpegimage.png.a1199a80a3482500a68199ad882f0372.pngimage.thumb.jpeg.9d9a1a8c8637fadbdb3c6d64ed333be5.jpeg

    mine is error but we have the same script huhu

    image.thumb.png.eccf0992b808c6d53d4c8eb918300a48.png

  13. 1 hour ago, Brynner said:

    try this. i haven't tested it.

     

    /*
    ALTER TABLE `char` ADD `pvp_kill` INT(11) UNSIGNED NOT NULL DEFAULT '0'  AFTER `fame`;
    */
    
    payon,193,104,4	script	PVP Warper	630,{
        doevent "pvp_rank_main::OnTalk";
    }
    
    -	script	pvp_rank_main	-1,{
    
        OnTalk:
            mes "[PvP Room Master]";
            mes "Where do you want to go?";
            next;
            switch ( select ( 
                "Grand Arena [ "+getmapusers("grandarena")+" ]",
                "^ff0000[ No Points ]^000000 Izlude PVP Room [ "+getmapusers("pvp_y_1-2")+" ]",
                ( getgmlevel() >= 99 ) ? "^FF0000[GM] Reset PVP Ranking^000000":""
            )) {
            
            case 1: // Grand Arena
                if ( getmapusers("grandarena") >= 100 ) {
                    mes "The Grand Arena is full!";
                    close;
                }
                if ( BaseLevel < 50 ) { 
                    mes "Excuse me, but";
                    mes "you need to be at least level 50 or above!";
                    close;
                }
                warp "grandarena",0,0;
                announce ""+strcharinfo(0)+" entered Grand Arena PVP ROOM!", bc_all, 0xCCFFFF;
                end;
            
            case 2: // Izlude PVP Room
                if ( getmapusers("pvp_y_1-2") >= 100 ) {
                    mes "The Izlude PVP Room is full!";
                    close;
                }
                if ( BaseLevel < 50 ) { 
                    mes "Excuse me, but";
                    mes "you need to be at least level 50 or above!";
                    close;
                }
                warp "pvp_y_1-2",0,0;
                announce ""+strcharinfo(0)+" entered Izlude PVP ROOM!", bc_all, 0xCCFFFF;
                end;
    
            case 3: // GM Reset Ranking
                if ( getgmlevel() < 99 ) {
                    mes "You do not have permission to perform this action.";
                    close;
                }
                mes "[PvP Room Master]";
                mes "Reset Ranking? This action cannot be undone.";
                if ( select( "Confirm", "Cancel" ) == 1 ) {
                    query_sql( "UPDATE `char` SET `pvp_kill` = 0 WHERE `pvp_kill` > 0" );
                    mes "PvP ranking has been reset.";
                }
                close;
            
            default: // PvP Rankings
                mes "[PvP Room Master]";
                mes "PvP Rankings:";
                query_sql( "SELECT `name`, `pvp_kill` FROM `char` WHERE `pvp_kill` > 0 ORDER BY `pvp_kill` DESC LIMIT 10", .@name$, .@pvp_kill );
                .@size = getarraysize( .@name$ );
                if ( .@size == 0 ) {
                    mes "No PvP rankings available yet.";
                } else {
                    for ( .@i = 0; .@i < .@size; .@i++ ) {
                        mes "["+(.@i + 1 )+"] "+.@name$[.@i]+" - "+.@pvp_kill[.@i]+" kill(s)";
                    }
                }
                close;
            }
    }

     

    hello thank you for your effort but it has the same error

  14. hello anybody know how to fix this error everytime the player enter the pvp room this error appears
    heres the scripterror.png.024a0c30b47a4ac1eec4109cff95922d.png
     

    Quote

        // https://rathena.org/board/topic/107986-requesting-for-a-pvp-ranking-w-reset/

    /*
    ALTER TABLE `char` ADD `pvp_kill` INT(11) UNSIGNED NOT NULL DEFAULT '0'  AFTER `fame`;
    */

    payon,193,104,4    script    PVP Warper    630,{
        doevent "pvp_rank_main::OnTalk";
    }

    -    script    pvp_rank_main    -1,{

        OnTalk:
            mes "[PvP Room Master]";
            mes "Where do you wanna go?";
            next;
            switch ( select ( 
                "Grand Arena [ "+getmapusers("grandarena")+" ]",
                "^ff0000[ No Points ]^000000 Prontera  [ "+getmapusers("grandarena")+" ]",
                ( getgmlevel() >= 99 ) ? "^FF0000[GM] Reset PVP Ranking^000000":""
            )) {
        case 1:    // Grand Arena
            if (getmapusers("grandarena") > 99) callsub S_full;
            if (BaseLevel <49) { 
            mes "Excuse me, but";
            mes "did you not come prepared?";
            mes "you need to be";
            mes "atleast level 50 above!";
            close;
            }
            warp "grandarena",0,0;
            announce ""+strcharinfo(0)+" entered Grand Arena PVP ROOM !",bc_all,0xCCFFFF;
            end;
            
        case 2:    // Izlude PVP Rooom
            if (getmapusers("pvp_y_1-2") > 99) callsub S_full;
            if (BaseLevel <49) { 
            mes "Excuse me, but";
            mes "did you not come prepared?";
            mes "you need to be";
            mes "atleast level 50 above!";
            close;
            }
            warp "pvp_y_1-2",0,0;
            announce ""+strcharinfo(0)+" entered Izlude PVP ROOM !",bc_all,0xCCFFFF;
            end;
            
                default:
                    mes "[PvP Room Master]";
                    mes "PVP Ranking";
                    query_sql( "SELECT `name`,`pvp_kill` FROM `char` WHERE `pvp_kill` > 0 ORDER BY `pvp_kill` DESC LIMIT 10", .@name$, .@pvp_kill );
                    .@size = getarraysize( .@name$ );
                    for ( .@i = 0; .@i < .@size; .@i++ ) {
                        mes "["+(.@i + 1 )+"] "+.@name$[.@i]+" - "+.@pvp_kill[.@i]+" kill(s)";
                    }
                    break;
                case 3:
                    mes "[PvP Room Master]";
                    mes "Reset Ranking? Action cant be undo. Confirm your action.";
                    if ( select( "Confirm","Cancel" ) == 1 ) {
                        query_sql( "UPDATE `char` SET `pvp_kill` = 0 WHERE `pvp_kill` > 0" );
                        mes "Done.";
                    }
                    break;
            }
            close;
        
        L_Enter:
            .@title$ = getarg( 0,"" );
            .@map$ = getarg( 1,"" );
            .@max_player = getarg( 2,0 );
            .@getmapusers = getmapusers( .@map$ );
            
            mes "[PvP Room Master]";
            if ( .@getmapusers == -1 ) {
                mes "Invalid map.";
            }
            else if ( .@max_player > 0 && .@getmapusers >= .@max_player ) {
                mes "I'm sorry but the PVP Room is already full!";
            }
            else {
                mes .@title$ + " ["+.@getmapusers+"/"+.@max_player+"]";
                if ( select( "Enter" ) == 1 ) {
                    warp .@map$,0,0;
                }
            }

            end;
    }

     

     

  15. 2 hours ago, Scanty said:

    maybe because this... 

     if ( getmapflag( strcharinfo(3), mf_gvg_castle ) && ( agitcheck() || agitcheck2() )) {

    your koe map doesn't have that mapflag right? mf_gvg_castle maybe you need to check if you have it

    okay thanks yes maybe since koe maps are custom i will check where to add it i only add the maps in the castle db but in mapflag i think i didnt ill search for it thank you sir!

  16. 34 minutes ago, Paul said:
    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;).

    thank you sir

  17. On 2/5/2025 at 6:04 AM, Scanty said:
    prontera,193,124,6	script	Global Exp Amplifier#EventFloatingRates	10308,{
    
    	mes "[Global Exp Amplifier]";
    	mes "Current collected funds:";
    	mes "~ [^0000ff" + callfunc("F_InsertComma", $collected_funds) + "^000000] Zeny";
    	mes "Target global funds:";
    	mes "~ [^0000ff" + callfunc("F_InsertComma", .target_funds) + "^000000] Zeny";
    	mes "Still need " + callfunc("F_InsertComma", $donation_missing) + " Zeny to reach the target.";
    	next;
    	
    	switch (select("Donate Zeny", "Cancel")) {
    		case 1:
    			mes "Enter the amount you want to donate:";
    			next;
    			input .@donation;
    
    			// Validations
    			if (.@donation < .min_donation_zeny) {
    				mes "The minimum donation amount is " + callfunc("F_InsertComma", .min_donation_zeny) + " Zeny.";
    				end;
    			}
    			if (Zeny < .@donation) {
    				mes "You don't have enough Zeny.";
    				end;
    			}
    			if (.@donation > $donation_missing) {
    				mes "The amount exceeds the remaining balance.";
    				mes "Remaining Balance: " + callfunc("F_InsertComma", $donation_missing) + " Zeny";
    				end;
    			}
    
    			// Apply the donation
    			Zeny -= .@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 3 hours.", bc_all, 0xFF6060;
    				donpcevent strnpcinfo(3) + "::OnStart"; // Ensure the event is triggered
    			}
    			end;
    	}
    
    OnStart:
    	if (.EventActive) end; // Prevent multiple activations
    
    	// Start the event for 3 hours
    	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;
    
    OnTimer10800000: // Event ends after 3 hours (3,600,000 * 3)
    	// 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, 1000000; // Target donation amount
    	set .min_donation_zeny, 10000; // Minimum donation amount
    	set .EventActive, 0;
    	set $donation_missing, .target_funds - $collected_funds;
    	end;
    
    }

    Try this. Maye it should help you.

    hello regarding this script instead of zeny can i chaged it to item? also for everyone hour only ?

×
×
  • Create New...