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
No stat cap...
Author Message
admin_teclis
Journeyman
*

Posts: 51
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Aug 2012
Reputation: 0

Age of Apocalypse

Post: #1
No stat cap...
Salve a tutti,
ho fatto uno script per razza e relativo event installato per controllare lo stat cap..
Prima funzionava... stasera vado a riprovare e non funziona.. Mi spiegate cosa c'รจ che non va?

This code:

PHP Code:
[ITEMDEF i_elfo
ID=i_moongate_red 
NAME
=Portale Razza Elfica 
TYPE
=t_telepad 

ON
=@CREATE
COLOR 016A
ON
=@STEP 
if <src.tag.RAZZA> != 
SAYUA 0088a 3 0 1 
"La tua Razza e' permanente!"
 
return 1
endif
if ((<
src.body> == c_man) || (<src.body> == c_woman))
if (<
src.body> == c_man)
SRC.NAME=<SRC.NAMEl'Elfo
   else
   SRC.NAME=<SRC.NAME> l'
Elfa
endif
SRC.COLOR=016a
SRC
.oskin 016a
src
.TAG.RAZZA=1
src
.EVENTS e_stat_elfo
src
.say "Adesso sei un Elfo!"
SOUND=snd_SPELL_HEAL
IF <SRC.STR> >= 110 // Str Cap
say " Stat cap superato!"
 
SRC.STR=110
    
ENDIF
    IF <
SRC.INT> >= 60  // Int Cap
say " Stat cap superato!"
 
SRC.INT=60
    
ENDIF
    IF <
SRC.DEX> >= 190 // Dex Cap
say " Stat cap superato!"
 
SRC.DEX=190
ENDIF

[
EVENTS e_stat_elfo]

ON=@EnvironChange

//IF !(<SRC.FINDID.i_rune_bless>) 
IF ((<SRC.FLAGS> & STATF_POLYMORPH) || (<SRC.FINDLAYER(LAYER_SPELL_STATS)>) || (<SRC.FINDLAYER(LAYER_FLAG_Potion)>) || (<SRC.FINDLAYER(LAYER_FLAG_Hallucination)>))
return 
1
endif
IF !((<
SRC.FLAGS> & STATF_POLYMORPH) || (<SRC.FINDLAYER(LAYER_SPELL_STATS)>) || (<SRC.FINDLAYER(LAYER_FLAG_Potion)>) || (<SRC.FINDLAYER(LAYER_FLAG_Hallucination)>))


IF (<eval <
SRC.STR>> > 110)
say @2545 Stat cap superato!
SRC.STR=110
ENDIF

IF (<eval <
SRC.DEX>> > 190)
say @2444 Stat cap superato!
SRC.DEX=190
ENDIF

IF (<eval <
SRC.INT>> > 60)
say @2441  Stat cap superato!
SRC.INT=60
ENDIF

IF (<EVAL <
SRC.STR>+<SRC.DEX>+<SRC.INT>> > 301)
say @2545 Stat cap superato!
IF (<EVAL <
SRC.DEX>> > <EVAL <SRC.INT>>)
SRC.INT=(<SRC.INT>+(-1))
RETURN 
1
ENDIF

ENDIF
endif
ENDIF

[
ITEMDEF i_elfo_alto
ID=i_moongate_red
NAME
=Portale Razza Elfo Alto
TYPE
=t_telepad 

ON
=@CREATE
COLOR 0547
ON
=@STEP 
if <src.tag.raZZA> != 
SAYUA 0088a 3 0 1 
"La tua Razza e' permanente!"
 
return 1
endif
if ((<
src.body> == c_man) || (<src.body> == c_woman))
if (<
src.body> == c_man)
SRC.NAME=<SRC.NAMEl'Elfo Alto
   else
   SRC.NAME=<SRC.NAME> l'
Elfa Alta
endif
SRC.COLOR=0547
SRC
.oskin 0547
src
.TAG.RAZZA=2
src
.EVENTS e_stat_elfo_alto
sayua 0098c 003 54 0 
"Adesso sei un Elfo Alto!"
SOUND=snd_SPELL_HEAL
IF <SRC.STR> >= 110 // Str Cap
src.say " Stat cap superato!"
 
SRC.STR=110
    
ENDIF
    IF <
SRC.INT> >= 190  // Int Cap
src.say " Stat cap superato!"
 
SRC.INT=190
    
ENDIF
    IF <
SRC.DEX> >= 60 // Dex Cap
src.say " Stat cap superato!"
 
SRC.DEX=60
ENDIF

[
EVENTS e_stat_elfo_alto]

ON=@EnvironChange

//IF !(<SRC.FINDID.i_rune_bless>) 
IF ((<SRC.FLAGS> & STATF_POLYMORPH) || (<SRC.FINDLAYER(LAYER_SPELL_STATS)>) || (<SRC.FINDLAYER(LAYER_FLAG_Potion)>) || (<SRC.FINDLAYER(LAYER_FLAG_Hallucination)>))
return 
1
endif
IF !((<
SRC.FLAGS> & STATF_POLYMORPH) || (<SRC.FINDLAYER(LAYER_SPELL_STATS)>) || (<SRC.FINDLAYER(LAYER_FLAG_Potion)>) || (<SRC.FINDLAYER(LAYER_FLAG_Hallucination)>))

IF (<eval <
SRC.STR>> > 110)
say @2545 Stat cap superato!
SRC.STR=110
ENDIF

IF (<eval <
SRC.DEX>> > 60)
say @2444 Stat cap superato!
SRC.DEX=60
ENDIF

IF (<eval <
SRC.INT>> > 190)
say @2441  Stat cap superato!
SRC.INT=190
ENDIF

IF (<EVAL <
SRC.STR>+<SRC.DEX>+<SRC.INT>> > 300)
say @2545 Stat cap superato!
IF (<EVAL <
SRC.INT>> > <EVAL <SRC.DEX>>)
SRC.DEX=(<SRC.DEX>+(-1))
RETURN 
1
ENDIF

ENDIF
ENDIF
endif


[
ITEMDEF i_human
ID=i_moongate_red 
NAME
=Portale Razza Umana
TYPE
=t_telepad 

ON
=@CREATE
COLOR 040A

ON
=@STEP 
if <src.tag.RAZZA> != 
SAYUA 0088a 3 0 1 
"La tua Razza e' permanente!"
 
return 1
endif
if ((<
src.body> == c_man) || (<src.body> == c_woman))
SRC.COLOR=040A
SRC
.oskin 040A
src
.TAG.RAZZA=6
src
.EVENTS e_stat_HUMAN
src
.events e_danno
src
.say "Adesso sei un Umano!"
SOUND=snd_SPELL_HEAL
IF <SRC.STR> >= 120 // Str Cap
say " Stat cap superato!"
 
SRC.STR=120
    
ENDIF
    IF <
SRC.INT> >= 120  // Int Cap
say " Stat cap superato!"
 
SRC.INT=120
    
ENDIF
    IF <
SRC.DEX> >= 120 // Dex Cap
say " Stat cap superato!"
 
SRC.DEX=120
ENDIF

[
EVENTS e_stat_human]

ON=@EnvironChange

//IF !(<SRC.FINDID.i_rune_bless>) 
IF ((<SRC.FLAGS> & STATF_POLYMORPH) || (<SRC.FINDLAYER(LAYER_SPELL_STATS)>) || (<SRC.FINDLAYER(LAYER_FLAG_Potion)>) || (<SRC.FINDLAYER(LAYER_FLAG_Hallucination)>))
return 
1
endif
IF !((<
SRC.FLAGS> & STATF_POLYMORPH) || (<SRC.FINDLAYER(LAYER_SPELL_STATS)>) || (<SRC.FINDLAYER(LAYER_FLAG_Potion)>) || (<SRC.FINDLAYER(LAYER_FLAG_Hallucination)>))


IF (<eval <
SRC.STR>> > 120)
say @2545 Stat cap superato!
SRC.STR=120
ENDIF

IF (<eval <
SRC.DEX>> > 120)
say @2444 Stat cap superato!
SRC.DEX=120
ENDIF

IF (<eval <
SRC.INT>> > 120)
say @2441  Stat cap superato!
SRC.INT=120
ENDIF

IF (<EVAL <
SRC.STR>+<SRC.DEX>+<SRC.INT>> > 300)

say @2545 Stat cap superato!
IF (<EVAL <
SRC.DEX>> > <EVAL <SRC.INT>>)
SRC.INT=(<SRC.INT>+(-1))
RETURN 
1
ENDIF

IF (<EVAL <
SRC.STR>+<SRC.DEX>+<SRC.INT>> > 300)
say @2545 Stat cap superato!
IF (<EVAL <
SRC.INT>> > <EVAL <SRC.DEX>>)
SRC.DEX=(<SRC.DEX>+(-1))
RETURN 
1
ENDIF

ENDIF
ENDIF


[
ITEMDEF i_nano
ID=i_moongate_red
NAME
=Portale Razza Nani
TYPE
=t_telepad 

ON
=@CREATE
COLOR 0465
ON
=@STEP 
if <src.tag.razza> != 
SAYUA 0088a 3 0 1 
"La tua Razza e' permanente!"
 
return 1
endif
if ((<
src.body> == c_man) || (<src.body> == c_woman))
if (<
src.body> == c_man)
SRC.NAME=<SRC.NAMEil Nano
   
else
   
SRC.NAME=<SRC.NAMEla Nana
endif
SRC.COLOR=0465
SRC
.oskin 0465
src
.TAG.RAZZA=3
src
.EVENTS e_stat_nano
sayua 0098c 003 54 0 
"Adesso sei un Nano!"
SOUND=snd_SPELL_HEAL
IF <SRC.STR> >= 150 // Str Cap
src.say " Stat cap superato!"
 
SRC.STR=150
    
ENDIF
    IF <
SRC.INT> >= 60  // Int Cap
src.say " Stat cap superato!"
 
SRC.INT=60
    
ENDIF
    IF <
SRC.DEX> >= 150 // Dex Cap
src.say " Stat cap superato!"
 
SRC.DEX=150
ENDIF

[
EVENTS e_stat_nano]

ON=@EnvironChange

//IF !(<SRC.FINDID.i_rune_bless>) 
IF ((<SRC.FLAGS> & STATF_POLYMORPH) || (<SRC.FINDLAYER(LAYER_SPELL_STATS)>) || (<SRC.FINDLAYER(LAYER_FLAG_Potion)>) || (<SRC.FINDLAYER(LAYER_FLAG_Hallucination)>))
return 
1
endif
IF !((<
SRC.FLAGS> & STATF_POLYMORPH) || (<SRC.FINDLAYER(LAYER_SPELL_STATS)>) || (<SRC.FINDLAYER(LAYER_FLAG_Potion)>) || (<SRC.FINDLAYER(LAYER_FLAG_Hallucination)>))

IF (<eval <
SRC.STR>> > 150)
say @2545 Stat cap superato!
SRC.STR=150
ENDIF

IF (<eval <
SRC.DEX>> > 150)
say @2444 Stat cap superato!
SRC.DEX=150
ENDIF

IF (<eval <
SRC.INT>> > 60)
say @2441  Stat cap superato!
SRC.INT=60
ENDIF

IF (<EVAL <
SRC.STR>+<SRC.DEX>+<SRC.INT>> > 300)
say @2545 Stat cap superato!
IF (<EVAL <
SRC.DEX>> > <EVAL <SRC.INT>>)
SRC.INT=(<SRC.INT>+(-1))
RETURN 
1
ENDIF

ENDIF
ENDIF
endif

[
ITEMDEF i_orco
ID=i_moongate_red
NAME
=Portale Razza Orchi
TYPE
=t_telepad 

ON
=@CREATE
COLOR 0034a
ON
=@STEP 
if <src.tag.raZZA> != 
SAYUA 0088a 3 0 1 
"La tua Razza e' permanente!"
 
return 1
endif
if ((<
src.body> == c_man) || (<src.body> == c_woman))
if (<
src.body> == c_man)
SRC.NAME=<SRC.NAMEl'Orco
   else
   SRC.NAME=<SRC.NAME> l'
Orca
endif
SRC.COLOR=0034a
SRC
.oskin 0034a
src
.TAG.RAZZA=4
src
.EVENTS e_stat_orco
sayua 0098c 003 54 0 
"Adesso sei un Orco!"
SOUND=snd_SPELL_HEAL
IF <SRC.STR> >= 190 // Str Cap
src.say " Stat cap superato!"
 
SRC.STR=190
    
ENDIF
    IF <
SRC.INT> >= 20  // Int Cap
src.say " Stat cap superato!"
 
SRC.INT=20
    
ENDIF
    IF <
SRC.DEX> >= 120 // Dex Cap
src.say " Stat cap superato!"
 
SRC.DEX=120
ENDIF

[
EVENTS e_stat_orco]

ON=@EnvironChange

//IF !(<SRC.FINDID.i_rune_bless>) 
IF ((<SRC.FLAGS> & STATF_POLYMORPH) || (<SRC.FINDLAYER(LAYER_SPELL_STATS)>) || (<SRC.FINDLAYER(LAYER_FLAG_Potion)>) || (<SRC.FINDLAYER(LAYER_FLAG_Hallucination)>))
return 
1
endif
IF !((<
SRC.FLAGS> & STATF_POLYMORPH) || (<SRC.FINDLAYER(LAYER_SPELL_STATS)>) || (<SRC.FINDLAYER(LAYER_FLAG_Potion)>) || (<SRC.FINDLAYER(LAYER_FLAG_Hallucination)>))

IF (<eval <
SRC.STR>> > 190)
say @2545 Stat cap superato!
SRC.STR=190
ENDIF

IF (<eval <
SRC.DEX>> > 120)
say @2444 Stat cap superato!
SRC.DEX=120
ENDIF

IF (<eval <
SRC.INT>> > 20)
say @2441  Stat cap superato!
SRC.INT=20
ENDIF

IF (<EVAL <
SRC.STR>+<SRC.DEX>+<SRC.INT>> > 300)
say @2545 Stat cap superato!
IF (<EVAL <
SRC.DEX>> > <EVAL <SRC.INT>>)
SRC.INT=(<SRC.INT>+(-1))
RETURN 
1
ENDIF

ENDIF
ENDIF
endif

[
ITEMDEF i_vampiro
ID=i_moongate_red
NAME
=Portale Razza Vampiri
TYPE
=t_telepad 

ON
=@CREATE
COLOR 003c1
ON
=@STEP 
if <src.tag.razza> != 
SAYUA 0088a 3 0 1 
"La tua Razza e' permanente!"
 
return 1
endif
if ((<
src.body> == c_man) || (<src.body> == c_woman))
if (<
src.body> == c_man)
SRC.NAME=<SRC.NAMEil Vampiro
   
else
   
SRC.NAME=<SRC.NAMEla Vampira
endif
SRC.COLOR=0x7a
SRC
.oskin 0x7a
src
.TAG.RAZZA=5
src
.EVENTS e_stat_vampiro
sayua 0098c 003 54 0 
"Adesso sei un Vampiro!"
SOUND=snd_SPELL_HEAL
IF <SRC.STR> >= 150 // Str Cap
src.say " Stat cap superato!"
 
SRC.STR=150
    
ENDIF
    IF <
SRC.INT> >= 150  // Int Cap
src.say " Stat cap superato!"
 
SRC.INT=150
    
ENDIF
    IF <
SRC.DEX> >= 60 // Dex Cap
src.say " Stat cap superato!"
 
SRC.DEX=60
ENDIF

[
EVENTS e_stat_vampiro]

ON=@EnvironChange

//IF !(<SRC.FINDID.i_rune_bless>) 
IF ((<SRC.FLAGS> & STATF_POLYMORPH) || (<SRC.FINDLAYER(LAYER_SPELL_STATS)>) || (<SRC.FINDLAYER(LAYER_FLAG_Potion)>) || (<SRC.FINDLAYER(LAYER_FLAG_Hallucination)>))
return 
1
endif
IF !((<
SRC.FLAGS> & STATF_POLYMORPH) || (<SRC.FINDLAYER(LAYER_SPELL_STATS)>) || (<SRC.FINDLAYER(LAYER_FLAG_Potion)>) || (<SRC.FINDLAYER(LAYER_FLAG_Hallucination)>))

IF (<eval <
SRC.STR>> > 150)
say @2545 Stat cap superato!
SRC.STR=150
ENDIF

IF (<eval <
SRC.DEX>> > 60)
say @2444 Stat cap superato!
SRC.DEX=60
ENDIF

IF (<eval <
SRC.INT>> > 150)
say @2441  Stat cap superato!
SRC.INT=150
ENDIF

IF (<EVAL <
SRC.STR>+<SRC.DEX>+<SRC.INT>> > 300)
say @2545 Stat cap superato!
IF (<EVAL <
SRC.INT>> > <EVAL <SRC.DEX>>)
SRC.DEX=(<SRC.DEX>+(-1))
RETURN 
1
ENDIF

ENDIF
ENDIF
endif


[
ITEMDEF i_reset
ID=i_moongate_red 
NAME
=Portale Razza Reset
TYPE
=t_telepad 

ON
=@CREATE
COLOR 2444
ON
=@STEP 
src
.tag.razza 0
src
.oskin 000
src
.color=000
src
.events -


[eof

pls...
01-07-2013 09:20 AM
Find all posts by this user Like Post Quote this message in a reply
Onirim
Journeyman
*

Posts: 64
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Jul 2012
Reputation: 0

UO: Rebellion

Post: #2
RE: No stat cap...
Why you don't use Skillclass, in sphere_skills.scp ?
I don't really understand the objectif of this moongate, can you explain a little bit ?
01-07-2013 05:25 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
admin_teclis
Journeyman
*

Posts: 51
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Aug 2012
Reputation: 0

Age of Apocalypse

Post: #3
RE: No stat cap...
the problem is not the race ... or control of the race stat ... The problem is the following control .. precisely this:

[EVENTS e_stat_human]
PHP Code:
ON=@EnvironChange

//IF !(<SRC.FINDID.i_rune_bless>) 
IF ((<SRC.FLAGS> & STATF_POLYMORPH) || (<SRC.FINDLAYER(LAYER_SPELL_STATS)>) || (<SRC.FINDLAYER(LAYER_FLAG_Potion)>) || (<SRC.FINDLAYER(LAYER_FLAG_Hallucination)>))
return 
1
endif
IF !((<
SRC.FLAGS> & STATF_POLYMORPH) || (<SRC.FINDLAYER(LAYER_SPELL_STATS)>) || (<SRC.FINDLAYER(LAYER_FLAG_Potion)>) || (<SRC.FINDLAYER(LAYER_FLAG_Hallucination)>))


IF (<eval <
SRC.STR>> > 120)
say @2545 Stat cap superato!
SRC.STR=120
ENDIF

IF (<eval <
SRC.DEX>> > 120)
say @2444 Stat cap superato!
SRC.DEX=120
ENDIF

IF (<eval <
SRC.INT>> > 120)
say @2441  Stat cap superato!
SRC.INT=120
ENDIF

IF (<EVAL <
SRC.STR>+<SRC.DEX>+<SRC.INT>> > 300)

say @2545 Stat cap superato!
IF (<EVAL <
SRC.DEX>> > <EVAL <SRC.INT>>)
SRC.INT=(<SRC.INT>+(-1))
RETURN 
1
ENDIF

IF (<EVAL <
SRC.STR>+<SRC.DEX>+<SRC.INT>> > 300)
say @2545 Stat cap superato!
IF (<EVAL <
SRC.INT>> > <EVAL <SRC.DEX>>)
SRC.DEX=(<SRC.DEX>+(-1))
RETURN 
1
ENDIF

ENDIF
ENDIF 
(This post was last modified: 01-07-2013 10:56 PM by admin_teclis.)
01-07-2013 10:55 PM
Find all posts by this user Like Post Quote this message in a reply
Ultima One
Journeyman
*

Posts: 238
Likes Given: 7
Likes Received: 10 in 6 posts
Joined: Jan 2013
Reputation: 6

Ultima One

Post: #4
RE: No stat cap...
You have a duplicated IF check inside itself... and not ended it. You dont need it there anyway

PHP Code:
ON=@EnvironChange

//IF !(<SRC.FINDID.i_rune_bless>) 
IF ((<SRC.FLAGS> & STATF_POLYMORPH) || (<SRC.FINDLAYER(LAYER_SPELL_STATS)>) || (<SRC.FINDLAYER(LAYER_FLAG_Potion)>) || (<SRC.FINDLAYER(LAYER_FLAG_Hallucination)>))
    return 
1
endif
IF !((<
SRC.FLAGS> & STATF_POLYMORPH) || (<SRC.FINDLAYER(LAYER_SPELL_STATS)>) || (<SRC.FINDLAYER(LAYER_FLAG_Potion)>) || (<SRC.FINDLAYER(LAYER_FLAG_Hallucination)>))


    IF (<eval <
SRC.STR>> > 120)
        
say @2545 Stat cap superato!
        
SRC.STR=120
    
ENDIF

    IF (<eval <
SRC.DEX>> > 120)
        
say @2444 Stat cap superato!
        
SRC.DEX=120
    
ENDIF

    IF (<eval <
SRC.INT>> > 120)
        
say @2441  Stat cap superato!
        
SRC.INT=120
    
ENDIF

    IF (<EVAL <
SRC.STR>+<SRC.DEX>+<SRC.INT>> > 300)

        
say @2545 Stat cap superato!
        IF (<EVAL <
SRC.DEX>> > <EVAL <SRC.INT>>)
            
SRC.INT=(<SRC.INT>+(-1))
            RETURN 
1
        
ENDIF

        IF (<EVAL <
SRC.INT>> > <EVAL <SRC.DEX>>)
            
SRC.DEX=(<SRC.DEX>+(-1))
            RETURN 
1
        
ENDIF

    ENDIF
ENDIF 

ULTIMA ONE
The modern, sphere powered Ultima Online server
(This post was last modified: 01-07-2013 11:38 PM by Ultima One.)
01-07-2013 11:33 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Onirim
Journeyman
*

Posts: 64
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Jul 2012
Reputation: 0

UO: Rebellion

Post: #5
RE: No stat cap...
Indentation is life =)
01-08-2013 12:30 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
admin_teclis
Journeyman
*

Posts: 51
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Aug 2012
Reputation: 0

Age of Apocalypse

Post: #6
RE: No stat cap...
Nothing to do does not work ... only works to relog ... @ environchange in game does not work ... no check ..... I do not understand what there is that's not good ... hours worked before no ...
01-08-2013 05:42 AM
Find all posts by this user Like Post Quote this message in a reply
admin_teclis
Journeyman
*

Posts: 51
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Aug 2012
Reputation: 0

Age of Apocalypse

Post: #7
RE: No stat cap...
risolt Smile tnx at all
01-08-2013 10:01 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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