• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Fresh Mushroom Beer

adrielmandra

New Member
Joined
Jul 10, 2011
Messages
35
Reaction score
0
I am installing the Bigfoot's quest, but the Fresh Mushroom Beer does not work. I added the script it and nothing happens to it when used.
 
It was for the person using it like any other drink of the game. Right click and use on yourself and then place the following commands:

elseif item.itemid == Then BB_GNOME_ITEMS_TBL.fresh_mushroom_beer
BB_GNOME_send_player_red_text (cid, "Gulp!")
doRemoveItem (item.uid, 1)
if BB_GNOME_getPlayerStorageValue (cid, BB_GNOME_MISSION_STG) == 4 Then
BB_GNOME_setPlayerStorageValue (cid, BB_GNOME_MISSION_STG, 3)
BB_GNOME_setPlayerStorageValue (cid, BB_GNOME_TEST_IN_GNOMOLOGY_ANSWERS_STG, 0)
BB_GNOME_setPlayerStorageValue (cid, BB_GNOME_TEST_IN_GNOMOLOGY_POINTS_STG, 0)
BB_GNOME_send_player_white_text (cid, "Your mind feels refreshed!")
end
elseif item.itemid == Then BB_GNOME_ITEMS_TBL.stale_mushroom_beer
BB_GNOME_send_player_red_text (cid, "Phew!")
doRemoveItem (item.uid, 1)



The item is not "usable". You can not click it right and put it in character.
 
by nothing happens, you mean it didn't even execute the function or?? wut
To see if i did execute function write:
Print("me zo working")
As the first line inside the onUse function.

If nothing comes into console, you didn't register item correctly.

If it did come up then need to see your full script.
 
Follows the script:

Lua:
function in Use (cid, item, fromPosition item, toPosition)
local player = Player (cid)
--local v = tablica [item.actionid] if item.itemid == BB_GNOME_ITEMS_TBL.GNOMISH_REPAIR_CRYSTAL then if getPlayerStorageValue (cid, BB_GNOME_TASKS_KEEPER)> = 0 and getPlayerStorageValue (cid, BB_GNOME_TASKS_KEEPER) <5 then if (isInArray (BB_GNOME_ITEMS_TBL.DAMAGED_CRYSTALS, itemEx .itemid)) then setPlayerStorageValue (cid, BB_GNOME_TASKS_KEEPER, getPlayerStorageValue (cid, BB_GNOME_TASKS_KEEPER) + 1) doTransformItem (itemEx.uid, BB_GNOME_ITEMS_TBL.REPAIRED_CRYSTAL) doDecayItem (itemEx.uid) doSendMagicEffect (toPosition, BB_GNOME_KEEPER_EFFECT_WHEN_REPAIRING_CRYSTAL) BB_GNOME_send_player_white_text (cid, "You have repaired the damaged crystal! ") else doPlayerSendCancel (cid," You can only repair damaged crystals with this item! ") end elseif getPlayerStorageValue (cid, BB_GNOME_TASKS_KEEPER)> = 5 Then doPlayerSendCancel (cid," You allready repaired damaged enough crystals, mission report back to Commander Stone. ") else doPlayerSendCancel (cid," To use this crystal you need to take Crystal Keeper mission from Commander Stone. ") end elseif item.itemid == BB_GNOME_ITEMS_TBL.Gnomish_Extraction_Crystal then if getPlayerStorageValue (cid, BB_GNOME_TASKS_SPARK)> = 0 and getPlayerStorageValue (cid, BB_GNOME_TASKS_SPARK) <7 then if itemEx.itemid == BB_GNOME_ITEMS_TBL.crystal_crusher_body_possible_to_spark Then doSendMagicEffect (toPosition, BB_GNOME_SPARK_EFFECT_ON_CRYSTAL_CRUSHER_BODY) BB_GNOME_send_player_white_text (cid, "You Gathered the spark.") setPlayerStorageValue (cid, BB_GNOME_TASKS_SPARK, getPlayerStorageValue (cid, BB_GNOME_TASKS_SPARK ) + 1) doTransformItem (itemEx.uid, BB_GNOME_ITEMS_TBL.crystal_crusher_body_after_spark) elseif itemEx.itemid == BB_GNOME_ITEMS_TBL.crystal_crusher_body_too_much_fresh Then BB_GNOME_send_player_white_text (cid, "You will have to wait a moment for the corpse to be ready.") else doPlayerSendCancel (cid, "You can not use this object on this item.") end elseif getPlayerStorageValue (cid, BB_GNOME_TASKS_SPARK)> = 7 Then doPlayerSendCancel (cid, "You allready charged enough sparks, report mission back to Commander Stone.") elseif getPlayerStorageValue (cid, BB_GNOME_TASKS_SPARK ) <0 then doPlayerSendCancel (cid, "To use this you need to extraction crystal take Spark Hunting mission from Commander Stone.") end elseif item.itemid == BB_GNOME_ITEMS_TBL.fresh_mushroom_beer Then BB_GNOME_send_player_red_text (cid, "Gulp!") doRemoveItem (item .uid, 1) if BB_GNOME_getPlayerStorageValue (cid, BB_GNOME_MISSION_STG) == 4 Then BB_GNOME_setPlayerStorageValue (cid, BB_GNOME_MISSION_STG, 3) BB_GNOME_setPlayerStorageValue (cid, BB_GNOME_TEST_IN_GNOMOLOGY_ANSWERS_STG, 0) BB_GNOME_setPlayerStorageValue (cid, BB_GNOME_TEST_IN_GNOMOLOGY_POINTS_STG, 0) BB_GNOME_send_player_white_text (cid, "Your mind feels refreshed! ") end elseif item.itemid == BB_GNOME_ITEMS_TBL.stale_mushroom_beer Then BB_GNOME_send_player_red_text (cid," Phew! ") doRemoveItem (item.uid, 1) elseif item.itemid == == BB_GNOME_ITEMS_TBL.floor_with_some_truffels itemEx.itemid BB_GNOME_ITEMS_TBL.little_pig and then if BB_GNOME_getPlayerStorageValue (cid, BB_GNOME_TASKS_DIGGING)> = 0 and BB_GNOME_getPlayerStorageValue (cid, BB_GNOME_TASKS_DIGGING) <3 Then BB_GNOME_setPlayerStorageValue (cid, BB_GNOME_TASKS_DIGGING, BB_GNOME_getPlayerStorageValue (cid, BB_GNOME_TASKS_DIGGING) + 1) doSendMagicEffect (toPosition, BB_GNOME_DIGGING_LITTLE_PIG_EAT_TRUFFLES_EFFECT) BB_GNOME_send_player_white_text (cid, "The little pig happily eats the truffles. ") end end
return true
end
[/ LUA]

It is the function fo fresh mushroom beer. The others are normal.
 
my god, my eyez!! i will look that mess tomorrow, too tired for this today..

but did you get the console message? you didn't say you did.
 
No, just does not work.
well i'm glad, then I don't have to dig into "that code", because you have failed to register your item in XML.
What is the beer Unique id or itemId? and how did you add it to actions.xml?

And since now i see your code, i can show you exactly where you had to put that print. Incase you didn't use logic and just rolled the dice for print location.
Code:
function in Use (cid, item, fromPosition item, toPosition)
Print("me zo working")
Everything else
 
It is recorded as follows:

<action itemid = "18305;18306" event = "script" value = "gnomebase / useables.lua" /> <- fresh_mushroom_beer, stale beer mushroom ->
 
<action fromid="18305" toid="18306" script="gnomebase/useables.lua"/> <!-- fresh_mushroom_beer, stale beer mushroom -->
 
Back
Top