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

!soft talkactions remove money if dont have worn softs

Wiw3K

New Member
Joined
Apr 16, 2008
Messages
371
Reaction score
3
as title says

here is script:

LUA:
-- Script by Magic
function onSay(cid, words, param)
-- \/ Panel konfiguracji skryptu \/
local stare = 6530
local nowe = 2640
local pozycja = getPlayerPosition(cid)
local tekst = "Soft" -- Wpisz tekst
local tekst1 = "Nie masz zuzytych softow." -- Co ma pisac jak nie ma softow
local tekst2 = "Nie masz kasy, Koszt odnowy softow to 1cc." -- Co ma pisac jak nie ma kasy
-- /\ Panel konfiguracji skryptu /\
        if doPlayerRemoveMoney(cid,10000) == TRUE then
                if doPlayerRemoveItem(cid,stare,1) == TRUE and doPlayerAddItem(cid,nowe,1) == TRUE then
                        doSendAnimatedText(pozycja,soft,198)
                else
                        doPlayerSendTextMessage(cid,22,tekst1)
                end
        else
                doPlayerSendTextMessage(cid,22,tekst2)
        return 1
        end
end
 
LUA:
function onSay(cid, words, param, channel)


  -- Script by Magic
function onSay(cid, words, param)
-- \/ Panel konfiguracji skryptu \/
local stare = 6530
local nowe = 2640
local pozycja = getPlayerPosition(cid)
local tekst = "Soft" -- Wpisz tekst
local tekst1 = "Nie masz zuzytych softow." -- Co ma pisac jak nie ma softow
local tekst2 = "Nie masz kasy, Koszt odnowy softow to 1cc." -- Co ma pisac jak nie ma kasy
-- /\ Panel konfiguracji skryptu /\
        if doPlayerRemoveMoney(cid,10000) == TRUE and doPlayerRemoveItem(cid,stare,1) == TRUE then
		doPlayerAddItem(cid,nowe,1) == TRUE then
		doSendAnimatedText(pozycja,soft,198)
		doPlayerSendTextMessage(cid,22,tekst1)
        else
                doPlayerSendTextMessage(cid,22,tekst2)
        return 1
        end
end
Sorry, i can't speak pl, because this idk what the text means.

Regards,
Shawak
 
still remove money if doesn't have worn soft boots...

script
LUA:
function onSay(cid, words, param)
local stare = 6530
local nowe = 2640
local pozycja = getPlayerPosition(cid)
local tekst = "Softy!"
local tekst2 = "Nie masz kasy, Koszt odnowy softow to 1cc lub zuzytych softow."

        if doPlayerRemoveMoney(cid,10000) == TRUE and doPlayerRemoveItem(cid,stare,1) == TRUE then
                doPlayerAddItem(cid,nowe,1)
                doSendAnimatedText(pozycja,tekst,198)
        else
                doPlayerSendTextMessage(cid,22,tekst2)
        return 1
        end
end
 
Sprobuj to ;d

Code:
function onSay(cid, words, param, channel)
	if (getPlayerItemCount(cid, 6530) >= 1) then
		if (getPlayerMoney(cid) >= 10000) then
			doPlayerRemoveMoney(cid, 10000)
			doPlayerAddItem(cid, 2640, 1)
			doSendAnimatedText(getCreaturePosition(cid), "Softs!", TEXTCOLOR_LIGHTBLUE)
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You haven\'t enough money.")
		end
	else
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You haven\'t worn soft boots.")
	end

	return true
end
 
Yyy

Code:
function onSay(cid, words, param, channel)
	if (getPlayerItemCount(cid, 6530) >= 1) then
		if (getPlayerMoney(cid) >= 10000) then
			doPlaerRemoveItem(cid, 6530, 1)
			doPlayerRemoveMoney(cid, 10000)
			doPlayerAddItem(cid, 2640, 1)
			doSendAnimatedText(getCreaturePosition(cid), "Softs!", TEXTCOLOR_LIGHTBLUE)
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You haven\'t enough money.")
		end
	else
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You haven\'t worn soft boots.")
	end

	return true
end
 
@up error
LUA:
Lua Script Error: [TalkAction Interface]
data/talkactions/scripts/softboots.lua:onSay

data/talkactions/scripts/softboots.lua:4: attempt to call global 'doPlaerRemoveItem' (a nil value)
stack traceback:
        data/talkactions/scripts/softboots.lua:4: in function <data/talkactions/scripts/softboots.lua:1>

EDIT
doPlaerRemoveItem(cid, 6530, 1) -> doPlayerRemoveItem(cid, 6530, 1)

EDIT2
THX !! wszystko działa :*
 
Last edited:
!soft Only for VIPs acc
For (new soft boots) item ID: 10021 or trade for 6530 (old soft boots)

in:talkaction.xml add
LUA:
<talkaction words="!repairsoft" event="script" value="vip_repair_soft.lua"/>


in:talkaction/scripts/vip_repair_soft.lua add
LUA:
function onSay(cid, words, param, channel)
	if (getPlayerItemCount(cid, 10021) >= 1 and getVipTime(cid) >= 1) then
		if (getPlayerMoney(cid) >= 10000) then
			doPlayerRemoveItem(cid, 10021, 1)
			doPlayerRemoveMoney(cid, 10000)
			doPlayerAddItem(cid, 2640, 1)
			doSendAnimatedText(getCreaturePosition(cid), "Softs!", TEXTCOLOR_LIGHTBLUE)
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You haven\'t enough money.")
		end
	else
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You haven\'t worn soft boots? Or you not a VIP? Contact  NPC Aldo in Venore.")
	end

	return true
end

:peace:
My OtServer: http://mundinho.sytes.net:8090/
 
UP
Why only for VIP? He didn't want any vips -,-
LUA:
  -- Script by Magic
function onSay(cid, words, param)
-- \/ Panel konfiguracji skryptu \/
local stare = 6530
local nowe = 2640
local pozycja = getPlayerPosition(cid)
local tekst = "Soft" -- Wpisz tekst
local tekst1 = "Nie masz zuzytych softow." -- Co ma pisac jak nie ma softow
local tekst2 = "Nie masz kasy, Koszt odnowy softow to 1cc." -- Co ma pisac jak nie ma kasy
-- /\ Panel konfiguracji skryptu /\
    if getPlayerMoney(cid) >= 10000 then
		if getPlayerItemCount(cid,stare) >= 1 then
			pay(cid, 10000)
			doPlayerRemoveItem(cid,stare,1)
			doPlayerAddItem(cid,nowe,1) == TRUE then
			doSendAnimatedText(pozycja,tekst,198)
		else
        doPlayerSendTextMessage(cid,22,tekst2)
		return 1
		end
    else
    doPlayerSendTextMessage(cid,22,tekst1)
    return 1
    end
end

PS
anotapreta
In TFS there isn't function like getVipTime(cid), so when you write scripts with custom function write this function too...
 

Similar threads

Back
Top