Jump to content

Question

Posted

Hello, community!

 

I'm working on a DS script, where it works 100%, but I'd like it in the end when the Chests appear, the play can break only once, I do not know the function I'm sure is using, I'd like a little help.

I would like at least to change the form of awards, because Summar only 10 Chests, if you have more than 10 people, the others did not take the prizes, you could change the code and leave it to the number of people N so that everyone can get the prize ?

This part is treasure

OnDevil5:
    .round = 5;
    .mob = 10;
    monster "ordeal_1-1",231,250,"Treasure Chest",1324,1,strnpcinfo(0)+"::OnTreasureDead";
    monster "ordeal_1-1",234,247,"Treasure Chest",1328,1,strnpcinfo(0)+"::OnTreasureDead";
    monster "ordeal_1-1",237,244,"Treasure Chest",1332,1,strnpcinfo(0)+"::OnTreasureDead";
    monster "ordeal_1-1",240,241,"Treasure Chest",1336,1,strnpcinfo(0)+"::OnTreasureDead";
    monster "ordeal_1-1",243,238,"Treasure Chest",1340,1,strnpcinfo(0)+"::OnTreasureDead";
    monster "ordeal_1-1",246,235,"Treasure Chest",1344,1,strnpcinfo(0)+"::OnTreasureDead";
    monster "ordeal_1-1",249,232,"Treasure Chest",1348,1,strnpcinfo(0)+"::OnTreasureDead";
    monster "ordeal_1-1",252,229,"Treasure Chest",1352,1,strnpcinfo(0)+"::OnTreasureDead";
    monster "ordeal_1-1",249,241,"Treasure Chest",1356,1,strnpcinfo(0)+"::OnTreasureDead";
    monster "ordeal_1-1",240,249,"Treasure Chest",1360,1,strnpcinfo(0)+"::OnTreasureDead";
    end;

OnTreasureDead:
    .mob--;
    announce "Devil Square : "+ strcharinfo(0) +" abriu o Tresouro Premiado em Devil Square.", bc_all;
    if ( .mob <= 0 )
        goto OnStopEvent;
    end;

  • Love 1

4 answers to this question

Recommended Posts

  • 0
Posted

How do I do for you doing it that way? because I'm using Rathena's own script, the only thing I did was translate into Portuguese, could you help me make that change?

 

You can close the post, I already had the solution
On 5/22/2018 at 5:36 PM, AnnieRuru said:

que 'como o original Devil Square funciona da MU on-line
http://muonline.webzen.com/guides/25/116/game-contents/devil-square

se você quiser, os jogadores só podem acertar 1 baú e não podem atacar o resto.

uma solução melhor que dê recompensas por jogador,
então faça como o estilo King of Emperium Hill, um npc aparece para Exit que dá recompensa ao clicar nele

 

Many thanks for helping.

  • 0
Posted (edited)

eh ... sorry about left this topic out

there is also another way to mine the treasure chest like I did in treasure chest pvp event
(sry the script is too old and in the middle of fixing it)

-	script	main	FAKE_NPC,{
OnInit:
	bindatcmd "event", strnpcinfo(0)+"::Onaaa", 99,99;
	for ( .@i = 0; .@i < 20; ++.@i )
		disablenpc "Treasure Chest#"+ .@i +"_ev";
	end;
Onaaa:
	if ( .start == false && ( compare( .@atcmd_parameters$, "on" ) || compare( .@atcmd_parameters$, "start" ) ) )
		goto OnStart;
	if ( .start == true && ( compare( .@atcmd_parameters$, "off" ) || compare( .@atcmd_parameters$, "end" ) ) )
		goto OnEnd;
	end;
OnStart:
	.start = true;
	++.event_id;
	for ( .@i = 0; .@i < 20; ++.@i ) {
		while ( checkcell( "prontera", .@x = rand(148,179), .@y = rand(163,191), cell_chknopass ) );
		movenpc "Treasure Chest#"+ .@i +"_ev", .@x, .@y;
		enablenpc "Treasure Chest#"+ .@i +"_ev";
		.deny[.@i] = 0;
	}
	end;
OnEnd:
	.start = false;
	for ( .@i = 0; .@i < 20; ++.@i )
		disablenpc "Treasure Chest#"+ .@i +"_ev";
	end;
OnPCLogoutEvent:
	if ( @treasu_ev_ )
		.deny[ @treasu_ev_ ] = 0;
	end;
}

-	script	treasu_ev	FAKE_NPC,{
	.@id = strnpcinfo(2);
	if ( @treasu_ev_event_id == getvariableofnpc( .event_id, "main" ) ) {
		showscript "[Treasure Chest] You have digged treasure chest in this round.", getcharid(3), SELF;
		end;
	}
	if ( getvariableofnpc( .deny[.@id], "main" ) ) {
		showscript "[Treasure Chest] Somebody else is digging this treasure chest.", getcharid(3), SELF;
		end;
	}
	set getvariableofnpc( .deny[.@id], "main" ), getcharid(3);
	@treasu_ev_ = .@id;
	doevent "main::OnPCLogoutEvent";
	progressbar "", 5; // time to capture, 5 seconds
	getitem 501, 1;
	@treasu_ev_event_id = getvariableofnpc( .event_id, "main" );
	disablenpc strnpcinfo(0);
	movenpc "Treasure Chest#"+ .@i +"_ev", 0, 0;
	end;
}

prontera,0,0,0	duplicate(treasu_ev)	Treasure Chest#0_ev	1324
prontera,0,0,0	duplicate(treasu_ev)	Treasure Chest#1_ev	1324
prontera,0,0,0	duplicate(treasu_ev)	Treasure Chest#2_ev	1324
prontera,0,0,0	duplicate(treasu_ev)	Treasure Chest#3_ev	1324
prontera,0,0,0	duplicate(treasu_ev)	Treasure Chest#4_ev	1324
prontera,0,0,0	duplicate(treasu_ev)	Treasure Chest#5_ev	1324
prontera,0,0,0	duplicate(treasu_ev)	Treasure Chest#6_ev	1324
prontera,0,0,0	duplicate(treasu_ev)	Treasure Chest#7_ev	1324
prontera,0,0,0	duplicate(treasu_ev)	Treasure Chest#8_ev	1324
prontera,0,0,0	duplicate(treasu_ev)	Treasure Chest#9_ev	1324
prontera,0,0,0	duplicate(treasu_ev)	Treasure Chest#10_ev	1324
prontera,0,0,0	duplicate(treasu_ev)	Treasure Chest#11_ev	1324
prontera,0,0,0	duplicate(treasu_ev)	Treasure Chest#12_ev	1324
prontera,0,0,0	duplicate(treasu_ev)	Treasure Chest#13_ev	1324
prontera,0,0,0	duplicate(treasu_ev)	Treasure Chest#14_ev	1324
prontera,0,0,0	duplicate(treasu_ev)	Treasure Chest#15_ev	1324
prontera,0,0,0	duplicate(treasu_ev)	Treasure Chest#16_ev	1324
prontera,0,0,0	duplicate(treasu_ev)	Treasure Chest#17_ev	1324
prontera,0,0,0	duplicate(treasu_ev)	Treasure Chest#18_ev	1324
prontera,0,0,0	duplicate(treasu_ev)	Treasure Chest#19_ev	1324

 

Edited by AnnieRuru
  • 0
Posted
On 6/2/2018 at 8:34 AM, AnnieRuru said:

eh ... desculpe sobre deixou este tópico fora

Há também uma outra maneira de minerar o baú como eu fiz no evento pvp do tesouro
(sry o script é muito antigo e no meio de consertá-lo)




	

 

 

Thanks a lot, it helped me a lot, would you have some anti bot script, to combat those programs that leaves the play "char" beating by itself and dropping the items on the map? I already asked for a lot here at rathena and I still did not succeed.

 

Link: 

 

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