• 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!

Turn the Fire on?

Elvang

Member
Joined
Feb 11, 2008
Messages
633
Reaction score
14
Location
Canada, B.C.
Here is a simple script to turn the pot of water you can find out in the wild usually near humans on.

In the actions folder make a new lua file named "Camp Fire" and put this inside it:
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if itemEx.itemid == 1427 then 
		doTransformItem(itemEx.itemid, 1428)
		return TRUE
	    end
     if itemEx.itemid == 1428 then 
        doTransformItem(itemEx.itemid, 1427)
		return TRUE
  end
  return FALSE
end
Afterwards open your actions.xml and add in:
PHP:
<action itemid="1427" event="script" value="quests/Camp Fire.lua"/>
<action itemid="1428" event="script" value="quests/Camp Fire.lua"/>

Now in your map editor you need to add the action id "600" or what ever you choose to make it to either of the pots.

Here is a screenshot of what I mean:
1953-pots.png
 
Last edited:
mhmm simple and nice xd

I agree!


In fact, its SO simple, it should be applied to all of them, just not the ones with a unique id. If you'd like to do this, replace;

Lua:
<action actionid="600" event="script" value="quests/Camp Fire.lua"/>
with;
Lua:
<action itemid="600" event="script" value="quests/Camp Fire.lua"/>
 
Thank you grehy! It's been updated :)
I bet you never tested this script <_<
Fixed;
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if [COLOR="Red"][B]itemEx.itemid[/B][/COLOR] == 1427 then 
        doTransformItem([COLOR="Red"][B]itemEx.uid[/B][/COLOR], 1428)
    elseif [COLOR="Red"][B]itemEx.itemid[/B][/COLOR] == 1428 then 
        doTransformItem([COLOR="Red"][B]itemEx.uid[/B][/COLOR], 1427)
    else
	return FALSE
    end
    return TRUE
end
 
@Topic,

Great idea.
Simple, but fun.
 
I bet you never tested this script <_<
Fixed;
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if [COLOR="Red"][B]itemEx.itemid[/B][/COLOR] == 1427 then 
        doTransformItem([COLOR="Red"][B]itemEx.uid[/B][/COLOR], 1428)
    elseif [COLOR="Red"][B]itemEx.itemid[/B][/COLOR] == 1428 then 
        doTransformItem([COLOR="Red"][B]itemEx.uid[/B][/COLOR], 1427)
    else
	return FALSE
    end
    return TRUE
end

It doens't affect all of them now, gb.
 
Back
Top