SphereCommunity

Full Version: Trying to make an item that...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
What up everyone!

Was messing around with making a mask that when you equip it, it changes your form, kind of like Polymorph.

Here is what I scripted after looking at the relationship between s_polymorph and sm_polymorph. I'm assuming at this point the 'POLY' function is hardcoded in the source, so I'm hoping someone knows if there is like MORE or some other reference I could use to easily do this.

Here is my code, the server throws errors on the reference to 'POLY'
Code:
[itemdef i_mask_dire_wolf_form}
DEFNAME=i_mask_dire_wolf_form
ID=i_mask_tribal_red
NAME=mask of dire wolf form

on=@create
color=044a
hitpoints={10 50}

on=@equip
POLY c_wolf_dire
src.message=You feel the power of the <name>.

on=@unequip
POLY c_man

I appreciate any help or comments.

Also, is there a reference somewhere that lists what all the MORE's do for each item? Probably not, but figured I'd ask Smile

Thanks again,
Murmur
Try src.poly c_wolf_dire

without SRC, POLY is called on the item
100% newbie mistake there, my bad. Thanks a million for the reply! Smile

Ok, what I'm noticing is I guess I'm inheriting some properties of how the spell Polymorph works, which is preventing me from a couple of things:

1. Once I put the mask on, I'd like to still be able to have all my gear on, so that I can fight like normal.

2. I'd like to be able to take the mask off and go back into c_man form, which is impossible with my current script because it takes the mask off when it casts Poly.

I studied how Polymorph worked for like 3 hours last night, and I never saw any code in the scripts that disarm all your stuff, so I'm assuming its in the source.

That being said, is there just a command other than SRC.POLY c_dire_wolf that would change what character model my SRC player would look like?

Current code for reference:
Code:
[itemdef i_mask_dire_wolf_form}
DEFNAME=i_mask_dire_wolf_form
ID=i_mask_tribal_red
NAME=mask of dire wolf form

on=@create
color=044a
hitpoints={10 50}

on=@equip
SRC.POLY c_wolf_dire
src.message=You feel the power of the <name>.

I really appreciate the help, always wanted to make items like this and never reached out to ask about it.
Murmur

Just tried SRC.BODY and I'm getting closer to what I want, but I still can't equip items, going to keep trying stuff.

Code:
[itemdef i_mask_dire_wolf_form}
DEFNAME=i_mask_dire_wolf_form
ID=i_mask_tribal_red
NAME=mask of dire wolf form

on=@create
color=044a
hitpoints={10 50}

on=@equip
SRC.BODY c_wolf_dire
src.message=You feel the power of the <name>.

//on=@unequip
//SRC.POLY c_man

Ok...

so I removed MT-NONHUM, and added MT_USEHANDS|MT_EQUIP to the CAN of c_dire_wolf.

This works great! So I was like "I don't want normal dire wolves to be able to equip stuff, just in case.

So I created a new chardef, that is basically exactly like a direwolf, but with CAN=MT_WALK|MT_RUN|MT_USEHANDS|MT_EQUIP.

Now for whatever reason, this doesn't work... Going to play with it some more and
see if I can figure out why it didn't like the new CHARDEF

Thanks for the help again darksun84, I appreciate it.

Update: So I looked at my CHARDEF that I made, and I forgot to put in ID=c_direwolf... so I added that and it worked!!! Only one time though... So I equip it, it turns BODY into a dire wolf, then I unequip and it turns me back into man, then I equip it again, and the client does something weird and freezes like there was something on the cursor.

Here are the exact scripts:

Code:
[CHARDEF c_wolf_dire_mask]
DEFNAME=c_wolf_dire_mask
ID=c_wolf_dire
NAME=dire wolf
ICON=i_pet_wolf_dire
SOUND=snd_animals_wolf1
CAN=MT_WALK|MT_RUN|MT_USEHANDS|MT_EQUIP
//CAN=MT_WALK|MT_RUN|MT_NONHUM
DAM=20,32
ARMOR=20
DESIRES=r_jungle,r_forests
AVERSIONS=r_civilization
FOODTYPE=t_meat_raw
MAXFOOD=15
RESOURCES=1 i_ribs_raw,7 i_hide_spined
BLOODCOLOR=colors_blood
MOVERATE=100
TAG.Barding.Diff=50.3
FollowerSlots=1
TAG.SlayerGroup=WOLF
TEVENTS=e_carnivores
CATEGORY=Animals
SUBSECTION=Wild
DESCRIPTION=Wolf (dire)
ON=@Create
   NPC=brain_animal
   FAME={1000 1499}
   KARMA={-1000 -1499}
   STR={96 120}
   MAXHITS={58 72}
   DEX={81 105}
   MAXSTAM={81 105}
   INT={36 60}
   MAXMANA={36 60}
   MAGICRESISTANCE={57.0 75.0}
   TACTICS={50.0 70.0}
   TAMING={80.0 85.0}
   WRESTLING={60.0 80.0}
   MODAR={0 5}
   RESCOLD={5 10}
   RESENERGY={10 15}
   RESFIRE={10 20}
   RESPOISON={5 10}
[itemdef i_mask_dire_wolf_form}
DEFNAME=i_mask_dire_wolf_form
ID=i_mask_tribal_red
NAME=mask of dire wolf form

on=@create
color=044a
hitpoints={10 50}

on=@equip
SRC.BODY c_wolf_dire_mask
src.message=You feel the power of the <name>.

on=@unequip
SRC.BODY c_man

I appreciate any insight you could provide, its probably something stupid that Im not aware of. Heading to work, be back on tonight.

Thanks,
Murmur
Ok came back at it with fresh eyes. The script works perfect as it is, except that once I unequip the mask, I turn back into a human male, but its like the client hangs up on the paperdoll and it stops responding (can't equip or unequip anything until I restart the client), but the client doesn't crash or anything.

Oh and I've tried two different clients, a clean ML install (6.0.0) and the UORennaisance server's client (5.0.5.3)

Starting to think it might be the client, if anyone checks my code for me, please let me know if the paperdoll hangs up after you unequip the mask. Or of course if you spot the problem with my code, please let me know. Thanks!

Code:
[itemdef i_mask_dire_wolf_form}
DEFNAME=i_mask_dire_wolf_form
ID=i_mask_tribal_red
NAME=mask of dire wolf form

on=@create
color=044a
hitpoints={10 50}

on=@equip
SRC.BODY c_wolf_dire_mask
src.message=You feel the power of the <name>.

on=@unequip
SRC.BODY C_MAN
src.message=You no longer feel like a dire wolf.

Code:
[CHARDEF c_wolf_dire_mask]
DEFNAME=c_wolf_dire_mask
ID=c_wolf_dire
NAME=dire wolf
ICON=i_pet_wolf_dire
SOUND=snd_animals_wolf1
CAN=MT_WALK|MT_RUN|MT_USEHANDS|MT_EQUIP
//CAN=MT_WALK|MT_RUN|MT_NONHUM
DAM=20,32
ARMOR=20
DESIRES=r_jungle,r_forests
AVERSIONS=r_civilization
FOODTYPE=t_meat_raw
MAXFOOD=15
RESOURCES=1 i_ribs_raw,7 i_hide_spined
BLOODCOLOR=colors_blood
MOVERATE=100
TAG.Barding.Diff=50.3
FollowerSlots=1
TAG.SlayerGroup=WOLF
TEVENTS=e_carnivores
CATEGORY=Animals
SUBSECTION=Wild
DESCRIPTION=Wolf (dire)
ON=@Create
   NPC=brain_animal
   FAME={1000 1499}
   KARMA={-1000 -1499}
   STR={96 120}
   MAXHITS={58 72}
   DEX={81 105}
   MAXSTAM={81 105}
   INT={36 60}
   MAXMANA={36 60}
   MAGICRESISTANCE={57.0 75.0}
   TACTICS={50.0 70.0}
   TAMING={80.0 85.0}
   WRESTLING={60.0 80.0}
   MODAR={0 5}
   RESCOLD={5 10}
   RESENERGY={10 15}
   RESFIRE={10 20}
   RESPOISON={5 10}


-Murmur

Just tried an official install client 7.0.13.4, same issue

Tried client 4.0.11c(patch0), same issue
Found this in the nightly Changelog:

http://tracker.sphere.torfo.org/bugs/view.php?id=2544

Looks like perhaps this is the issue. Might just change to an older version of sphere for the time being?

Oh, and I'm using .056b Release WIN32 right now.
Why would you use an even older version when this issue on the tracker has been resolved almost 2 years ago. You need to upgrade, not downgrade.
Hmmm, ok yeah that was a typo.

Earlier I was using:
Sphere Version 0.56c-Release [WIN32] by http://www.spherecommunity.net, compiled at Apr 10 2016 (16:50:52) [build 2807 / GIT hash 0dc0ebf]

And for good measure I went ahead and tried it on:
Sphere Version 0.56d-Nightly [WIN32] by http://www.spherecommunity.net

UPDATE: I figured it out, the script was perfect... The client version didn't matter.... The server version didn't matter it was f(*^*& RAZOR!! For some weird reason, when you change BODY values, it queues up the actions and Razor blocks the reequip actions until they all time out.

So for clarity, there is no bug with any client or server versions, just in case anyone gets confused a couple of years from now reading this post.

Geez, what a waste of time LOL, guess I'll never forget that setting now *slaps forehead*
Reference URL's