Jump to content
  • 0

Disable Homunculus


GM Winter

Question


  • Group:  Members
  • Topic Count:  176
  • Topics Per Day:  0.14
  • Content Count:  666
  • Reputation:   9
  • Joined:  12/04/20
  • Last Seen:  

On 4/24/2019 at 10:37 AM, Gerzzie said:

hello how to add more maps here also after it blocked the alchemist after they hide or use rest skill they are still block to enter the map can you help me sir @Emistry

 

Edited by GM Winter
Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

On 10/17/2022 at 5:44 PM, GM Winter said:

how to add more maps

-	script	Sample	-1,{
OnInit:
	setarray .@map$, "prt_fild01", "prt_fild02", "prt_fild03";

	.@map$ = getarraysize(.@map$);
	for (.@i = 0; .@i < .@size; .@i++) {
		setmapflag .@Map$,mf_loadevent;
		setd(".m_"+.@map$[.@i], 1);
	}
	end;

OnPCLoadMapEvent:
	if (!getd(".m_"+strcharinfo(3))) end;
	if (checkhomcall() == 0) {
		mes "Sorry, Homunculus are not allowed in this Map. Please remove it.";
		close2;
		warp "SavePoint",0,0;
	}
	end;
}

and disable the rest of the skills from gvg

Edited by Emistry
update checkhomcall
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  176
  • Topics Per Day:  0.14
  • Content Count:  666
  • Reputation:   9
  • Joined:  12/04/20
  • Last Seen:  

On 10/17/2022 at 8:12 PM, Emistry said:
-	script	Sample	-1,{
OnInit:
	setarray .@map$, "prt_fild01", "prt_fild02", "prt_fild03";

	.@map$ = getarraysize(.@map$);
	for (.@i = 0; .@i < .@size; .@i++) {
		setmapflag .@Map$,mf_loadevent;
		setd(".m_"+.@map$[.@i], 1);
	}
	end;

OnPCLoadMapEvent:
	if (!getd(".m_"+strcharinfo(3))) end;
	if (checkhomcall(0) == 0) {
		mes "Sorry, Homunculus are not allowed in this Map. Please remove it.";
		close2;
		warp "SavePoint",0,0;
	}
	end;
}

and disable the rest of the skills from gvg

hello sir emistry what i mean is on my testing yes it making the alchemist warp to its save point the problem is okay he received a warning that no homun allowed after i use rest skill outside the map then try to get inside the gvg map the script still detects that im using homun even i dont have homun anymore

image.thumb.png.0be76630631eafafbd264286ca3849ea.png

 

image.thumb.png.1dd77cad88736bf357ae96b37d452539.png

 

On 3/11/2019 at 8:03 AM, utofaery said:

A few things you need :

1.  OnPCLoadMapEvent:

2.  *checkhomcall()    Check  if homun exist

3.  atcommand @useskill + homun rest (AM_REST)
 

hello how to make this as a whole script

 

hello i would like to ask to for help how to modify this script its disabled the Alchemist and its homunculus on the specific map the problem was after it warp the alchemist back to its savepoint and remove his homunculus he cant still enter the map even he already remove this homunculus please help heres the script

 

Quote

-    script    DisabledHomun    -1,{
OnInit:
set .Map$,"guild_vs1";
setmapflag .Map$,mf_loadevent;
end;

OnPCLoadMapEvent:
if( strcharinfo(3) == .Map$ && gethominfo(0) ){
    mes "Sorry, Alchemist are not allowed in this Map. thank you";
    close2;
    warp "SavePoint",0,0;
}
end;
}

image.thumb.png.b4b4dd71956a0d0afe628695ea8ff05d.png

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  1545
  • Reputation:   238
  • Joined:  08/03/12
  • Last Seen:  

49 minutes ago, GM Winter said:

hello i would like to ask to for help how to modify this script its disabled the Alchemist and its homunculus on the specific map the problem was after it warp the alchemist back to its savepoint and remove his homunculus he cant still enter the map even he already remove this homunculus please help heres the script

 

image.thumb.png.b4b4dd71956a0d0afe628695ea8ff05d.png

*checkhomcall()

This function checks if the attached player's Homunculus is active,
and will return the following values:
 -1: The player has no Homunculus.
  0: The player's Homunculus is active.
  1: The player's Homunculus is vaporized.
  2: The player's Homunculus is in morph state.

---------------------------------------

*gethominfo(<type>{,<char_id>})

This function will return Homunculus information for the Homunculus of the
invoking character, regardless of its vaporize state. It returns zero or
"null" if the player does not own a Homunculus.

Valid types are:
 0 - Homunculus ID
 1 - Homunculus Class
 2 - Homunculus Name
 3 - Homunculus friendly level (intimacy score). 100000 is full loyalty.
 4 - Homunculus hungry level. 100 is completely full.
 5 - Homunculus rename flag. 0 means this homunculus has not been named yet.
 6 - Homunculus level
 7 - Homunculus Game ID

try to use checkhomcall

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  176
  • Topics Per Day:  0.14
  • Content Count:  666
  • Reputation:   9
  • Joined:  12/04/20
  • Last Seen:  

Just now, Chaos92 said:
*checkhomcall()

This function checks if the attached player's Homunculus is active,
and will return the following values:
 -1: The player has no Homunculus.
  0: The player's Homunculus is active.
  1: The player's Homunculus is vaporized.
  2: The player's Homunculus is in morph state.

---------------------------------------

*gethominfo(<type>{,<char_id>})

This function will return Homunculus information for the Homunculus of the
invoking character, regardless of its vaporize state. It returns zero or
"null" if the player does not own a Homunculus.

Valid types are:
 0 - Homunculus ID
 1 - Homunculus Class
 2 - Homunculus Name
 3 - Homunculus friendly level (intimacy score). 100000 is full loyalty.
 4 - Homunculus hungry level. 100 is completely full.
 5 - Homunculus rename flag. 0 means this homunculus has not been named yet.
 6 - Homunculus level
 7 - Homunculus Game ID

try to use checkhomcall

hello sir how can i add that on the script and where

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.02
  • Content Count:  206
  • Reputation:   10
  • Joined:  08/30/19
  • Last Seen:  

1 hour ago, GM Winter said:

hello sir how can i add that on the script and where

-	script	DisabledHomun	-1,{
OnInit:
set .Map$,"guild_vs1";
setmapflag .Map$,mf_loadevent;
end;

OnPCLoadMapEvent:
if( strcharinfo(3) == .Map$ &&  gethominfo(0) && checkhomcall() == 0 ){
    mes "Sorry, Alchemist are not allowed in this Map. thank you";
    close2;
    warp "SavePoint",0,0;
}
end;
}

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  176
  • Topics Per Day:  0.14
  • Content Count:  666
  • Reputation:   9
  • Joined:  12/04/20
  • Last Seen:  

7 hours ago, Takuyakii said:
-	script	DisabledHomun	-1,{
OnInit:
set .Map$,"guild_vs1";
setmapflag .Map$,mf_loadevent;
end;

OnPCLoadMapEvent:
if( strcharinfo(3) == .Map$ &&  gethominfo(0) && checkhomcall() == 0 ){
    mes "Sorry, Alchemist are not allowed in this Map. thank you";
    close2;
    warp "SavePoint",0,0;
}
end;
}

 

woah thanks but theres an another problem after i remove the homunculus the alchemist can enter the map now but after that he can still use call homunculus skill i just need to disable it on the mapflag thank you so much!

Edited by GM Winter
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.02
  • Content Count:  206
  • Reputation:   10
  • Joined:  08/30/19
  • Last Seen:  

11 hours ago, GM Winter said:

woah thanks but theres an another problem after i remove the homunculus the alchemist can enter the map now but after that he can still use call homunculus skill i just need to disable it on the mapflag thank you so much!

Or you can add check timer, Like these



 

-	script	DisabledHomun	-1,{
OnInit:
set .Map$,"guild_vs1";
setmapflag .Map$,mf_loadevent;
end;

OnPCLoadMapEvent:
if( strcharinfo(3) == .Map$ &&  gethominfo(0) && checkhomcall() == 0 ){
    mes "Sorry, Alchemist are not allowed in this Map. thank you";
    close2;
    warp "SavePoint",0,0;
		}
		else {
			addtimer (1 * 1000), strnpcinfo(3)+"::OnPCLoadMapEvent";
		}
	end;
	
}

 

Edited by Takuyakii
  • MVP 1
Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

just change it to

if (checkhomcall() == 0) {

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  176
  • Topics Per Day:  0.14
  • Content Count:  666
  • Reputation:   9
  • Joined:  12/04/20
  • Last Seen:  

22 minutes ago, Emistry said:

just change it to

if (checkhomcall() == 0) {

 

thank you sir emistry ❤️

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