Jump to content
Mabuhay

Utility: Emperium Breaker Ladder + Points + Shop

Recommended Posts

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 += [email protected];

// 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 += [email protected];

 

 


  • Submitter
  • Submitted
    01/18/2020
  • Category
  • Video
  • Content Author
    Mabuhay

 

  • Upvote 1
  • MVP 1
  • Like 1
Link to comment
Share on other sites

Hello got error in your script sir:      parse_line: expect command, missing function name or calling undeclared function
   231 :        }
   232 :        [email protected] = getmapusers("quiz_02");
   233 :        if ( [email protected] )
   234 :                announce "Bombring: No one survived the bombrings.",bc_all,0x0ceedb;
   235 :        else if ( [email protected] ) {
*  236 :                [email protected] = getmapunits('B'L_PC,"quiz_02",[email protected]);
   237 :                if ( [email protected] > 1 ) announce "A lot players has won the Bombring Event.",bc_all,0x0ceedb;
   238 :                for ( [email protected] = 0; [email protected] < getarraysize([email protected]); [email protected]++) {
   239 :                        attachrid [email protected][[email protected]];
   240 :                        if ( [email protected] == 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 :                [email protected] = getmapusers("quiz_02");
   349 :                if([email protected] <= 3 && .start && [email protected]) {
   350 :                        mapannounce "quiz_02","The event is now over! Winners, enjoy your prizes!",bc_map,0x0ceedb;
*  351 :                        [email protected] = getmapunits('B'L_PC,"quiz_02",[email protected]);
   352 :                        .start = false;
   353 :                        for([email protected] = 0;[email protected] < [email protected];[email protected]++) {
   354 :                                attachrid [email protected][[email protected]];
   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 :        [email protected] = getmapunits('B'L_PC,"06guild_01",[email protected]);
   498 :        if ( [email protected] == 0 ) {
   499 :                announce "LMS: No winners.",0;
   500 :                end;
   501 :        }
   502 :        attachrid [email protected];
[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 :                        [email protected] = getmapunits('B'L_PC,"quiz_01",[email protected]);
   598 :                        .start = false;
   599 :                        attachrid [email protected];
   600 :                        announce strcharinfo(0)+" has won the Novice v Zombie Event.",bc_all,0x0ceedb;
   601 :                        if ( $event_options&1 ) {
   602 :                                for ( [email protected] = 0; [email protected] < $event_item_arr; [email protected] += 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 :        [email protected] = getmapunits('B'L_PC,"pvp_n_1-2",[email protected][0]);
   814 :        freeloop(true);
   815 :        for ( [email protected] = 0; [email protected] < [email protected]; [email protected]++ ) {
   816 :                attachrid([email protected][[email protected]]);
   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!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.