|
mlparkerjr Newbie
Joined: 04 Oct 2018 Posts: 8 Location: PA
|
Posted: Wed Oct 10, 2018 12:13 am
Math is not working |
Trigger
You now have &cgold coins.
splgold = @cgold - @oldgold / %eval (%numitems (@plist)+1)
#forall @plist {give $@splgold %I}
Once I make a kill the below trigger happens to update my 'oldgold' before I pick up any
Trigger
^|| Gold Coins: &oldgold Experience Pts: &cexp (&needed needed)
I've tried to use #math and it didnt seem to work either. Different wasy to group the equation and it would return a 0 value. Now it's just puting splgold = cgold not sure what else to do.
Im trying to take the amount i picked up and divide by the number of ppl in my group list the +1 is to include myself and then give that split amount out to the group members. |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4702 Location: Pensacola, FL, USA
|
Posted: Wed Oct 10, 2018 1:28 am |
All equations now have to be in parenthesis, which makes the %eval function more or less redundant.
#MATH -should- work, but there is little reason to use it.
splgold = (@cgold - @oldgold / (%numitems(@plist)+1)) |
|
_________________ Discord: Shalimarwildcat |
|
|
|
mlparkerjr Newbie
Joined: 04 Oct 2018 Posts: 8 Location: PA
|
Posted: Thu Oct 11, 2018 12:29 am |
So I tried that it's still not doing anything but assigning the value of oldgold to splgold I also tried
splgold = (@cgold - @oldgold) / (%numitems(@plist)+1)
splgold = (@cgold - @oldgold / (%numitems(@plist)+1))
splgold = ((@cgold - @oldgold) / (%numitems(@plist)+1))
This is trigger after i pick up gold coins.
You now have &cgold coins.
after i kill a mob my score information is opened to get the current gold i have which is placed into the oldgold variable.
Trigger
^|| Gold Coins: &oldgold Experience Pts: @cexp (&needed needed)
(no script text) the value is assigned from the pattern. Is this maybe why im having the issue? |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4702 Location: Pensacola, FL, USA
|
Posted: Thu Oct 11, 2018 1:00 am |
Well, if you are having trouble getting the syntax right, I would make use of #SAY to ensure you are getting the proper values along the way.
That trigger may not even be firing at all
#SAY Fired!
#SAY oldgold is @oldgold when it should be %1
is a great way to test that |
|
_________________ Discord: Shalimarwildcat |
|
|
|
|
|