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

Complex talkaction

Ancore

New Member
Joined
Jul 6, 2012
Messages
216
Reaction score
1
Hello, I want to put a talkaction with words !worldon and !worldoff, !worldon activate the following condition:
When a player dies he doesn't loose level, skills, magic or items... BUT gets teleported to the temple as if he has die...

And !worldoff disable the !worldon.... so take the things back to normal.... when a player dies, he really dies, loose level and all the things
 
Creature scripts:
Lua:
local storage = 3762
function onPrepareDeath(cid, killer)
	if getGlobalStorageValue(storage) == 1 then
		doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
		doCreatureAddHealt(cid, getCreatureMaxHealth(cid))
		doCreatureAddMana(cid, getPlayerMaxMana(cid))
		return false
	end
return true
end


Talk actions:
Lua:
local storage = 3762
function onSay(cid, word, params)
	if(param == '') then
		doPlayerSendCancel(cid, "Command Param Required")
		return false
	end
	if(param == 'on') then
		setGlobalStorageValue(storage, 1)
		doPlayerSendTextMessage(cid, 21, "Safe mode enabled")
	elseif(param == 'off') then
		setGlobalStorageValue(storage,-1)
		doPlayerSendTextMessage(cid,21,"Safe mode disabled")
	end
return true
end
 
Back
Top