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
Can't use skills or attacking
Author Message
Oxtar
Apprentice
*

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



Post: #1
Can't use skills or attacking
Hi guys, i came across something really weird which is getting on my nerves.

I am currently using the latest version of sphere which is 56c.

I am also using the latest scripts with custom ones i've made and some which have been done by other scripters.

The issue i'm trying to figure is this.

After a Resync ( AND ONLY AFTER IT ) the players get affected by a bug which prevent them from using any skill and they cannot attack an npc. The only way to attack the npc within this bug is to double click it non-stop. After using a travel stone (which is how players wander around) they can attack npc's normally and they are REQUIRED to kill an NPC to be able to use their skills normally.

I've been through all my scripts, 1 by 1. Those made by my hand and those which aren't. After all, there is nothing that point me to something specific. At first i thought it might be related to my ethy mounts. Then i found out it still happened without me riding it before the resync.

SOOO.... Any help is pretty welcome if you ever experienced this in the past.

Thank you Wink

Code:
Quick edit:

Here's one ethy in case there is something wrong i didn't notice.

[itemdef i_et_ridgeback]
name=Ethereal ridgeback
id=i_mt_ridgeback
TDATA3=c_etr
layer=25

on=@create
color=00

on=@unequip
src.newitem i_ethereal_ridgeback
src.act.color=<color>
src.act.bounce

[chardef c_etr]
name=Ethy Ridgeback
id=c_ridgeback
sound=0

on=@create
color=00
str=1
food=10000

on=@click
remove
return 1

on=@npcrestock
remove
return 1

on=@skillstart
remove
return 1

[itemdef i_ethereal_ridgeback]
NAME=Ethereal Ridgeback
id=i_pet_ridgeback
type=t_normal
CATEGORY=Ethereal
SUBSECTION= Ethereal pets
DESCRIPTION=Ethereal Ridgeback
Value=0

on=@create
color=00
attr=14

on=@dclick
if (<SRC.FLAGS>&000000400)
src.sysmessage you can not use this right now.
return 1
elseif (<SRC.FLAGS>&080000000)
src.sysmessage you are already mounted
return 1
else
src.newitem i_et_ridgeback
src.act.more1=c_etr
src.act.color=<color>
src.act.more2=<src.uid>
src.act.equip
src.update
remove
return 1
endif

[itemdef 03EBA]
name=Rigdeback mount item
defname=i_mt_ridgeback
TYPE=T_EQ_HORSE
LAYER=25
TDATA3=c_ridgeback

ON=@EQUIP
LINK=<SRC.UID>
attr=08010
(This post was last modified: 01-09-2014 01:39 PM by Oxtar.)
01-09-2014 01:33 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: Can't use skills or attacking
Maybe remove these ->
on=@click
remove
return 1

on=@npcrestock
remove
return 1

on=@skillstart
remove
return 1
01-09-2014 09:45 PM
Find all posts by this user Like Post Quote this message in a reply
Oxtar
Apprentice
*

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



Post: #3
RE: Can't use skills or attacking
(01-09-2014 09:45 PM)Runcuks Wrote:  Maybe remove these ->
on=@click
remove
return 1

on=@npcrestock
remove
return 1

on=@skillstart
remove
return 1

Since this script wasn't made by me i wondered about those lines as well... which i already tried.

The effect of removing those lines are that if you dismount the ethy mount, it does get into your backpack, but create a npc of that ethy mount into the world too.

Another odd thing is, it isn't happening 100% of the time when i resync the server. Even more odd, it can happen a couple minutes after the resync as well... This drives me nuts.
(This post was last modified: 01-09-2014 10:09 PM by Oxtar.)
01-09-2014 10:00 PM
Find all posts by this user Like Post Quote this message in a reply
dagger4k
Journeyman
*

Posts: 194
Likes Given: 1
Likes Received: 12 in 12 posts
Joined: Mar 2012
Reputation: 0



Post: #4
RE: Can't use skills or attacking
this is from the original

Code:
[itemdef i_et_ridgeback]
name = Ethereal Ridgeback
id = 01964
tdata3 = c_ridge
type = T_EQ_HORSE
layer = 25

on=@create
    color = 0ffff

on=@equip
    link = <src.uid>
    IF (0<TAG.color>)
        COLOR = <TAG.color>
    ENDIF

on=@dclick
    remove
    src.findid.i_et_el.remove

    return 1

on=@unequip
    obj = <src.tag.uid_Ethereal>
    obj.color = <QVAL (0<obj.TAG.color>) ? <obj.TAG.color> : 0481>
    obj.cont = <src.findlayer(layer_pack).uid>
    obj.update

on=@timer
    timer = 255

[chardef c_ridge]
id = c_ridgeback

on=@create
    color=0ffff

    str = 100
    dex = 100
    int = 100
    FLAGS = 08

on=@click
    remove
    return 1

on=@npcrestock
    remove
    return 1

on=@skillstart
    remove
    return 1

[itemdef i_et_ridg]
name = Ethereal Ridgeback
id = i_pet_ridgeback
type = t_normal

on=@create
    color = 0481
    attr = 14


on=@dclick
    if ( <src.f_isdonator> )
        if (<src.flags>&statf_polymorph)
            src.sysmessage You cannot ride this while polymorped.
            return 1
        elseif (<src.isevent.e_duel>)
            src.sysmessage You can't use this during a duel!
            return 1
        endif

        if !(<src.findlayer.25.uid>)
            src.newitem i_et_ridgeback
            src.act.more1=c_ridge
            src.act.more2= <SRC.UID>
            src.act.timer = -1
            src.act.equip
            src.update

            src.tag.uid_Ethereal = <uid>
            color = 079c
            cont = 0400091bf
            update
            return 1
        else
            src.sysmessage You are already mounted!
            return 1
        endif
    else
        src.sysmessage Your donations have run out.

        return 1
    endif
01-09-2014 10:37 PM
Find all posts by this user Like Post Quote this message in a reply
Oxtar
Apprentice
*

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



Post: #5
RE: Can't use skills or attacking
I just tried your script and it isn't working.

By the way, i finally managed to see that it IS the ethy mounts which are causing this bug.

So now there is something wrong in the script for sure.
01-10-2014 12:18 PM
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: #6
RE: Can't use skills or attacking
I am using your ethereal script, after a while i got the problem too !

Looking into it
(This post was last modified: 01-10-2014 10:06 PM by darksun84.)
01-10-2014 10:06 PM
Find all posts by this user Like Post Quote this message in a reply
Oxtar
Apprentice
*

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



Post: #7
RE: Can't use skills or attacking
Hah, at least i'm not crazy, Thanks! xD

I've been trying to fix it for 1 whole week now. I'll let you know if i find out something as well Wink
01-10-2014 10:10 PM
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: #8
RE: Can't use skills or attacking
I noticed that when the problem appears, the player Action value is changed to 06f ( 111)
NPCACT_RIDDEN, // 111 = Being ridden or shrunk as figurine.

I think it's caused by this line :

src.act.more2=<src.uid>

More2 in a t_eq_horse item must holds the mount uid(used by stabler npc guy).

Also the @Equip doesn't fire(even if the item is actually equipped), so the link field and the ATTR are not properly setted

PHP Code:
newitem i_et_ridgeback
new.more1=c_etr 
new.color=<color>
new.
link = <src.uid>
new.
attr=08010
new.equip 

I am not getting the problem for now with those changes.

Maybe it looks weird that just placing the player uid in the more2 field of a t_eq_horse can cause that problem, but i think that sphere does something related to that more2 value after a worldsave is performed.

PHP Code:
14:42:CliPeriodic Action -1
14
:43:RegPeriodic Action -1
14
:43:CliPeriodic Action -1
14
:43:RegPeriodic Action skill_evalint
14
:43:CliPeriodic Action skill_evalint
GC
70 Objects accounted for
14:43:World data saved   (save/sphereworld.scp).
14:43:Player data saved  (save/spherechars.scp).
14:43:Multi data saved   (save/spheremultis.scp).
14:43:Context data saved (save/spheredata.scp).
14:43:World save completedtook 0.3704 seconds
14
:43:3:'pietro' commands 'save'=1
14
:43:RegPeriodic Action 06f
14
:43:CliPeriodic Action 06f 

More information : the action is not changed until a @RegPeriodic/@CliPeriodic is fired after the save
Also you'll get a skill failure message before the action change happens.
(This post was last modified: 01-11-2014 12:47 AM by darksun84.)
01-10-2014 11:10 PM
Find all posts by this user Like Post Quote this message in a reply
Oxtar
Apprentice
*

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



Post: #9
RE: Can't use skills or attacking
Wow, ok i didn't go that deep into the code. I personally thought that the more2 wasn't a problem at all.

So you didn't experience any problem yet? I'll give it a shot that way then. Would be nice to get a Dev to tell us what's happening behind the code and see why it is changing the value of more2 haha.

EDIT:

Ok, i already found a problem about that fix.

After a save, the ethy mount just unequip itself and get back into the backpack. It's happening after about 3-5 second after the save has finished. I remember having this issue in the past and i think that's why it has been used on the more2 value.
(This post was last modified: 01-11-2014 09:24 AM by Oxtar.)
01-11-2014 09:15 AM
Find all posts by this user Like Post Quote this message in a reply
Ben
Sphere Developer
*****

Posts: 612
Likes Given: 2
Likes Received: 123 in 70 posts
Joined: Mar 2010
Reputation: 18

SphereCommunity

Post: #10
RE: Can't use skills or attacking
MORE2 of t_eq_horse is the UID of offline creature. During saves, sphere tries to fix weird things with memory items.
Following this logic, the rider would become the ride...

AxisII's current version: 2.0.4j
AxisII SourceCode on Github
AxisII up to date changelog
01-12-2014 02:43 AM
Visit this user's website 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)