Jump to content

AnnieRuru

Script Developers
  • Content Count

    1677
  • Joined

  • Last visited

  • Days Won

    245

Everything posted by AnnieRuru

  1. I don't understand this whole thing about, actually I also confused when I test in game I didn't get the exp penalty when I'm level 170 killing a level 101 mob according to this table, I should have only 10% exp gain if I'm 40 levels higher than the mobs ... https://github.com/HerculesWS/Hercules/blob/master/db/re/level_penalty.txt yet, I'm still getting full exp - script kdsjfsfj -1,{OnNPCKillEvent: dispbottom "Lv: "+ getmonsterinfo( killedrid, MOB_LV ) +" BaseExp: "+ getmonsterinfo( killedrid, MOB_BASEEXP ) +" JobExp: "+ getmonsterinfo( killedrid, MOB_JOBEXP );}
  2. hmm, this map looks different from the one I saw in the video at rathena topic, 3 years ago but none-the-less, I can make good use of it after I google some "ragnarok event ideas" I have several links http://write.ratemyserver.net/ragnoark-online-tips-and-tricks/event-guide-list/ http://starlitero.freesmfhosting.com/index.php?topic=13.0 that one, Run for the Basilica Event that's the one that I kept searching for days since I open this topic I remember I saw this somewhere in script support section on eathena forum about 5~7 years ago but I kept finding and searching with different key word, no result and someone else actually post it out, twice in fact by different person it seems to be quite a popular event I actually know how to write it use movespeed mapflag (I already release it) to limit the movement speed of the players then use MOBEVENT_ATTACK flag to unitwarp the player instantly out from the map whenever a mob attack a player if the player reach the other end of the map, it trigger OnTouch label and gives the prize the basillica effect can be simulated with OnTouchNPC: to warp monster out from that zone there are some ideas that can be written as event script like the mimic event, all players gather in a small map, like run or die event then spawn a mimic in the map, it *gulp* all the player it ran across any player hit by this mimic will instantly warp out from the map the last one in the remaining map wins the rest have already turn into scripts like disguise event, portal event, find the mushroom event, guess the password event that guess the password event is in the rejected list by the way, the script already provided on the 1st post
  3. https://github.com/HerculesWS/Hercules/blob/master/src/map/mob.c#L2298-L2302 yup, I also just knew about this
  4. AnnieRuru

    Stylist

    yeah, I also got client error when using oboro job prontera,165,176,1 script Stylist HIDDEN_NPC,{ .@choose = select( "Hair style", "Hair color", "Cloth color" ); if ( .@choose == 3 && ( Class == Job_Novice || BaseClass == Job_Ninja ) ) { mes "You are disallow to change cloth color"; close; } .@part = .look[.@choose]; .@i = .@revert = getlook( .@part ); while ( true ) { setlook .@part, .@i; dispbottom "This is style #"+ .@i +"."; .@next = ( .@i == .maxstyles[.@part] )? 0 : .@i+1; .@previous = ( .@i == 0 )? .maxstyles[.@part] : .@i-1; switch ( select( " ~ Next (^0055FF"+ .@next +"^000000)", " ~ Previous (^0055FF"+ .@previous +"^000000)", " ~ Jump to...", " ~ Revert to original (^0055FF"+ .@revert +"^000000)" ) ) { case 1: .@i = .@next; break; case 2: .@i = .@previous; break; case 3: dispbottom "Choose a style between 0 - "+ .maxstyles[.@part] +"."; input .@i, 0, .maxstyles[.@part]; break; case 4: .@i = .@revert; } } end;OnInit: .maxstyles[LOOK_HAIR] = getbattleflag("max_hair_style"); .maxstyles[LOOK_HAIR_COLOR] = getbattleflag("max_hair_color"); .maxstyles[LOOK_CLOTHES_COLOR] = getbattleflag("max_cloth_color"); setarray .look[1], LOOK_HAIR, LOOK_HAIR_COLOR, LOOK_CLOTHES_COLOR; end;}
  5. AnnieRuru

    Blade Stop

    this has to do source edit under pc_useitem, check SC_BLADESTOP, return false
  6. use sprintf I already did that on some of my script https://drive.google.com/file/d/0B2BM920mmHQgeElaSG5XakNqNVU/view . . mes "How much do"; mes "12 Red Potions,"; mes "1 Butterfly Wing"; mes "and 5 Fly Wings cost"; mes "after a 24 % discount?";into mes "How much do"; mes sprintf("12 %s,", getitemname(Red_Potion)); mes sprintf("1 %s", getitemname(Wing_Of_Butterfly)); mes sprintf("and 5 %s cost", getitemname(Wing_Of_Fly)); mes "after a 24 % discount?";.. EDIT: and our clif->message all uses sprintf isn't it =/ EDIT2: we are missing some text manipulation like rathena has https://github.com/rathena/rathena/blob/master/npc/other/Global_Functions.txt#L429 EDIT3: prontera,155,185,5 script kjdhsfsjhf 1_F_MARIA,{ mes sprintf(_("How much dor" "12 %s,r" "1 %sr" "and 5 %s costr" "after a 24 %% discount?"), getitemname(Red_Potion), getitemname(Wing_Of_Butterfly), getitemname(Wing_Of_Fly)); close;}credit to Haru for finding out r can do line break in mes
  7. honestly, status_calc_pc should have split into multiple functions ... if we have follow the Linux Kernel Coding Style in my opinion, status_calc_pc_additional function shouldn't even exist ... parse equipment, should has its own function, parse card, its own function so we can just post-hook to that function, instead of having a function doing nothing out in the middle of it =/ ok let me try code this bAddMaxWeight, that has been in our repo and turn it as a plugin #include "common/hercules.h"#include <stdio.h>#include <stdlib.h>#include <string.h>#include "map/pc.h"#include "map/map.h"#include "common/nullpo.h"#include "common/HPMDataCheck.h"HPExport struct hplugin_info pinfo = { "baddweight", SERVER_TYPE_MAP, ">.<", HPM_VERSION,};int SP_ADDWEIGHT = 0;int pc_bonus_pre( struct map_session_data *sd, int *type, int *val ) { nullpo_ret(sd); if ( *type == SP_ADDWEIGHT ) { if ( sd->state.lr_flag != 2 ) { sd->max_weight += *val; hookStop(); } } return 0;}HPExport void plugin_init (void) { SP_ADDWEIGHT = map->get_new_bonus_id(); script->set_constant( "baddweight", SP_ADDWEIGHT, false ); addHookPre( "pc->bonus", pc_bonus_pre );} - script dfbskfh -1,{OnPCStatCalcEvent: bonus baddweight, 10000000;}hmmm ... totally possible,I just noticed there is a map->get_new_bonus_id() in our repo, somebody must have use this stuff before already so don't have to add whatever function anymore . . and for the topic, I rather say there are 2 problems with it 1. bonus bAddMaxWaight, 1000; I think the bonus command, the 1st field should always be a constant this kind of typo makes the script engine read the bAddMaxWaight as a player variable and currently our script engine 'i' type cannot differentiate integer, constant or player variable maybe we can add a 'c' type, to enforce a check that field only accept constant BUILDIN_DEF(bonus,"cv"),however, this is still a run-time check, our script engine still suxbut the script->report_data function will able to print the variable name out I can pull request this soon 2. and to actually having to print where the error come from, item ? pet ? combo ? perhaps the run_script function should have an optional field 'flag' and 'line', so the 'pc_bonus' and 'status_change_start' function can tell where the error come from this kind of stuffs should be done in the new script engine update though I kinda lost interest in this, better left this to Haru
  8. check Haru's post pc->setreg(sd, script->add_str("@expire_uniqueid_lo"), (int)(sd->status.inventory[i].unique_id&0xffffffff));pc->setreg(sd, script->add_str("@expire_uniqueid_hi"), (int)((sd->status.inventory[i].unique_id>>32)&0xffffffff));
  9. I already said in that topic 1. player still can kill steal the mvp 2. mvp still can summon slave 3. mvp can teleport mf_monster_noteleport the 1st one can be solve by MOBDATA_KILLER flag 2nd one can solve by MD_NOCASTSKILL flag enable there is still a lot limitation in our monster controller commands ... rathena already have them, though I have to complete mob controller script commands if there is a chance for this script EDIT: prontera,155,185,5 script djsfksjf 1_F_MARIA,{ getmapxy .@map$, .@x ,.@y, UNITTYPE_NPC; monster .@map$,.@x-3,.@y,"AI 0",1273,1, strnpcinfo(0)+"::Onaaa",0,0; monster .@map$,.@x+3,.@y,"AI 1",1023,1, strnpcinfo(0)+"::Onaaa",0,1; end;Onaaa: announce "win", bc_all; end;}hmm ... so it can run event label, no so bad
  10. https://rathena.org/board/topic/74316-event-mvp-vs-mvp/?p=157235 yup there is no scripts, it has to host by GM if really have to make it into script, maybe require some source edits ... to make monster fight each other maybe that ... setmobdata ...
  11. I think its safe, since the day I fixed that digitalhanster's patch on eathena forum, I never heard anything wrong about that and I'm sure that patch is still used by many rathena server out there the one made by dastgir can dup item, because originally, the status_calc_pc should run AFTER the item deleted, but he made it run before the item deleted, thus it never has the chance to run memset into null https://github.com/HerculesWS/Hercules/blob/22d3fac0c9a9c39a4f3b544867ba1de4d8d2ecaa/src/map/pc.c#L4553-L4554 the item memory is still there thus can duplicate the item I solved it with a little trick, its on the comment I just tested with the *mergeitem script command yup, I also can't reproduce any bug with the "Charm_Stack: false", I have 10 jellopy, the merge window doesn't show the jellopy
  12. https://github.com/HerculesWS/Hercules/pull/1046 the way it calculate the unique ID is https://github.com/HerculesWS/Hercules/blob/09a2201e0d8563608a421378970f9d9ae6bc38bc/src/map/itemdb.c#L1922 return ((uint64)sd->status.char_id << 32) | sd->status.uniqueitem_counter++;which is, there is an upper value and lower value the upper value is the char ID, move 32 bits left and the left over, lower value is unique item counter you can try this in your test server SELECT char_id, unique_id, unique_id >>32, unique_id & ((1<<32)-1) FROM inventory where unique_id <> 0;SELECT char_id, unique_id, unique_id >> 32 & 0xffffffff, unique_id & 0xffffffff FROM inventory where unique_id <> 0;the reason why its implement this way has explained by Haru and hemagx, its for multiple map-server supportsince there can be only 1 char can connect to a map-server at a time in other words, I think this unique ID should be split into 2 value @inventorylist_uid_char = return the upper value of unique ID @inventorylist_uid_counter = return the lower value of unique ID the way rathena return the value in 64bits is just ... hilarious to me *getitem return a value since the upper value is always its char ID, I guess can make it return the sd->status.uniqueitem_counter instead EDIT: just tested, the counter start from 0, so it has to return -1 for error *hasuniqueid, deleteuniqueid this is tough, it has to search through `inventory`, `cart_inventory`, `storage`, `guild_storage`, `mail` and `auction` table its better to do this via SQL
  13. @@Dastgir I also noticed we can't add custom bonuses for a plugin are you interest in doing this? EDIT: ... hmm... maybe its possible with using addHookPre, and then hookStop() ... but seriously, this should be official instead of plugin
  14. 1.4 plugin - update to new plugin format - fix possible memory leak when a player input a fail message - change all i++ into ++i - no longer overwrite @reloadscript, hook to npc_reload function instead - since clif->messagecolor_self has been fixed, use that command in chat_joinchat_pre function - add configuration for player has a cart/mount/mado, the clone can display these items as well --- for me, it feels weird ... peco and cart is 1 thing, but warg and falcon ... ? - now player can choose to use their favorite color in their AFK message from a list - since all killmonster at/script functions looks the same, all of them hook to 1 same function 1.4a just optimize the OPTION area
  15. @@thor1009 the script link is dead, but the video alone is enough for me to reproduce that ok I can do it need 2 plugins like OnPCAttackEvent ... and another one for stop player attack the infected players nice idea @@Mysterious I always try to give credit to the one who came out with the idea, not the one who fix it https://www.eathena.ws/board/index.php?s=&showtopic=243601&view=findpost&p=1525757 the comment says all //Created by marikitangakak//Edited and Revised by Lunar from MoonlightRO//Original Link: http://www.eathena.ws/board/index.php?showtopic=243601//Edited and Revised Script Link: http://www.eathena.ws/board/index.php?showtopic=243753//Please do not take this script as your own.all you did is just fix the script https://www.eathena.ws/board/index.php?showtopic=243753 yup, I saw the -> Idea by: marikitangakak
  16. I actually found a bug in our repo while writing this plugin it seems that when nightenabled mapflag is on, and atcommand @@Night, when the player with soul link buff wear off, the night effect disappear until the player switch map src/map/clif.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)diff --git a/src/map/clif.c b/src/map/clif.cindex a26fece..f474d23 100644--- a/src/map/clif.c+++ b/src/map/clif.c@@ -17580,8 +17580,15 @@ void clif_status_change_end(struct block_list *bl, int tid, enum send_target tar nullpo_retv(bl); - if( bl->type == BL_PC && !((TBL_PC*)bl)->state.active )- return;+ if (bl->type == BL_PC) {+ TBL_PC *sd = BL_CAST(BL_PC, bl);+ if (!(sd->state.active))+ return;+ ShowDebug("%d %d %d %d", map->night_flag, map->list[sd->bl.m].flag.nightenabled, type, SI_SOULLINK );+ if (map->night_flag && map->list[sd->bl.m].flag.nightenabled && type == SI_SOULLINK) // player still has the blue aura ...+// if (map->night_flag && map->list[sd->bl.m].flag.nightenabled && type == SI_SKE) // doesn't work+ return;+ } p.PacketType = status_change_endType; p.index = type;but I don't know the correct code to fix it,in clif_parse_LoadEndAck function, it uses SI_SKE, but doesn't work, because the type doesn't match but when use SI_SOULLINK, the player still having the blue aura ... @@Vlync plugin @@Angelmelody nope, this patch only turns 1 single map to night mode I remember I saw this patch on eathena forum https://www.eathena.ws/board/index.php?showtopic=273585 EDIT: good... now there is another member name @@Night ....
  17. nope, tested, this modification only stop gain exp normally it doesn't stop MVP exp also, the one who should stop gaining exp, can still gain exp by having other party member kill the monster for him/her with party share exp enabled @@Vlync http://herc.ws/board/topic/11587-maxlvexpgain/
  18. I saw a lot of methods on how to stop players from gaining exp after certain level but all of them have flaws, so I release mine, its from my google drive Download: 1.3 plugin Full Description of what this plugin DO stop players gain exp through killing monsters, mvp exp, or share party experience allows to gain exp by *getexp script command or BaseExp++ / JobExp++ allows players to pay guild tax exp after they hit your capped level value if your server has heal_exp, resurrection_exp or shop_exp enable, they will stop gain exp from these action after they hit your cap level if the player do SA_LEVELUP ( a random skill from Hocos-Pocus ) after the cap level, they can't gain exp if it doesn't follow this list, then this is bug there is a small issue with this plugin, everything else in the above list will still works, don't worry, tested
  19. setunitdir prontera,155,185,5 script sdfjhsdfk FAKE_NPC,2,2,{ pushpc DIR_NORTH, 5; setunitdir getcharid(3), DIR_NORTH, DIR_HEAD_FRONT;}
  20. /*========================================== * /resetfeel [Komurka] *------------------------------------------*/int pc_resetfeel(struct map_session_data* sd){ int i; nullpo_ret(sd); for (i=0; i<MAX_PC_FEELHATE; i++) { sd->feel_map[i].m = -1; sd->feel_map[i].index = 0; pc_setglobalreg(sd,script->add_str(pc->sg_info[i].feel_var),0); } return 0;}int pc_resethate(struct map_session_data* sd){ int i; nullpo_ret(sd); for (i = 0; i < MAX_PC_FEELHATE; i++) { sd->hate_mob[i] = -1; pc_setglobalreg(sd,script->add_str(pc->sg_info[i].hate_var),0); } return 0;}just make a script command to run these 2 functions
  21. no, better use pushpc script command prontera,155,185,5 script sdfjhsdfk FAKE_NPC,2,2,{ pushpc DIR_NORTH, 5;}if want to change player's facing direction, can try setunitdir custom script command
  22. upload version 1.1 https://drive.google.com/file/d/0B2BM920mmHQganoxY0hTUktkUzQ/view please make do with the google drive, because I accidentally upload the paste without log in - added Charm_Stack: true flag, credit to Litro and Kong for the idea - however it always run the status_calc_pc even if the player still having the item in the inventory and I'm going to watch star wars on the theater now
  23. yes, that member is hemagx http://herc.ws/wiki/Building_HPM_Plugin_for_MSVC I already updated the wiki and many people complain about the pink color notepad++ lol
  24. yes,when I test, having 2 jellopy, my str bonus become +20000 . . nice idea actuallymaybe can add another field "Stack_Charm: true" to only give 1 effect per item ID
  25. AnnieRuru

    Charms

    Download: 1.6 plugin tested with { Id: 909 AegisName: "Jellopy" Name: "Jellopy" Buy: 6 Weight: 10 BuyingStore: true Charm: true // Charm_Stack: true Script: <" bonus bStr, 10000; "> OnEquipScript: <" sc_start4 SC_ENDURE,60000,10,0,0,1; hateffect HAT_EF_BOTTOM_BLOODYLUST, true; "> OnUnequipScript: <" sc_end SC_ENDURE; hateffect HAT_EF_BOTTOM_BLOODYLUST, false; "> // OnRentalStartScript: <" dispbottom "rent start"; "> // OnRentalEndScript: <" dispbottom "rent end"; "> }, just having Jellopy inside inventory will get bonus Remember: it has to use IT_ETC type item, which has been default to type 3 if you didn't specify and also "Charm: true" flag if added the "Charm_Stack: true" flag, the charms will stack - if the flag is false (default), having 10 same charms will give bonus 10 times, because they are separate items - if the flag is true, having 10 same charms will only give bonus once, because they are stack together version 1.3 onwards, added nocharms mapflag http://herc.ws/board/topic/15219-modification-to-noitem-plugin/ to disable charms bonuses given in certain maps prontera mapflag nocharms disable all charms from taking effect on the map prontera mapflag nocharms 909 prontera mapflag nocharms Jellopy disable only this 'Jellopy' charm from giving bonus version 1.5 onwards, added OnEquipScript and OnUnequipScript support now you can gives permanent SC_ENDURE bonus like eddga card like effect or gives hateffect bonus like the example shown credit to digitalhamster in case you guys forgotten, I fixed digitalhamster's patch on eathena forum 4 years ago and the one in rathena also credited my name and if you like this plugin, remember to also repup Dastgir's post in this topic because I copy paste most of his stuffs
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.