Jump to content

[Version 1.1.3] Battle for Crystal Event


Recommended Posts


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  106
  • Reputation:   3
  • Joined:  01/01/12
  • Last Seen:  

Nah... Hi all!
smile.gif

That's my first release to public...

I released my mini-woe event.

Sorry for my bad English. I'm Russian.

Attachment files is always last version.

Features:
1.) There're 3 Doctors to help you. You can get heal only 1 time per death...
2.) There're 2 Defending Crystals that you need to break to go to the portal [img=http://www.eathena.ws/board/style_emoticons/default/smile.gif]
3.) There're 30 Guardians that will disturb you =)
4.) You can get 250 yggs from Armsman
5.) There's BFC Guild Rating
6.) And last... This is PVP Guild Event with much pvp kiils ... )

How to play this event:
1.) You need guild to play this event.
2.) You won't PVP in Guild on these maps.
3.) You need to destroy 2 Crystalls(red) to open passage to the Blue Crystall.
4.) When you destroy these red Crystalls, you need to run or kill 30 Guardians (Bow, Sword etc guards.)
5.) Then you'll need to destroy blue crystall.
6.) Then event repeating =)
7.) Event has a timer. When timer has 20 mins event stopping, and will be announce that event completed.

How to start event:

Whisper on nick npc:BattleAnnounce
Whisper what - StartBattle

How to install event:

Save script in any txt file.
Upload sql file in your SQL base.
Open .../eathena/npc/custom folder and put txt file in this folder.
Open .../eathena/npc/scripts_custom.conf
And add this line: npc: npc/custom/yourname.txt (YOURNAME.txt CHANGE TO NAME THAT YOU USED TO CREATE TXT FILE  )

SQL File to work Guild Counter

ALTER TABLE `guild` ADD `guildwinscount` INT( 255 ) NOT NULL

Script:

// Battle for Crystal event.	   \\
// Made by Oxxy(FreakyL0L / Freaky) \\
// Idea by Shushei \\
// Version : 1.1.3 \\
// sleep 10000; // 10 Secs \\
// sleep 60000; // 60 Secs == 1 min \\
// sleep 600000; // 600 secs == 10 min \\
// sleep 1200000; // 1200 Secs == 20 mins \\
// 1 == ON || 0 == OFF \\
// END OF COPYRIGHTS \\
// Finded a little bugs. Thanks Melody. \\
// UPD: Added SQL file \\
// UPD: Trying to create Guild Rating for BFC \\

// MAPFLAGS \\
guild_vs4 mapflag pvp on
guild_vs4 mapflag nowarp
guild_vs4 mapflag nowarpto
guild_vs4 mapflag nogo
guild_vs4 mapflag noloot
guild_vs4 mapflag noicewall
pvp_n_1-1 mapflag noloot
pvp_n_1-1 mapflag nowarp
pvp_n_1-1 mapflag nogo
pvp_n_1-1 mapflag nowarpto
pvp_n_1-1 mapflag noicewall
// END OF MAPFLAGS \\

- script BattleMobs -1,{
// GUARDIANS \\
OnGuardians:
monster "pvp_n_1-1",106,93,"Guardian",1830,5;
monster "pvp_n_1-1",107,121,"Guardian",1830,5;
monster "pvp_n_1-1",104,116,"Guardian",1286,5;
monster "pvp_n_1-1",103,108,"Guardian",1286,5;
monster "pvp_n_1-1",108,95,"Guardian",1829,5;
monster "pvp_n_1-1",104,67,"Guardian",1829,5;
// END OF GUARDIANS \\

// CRYSTALS \\
monster "pvp_n_1-1",102,71,"Defending Crystal",1915,1,"Crystals::OnKill";
monster "pvp_n_1-1",109,71,"Defending Crystal",1915,1,"Crystals::OnKill";
// END OF CRYSTALS \\
}

- script Crystals -1,{
OnClose:
setcell "pvp_n_1-1",103,71,108,71,cell_walkable,0;
end;

OnKill:
set $killed,$killed+1;
if($killed==1) { announce "First Defending Crystal was defeated!",0; }
if($killed==2) { announce "Second Defending Crystal was defeated!",0; sleep 1000; announce "Passage to portal has open!",0; setcell "pvp_n_1-1",103,71,108,71,cell_walkable,1; }
end;
}

- script BattleOptions -1,{ // OPTIONS NPC.
OnInit:
disablenpc "Crystal Defender";
disablenpc "Armsman";
disablenpc "Doctor#1-1";
disablenpc "Doctor#1-2";
disablenpc "Doctor#1-3";
disablenpc "BattlePortal";
disablenpc "BattleComplete";
set $BattleStarted,0;
set $killed,0;
set $announce,1; // If set 1 npc Doctor will announce every player that dies
}

- script BattleAnnounce -1,{
OnWhisperGlobal:
if(@whispervar0$=="StartBattle") {
set $BattleStarted,1;
enablenpc "Armsman";
enablenpc "Doctor#1-1";
enablenpc "Doctor#1-2";
enablenpc "Doctor#1-3";
enablenpc "BattlePortal";
announce "[Armsman]: Battle will begin in 10 minutes! We advise all fighters get ready!",0;
//sleep 600000; // NORMAL | 10 MINS TO START.
sleep 1000; // FOR TEST | 1 SEC TO FAST START
set $BattleStart,1;
donpcevent "BattleMobs::OnGuardians";
donpcevent "Crystals::OnClose";
announce "[Armsman]: Battle for Crystal started! Break the Crystal as fast as you can!",0;
monster "guild_vs4",49,49,"Crystal",1914,1,"BattleComplete::OnCrystal";
initnpctimer;
end;

OnTimer1200000:
stopnpctimer;
set $BattleStarted,0;
disablenpc "Armsman";
disablenpc "Doctor#1-1";
disablenpc "Doctor#1-2";
disablenpc "Doctor#1-3";
disablenpc "BattlePortal";
donpcevent "BattleComplete::OnComplete";
enablenpc "Crystal Defender";
end;
}
}

izlude,97,122,6 script Armsman 420,{
if($BattleStarted==0) { mes "[Armsman]"; mes "Don't disturb me..."; close; }

set .@guild, getcharid(2);
if(.@guild<1){ mes "[Armsman]"; mes "You are not in guild."; close;}

mes "[Armsman]";
mes "Hey oh! What would you do?";
switch(select("Take part in Battle","Get equipment","Just a crazy man...","What is 'Battle for Crystal'?")) {

case 1:
if($BattleStart==0) { mes "I still can not teleport you!"; close; }
next;
mes "[Armsman]";
mes "You - brave warrior!";
warp "pvp_n_1-1",96,15;
close;

case 2:
if(vzjal==1) { next; mes "[Armsman]"; mes "You already have your stuff!"; close; }
next;
mes "[Armsman]";
mes "Do you want to arm for the Battle for Crystal?";
if(select("Yeap!","Warriors need it more...") ==2) { next; mes "[Armsman]"; mes "Get out of there!"; percentheal -25,0; close; }
next;
if(checkweight(607,250) == 0) { next; mes "[Armsman]"; mes "You don't have enough weight!"; close; }
mes "[Armsman]";
mes "Here your stuff!";
set vzjal,1;
getitem 607,250;
mes "Now, go and kill somebody!";
close;

case 3:
next;
mes "[Armsman]";
mes "Who crazy? I'm?!";
mes "I'll show you!";
percentheal -100,0;
close;

case 4:
next;
mes "[Armsman]";
mes "Your mission - break the Crystal.";
mes "You must to be in Guild to join this battle.";
mes "Battle longs for 20 minutes. Last guild that break Crystal wins.";
close;
}
}

- script BattleComplete -1,{
OnComplete:
set $BattleStarted,0;
set $BattleStart,0;
set $killed,0;
announce "[Armsman]: Battle for Crystal ended!",0;
enablenpc "Crystal Defender";
sleep 300000;
mapwarp "guild_vs4","SavePoint",0,0;
end;

OnCrystal:
set .@guild, getcharid(2);
query_sql("UPDATE `guild` SET guildwinscount = (guildwinscount+1) WHERE guild_id = " + getcharid(2) +";");
set razruwilpers,razruwilpers+1;
getitem 7227,1;
announce "Character ["+strcharinfo(0)+"] from guild ["+getguildname(.@guild)+"] broke the Crystal!",0;
killmonsterall "guild_vs4";
killmonsterall "pvp_n_1-1";
donpcevent "BattleMobs::OnGuardians";
donpcevent "Crystals::OnClose";
monster "guild_vs4",49,49,"Crystal",1914,1,"BattleComplete::OnCrystal";
announce "New Crystal appeared!",0;
mapwarp "guild_vs4","pvp_n_1-1",96,15;
end;

OnPcLogoutEvent:
OnPcLoginEvent:
attachrid(getcharid(3));
query_sql("UPDATE `guild` SET guildwinscount = guildwinscount WHERE guild_id = "+getcharid(2)+";");
if($BattleStarted==1) { end; }
if($BattleStarted==0) { set vzjal,0; }
detachrid;
}

pvp_n_1-1,102,182,6 script BattlePortal 45,3,3,{
set @rand,rand(1,4);
if(@rand==1) { warp "guild_vs4",49,7; }
if(@rand==2) { warp "guild_vs4",91,49; }
if(@rand==3) { warp "guild_vs4",50,91; }
if(@rand==4) { warp "guild_vs4",8,50; }
}

pvp_n_1-1,87,41,6 script Doctor#1-1 100,{
if(healed==1) { message strcharinfo(0),"You healed!"; end; }
set healed,1;
percentheal 100,100;
end;

OnPcDieEvent:
attachrid(getcharid(3));
getmapxy .@eventmap$,.@x,.@y,0;
if(.@eventmap$ == "pvp_n_1-1" || .@eventmap$ == "guild_vs4"){
set healed,0;
if($announce==1) { announce ""+strcharinfo(0)+" died!",0; }
end;
}
}

pvp_n_1-1,82,153,6 duplicate(Doctor#1-1) Doctor#1-2 111
guild_vs4,55,44,6 duplicate(Doctor#1-1) Doctor#1-3 111

guild_vs4,51,50,6 script Crystal Defender 413,{
query_sql "SELECT guildwinscount FROM guild WHERE guild_id='"+getcharid(2)+"'", .@count$;
mes "[Crystal Defender]";
mes "You broke the Crystal "+razruwilpers+" times...";
mes "You guild broke the Crystal "+.@count$+" times...";
mes "Do you want to go home?";
if(select("Yes","No") ==2) { next; mes "[Crystal Defender]"; mes "..."; close; }
next;
warp "SavePoint",0,0;
close;
}

prontera,152,184,6 script BFC Guild Rating 857,{
mes "[Top 5 Guilds]";
mes "Do you want to see Top 5 guild winners?";
if(select("Yes","No") ==2)
close;

next;
query_sql "SELECT `name`,`guildwinscount` FROM guild ORDER BY `guildwinscount` DESC LIMIT 5", .@gn$, .@counts$;
mes "[Top 5 Guilds]";
for (set .@i,0; .@i<5; set .@i,.@i+1)
{
if (.@gn$[.@i] == "")
mes "None";
else
mes ""+(.@i+1)+". Guild "+.@gn$[.@i]+" broke: "+.@counts$[.@i]+" Crystals";
}
close;

OnInit:
delwaitingroom;
waitingroom "BFC Guild Rating",0;
}[/codeBOX]

[/indent]

[indent=1][font=Comic Sans MS][size=5]Don't forget to post your suggestion and bugs that you'll find ! biggrin.gif[/size][/font]

[color=#9ACD32][u][b]Version 1.1: First fixes. Thanks to Melody. Added file to Attachment[/b][/u][/color]

[color=#9ACD32][u][b]Version 1.1.1: Trying to add BFC guild rating. Some fixes. UPDATED script. BFC Guild Rating not working... So don't try smile.gif Now I'm fixing it.[/b][/u][/color][/indent]

[indent=1][color=#9ACD32][u][b]Version 1.1.2: Added BFC Guild rating! =)[/b][/u][/color]

[color=#9ACD32][u][b]Version 1.1.3: Some fixes[/b][/u][/color][/indent]

bfc.sql

bfc.txt

Edited by Oxxy
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  138
  • Topics Per Day:  0.03
  • Content Count:  835
  • Reputation:   25
  • Joined:  11/22/11
  • Last Seen:  

nice.... i go try it =)

Link to comment
Share on other sites


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

I was wondering some part of your script might configure wrongly or mistake ??

For Example :

if(healed==1) { message strcharinfo(0),"You healed!"; end; }
set healed,1;

Why check for Variable named "healed" for dispay the Message?

isnt that quite useless ? coz..it is still healing your character.....

attachrid(0);

i guess....the attachrid is useless rite here...since you didnt attach it to a valid account ID...

pvp_n_1-1,102,182,6 script BattlePortal 45,3,3,{

erm...if you are using a "Portal" like NPC...

you required a "OnTouch" Label to make use of it.....

otherwise...players still have to click on the NPC to get access to the script parts..

( Sprite #45 perhaps is not Accessable by Clicking if it does Exists )

case 2:

if(vzjal==1) { next; mes "[Armsman]"; mes "You already have your stuff!"; close; }

next;

mes "[Armsman]";

mes "Do you want to arm for the Battle for Crystal?";

if(select("Yeap!","Warriors need it more...") ==2) { next; mes "[Armsman]"; mes "Get out of there!"; percentheal -25,0; close; }

next;

if(checkweight(607,250) == 0) { next; mes "[Armsman]"; mes "You don't have enough weight!"; close; }

mes "[Armsman]";

mes "Here your stuff!";

set vzjal,1;

getitem 607,250;

mes "Now, go and kill somebody!";

close;

Perhaps there cant receive the Prize/ Items next time... ? coz you didnt Remove the Variable for Future Item gaining...

i only found 2 of the variable access here..

Anyway...just some personal comment on these..hope it did help to improve your script..

and..if anything i was miss / wrong...please let me know.. >.<

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  106
  • Reputation:   3
  • Joined:  01/01/12
  • Last Seen:  

Why check for Variable named "[b]healed[/b]" for dispay the Message?
isnt that quite useless ? coz..it is still healing your character.....

It won't heal you because above the message there's END;

attachrid(0);

Sry, i didn't updated the script; Now it's correct.

pvp_n_1-1,102,182,6 script BattlePortal 45,3,3,{

No, you not need to do OnTouch... I tested the script it working perfectly.

Perhaps there cant receive the Prize/ Items next time... ? coz you didnt Remove the Variable for Future Item gaining...
i only found 2 of the variable access here..

Yeah, thanks. I'll fix that.

Edit:

Perhaps there cant receive the Prize/ Items next time... ? coz you didnt Remove the Variable for Future Item gaining...
i only found 2 of the variable access here..

Fixed; When you'll Logout or Login it will check, if variable $BattleStarted==0 it will set variable vzjal,0; if $BattleStarted==1 then end;

Edited by Oxxy
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  592
  • Reputation:   31
  • Joined:  11/14/11
  • Last Seen:  

i tried your script, but i can't understand it, when we play the script all the player w/ guild can join, no limit like pvp, but when someone try to destroy the crsystalls , then when the crystall is been destroyed by someone there no, or nothing happens?.. what to do next?.. and if you got killed you will go back to the save points and can play again..

Edited by Takumirai
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  106
  • Reputation:   3
  • Joined:  01/01/12
  • Last Seen:  

...Sry my english so bad, maybe you won't understand me :P But...

1.) You need guild to play this event.

2.) You won't PVP in Guild on these maps.

3.) You need to destroy 2 Crystalls(red) to open passage to the Blue Crystall.

4.) When you destroy these red Crystalls, you need to run or kill 30 Guardians (Bow, Sword etc guards.)

5.) Then you'll need to destroy blue crystall.

6.) Then event repeating =)

7.) Event has a timer. When timer has 20 mins event stopping, and will be announce that event completed.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  592
  • Reputation:   31
  • Joined:  11/14/11
  • Last Seen:  

I see, thanks for the reply..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  138
  • Topics Per Day:  0.03
  • Content Count:  835
  • Reputation:   25
  • Joined:  11/22/11
  • Last Seen:  

how to set this Event to weekly event? and add at where? like every sunday around 9pm?

Link to comment
Share on other sites


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

how to set this Event to weekly event? and add at where? like every sunday around 9pm?

try this..

find this

set $BattleStarted,1;

change to this

OnSun0900:
set $BattleStarted,1;

Not sure is this the correct arrangement.. ( never used this type before )

Other Option...

OnClock<hour><minute>:

OnMinute<minute>:

OnHour<hour>:

On<weekday><hour><minute>:

OnDay<month><day>:

This will execute when the server clock hits the specified date or time. Hours 
and minutes are given in military time. ('0105' will mean 01:05 AM). Weekdays 
are Sun,Mon,Tue,Wed,Thu,Fri,Sat. Months are 01 to 12, days are 01 to 31. 
Remember the zero. 

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  138
  • Topics Per Day:  0.03
  • Content Count:  835
  • Reputation:   25
  • Joined:  11/22/11
  • Last Seen:  

Thx... i go try it tonight =). i dun have party if this required party that's have to wait until server finish make.

Edited by manabeast
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  138
  • Topics Per Day:  0.03
  • Content Count:  835
  • Reputation:   25
  • Joined:  11/22/11
  • Last Seen:  

help, how to start the event?

Whisper on nick npc:BattleAnnounce

Whisper what - StartBattle

BattleAnnounce : StartBattle : There is no such character name or the user is offline.

=.=? how actually work one? pm right?

Error2. inside script set Pvp and GvG together on this map. system tell me can set one only.

post-472-0-33870900-1326120760_thumb.png

Edited by manabeast
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  94
  • Topics Per Day:  0.02
  • Content Count:  2192
  • Reputation:   252
  • Joined:  11/11/11
  • Last Seen:  

Error2. inside script set Pvp and GvG together on this map. system tell me can set one only.

Remove the MAP from the PvP and GvG Mapflags folder.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  138
  • Topics Per Day:  0.03
  • Content Count:  835
  • Reputation:   25
  • Joined:  11/22/11
  • Last Seen:  

inside conf folder/mapflag?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  94
  • Topics Per Day:  0.02
  • Content Count:  2192
  • Reputation:   252
  • Joined:  11/11/11
  • Last Seen:  

inside conf folder/mapflag?

Yes.

Suggestion: You should make the script maybe check / allow registrations from 2 guilds and checking to see if they have 5 players.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  138
  • Topics Per Day:  0.03
  • Content Count:  835
  • Reputation:   25
  • Joined:  11/22/11
  • Last Seen:  

oh. ok thx. sorry i dunno anything about script /swt. i just know change location and skin. my only problem now is i cannot start this event? :) i pm There is no such character name or the user is offline.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  94
  • Topics Per Day:  0.02
  • Content Count:  2192
  • Reputation:   252
  • Joined:  11/11/11
  • Last Seen:  

oh. ok thx. sorry i dunno anything about script /swt. i just know change location and skin. my only problem now is i cannot start this event? :) i pm There is no such character name or the user is offline.

OnWhisperGlobal:
if(@whispervar0$=="StartBattle") {

Whisper, NPC:Armsman and in your text box, type in StartBattle.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  138
  • Topics Per Day:  0.03
  • Content Count:  835
  • Reputation:   25
  • Joined:  11/22/11
  • Last Seen:  


Suggestion: You should make the script maybe check / allow registrations from 2 guilds and checking to see if they have 5 players.

thx thx. the guide was wrong. =) like ur suggestion if you have a copy of that can share me? only if you free :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  138
  • Topics Per Day:  0.03
  • Content Count:  835
  • Reputation:   25
  • Joined:  11/22/11
  • Last Seen:  

hi, i already start and the npc annouce get ready in 10 minit. where is the warp to get to that map? and where ppl need standby at where? =.=" player unlike gm can use @warp

Edited by manabeast
Link to comment
Share on other sites

  • 3 weeks later...

  • Group:  Members
  • Topic Count:  138
  • Topics Per Day:  0.03
  • Content Count:  835
  • Reputation:   25
  • Joined:  11/22/11
  • Last Seen:  

i warp to guild_vs4 break blue nothing happen =- =" anyone can tell me how this work ?first which map first then which map? player need go where standby? warp portal at where?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  138
  • Topics Per Day:  0.03
  • Content Count:  835
  • Reputation:   25
  • Joined:  11/22/11
  • Last Seen:  

hmmm...... bump?

are this need make warper myself? if yes mind tell me which are the first map? pvp_n_1-1 ? i just need make myself warper to that map and pm npc start can play already?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  48
  • Reputation:   0
  • Joined:  11/21/11
  • Last Seen:  

Hi, got a bug on this. after breaking the first two crystal. I cannot still walk through the bridge to break the third crystal. How will we fix it?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  138
  • Topics Per Day:  0.03
  • Content Count:  835
  • Reputation:   25
  • Joined:  11/22/11
  • Last Seen:  

mind tell me how you run this event? after pm the event start where you all go? i already start event and annoouce but where are the warper? what map? =="

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