Call Me Taffy
Call Me Maybe
- Joined
- Aug 9, 2009
- Messages
- 651
- Reaction score
- 123
Just got home from work, but I will test it tonight/tomorrow. Thanks for your contribution!
hm. when I open it up, it automatically selects the first ingredient in the list. are you using otclient?There are errors if you ask to add an ingredient without selecting one. Minor bug, but you get a console error, and the modals closes without any info
I was using OTClienthm. when I open it up, it automatically selects the first ingredient in the list. are you using otclient?
Edit: answered my own question. Added a fix, updated lib/alchemy.lua. Let me know how it goes @samco
Edit2: won't work that way, choiceId defaults to 255, the issue is, on the ingredient list, it doesn't display all the ingredients, only the ones you're carrying, so I can't default it to choiceId 1, because the ingredient in spot one may not exist in your inventory. I have to make a workaround.
Aaaand edit3: fixed. will select the first available item in the list as the default if nothing is selected. Just make sure if you have more than 255 ingredients or pre-made recipes, that you skip 255 as an id @samco
I had no idea how this system looked like before this haha, nice!I allready have it working. Here a sample:
Ill test more things in a minutes, im doing my lunch now . By the way, i have to look at the onLook thing, cause i cant look any object now.
Gonna tell you later, and maybe post a video.
EDIT:: Small video.
SameI had no idea how this system looked like before this haha, nice!
Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/alchemy.lua:onModalWindow
data/alchemy.lua:622: attempt to index a nil value
stack traceback:
[C]: in function '__index'
data/alchemy.lua:622: in function 'potionRecipeWindowChoice'
data/creaturescripts/scripts/alchemy.lua:5: in function <data/creaturescripts/scripts/alchemy.lua:1>
post line 622Excelent system soo huge.. well done .. btw im having a problem when i try to brew from potions already known
Code:Lua Script Error: [CreatureScript Interface] data/creaturescripts/scripts/alchemy.lua:onModalWindow data/alchemy.lua:622: attempt to index a nil value stack traceback: [C]: in function '__index' data/alchemy.lua:622: in function 'potionRecipeWindowChoice' data/creaturescripts/scripts/alchemy.lua:5: in function <data/creaturescripts/scripts/alchemy.lua:1>
I dont know if its important or not but well, i made a change.. just added the ml bonus feature and everything works fine.. i'm able to create under ingredients option but potions no.. any clue? i tried to imagine but theres no nothing in my mind that could help me
Using tfs 1.2
post line 622
print(r)
nil
Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/alchemy.lua:onModalWindow
data/alchemy.lua:623: attempt to index a nil value
stack traceback:
[C]: in function '__index'
data/alchemy.lua:623: in function 'potionRecipeWindowChoice'
data/creaturescripts/scripts/alchemy.lua:5: in function <data/creaturescripts/scripts/alchemy.lua:1>
Ah, just a missing variable. Not sure how that happenedCode:nil Lua Script Error: [CreatureScript Interface] data/creaturescripts/scripts/alchemy.lua:onModalWindow data/alchemy.lua:623: attempt to index a nil value stack traceback: [C]: in function '__index' data/alchemy.lua:623: in function 'potionRecipeWindowChoice' data/creaturescripts/scripts/alchemy.lua:5: in function <data/creaturescripts/scripts/alchemy.lua:1>
function Player:potionRecipeWindowChoice(windowId, buttonId, choiceId)
local p = self:getGuid()
Lua Script Error: [Event Interface]
data/events/scripts/player.lua:Player@onLookInTrade
data/events/scripts/player.lua:111: attempt to call global 'stat_onLook' (a nil value)
stack traceback:
[C]: in function 'stat_onLook'
data/events/scripts/player.lua:111: in function <data/events/scripts/player.lua:108>
description = stat_onLook(thing, description)