The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Experience in group !
Author Message
kevin465
Journeyman
*

Posts: 67
Likes Given: 1
Likes Received: 4 in 4 posts
Joined: Feb 2014
Reputation: 0

UO Reborn

Post: #1
Experience in group !
Ok i just want to know... my ancient lvl systems give experiance to all players hit the mobs...but now my new just give experience to one player...5 player can hit the mobs but only one have the experience ... how fix that ?

Anciant lvl system
Code:
[EVENTS e_exp]
ON=@CLICK
VAR.X=<EVAL <oSTR> /6>
IF !(0<VAR.X>)
    VAR.X=1
ENDIF
message @025,3 (Level: <EVAL <VAR.X>>)

ON=@DEATH
SRC.TAG.KS=
VAR.OLD_ACT=<ACT>
VAR.X1=<EVAL <oSTR> /1> +<EVAL <oSTR> /1>
VAR.X=<EVAL {<VAR.X1> <oSTR>}>
SRC.f_experience
ACT=<VAR.OLD_ACT>
VAR.X1=


[EVENTS e_exp_1]
ON=@CLICK
VAR.X=<EVAL <oSTR> /1>
IF !(0<VAR.X>)
    VAR.X=1
ENDIF

New lvl system
Code:
ON=@DEATH
VAR.OLD_ACT=<SRC.ACT.UID>
FINDID.i_memory_spelleffect_agility.REMOVE
FINDID.i_memory_spelleffect_cunning.REMOVE
FINDID.i_memory_spelleffect_strength.REMOVE
FINDID.i_memory_spelleffect_feeblemind.REMOVE
FINDID.i_memory_spelleffect_clumsy.REMOVE
FINDID.i_memory_spelleffect_weaken.REMOVE
FINDID.i_memory_spelleffect_bless.REMOVE
FINDID.i_memory_spelleffect_curse.REMOVE
FINDID.i_memory_spelleffect_chameleon.REMOVE
FINDID.i_memory_spelleffect_regeneration.REMOVE
IF !( <SRC.FLAGS> & statf_conjured )
    VAR.EXP=<EVAL <EVAL <SRC.SKILLTOTAL> /10> +<EVAL <SRC.OSTR> +<SRC.ODEX> +<SRC.OINT>> +<EVAL <SRC.MAXHITS> +-<SRC.OSTR>>>
    VAR.EXP_TEMP1=<EVAL <EVAL <VAR.EXP> *<EVAL <SRC.ARMOR> +<EVAL <SRC.AR> +-<SRC.ARMOR>>>> /1000>
    VAR.EXP_TEMP2=<EVAL <EVAL <VAR.EXP> *<EVAL {<SRC.DAM>}>> /1000>
    VAR.EXP=<EVAL <VAR0.EXP> +<VAR0.EXP_TEMP1> +<VAR0.EXP_TEMP2>>
    IF (<SRC.TAG0.MODEXP>)
        VAR.EXP=<SRC.TAG.MODEXP>
    ENDIF
    IF (<VAR0.EXP> < 1)
        VAR.EXP=1
    ENDIF
    VAR.EXP_TEMP1=
    VAR.EXP_TEMP2=
    SRC.EXPERIENCE
    VAR.EXP=
ENDIF
SRC.ACT=<VAR.OLD_ACT>
VAR.OLD_ACT=
RETURN 0

Thanks everybody !
04-03-2014 07:14 PM
Find all posts by this user Like Post Quote this message in a reply
Runcuks
Journeyman
*

Posts: 179
Likes Given: 5
Likes Received: 3 in 3 posts
Joined: Nov 2012
Reputation: 0



Post: #2
RE: Experience in group !
On=@death
obj=<tag.killer>
obj.expgain 1


Player who done them most damage will get the exp when monster die
04-03-2014 11:37 PM
Find all posts by this user Like Post Quote this message in a reply
kevin465
Journeyman
*

Posts: 67
Likes Given: 1
Likes Received: 4 in 4 posts
Joined: Feb 2014
Reputation: 0

UO Reborn

Post: #3
RE: Experience in group !
ok but i want all player have the experience when monster die but just if he hit him !
04-04-2014 02:08 AM
Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #4
RE: Experience in group !
Code:
WHILE (<ATTACKER.<LOCAL._WHILE>>)
  REF1=<ATTACKER.<LOCAL._WHILE>>
  REF1.Experience <eval <VAR0.EXP>/<ATTACKER>>  //this will divide the exp to each attacker instead give the full exp to everyone
ENDWHILE

btw you can optimize this code
Code:
ON=@Death
FINDID.i_memory_spelleffect_agility.REMOVE
FINDID.i_memory_spelleffect_cunning.REMOVE
FINDID.i_memory_spelleffect_strength.REMOVE
FINDID.i_memory_spelleffect_feeblemind.REMOVE
FINDID.i_memory_spelleffect_clumsy.REMOVE
FINDID.i_memory_spelleffect_weaken.REMOVE
FINDID.i_memory_spelleffect_bless.REMOVE
FINDID.i_memory_spelleffect_curse.REMOVE
FINDID.i_memory_spelleffect_chameleon.REMOVE
FINDID.i_memory_spelleffect_regeneration.REMOVE
IF (<FLAGS> & statf_conjured)
  return 0
ENDIF
LOCAL.ExpBase = <eval (<SKILLTOTAL>/10)+(<OSTR>+<ODEX>+<OINT>)+(<MAXHITS>-<OSTR>)>
LOCAL.Exp = <LOCAL.ExpBase>
LOCAL.Exp += <eval (<LOCAL.ExpBase>*(<ARMOR>+(<AR>-<ARMOR>)))/1000>
LOCAL.Exp += <eval (<LOCAL.ExpBase>*{<DAM>})/1000>
IF (<TAG0.MODEXP>)
  LOCAL.Exp = <TAG0.MODEXP>
ENDIF
IF (<LOCAL.Exp> < 1)
  LOCAL.Exp = 1
ENDIF
WHILE (<ATTACKER.<LOCAL._WHILE>>)
  REF1=<ATTACKER.<LOCAL._WHILE>>
  REF1.ExpIncrease <eval <LOCAL.Exp>/<ATTACKER>>
ENDWHILE
you can optimize a bit more, I just leave it this way because it's better to you undestand the code
(This post was last modified: 04-04-2014 04:35 AM by Coruja.)
04-04-2014 03:56 AM
Find all posts by this user Like Post Quote this message in a reply
kevin465
Journeyman
*

Posts: 67
Likes Given: 1
Likes Received: 4 in 4 posts
Joined: Feb 2014
Reputation: 0

UO Reborn

Post: #5
RE: Experience in group !
that dont work.. im on 56b ...
04-04-2014 07:12 AM
Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #6
RE: Experience in group !
this code works fine on 56b

you need to add this event on all npc's on this section of sphere.ini:
Code:
// Events related to all NPCs
EventsPet=e_exp
and replace the "ExpIncrease" line to match what you're using as exp, maybe
EXP += <eval <LOCAL.Exp>/<ATTACKER>>
or
SRC.TAG.Exp += <eval <LOCAL.Exp>/<ATTACKER>>
(This post was last modified: 04-05-2014 01:09 PM by Coruja.)
04-05-2014 01:07 PM
Find all posts by this user Like Post Quote this message in a reply
kevin465
Journeyman
*

Posts: 67
Likes Given: 1
Likes Received: 4 in 4 posts
Joined: Feb 2014
Reputation: 0

UO Reborn

Post: #7
RE: Experience in group !
ok i try this today thanks coruja Smile
04-05-2014 07:07 PM
Find all posts by this user Like Post Quote this message in a reply
kevin465
Journeyman
*

Posts: 67
Likes Given: 1
Likes Received: 4 in 4 posts
Joined: Feb 2014
Reputation: 0

UO Reborn

Post: #8
RE: Experience in group !
no coruja always one guys have the exp ! i replace the expincrease line by my exp and always one have the exp
04-06-2014 02:08 AM
Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #9
RE: Experience in group !
strange, it works fine here
if you post the entire script it will be easier to find whats wrong
04-07-2014 04:49 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)