Shattered Kingdoms

Where Roleplay and Tactics Collide
VOTE NOW!
It is currently Sun Dec 22, 2024 11:21 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 14 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: New scrited items system bug?
PostPosted: Sat Apr 29, 2006 8:50 am 
Offline
Mortal

Joined: Wed Aug 07, 2002 11:54 pm
Posts: 2765
Location: Pyrgos, Greece
So I was doing some test of my own and I happened to wear a certain item that grants the shield spell. I already had shield from before so nothing happened first.

Code:
 oOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOo
 o [Affects] Golg 'oroth - Wrath of the Serpent                              o
 o===-===-===-===-===-===-===-===-===-===-===-===-===-===-===-===-===-===-===o
 o Affect: 'detect hidden'                                                   o
 o Affect: 'detect invis'                                                    o
 o Affect: 'shield' - deflection bonus to magical protection                 o
 o Affect: 'armor'                                                           o
 o Affect: 'protection'                                                      o
 o Affect: 'infravision'                                                     o
 o Affect: 'spirit aura'                                                     o
 o Affect: 'bless' - morale bonus to probability to hit                      o
 o Affect: 'bless' - morale bonus to willpower                               o
 oOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOo


Then...
Code:
>
wear XXX
It is a bit small for you.
You stop using a turban of shrouding mist.
You shiver as frigid air seeps from XXX.
The frost forms around you.
You are already protected by a force shield.  <-- Yes, I know, thank you.
You wear XXX on your head.

[HP:100%] [ME: 92%] [PE:100%]


I do my tests, I do a remove...
Code:
wear tur
You stop using XXX.
The chattering of your teeth subsides.
Your force shield shimmers then fades away.   <-- WHY?!?
The mystical armor shimmers slightly, and several spirits escape it to surround you in their protection.
You wear a turban of shrouding mist on your head.

[HP: 99%] [ME: 42%] [PE:100%]


And then...
Code:
oOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOo
 o [Affects] Golg 'oroth - Wrath of the Serpent                              o
 o===-===-===-===-===-===-===-===-===-===-===-===-===-===-===-===-===-===-===o
 o Affect: 'protection'                                                      o
 o Affect: 'armor'                                                           o
 o Affect: 'detect hidden'                                                   o
 o Affect: 'detect invis'                                                    o
 o Affect: 'infravision'                                                     o
 o Affect: 'spirit aura'                                                     o
 o Affect: 'bless' - morale bonus to probability to hit                      o
 o Affect: 'bless' - morale bonus to willpower                               o
 oOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOoOOOo


On remove of XXX my shield was gone, the spell from the NPC that was keeping it on me was released(NPC was back at 100% ME).

Perhaps fix it so it doesn't remove scripted spell unless the item itself casts the spell on the PC and he doesn't have it from earlier.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Apr 29, 2006 8:54 am 
Offline
Mortal

Joined: Mon Sep 12, 2005 3:18 pm
Posts: 1704
It's the same with all scripted items - my di/dh mace will remove di from a potion I quaffed if I remove it.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Apr 29, 2006 6:22 pm 
Offline
Mortal

Joined: Mon Nov 29, 2004 10:53 am
Posts: 1786
A turban now? [REDACTED].


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Apr 29, 2006 6:29 pm 
You never spent any time around Syral obviously.


Top
  
Reply with quote  
 Post subject:
PostPosted: Sat Apr 29, 2006 7:08 pm 
Offline
Mortal

Joined: Mon Nov 29, 2004 10:53 am
Posts: 1786
Only thing Syral ever did to any of my characters was c summon alshanite;order all bash alshanite. :roll:

Oh wait, I thought the XXX was the turban. My bad. Read it wrong, but yes the script removes shield upon removal. It doesn't check if the shield is from the XXX or not.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Apr 29, 2006 7:09 pm 
Offline
Mortal

Joined: Mon Jun 17, 2002 4:18 pm
Posts: 2026
Location: In the palm of the left hand black
probably what is happening is that the item is casting a higher level spell on you than the one your NPC is putting on you in effect over riding it. Then when you remove the item, it removes the spell.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Apr 29, 2006 8:09 pm 
Offline
Mortal

Joined: Thu Mar 07, 2002 3:36 am
Posts: 194
Fepel Veiled wrote:
Only thing Syral ever did to any of my characters was c summon alshanite;order all bash alshanite. :roll:

Oh wait, I thought the XXX was the turban. My bad. Read it wrong, but yes the script removes shield upon removal. It doesn't check if the shield is from the XXX or not.


There is no flag for scripts that come from items, potions, etc. I.e. the item couldn't have a "release list", nor would a glance at the pfile show "Shield - cast on Character from Item". The only way to fix this would be to check the character for the presence of the shield spell before activating the script, assigning a variable for a positive match, and the bypassing the removal processes for instances where the variable is positive. Its really not something you're thinking of when you're coding phat lewt. It comes as hindsight. Unless you're Wert.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Apr 29, 2006 9:12 pm 
Offline
Mortal

Joined: Wed Aug 07, 2002 11:54 pm
Posts: 2765
Location: Pyrgos, Greece
Actually some items work like that soultoast. The sacred suits for example, if you keep let's say the low level spell casted on you, the script will simply never fire. And removing the item won't remove any spell.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Apr 29, 2006 9:44 pm 
Offline
Mortal

Joined: Thu Mar 07, 2002 3:36 am
Posts: 194
Dark-Avenger wrote:
Actually some items work like that soultoast. The sacred suits for example, if you keep let's say the low level spell casted on you, the script will simply never fire. And removing the item won't remove any spell.

You're reinforcing what I said.
1. These sacred suits probably use a failsafe of some sort similar to what I've mentioned.
2. I said that such a failsafe would not be implemented by most IMMs. Unless they're Wert. And Wert crafted the sacred suits.

I was pointing out the scripting error, explaining why it happened by shedding light on the misconceptions of "flags", and describing how to keep such oversights from happening in the future, that is all. :)

You kids need to read all the way through my posts, let the material digest, then respond. I love the fact that you all agree with me, I just don't like pointing it out to you. :P


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Apr 29, 2006 9:50 pm 
Offline
Mortal

Joined: Wed Aug 07, 2002 11:54 pm
Posts: 2765
Location: Pyrgos, Greece
The "change" to sacred suits(that happened with the whole change to the scripting system) didn't happen by Wert I think.

So there are more builders that can see such things and change them.

And you know I'll always agree with the player of Janaan. :P


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ]  Go to page 1, 2  Next

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 117 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group