-
Content Count
1677 -
Joined
-
Last visited
-
Days Won
246
Content Type
Profiles
Forums
Downloads
Staff Applications
Calendar
Everything posted by AnnieRuru
-
/* HPData handy redirects *//* session[] */#define addToSession(ptr,data,index,autofree) (HPMi->addToHPData(HPDT_SESSION,HPMi->pid,(ptr),(data),(index),(autofree)))#define getFromSession(ptr,index) (HPMi->getFromHPData(HPDT_SESSION,HPMi->pid,(ptr),(index)))#define removeFromSession(ptr,index) (HPMi->removeFromHPData(HPDT_SESSION,HPMi->pid,(ptr),(index)))/* map_session_data */#define addToMSD(ptr,data,index,autofree) (HPMi->addToHPData(HPDT_MSD,HPMi->pid,(ptr),(data),(index),(autofree)))#define getFromMSD(ptr,index) (HPMi->getFromHPData(HPDT_MSD,HPMi->pid,(ptr),(index)))#define removeFromMSD(ptr,index) (HPMi->removeFromHPData(HPDT_MSD,HPMi->pid,(ptr),(index)))/* npc_data */#define addToNPCD(ptr,data,index,autofree) (HPMi->addToHPData(HPDT_NPCD,HPMi->pid,(ptr),(data),(index),(autofree)))#define getFromNPCD(ptr,index) (HPMi->getFromHPData(HPDT_NPCD,HPMi->pid,(ptr),(index)))#define removeFromNPCD(ptr,index) (HPMi->removeFromHPData(HPDT_NPCD,HPMi->pid,(ptr),(index)))/* map_data */#define addToMAPD(ptr,data,index,autofree) (HPMi->addToHPData(HPDT_MAP,HPMi->pid,(ptr),(data),(index),(autofree)))#define getFromMAPD(ptr,index) (HPMi->getFromHPData(HPDT_MAP,HPMi->pid,(ptr),(index)))#define removeFromMAPD(ptr,index) (HPMi->removeFromHPData(HPDT_MAP,HPMi->pid,(ptr),(index)))/* party_data */#define addToPAD(ptr,data,index,autofree) (HPMi->addToHPData(HPDT_PARTY,HPMi->pid,(ptr),(data),(index),(autofree)))#define getFromPAD(ptr,index) (HPMi->getFromHPData(HPDT_PARTY,HPMi->pid,(ptr),(index)))#define removeFromPAD(ptr,index) (HPMi->removeFromHPData(HPDT_PARTY,HPMi->pid,(ptr),(index)))/* guild */#define addToGLD(ptr,data,index,autofree) (HPMi->addToHPData(HPDT_GUILD,HPMi->pid,(ptr),(data),(index),(autofree)))#define getFromGLD(ptr,index) (HPMi->getFromHPData(HPDT_GUILD,HPMi->pid,(ptr),(index)))#define removeFromGLD(ptr,index) (HPMi->removeFromHPData(HPDT_GUILD,HPMi->pid,(ptr),(index)))/* instance_data */#define addToINSTD(ptr,data,index,autofree) (HPMi->addToHPData(HPDT_INSTANCE,HPMi->pid,(ptr),(data),(index),(autofree)))#define getFromINSTD(ptr,index) (HPMi->getFromHPData(HPDT_INSTANCE,HPMi->pid,(ptr),(index)))#define removeFromINSTD(ptr,index) (HPMi->removeFromHPData(HPDT_INSTANCE,HPMi->pid,(ptr),(index)))where is item_data and mob_data ? if allow to item_data, we can do something like this Cydh did allows item data to have optional field, which can do the following - restrict GM from create the item - restrict GM from refine the item ... some other idea if allow to mob_data, allow monster to do the following like mob_controller - restrict player from hitting the mob ( mob->invincible ) - create a monster that no random walk ( it stand still until being attack ) ... some other idea
-
how to declare a new PLAYER source variable in a plugin file
AnnieRuru replied to AnnieRuru's question in Plugin Support
got it http://upaste.me/3700f1 I got help from this topic too http://rathena.org/board/topic/89230-can-any-one-convert-this-for-use-with-rathena-version-17690-or-diff-please/ . . . but why only these few ? /* HPData handy redirects *//* session[] */#define addToSession(ptr,data,index,autofree) (HPMi->addToHPData(HPDT_SESSION,HPMi->pid,(ptr),(data),(index),(autofree)))#define getFromSession(ptr,index) (HPMi->getFromHPData(HPDT_SESSION,HPMi->pid,(ptr),(index)))#define removeFromSession(ptr,index) (HPMi->removeFromHPData(HPDT_SESSION,HPMi->pid,(ptr),(index)))/* map_session_data */#define addToMSD(ptr,data,index,autofree) (HPMi->addToHPData(HPDT_MSD,HPMi->pid,(ptr),(data),(index),(autofree)))#define getFromMSD(ptr,index) (HPMi->getFromHPData(HPDT_MSD,HPMi->pid,(ptr),(index)))#define removeFromMSD(ptr,index) (HPMi->removeFromHPData(HPDT_MSD,HPMi->pid,(ptr),(index)))/* npc_data */#define addToNPCD(ptr,data,index,autofree) (HPMi->addToHPData(HPDT_NPCD,HPMi->pid,(ptr),(data),(index),(autofree)))#define getFromNPCD(ptr,index) (HPMi->getFromHPData(HPDT_NPCD,HPMi->pid,(ptr),(index)))#define removeFromNPCD(ptr,index) (HPMi->removeFromHPData(HPDT_NPCD,HPMi->pid,(ptr),(index)))/* map_data */#define addToMAPD(ptr,data,index,autofree) (HPMi->addToHPData(HPDT_MAP,HPMi->pid,(ptr),(data),(index),(autofree)))#define getFromMAPD(ptr,index) (HPMi->getFromHPData(HPDT_MAP,HPMi->pid,(ptr),(index)))#define removeFromMAPD(ptr,index) (HPMi->removeFromHPData(HPDT_MAP,HPMi->pid,(ptr),(index)))/* party_data */#define addToPAD(ptr,data,index,autofree) (HPMi->addToHPData(HPDT_PARTY,HPMi->pid,(ptr),(data),(index),(autofree)))#define getFromPAD(ptr,index) (HPMi->getFromHPData(HPDT_PARTY,HPMi->pid,(ptr),(index)))#define removeFromPAD(ptr,index) (HPMi->removeFromHPData(HPDT_PARTY,HPMi->pid,(ptr),(index)))/* guild */#define addToGLD(ptr,data,index,autofree) (HPMi->addToHPData(HPDT_GUILD,HPMi->pid,(ptr),(data),(index),(autofree)))#define getFromGLD(ptr,index) (HPMi->getFromHPData(HPDT_GUILD,HPMi->pid,(ptr),(index)))#define removeFromGLD(ptr,index) (HPMi->removeFromHPData(HPDT_GUILD,HPMi->pid,(ptr),(index)))/* instance_data */#define addToINSTD(ptr,data,index,autofree) (HPMi->addToHPData(HPDT_INSTANCE,HPMi->pid,(ptr),(data),(index),(autofree)))#define getFromINSTD(ptr,index) (HPMi->getFromHPData(HPDT_INSTANCE,HPMi->pid,(ptr),(index)))#define removeFromINSTD(ptr,index) (HPMi->removeFromHPData(HPDT_INSTANCE,HPMi->pid,(ptr),(index)))where is item_data and mob_data ?gonna suggest them -
how to declare a new PLAYER source variable in a plugin file
AnnieRuru posted a question in Plugin Support
ok I'm converting this script into patch and plugin http://herc.ws/board/topic/4421-bst-stand-for-buy-sell-and-trade/?p=29021 patch http://upaste.me/349b75 into plugin http://upaste.me/823b70 noticed that in the patch file, I declare a new source variable 'bst_delay' inside map_session_data so it should be fast to just retrieve the value 'sd->bst_delay' in the source, without using Sql or script type variable but in the plugin, I currently have no known way to declare a new struct that points to map_session_data because I'm using pc_setreg which is a script type variable, bad method ... just like Brainstorm once told me, using a cannon to pick a lock is there any way to make a plugin declare a new variable from another struct ? like pc.h or itemdb.h -
no, the server send packet to tell the client to change cursor into monster tamingits the client that send the packet to tell the server about which mob ID was tamed
-
seems impossibleI tested it src/map/script.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)diff --git a/src/map/script.c b/src/map/script.cindex cbea20e..0d1a416 100644--- a/src/map/script.c+++ b/src/map/script.c@@ -18778,10 +18778,27 @@ bool script_hp_add(char *name, char *args, bool (*func)(struct script_state *st) return script->add_builtin(&buildin, true); } +BUILDIN(catch_process) {+ TBL_PC *sd = script->rid2sd(st);+ if ( sd )+ clif->catch_process(sd);+ return true;+}++BUILDIN(pet_roulette) {+ TBL_PC *sd = script->rid2sd(st);+ if ( sd )+ clif->pet_roulette( sd, script_getnum(st,2) ? 1:0 );+ return true;+}++ #define BUILDIN_DEF(x,args) { buildin_ ## x , #x , args } #define BUILDIN_DEF2(x,x2,args) { buildin_ ## x , x2 , args } void script_parse_builtin(void) { struct script_function BUILDIN[] = {+ BUILDIN_DEF(catch_process,""),+ BUILDIN_DEF(pet_roulette,"i"), // NPC interaction BUILDIN_DEF(mes,"s*"), BUILDIN_DEF(next,""), - script jdskjsf -1,{OnInit: bindatcmd "petcatch", strnpcinfo(0)+"::Onbbb"; bindatcmd "petroll", strnpcinfo(0)+"::Onaaa"; end;Onaaa: pet_roulette( atoi( .@atcmd_parameters$ ) ); end;Onbbb: catch_process(); end;}the clif->catch_process demands the player to click on the monster (poring)Alt+1 to execute @petcatch, and the cursor change into monster taming one, after click on the poring only the machine start rolling, I Alt+2 (@petroll 0) and gets fail without monster, Alt+3 (@petroll 1) gets success but without monster too seems like there's no known way to just make the machine appear ... probably need some client hexing already EDIT: its not difficult to write the command, but doesn't look promising yeah better use cutin PS: reminds me of this http://rathena.org/board/topic/90717-r-color-game-machine/?hl=cutin#entry236736
-
fixed in version 1.1 @Zratinel sorry this script is an instance script, not an event script though, I think somebody should make another one something like, announce the event start, everyone come in the map, then when it start it clones all the participants in the map... well lame idea actually, to me ...
-
the plugin actually works it overwrite the default atcommand thanks for the reminder, the plugin file is getting big http://upaste.me/1a2f73
-
Disabled 3rd Jobs and Baby 3rd jobs in @jobchange/@job command
AnnieRuru replied to Jedzkie's question in Source Support
LMAO !! I messed up the upper job (JOBL_UPPER) and third job (JOBL_THIRD) 1 more time patchy src/map/atcommand.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)diff --git a/src/map/atcommand.c b/src/map/atcommand.cindex b5e8fa7..1c11ad7 100644--- a/src/map/atcommand.c+++ b/src/map/atcommand.c@@ -973,8 +973,12 @@ static inline const char* atcommand_help_string(AtCommandInfo *info) { return true; } - if (pcdb_checkid(job)) {- if (pc->jobchange(sd, job, upper) == 0)+ if ( pcdb_checkid(job) ) {+ if ( pc->jobid2mapid(job) & JOBL_THIRD ) {+ clif->message(fd, msg_txt(155)); // You are unable to change your job.+ return false;+ }+ else if (pc->jobchange(sd, job, upper) == 0) clif->message(fd, msg_txt(12)); // Your job has been changed. else { clif->message(fd, msg_txt(155)); // You are unable to change your job. -
Disabled 3rd Jobs and Baby 3rd jobs in @jobchange/@job command
AnnieRuru replied to Jedzkie's question in Source Support
there are 2 places, 1 for string, the other for numbers src/map/atcommand.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)diff --git a/src/map/atcommand.c b/src/map/atcommand.cindex b5e8fa7..958addb 100644--- a/src/map/atcommand.c+++ b/src/map/atcommand.c@@ -951,7 +951,7 @@ static inline const char* atcommand_help_string(AtCommandInfo *info) { for( i = JOB_NOVICE_HIGH; i < JOB_MAX && !found; i++ ){ if (strncmpi(message, pc->job_name(i), 16) == 0) { job = i;- found = true;+ found = false; } } @@ -973,8 +973,12 @@ static inline const char* atcommand_help_string(AtCommandInfo *info) { return true; } - if (pcdb_checkid(job)) {- if (pc->jobchange(sd, job, upper) == 0)+ if ( pcdb_checkid(job) ) {+ if ( job & JOBL_UPPER || upper == 1 ) {+ clif->message(fd, msg_txt(155)); // You are unable to change your job.+ return false;+ }+ else if (pc->jobchange(sd, job, upper) == 0) clif->message(fd, msg_txt(12)); // Your job has been changed. else { clif->message(fd, msg_txt(155)); // You are unable to change your job. -
the same with item namesit reads `name_english` field prontera,146,185,5 script kjdhfskjsdhf 100,{ dispbottom Red_Potion +""; end;}read as 501 I remember when they did this, it breaks lilith's extended vending system http://herc.ws/board/tracker/issue-7525-set-variable-is-not-recognized-causing-freezing lilith's extended vending system put zeny and cashpoints as an item, after the fix you still get the warning message, but the lilith's patch will still work regardless
-
so only my compiler so super doesn't throw errors =/ (microsoft visual c++) it just all short/int has to be initialize up version 1.2 to initialize all short/int variable also allows to change announcement color by changing intif->broadcast into intif->broadcast2 btw I broke 1st post ... jabote I share your pain now version 1.2 patch -> http://upaste.me/1ee741 plugin -> http://upaste.me/84177a . . . search around line 284 in the patchchrif->maintenance_color = 0xFFFF00;change 0xFFFF00 into annie_is_stupid
-
maybe ...accessing sql takes time ... if you execute a long query, then it might lag your server well ... in this case, where it only retrieve a single line, it seems fast enough I think so shouldn't be a problem ... for some reason after I made maintenance mode plugin, this one seems ... too easy create table item_deny ( itemid smallint(6) primary key, `level` tinyint(4) ) engine = innodb; http://upaste.me/34c789 let me test what happen if do this as plugin ... I got a feeling that @item will be execute twice
-
do you still have the warning despite its working correctly now ?
-
caused from this line https://github.com/HerculesWS/Hercules/blob/master/npc/custom/events/disguise.txt#L130 setarray .MVP[0], OSIRIS, BAPHOMET, DOPPELGANGER, MISTRESS, GOLDEN_BUG, ORK_HERO, DRAKE, EDDGA, MAYA, MOONLIGHT, PHARAOH, PHREEONI, ORC_LORD, KNIGHT_OF_WINDSTORM, GARM, DARK_LORD, TURTLE_GENERAL, LORD_OF_DEATH, DRACULA, EVENT_BAPHO, DARK_SNAKE_LORD, INCANTATION_SAMURAI, PORING_V, AMON_RA, TAO_GUNKA, RSX_0806, BACSOJIN_, B_SEYREN, B_EREMES, B_HARWORD, B_MAGALETA, B_SHECIL, B_KATRINN, B_YGNIZEM, APOCALIPS_H, LADY_TANEE, THANATOS, DETALE, KIEL_, RANDGRIS, GLOOMUNDERNIGHT, KTULLANUX, ATROCE, G_MAGALETA_, IFRIT, FALLINGBISHOP, BEELZEBUB_, GOPINICH, MOROCC_, KUBLIN, S_NYDHOG, BOITATA, QUEEN_SCARABA, LOST_DRAGON, LEAK, I_QUEEN_SCARABA;.. honestly, the `Sprite` field in `mob_db` table has been constant up since months ago like prontera,146,185,5 script kjdhfskjsdhf 100,{ dispbottom ANGELING +""; end;}should return 1096 if you don't have this, then either you are using at least 1 year old hercules, or ... I don't even know anymore update your mob_db.txt or the `mob_db` / `mob_db_re` table
-
try overwrite the pc_authok_pre function with this bool pc_authok_pre( struct map_session_data *sd, int *login_id2, time_t *expiration_time, int *group_id, struct mmo_charstatus *st, bool *changing_mapservers ) { ShowDebug( "unix %dn", time(NULL) ); ShowDebug( "start %dn", maintenance_starttime ); ShowDebug( "end %dn", maintenance_endtime ); ShowDebug( "*group %dn", *group_id ); ShowDebug( "main_group %dn", maintenance_group ); if ( time(NULL) > maintenance_starttime && maintenance_endtime > time(NULL) && *group_id < maintenance_group ) { clif->authfail_fd( sd->fd, 1 ); hookStop(); return false; } return true;}AnnieRuru (GM99) login got this[Debug]: unix 1410468793[Debug]: start 1410468711[Debug]: end 1410498711[Debug]: *group 99[Debug]: main_group 99[Info]: 'AnnieRuru' logged in. (AID/CID: '2000000/150000', IP: '127.0.0.1', Group '99').KinoRuru (GM0) login got this[Debug]: unix 1410468800[Debug]: start 1410468711[Debug]: end 1410498711[Debug]: *group 0[Debug]: main_group 99[Info]: Closed connection from '127.0.0.1'... I got a feeling that your server doesn't hook the function ...
-
Chat space limitation!/Scammer avoid *Will pay for help*
AnnieRuru replied to a question in Source Requests
I'm more interested to know how to type those charactersAlt + ???? those are actually meant for names use together with normalize_name( message, "255xA0032tx0Ax0D " );they are automatically trim into 1 single space oh well patch src/map/clif.c | 7 +++++++ 1 file changed, 7 insertions(+)diff --git a/src/map/clif.c b/src/map/clif.cindex d9acf07..0118856 100644--- a/src/map/clif.c+++ b/src/map/clif.c@@ -9110,6 +9110,13 @@ bool clif_process_message(struct map_session_data *sd, int format, char **name_, *namelen_ = namelen; *message_ = message; *messagelen_ = messagelen;++ normalize_name( message, "255xA0032tx0Ax0D " );+ if ( stristr( message, "x20x3Ax20" ) || stristr( message, "x20x3Bx20" ) ) { // type " : " OR " ; " will be blocked+ clif->colormes( sd->fd, COLOR_RED, "You can't impersonate other players !" );+ return false;+ }+ return true; } plugin#include <stdio.h>#include <stdlib.h>#include <string.h>#include "../map/pc.h"#include "../map/clif.h"#include "../common/HPMi.h"#include "../common/socket.h"#include "../common/HPMDataCheck.h" // should always be the last file included! (if you don't make it last, it'll intentionally break compile time)HPExport struct hplugin_info pinfo = { "GM_impersonate", // Plugin name SERVER_TYPE_MAP,// Which server types this plugin works with? "0.1", // Plugin version HPM_VERSION, // HPM Version (don't change, macro is automatically updated)};bool clif_process_message_spaces( int retVal, struct map_session_data *sd, int format, char **name_, size_t *namelen_, char **message_, size_t *messagelen_) { if ( retVal == true ) { char* message = (char*)RFIFOP( sd->fd ,4) + strnlen(sd->status.name, NAME_LENGTH-1) + 3; normalize_name( message, "255xA0032tx0Ax0D " ); if ( stristr( message, "x20x3Ax20" ) || stristr( message, "x20x3Bx20" ) ) { // type " : " OR " ; " will be blocked clif->colormes( sd->fd, COLOR_RED, "You can't impersonate other players !" ); return false; } } return true;}HPExport void plugin_init (void) { clif = GET_SYMBOL("clif"); session = GET_SYMBOL("session"); strlib = GET_SYMBOL("strlib"); addHookPost("clif->process_message", clif_process_message_spaces);} -
can't reproduce, tested with the plugin oneI do the same, KinoRuru not able to login, even with server restart type @who to confirm it is normal player or not or, try with the maintenancecheck() script command to debug type 1 value when maintenance is on - script kjdfksjdf -1,{OnInit: for ( .@i = 0; .@i <= 5; .@i++ ) announce .@i +". "+ maintenancecheck(.@i), 0; end;}
-
sorry for being a perfectionist I redo again for certain parts, especially with the ver1.1 updates http://upaste.me/6b1f34
-
where is *checkweight ? and OnInitOnce ... this is a custom label you created, or you actually means OnInterIfInitOnce ? this label only execute once when server is online if the server shut down, and restart, $start_amount is gonna reset
-
are you sure about this ... there is no problem with plugin with this, as I can initialize the value as -1 at the top of the file but I am not able to change it inside chrif.h with the patch how to reproduce : 1. type @maintenance 1 1 1 aaaaaa 2. immediately @maintenanceoff [Error]: timer_do_delete error : function mismatch 005E9EE4(console_parse_timer) != 005E6E01(unknown timer function) the chrif->maintenance_timerid was defaulted to 0, and INVALID_TIMER is -1 1. how do I initialize the value as -1 ? 2. or maybe I just change != operator into > ...? because all I see the example inside src folder is always ( xxxx != INVALID_TIMER ) LOL I forgot I have execute the timer when server starts so just have to initialize the value inside chrif_connectack function up everything to version 1.1
-
no I don't think so everything there can be reproduce entirely with scripting EDIT: errr ... yeah making new monsters need mob_db.txt and mob_skill_db.txt but I don't think ever need to use plugin at all I'm sure you can do this right now ... even with newbie scripting method except for the Heavenly Flower Quest, little bit harder because it looks like a pvp/woe script every scripter has to start their journey by making these 3 scripts 1. item exchanger 2. warper 3. a simple server manager ... can be anything and these kind of script can be done with just mes next menu close now I'm going to revise back the scripting technique I used 7 years ago (hahaha) prontera,144,168,6 script Brysinggamen Quest 117,{ mes "collect 50 red pot, 20 orange pot, 10 white pot"; mes "and you get a Brysinggamen !"; next; menu "yes I want", L_yes, "not interested", L_no;L_yes: if ( countitem(501) < 50 ) goto L_not_enough; if ( countitem(502) < 20 ) goto L_not_enough; if ( countitem(504) < 10 ) goto L_not_enough; if ( !checkweight(2630,1) ) goto L_overweight; delitem 501, 50; delitem 502, 20; delitem 504, 10; mes "There you go !"; getitem 2630, 1; close;L_not_enough: mes "you don't bring enough items"; mes "collect 50 red pot, 20 orange pot, 10 white pot"; close;L_no: mes "ok come back soon"; close;L_overweight: mes "you are overweight, put some items into storage and come back again."; close;}try put all these items from that website into this script and show me
-
and where is your 3rd job changer script ? you didn't show us
-
http://playdreamerro.blogspot.com/2010/11/hero-quest-guide.html http://skyxileria.blogspot.com/2014/03/dreamer-ro-hero-quest.html sigh ... its just item collecting quest hunt this monster hunt that monster then you get imba weapon almost everything has been covered by script_commands.txt and there are some already release free by members like rebirth system, item collection quest just need some basic scripting knowledge and you can get this covered how about you show us how you write a item exchanger script ?
-
I was busy with writing maintenance mod ok ? actually I just forgot to add aFree(temp)
-
it seems that you are not commenting on my script, but you are requesting a patch that will block players from login at server select level so split topic in source section 1. maintainance ? look, I just type this and it already says wrong spelling I used google translate and type 'maintainance' it says 'Did you mean: maintenance' LOL I Ctrl+F inside my file, return 0 result return 4 result HAHAHAHA shame on myself 2. lucky I made the patch together, so this should be done in no time ok this is b*llsh*t, 3 hours to try with all different kinds of methods, and only this can get it done http://upaste.me/3f060d a. I tried to include chrif.h from login.h, then getting auth_node clash b. then I changed auth_node into auth__node inside login.c, chrif->maintenance_group cannot be read, those 3 variables c. so I tried again with declare the value from mmo.h, map-server crash for stupid reason d. so I use sql inside login.c, mysql_handle sux big time always say self is null e. then this only work, make a new function inside ipban.c and read it from login.c the one I made in release section, all variables were declare inside srcmap folder so they all can read each other but it seems that, login.c couldn't read outside that folder ... so I used Sql to retrieve the value which means, this patch actually access Sql once to deny player from login, while original one doesn't