Jump to content
  • 0

Npc Hallowen


nicolasdemartini

Question


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.02
  • Content Count:  29
  • Reputation:   0
  • Joined:  09/21/22
  • Last Seen:  

Good evening gentlemen, I would like to request please an NPC that when approaching a spame mobs zombies 10 example user and that the NPC is hidden and returns to respawn every 10 minutes

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  218
  • Reputation:   152
  • Joined:  11/28/11
  • Last Seen:  

4 hours ago, nicolasdemartini said:

Good evening gentlemen, I would like to request please an NPC that when approaching a spame mobs zombies 10 example user and that the NPC is hidden and returns to respawn every 10 minutes

//===== rAthena Script ======================================= 
//= Find the Mushroom
//===== By: ================================================== 
//= Mysterious
//===== Current Version: ===================================== 
//= 3.6a
//===== Compatible With: ===================================== 
//= rAthena Project
//===== Description: ========================================= 
//= Find the Mushroom - random amount of Mushrooms spawns in random maps.
//= Players need to find these mushrooms and kill them to gain prizes!
//===== Additional Comments: =================================
//= 3.0 Fully Functional with Rewritten script. [Mysterious]
//= 3.6a Slightly edited. [Euphy]
//============================================================ 

-	script	Find the Mushroom	-,{
	mes "[ Find The Mushroom ]";
	if (.status == 1) {
		.@count = mobcount( .event_map$, strnpcinfo(0) + "::OnMobKilled" );
		if (.@count > 0) {
			mes "There are " + .@count + " Mushrooms left in " + .event_map$ + "!";
			mes "Find and kill the mushrooms to gain " + getitemname(.prize) + "!";
			close;
		}
		.event_map$ = "";
		.status = 0;
		mes "All the mushrooms are killed?";
	}
	mes "There is no event at the moment!";
	if (.status || getgmlevel() < .GM) close;
	mes "Start the event?";
	next;
	if (select("- No:- Yes") == 1) close;
	donpcevent strnpcinfo(0) + "::OnMinute10";
	mes "[ Find The Mushroom ]";
	mes "Event started!";
	close;

OnInit:
	.prize = 512;	// Reward item ID
	.amount = 10;	// Reward item amount
	.GM = 60;		// GM level required to access NPC
	setarray .maps_list$[0],"izlude","geffen","morocc","prontera"; // Possible maps
	end;

OnMinute10:	// Start time (every hour)
	if (.status) end;
	.status = 1;
	.@spawn = rand(1,10);	// How many Mushrooms should spawn?
	.event_map$ = .maps_list$[ rand(getarraysize(.maps_list$)) ];
	.@label$ = strnpcinfo(0) + "::OnMobKilled";
	killmonster .event_map$, .@label$;
	monster .event_map$,0,0,"Please don't kill me!",1084,.@spawn, .@label$;
	announce "Find the Mushroom : Total of " + .@spawn + " Mushrooms have been spawned in " + .event_map$ + "!",0;
	sleep 2500;
	announce "Find the Mushroom : Every Mushroom you kill will give you " + getitemname(.prize) + "!",0;
	end;

OnMobKilled:
	if (playerattached() == 0)
		end;
	getitem .prize, .amount;
	.@spawn = mobcount( .event_map$, strnpcinfo(0) + "::OnMobKilled" );
	if (.@spawn > 0)
		announce "[ " + strcharinfo(0) + " ] has killed a Mushroom. There are now " + .@spawn + " Mushroom(s) left.",bc_map;
	else {
		announce "The Find the Mushroom Event has ended. All the Mushrooms have been killed.",0;
		.status = 0;
		.event_map$ = "";
	}
	end;
}

edit
OnMinute10:
become
OnMinute10:
OnMinute20:
OnMinute30:
OnMinute40:
OnMinute50:
OnMinute00:

note : change what you want like monster id, reward id (you can remove it if you no need) and etc

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  132
  • Reputation:   53
  • Joined:  06/02/12
  • Last Seen:  

Hi

Spoiler
prontera,92,129,3	script	Evil Witch#1	4_F_NFDEADMGCIAN,6,6,{
	end;
OnTouch_:
	if (.wait + 600 > gettimetick(2)) // 600 = 10 minutes
		end;
	
	// Zombie mob IDs
	setarray .@mobs,1015,1153,1197,1403,1864,1865,3452;

	.@qty = 10;	//number of monsters to summon

	hideoffnpc;
	specialeffect EF_GRANDCROSS2;
	soundeffect "se_mutter02.wav", 0;
	emotion ET_KIK;
	.wait = gettimetick(2);
	getmapxy .@map$,.@x,.@y, BL_NPC;
	for( .@i = 1; .@i <= .@qty; .@i++ )
		monster .@map$, rand(2)?.@x+rand(4):.@x-rand(4), rand(2)?.@y+rand(4):.@y-rand(4), "Zombie",.@mobs[rand( getarraysize(.@mobs) )], 1;
	npctalk "" + strnpcinfo(1) + ": This is Halloween!";
	sleep 5000;
	hideonnpc;
	end;

OnInit:
	hideonnpc;
	end;
}

 

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.02
  • Content Count:  29
  • Reputation:   0
  • Joined:  09/21/22
  • Last Seen:  

[Error]:
script error on npc/hallowen/respauneamob.txt line 12
    parse_callfunc: not enough arguments, expected ','
     7 :        // Zombie mob IDs
     8 :        setarray .@mobs,1015,1153,1197,1403,1864,1865,3452;
     9 :
    10 :        .@qty = 10;     //number of monsters to summon
    11 :
*   12 :        hideoffnpc';'
    13 :        specialeffect EF_GRANDCROSS2;
    14 :        soundeffect "se_mutter02.wav", 0;
    15 :        emotion ET_KIK;
    16 :        .wait = gettimetick(2);
    17 :        getmapxy .@map$,.@x,.@y, BL_NPC;
 

 

hello how can I fix that error

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  132
  • Reputation:   53
  • Joined:  06/02/12
  • Last Seen:  

42 minutes ago, nicolasdemartini said:

hello how can I fix that error

Find and replace:

hideonnpc; >>> hideonnpc strnpcinfo(0);

hideoffnpc; >>> hideoffnpc strnpcinfo(0);

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