Jump to content
  • 0

Why maze event give points instead of item?


donkeyg

Question


  • Group:  Members
  • Topic Count:  344
  • Topics Per Day:  0.08
  • Content Count:  1060
  • Reputation:   1
  • Joined:  02/13/12
  • Last Seen:  

How to make it 100% give 1 gold coin after won the game..

// ===== eAthena Script =======================================
// = Maze Event
// ===== By: ==================================================
// = Cruxiaer
// ===== Current Version: =====================================
// = 1.00
// ===== Compatible With: =====================================
// = eAthena 1.x
// ===== Description: =========================================
// = Maze Game where players have to walk into portals
// = till they win.
// ===== How to use: ==========================================
// $@prize = amount of Event Points to be won
// @chance = the difficulty of winning, higher is harder
// Edit OnClock events to change when will the Event start
// ===== Changelog: =========================================== 
// 1.00 - First release
// 1.01 - Fixed 500EP bonus and added active upon PM func
//===== Credits: =============================================
//= Euph for original Maze Game script
//============================================================


prontera,156,170,0 script mazeevent 45,2,2,{


if ( $mazeinit == 0 ) {
disablenpc "mazeevent";
end;
}


// Check for equipment that would give an advantage.
if (  countitem(1363) ||
countitem(1372) ||
countitem(1373) ||
countitem(2410) ||
countitem(2515) ||
countitem(4131) ||
countitem(4210) ||
countitem(5150) ||
countitem(5203) ||
countitem(5273) ||
countitem(5274) ||
countitem(5275) ) {
mes "[^FF0000Maze^000000]";
mes "Please store any equipment that increases your movement speed.";
close;
end;
}


// Check for any consumable items that would give an advantage.
if ( countitem(662) ||
countitem(12016) ||
countitem(12028) ||
countitem(12262) ) {

mes "[^FF0000Maze^000000]";
mes "Please store any consumables that increases your movement speed.";
close;
end;
}


// Remove Peco / Cart
atcommand strcharinfo(0)+":@option 0 0 0";




// Remove Any Speed Buffs
sc_end SC_SPEEDUP0;
sc_end SC_SPEEDUP1;
sc_end SC_INCREASEAGI;
sc_end SC_WINDWALK;
sc_end SC_CARTBOOST;
sc_end SC_CLOAKING;
sc_end SC_BERSERK;
sc_end SC_RUN;
sc_end SC_AVOID;


// Grant 5 Minute Walking Speed Increase
sc_start SC_INCREASEAGI,600000,1;




// Warp to Event
warp "force_1-3", 19, 189;
set #EVENTPOINTS, #EVENTPOINTS+500;
dispbottom "500 Event Points are awarded for joining this Event.";
}




- script Maze#announcer -1,{


OnInit:
        // Unload NPCs except this one at server start.
disablenpc "mazeevent";
    disablenpc "mz_portal#1";
    disablenpc "mz_portal#2";
    disablenpc "mz_portal#3";
    disablenpc "mz_portal#4";
    disablenpc "mz_portal#5";
    disablenpc "mz_portal#6";
disablenpc "mz_portal#7";
        disablenpc "mz_portal#8";
        disablenpc "mz_portal#9";
        disablenpc "mz_portal#10";
        disablenpc "mz_portal#11";
        disablenpc "mz_portal#12";
        disablenpc "mz_portal#13";
        disablenpc "mz_portal#14";
        disablenpc "mz_portal#15";
        disablenpc "mz_portal#16";
        disablenpc "mz_portal#17";
        disablenpc "mz_portal#18";
        disablenpc "mz_portal#19";
        disablenpc "mz_portal#20";
        disablenpc "mz_portal#21";
        disablenpc "mz_portal#22";
        disablenpc "mz_portal#23";
        disablenpc "mz_portal#24";
        disablenpc "Maze#asdf";
        end;


OnClock0100:
//OnClock0200:
OnClock0300:
//OnClock0400:
OnClock0500:
//OnClock0600:
OnClock0700:
//OnClock0800:
OnClock0900:
//OnClock1000:
OnClock1100:
//OnClock1200:
OnClock1300:
//OnClock1400:
OnClock1500:
//OnClock1600:
OnClock1700:
//OnClock1800:
OnClock1900:
//OnClock2000:
OnClock2100:
//OnClock2200:
OnClock2300:
//OnClock0000:


        announce "Maze: A maze event will begin in 2 minutes in Prontera.",0,0x99FFCC;
        sleep2 90000;
        announce "Maze: Enter the Warp in Prontera to join the Maze event.",0,0x99FFCC;


        // Clear up the map.
        areawarp "force_1-3",104,18,189,10,"prontera",159,116;


        // Load NPCs + hide the Maze guy
set $mazeinit, 1;
        enablenpc "mazeevent";
        enablenpc "Maze#asdf";
        hideonnpc "Maze#asdf";
        initnpctimer;
        end;


OnTimer30000:
        mapannounce "prontera","Maze: Last 30 seconds.",0,0x99FFCC;
        sleep2 5000;
        mapannounce "prontera","Maze: If you want to join please enter the Warp Portal.",0,0x99FFCC;
        end;


OnTimer50000:
        mapannounce "prontera","Maze: Last 10 seconds.",0,0x99FFCC;
        end;


OnTimer60000:
        mapannounce "prontera","Maze: Time's up.",0,0x99FFCC;
        end;


OnTimer61000:
        disablenpc "mazeevent";
        donpcevent "Maze#asdf::OnEnable";
        stopnpctimer;
        end;
}


force_1-3,100,187,4 script Maze#asdf 702,{
set $@prize, rand(671,675);
mes "[Maze Manager]";
mes "Here is your prize:^336699";
mes $@prize+"^000000 Event Points!";
// set #EVENTPOINTS, #EVENTPOINTS+$@prize;
logmes "EP won from Maze Event :"+$@prize;
goto L_EndIt;


L_EndIt:
next;
        warp "prontera",155,175;
        // Hide the NPC
        disablenpc "Maze#asdf";
        end;


OnEnable:
        if(getmapusers("force_1-3")<2) goto L_NotEnough;
        mapannounce "force_1-3","Maze: We are about to start the maze... here's how to play.",0,0x99FFCC;
        sleep2 4000;
        mapannounce "force_1-3","Maze: Everybody must keep running through portals.",0,0x99FFCC;
        sleep2 4000;
        mapannounce "force_1-3","Maze: Each portal will warp you to a random room.",0,0x99FFCC;
        sleep2 4000;
        mapannounce "force_1-3","Maze: With some luck, somebody will find the finish!",0,0x99FFCC;
        sleep2 4000;
        mapannounce "force_1-3","Maze: And then, they will win the event.",0,0x99FFCC;
        sleep2 4000;
        mapannounce "force_1-3","Maze: Is everybody ready?! We're going to start!",0,0x99FFCC;
        sleep2 4000;
        mapannounce "force_1-3","Maze: 3....",0,0x99FFCC;
        sleep2 2000;
        mapannounce "force_1-3","Maze: 2...",0,0x99FFCC;
        sleep2 2000;
        mapannounce "force_1-3","Maze: 1..",0,0x99FFCC;
        sleep2 2000;
        mapannounce "force_1-3","Maze: GO!",0,0x99FFCC;
enablenpc "mz_portal#1";
enablenpc "mz_portal#2";
enablenpc "mz_portal#3";
enablenpc "mz_portal#4";
enablenpc "mz_portal#5";
enablenpc "mz_portal#6";
enablenpc "mz_portal#7";
enablenpc "mz_portal#8";
enablenpc "mz_portal#9";
enablenpc "mz_portal#10";
enablenpc "mz_portal#11";
enablenpc "mz_portal#12";
enablenpc "mz_portal#13";
enablenpc "mz_portal#14";
enablenpc "mz_portal#15";
enablenpc "mz_portal#16";
enablenpc "mz_portal#17";
enablenpc "mz_portal#18";
enablenpc "mz_portal#19";
enablenpc "mz_portal#20";
enablenpc "mz_portal#21";
enablenpc "mz_portal#22";
enablenpc "mz_portal#23";
enablenpc "mz_portal#24";
        end;


L_NotEnough:
mapannounce "force_1-3","Maze: Not enough players. Cancelling this round.",0,0x99FFCC;
areawarp "force_1-3",10,189,189,10,"prontera",143,171;
disablenpc "mz_portal#1";
disablenpc "mz_portal#2";
disablenpc "mz_portal#3";
disablenpc "mz_portal#4";
disablenpc "mz_portal#5";
disablenpc "mz_portal#6";
disablenpc "mz_portal#7";
disablenpc "mz_portal#8";
disablenpc "mz_portal#9";
disablenpc "mz_portal#10";
disablenpc "mz_portal#11";
disablenpc "mz_portal#12";
disablenpc "mz_portal#13";
disablenpc "mz_portal#14";
disablenpc "mz_portal#15";
disablenpc "mz_portal#16";
disablenpc "mz_portal#17";
disablenpc "mz_portal#18";
disablenpc "mz_portal#19";
disablenpc "mz_portal#20";
disablenpc "mz_portal#21";
disablenpc "mz_portal#22";
disablenpc "mz_portal#23";
disablenpc "mz_portal#24";
end;


}


- script mazer -1,{
OnWhisperGlobal:
if (getgmlevel()==99) {
announce "Maze: A maze event will begin in 2 minutes in Prontera.",0,0x99FFCC;
        sleep2 90000;
        announce "Maze: Enter the Warp in Prontera to join the Maze event.",0,0x99FFCC;


        // Clear up the map.
        areawarp "force_1-3",104,18,189,10,"prontera",159,116;


        // Load NPCs + hide the Maze guy
set $mazeinit, 1;
        enablenpc "mazeevent";
        enablenpc "Maze#asdf";
        hideonnpc "Maze#asdf";
        initnpctimer;
        end;


OnTimer30000:
        mapannounce "prontera","Maze: Last 30 seconds.",0,0x99FFCC;
        sleep2 5000;
        mapannounce "prontera","Maze: If you want to join please enter the Warp Portal.",0,0x99FFCC;
        end;


OnTimer50000:
        mapannounce "prontera","Maze: Last 10 seconds.",0,0x99FFCC;
        end;


OnTimer60000:
        mapannounce "prontera","Maze: Time's up.",0,0x99FFCC;
        end;


OnTimer61000:
        disablenpc "mazeevent";
        donpcevent "Maze#asdf::OnEnable";
        stopnpctimer;
        end;
} else {
dispbottom "You are not authorised for this function.";


}


 

Link to comment
Share on other sites

12 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1125
  • Reputation:   236
  • Joined:  07/30/12
  • Last Seen:  


getitem 671,1;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  55
  • Reputation:   2
  • Joined:  12/29/11
  • Last Seen:  


set $@prize,671;

set $@amount,10;

mes "[Maze Manager]";

getitem $@prize, $@amount;

Edited by SilverMayCry
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  344
  • Topics Per Day:  0.08
  • Content Count:  1060
  • Reputation:   1
  • Joined:  02/13/12
  • Last Seen:  

set $@prize,671;
set $@amount,10;
mes "[Maze Manager]";

getitem $@prize, $@amount;

 

 

how do i set giving out 2 prizes? item 671 and 675

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  55
  • Reputation:   2
  • Joined:  12/29/11
  • Last Seen:  


setarray $@prize[0],671,675;

set $@amount,getarraysize($@prize);

getitem($@prize[rand($@amount)],10);

end;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  344
  • Topics Per Day:  0.08
  • Content Count:  1060
  • Reputation:   1
  • Joined:  02/13/12
  • Last Seen:  

setarray $@prize[0],671,675;
set $@amount,getarraysize($@prize);
getitem($@prize[rand($@amount)],10);
end;

like this bro?

 

setarray $@prize[0],671,675;
set $@amount,getarraysize($@prize);
getitem($@prize[rand($@amount)],2);
end;
mes "[Maze Manager]";

i wan to make it give 2 each.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  344
  • Topics Per Day:  0.08
  • Content Count:  1060
  • Reputation:   1
  • Joined:  02/13/12
  • Last Seen:  

yes =)

 

 

lol the npc is bugged bro, it gives unlimited Coins =.= i can just keep clicking the npc and the npc keep giving me gold/silver coins... please help

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  55
  • Reputation:   2
  • Joined:  12/29/11
  • Last Seen:  

post the script and the error if there is any...

did you try doin it like this?

force_1-3,100,187,4 script Maze#asdf 702,{
setarray $@prize[0],671,675;
set $@amount,getarraysize($@prize);
getitem($@prize[rand($@amount)],2);
logmes "EP won from Maze Event :"+$@prize;
goto L_EndIt;


L_EndIt:
next;
        warp "prontera",155,175;
        // Hide the NPC
        disablenpc "Maze#asdf";
        end;
}
Edited by SilverMayCry
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  344
  • Topics Per Day:  0.08
  • Content Count:  1060
  • Reputation:   1
  • Joined:  02/13/12
  • Last Seen:  

 

post the script and the error if there is any...

did you try doin it like this?

force_1-3,100,187,4 script Maze#asdf 702,{
setarray $@prize[0],671,675;
set $@amount,getarraysize($@prize);
getitem($@prize[rand($@amount)],2);
logmes "EP won from Maze Event :"+$@prize;
goto L_EndIt;


L_EndIt:
next;
        warp "prontera",155,175;
        // Hide the NPC
        disablenpc "Maze#asdf";
        end;
}
force_1-3,100,187,4 script Maze#asdf 702,{
setarray $@prize[0],671,675;
set $@amount,getarraysize($@prize);
getitem($@prize[rand($@amount)],2);
end;
mes "[Maze Manager]";
mes "Here is your prize:^336699";
// mes $@prize+"^000000 Event Points!";
// set #EVENTPOINTS, #EVENTPOINTS+$@prize;
logmes "EP won from Maze Event :"+$@prize;
goto L_EndIt;


L_EndIt:
next;
        warp "prontera",155,175;
        // Hide the NPC
        disablenpc "Maze#asdf";
        end;

this is my script bro, i don think there's any difference. only the npc gives unlimited coins... doesnt have any errors.

Edited by donkeyg
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  55
  • Reputation:   2
  • Joined:  12/29/11
  • Last Seen:  

on this part add

mes "[Maze Manager]";
mes "Here is your prize:^336699";
// mes $@prize+"^000000 Event Points!";
// set #EVENTPOINTS, #EVENTPOINTS+$@prize;
logmes "EP won from Maze Event :"+$@prize;
set .@claimed,1;

then on the first part after

if ( $mazeinit == 0 ) {
disablenpc "mazeevent";
end;
}

if ( .@claimed == 1 ) {
mes "Sorry you already claimed the reward";
end;
}

there...

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  344
  • Topics Per Day:  0.08
  • Content Count:  1060
  • Reputation:   1
  • Joined:  02/13/12
  • Last Seen:  

on this part add

mes "[Maze Manager]";
mes "Here is your prize:^336699";
// mes $@prize+"^000000 Event Points!";
// set #EVENTPOINTS, #EVENTPOINTS+$@prize;
logmes "EP won from Maze Event :"+$@prize;
set .@claimed,1;

then on the first part after

if ( $mazeinit == 0 ) {
disablenpc "mazeevent";
end;
}

if ( .@claimed == 1 ) {
mes "Sorry you already claimed the reward";
end;
}

there...

 

 

error bro...=.=

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  55
  • Reputation:   2
  • Joined:  12/29/11
  • Last Seen:  

post the error please, i wouldn't know how to fix it if i don't know that error =D

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