Jump to content
  • 0
classy5

Requesting simple script

Question

Item use to -> targetarrow-10x10.png(Player&Monster)

 

teleport the target to prontera (if possible please include that the target will be teleported back to where he was after 30 sec)



[herc staff]: can u please move this to script request? thanks

Edited by classy5

Share this post


Link to post
Share on other sites

13 answers to this question

Recommended Posts

  • 0

Warp a player OR monster to prontera for 30 seconds, then warps them back to previous map

Share this post


Link to post
Share on other sites
  • 0

require OnPCUseSkillEvent modification

https://www.eathena.ws/board/index.php?showtopic=274088

the trick is, create a new skill, in the item script, use 'itemskill' script command,

then unitwarp the target ID using variable @useskilltarget

 

pssss....

at the moment I'm writing getitemname2 function ... then I have to update setmobdata .... busy ....

so this is not in my top priority to do list

Share this post


Link to post
Share on other sites
  • 0

ok its time to show the almighty OnPCUseSkillEvent

 

@@classy5

although the topic title has the word 'Simple', but this isn't simple at all

because have to create a new skill and create a new item

 

hmm ... since have to move back the target of the monster to original position, have to use getmapxy with mobs

https://github.com/HerculesWS/Hercules/pull/871

 

so ...

 

confimportOnPCUseSkillEvent.txt

warp_target,"warp_target::Onwarp"
.

dbreskill_db.txt

1305,15,0,1,0,0,0,9,0,no,0,0x0,0,none,0,		warp_target,warp_target
.

dbreskill_require_db.txt

1305,0,0,0,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.

dbreskill_cast_db.txt

1305,0,0,0,0,0,100,0
.

dbitem_db2.conf

{	Id: 32499	AegisName: "item_warp_target"	Name: "warp_target"	Type: 11	Weight: 1	Script: <" itemskill warp_target,1; ">},
.

clientSystemitemInfo.lub

	[32499] = {		unidentifiedDisplayName = "Warp Target",		unidentifiedResourceName = "파리의날개",		unidentifiedDescriptionName = {			"Warp the target into guild_vs2 and warp back in 10 seconds",		},		identifiedDisplayName = "Warp Target",		identifiedResourceName = "파리의날개",		identifiedDescriptionName = {			"Warp the target into guild_vs2 and warp back in 10 seconds",		},		slotCount = 0,		ClassNum = 0	},
.

dataluafiles514lua filesskillinfozskillid.lub

warp_target = 1305,
.

dataluafiles514lua filesskillinfozskillinfolist.lub

	[SKID.warp_target] = {		"warp_target";		SkillName = "Warp Target Unit",		MaxLv = 1,		Type = "Quest",		SpAmount = { 0 },		bSeperateLv = true,		AttackRange = { 15 },	},
.

and finally the npc script

-	script	warp_target	FAKE_NPC,{Onwarp:	.@gid = @useskilltarget;	getmapxy .@map$, .@x, .@y, UNITTYPE_PC;	getmapxy .@map$, .@x2, .@y2, UNITTYPE_MOB, .@gid;	unitwarp .@gid, "guild_vs2", 50,50;	warp "guild_vs2", 50,50;	.@origin = getcharid(3);	sleep 10000; // 10 seconds	if ( attachrid(.@origin) )		warp .@map$, .@x, .@y;	if ( !getmapxy( .@dummy$, .@dummy, .@dummy, UNITTYPE_MOB, .@gid ) ) {	//	announce "still alive !", bc_all;		unitwarp .@gid, .@map$, .@x2, .@y2;	}	end;}
.

Have Fun figure this out!

 

EDIT: seems skill name and item name must not the same, so rename into "item_warp_target"

Edited by AnnieRuru

Share this post


Link to post
Share on other sites
  • 0

@@AnnieRuru , my bad :/ well im idk if some script are simple or not.

 

i got this from the process

 

[warning]: skill_castend_damage_id: Unknown skill used:1305

 

i dont have OnPCUseSkillEvent.txt so i just created one.

Share this post


Link to post
Share on other sites
  • 0

seems like you are able to follow the process

just didn't recompile with the plugin

 

you need this plugin

http://herc.ws/board/topic/11296-onpcuseskillevent/

and this patch from the pull request -> Haru already put code:ready tag but haven't merge yet ...

http://upaste.me/45d422146a7e9357b

Share this post


Link to post
Share on other sites
  • 0

seems like you are able to follow the process

just didn't recompile with the plugin

 

you need this plugin

http://herc.ws/board/topic/11296-onpcuseskillevent/

and this patch from the pull request -> Haru already put code:ready tag but haven't merge yet ...

http://upaste.me/45d422146a7e9357b

 

I actualy no experiencearrow-10x10.png on plugin or patch... im trying to figure out what i have to do with the info you provided  :wacko:

 

21j3lah.png

 

 

i tried just creating a file name "hercules.h" after that "memmgr.h" then i get error when i start the server

 
Edited by classy5

Share this post


Link to post
Share on other sites
  • 0

 

seems like you are able to follow the process

just didn't recompile with the plugin

 

you need this plugin

http://herc.ws/board/topic/11296-onpcuseskillevent/

and this patch from the pull request -> Haru already put code:ready tag but haven't merge yet ...

http://upaste.me/45d422146a7e9357b

 

I actualy no experiencearrow-10x10.png on plugin or patch... im trying to figure out what i have to do with the info you provided  :wacko:

 

21j3lah.png

 

 

i tried just creating a file name "hercules.h" after that "memmgr.h" then i get error when i start the server

Just follow the Plugin Installation in Windows

 

Don't forget to put it on conf/plugins.conf

Share this post


Link to post
Share on other sites
  • 0

 

seems like you are able to follow the process

just didn't recompile with the plugin

you need this pluginhttp://herc.ws/board/topic/11296-onpcuseskillevent/

and this patch from the pull request -> Haru already put code:ready tag but haven't merge yet ...http://upaste.me/45d422146a7e9357b

 

I actualy no experiencearrow-10x10.png on plugin or patch... im trying to figure out what i have to do with the info you provided  :wacko:

 

21j3lah.png

 

 

i tried just creating a file name "hercules.h" after that "memmgr.h" then i get error when i start the server

Update your Hercules, this plugin is meant for new Hercules.

Share this post


Link to post
Share on other sites
  • 0

I found that our plugin format keep changing, never consistent

newer plugin cannot use on old hercules, and old plugin cannot use on new hercules

 

hercules.h added on this commit,

https://github.com/HerculesWS/Hercules/commit/51b7adcf4e5b2a347081ec9a6903102c4909a404

means ... if want to make that plugin compatible with your server, has to put all those GET_SYMBOL stuffs ...

honestly without GET_SYMBOL is much better ...

Share this post


Link to post
Share on other sites
  • 0

I found that our plugin format keep changing, never consistentnewer plugin cannot use on old hercules, and old plugin cannot use on new herculeshercules.h added on this commit,https://github.com/HerculesWS/Hercules/commit/51b7adcf4e5b2a347081ec9a6903102c4909a404means ... if want to make that plugin compatible with your server, has to put all those GET_SYMBOL stuffs ...honestly without GET_SYMBOL is much better ...

Plugin format is much better now, it used to keep changing to remove all the limitations like that of GET_SYMBOL.

 

@@classy5

also if you want to make plugin for old hercules, you need to change #include directory too

Example:

#include "map/map.h"

To

#include "../map/map.h"

And so on, with other includes too.

Share this post


Link to post
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.   Restore formatting

  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.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.