Jump to content

LuneR

Members
  • Posts

    3
  • Joined

  • Last visited

LuneR's Achievements

Poring

Poring (1/15)

  • One Month Later
  • First Post
  • Conversation Starter
  • Week One Done

Recent Badges

0

Reputation

  1. Hello, I'd like to request a sc addition. It regards the creation of new item bonuses that change attack element and armor element everytime you attack/get attacked. It'd be just like SP_ATKELE & SP_DEFELE, except instead of a permanent element, it'd be randomly/dynamically changed. Any help appreciated.
  2. It's a recent revision (1 month old or so). I'll take a look into skill.cpp, I wasn't aware that was where the status was actually applied. I'll copy the addeff part and try adjusting the code a bit more. Thanks for your time.
  3. Hello, fellow rAtheners, I'm trying to create a new bonus based on AddEff, but which relies on prng/prd instead of uniform chance. I followed the guide on rathena/wiki/Adding-New-Bonuses. The idea is using prd to lessen lucky/unlucky streaks. What I'm trying to achieve is basically this: On every hit: if (proc) {reset chance to initial rate} else {increase rate by C} What I got so far: 1. SP_ADDEFF_PRNG added to map.h 2. On pc.h, I added (copied from addeff): struct s_addeffect_prng { enum sc_type sc; /// SC type/effect int rate, C; /// Rate (rate should increase by C everytime a proc fails) short arrow_rate; /// Arrow rate unsigned char flag; /// Flag unsigned int duration; /// Duration the effect applied }; 3. status.c, I added sd->addeff_prng.clear(); to the list of sd->addeff.clear(), sd->xyz.clear() etc. 4. pc.c, I copied the original AddEff case and put an extra 0 in the arguments. case SP_ADDEFF_PRNG: // bonus2 bAddEff_Prng,eff,n; PC_BONUS_CHK_SC(type2,SP_ADDEFF_PRNG); pc_bonus_addeff_prng(sd->addeff_prng, (sc_type)type2, sd->state.lr_flag != 2 ? val : 0, sd->state.lr_flag == 2 ? val : 0, 0, 0, 0); break; 5. scripts_constants.h, I added export_constant2("bAddEffPrng", SP_ADDEFF_PRNG); to the parameters list. 6. Finally, again in pc.c, I cloned the AddEff function, then modified it a bit (in bold). I tried some different stuff, no luck: The code did compile, but did not produce the intended results. I altered the savage baby card to use the bonus, but it never stunned/froze any monsters at all. I tried adding a message on the added if/else block to check if it was working, but instead of working on hits, it sent the messages when equipping the weapon (and only sent messages on successful procs, never on fails). I also tried looking at battle.c, but couldn't find any 'roll chance for status' sort of stuff there. What am I doing wrong? Any help would be appreciated.
×
×
  • Create New...