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
Stackable potions
Author Message
Kapa
Journeyman
*

Posts: 74
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Oct 2014
Reputation: 0



Post: #1
Stackable potions
HI, how to make potions stackable?
11-02-2014 03:56 AM
Find all posts by this user Like Post Quote this message in a reply
azmanomer
Journeyman
*

Posts: 139
Likes Given: 4
Likes Received: 18 in 16 posts
Joined: Nov 2013
Reputation: 1



Post: #2
RE: Stackable potions
i fix that changed potions scripts like this;

[itemdef i_potion_agility]
id=i_bottle_empty --------------> make id empty bottle
name=agility
type=t_potion
tdata1=i_bottle_empty
resources=1 i_reag_blood_moss,1 i_bottle_empty
skillmake=alchemy 15.1, t_mortar
on=@create
more1=s_agility
more2=15.1 60.0
dispid=i_bottle_blue -----------> give its color
update --------------------------> update
11-02-2014 04:24 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #3
RE: Stackable potions
They must have the same MORE2.

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
11-02-2014 04:46 AM
Find all posts by this user Like Post Quote this message in a reply
azmanomer
Journeyman
*

Posts: 139
Likes Given: 4
Likes Received: 18 in 16 posts
Joined: Nov 2013
Reputation: 1



Post: #4
RE: Stackable potions
yeah its look like mine is unnecessary Tongue just put one more2 value
11-02-2014 05:34 AM
Find all posts by this user Like Post Quote this message in a reply
Kapa
Journeyman
*

Posts: 74
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Oct 2014
Reputation: 0



Post: #5
RE: Stackable potions
thx i ll try that

Thx works perfect Smile
(This post was last modified: 11-02-2014 05:50 PM by Kapa.)
11-02-2014 04:59 PM
Find all posts by this user Like Post Quote this message in a reply
Kapa
Journeyman
*

Posts: 74
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Oct 2014
Reputation: 0



Post: #6
RE: Stackable potions
To make them stackable i think it shoud have been like that.

[ITEMDEF i_potion_Agility]
ID=i_bottle_empty
NAME=Agility
TYPE=T_POTION
TDATA1=i_bottle_empty
RESOURCES=i_reag_blood_moss, i_bottle_empty
SKILLMAKE=ALCHEMY 15.1

ON=@Create
MORE1=s_Agility
MORE2={ 15.1 60.0 }
COLOR=00c6
dispid=i_bottle_empty
update
11-02-2014 06:26 PM
Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #7
RE: Stackable potions
As was said previously.. make the MORE2 the same...

MORE2= X

not

MORE2= { X Y }

[Image: 2nis46r.jpg]
11-02-2014 09:51 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #8
RE: Stackable potions
Yes, you are writing the same for all potions like this but ... the {} means a random value from the numbers inside... so a potion can have 15.1 and another one 33.5, or any number until 60.0 ... so the created potions will not even be the same, hence they will not stack.
11-02-2014 10:11 PM
Find all posts by this user Like Post Quote this message in a reply
Kapa
Journeyman
*

Posts: 74
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Oct 2014
Reputation: 0



Post: #9
RE: Stackable potions
If i have 10 shrink bottles stacked and i use one all 10 disapier. any idea how to fix that?



[ITEMDEF i_potion_Shrink]
ID=i_bottle_empty
NAME=Shrink
TYPE=T_POTION
TDATA1=i_bottle_empty
RESOURCES=i_reag_batwing 2, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 100.0

ON=@Create
MORE1=s_shrink
MORE2=100.0
COLOR=09d1
dispid=i_bottle_empty
update

ON=@Dropon_char
obj=<argo>
IF !(0<obj.ISMYPET>)
src.sysMESSAGE="<obj.NAME> this is not your pet."
RETURN 1
ENDIF
obj.SHRINK
remove
RETURN 1

on=@dclick
target="what do you want to shrink?"
return 1

on=@targon_char
IF !<src.targ.ismypet>
src.sysMESSAGE="<src.targ.NAME> this is not your pet."
RETURN 1
ENDIF
src.targ.SHRINK
remove
RETURN 1

on=@targon_item
src.sysmessage="Items cannot be shrunk this way"
return 1
11-04-2014 05:39 AM
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: #10
RE: Stackable potions
the command remove, remove the whole stack, you have to use " consume"

CONSUME amount W Deducts an amount from the item, deleting it at 0.


It will not create the empty bottle btw.
11-04-2014 05:56 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)