Angelmelody
-
Content Count
772 -
Joined
-
Last visited
-
Days Won
23
Reputation Activity
-
-
Angelmelody got a reaction from evilpuncker in mob_item_ratio improvement
Yeah~,This config archive was unpopular,most of users like you nerver use
this archive,but just did a little bit improvement that will become more popular
-
Angelmelody got a reaction from Clare in mob_item_ratio improvement
Is there a possilbe to add an additonal flag field which determine the value in next field is fixed drop
rate or ratio drop rate ?
Structure looks like this
ItemID,Flag, fixed/ratio drop rate{,MonsterID}
For example, If flag was set to 0 ,We can specify ratio drop rate of certain item to a mob or all mob
or if flag was set to 1 , We can specify fixed drop rate to mob....
909,0,100,1002 // Jellopies from Porings will drop with 1x ratio drop rate.
909,1,100,1002 // Jellopies from Porings will drop with 0.1 fixed drop rate. (100/1000=0.1)
-
Angelmelody got a reaction from THPO in mob_item_ratio improvement
Is there a possilbe to add an additonal flag field which determine the value in next field is fixed drop
rate or ratio drop rate ?
Structure looks like this
ItemID,Flag, fixed/ratio drop rate{,MonsterID}
For example, If flag was set to 0 ,We can specify ratio drop rate of certain item to a mob or all mob
or if flag was set to 1 , We can specify fixed drop rate to mob....
909,0,100,1002 // Jellopies from Porings will drop with 1x ratio drop rate.
909,1,100,1002 // Jellopies from Porings will drop with 0.1 fixed drop rate. (100/1000=0.1)
-
Angelmelody got a reaction from evilpuncker in mob_item_ratio improvement
Is there a possilbe to add an additonal flag field which determine the value in next field is fixed drop
rate or ratio drop rate ?
Structure looks like this
ItemID,Flag, fixed/ratio drop rate{,MonsterID}
For example, If flag was set to 0 ,We can specify ratio drop rate of certain item to a mob or all mob
or if flag was set to 1 , We can specify fixed drop rate to mob....
909,0,100,1002 // Jellopies from Porings will drop with 1x ratio drop rate.
909,1,100,1002 // Jellopies from Porings will drop with 0.1 fixed drop rate. (100/1000=0.1)
-
Angelmelody got a reaction from AnnieRuru in @market clone
all those s_xxxx.. annoying warnings in my plugin projects were disabled by me , coz I hate those
-
Angelmelody got a reaction from THPO in @market clone
all those s_xxxx.. annoying warnings in my plugin projects were disabled by me , coz I hate those
-
Angelmelody reacted to Mystery in eAthena - The End?
Old boards are online now: http://eathena.ws/board/
-
Angelmelody got a reaction from AnnieRuru in @market clone
I try building a hooking function to prevent the market clone killed by @killmonster CMDint atkillmonster_sub_pre(struct block_list *bl, va_list *ap){ struct mob_data *md; struct monster_data *mmd; md = (struct mob_data *)bl; if ( ( mmd = getFromMOBDATA( md, 0 ) ) ) { if(mmd->market_chat_id){ hookStop(); return 0; } } return 1;}addHookPre( "atcommand->atkillmonster_sub", atkillmonster_sub_pre ); -
Angelmelody got a reaction from Zirius in Which should I use "break" / "continue" ? Snapping out of while and check var again
how about get ride of the swtich-case like this
prontera,155,180,4 script This eynt working#2 1_ETC_01,{while(da_var <= 4) { if(da_var < 4 ) { mes "you hit "+da_var; next; } else mes "you hit rock bottom"; da_var++;}close; } -
Angelmelody got a reaction from Zirius in How do you put item directly to the storage?
I convert it into a script command
*storeitem <item name or ID>,<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,"<char name>"or<account id>}; storeitem.c
-
Angelmelody reacted to AnnieRuru in how to declare a new PLAYER source variable in a plugin file
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
-
Angelmelody got a reaction from Zirius in How do you put item directly to the storage?
Have you tried this plugin?
http://herc.ws/board/topic/2457-storeitem/
-
Angelmelody reacted to Michi in Massive RE Monster DB Update
I finaly finish the Mob Skill DB update:
https://github.com/HerculesWS/Hercules/commit/744c3fc19a6681b80eb3d679fdd3914c2d7099f8
Now all mobs working as official
-
Angelmelody reacted to AnnieRuru in Maintenance mode
Download: 1.5
plugin
create table maintenance ( id int primary key auto_increment, account_id int, name varchar(23), reason varchar(99), minlv2connect tinyint, order_time datetime, start_time datetime, end_time datetime ) engine = innodb; .
remember to enable HPMHooking to enable this modification
plugins_list: [ /* Enable HPMHooking when plugins in use rely on Hooking */ "HPMHooking", .
.
Note:
sometimes the server countdown jumps 1 second ahead
this is normal because the timetick from time->add is unstable
so I use unix_time to synchronize the countdown to server time
.
.
so, if you found some script/source code having bugs and you need to shut down your server for a short while
then you come to the right place
.
@maintenance <Group ID can stay 1~99> <duration to kick in minute> <maintenance duration in minute> <reason> then a GM99 can commence the maintenance
Example : '@maintenance 40 5 10 need to fix announcer script'
every player with group ID 40 and below will be kick after 5 minutes
and the server will start counting down by an announcement,
during the maintenance of 10 minutes, group ID 40 and below will deny from login into the server
`maintenance` table will also generate a new line, with the `reason` field as 'need to fix announcer script'
which is useful to know when and how many times you did emergency server shutdown
though, the actual reason for using SQL is to persist the data after server shutdown
so the server will continue being in maintenance mode despite how many times you have shut down the server
until it times up ( `end_time` field ), or manually do `@maintenanceoff`
Note:
you can't generate a new line using 'INSERT INTO' Sql syntax when server is online
because I declare a bunch of variables to for them, for the purpose of saving memory consumption
you have to login the game and type `@maintenance` to initiate the maintenance mode, otherwise it wont work.
.
.
.
@maintenanceoff if you have already finished fixing the script/source code, and there's still a lot of time left
you can type '@maintenanceoff' to immediately turn off the maintenance mode so players can login before the schedule.
.
.
.
.
-- Script commands --
.
*maintenance <Group ID can stay 1~99>, <duration to kick in minute>, <maintenance duration in minute> { , <reason> }; .
.
actually I have no idea why I wanna make a script command ... maybe just for fun ?
.
- script jsdfksdj FAKE_NPC,{ OnMon0255: maintenance 40, 5, 60; end; } .
this will make an announcement on Monday, 2:55AM that the server will have a regular server maintenance starts from 3AM to 4AM
during that time, player with group ID 40 will be kicked and blocked from entering the server
the `reason` field in `maintenance` table will be defaulted to '*Regular server maintenance*'
.
maintenance 40, 5, 60, "系统保养";
this will overwrite the `reason` field in `maintenance` table to '系统保养' instead of regular maintenance
.
.
*maintenanceoff { <reason> }; uhh ... useless I think ...
.
.
*maintenancecheck( <type> ); use 'maintenance()' to check the server is currently in maintenance mode or not
return 0 if server is normal
return 1 if server is going to have maintenance
return 2 if server is having maintenance
all other types are meant to myself to debug this junk
-
Angelmelody reacted to daim in Make Diff or Patch File
After doing some google i think i found the solutions. This is the rite command.
git diff origin > patch.patch
-
Angelmelody got a reaction from AnnieRuru in HPM Hooking return random value from the defined function
maybe group_id will retrun memory address , try using *group_id instead
bool pc_authok_post( int retVal, struct map_session_data *sd, int *login_id2, time_t *expiration_time, int *group_id, struct mmo_charstatus *st, bool *changing_mapservers ) { ShowDebug ( "4. %s try to login. Value %d Group %d.", sd->status.name, *group_id, sd->group_id ); if ( sd->group_id < 99 ) { clif->authfail_fd( sd->fd, 1 ); return false; } return true;} -
Angelmelody reacted to Dastgir in bonus_script by cydh
WRONG WAY..(by chantging uint64 to unsigned int, you are lowering the limit of that variable, which can cause undesirable effects.)instead change that
%u
To
%" PRIu64 "
p.s: the priu64 should be outside the quotes, and not inside the quotes.
%d - int, supporting 2.14bil
%u - unsigned int, supporting 0-4.xx bil
Uint64 - supproting till billions of billions (correct this one, if I am wrong )
-
Angelmelody got a reaction from GmOcean in MapServer Crash - Equip2
IMO,I would add one more checking to prevent warnning on which the equiment already be equiped
ARR_FIND( 0, MAX_INVENTORY, i,( sd->status.inventory.nameid == nameid &&
sd->status.inventory.equip == 0 &&
sd->status.inventory.refine == ref &&
sd->status.inventory.attribute == attr &&
sd->status.inventory.card[0] == c0 &&
sd->status.inventory.card[1] == c1 &&
sd->status.inventory.card[2] == c2 &&
sd->status.inventory.card[3] == c3 ) );
-
Angelmelody got a reaction from evilpuncker in bonus_script by cydh
temporary patch for infinite duration when duration set to -1
infinite duration.patch
-
Angelmelody got a reaction from Quazi in bonus_script by cydh
pc.c inside pc_setoption function
pc.c@@ -8091,6 +8091,13 @@ int pc_setoption(struct map_session_data *sd,int type) clif->sc_end(&sd->bl,sd->bl.id,AREA,SI_WUGRIDER); status_calc_pc(sd,SCO_NONE); }+ + if( (sd->class_&MAPID_THIRDMASK) == MAPID_MECHANIC ) {+ if( type&OPTION_MADOGEAR && !(p_type&OPTION_MADOGEAR) )+ pc->bonus_script_clear(sd,BONUS_FLAG_REM_ON_MADOGEAR); // cydh bonus_script+ else if( !(type&OPTION_MADOGEAR) && p_type&OPTION_MADOGEAR )+ pc->bonus_script_clear(sd,BONUS_FLAG_REM_ON_MADOGEAR); // cydh bonus_script+ } if( (type&OPTION_MADOGEAR && !(p_type&OPTION_MADOGEAR)) || (!(type&OPTION_MADOGEAR) && p_type&OPTION_MADOGEAR) ) { -
Angelmelody got a reaction from AnnieRuru in Chat space limitation!/Scammer avoid *Will pay for help*
AFAIK, Alt+03232 = Alt+160
so just stristr( message, "xA0" )
-
Angelmelody reacted to AnnieRuru in Chat space limitation!/Scammer avoid *Will pay for help*
willingly to pay ? omg, I can send this as a birthday gift
patch
src/map/clif.c | 5 +++++ 1 file changed, 5 insertions(+)diff --git a/src/map/clif.c b/src/map/clif.cindex d9acf07..ede1a52 100644--- a/src/map/clif.c+++ b/src/map/clif.c@@ -9110,6 +9110,11 @@ bool clif_process_message(struct map_session_data *sd, int format, char **name_, *namelen_ = namelen; *message_ = message; *messagelen_ = messagelen;++ if ( stristr( message, " " ) != NULL ) {+ clif_displaymessage( fd, "You're only allowed to do max 3 spaces in a row." );+ 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 = { "max_3_space", // 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 ) { if ( stristr( (char*)RFIFOP( sd->fd ,4) + strnlen(sd->status.name, NAME_LENGTH-1) + 3, " " ) != NULL ) { clif->message( sd->fd, "You're only allowed to do max 3 spaces in a row." ); 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);} -
Angelmelody got a reaction from Ehwaz in disable @autoloot @autolootid for mvp ?
mob.c
inside function mob_item_drop()
find
&& (drop_rate <= sd->state.autoloot || pc->isautolooting(sd, ditem->item_data.nameid))
change to
&& ((drop_rate <= sd->state.autoloot || pc->isautolooting(sd, ditem->item_data.nameid)) && !md->db->mexp)
-
Angelmelody got a reaction from THPO in disable @autoloot @autolootid for mvp ?
mob.c
inside function mob_item_drop()
find
&& (drop_rate <= sd->state.autoloot || pc->isautolooting(sd, ditem->item_data.nameid))
change to
&& ((drop_rate <= sd->state.autoloot || pc->isautolooting(sd, ditem->item_data.nameid)) && !md->db->mexp)