• 0

Question

Hi guys,

Can someone good with scripting help me with this idea?

I want teleport skill (AL_WARP) to make a waitingroom (chat) or if not possible just one normal Message on top of the portal... with destination map (memo)....

is this possible to make?

if not possible, is possible to make Player create chatroom with destination map or send message, after use skill?

Bcuz in my server everyone have teleport/portal, there is no warp command or itens,

my hexed is 2014-03-05 

Hope you guys can help me !

Thank you !!!

Share this post


Link to post
Share on other sites

19 answers to this question

  • 0

if you mean like event script, that waitingroom can be open/close, that warp player to event map when its open

prontera,158,185,5	script	jdshfjsdfh	1_F_MARIA,{
	if ( .start )
		mes "The event is OPEN";
	else
		mes "The event is CLOSED";
	close;
OnInit:
	bindatcmd "asdf", strnpcinfo(NPC_NAME)+"::Onaaa";
	waitingroom "Event", 0;
	end;
Onaaa:
	.start ^= 1;
	delwaitingroom strnpcinfo(NPC_NAME);
	if ( .start )
		waitingroom "Event", 2, strnpcinfo(NPC_NAME)+"::Onstart", 1;
	else
		waitingroom "Event", 0;
	end;
Onstart:
	getwaitingroomstate 0;
	unitwarp [email protected][0], "guild_vs2", 49,49;
	end;
}

 

however if it is for player, I have absolutely no idea what your point is ...
PS: I think ... like I have to fix my OnPCUseSKillEvent ....

Share this post


Link to post
Share on other sites
  • 0

Posted (edited)

yea, but is there anyway to put This waitingroom open/close in the use of AL_WARP skill(portal) linking to chosen Map? (/memo)

like HIDDEN_NPC, or something invisible....

 

Also, do you know if it's possible to make npc sprite visible but not targetable? like the Chat cursor..

Edited by skyundersea

Share this post


Link to post
Share on other sites
  • 0

I don't understand what topic request talking about

Spoiler

1. I get his/her server allow every player has warp portal skill, but warp portal require /memo to be use efficiently
so that means every player can have different set of portal location ? just like every priest memo differently
this means every time acolyte cast a warp portal skills, above the portal creates a temporary chat-room that tells where's the destination ?

2. then why you request having an npc sprite with non-targetable ?
if this is cast from player skill, there is no need for an npc

ok I'm confused

if anyone understand this topic, please help me rephrase his/her sentence

Share this post


Link to post
Share on other sites
  • 0
25 minutes ago, AnnieRuru said:

1. I get his/her server allow every player has warp portal skill, but warp portal require /memo to be use efficiently
so that means every player can have different set of portal location ? just like every priest memo differently
this means every time acolyte cast a warp portal skills, above the portal creates a temporary chat-room that tells where's the destination ?

There is no problem with the skill and warp, i just want the SKILL to create a WAITINGROOM chat, Showing /memo destination of Caster.... if possible

 

26 minutes ago, AnnieRuru said:

2. then why you request having an npc sprite with non-targetable ?
if this is cast from player skill, there is no need for an npc

This is for other npc i have, and want to make it untargetable with mouse, if its possible

Share this post


Link to post
Share on other sites
  • 0

Like this, just for visual purpose, a chatroom or message with link to map destination of portal

Screenshot_1.jpg

Share this post


Link to post
Share on other sites
  • 0

although I want to say impossible ...

but I can think of 1 work around ...
use duplicatenpc modification ...
create a chat-room on the duplicate npc ...
chatroom title... generate from data/mapnametable.txt ...

Share this post


Link to post
Share on other sites
  • 0
11 hours ago, skyundersea said:

Like this, just for visual purpose, a chatroom or message with link to map destination of portal

Screenshot_1.jpg

Those warp are static or generated via script and changes location?

If they are meant to be static, you can use newer client feature named (signboard) and just link to those warp co ordinates.

Share this post


Link to post
Share on other sites
  • 0

Thanks for help guys, i wonder if the caster can send message of destination map.... but i don't even know where to edit the skill, i just know where to edit cost, requeriment and skilltree... this easy things,

But thanks anyway!!!

I'll wait if someone who know how to edit skills come here and see if its possible..

 

Any help with non targetable visible NPC sprites? Do you guys know?

Share this post


Link to post
Share on other sites
  • 0

Posted (edited)

2 hours ago, skyundersea said:

Thanks for help guys, i wonder if the caster can send message of destination map....

By script (easier), skill is source (harder).

make a clone npc at destination with on touch then announce something 

 

2 hours ago, skyundersea said:

but i don't even know where to edit the skill, i just know where to edit cost, requeriment and skilltree... this easy things,

But thanks anyway!!!

I'll wait if someone who know how to edit skills come here and see if its possible..

Database support not script anymore!

anyway~

any filename that has "skill"

1. hercules\db\

2.1  hercules\db\pre-re\

or

2.2  hercules\db\re\

OR

3  you want customly made stuff ( aka custom skill )

https://herc.ws/wiki/Adding_new_skills  ( BENEFICIAL read)  ( sorry to make it caps, no people takes reading stuff seriously these days )

 

2 hours ago, skyundersea said:

Any help with non targetable visible NPC sprites? Do you guys know?

Yes we know the good old floating npc which no normal play can click see or OnTouch...

 

Edited by utofaery

Share this post


Link to post
Share on other sites
  • 0
27 minutes ago, utofaery said:

By script (easier), skill is source (harder).

make a clone npc at destination with on touch then announce something 

I didnt untersdand... but is not to announce, is like a normal message for around players see the destination of memo portal.... like this look

1.thumb.jpg.86da25ea5bc0e2680bb513df3ecbc7cb.jpg

2.thumb.jpg.e0f7fed484dd9f3ac48b74adcf364f62.jpg

Did you understand?

 

29 minutes ago, utofaery said:
2 hours ago, skyundersea said:

Any help with non targetable visible NPC sprites? Do you guys know?

Yes we know the good old floating npc which no normal play can click see or OnTouch...

And for this, do you know any way to make just the sprite appears? not the name and the chat cursor....

3.thumb.jpg.27cd3506fb347b63dc74f49b30bd0c35.jpg

Share this post


Link to post
Share on other sites
  • 0

no.1 ... wait until I fix OnPCUseSkillEvent
that modification allows to manipulate everything with a skill cursor ....

 

no.2

1 hour ago, skyundersea said:

And for this, do you know any way to make just the sprite appears? not the name and the chat cursor....

3.thumb.jpg.27cd3506fb347b63dc74f49b30bd0c35.jpg

you mean like adding 3D object into the game without telling player that object is manipulate from server side ?

none, perhaps you can try with browedit if you want to customize the map

Share this post


Link to post
Share on other sites
  • 0

Posted (edited)

7 minutes ago, AnnieRuru said:

no.1 ... wait until I fix OnPCUseSkillEvent
that modification allows to manipulate everything with a skill cursor ....

Thank you Annie :)

no2.

"you mean like adding 3D object into the game without telling player that object is manipulate from server side ?

none, perhaps you can try with browedit if you want to customize the map"

 

No, just the 2d npc sprite..... The npc and npc file exists, but player cant see the Name and cant click on the npc, just it

Edited by skyundersea

Share this post


Link to post
Share on other sites
  • 0
message strcharinfo(0),"Heal Cost "[email protected]+" Zeny.";

Hey Annie look this, it send message above players head...

Its from a healer NPC...

can we put this on a event with warp skill, with map destination? 

do you know how to do it?

Share this post


Link to post
Share on other sites
  • 0

message script command obviously doesn't work ...

if the player not within the vicinity when the player cast the portal, they can only see the portal, not the message

that's why chat-room might be the only choice to show it like a signboard, that can move into any location, and remove anytime

On 3/12/2019 at 1:22 AM, skyundersea said:

No, just the 2d npc sprite..... The npc and npc file exists, but player cant see the Name and cant click on the npc, just it


if you don't want to show npc name, make the npc name like #asdf, any characters after # will hide the npc name
but making an npc that you can't click on it, impossible

in fact, I don't know any object that can control server side that will pop up an object on the client that you can't click on it

enum bl_type {
	BL_NUL   = 0x000,
	BL_PC    = 0x001,
	BL_MOB   = 0x002,
	BL_PET   = 0x004,
	BL_HOM   = 0x008,
	BL_MER   = 0x010,
	BL_ITEM  = 0x020,
	BL_SKILL = 0x040,
	BL_NPC   = 0x080,
	BL_CHAT  = 0x100,
	BL_ELEM  = 0x200,

	BL_ALL   = 0xFFF,
};

yup, none, all these objects will change the cursor

Share this post


Link to post
Share on other sites
  • 0

Posted (edited)

On 3/10/2019 at 6:17 AM, skyundersea said:

Like this, just for visual purpose, a chatroom or message with link to map destination of portal

Screenshot_1.jpg

 

On 3/12/2019 at 1:17 AM, AnnieRuru said:

no.1 ... wait until I fix OnPCUseSkillEvent
that modification allows to manipulate everything with a skill cursor ....

now that I've fixed OnPCUseSkillEvent, its time to show off its awesomeness its usefulness

you also need 2nd plugin to do this
https://github.com/dastgirp/HPM-Plugins/blob/master/src/plugins/npc-duplicate.c

 

db/re/skill_db.conf

{
	Id: 2993
	Name: "CUSTOM_setpos"
	Description: "CUSTOM_setpos"
	MaxLevel: 3
	Range: 15
	SkillType: {
		Place: true
	}
	CoolDown: 10000
},

 

data/luafiles514/lua files/skillinfoz/skillinfolist.lub

	[SKID.CUSTOM_setpos] = {
		"CUSTOM_setpos";		
		SkillName = "Get Position",
		MaxLv = 3,
		Type = "Quest",
		SpAmount = { 0 },
		bSeperateLv = true,
		AttackRange = { 15 },
	},

 

data/luafiles514/lua files/skillinfoz/skillid.lub

	CUSTOM_setpos = 2993,  

 

data/luafiles514/lua files/skillinfoz/skilldescript.lub

	[SKID.CUSTOM_setpos] = {
		"Warp to various towns",
		"MAX Lv : 3 ",
		"Lv 1: warp to prontera.",
		"Lv 2: warp to payon.",
		"Lv 3: warp to alberta.",
	},

 

conf/import/OnPCUseSkillEvent.conf

OnPCUseSkillEvent: (
{
	SkillName: "CUSTOM_setpos"
	Event_Label: "qwer::Onpos"
},
)

 

and finally the npc script

-	script	asdf	FAKE_NPC,2,2,{
	end;
OnTouch:
	switch( [email protected] ) {
	case 1: warp "prontera", 156,191; break;
	case 2: warp "payon", 162,233; break;
	case 3: warp "alberta", 192,147;
	}
	end;
OnInit:
	switch( [email protected] ) {
	case 1: waitingroom "prontera", 0; break;
	case 2: waitingroom "payon", 0; break;
	case 3: waitingroom "alberta", 0;
	}
	end;
}

-	script	qwer	FAKE_NPC,{
Onpos:
	if ( @create_warp_npc_delay + 10 > gettimetick(2) ) {
		dispbottom "cooldown";
		end;
	}
	@create_warp_npc_delay = gettimetick(2);
	.@i = .i++;
	[email protected] = @useskilllv;
	duplicatenpc "asdf", "asdf", .@i +"", strcharinfo(PC_MAP), @useskillx, @useskilly, DIR_SOUTH, 1_SHADOW_NPC, 2,2;
	[email protected] = 0;
	sleep 5000;
	duplicateremove "asdf#"+ .@i;
	end;
OnPCStatCalcEvent:	
	skill CUSTOM_setpos, 3;
	end;
}

 

result

screen2019Hercules040.jpg

 

this screenshot is NOT tampered ... taken in-game without any photoshop or ms-paint edits

Edited by AnnieRuru

Share this post


Link to post
Share on other sites
  • 0

this is very nice, but this will be on fixed locations....

is there anyway for:

case 1:

/memo location 1

case 2:

/memo location 2

case 3:

/memo location 3

 

of skill AL_Warp?

so ppl can choose where to go not just fixed warps

Share this post


Link to post
Share on other sites
  • 0

Posted (edited)

this is not fixed location, OnPCUseSkillEvent allow to create warp portal anywhere with a target cursor

and if you want to change player's warp portal coordinate, just do bindatcmd "@memoportal" something like that
"@memoportal 1" will save the location for 1st location on level 1 portal ...
"@memoportal 2" will save the location for 2nd location on level 2 portal ...

if I still remember correctly, this OnPCUseSkillEvent allows to create up to level 100
let me test ....
yup, level 100 warp portal after apply this patch

 src/map/pc.c    | 2 +-
 src/map/skill.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/map/pc.c b/src/map/pc.c
index ea18715bb..9882fe2a8 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -4230,7 +4230,7 @@ static int pc_skill(struct map_session_data *sd, int id, int level, int flag)
 		ShowError("pc_skill: Skill with id %d does not exist in the skill database\n", id);
 		return 0;
 	}
-	if( level > MAX_SKILL_LEVEL ) {
+	if ( id != 2993 && level > MAX_SKILL_LEVEL ) {
 		ShowError("pc_skill: Skill level %d too high. Max lv supported is %d\n", level, MAX_SKILL_LEVEL);
 		return 0;
 	}
diff --git a/src/map/skill.c b/src/map/skill.c
index 633a73d67..d2ee741b5 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -14154,7 +14154,7 @@ static int skill_check_condition_castbegin(struct map_session_data *sd, uint16 s
 			}
 	}
 
-	if( skill_lv < 1 || skill_lv > MAX_SKILL_LEVEL )
+	if ( skill_id != 2993 && ( skill_lv < 1 || skill_lv > MAX_SKILL_LEVEL ) )
 		return 0;
 
 	require = skill->get_requirement(sd,skill_id,skill_lv);

screen2019Hercules041.jpg

 

remember, since OnPCUseSkillEvent is basically an NPC script, you can manipulate it with any kind of script commands available
bindatcmd + save a player variable ... or open a menu with select script command ....
what ever you like

Edited by AnnieRuru

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now