Ninjamon Posted March 10, 2013 Posted March 10, 2013 Is it possible to make all monsters in a specific map to drop TCG? Is it a map flag or what? Quote
Euphy Posted March 10, 2013 Posted March 10, 2013 https://rathena.org/board/index.php?/files/file/2746-%7B?%7D/ Quote
Mumbles Posted March 10, 2013 Posted March 10, 2013 (edited) This would work singularly as well: - script mobitemadder -1,{ OnNPCKillEvent: if(strcharinfo(3) == $mobaddmap$ && killedrid == $mobaddID) getitem $mobadditem,$mobaddamt; end; // Configuration //OnWhisperGlobal: OnInit: $mobaddID = 1002; // Define mob ID number $mobaddmap$ = "prt_fild08"; // Define map name $mobadditem = 7227; // Define item ID $mobaddamt = 1; // Define amount dispbottom "Configuration loaded."; // Vanity confirmation end; } It can be customized easily by using an array instead, if you want. Just make sure to reconfigure the settings. Edited March 10, 2013 by Via Quote
Capuche Posted March 10, 2013 Posted March 10, 2013 This would work singularly as well: Not really because this way, the player get the items directly on his inventory btw replace all your permanent variable by npc variable, no need the permanent here Quote
Euphy Posted March 10, 2013 Posted March 10, 2013 OnInit: //... dispbottom "Configuration loaded."; // Vanity confirmation 'dispbottom' requires an RID, perhaps you meant 'logmes'? Quote
Mumbles Posted March 10, 2013 Posted March 10, 2013 (edited) Not really because this way, the player get the items directly on his inventory btw replace all your permanent variable by npc variable, no need the permanent here You could make it drop on the floor with makeitem, I believe. - script mobitemadder -1, { OnNPCKillEvent: if(strcharinfo(3) == .@mobaddmap$ && killedrid == .@mobaddID) //getitem .@mobadditem = .@mobaddamt; getmapxy(.@M$,.@X,.@Y,0); makeitem .@mobadditem,.@mobaddamt,.@M$,.@X,.@Y; end; // Configuration //OnWhisperGlobal: OnInit: .@mobaddID = 1002; // Define mob ID number .@mobaddmap$ = "prt_fild08"; // Define map name .@mobadditem = 7227; // Define item ID .@mobaddamt = 1; // Define amount //dispbottom "Configuration loaded."; // Vanity confirmation end; } 'dispbottom' requires an RID, perhaps you meant 'logmes'? I added that vanity display message when using the OnWhisperGlobal label to invoke the configuration (as opposed to using @reloadscript?) Edited March 10, 2013 by Via Quote
Capuche Posted March 10, 2013 Posted March 10, 2013 You could make it drop on the floor with makeitem, I believe. Yes but you forgot the Brackets .@variables will be delete at the end of the script Use .variables "." - A NPC variable. They exist in the NPC and disappear when the server restarts or the NPC is reloaded. Can be accessed from inside the NPC or by calling 'getvariableofnpc'. Function objects can also have .variables which are accessible from inside the function, however 'getvariableofnpc' does NOT work on function objects. Quote
Mumbles Posted March 10, 2013 Posted March 10, 2013 (edited) Woops. The original code was one line, so I sorta forgot. - script mobitemadder -1, { OnNPCKillEvent: if(strcharinfo(3) == .mobaddmap$ && killedrid == .mobaddID) { //getitem .mobadditem = .mobaddamt; getmapxy(.@M$,.@X,.@Y,0); makeitem .mobadditem,.mobaddamt,.@M$,.@X,.@Y; } end; // Configuration //OnWhisperGlobal: OnInit: .mobaddID = 1002; // Define mob ID number .mobaddmap$ = "prt_fild08"; // Define map name .mobadditem = 7227; // Define item ID .mobaddamt = 1; // Define amount //dispbottom "Configuration loaded."; // Vanity confirmation end; } Edited March 10, 2013 by Via Quote
Ninjamon Posted March 10, 2013 Author Posted March 10, 2013 Woops. The original code was one line, so I sorta forgot. - script mobitemadder -1, { OnNPCKillEvent: if(strcharinfo(3) == .mobaddmap$ && killedrid == .mobaddID) { //getitem .mobadditem = .mobaddamt; getmapxy(.@M$,.@X,.@Y,0); makeitem .mobadditem,.mobaddamt,.@M$,.@X,.@Y; } end; // Configuration //OnWhisperGlobal: OnInit: .mobaddID = 1002; // Define mob ID number .mobaddmap$ = "prt_fild08"; // Define map name .mobadditem = 7227; // Define item ID .mobaddamt = 1; // Define amount //dispbottom "Configuration loaded."; // Vanity confirmation end; } Is this a npc only? Do i need to patch first the one that Euphy first before i start running that script? Quote
Mumbles Posted March 10, 2013 Posted March 10, 2013 Do i need to patch first the one that Euphy first before i start running that script? No, this is an alternative to using Euphy's patch. Quote
Question
Ninjamon
Is it possible to make all monsters in a specific map to drop TCG? Is it a map flag or what?
9 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.