• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

TalkAction I need script !buyhouse right now

I need this script to 0.3.5 version please ; p

Code:
function onSay(cid, words, param)

	local lookPos = getPlayerLookPos(cid)
	local LEVEL = getConfigInfo("levelToBuyHouse")
	local house = House.getHouseByPos(lookPos)
	if(house == nil) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You must be looking to a house to buy one.")
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, words)
		return FALSE
	end

	if(house:buy(cid)) then
		doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
	else
		doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
	end

	if(getPlayerLevel(cid) < LEVEL) then
		doPlayerSendCancel(cid, "You need level "..LEVEL.." to buy a house.")
		return TRUE
	end

	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, words)
	return FALSE
end

Rep me++
 
It doesnt work, please seriosuly i need this script right now !!
 
It doesnt work, please seriosuly i need this script right now !!

It work-.- Just add this into your talkactions.xml

Code:
<talkaction words="!buyhouse" filter="word-spaced" event="function" value="houseBuy"/>

Afterwards go to talkactions/scripts and then paste the script of above inside that folder. And then it works.

Rep me++
 
@Laxiaa:
Using function and script? Bye noob.

@Thread starter:
It's already included in source.
 
Stupid enough to not search nor download crying damsson 0.3.5pl1 and take the scripts from the files there <_<

but you are more stupid than you think, cause there is no !buyhouse command, thats named as "alana res" now and its a function, you cannot extract it to script (you need source)

@topic

Laxiaa, if you use newest tfs and you want to have !buyhouse just add this to your talkactions :
Code:
<talkaction words="!buyhouse" filter="word-spaced" event="function" value="houseBuy"/>
<talkaction words="!leavehouse" filter="word-spaced" event="function" value="houseSell"/>
 
Last edited:
Back
Top