Jump to content
  • 0

Help me with this idea..


Jesky

Question


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  51
  • Reputation:   3
  • Joined:  11/29/13
  • Last Seen:  

Hi, i already search in eathena and rathena then i'm not found anything. What i search is a script which work like:

 

when a player attack a monster with 1 damage to that mob (the mob itself has 5 hp), then i want this player to die if he/she do not kill the mob, but attack the mob only for 4 damage (remain 1 hp and left the mob). Can someone help me?

 

*sorry for bad english, hope u understand what i said.

Link to comment
Share on other sites

8 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

yeah your native language has better explanation

I don't even use google translator lol

now I get what you mean,

this is a mining script,

the user has to mine the rock within a certain time

the rock has 5 HP, plant mode

if the user failed to hit the rock for 5 times within the certain time limit

the user will die -> the rock falls on the user

not that hard, the trick is spawn it with npc

then it trigger the npc and spawn a mob

if the mob is not killed within a certain time limit, the triggering player will be dead

 

prontera,155,184,5	script	Shining Plant	1083,{
	getmapxy .@map$, .@x, .@y, 1;
	monster .@map$, .@x, .@y, "--ja--", 1083, 1, strnpcinfo(0)+"::OnMobDead";
	hideonnpc strnpcinfo(0);
	.alive = getcharid(3);
	sleep 5000; // 5 seconds to mine
	if ( .alive ) {
		if ( attachrid( .alive ) ) { // player might log out
			message rid2name( .alive ), "the rock has fallen onto you";
			unitkill .alive;
		}
	}
	.alive = 0;
	killmonster strnpcinfo(4), strnpcinfo(0)+"::OnMobDead";
	hideoffnpc strnpcinfo(0);
	end;
OnMobDead:
	.alive = 0;
	end;
}
if you don't like to use npc because needs to click twice,

there is another way to make it trigger immediately by using mob controller system

but it needs source modification

EDIT:

lol I already tackling this topic before I see your bump post lol

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


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

is there a time limit ?

let me rephrase ...

you want a mob that spawns with 5 HP only, but a plant mode

if the player failed to kill that mob within a certain time limit, he is dead

but if the player kill that mob, he survive ...

is that right ?

how about you speak in Indonesian ... I'm Malaysian I can probably understand

  • Upvote 2
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  51
  • Reputation:   3
  • Joined:  11/29/13
  • Last Seen:  

Terima kasih untuk tanggapannya Annie, saya tidak menyangka kamu dari Malaysia..

Ya tepat sekali, mob dengan 5 HP saja dan tidak bergerak (immobile/plant mode), jika player menyerang mob tersebut dan tidak membunuh mob tersebut, maka dia akan mati (@nuke). Namun jika dia membunuh mob tersebut maka dia akan tetap hidup.

 

Berapa pun sisa HP mob yang diserang, jika dia tidak membunuhnya maka dia akan mati.

sebagai contoh agar lebih jelas, player hanya menyerang mob sebesar 1 damage (Mob tersebut memiliki 4 HP tersisa) dan player tidak melanjutkan untuk membunuh mob tersebut, maka dia akan mati.. dan walaupun jika player menyerang mob tersebut sebesar 4 damage (mob memiliki 1 HP tersisa), namun tidak dibunuh, dia tetap akan mati.

 

saya sedang dalam project membuat sistem mining, ini adalah script goddameit yang saya modif sedikit..

jika memungkinkan, saya ingin menambahkan script request ini kedalam script ini..

function	script	Minner_Main	{
	if( getarg(0) == 2 )
	{
		undisguise;
		if( strcharinfo(3) == "cave" )
		end;
	}
	else if( strcharinfo(3) == "cave" && getequipid(4) == 6010 && getequipid(1) == 5009 )
	{
		if( getarg(0) == 0 )
			disguise 1169;
		else if( getarg(0) == 1 )
		{
			set .@r, rand(1000);
			if( .@r >= 500 && .@r < 1000 )
				getitem 757,1;
			if( .@r >= 0 && .@r < 500 )
				getitem 756,1;
			if( .@r >= 50 && .@r < 100 )
				getitem 6242,1;
			specialeffect2 100;
		}else
			;
		return;
	}
	else
		;
	return;
}
-	script	PickBroken	-1,{

OnNPCKillEvent:
	if( killedrid==1907 ){
	if(getequipid(4)==6010){
	dispbottom "[System] Kerusakan Pick kamu adalah sebesar "+break_percentage+"%";
	break_percentage++;
		}
	}
	if( break_percentage >=76 ){
	dispbottom "[System] Pick kamu telah mengalami kerusakan sebesar 75%!";
	dispbottom "[System] Harap perbaiki Pick kamu terlebih dahulu sebelum rusak sepenuhnya.";
	}
	if( break_percentage >=101 ){
	emotion e_omg,1;
	specialeffect2 155;
	dispbottom "[System] Pick kamu telah hancur!";
	unequip EQI_HAND_R;
	delitem 6010,1;
	break_percentage = 0;
	}
end;
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  51
  • Reputation:   3
  • Joined:  11/29/13
  • Last Seen:  

sorry for asking so fast.. but, there is a solution for my request?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  51
  • Reputation:   3
  • Joined:  11/29/13
  • Last Seen:  

lol, glad to speak in indonesia and can explain my request better..

 

Woah, i already tested this script and it's work great like what i wanted!

It's okay, this script is more than enough Annie, i'm so happy at last there is an answer, you've help me very much. :D

Thank you so much!!

 

I never imagined a script can do something like this, you're so awesome Annie  /no1

 

But one last question, is there a way if i wanted to make this mob spawn anywhere with at last about 50 mobs on a map?

or i have to duplicate the script?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

you can try duplicating the npc

but careful that the npc variables are shared among the duplicates

[paste=ik9dov80ihh]

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

you can try duplicating the npc

but careful that the npc variables are shared among the duplicates

[paste=ik9dov80ihh]

 

 So you can speak in English 、Chinese 、Indonesian ? Wow~you're a pretty cool lady! /no1

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  51
  • Reputation:   3
  • Joined:  11/29/13
  • Last Seen:  

My god, you even make me this complete script...

Well, I'm so grateful Annie~

 

Hope this script can help other people who is on a project making mining script too.  /no1

Request solved.

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