Jump to content
  • 0

Player inmune to designed map


ohyono

Question


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  56
  • Reputation:   15
  • Joined:  01/10/12
  • Last Seen:  

Hello my friends.

 

The reason which I write today about a problem in a script. What happens is that I want members of a guild can pass a map without the monsters or players touched. initially he had tried @monsterignore command, but can not find the way that works.
 
I hope you can help me, and as usual thank you very much.
 
This is my inicial script
 

 

function script regiones {

OnPCLoginEvent:
if(JobLevel>=20) { 
bonus bSpeedRate,40;
bonus bSPrecovRate,10;
bonus bHPrecovRate,10;
atcommand "@monsterignore";
}
if(JobLevel<=20) {
bonus bSpeedRate,30;
bonus bAspdRate,10;
bonus bVariableCastrate,-30;
}
end;
}

 

 
Link to comment
Share on other sites

8 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

Thanks my friends  

KuroflyStolao

try it both ways and the script goes like this:

 

 

 

 
- script reg_sylph -1,{
OnPCStatCalcEvent:
if(BaseLevel < 50) goto inmiune;
if(BaseLevel > 50) goto efecto;
inmune:
if(getcharid(2) ==  3 &&  strcharinfo(3) == "sylph_sky1" || strcharinfo(3) == "splendie" || strcharinfo(3) == "spl_fild01" || strcharinfo(3) == "spl_fild02"  || strcharinfo(3) == "spl_fild03") { 
if(mobign ==  1){
bonus bSpeedRate,40;
bonus bSPrecovRate,10;
bonus bHPrecovRate,10;
close;
 } else {
bonus bSpeedRate,40;
bonus bSPrecovRate,10;
bonus bHPrecovRate,10;
atcommand "@monsterignore";
set mobign,1;
close;
}
end;
}
efecto:
if ( getcharid(2) ==  3 && strcharinfo(3) == "sylph_sky1" || strcharinfo(3) == "splendie" || strcharinfo(3) == "spl_fild01" || strcharinfo(3) == "spl_fild02"  || strcharinfo(3) == "spl_fild03") {
if(mobign ==  1) {
atcommand "@monsterignore";
bonus bSpeedRate,30;
bonus bAspdRate,10;
bonus bVariableCastrate,-30;
set mobign,0;
end;
} else {
bonus bSpeedRate,30;
bonus bAspdRate,10;
bonus bVariableCastrate,-30;
end;
}
}
//if ( getcharid(2) ==  3 && strcharinfo(3) != "sylph_sky1" || strcharinfo(3) != "splendie" || strcharinfo(3) != "spl_fild01" || strcharinfo(3) != "spl_fild02" || strcharinfo(3) != "spl_fild03" ) {
// mes "bueno, al menos este sirve";
// }
 
 
}
 

Now the problem is I can not disable the event when players leave the maps.

try this

- script reg_sylph -1,{
OnPCStatCalcEvent:
	if(getcharid(2) == 3 &&
		( strcharinfo(3) == "sylph_sky1" 
		|| strcharinfo(3) == "splendie" 
		|| strcharinfo(3) == "spl_fild01" 
		|| strcharinfo(3) == "spl_fild02"  
		|| strcharinfo(3) == "spl_fild03" )
	){ 
		if(BaseLevel < 50){
			bonus2 bSubRace,RC_Formless,100;
			bonus2 bSubRace,RC_Undead,100;
			bonus2 bSubRace,RC_Brute,100;
			bonus2 bSubRace,RC_Plant,100;
			bonus2 bSubRace,RC_Insect,100;
			bonus2 bSubRace,RC_Fish,100;
			bonus2 bSubRace,RC_Demon,100;
			bonus2 bSubRace,RC_DemiHuman,100;
			bonus2 bSubRace,RC_Angel,100;
			bonus2 bSubRace,RC_Dragon,100;
			bonus bSpeedRate,40;
			bonus bSPrecovRate,10;
			bonus bHPrecovRate,10;
		} else {
			bonus bSpeedRate,30;
			bonus bAspdRate,10;
			bonus bVariableCastrate,-30;
		}
	}
}
Edited by Stolao
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  52
  • Reputation:   7
  • Joined:  01/02/12
  • Last Seen:  

You can't use function with OnPCLoginEvent lable

But better try a OnMapLoadEvent and loadevent mapflag

-[tab]sript[tab]npc_name[tab]-1,{
OnPCLoginEvent:
if(JobLevel>20) { 
bonus bSpeedRate,40;
bonus bSPrecovRate,10;
bonus bHPrecovRate,10;
atcommand "@monsterignore";
}
if(JobLevel<=20) {
bonus bSpeedRate,30;
bonus bAspdRate,10;
bonus bVariableCastrate,-30;
}
end;
}

You can read about loadevent in script_commands.txt

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  283
  • Reputation:   31
  • Joined:  07/08/14
  • Last Seen:  

Can you give us a little bit more details?

 

Do you want your script to be enabled all the time?

On which maps do you want guild members to be immuned to attacks? For how much time?

When do you want it to be disabled?

 

Also can you tell us for what use you want this script to be? I think that would help us understanding.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  56
  • Reputation:   15
  • Joined:  01/10/12
  • Last Seen:  

Hello and tanks for response. 

This script i had made for a PK server in which everyone can kill everyone regardless of level.

 

I wish it were active in the maps around the castles of WOE and still active at all times, as long as the members of the Guild have less of level 20 of Job, of course is only the test and modifcable depending on the results or the map.

 

Thaks

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

Hello and tanks for response. 

This script i had made for a PK server in which everyone can kill everyone regardless of level.

 

I wish it were active in the maps around the castles of WOE and still active at all times, as long as the members of the Guild have less of level 20 of Job, of course is only the test and modifcable depending on the results or the map.

 

Thaks

OnPCStatCalcEvent:

This special label triggers when a player's stats are recalculated, such as when
changing stats, equipment, or maps, as well as when logging in, leveling up, and
mounting a job mount. This can be used to grant additional item bonuses to certain
player groups, for instance.

try using that ^

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  56
  • Reputation:   15
  • Joined:  01/10/12
  • Last Seen:  

Thanks my friends  

KuroflyStolao

try it both ways and the script goes like this:

 

 

 

 
- script reg_sylph -1,{
OnPCStatCalcEvent:
if(BaseLevel < 50) goto inmiune;
if(BaseLevel > 50) goto efecto;
inmune:
if(getcharid(2) ==  3 &&  strcharinfo(3) == "sylph_sky1" || strcharinfo(3) == "splendie" || strcharinfo(3) == "spl_fild01" || strcharinfo(3) == "spl_fild02"  || strcharinfo(3) == "spl_fild03") { 
if(mobign ==  1){
bonus bSpeedRate,40;
bonus bSPrecovRate,10;
bonus bHPrecovRate,10;
close;
 } else {
bonus bSpeedRate,40;
bonus bSPrecovRate,10;
bonus bHPrecovRate,10;
atcommand "@monsterignore";
set mobign,1;
close;
}
end;
}
efecto:
if ( getcharid(2) ==  3 && strcharinfo(3) == "sylph_sky1" || strcharinfo(3) == "splendie" || strcharinfo(3) == "spl_fild01" || strcharinfo(3) == "spl_fild02"  || strcharinfo(3) == "spl_fild03") {
if(mobign ==  1) {
atcommand "@monsterignore";
bonus bSpeedRate,30;
bonus bAspdRate,10;
bonus bVariableCastrate,-30;
set mobign,0;
end;
} else {
bonus bSpeedRate,30;
bonus bAspdRate,10;
bonus bVariableCastrate,-30;
end;
}
}
//if ( getcharid(2) ==  3 && strcharinfo(3) != "sylph_sky1" || strcharinfo(3) != "splendie" || strcharinfo(3) != "spl_fild01" || strcharinfo(3) != "spl_fild02" || strcharinfo(3) != "spl_fild03" ) {
// mes "bueno, al menos este sirve";
// }
 
 
}
 

Now the problem is I can not disable the event when players leave the maps.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  283
  • Reputation:   31
  • Joined:  07/08/14
  • Last Seen:  

Sorry I really don't have time these days, I'm working a lot on a school project these days and so I don't have motivation on my spare time anymore.

 

Stolao seems kindly so I'm letting you in his hands untill I have more time /meh

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  56
  • Reputation:   15
  • Joined:  01/10/12
  • Last Seen:  

Yeeeeeeeeees works very well, it was what I expected. thank you very much.

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