Jump to content
  • 0

How to disable mercenaries on scripts?


johnbond

Question


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  457
  • Reputation:   11
  • Joined:  02/17/13
  • Last Seen:  

Hello everyone,

 

I wanted to ask how to prohibit mercenaries on my scripts.

 

I have these lines on my special warper that prohibits pets:

 

	//pet check
	if (petstat(PET_LEVEL) != 0) {
		mes .@n$;
		mes "Sorry, pets are not allowed.";
		close;
	}

What lines do I need to put in my NPC to prohibit mercenaries and mercenary scrolls?

 

12301,Doppelganger_Scroll,Doppleganger Summoning Scroll,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 1966,1800000; },{},{}

 

 

I also have this OnPCLoadMapEvent: NPC.

 

    sc_end SC_KAIZEL;
    sc_end SC_KAAHI;

 

How do I make it to automatically disable mercenaries upon warp in?

 

 

Thank you guys!

 

 

Edited by johnbond
Link to comment
Share on other sites

12 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

1.

if (getmapxy(@mapname$,@mapx,@mapy,2)==0) {
mes .@n$;
mes "Sorry, pets are not allowed.";
close;
}

2. You can set an array to check for Mercenary scrolls in your inventory / cart, if I'm not mistaken Brian had posted a code for it a few days ago.

3. I find "merc_delete", but currently don't know how to use it. Or you can to forcefully delete it via SQL on both table 'mercenary' and 'mercenary_owner'.



But if you forcefully delete it on SQL, you won't get the faith point.

Link to comment
Share on other sites


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


if( getmercinfo(0) ){

mes "Mercenary are not allowed";

close2;

warp "prontera",155,181;

end;

}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

Emistry, I think he wants to prevent the users from bringing mercenary scrolls on inventory or in their cart.

Link to comment
Share on other sites


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

....{ if( strcharinfo(3) != "<mapname>" ) mercenary_create 1966,1800000; },{},{}

 

inside the mapname that cant use mercenary 

 

or make use of this file..

trunk/db/re/item_noequip.txt

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

So the item will be still consumed but without creating the mercenary? Hmm makes sense..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  457
  • Reputation:   11
  • Joined:  02/17/13
  • Last Seen:  

if( getmercinfo(0) ){
	mes "Mercenary are not allowed";
	close2;
	warp "prontera",155,181;
	end;
}

Yes this is what I need. Thank you for this!

 

Btw, if a player has mecenary then enters a map, how can I disable his mercenary? Some kind of sc_end line? Because participants are recalled by GMs and they do not pass the NPC above.

 

Thank you.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

Kill then ressurect them /gg

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  457
  • Reputation:   11
  • Joined:  02/17/13
  • Last Seen:  

Kill then ressurect them /gg

I want it automatically done if possible. Its so hard to pinpoint who has the mercenary when you recall 2 full guilds of 76 players on each side.

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

-    script    hjkl    -1,{
OnPCLoadMapEvent:
    if( strcharinfo(3) == "<Your Event Map Name>" )
        if( getmercinfo(0) ){
            dispbottom "Mercenary are not allowed";
            warp "prontera",155,181;
        }
    end;
}

<Your Event Map Name>    mapflag    loadevent

You can try OnPCLoadMapEvent label

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  24
  • Reputation:   0
  • Joined:  03/15/12
  • Last Seen:  

I have this problem too.

Edited by gunman
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  457
  • Reputation:   11
  • Joined:  02/17/13
  • Last Seen:  

I get errors.


 


I just remembered that I am still using 3ceam SRCs. I tried to find the script command "getmercinfo" at root\doc\script_commands.txt
but there was none. Thats the reason I get errors on these scripts
since it is not supported in my SRC perhaps. Is there any other way to
check for mercenaries other than getmercinfo? Because I dont have it.


 


Thanks.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  457
  • Reputation:   11
  • Joined:  02/17/13
  • Last Seen:  

Any other way to check for mercenaries?

 

Thanks!

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