Jump to content
  • 0

WoE Def Points System


Question

Posted

Is there a script that makes daily WoE by defending and earning points? For example, a whole guild defends and every 5 min(can be adjusted) they receive a point. Then the guild who has the most points wins the agit or something more or less.

 

Please help..Thank you in advance! 

9 answers to this question

Recommended Posts

  • 1
Posted

load this SQL script

ALTER TABLE `guild` ADD COLUMN `woe_def` INT(11) NOT NULL DEFAULT '0' AFTER `skill_point`;

go to this npc file

npc/guild/agit_main.txt

Find this

	if (!mobcount(strnpcinfo(2),"Agit#"+strnpcinfo(2)+"::OnAgitBreak")) {
		monster strnpcinfo(2),.@emproom[0],.@emproom[1],"Emperium",1288,1,"Agit#"+strnpcinfo(2)+"::OnAgitBreak";
	}
	end;

change to this

	if (!mobcount(strnpcinfo(2),"Agit#"+strnpcinfo(2)+"::OnAgitBreak")) {
		monster strnpcinfo(2),.@emproom[0],.@emproom[1],"Emperium",1288,1,"Agit#"+strnpcinfo(2)+"::OnAgitBreak";
		initnpctimer;
	}
	end;
	
OnTimer300000: // 5 minutes	
	.@map$ = strnpcinfo( 2 );
	.@guild_id = getcastledata( .@map$,1 );
	if( .@guild_id ){
		query_sql( "UPDATE `guild` SET `woe_def` = `woe_def` + 1 WHERE `guild_id` = "+.@guild_id );
		mapannounce .@map$,"Castle Owner gained 1 points for defending 5 minutes without fail.",bc_all;
	}
	setnpctimer 0;
	end;

then, find this

OnAgitEnd:
	if (strnpcinfo(0) == "Gld_Agit_Manager") end;
	GvgOff strnpcinfo(2);
	// If the castle has no owner at the end of WoE, do not kill Emperium.
	if (GetCastleData(strnpcinfo(2),1)) {
		KillMonster strnpcinfo(2),"Agit#"+strnpcinfo(2)+"::OnAgitBreak";
	}
	end;

and replace with this

OnAgitEnd:
	if (strnpcinfo(0) == "Gld_Agit_Manager") end;
	GvgOff strnpcinfo(2);
	// If the castle has no owner at the end of WoE, do not kill Emperium.
	if (GetCastleData(strnpcinfo(2),1)) {
		KillMonster strnpcinfo(2),"Agit#"+strnpcinfo(2)+"::OnAgitBreak";
	}
	
	query_sql( "SELECT `guild_id`,`woe_def` FROM `guild` ORDER BY `woe_def` DESC LIMIT 1",.@gid,.@point );
	announce "GUILD '"+getguildname( .@gid )+"' WON WITH "+.@point+" POINT",bc_all;
	setcastledata strnpcinfo(2),1,.@gid;
	end;

didnt test...

  • Upvote 1
  • -1
Posted

Can I bump this? No one has viewed it :( Can someone help me with this please or let me know if this is even possible or if there's something like this out there. Thank you again in advance!

Posted

sorry i have read this but i don't know how to

 

however, seems like there is a bug on the view count of the forum, i'm going to report it now :)

 

huh back to the question, all i can think is something like this:

-	script	WoEdEfPoints	-1,{
OnAgitStart:

//a script that checks the guild that owns the castle, dunno this part

OnMinute15: //for examples, it starts to check every 15 mnutes
set woe_def_point, woe_def_point + 1;// +1 woe defense point every 15 minutes
OnMinute30:
set woe_def_point, woe_def_point + 1;// +1 woe defense point every 15 minutes
OnMinute45:
set woe_def_point, woe_def_point + 1;// +1 woe defense point every 15 minutes
OnMinute00:
set woe_def_point, woe_def_point + 1;// +1 woe defense point every 15 minutes

//a script that checks if the castle or stone has been taken, then it restart the count to the new guild owner, sorry dunno this part too x_x (already searched but i don't get it at all x_x

end;
}

it's just an idea, sry for not being too helpful x_x

Posted

thanjs hehhe ..well hehe let's see o:

 

i also forgot to add something at the end

//script that checks the total points for the guilds during the agit start

OnAgitEnd:
//script that checkes the last castle played with its guild masters & members
//script that compare the points and check which one has more
//script that gives the prize to the winners


just ideas @_@

  • Upvote 1

Join the conversation

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

Guest
Answer this question...

×   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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...