View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002175SphereServerscript packpublic20-07-13 15:0805-08-13 20:54
Reporterxwerswoodx 
Assigned ToBen 
PrioritynormalSeveritytweakReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version16-06-2013, 0.56b Prerelease 
Target VersionFixed in Version0.56c Nightly 
Summary0002175: Create Food Spell
DescriptionCould you please save food uid to LOCAL.CREATEOBJECT1 when we use create food speel.
TagsNo tags attached.
Nightly VersionAutomated (specify build number)
Experimental FlagsNone
Option FlagsNone
Internal Build Number
Attached Files

- Relationships

-  Notes
(0001572)
xwerswoodx (reporter)
20-07-13 16:52

Sorry I wrote uid, BASEID I want to say for example if I write LOCAL.CREATEOBJECT1=i_fruit_melon

And if you have a chance can you pls add ARGN3 for uid :)
(0001573)
Ben (manager)
20-07-13 17:21

Ok, here is the deal.
I can make it so that LOCAL.CREATEOBJECT1=i_fruit_melon will create this food instead of the default.
BUT I can't do UID in ARGN3 since the item is created after any triggers are fired.
(0001574)
xwerswoodx (reporter)
20-07-13 17:34
edited on: 20-07-13 17:42

Okay thanks very much :) And maybe @effect works about second one but I am not sure :)
Edit: But effect doesn't work on Create food.

(0001576)
Coruja (developer)
20-07-13 19:59

[Spell 2]
DEFNAME=s_create_food
NAME=Create Food
SOUND=snd_SPELL_CREATE_FOOD
RUNES=IMY
CAST_TIME=1.5
RESOURCES=i_reag_garlic,i_reag_ginseng,i_reag_mandrake_root
RUNE_ITEM=i_rune_CREATE_FOOD
SCROLL_ITEM=i_scroll_CREATE_FOOD
FLAGS=SPELLFLAG_PLAYERONLY
EFFECT_ID=0
EFFECT=0
DURATION=0.0
MANAUSE=4
SKILLREQ=MAGERY 1.0
INTERRUPT=0.0,0.0

ON=@Success
SERV.NEWITEM {i_createfood_fruit_grapes 1 i_createfood_ham 1 i_etc 1}
NEW.CONT=<SRC.FINDLAYER.layer_pack>
SRC.SYSMESSAGE You magically create food in your backpack: <NEW.NAME> //Cliloc 1042695
SRC.SOUND 01e2


I'm using it here and it works fine. LOCAL.CREATEOBJECT would be a much better solution but maybe it will just be 100% usefull if theres a way to get the item UID (to allow choose where the item will be placed)

btw sphere default create food is a target-based spell and creates the item (food) on target location. This is not the default action for this spell, the default action (OSI) doesnt use target and create the food directly on the caster backpack (thats why I'm using this code)
(0001582)
xwerswoodx (reporter)
21-07-13 07:09

The problem is if you type RETURN 1 it fizzle but if you don't type RETURN 1 it create cake or other foods and in the and you have 2 food in same time.
(0001583)
Coruja (developer)
21-07-13 08:32

I really cant remember how I solved this for now, but my script is 100% working fine. I doesnt use any return on @Success and it doesnt create 2 items, just the correct item on backpack. Maybe theres something internally on s_create_food spell that -always- create a food when you cast it on a target. Or maybe there must be a def on sphere_defs.scp to set all itemdefs that create food spell uses. I cant remember but its something like this
(0001584)
xwerswoodx (reporter)
21-07-13 09:41

maybe spellflag_xyz created object because of this, maybe it can't be success.
(0001586)
Ben (manager)
21-07-13 17:06

07-07-04, kuch
- Added DEFFOOD value to sphere_defs.scp - this is a template of items you want
  to get by casting the create food spell; Yes it does not give you a great deal
  of control over what you get (ie skillbased for example), but its better than
  nothing
(0001588)
xwerswoodx (reporter)
21-07-13 17:26

Yes you are true, I didn't see that feature, thanks.
(0001624)
Ben (manager)
05-08-13 20:54

Will be adding local.CreateObject1 <itemdef> to create food spell. If set, it will produce this item when the spell if done.

- Issue History
Date Modified Username Field Change
20-07-13 15:08 xwerswoodx New Issue
20-07-13 16:52 xwerswoodx Note Added: 0001572
20-07-13 17:21 Ben Note Added: 0001573
20-07-13 17:34 xwerswoodx Note Added: 0001574
20-07-13 17:39 xwerswoodx Note Edited: 0001574 View Revisions
20-07-13 17:42 xwerswoodx Note Edited: 0001574 View Revisions
20-07-13 19:59 Coruja Note Added: 0001576
21-07-13 07:09 xwerswoodx Note Added: 0001582
21-07-13 08:32 Coruja Note Added: 0001583
21-07-13 09:41 xwerswoodx Note Added: 0001584
21-07-13 17:06 Ben Note Added: 0001586
21-07-13 17:26 xwerswoodx Note Added: 0001588
05-08-13 20:54 Ben Note Added: 0001624
05-08-13 20:54 Ben Status new => resolved
05-08-13 20:54 Ben Fixed in Version => 0.56c Nightly
05-08-13 20:54 Ben Resolution open => fixed
05-08-13 20:54 Ben Assigned To => Ben


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker