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

Reload fire,soft

president vankk

Web Developer & AuraOT Owner
Joined
Jul 10, 2009
Messages
5,719
Solutions
9
Reaction score
339
I wanted a script that you speak:
!Soft it reloads the soft boots
!Fire and it reloads the Firewalker
rep+:wub:
 
Will work for both, just make two scripts.

LUA:
function onSay(cid, words, param)
	local worn_boots = -- edit id
	local boots = -- edit id

	if getPlayerItemById(cid, true, worn_boots) == true then
		doPlayerRemoveItem(cid, worn_boots, 1)
		doPlayerAddItem(cid, boots, 1)
	return true
        end
end

talkactions.xml
Code:
<talkaction words="!soft" event="script" value="soft_refill.lua"/>
<talkaction words="!fire" event="script" value="fire_refill.lua"/>
 
Last edited:
What? Are you asking if its a mod? If so it's not.

data/talkactions/scripts
Save it as soft_refill.lua and fire_refill.lua and edit the top of the script.
 
LUA:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Soft recharge" version="1.0" author="rodo" enabled="yes">
	<talkaction words="!soft" log="no" event="script"><![CDATA[


function onSay(cid, words, param)
        local soft = SOFT-ID

        if getPlayerItemById(cid, soft) == FALSE then
            return TRUE
        end
        
        doPlayerRemoveItem(cid, soft, 1)
        doPlayerAddItem(cid, XXXX, 1)
        return TRUE
end


]]></talkaction>
</mod>



LUA:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="FireW recharge" version="1.0" author="rodo" enabled="yes">
	<talkaction words="!fire" log="no" event="script"><![CDATA[


function onSay(cid, words, param)
        local fire = FIREW-ID

        if getPlayerItemById(cid, fire) == FALSE then
            return TRUE
        end
        
        doPlayerRemoveItem(cid, fire, 1)
        doPlayerAddItem(cid, XXXX, 1)
        return TRUE
end


]]></talkaction>
</mod>
}
 
Back
Top