johnbond Posted March 2, 2013 Group: Members Topic Count: 113 Topics Per Day: 0.03 Content Count: 457 Reputation: 11 Joined: 02/17/13 Last Seen: January 23, 2018 Share Posted March 2, 2013 (edited) 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 March 2, 2013 by johnbond Quote Link to comment Share on other sites More sharing options...
nanakiwurtz Posted March 2, 2013 Group: Members Topic Count: 81 Topics Per Day: 0.02 Content Count: 1654 Reputation: 583 Joined: 08/09/12 Last Seen: January 14, 2020 Share Posted March 2, 2013 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. Quote Link to comment Share on other sites More sharing options...
Emistry Posted March 2, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted March 2, 2013 if( getmercinfo(0) ){ mes "Mercenary are not allowed"; close2; warp "prontera",155,181; end; } Quote Link to comment Share on other sites More sharing options...
nanakiwurtz Posted March 2, 2013 Group: Members Topic Count: 81 Topics Per Day: 0.02 Content Count: 1654 Reputation: 583 Joined: 08/09/12 Last Seen: January 14, 2020 Share Posted March 2, 2013 Emistry, I think he wants to prevent the users from bringing mercenary scrolls on inventory or in their cart. Quote Link to comment Share on other sites More sharing options...
Emistry Posted March 2, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted March 2, 2013 ....{ 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 Quote Link to comment Share on other sites More sharing options...
nanakiwurtz Posted March 2, 2013 Group: Members Topic Count: 81 Topics Per Day: 0.02 Content Count: 1654 Reputation: 583 Joined: 08/09/12 Last Seen: January 14, 2020 Share Posted March 2, 2013 So the item will be still consumed but without creating the mercenary? Hmm makes sense.. Quote Link to comment Share on other sites More sharing options...
johnbond Posted March 2, 2013 Group: Members Topic Count: 113 Topics Per Day: 0.03 Content Count: 457 Reputation: 11 Joined: 02/17/13 Last Seen: January 23, 2018 Author Share Posted March 2, 2013 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. Quote Link to comment Share on other sites More sharing options...
nanakiwurtz Posted March 2, 2013 Group: Members Topic Count: 81 Topics Per Day: 0.02 Content Count: 1654 Reputation: 583 Joined: 08/09/12 Last Seen: January 14, 2020 Share Posted March 2, 2013 Kill then ressurect them Quote Link to comment Share on other sites More sharing options...
johnbond Posted March 3, 2013 Group: Members Topic Count: 113 Topics Per Day: 0.03 Content Count: 457 Reputation: 11 Joined: 02/17/13 Last Seen: January 23, 2018 Author Share Posted March 3, 2013 Kill then ressurect them 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. Quote Link to comment Share on other sites More sharing options...
Capuche Posted March 3, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted March 3, 2013 - 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 Quote Link to comment Share on other sites More sharing options...
johnbond2 Posted March 3, 2013 Group: Members Topic Count: 6 Topics Per Day: 0.00 Content Count: 24 Reputation: 0 Joined: 03/15/12 Last Seen: September 16, 2013 Share Posted March 3, 2013 (edited) I have this problem too. Edited March 3, 2013 by gunman Quote Link to comment Share on other sites More sharing options...
johnbond Posted March 3, 2013 Group: Members Topic Count: 113 Topics Per Day: 0.03 Content Count: 457 Reputation: 11 Joined: 02/17/13 Last Seen: January 23, 2018 Author Share Posted March 3, 2013 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.txtbut there was none. Thats the reason I get errors on these scriptssince it is not supported in my SRC perhaps. Is there any other way tocheck for mercenaries other than getmercinfo? Because I dont have it. Thanks. Quote Link to comment Share on other sites More sharing options...
johnbond Posted March 6, 2013 Group: Members Topic Count: 113 Topics Per Day: 0.03 Content Count: 457 Reputation: 11 Joined: 02/17/13 Last Seen: January 23, 2018 Author Share Posted March 6, 2013 Any other way to check for mercenaries? Thanks! Quote Link to comment Share on other sites More sharing options...
Question
johnbond
Hello everyone,
I wanted to ask how to prohibit mercenaries on my scripts.
I have these lines on my special warper that prohibits pets:
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!
Link to comment
Share on other sites
12 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.