Mabuhay Posted January 18, 2020 Posted January 18, 2020 View File Emperium Breaker Ladder + Points + Shop The title says it all.. This would record a player's emp break count GM can easily reset the table This method is more optimized because the data is properly indexed on a table. Added emp breaker point shop - Account bounded.. Enjoy! Installation instructions : Spoiler // For WoE First Edition // open npc/guild/agit_main.txt --------------------------------------------- Look for this part: --------------------------------------------- // The Emperium has been broken. OnAgitBreak: set .@GID,getcharid(2); // Show and log error if an unguilded player breaks the Emperium. (Should NEVER happen) if (.@GID <= 0) { set .@notice$,"Character "+strcharinfo(0)+" ("+getcharid(0)+") broke the Emperium in Castle: "+strnpcinfo(2)+" while guildless. No data will be saved and Emperium respawned."; logmes .@notice$; debugmes .@notice$; donpcevent "Agit#"+strnpcinfo(2)+"::OnStartArena"; end; } --------------------------------------------- Add these below.. --------------------------------------------- query_sql("INSERT INTO `breaker_ladder` SET `char_id` = '"+getcharid(0)+"', `count` = '1' ON DUPLICATE KEY UPDATE `count` = `count`+1"); #EMPBREAKERPTS += $@empbreakpoints; // For WoE Second Edition // open npc/guild2/agit_main_se.txt --------------------------------------------- Look for this part: --------------------------------------------- OnStartArena: set .@GID,getcharid(2); set .@region$, (compare(strnpcinfo(4),"arug"))?"Valfreyja":"Nithafjoll"; // Lower castle Economy set .@Economy,getcastledata(strnpcinfo(4),CD_CURRENT_ECONOMY)-5; if (.@Economy < 0) set .@Economy, 0; setcastledata strnpcinfo(4),CD_CURRENT_ECONOMY,.@Economy; // Lower Castle Defence set .@Defence,getcastledata(strnpcinfo(4),CD_CURRENT_DEFENSE)-5; if (.@Defence < 0) set .@Defence, 0; setcastledata strnpcinfo(4),CD_CURRENT_DEFENSE,.@Defence; // Set new owner setcastledata strnpcinfo(4),CD_GUILD_ID,.@GID; // Clear castle's data. for(set .@i,CD_INVESTED_ECONOMY; .@i<CD_ENABLED_GUARDIAN00; set .@i,.@i+1) setcastledata strnpcinfo(4),.@i,0; // Disable Kafra disablenpc "Kafra Employee#"+strnpcinfo(2); --------------------------------------------- Add these below.. --------------------------------------------- query_sql("INSERT INTO `breaker_ladder` SET `char_id` = '"+getcharid(0)+"', `count` = '1' ON DUPLICATE KEY UPDATE `count` = `count`+1"); #EMPBREAKERPTS += $@empbreakpoints; Submitter Mabuhay Submitted 01/18/2020 Category Utilities Video Content Author Mabuhay 1 1 1 Quote
Sikdope Posted October 12, 2020 Posted October 12, 2020 Hello got error in your script sir: parse_line: expect command, missing function name or calling undeclared function 231 : } 232 : .@count = getmapusers("quiz_02"); 233 : if ( !.@count ) 234 : announce "Bombring: No one survived the bombrings.",bc_all,0x0ceedb; 235 : else if ( .@count ) { * 236 : .@size = getmapunits('B'L_PC,"quiz_02",.@aid); 237 : if ( .@size > 1 ) announce "A lot players has won the Bombring Event.",bc_all,0x0ceedb; 238 : for ( .@i = 0; .@i < getarraysize(.@aid); .@i++) { 239 : attachrid .@aid[.@i]; 240 : if ( .@size == 1 ) announce strcharinfo(0)+" has won the Bombring Event.",bc_all,0x0ceedb; 241 : if ( $event_options&1 ) { [Error]: script error on npc/custom/test.txt line 351 parse_line: expect command, missing function name or calling undeclared function 346 : } 347 : sleep 3000; 348 : .@players = getmapusers("quiz_02"); 349 : if(.@players <= 3 && .start && .@players) { 350 : mapannounce "quiz_02","The event is now over! Winners, enjoy your prizes!",bc_map,0x0ceedb; * 351 : .@size = getmapunits('B'L_PC,"quiz_02",.@players); 352 : .start = false; 353 : for(.@i = 0;.@i < .@size;.@i++) { 354 : attachrid .@players[.@i]; 355 : announce strcharinfo(0)+" has won the Dice Event.",bc_all,0x0ceedb; 356 : if ( $event_options&1 ) { [Error]: script error on npc/custom/test.txt line 497 parse_line: expect command, missing function name or calling undeclared function 492 : stopnpctimer; 493 : .start = false; 494 : pvpoff "06guild_01"; 495 : mapannounce "06guild_01", "LMS: Event ended!",bc_map,0x0ceedb; 496 : sleep 5000; * 497 : .@size = getmapunits('B'L_PC,"06guild_01",.@aid); 498 : if ( .@size == 0 ) { 499 : announce "LMS: No winners.",0; 500 : end; 501 : } 502 : attachrid .@aid; [Error]: script error on npc/custom/test.txt line 597 parse_line: expect command, missing function name or calling undeclared function 592 : if ( .start && strcharinfo(3) == "quiz_01" ) { 593 : warp "prontera",rand(148,163),rand(167,186); 594 : if ( getmapusers("quiz_01") == 1 ) { 595 : stopnpctimer; 596 : killmonsterall "quiz_01"; * 597 : .@size = getmapunits('B'L_PC,"quiz_01",.@aid); 598 : .start = false; 599 : attachrid .@aid; 600 : announce strcharinfo(0)+" has won the Novice v Zombie Event.",bc_all,0x0ceedb; 601 : if ( $event_options&1 ) { 602 : for ( .@j = 0; .@j < $event_item_arr; .@j += 2 ) [Error]: script error on npc/custom/test.txt line 813 parse_line: expect command, missing function name or calling undeclared function 808 : setnpctimer 0; 809 : end; 810 : } 811 : stopnpctimer; 812 : killmonsterall "pvp_n_1-2"; * 813 : .@count = getmapunits('B'L_PC,"pvp_n_1-2",.@aid[0]); 814 : freeloop(true); 815 : for ( .@i = 0; .@i < .@count; .@i++ ) { 816 : attachrid(.@aid[.@i]); 817 : if ( @phunter_points > .most_points ) { 818 : .most_points = @phunter_points; [Info]: Done loading '11041' NPCs: -'3090' Warps -'223' Shops -'7727' Scripts -'4014' Spawn sets -'40697' Mobs Cached -'0' Mobs Not Cached [Error]: script_rid2sd: fatal error ! player not attached! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.