View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002512SphereServerexecutable - windows buildpublic08-06-15 02:5227-06-15 12:40
Reportergnomo 
Assigned ToCoruja 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version16-06-2013, 0.56b Prerelease 
Target VersionFixed in Version0.56c Nightly 
Summary0002512: Mount disappearing keeps happening
Descriptionhttp://tracker.sphere.torfo.org/bugs/view.php?id=2502 [^]
Additional InformationERROR:GC: 1 unplaced object deleted
ERROR:UID=0402cc833, id=03a5 'pier', Invalid code=3202 (Object not placed in the world)
ERROR:UID=02cf5ac, id=0d2 'Desert Ostard', Invalid code=1203 (Ridden NPC not acting as such)
TagsNo tags attached.
Nightly VersionAutomated (specify build number)
Experimental FlagsNone
Option FlagsNone
Internal Build Number2322
Attached Files

- Relationships

-  Notes
(0002814)
XuN (developer)
08-06-15 12:54

Are you using 0.56b pre-release to test that as you wrote?
(0002815)
Rizz (reporter)
10-06-15 22:25

I still get this on build 2266 (but is outdated), i wish it will be fixed so i can update.
(0002816)
gnomo (reporter)
11-06-15 01:27

Xun i'm using now build 2332 that i download in -> http://benserver.no-ip.ca/SphereBuild/ [^]
(0002817)
XuN (developer)
11-06-15 16:36

Can you show me, if you have, any script interfering with mounts? ie: Shrink potions, ethereals, stables, etc
(0002818)
Rizz (reporter)
11-06-15 23:47

[ITEMDEF i_potion_shrink]
ID=i_bottle_empty
NAME=Shrink Potion
VALUE=30000
TYPE=T_POTION
TDATA1=i_bottle_empty
RESOURCES=i_reag_batwing 7, i_bottle_EMPTY
SKILLMAKE=SKILL_ALCHEMY 100.0, t_mortar
WEIGHT=0.1

CATEGORY=Other
SUBSECTION=Potions
DESCRIPTION=Shrink Potion

ON=@Create
MORE2=100.0
COLOR=0498

ON=@DCLICK
if (<topobj.uid>==<src.uid>)
    src.sysmessage Select pet to shrink
    src.shrink1 <uid>
else
    
endif
return 1





[FUNCTION SHRINK1]
if !<args>
    sysmessage Select pet to shrink
endif
targetf SHRINK1_CB <args>
return 1

[FUNCTION SHRINK2]
SHRINK1_CB
return 1

[FUNCTION SHRINK1_CB]
if <argo>
    REF1=<argo>
else
    REF1=<uid>
endif
REF2=<args>
REF3= <REF2.TOPOBJ.uid> //player

if <ref1.cansee> && <ref1.canseelos> && (<ref1.distance> > 2)
    sysmessage You cannot reach the creature!
elif <ref1.isplayer>
    sysmessage You cannot shrink players!
elif <ref1.isitem>
    sysmessage You cannot shrink items!
elif (<REF1.FLAGS>&(statf_invul|statf_dead|statf_insubstantial|statf_freeze|statf_stone|statf_invisible|statf_sleeping|statf_ridden|statf_hidden|statf_conjured)) || (<REF1.FINDID.i_rune_paralyze_new>)
    sysmessage You cannot shrink that pet!
elif (<ref1.flags>&statf_war)
    sysmessage This animal is too wild to be shrinked!
elif (<ref1.tag0.enticed>)
    sysmessage You can't shrink an enticed animal!
elif !<ref1.ismypet>
    sysmessage This pet doesn't belong to you!
else
    local.petconsume=<ref1.TAG0.FOLLOWERCONSUME>
    
    if !<local.petconsume>
        local.petconsume=1
    endif
    
    if <REF2> && (<REF2.TOPOBJ>==<UID>)
        ref1.sound 49
        
        if ( <REF3.RESTEST <dlocal.petconsume> <ref2.baseid>> )
            consume <dlocal.petconsume> <ref2.baseid>
        else
            sysmessage To shrink <REF1.name> you need at least <dlocal.petconsume> potions.
            return 1
        endif
        
    endif
    SERV.NEWITEM=<REF1.ICON>
    NEW.NAME=<REF1.NAME>
    NEW.COLOR=<REF1.COLOR>
    NEW.TAG.ID=<REF1.BASEID>
    NEW.TAG.STR=<REF1.STR>
    NEW.TAG.DEX=<REF1.DEX>
    NEW.TAG.INT=<REF1.INT>
    NEW.TAG.FAME=<REF1.FAME>
    NEW.TAG.KARMA=<REF1.KARMA>
    NEW.TAG.NAMEHUE=<REF1.TAG.NAME.HUE>
    NEW.TAG.HITS=<REF1.HITS>
    NEW.TAG.MANA=<REF1.MANA>
    NEW.TAG.STAM=<REF1.STAM>
    NEW.TAG.CANTRAINSTRTO=<REF1.TAG.CANTRAINSTRTO>
    NEW.TAG.MAXHITS=<REF1.MAXHITS>
    NEW.TAG.MAXMANA=<REF1.MAXMANA>
    NEW.TAG.MAXSTAM=<REF1.MAXSTAM>
    
    IF (!<ISEMPTY <REF1.TAG0.horse_armor>>)
        NEW.TAG.horse_armor=<REF1.TAG.horse_armor>
        NEW.TAG.OBODY=<REF1.OBODY>
        NEW.TAG.BODY=<REF1.BODY>
    ENDIF
    
    REF1.TIMERF CLEAR
    NEW.TAG.MAGICRESIST=<REF1.MAGICRESISTANCE>
    NEW.TAG.WRESTLING=<REF1.WRESTLING>
    NEW.TAG.MAGERY=<REF1.MAGERY>
    NEW.TAG.TACTICS=<REF1.TACTICS>
    NEW.TAG.ANATOMY=<REF1.ANATOMY>
    NEW.TAG.LEVEL=<REF1.LEVEL>
    NEW.TAG.EXP=<REF1.EXP>
    NEW.TAG.livello1=<REF1.TAG.livello1>
    NEW.TAG.esperienza1=<REF1.TAG.esperienza1>
    NEW.TAG.JADROPOUSTAT=<REF1.TAG0.JADROPOUSTAT>
    NEW.TYPE=t_shrink_fix
    NEW.P=<REF1.P>
    NEW.attr = 02
    NEW.timer = <eval <serv.DecayTimer>*60>
    NEW.UPDATEX
    NEW.SOUND <REF1.SOUND>
    NEW.SOUND=66
    SERV.LOG @SHRINK <SRC.REALNAME>(<SRC.UID>) on account <SRC.ACCOUNT> shrikned <REF1.name> (<REF1.uid>)
    REF1.REMOVE
    
endif
return 1
 
//############## TAMING TYPES ##############

[TYPEDEF t_shrink_fix]
ON=@Dclick
IF (0<TOPOBJ.UID>!=<SRC>)
    SRC.SYSMESSAGE The shrinked animal must be with you.
ELIF ((((<SERV.CHARDEF.<TAG.ID>.TAG0.FOLLOWERCONSUME>) && (<EVAL <SRC.CURFOLLOWER>+<SERV.CHARDEF.<TAG.ID>.TAG0.FOLLOWERCONSUME>> > <SRC.MAXFOLLOWER>))) || ((!(<SERV.CHARDEF.<TAG.ID>.TAG0.FOLLOWERCONSUME>)) && (<EVAL <SRC.CURFOLLOWER>+1> > <SRC.MAXFOLLOWER>)))
    src.sysmessage @946,3,1 You must release some pets before unshrinking this one.
ELSE
    SERV.NEWNPC=<TAG.ID>
    NEW.FINDLAYER.21.REMOVE
    NEW.P=<SRC.P>
    NEW.COLOR=<COLOR>
    NEW.STR=<TAG.STR>
    NEW.DEX=<TAG.DEX>
    NEW.INT=<TAG.INT>
    NEW.FAME=<TAG.FAME>
    NEW.KARMA=<TAG.KARMA>
    NEW.NAME=<NAME>
    NEW.MAGICRESISTANCE=<TAG.MAGICRESIST>
    NEW.WRESTLING=<TAG.WRESTLING>
    NEW.MAGERY=<TAG.MAGERY>
    NEW.TACTICS=<TAG.TACTICS>
    NEW.ANATOMY=<TAG.ANATOMY>
    NEW.MAXHITS=<TAG.MAXHITS>
    NEW.MAXMANA=<TAG.MAXMANA>
    NEW.MAXSTAM=<TAG.MAXSTAM>
    NEW.HITS=<TAG.HITS>
    NEW.MANA=<TAG.MANA>
    NEW.STAM=<TAG.STAM>
    NEW.LEVEL=<TAG.LEVEL>
    NEW.EXP=<TAG.EXP>
    NEW.TAG.livello1=<TAG.livello1>
    NEW.TAG.esperienza1=<TAG.esperienza1>
    NEW.TAG.CANTRAINSTRTO=<TAG.CANTRAINSTRTO>
    NEW.TAG.NAME.HUE=<TAG.NAMEHUE>
    NEW.TAG.JADROPOUSTAT=<TAG.JADROPOUSTAT>
    
    IF (!<ISEMPTY <REF1.TAG0.horse_armor>>)
        NEW.TAG.horse_armor=<TAG.horse_armor>
        NEW.OBODY=<TAG.OBODY>
        NEW.BODY=<TAG.BODY>
    ENDIF
    
    SRC.TAME <NEW>
    IF (!(<NEW.TAG0.JADROPOUSTAT>))
        NEW.TAG.JADROPOUSTAT=
    ENDIF
    SRC.SOUND <eval <NEW.SOUND>+3>
    NEW.FACE <SRC.UID>
    REMOVE
ENDIF
RETURN 1

ON=@ClientToolTip
IF (<TAG0.ID>==c_dragon_rideable)
    SRC.ADDCLILOC 1060658,Original Animal,Rideable Dragon
ELSE
    SRC.ADDCLILOC 1060658,Original Animal,<SERV.CHARDEF.<TAG0.ID>.NAME>
ENDIF

IF (<TAG0.ID>==c_m_dragon_silverdrake) || (<TAG0.ID>==c_m_dragon_greendrake) || (<TAG0.ID>==c_m_dragon_golddrake) || (<TAG0.ID>==c_m_dragon_crystaldrake) || (<TAG0.ID>==c_m_dragon_copperdrake) || (<TAG0.ID>==c_m_dragon_bluedrake) || (<TAG0.ID>==c_m_dragon_blackdrake)
    SRC.ADDCLILOC 1060658,Original Animal,Drake
ELIF (<TAG0.ID>==c_dragon_red) || (<TAG0.ID>==c_dragon_green)
    SRC.ADDCLILOC 1060658,Original Animal,Dragon
ELIF (<TAG0.ID>==c_m_dragon_crystal)
    SRC.ADDCLILOC 1060658,Original Animal,Crystal Dragon
ENDIF


[TYPEDEF t_figurine]
ON=@DCLICK
IF (!<src.region.defname>==a_dungeon_21)
    if (!<tag0.us>) && (!<src.isgm>)
        src.sysmessage Unusable shrinked pet.
        src.sysmessage Call a Game Master for get it fixed.
        return 1
    endif
ENDIF

IF (!<src.region.defname>==a_dungeon_21)

    IF (<src.curfollower> < 5)
        src.curfollower=<src.curfollower>+1
    ELSE
        src.message Hai troppi animali al seguito
        return 1
    ENDIF
    
ENDIF

ON=@BUY
IF (<ARGN1> > 1)
    SRC.SYSMESSAGE @946,3,1 You can only buy 1 creature per type.
    SRC.NEWGOLD <ARGN2>
ELSE
    LOCAL.FOLLOWERCONSUME=<SERV.CHARDEF.<TDATA3>.TAG0.FOLLOWERCONSUME>
    IF ((<LOCAL.FOLLOWERCONSUME>) && (<EVAL <SRC.CURFOLLOWER>+<LOCAL.FOLLOWERCONSUME>> > <SRC.MAXFOLLOWER>)) || ((!<LOCAL.FOLLOWERCONSUME>) && (<EVAL <SRC.CURFOLLOWER>+1> > <SRC.MAXFOLLOWER>))
        src.sysmessage @946,3,1 You must release some pets before buying this one.
        SRC.NEWGOLD <ARGN2>
    ELSE
        SERV.NEWNPC=<TDATA3>
        NEW.FINDLAYER.21.REMOVE
        NEW.P=<TOPOBJ.P>
        SRC.TAME <NEW>
        NEW.FACE <SRC.UID>
        amount=1
        // if <amount> > 1
            // amount --
        // else
            // remove
        // endif
    ENDIF
ENDIF
return 1
(0002826)
XuN (developer)
13-06-15 17:43

Invalid code=3202 (Object not placed in the world) Refers to items created via script (newitem / serv.newitem) but not placed anywhere and ONLY in this case ... so for this item it got 'lost' because a missed 'new.p/cont/bounce/equip... or whatever. This item will be deleted in Garbage Collect.

Invalid code=1203 (Ridden NPC not acting as such) Refers to mounts when ACTION != 111. This will NOT remove the mount, it will just set it's action to 111, however it warns you about it.
(0002828)
Rizz (reporter)
16-06-15 00:07

00:01:ERROR:'f' Bad Link to 011de2
00:01:ERROR:UID=040011dcb, id=0421c 'f', Invalid code=2205 (Mislinked item)
00:01:ERROR:'Oclock' Bad Link to 042289
00:01:ERROR:UID=040042252, id=0421c 'Oclock', Invalid code=2205 (Mislinked item)
00:01:ERROR:'Skeletal Mount' Bad Link to 042ce2
00:01:ERROR:UID=040042cc9, id=0421c 'Skeletal Mount', Invalid code=2205 (Mislinked item)
00:01:ERROR:'Grifon' Bad Link to 043a94
00:01:ERROR:UID=040043991, id=0421c 'Grifon', Invalid code=2205 (Mislinked item)
(0002839)
Coruja (developer)
19-06-15 21:27

not really XuN, I through the same thing too, the code seems to just show this warning msg and fix the npc action back to 111 instead delete it

but on some quick testing, I found that if the mount is ridden without action 111 set it will be removed

just ride any mount, use this function and type .save, and the mount will disappear

[FUNCTION lol]
REF1=<FINDLAYER.layer_horse.MORE2> //'disconnected' mount linked to my layer_horse
IF (<REF1>)
 REF1.ACTION -1
ENDIF

ERROR:(lol.scp,6)UID=019ec09, id=0dc 'Lhama', Invalid code=1203 (Ridden NPC not acting as such)
ERROR:(lol.scp,6)GC: Object memory leak 902536!=902535
(0002842)
XuN (developer)
20-06-15 08:38

Even in this case action MUST BE 111 ALWAYS for mounted pets, to avoid possible problems related to skills, etc. I did not find any problem with the code removing this action so I bet it's caused by some script changing their actions when they are mounted. Opening all scripts in a good text editor and searching for 'action' in all files should help to solve this 'issue'.

Rizz, this error is produced by invalid UID set on LINK, maybe a deleted character is linked for this item for example.
(0002843)
Rizz (reporter)
21-06-15 21:25
edited on: 21-06-15 21:25

[FUNCTION RAMBYCOL]
IF (0<MEMORYFINDTYPE.<ARGS>>)
    WHILE (0<MEMORYFINDTYPE.<ARGS>>)
        MEMORYFINDTYPE.<ARGS>.COLOR -= <args>
    ENDWHILE
ENDIF

ON=@Mount
argo.RAMBYCOL memory_war_targ
argo.RAMBYCOL memory_fight
argo.RAMBYCOL memory_irritatedby
argo.RAMBYCOL memory_harmedby
argo.RAMBYCOL memory_aggreived
argo.FLAGS &= ~statf_war
argo.attacker.clear
argo.ACTION 111

let's see in this way

(0002852)
Rizz (reporter)
22-06-15 22:31

"Added temporary console debug message to find more info about mounts disappearing on worldsave (garbage collection)"

This is very usefull but I cannot update my sphere once you'll fix the char tick problems.
(0002880)
XuN (developer)
27-06-15 12:40

Coruja found out the problem and solved it.

- Issue History
Date Modified Username Field Change
08-06-15 02:52 gnomo New Issue
08-06-15 12:54 XuN Note Added: 0002814
10-06-15 22:25 Rizz Note Added: 0002815
11-06-15 01:27 gnomo Note Added: 0002816
11-06-15 16:36 XuN Note Added: 0002817
11-06-15 23:47 Rizz Note Added: 0002818
13-06-15 17:43 XuN Note Added: 0002826
16-06-15 00:07 Rizz Note Added: 0002828
19-06-15 21:27 Coruja Note Added: 0002839
20-06-15 08:38 XuN Note Added: 0002842
21-06-15 21:25 Rizz Note Added: 0002843
21-06-15 21:25 Rizz Note Edited: 0002843 View Revisions
22-06-15 22:31 Rizz Note Added: 0002852
27-06-15 12:40 XuN Note Added: 0002880
27-06-15 12:40 XuN Status new => resolved
27-06-15 12:40 XuN Fixed in Version => 0.56c Nightly
27-06-15 12:40 XuN Resolution open => fixed
27-06-15 12:40 XuN Assigned To => Coruja


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker