SphereCommunity
ethy's - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: ethy's (/Thread-ethy-s)

Pages: 1 2


ethy's - dabritmusic - 02-06-2014 08:58 AM

hello i have this ethy script. when the player mounts everything works but when they dismount it drops a corpse of the mount. everything else works. it bounces into the backpack and all.

[chardef c_et]
id=c_horse_gray

on=@create
color=0486

on=@click
remove
return 1

on=@npcrestock
remove
return 1

on=@skillstart
remove
return 1

[itemdef i_et_eh]
NAME=Ethereal Horse
id=i_pet_horse
type=t_normal
CATEGORY=Ethereal
SUBSECTION= Ethereal pets
DESCRIPTION=Ethereal Horse

on=@create
color=0486
attr=14

on=@dclick
if !(<src.findlayer.25.uid>)
src.newitem i_et_horse
src.act.more1=c_et
src.act.equip
src.update
remove
return 1
else
src.message you are already mounted
return 1
endif


RE: ethy's - XuN - 02-06-2014 09:00 AM

on=@create
color=0486
str=1 //Otherwise the npc would die instantly


RE: ethy's - Alaric - 02-06-2014 07:45 PM

Or i'm using hits/maxhits. You can chooseShifty


RE: ethy's - Shidhun - 02-07-2014 12:15 AM

I'm just using a very simple script for an "ethereal-like" function :

//Add this entry to a statuette or into a dialog, or whatever you want
serv.newnpc c_horse_brown_dk
new.color=0123 //should it have a special color?
new.MEMORY <SRC.UID> 02
new.mount <src.uid>
src.events +e_ethereal_mount
return 0

[events e_ethereal_mount]
on=@dismount
argo.remove
events -e_ethereal_mount
return 1


RE: ethy's - dabritmusic - 02-07-2014 07:35 AM

(02-06-2014 09:00 AM)XuN Wrote:  on=@create
color=0486
str=1 //Otherwise the npc would die instantly

THIS WOULD REMOVE THE DYING CORPSE WHEN UNMOUNTED?


RE: ethy's - Mordaunt - 02-07-2014 10:17 AM

No... Shidhuns answer does


RE: ethy's - Pidrila - 02-07-2014 04:33 PM

Code:
[chardef c_m_reptalon2_newbie]
id=C_giant_beetle
name=Reptalon
SOUND=snd_ANIMALS_HORSE1
CAN=MT_WALK|MT_RUN
ICON=i_pet_dragon
DAM=15,20
ARMOR=40
FOODTYPE=9999 t_fruit

On=@Create
color=0870
STR={100 180}
DEX={90 130}
INT={6 10}
PARRYING={35.0 45.0}
MAGICRESISTANCE={25.0 30.0}
TACTICS={29.0 44.0}
WRESTLING={29.0 44.0}
TAMING=300.0
NPC=brain_animal


ON=@HUNGER
FOOD=<MAXFOOD>
RETURN 1


[itemdef i_et_reptalon]
NAME=Ethereal Reptalon
id=i_pet_dragon
type=t_normal
WEIGHT=4

ON=@CREATE
color=0870
tag0.owned 1
ATTR=04
//TAG.LIFETIME = <EVAL <SERV.TIME>+60*60*24*365*10>

ON=@CLICK
NAME = <SERV.ITEMDEF.<BASEID>.NAME> owned by <link.name>
MESSAGE <NAME>
RETURN 1

ON=@DCLICK
IF (<src.flags> & statf_onhorse)
    src.sysmessage You are already on a transport!
    RETURN 1
ENDIF

IF <cont.uid>==<src.findlayer(21).uid>
ELSE
    src.message You must have it in your backpack to use!
    RETURN 1
ENDIF

IF (<src.body>!=c_man) && (<src.body>!=c_woman) && (<src.body>!=c_elf_female) && (<src.body>!=c_elf_male)
    src.sysmessage You can't use that in your current state!
    RETURN 1
ENDIF

IF (<link>==04fffffff)
    LINK = <src.uid>
ENDIF

IF (<link>==<src.uid>)
    SRC.NEWNPC c_m_reptalon2_newbie
    NEW.P <SRC.P>
    IF (<src.findlayer.22.uid>)
        new.color=<src.findlayer.22.color>
    ELIF (<src.findlayer.13.uid>)
        new.color=<src.findlayer.13.color>
    ELSE
        new.color=0870
    ENDIF
    TAG.NPCUID = <NEW.UID>
    SERV.NEWITEM i_memory
    NEW.COLOR memory_ipet
    NEW.MORE1 04
    NEW.MORE2 <SERV.TIME>
    NEW.MOREP <P>
    NEW.LINK <SRC.UID>
    NEW.CONT <TAG.NPCUID>
    NEW = <TAG.NPCUID>
    NEW.DCLICK
    TAG.NPCUID =
    //SRC.TAG.NT_<src.findlayer.25.uid>_LT = <TAG0.LIFETIME>
    REMOVE
    RETURN 1
ENDIF
SRC.MESSAGE This isn't your horse!
RETURN 1



RE: ethy's - XuN - 02-07-2014 07:47 PM

I finally had to upload mines, take a look here: http://forum.spherecommunity.net/sshare.php?download=282 , they are much more simple and with only the needed checks.


RE: ethy's - dabritmusic - 02-09-2014 05:32 PM

thanks for that


RE: ethy's - miltonvo - 05-24-2016 03:38 AM

(02-07-2014 07:47 PM)XuN Wrote:  I finally had to upload mines, take a look here: http://forum.spherecommunity.net/sshare.php?download=282 , they are much more simple and with only the needed checks.

hi for all,
i want to put a timer on ethereal horses that when reaches 1 month the ethereal dissappear, how can i do this?