Exportforce Posted September 12, 2013 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 13 Reputation: 0 Joined: 09/05/13 Last Seen: September 21, 2013 Share Posted September 12, 2013 Hello, long time not active and going to redo my old scripts. So I got a few small questions... 1. How do I do a script which does X on every single mob kill? Like saving a kill of a mob into a database incl. account id, char id ? (Yes I do know that I will need an extra table for that info) 2. Is it still possible to use PHP for Scripting ? If yes, how did that work ? Sorry but being away for 3 years lets you forget a lot =/ Quote Link to comment Share on other sites More sharing options...
Patskie Posted September 12, 2013 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 1702 Reputation: 241 Joined: 09/05/12 Last Seen: 8 hours ago Share Posted September 12, 2013 1. Like this : /* CREATE TABLE IF NOT EXISTS `sample` ( `account_id` INT(11) unsigned NOT NULL DEFAULT '0', `char_id` INT(11) unsigned NOT NULL DEFAULT '0', `mob_id` INT(11) unsigned NOT NULL DEFAULT '0' ) ENGINE=MyISAM; */ - script Sample -1,{ OnNPCKillEvent: if ( !query_sql("SELECT `mob_id` FROM `sample` WHERE `mob_id` = '" +killedrid+ "'") ) query_sql "INSERT INTO `sample` VALUES ( '" +getcharid(3)+ "', '" +getcharid(0)+ "', '" +killedrid+ "' )"; end; } 2. You cannot use PHP on rAthena scripts. Quote Link to comment Share on other sites More sharing options...
Emistry Posted September 12, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2370 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted September 12, 2013 1. How do I do a script which does X on every single mob kill? Like saving a kill of a mob into a database incl. account id, char id ? (Yes I do know that I will need an extra table for that info) seperate kill count for each monster ?? or just total killcount for all monsters ?? 2. Is it still possible to use PHP for Scripting ? If yes, how did that work ? no....*athena is not a PHP based... Quote Link to comment Share on other sites More sharing options...
Exportforce Posted September 12, 2013 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 13 Reputation: 0 Joined: 09/05/13 Last Seen: September 21, 2013 Author Share Posted September 12, 2013 Hello, thanks for the fast answers! Ah yes... Seem to remember. Thanks Patskie! Quote Link to comment Share on other sites More sharing options...
Question
Exportforce
Hello,
long time not active and going to redo my old scripts.
So I got a few small questions...
1. How do I do a script which does X on every single mob kill?
Like saving a kill of a mob into a database incl. account id, char id ?
(Yes I do know that I will need an extra table for that info)
2. Is it still possible to use PHP for Scripting ?
If yes, how did that work ?
Sorry but being away for 3 years lets you forget a lot =/
Link to comment
Share on other sites
3 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.