johnbond Posted March 2, 2013 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
nanakiwurtz Posted March 2, 2013 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
Emistry Posted March 2, 2013 Posted March 2, 2013 if( getmercinfo(0) ){ mes "Mercenary are not allowed"; close2; warp "prontera",155,181; end; } Quote
nanakiwurtz Posted March 2, 2013 Posted March 2, 2013 Emistry, I think he wants to prevent the users from bringing mercenary scrolls on inventory or in their cart. Quote
Emistry Posted March 2, 2013 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
nanakiwurtz Posted March 2, 2013 Posted March 2, 2013 So the item will be still consumed but without creating the mercenary? Hmm makes sense.. Quote
johnbond Posted March 2, 2013 Author 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
johnbond Posted March 3, 2013 Author 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
Capuche Posted March 3, 2013 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
johnbond2 Posted March 3, 2013 Posted March 3, 2013 (edited) I have this problem too. Edited March 3, 2013 by gunman Quote
johnbond Posted March 3, 2013 Author 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
johnbond Posted March 6, 2013 Author Posted March 6, 2013 Any other way to check for mercenaries? Thanks! Quote
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!
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.