What's new

Creaturescript i banip

Status
Not open for further replies.

sharki7

Advanced User
Joined
Apr 26, 2008
Messages
157
Reaction score
11
Age
29
Witajcie. Potrzebuje na OTS'a czego? takiego:
1. Je?eli GM+ wchodzi na OTS, wy?wietla si? na zielono komunikat (np. GM Nastix has log in.) (creaturescripts)
2. W ci?gu dalszym poszukuj? komendy na ban ip, gdy? ban ip nie dzia?a mi poprzez ctrl y (jestem god -.-) ani /ban nick!

Prosz? o pomoc ;-) Reput!
 

Xayan

Senior User
Joined
Jul 4, 2009
Messages
2,608
Reaction score
390
Age
28
Odp: Creaturescript i banip

1. Spr?buj tego pliku login.lua, ale na wszelki wypadek zr?b kopi? :p

Code:
local config = {
	loginMessage = getConfigValue('loginMessage')
}

function onLogin(cid)
	local loss = getConfigValue('deathLostPercent')
	if(loss ~= nil) then
		doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
	end

	local accountManager = getPlayerAccountManager(cid)
	if(accountManager == MANAGER_NONE) then
		local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
		if(lastLogin > 0) then
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
			str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
		else
			str = str .. " Please choose your outfit."
			doPlayerSendOutfitWindow(cid)
		end

		doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
	elseif(accountManager == MANAGER_NAMELOCK) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
	elseif(accountManager == MANAGER_ACCOUNT) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
	end

	if(not isPlayerGhost(cid)) then
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
	end
	
	if(getPlayerAccess(cid) > 3) then
		local imie = getCreatureName(cid)
		doBroadcastMessage(""..imie.." has logged in.")
	end

	registerCreatureEvent(cid, "Mail")
	registerCreatureEvent(cid, "GuildMotd")
	registerCreatureEvent(cid, "Idle")
	registerCreatureEvent(cid, "SkullCheck")
	registerCreatureEvent(cid, "ReportBug")
	return true
end
 

sharki7

Advanced User
Joined
Apr 26, 2008
Messages
157
Reaction score
11
Age
29
Odp: Creaturescript i banip

@up
Niestety nie dzia?a ^^ dobrze ?e mia?em kopie bo sie logn?? nie da?o :D
 

sharki7

Advanced User
Joined
Apr 26, 2008
Messages
157
Reaction score
11
Age
29
Odp: Creaturescript i banip

Od?wie?am. Prosz? o pomoc!
 

sharki7

Advanced User
Joined
Apr 26, 2008
Messages
157
Reaction score
11
Age
29
Odp: Creaturescript i banip

Refresh~~ -.- Pomocy!!!
 
Status
Not open for further replies.
Top