wow ... already trying to use plugin on the 1st day o.o
it actually took me about 1~2 weeks for me to understand what is plugin when I 1st came LOL
ok ... you actually enter the final phase when writing a plugin
which is testing for map-server to crash
the final step is search for every commands that has '->'
in your script, having ...
script->rid2sdpc->equipitemmap->id2sditemdb->existsthen just add them into the plugin_init function as this
Code:
HPExport void plugin_init (void) { script = GET_SYMBOL("script"); pc = GET_SYMBOL("pc"); map = GET_SYMBOL("map"); itemdb = GET_SYMBOL("itemdb"); addScriptCommand( "equip2", "viiiiii?", equip2);}
..
.
and although already tested working in my test server too
prontera,156,184,5 script kjdhfksjfs 100,{ getitem2 1201, 1,1,0,0, 0,0,0,0; equip2 1201, 0,0, 0,0,0,0; sleep2 1000; getitem2 1201, 1,1,0,0, 0,0,0,4001; equip2 1201, 0,0, 0,0,0,4001; end;}your command keep spamming the npc coordinate in console, because you did a 'return 0;'
in rathena, commands are return by
return SCRIPT_CMD_SUCCESS; (0)
return SCRIPT_CMD_FAILURE; (1)
in hercules, note that its actually opposite
return true; (1)
return false; (0)
so change that 'return 0;' into 'return true;'
http://upaste.me/4b092e