rootKid Posted January 11, 2013 Group: Members Topic Count: 24 Topics Per Day: 0.00 Content Count: 83 Reputation: 11 Joined: 11/28/11 Last Seen: March 31, 2024 Share Posted January 11, 2013 HI I'd like to request the code that will make weapons unequipable on a certain map. Quote Link to comment Share on other sites More sharing options...
Kisuka Posted January 11, 2013 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 56 Reputation: 30 Joined: 02/22/12 Last Seen: August 8, 2020 Share Posted January 11, 2013 You can do this with scripting... Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted January 11, 2013 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted January 11, 2013 https://rathena.svn.sourceforge.net/svnroot/rathena/trunk/db/re/item_noequip.txt seems like I've tried, I'm able to save up to 32768, zone 11 perhaps the item_noequip.txt and skill_nocast_db.txt should make an update for it Quote Link to comment Share on other sites More sharing options...
rootKid Posted January 14, 2013 Group: Members Topic Count: 24 Topics Per Day: 0.00 Content Count: 83 Reputation: 11 Joined: 11/28/11 Last Seen: March 31, 2024 Author Share Posted January 14, 2013 (edited) Well here is the thing, I don't want to enter each and every item that I don't want players to be able to equip on a certain map. I want the ability to block equipping depending on their equipment positions, for example they cannot equip anything on their right hand or left hand in prontera. This would be different because I don't have to enter every weapon and shield or w/e to the item_noequip.txt Edited January 14, 2013 by kou Quote Link to comment Share on other sites More sharing options...
Stolao Posted January 14, 2013 Group: Developer Topic Count: 48 Topics Per Day: 0.01 Content Count: 1443 Reputation: 344 Joined: 10/17/12 Last Seen: March 19 Share Posted January 14, 2013 Just write an onloadmapevent script for this. Quote Link to comment Share on other sites More sharing options...
rootKid Posted January 14, 2013 Group: Members Topic Count: 24 Topics Per Day: 0.00 Content Count: 83 Reputation: 11 Joined: 11/28/11 Last Seen: March 31, 2024 Author Share Posted January 14, 2013 Could you show me an example? Quote Link to comment Share on other sites More sharing options...
Emistry Posted January 15, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10017 Reputation: 2368 Joined: 10/28/11 Last Seen: Thursday at 12:09 PM Share Posted January 15, 2013 you can try this if you want... https://rathena.org/board/index.php?/files/file/2505-%7B?%7D/ Quote Link to comment Share on other sites More sharing options...
rootKid Posted January 17, 2013 Group: Members Topic Count: 24 Topics Per Day: 0.00 Content Count: 83 Reputation: 11 Joined: 11/28/11 Last Seen: March 31, 2024 Author Share Posted January 17, 2013 That is pretty similar to adding items to the item_noequip.txt. I'm looking for a code that will actually make equipping things impossible on a certain map. Does not matter if they have it in their inventory. Now who can really help me with this? I'm sure it is possible. I don't want a script, else I wouldn't have posted here. Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted January 18, 2013 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted January 18, 2013 noitem mapflag prontera mapflag noitem 4,5 item type 4 (weapon) and item type 5 (armor) can't equip in prontera map since this is SVN discussion, I dunno this modification should add into SVN or not because this question also frequently asked in database/script request section Quote Link to comment Share on other sites More sharing options...
Emistry Posted January 18, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10017 Reputation: 2368 Joined: 10/28/11 Last Seen: Thursday at 12:09 PM Share Posted January 18, 2013 you can try this too.. http://rathena.org/board/topic/77378-skillitem-map-restriction-now-supports-multiple-maps/ Quote Link to comment Share on other sites More sharing options...
rootKid Posted January 19, 2013 Group: Members Topic Count: 24 Topics Per Day: 0.00 Content Count: 83 Reputation: 11 Joined: 11/28/11 Last Seen: March 31, 2024 Author Share Posted January 19, 2013 (edited) Which SVN was the mapflag noitem feature added? Edited January 19, 2013 by kou Quote Link to comment Share on other sites More sharing options...
clydelion Posted January 19, 2013 Group: Members Topic Count: 17 Topics Per Day: 0.00 Content Count: 754 Reputation: 186 Joined: 05/22/12 Last Seen: October 15, 2022 Share Posted January 19, 2013 This should be moved in Source Request section. And to answer your question, this is a custom source mod made by Annie. Quote Link to comment Share on other sites More sharing options...
Dori Posted January 7, 2014 Group: Members Topic Count: 105 Topics Per Day: 0.02 Content Count: 332 Reputation: 15 Joined: 12/11/11 Last Seen: August 8, 2017 Share Posted January 7, 2014 Is this mapflag officially implemented in rathena revisions or is this still a custom add-on? I need to know cuz I'm looking for a way to block equipping in a certain map also. I tried to find 'noitem' in my src files, but couldn't find a match. Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted January 8, 2014 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted January 8, 2014 (edited) [paste=1a4xw30mq7va] actually strtok is not thread safe ... I'm thinking writing a new one ok done lol, quite fast [paste=43c3y0h62jbk] EDIT: I think there's some problem with encoding ... I use attachment for the time being noitem_20140108_.patch Edited January 8, 2014 by AnnieRuru Quote Link to comment Share on other sites More sharing options...
Dori Posted January 8, 2014 Group: Members Topic Count: 105 Topics Per Day: 0.02 Content Count: 332 Reputation: 15 Joined: 12/11/11 Last Seen: August 8, 2017 Share Posted January 8, 2014 I got this warning during the recompiling process... npc.c: In function ‘npc_parse_mapflag’: npc.c:3707: warning: suggest parentheses around assignment used as truth value npc.c:3716: warning: suggest parentheses around && within || And the map flag didn't work. I had the mapflag set like this for one of my mapsprontera mapflag noitem 4 This should block weapons from being equipped in that map, correct? Well it didn't work, I was able to equip weapons. Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted January 8, 2014 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted January 8, 2014 download from the attachment, don't use pastebin if you download from pastebin you'll get this problem blame @Akkarin I'm going to wear a maid costume and serve him some tea Quote Link to comment Share on other sites More sharing options...
Dori Posted January 8, 2014 Group: Members Topic Count: 105 Topics Per Day: 0.02 Content Count: 332 Reputation: 15 Joined: 12/11/11 Last Seen: August 8, 2017 Share Posted January 8, 2014 download from the attachment, don't use pastebin if you download from pastebin you'll get this problem blame @Akkarin I'm going to wear a maid costume and serve him some tea I did. I downloaded the attachment. I applied the patch all well too. Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted January 8, 2014 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted January 8, 2014 I don't get any warning during compile ( of course no warning or else I've fix it ) prontera mapflag noitem 4this is actually restricting ARMOR <.< https://github.com/rathena/rathena/blob/master/doc/item_db.txt#L30 if you want to block WEAPON, use 5 Quote Link to comment Share on other sites More sharing options...
Dori Posted January 9, 2014 Group: Members Topic Count: 105 Topics Per Day: 0.02 Content Count: 332 Reputation: 15 Joined: 12/11/11 Last Seen: August 8, 2017 Share Posted January 9, 2014 (edited) oh right i forgot about the wep type changing. About the warnings, my revision is 11800. I'm not at the latest revision, and maybe that's why I'm getting the warning? So, Could you tell me what that warning means and maybe tell me how I can get rid of it? The warnings are coming form the first and the last line in npc.c: if ( l = strlen(w4) ) { i = 0; while ( i <= l && k < MAX_RESTRICTED_LIST ) { if ( w4[i] != ' ' && w4[i] != ' ' && w4[i] != ',' && w4[i] != '\0' ) { temp[j++] = w4[i]; } else if ( w4[i-1] != ' ' && w4[i-1] != ' ' && w4[i-1] != ',' ) { temp[j] = '\0'; id = atoi( temp ); if ( id >= IT_HEALING && id < IT_MAX || itemdb_exists( id ) ) Edited January 9, 2014 by Phenex Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted January 9, 2014 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted January 9, 2014 (edited) I got this warning during the recompiling process... npc.c: In function ‘npc_parse_mapflag’: npc.c:3707: warning: suggest parentheses around assignment used as truth value npc.c:3716: warning: suggest parentheses around && within || how about you tell me whats the exact line in 3707 and 3716 ?... or better off just show me the whole npc.c file Edited January 9, 2014 by AnnieRuru Quote Link to comment Share on other sites More sharing options...
Dori Posted January 9, 2014 Group: Members Topic Count: 105 Topics Per Day: 0.02 Content Count: 332 Reputation: 15 Joined: 12/11/11 Last Seen: August 8, 2017 Share Posted January 9, 2014 Sure. The line are this: if ( l = strlen(w4) ) { And This: if ( id >= IT_HEALING && id < IT_MAX || itemdb_exists( id ) ) Thank you!npc.rar Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted January 9, 2014 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted January 9, 2014 seems like you are using different compiler than mine your compiler can even suggest me to write the code cleaner try this one noitem_20140110.patch curious, tell me what's the compiler you are using ... I'm using microsoft visual c++ 2010 1 Quote Link to comment Share on other sites More sharing options...
Dori Posted January 10, 2014 Group: Members Topic Count: 105 Topics Per Day: 0.02 Content Count: 332 Reputation: 15 Joined: 12/11/11 Last Seen: August 8, 2017 Share Posted January 10, 2014 (edited) Thank you, I will try this out. As for the compiler, it's the compiler provided by Asura hosting. So I'm not exactly sure what they use for the compiler ^^; Edit: It works! No warnings~ Perfect! Thank you very much Annie Ruru! Edited January 10, 2014 by Phenex Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted August 28, 2014 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted August 28, 2014 @Darkpurple asked to update this one so ... noitem_20140828r.diff the difference about this and official is allow_equip_restricted_item just nullify the cards, but mine can unequip them Quote Link to comment Share on other sites More sharing options...
Question
rootKid
HI I'd like to request the code that will make weapons unequipable on a certain map.
Link to comment
Share on other sites
23 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.