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
Script help
Author Message
TigerBlitz
Apprentice
*

Posts: 25
Likes Given: 2
Likes Received: 1 in 1 posts
Joined: Aug 2013
Reputation: 0



Post: #1
Script help
this script is right ?

Code:
ON=@DAMAGE
VAR.X=RAND(75)
    IF X==0
    <SRC.npc> == 1 || <SRC.npc> == 2 || <SRC.npc> == 3 || <SRC.npc> == 4 || <SRC.npc> == 5 || <SRC.npc> == 6 || <SRC.npc> == 7 || <SRC.npc> == 8 || <SRC.npc> == 9 || <SRC.npc> == 10 || <SRC.npc> == 11 || <SRC.npc> == 12 || <SRC.npc> == 13 || <SRC.npc> == 14
    src.effect=3,036b0,6,15,2
    SRC.SOUND=015B
    src.suicide
    return 0
ELSE
VAR.X=RAND(100)
    IF X==0
    <SRC.npc>==0
    src.effect=3,036b0,6,15,2
    SRC.SOUND=015B
    src.suicide
    SRC.str= (<SRC.str>-1)
    return 0
ELSE
VAR.X=RAND(85)
    IF X==0
    ( <SRC.npc> == 0 )
    src.effect=3,036b0,6,15,2
    SRC.SOUND=015B
    src.sleep
    return 0
ELSE
    src.effect=3,036b0 6,15,1
    SRC.SOUND=snd_Spell_EXPLOSION

RETURN 0
    ENDIF
RETURN 0
    ENDIF
RETURN 0
    ENDIF
09-06-2013 05:21 AM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #2
RE: Script help
It's not very understeable formatted in that way Tongue
09-06-2013 06:07 AM
Find all posts by this user Like Post Quote this message in a reply
TigerBlitz
Apprentice
*

Posts: 25
Likes Given: 2
Likes Received: 1 in 1 posts
Joined: Aug 2013
Reputation: 0



Post: #3
RE: Script help
you said that I agree. its written for Sphere 51a. But Sphere not giving any error, when using.
so i want to consult for it.
09-06-2013 06:19 AM
Find all posts by this user Like Post Quote this message in a reply
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #4
RE: Script help
Lots of things in that code do not make sense... even for v51a

@Damage is a trigger that gets fired when a item is damaged... in @Damage trigger, SRC is a reference to the source of the damage.

1. "IF X==0" is going to test that the X coordinate of the item taking damage is zero... that makes no sense.
2. "<SRC.npc> == 1 || <SRC.npc> == 2 ..." is not valid syntax unless it is in an IF condition, which it is not.
3. "SRC.SOUND" is pointless if the entity causing damage is not a player (items and npc's don't hear sounds)..
4. "<SRC.npc>==0" You cannot change the brain of a player, nor can you change the brain of a NPC to make it a player... makes no sense.
5. "SRC.str= (<SRC.str>-1)" if the source of the damage is an item, this doesn't make sense because items don't have strength.
6. "src.sleep" does not make sense if the source of the damage was an item.

Regardless of all that, none of this code will ever be executed by the server because of #1... since an item's X position can never be zero. That is maybe why the server does not complain about it
09-06-2013 06:46 AM
Find all posts by this user Like Post Quote this message in a reply
TigerBlitz
Apprentice
*

Posts: 25
Likes Given: 2
Likes Received: 1 in 1 posts
Joined: Aug 2013
Reputation: 0



Post: #5
RE: Script help
thx Ran.
so its useless i understand.
09-06-2013 06:57 AM
Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #6
RE: Script help
This... would very clearly be.... The 56b/56c forum...
51a is in the basement, in a filing cabinet that is jammed against the wall and hidden behind a large potted plant.



Moving...

[Image: 2nis46r.jpg]
09-06-2013 08:35 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
evening
Journeyman
*

Posts: 138
Likes Given: 0
Likes Received: 14 in 9 posts
Joined: Apr 2012
Reputation: 1

Finally Land

Post: #7
RE: Script help
ONTRIGGER=DAMAGE
IF (<SRC.REGION.FLAGS> & 04000) && (!(<LINK.REGION.FLAGS> & 02000)) && (<LINK.REGION.FLAGS> & 04000) && ((<SRC.OBODY> == 0190) || (<SRC.OBODY> == 0191))
LINK.EFFECT=1,0373A,6,15,1
LINK.HITS=0
link.speaku 卫兵区禁止使用神器攻击他人
return 1
endif

if (<morey> <= 0) || (<morey> > 15) //未鉴定
return 1
endif

//link.speaku <valstr ((<link.str> + -260) / 2 + (rand(<valstr <dam>>) / 2))>
//link.speaku <valstr (rand(<valstr <dam>>) / 2)>
src.damage <valstr ((<link.str> + -260) / 2 + (rand(<valstr <dam>>) / 2))> //按等级追加的伤害

//神器爆发率 = (等级 * 品质) / 120
//if (rand(120) > (<morey> * 2))
if ((<SRC.SKILLCLASS> >= 31) && (<SRC.SKILLCLASS> <= 40)) || ((<SRC.SKILLCLASS> >= 61) && (<SRC.SKILLCLASS> <= 70))
if (rand(900) > (<morey> * <morey>)) // 1/4
return 1
endif
elseif ((<SRC.SKILLCLASS> >= 1) && (<SRC.SKILLCLASS> <= 10)) || ((<SRC.SKILLCLASS> >= 11) && (<SRC.SKILLCLASS> <= 20)) || (<SRC.SKILLCLASS> >= 71) // 1/5
if (rand(1125) > (<morey> * <morey>))
return 1
endif
else
if (rand(675) > (<morey> * <morey>)) // 1/3
return 1
endif
endif

LINK.SPEAKU 七 星 剑 阵 //******
src.EFFECT=3,03b20,6,15,1

if (<SRC.REGION.FLAGS> & 02000) //城里无效
return 1
endif

IF (<SRC.STAM> > (<SRC.DEX> * 3 / 10))
SRC.STAM=<SRC.STAM> + -<valstr (<src.dex> * 3 / 10)>
ELSE
SRC.STAM=-1
ENDIF

src.spelleffect 1 01
if (<src.findlayer(32).baseid>)
src.findlayer(32).more=1 //表示要吸精力
src.findlayer(32).timer=1

if (<morey> > 10)
src.findlayer(32).morex=<morey> + -8
src.findlayer(32).morez=<morey> + -8
elseif (<morey> > 5)
src.findlayer(32).morex=2
src.findlayer(32).morez=3
else
src.findlayer(32).morex=2
src.findlayer(32).morez=2
endif
endif
return 1
09-06-2013 01:44 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
amonvangrell
Banned

Posts: 337
Likes Given: 17
Likes Received: 32 in 20 posts
Joined: Aug 2012

britannia shard

Post: #8
RE: Script help
aways use code on your script post.

Code:
[code]
09-06-2013 06:00 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Rattlehead
Master
**

Posts: 290
Likes Given: 3
Likes Received: 8 in 6 posts
Joined: Jun 2012
Reputation: 8



Post: #9
RE: Script help
ONTRIGGER=DAMAGE

dafuk? oO

[Image: matts_siggy.gif]
09-06-2013 06:26 PM
Find all posts by this user Like Post Quote this message in a reply
Adidas-=420=-
Unregistered

 



Post: #10
RE: Script help
lol, you tell me what you want, and I will script it for you! its that simple.
09-23-2013 02:55 AM
Quote this message in a reply
Post Reply 


Forum Jump:


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