Jump to content
Maintenance ×
×
×
  • Create New...
  • 0

How to stack affect.add ? (or other ways)


HisaoShou

Question

I'd like to know how I could stack affect.add ? 

At the moment , the function work only once, it does not stack if another affect.add is added over .

How can I make it work?

OR, is there any other way to give a permanent bonus to the player  which stacks?

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0
Acum 6 ore, ElBrujoo a spus:

If you want a bonus that is stacked like chaegirab you can use affect.add_collect(), i think it s the simplest way

It doesn't stack.

affect.add_collect() + affect.add_collect() = don't stack

affect.add_collect() + affect.add() = stack ONCE 

I need them to be stacking more, like affect.add_collect() + affect.add_collect() + affect.add_collect() + affect.add_collect() and so on

Link to comment
Share on other sites

  • 0
19 hours ago, HisaoShou said:

It doesn't stack.

affect.add_collect() + affect.add_collect() = don't stack

affect.add_collect() + affect.add() = stack ONCE 

I need them to be stacking more, like affect.add_collect() + affect.add_collect() + affect.add_collect() + affect.add_collect() and so on

That's EXACTLY what the affect.add_collect() is supposed to do. However to be 100% sure I tested and it worked stacking a bonus. If you still can't make it work I could help you on skype-> xelbrujoox

Link to comment
Share on other sites

  • 0
Acum 2 ore, ElBrujoo a spus:

That's EXACTLY what the affect.add_collect() is supposed to do. However to be 100% sure I tested and it worked stacking a bonus. If you still can't make it work I could help you on skype-> xelbrujoox

Ok , then try to stack exactly the same values. 

Try this:  affect.add_collect(apply.INT,10,60*60*24*300*59) + affect.add_collect(apply.INT,10,60*60*24*300*59) + affect.add_collect(apply.INT,10,60*60*24*300*59)

It won't stack more than two times.

Link to comment
Share on other sites

  • 0

Maybe your affect collect function is not the same as mine but i don t think that s the case. I ve tested however and all works:
Before all:

Spoiler

d7dfa78de8d247d823a45514f74418ac.png

Then the npc:

Spoiler

163742399584b484db2edf86aece636b.png

I pressed "Stack mob":

Spoiler

2bf197c16fb946d35385f187d42e366b.png

and then the stack mob 2:

Spoiler

bf68cfd3e3f3cee1f41738ff536987c7.jpg

what they do is this:

        when 20094.chat."stack mob" begin
            say("Ok")
            affect.add_collect(apply.INT,10,60*60*24*300*59)
        end

        when 20094.chat."stack mob 2" begin
            say("Ok")
            affect.add_collect(apply.INT,10,60*60*24*300*59)
            affect.add_collect(apply.INT,10,60*60*24*300*59)
            affect.add_collect(apply.INT,10,60*60*24*300*59)
        end

 

If u need help i'll wait you on skype

 

PS: by the way I pressed the mob stack two times more, the stack 2 added only 30 int.

Link to comment
Share on other sites

  • 0
  • Honorable Member

questlua_affect.cpp

search for: int affect_add(lua_State * L)

delete this part:

 

if (ch->FindAffect(AFFECT_QUEST_START_IDX, applyOn)) // 퀘스트로 인해 같은 곳에 효과가 걸려있으면 스킵
  return 0;
  • Love 1

WRnRW3H.gif

Link to comment
Share on other sites

  • 0

Can i refresh this topic?
Im trying to stack by affect_collect, i even deleted part above and bonuses dont stack.
It wont stack if i get same bonus value, for example: 10 movement speed,
i can take 2x 10 movement and get 20, but if i relog, teleport to other map bonuses are reset to 10
i can stack different values, 1 2 3 4 5 etc
but if i add 1 2 3 5 5 6 7 6 then i will get only 24

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.


  • Activity

    1. 3

      Back to the Dungeon System 7, 8, 9th Floor Problem

    2. 3

      Back to the Dungeon System 7, 8, 9th Floor Problem

    3. 3

      Back to the Dungeon System 7, 8, 9th Floor Problem

    4. 0

      Some mobs dont drop items

    5. 3

      Back to the Dungeon System 7, 8, 9th Floor Problem

    6. 691

      [Group] Daily Music - Share your favorite!

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.