Exportforce Posted September 12, 2013 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
Patskie Posted September 12, 2013 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
Emistry Posted September 12, 2013 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
Exportforce Posted September 12, 2013 Author Posted September 12, 2013 Hello, thanks for the fast answers! Ah yes... Seem to remember. Thanks Patskie! Quote
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 =/
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.