Jump to content
  • 0

WoE Def Points System


Kurihara

Question


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  17
  • Reputation:   0
  • Joined:  06/19/13
  • Last Seen:  

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! 

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 1

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  18
  • Reputation:   3
  • Joined:  11/30/16
  • Last Seen:  

I also try this one but same issue not working.

Link to comment
Share on other sites

  • -1

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  17
  • Reputation:   0
  • Joined:  06/19/13
  • Last Seen:  

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!

Link to comment
Share on other sites

  • -1

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  30
  • Reputation:   0
  • Joined:  03/05/19
  • Last Seen:  

pump this. anyone has the script done?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  17
  • Reputation:   0
  • Joined:  06/19/13
  • Last Seen:  

Oh no Kido don't apologize. I thank you very much for your effort :) Maybe someone can just add on to your idea haha :) But really thank you so much for this.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  295
  • Reputation:   6
  • Joined:  10/14/12
  • Last Seen:  

Tried and tested Master Emistry, no errors but did not work. Nothing happend and no announcements either. When you do agitend however, it says:

 

GUILD ''null'' WON WITH 0 POINT.

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

×
×
  • Create New...